UNPKG

1 MBJavaScriptView Raw
1/*! For license information please see ripple-latest-min.js.LICENSE.txt */
2var ripple;ripple=(()=>{var e={4419:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RippleAPI=void 0;const u=r(7187),c=r(1007),h=r(5130),f=a(r(3028)),d=a(r(5797)),l=a(r(5114)),p=a(r(8080)),m=a(r(4885)),y=a(r(9048)),g=a(r(6274)),b=r(2964),v=r(5210),w=a(r(2490)),_=a(r(7117)),M=a(r(2827)),S=a(r(2331)),A=a(r(3487)),E=a(r(5070)),O=a(r(8788)),P=a(r(6759)),x=a(r(4656)),T=a(r(6857)),j=a(r(4112)),k=a(r(9712)),I=a(r(2299)),R=a(r(4436)),B=a(r(5313)),N=a(r(420)),C=a(r(3963)),L=a(r(8220)),D=a(r(1655)),F=a(r(4036)),q=a(r(6250)),U=r(2247),z=r(1310),V=a(r(6773)),$=a(r(4009)),H=a(r(4371)),X=a(r(62)),J=a(r(1615)),K=o(r(6699)),Z=o(r(4377)),G=o(r(7384)),W=r(8715),Y=r(6699),Q=r(8914),ee=r(7854);class te extends u.EventEmitter{constructor(e={}){super(),this.connect=h.connect,this.disconnect=h.disconnect,this.isConnected=h.isConnected,this.getServerInfo=W.getServerInfo,this.getFee=W.getFee,this.getLedgerVersion=h.getLedgerVersion,this.getTransaction=f.default,this.getTransactions=d.default,this.getTrustlines=l.default,this.getBalances=p.default,this.getBalanceSheet=m.default,this.getPaths=y.default,this.getOrderbook=b.getOrderbook,this.getOrders=g.default,this.getSettings=v.getSettings,this.getAccountInfo=w.default,this.getAccountObjects=_.default,this.getPaymentChannel=M.default,this.getLedger=X.default,this.parseAccountFlags=v.parseAccountFlags,this.preparePayment=S.default,this.prepareTrustline=A.default,this.prepareOrder=E.default,this.prepareOrderCancellation=O.default,this.prepareEscrowCreation=P.default,this.prepareEscrowExecution=x.default,this.prepareEscrowCancellation=T.default,this.preparePaymentChannelCreate=j.default,this.preparePaymentChannelFund=k.default,this.preparePaymentChannelClaim=I.default,this.prepareCheckCreate=R.default,this.prepareCheckCash=N.default,this.prepareCheckCancel=B.default,this.prepareTicketCreate=L.default,this.prepareSettings=C.default,this.sign=D.default,this.combine=F.default,this.submit=q.default,this.deriveKeypair=z.deriveKeypair,this.deriveAddress=z.deriveAddress,this.computeLedgerHash=V.default,this.signPaymentChannelClaim=$.default,this.verifyPaymentChannelClaim=H.default,this.errors=c.errors,this.xrpToDrops=c.xrpToDrops,this.dropsToXrp=c.dropsToXrp,this.rippleTimeToISO8601=c.rippleTimeToISO8601,this.iso8601ToRippleTime=c.iso8601ToRippleTime,this.txFlags=c.txFlags,this.isValidAddress=G.isValidAddress,this.isValidSecret=G.isValidSecret,c.validate.apiOptions(e),this._feeCushion=e.feeCushion||1.2,this._maxFeeXRP=e.maxFeeXRP||"2";const t=e.server;void 0!==t?(this.connection=new c.Connection(t,e),this.connection.on("ledgerClosed",(e=>{this.emit("ledger",h.formatLedgerClose(e))})),this.connection.on("error",((e,t,r)=>{this.emit("error",e,t,r)})),this.connection.on("connected",(()=>{this.emit("connected")})),this.connection.on("disconnected",(e=>{let t=e;1005!==t&&4e3!==t||(t=1e3),this.emit("disconnected",t)}))):this.connection=new c.Connection(null,e)}request(e,t={}){return s(this,void 0,void 0,(function*(){return this.connection.request(Object.assign(Object.assign({},t),{command:e,account:t.account?c.ensureClassicAddress(t.account):void 0}))}))}hasNextPage(e){return!!e.marker}requestNextPage(e,t={},r){return s(this,void 0,void 0,(function*(){if(!r.marker)return Promise.reject(new c.errors.NotFoundError("response does not have a next page"));const n=Object.assign({},t,{marker:r.marker});return this.request(e,n)}))}prepareTransaction(e,t={}){return s(this,void 0,void 0,(function*(){return Z.prepareTransaction(e,this,t)}))}convertStringToHex(e){return Z.convertStringToHex(e)}_requestAll(e,t={},r={}){return s(this,void 0,void 0,(function*(){const n=r.collect||function(e){switch(e){case"account_offers":case"book_offers":return"offers";case"account_lines":return"lines";default:return}}(e);if(!n)throw new c.errors.ValidationError(`no collect key for command ${e}`);const i=void 0!==t.limit?t.limit:1/0;let o,s=0,a=t.marker;const u=[];do{const r=Y.clamp(i-s,10,400),c=Object.assign(Object.assign({},t),{limit:r,marker:a}),h=yield this.request(e,c),f=h[n];a=h.marker,u.push(h),Array.isArray(f)?(s+=f.length,o=f.length):o=0}while(a&&s<i&&0!==o);return u}))}generateAddress(e={}){return U.generateAddressAPI(Object.assign(Object.assign({},e),{includeClassicAddress:!0}))}generateXAddress(e={}){return U.generateAddressAPI(e)}}t.RippleAPI=te,te._PRIVATE={validate:c.validate,RangeSet:J.default,ledgerUtils:K,schemaValidator:G},te.renameCounterpartyToIssuer=Y.renameCounterpartyToIssuer,te.formatBidsAndAsks=b.formatBidsAndAsks,te.deriveXAddress=z.deriveXAddress,te.deriveClassicAddress=z.deriveAddress,te.classicAddressToXAddress=Q.classicAddressToXAddress,te.xAddressToClassicAddress=Q.xAddressToClassicAddress,te.isValidXAddress=Q.isValidXAddress,te.isValidClassicAddress=Q.isValidClassicAddress,te.encodeSeed=Q.encodeSeed,te.decodeSeed=Q.decodeSeed,te.encodeAccountID=Q.encodeAccountID,te.decodeAccountID=Q.decodeAccountID,te.encodeNodePublic=Q.encodeNodePublic,te.decodeNodePublic=Q.decodeNodePublic,te.encodeAccountPublic=Q.encodeAccountPublic,te.decodeAccountPublic=Q.decodeAccountPublic,te.encodeXAddress=Q.encodeXAddress,te.decodeXAddress=Q.decodeXAddress,te.computeBinaryTransactionHash=ee.computeBinaryTransactionHash,te.computeTransactionHash=ee.computeTransactionHash,te.computeBinaryTransactionSigningHash=ee.computeBinaryTransactionSigningHash,te.computeAccountLedgerObjectID=ee.computeAccountLedgerObjectID,te.computeSignerListLedgerObjectID=ee.computeSignerListLedgerObjectID,te.computeOrderID=ee.computeOrderID,te.computeTrustlineHash=ee.computeTrustlineHash,te.computeTransactionTreeHash=ee.computeTransactionTreeHash,te.computeStateTreeHash=ee.computeStateTreeHash,te.computeLedgerHash=V.default,te.computeEscrowHash=ee.computeEscrowHash,te.computePaymentChannelHash=ee.computePaymentChannelHash},5162:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RippleAPIBroadcast=void 0;const a=o(r(6215)),u=r(4419);class c extends u.RippleAPI{constructor(e,t={}){super(t),this.ledgerVersion=void 0;const r=e.map((e=>new u.RippleAPI(a.assign({},t,{server:e}))));this._apis=r,this.getMethodNames().forEach((e=>{this[e]=function(){return Promise.race(r.map((t=>t[e](...arguments))))}})),this.connect=function(){return s(this,void 0,void 0,(function*(){yield Promise.all(r.map((e=>e.connect())))}))},this.disconnect=function(){return s(this,void 0,void 0,(function*(){yield Promise.all(r.map((e=>e.disconnect())))}))},this.isConnected=function(){return r.map((e=>e.isConnected())).every(Boolean)};const n=r[0];["sign","generateAddress","computeLedgerHash"].forEach((e=>{this[e]=n[e].bind(n)})),r.forEach((e=>{e.on("ledger",this.onLedgerEvent.bind(this)),e.on("error",((e,t,r)=>this.emit("error",e,t,r)))}))}onLedgerEvent(e){(e.ledgerVersion>this.ledgerVersion||void 0===this.ledgerVersion)&&(this.ledgerVersion=e.ledgerVersion,this.emit("ledger",e))}getMethodNames(){const e=[],t=this._apis[0];for(const r of Object.getOwnPropertyNames(t))"function"==typeof t[r]&&e.push(r);return e}}t.RippleAPIBroadcast=c},7902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExponentialBackoff=void 0,t.ExponentialBackoff=class{constructor(e={}){this.factor=2,this.jitter=0,this.attempts=0,this.ms=e.min||100,this.max=e.max||1e4}duration(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)}reset(){this.attempts=0}}},9783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPrototypeOf=t.getConstructorName=void 0,t.setPrototypeOf=function(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t},t.getConstructorName=function(e){if(e.constructor.name)return e.constructor.name;const t=e.constructor.toString(),r=t.match(/^function\s+([^(]*)/),n=t.match(/^class\s([^\s]*)/);return r?r[1]:n[1]}},8348:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;const c=s(r(6215)),h=r(7187),f=r(8575),d=u(r(9491)),l=u(r(1615)),p=r(8015),m=r(7902);class y{constructor(){this.feeBase=null,this.feeRef=null,this.latestVersion=null,this.reserveBase=null,this.availableVersions=new l.default}hasVersion(e){return this.availableVersions.containsValue(e)}hasVersions(e,t){return this.availableVersions.containsRange(e,t)}update(e){this.feeBase=e.fee_base,this.feeRef=e.fee_ref,this.latestVersion=e.ledger_index,this.reserveBase=e.reserve_base,e.validated_ledgers?(this.availableVersions.reset(),this.availableVersions.parseAndAddRanges(e.validated_ledgers)):this.availableVersions.addValue(this.latestVersion)}}class g{constructor(){this.promisesAwaitingConnection=[]}resolveAllAwaiting(){this.promisesAwaitingConnection.map((({resolve:e})=>e())),this.promisesAwaitingConnection=[]}rejectAllAwaiting(e){this.promisesAwaitingConnection.map((({reject:t})=>t(e))),this.promisesAwaitingConnection=[]}awaitConnection(){return new Promise(((e,t)=>{this.promisesAwaitingConnection.push({resolve:e,reject:t})}))}}class b{constructor(){this.nextId=0,this.promisesAwaitingResponse=[]}cancel(e){const{timer:t}=this.promisesAwaitingResponse[e];clearTimeout(t),delete this.promisesAwaitingResponse[e]}resolve(e,t){const{timer:r,resolve:n}=this.promisesAwaitingResponse[e];clearTimeout(r),n(t),delete this.promisesAwaitingResponse[e]}reject(e,t){const{timer:r,reject:n}=this.promisesAwaitingResponse[e];clearTimeout(r),n(t),delete this.promisesAwaitingResponse[e]}rejectAll(e){this.promisesAwaitingResponse.forEach(((t,r)=>{this.reject(r,e)}))}createRequest(e,t){const r=this.nextId++,n=JSON.stringify(Object.assign(Object.assign({},e),{id:r})),i=setTimeout((()=>this.reject(r,new p.TimeoutError)),t);i.unref&&i.unref();const o=new Promise(((e,t)=>{this.promisesAwaitingResponse[r]={resolve:e,reject:t,timer:i}}));return[r,n,o]}handleResponse(e){if(!Number.isInteger(e.id)||e.id<0)throw new p.ResponseFormatError("valid id not found in response",e);if(this.promisesAwaitingResponse[e.id])if("error"!==e.status)if("success"===e.status)this.resolve(e.id,e.result);else{const t=new p.ResponseFormatError(`unrecognized status: ${e.status}`,e);this.reject(e.id,t)}else{const t=new p.RippledError(e.error_message||e.error,e);this.reject(e.id,t)}}}class v extends h.EventEmitter{constructor(e,t={}){super(),this._ws=null,this._reconnectTimeoutID=null,this._heartbeatIntervalID=null,this._retryConnectionBackoff=new m.ExponentialBackoff({min:100,max:6e4}),this._trace=()=>{},this._ledger=new y,this._requestManager=new b,this._connectionManager=new g,this._clearHeartbeatInterval=()=>{clearInterval(this._heartbeatIntervalID)},this._startHeartbeatInterval=()=>{this._clearHeartbeatInterval(),this._heartbeatIntervalID=setInterval((()=>this._heartbeat()),this._config.timeout)},this._heartbeat=()=>this.request({command:"ping"}).catch((()=>{this.reconnect().catch((e=>{this.emit("error","reconnect",e.message,e)}))})),this._onConnectionFailed=e=>{this._ws&&(this._ws.removeAllListeners(),this._ws.on("error",(()=>{})),this._ws.close(),this._ws=null),"number"==typeof e?this._connectionManager.rejectAllAwaiting(new p.NotConnectedError(`Connection failed with code ${e}.`,{code:e})):e&&e.message?this._connectionManager.rejectAllAwaiting(new p.NotConnectedError(e.message,e)):this._connectionManager.rejectAllAwaiting(new p.NotConnectedError("Connection failed."))},this.setMaxListeners(1/0),this._url=e,this._config=Object.assign({timeout:2e4,connectionTimeout:5e3},t),"function"==typeof t.trace?this._trace=t.trace:!0===t.trace&&(this._trace=console.log)}_onMessage(e){let t;this._trace("receive",e);try{t=JSON.parse(e)}catch(t){return void this.emit("error","badMessage",t.message,e)}if(void 0===t.type&&t.error)this.emit("error",t.error,t.error_message,t);else if(t.type&&this.emit(t.type,t),"ledgerClosed"===t.type&&this._ledger.update(t),"response"===t.type)try{this._requestManager.handleResponse(t)}catch(t){this.emit("error","badMessage",t.message,e)}}get _state(){return this._ws?this._ws.readyState:d.default.CLOSED}get _shouldBeConnected(){return null!==this._ws}_waitForReady(){return new Promise(((e,t)=>{this._shouldBeConnected?this._state===d.default.OPEN?e():this.once("connected",(()=>e())):t(new p.NotConnectedError)}))}_subscribeToLedger(){return a(this,void 0,void 0,(function*(){const e=yield this.request({command:"subscribe",streams:["ledger"]});if(c.isEmpty(e)||!e.ledger_index)try{yield this.disconnect()}catch(e){}finally{throw new p.RippledNotInitializedError("Rippled not initialized")}this._ledger.update(e)}))}isConnected(){return this._state===d.default.OPEN}connect(){if(this.isConnected())return Promise.resolve();if(this._state===d.default.CONNECTING)return this._connectionManager.awaitConnection();if(!this._url)return Promise.reject(new p.ConnectionError("Cannot connect because no server was specified"));if(this._ws)return Promise.reject(new p.RippleError("Websocket connection never cleaned up.",{state:this._state}));const e=setTimeout((()=>{this._onConnectionFailed(new p.ConnectionError(`Error: connect() timed out after ${this._config.connectionTimeout} ms. If your internet connection is working, the rippled server may be blocked or inaccessible. You can also try setting the 'connectionTimeout' option in the RippleAPI constructor.`))}),this._config.connectionTimeout);return this._ws=function(e,t){const i={};if(void 0!==t.proxy){const n=f.parse(e),o=f.parse(t.proxy),s=c.omitBy({secureEndpoint:"wss:"===n.protocol,secureProxy:"https:"===o.protocol,auth:t.proxyAuthorization,ca:t.trustedCertificates,key:t.key,passphrase:t.passphrase,cert:t.certificate},c.isUndefined),a=c.assign({},o,s);let u;try{u=r(1578)}catch(e){throw new Error('"proxy" option is not supported in the browser')}i.agent=new u(a)}if(void 0!==t.authorization){const e=n.from(t.authorization).toString("base64");i.headers={Authorization:`Basic ${e}`}}const o=c.omitBy({ca:t.trustedCertificates,key:t.key,passphrase:t.passphrase,cert:t.certificate},c.isUndefined),s=c.assign({},i,o),a=new d.default(e,null,s);return"function"==typeof a.setMaxListeners&&a.setMaxListeners(1/0),a}(this._url,this._config),this._ws.on("error",this._onConnectionFailed),this._ws.on("error",(()=>clearTimeout(e))),this._ws.on("close",this._onConnectionFailed),this._ws.on("close",(()=>clearTimeout(e))),this._ws.once("open",(()=>a(this,void 0,void 0,(function*(){this._ws.removeAllListeners(),clearTimeout(e),this._ws.on("message",(e=>this._onMessage(e))),this._ws.on("error",(e=>this.emit("error","websocket",e.message,e))),this._ws.once("close",(e=>{if(this._clearHeartbeatInterval(),this._requestManager.rejectAll(new p.DisconnectedError("websocket was closed")),this._ws.removeAllListeners(),this._ws=null,this.emit("disconnected",e),4e3!==e){const e=this._retryConnectionBackoff.duration();this._trace("reconnect",`Retrying connection in ${e}ms.`),this.emit("reconnecting",this._retryConnectionBackoff.attempts),this._reconnectTimeoutID=setTimeout((()=>{this.reconnect().catch((e=>{this.emit("error","reconnect",e.message,e)}))}),e)}}));try{this._retryConnectionBackoff.reset(),yield this._subscribeToLedger(),this._startHeartbeatInterval(),this._connectionManager.resolveAllAwaiting(),this.emit("connected")}catch(e){this._connectionManager.rejectAllAwaiting(e),yield this.disconnect().catch((()=>{}))}})))),this._connectionManager.awaitConnection()}disconnect(){return clearTimeout(this._reconnectTimeoutID),this._reconnectTimeoutID=null,this._state!==d.default.CLOSED&&this._ws?new Promise((e=>{this._ws.once("close",(t=>e(t))),this._state!==d.default.CLOSING&&this._ws.close(4e3)})):Promise.resolve(void 0)}reconnect(){return a(this,void 0,void 0,(function*(){this.emit("reconnect"),yield this.disconnect(),yield this.connect()}))}getFeeBase(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.feeBase}))}getFeeRef(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.feeRef}))}getLedgerVersion(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.latestVersion}))}getReserveBase(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.reserveBase}))}hasLedgerVersions(e,t){return a(this,void 0,void 0,(function*(){return t?(yield this._waitForReady(),this._ledger.hasVersions(e,t)):this.hasLedgerVersion(e)}))}hasLedgerVersion(e){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.hasVersion(e)}))}request(e,t){return a(this,void 0,void 0,(function*(){if(!this._shouldBeConnected)throw new p.NotConnectedError;const[r,n,i]=this._requestManager.createRequest(e,t||this._config.timeout);return this._trace("send",n),function(e,t){return new Promise(((r,n)=>{e.send(t,void 0,(e=>{e?n(new p.DisconnectedError(e.message,e)):r()}))}))}(this._ws,n).catch((e=>{this._requestManager.reject(r,e)})),i}))}}t.Connection=v},5303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFlags=t.AccountFlagIndices=t.AccountFields=void 0;const n=r(4684);t.AccountFlags={passwordSpent:65536,requireDestinationTag:131072,requireAuthorization:262144,depositAuth:16777216,disallowIncomingXRP:524288,disableMasterKey:1048576,noFreeze:2097152,globalFreeze:4194304,defaultRipple:8388608};const i={requireDestinationTag:n.txFlagIndices.AccountSet.asfRequireDest,requireAuthorization:n.txFlagIndices.AccountSet.asfRequireAuth,depositAuth:n.txFlagIndices.AccountSet.asfDepositAuth,disallowIncomingXRP:n.txFlagIndices.AccountSet.asfDisallowXRP,disableMasterKey:n.txFlagIndices.AccountSet.asfDisableMaster,enableTransactionIDTracking:n.txFlagIndices.AccountSet.asfAccountTxnID,noFreeze:n.txFlagIndices.AccountSet.asfNoFreeze,globalFreeze:n.txFlagIndices.AccountSet.asfGlobalFreeze,defaultRipple:n.txFlagIndices.AccountSet.asfDefaultRipple};t.AccountFlagIndices=i,t.AccountFields={EmailHash:{name:"emailHash",encoding:"hex",length:32,defaults:"00000000000000000000000000000000"},WalletLocator:{name:"walletLocator"},MessageKey:{name:"messageKey"},Domain:{name:"domain",encoding:"hex"},TransferRate:{name:"transferRate",defaults:0,shift:9},TickSize:{name:"tickSize",defaults:0}}},8015:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerVersionError=t.MissingLedgerHistoryError=t.PendingLedgerVersionError=t.NotFoundError=t.ValidationError=t.ResponseFormatError=t.TimeoutError=t.RippledNotInitializedError=t.DisconnectedError=t.NotConnectedError=t.RippledError=t.ConnectionError=t.UnexpectedError=t.RippleError=void 0;const s=r(9539),a=o(r(9783));class u extends Error{constructor(e="",t){super(e),this.name=a.getConstructorName(this),this.message=e,this.data=t,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(){let e="["+this.name+"("+this.message;return this.data&&(e+=", "+s.inspect(this.data)),e+=")]",e}inspect(){return this.toString()}}t.RippleError=u,t.RippledError=class extends u{},t.UnexpectedError=class extends u{},t.LedgerVersionError=class extends u{};class c extends u{}t.ConnectionError=c,t.NotConnectedError=class extends c{},t.DisconnectedError=class extends c{},t.RippledNotInitializedError=class extends c{},t.TimeoutError=class extends c{},t.ResponseFormatError=class extends c{},t.ValidationError=class extends u{},t.NotFoundError=class extends u{constructor(e="Not found"){super(e)}},t.MissingLedgerHistoryError=class extends u{constructor(e){super(e||"Server is missing ledger history in the specified range")}},t.PendingLedgerVersionError=class extends u{constructor(e){super(e||"maxLedgerVersion is greater than server's most recent validated ledger")}}},642:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TRANSACTION_ID=1415073280]="TRANSACTION_ID",e[e.TRANSACTION_NODE=1397638144]="TRANSACTION_NODE",e[e.INNER_NODE=1296649728]="INNER_NODE",e[e.LEAF_NODE=1296846336]="LEAF_NODE",e[e.TRANSACTION_SIGN=1398036480]="TRANSACTION_SIGN",e[e.TRANSACTION_SIGN_TESTNET=1937012736]="TRANSACTION_SIGN_TESTNET",e[e.TRANSACTION_MULTISIGN=1397576704]="TRANSACTION_MULTISIGN",e[e.LEDGER=1280791040]="LEDGER"}(r||(r={})),t.default=r},7854:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computePaymentChannelHash=t.computeEscrowHash=t.computeLedgerHash=t.computeStateTreeHash=t.computeTransactionTreeHash=t.computeTrustlineHash=t.computeOrderID=t.computeSignerListLedgerObjectID=t.computeAccountLedgerObjectID=t.computeBinaryTransactionSigningHash=t.computeTransactionHash=t.computeBinaryTransactionHash=void 0;const o=i(r(4431)),s=r(8914),a=i(r(4877)),u=i(r(642)),c=r(6523),h=r(2353),f=i(r(4109)),d=(e,t)=>Array(t-e.length+1).join("0")+e,l=(e,t)=>d(Number(e).toString(16),2*t),p=e=>n.from(e).toString("hex"),m=e=>l(f.default[e].charCodeAt(0),2),y=e=>n.from(s.decodeAccountID(e)).toString("hex"),g=e=>{const t=e.length/2;if(t<=192)return p([t])+e;if(t<=12480){const r=t-193;return p([193+(r>>>8),255&r])+e}if(t<=918744){const r=t-12481;return p([241+(r>>>16),r>>>8&255,255&r])+e}throw new Error("Variable integer overflow.")};t.computeBinaryTransactionHash=e=>{const t=u.default.TRANSACTION_ID.toString(16).toUpperCase();return a.default(t+e)},t.computeTransactionHash=e=>t.computeBinaryTransactionHash(h.encode(e)),t.computeBinaryTransactionSigningHash=e=>{const t=u.default.TRANSACTION_SIGN.toString(16).toUpperCase();return a.default(t+e)},t.computeAccountLedgerObjectID=e=>a.default(m("account")+y(e)),t.computeSignerListLedgerObjectID=e=>a.default(m("signerList")+y(e)+"00000000"),t.computeOrderID=(e,t)=>{const r="00"+l(f.default.offer.charCodeAt(0),1);return a.default(r+y(e)+l(t,4))},t.computeTrustlineHash=(e,t,r)=>{const n=y(e),i=y(t),s=new o.default(n,16).isGreaterThan(new o.default(i,16)),u=s?i:n,c=s?n:i,h=m("rippleState");return a.default(h+u+c+(e=>{if(3===e.length){const t=new Array(21).join("0").split("").map(parseFloat);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),p(t)}return e})(r))},t.computeTransactionTreeHash=e=>{const r=new c.SHAMap;return e.forEach((e=>{const n=h.encode(e),i=h.encode(e.metaData),o=t.computeBinaryTransactionHash(n),s=g(n)+g(i);r.addItem(o,s,c.NodeType.TRANSACTION_METADATA)})),r.hash},t.computeStateTreeHash=e=>{const t=new c.SHAMap;return e.forEach((e=>{const r=h.encode(e);t.addItem(e.index,r,c.NodeType.ACCOUNT_STATE)})),t.hash},t.computeLedgerHash=e=>{const t=u.default.LEDGER.toString(16).toUpperCase();return a.default(t+l(e.ledger_index,4)+((e,t)=>{const r=new o.default(e).toString(16);return d(r,16)})(e.total_coins)+e.parent_hash+e.transaction_hash+e.account_hash+l(e.parent_close_time,4)+l(e.close_time,4)+l(e.close_time_resolution,1)+l(e.close_flags,1))},t.computeEscrowHash=(e,t)=>a.default(m("escrow")+y(e)+l(t,4)),t.computePaymentChannelHash=(e,t,r)=>a.default(m("paychan")+y(e)+y(t)+l(r,4))},4109:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={account:"a",dirNode:"d",generatorMap:"g",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",escrow:"u",amendment:"f",feeSettings:"e",ticket:"T",signerList:"S",paychan:"x",check:"C",depositPreauth:"p"}},4877:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const i=r(5835);t.default=e=>i.createHash("sha512").update(n.from(e,"hex")).digest("hex").toUpperCase().slice(0,64)},6523:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SHAMap=t.Leaf=t.InnerNode=t.Node=t.NodeType=void 0;const i=n(r(642)),o=n(r(4877)),s="0000000000000000000000000000000000000000000000000000000000000000";var a;!function(e){e[e.INNER=1]="INNER",e[e.TRANSACTION_NO_METADATA=2]="TRANSACTION_NO_METADATA",e[e.TRANSACTION_METADATA=3]="TRANSACTION_METADATA",e[e.ACCOUNT_STATE=4]="ACCOUNT_STATE"}(a=t.NodeType||(t.NodeType={}));class u{constructor(){}addItem(e,t){throw new Error("Called unimplemented virtual method SHAMapTreeNode#addItem.")}get hash(){throw new Error("Called unimplemented virtual method SHAMapTreeNode#hash.")}}t.Node=u;class c extends u{constructor(e=0){super(),this.leaves={},this.type=a.INNER,this.depth=e,this.empty=!0}addItem(e,t){const r=this.getNode(parseInt(e[this.depth],16));if(r){if(r instanceof c)r.addItem(e,t);else if(r instanceof h){if(r.tag===e)throw new Error("Tried to add a node to a SHAMap that was already in there.");{const n=new c(this.depth+1);n.addItem(r.tag,r),n.addItem(e,t),this.setNode(parseInt(e[this.depth],16),n)}}}else this.setNode(parseInt(e[this.depth],16),t)}setNode(e,t){if(e<0||e>15)throw new Error("Invalid slot: slot must be between 0-15.");this.leaves[e]=t,this.empty=!1}getNode(e){if(e<0||e>15)throw new Error("Invalid slot: slot must be between 0-15.");return this.leaves[e]}get hash(){if(this.empty)return s;let e="";for(let t=0;t<16;t++)e+=this.leaves[t]?this.leaves[t].hash:s;const t=i.default.INNER_NODE.toString(16);return o.default(t+e)}}t.InnerNode=c;class h extends u{constructor(e,t,r){super(),this.tag=e,this.type=r,this.data=t}get hash(){switch(this.type){case a.ACCOUNT_STATE:{const e=i.default.LEAF_NODE.toString(16);return o.default(e+this.data+this.tag)}case a.TRANSACTION_NO_METADATA:{const e=i.default.TRANSACTION_ID.toString(16);return o.default(e+this.data)}case a.TRANSACTION_METADATA:{const e=i.default.TRANSACTION_NODE.toString(16);return o.default(e+this.data+this.tag)}default:throw new Error("Tried to hash a SHAMap node of unknown type.")}}}t.Leaf=h,t.SHAMap=class{constructor(){this.root=new c(0)}addItem(e,t,r){this.root.addItem(e,new h(e,t,r))}get hash(){return this.root.hash}}},1007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.serverInfo=t.validate=t.errors=t.constants=t.ensureClassicAddress=void 0;const s=o(r(5303));t.constants=s;const a=o(r(8015));t.errors=a;const u=o(r(6008));t.validate=u;const c=o(r(8715));t.serverInfo=c;const h=r(8914);t.ensureClassicAddress=function(e){if(h.isValidXAddress(e)){const{classicAddress:t,tag:r}=h.xAddressToClassicAddress(e);if(!1!==r)throw new Error("This command does not support the use of a tag. Use an address without a tag.");return t}return e};var f=r(4330);Object.defineProperty(t,"dropsToXrp",{enumerable:!0,get:function(){return f.dropsToXrp}}),Object.defineProperty(t,"xrpToDrops",{enumerable:!0,get:function(){return f.xrpToDrops}}),Object.defineProperty(t,"toRippledAmount",{enumerable:!0,get:function(){return f.toRippledAmount}}),Object.defineProperty(t,"removeUndefined",{enumerable:!0,get:function(){return f.removeUndefined}}),Object.defineProperty(t,"convertKeysFromSnakeCaseToCamelCase",{enumerable:!0,get:function(){return f.convertKeysFromSnakeCaseToCamelCase}}),Object.defineProperty(t,"iso8601ToRippleTime",{enumerable:!0,get:function(){return f.iso8601ToRippleTime}}),Object.defineProperty(t,"rippleTimeToISO8601",{enumerable:!0,get:function(){return f.rippleTimeToISO8601}});var d=r(8348);Object.defineProperty(t,"Connection",{enumerable:!0,get:function(){return d.Connection}});var l=r(4684);Object.defineProperty(t,"txFlags",{enumerable:!0,get:function(){return l.txFlags}})},1615:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6215)),a=o(r(9282));t.default=class{constructor(){this.reset()}reset(){this.ranges=[]}serialize(){return this.ranges.map((e=>e[0].toString()+"-"+e[1].toString())).join(",")}addRange(e,t){a.ok(e<=t,`invalid range ${e} <= ${t}`),this.ranges=function(e){const t=[[-1/0,-1/0]];return s.sortBy(e,(e=>e[0])).forEach((e=>{const r=t.pop();e[0]<=r[1]+1?t.push([r[0],Math.max(e[1],r[1])]):(t.push(r),t.push(e))})),t.slice(1)}(this.ranges.concat([[e,t]]))}addValue(e){this.addRange(e,e)}parseAndAddRanges(e){const t=e.split(",");s.forEach(t,(e=>{const t=e.split("-").map(Number);this.addRange(t[0],1===t.length?t[0]:t[1])}))}containsRange(e,t){return s.some(this.ranges,(r=>r[0]<=e&&r[1]>=t))}containsValue(e){return this.containsRange(e,e)}}},7384:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidAddress=t.isValidSecret=t.schemaValidate=void 0;const s=o(r(6215)),a=o(r(9282)),{Validator:u}=r(660),c=r(8015),h=r(8914),f=r(4330);Object.defineProperty(t,"isValidSecret",{enumerable:!0,get:function(){return f.isValidSecret}});const d=function(){const e=[r(3153),r(1912),r(758),r(8371),r(4595),r(6405),r(8703),r(2714),r(945),r(1951),r(9006),r(952),r(3230),r(3811),r(2578),r(935),r(3150),r(1925),r(1756),r(3512),r(4329),r(8969),r(3640),r(2422),r(1648),r(4442),r(5049),r(8180),r(6365),r(7761),r(159),r(4458),r(5107),r(8789),r(2702),r(2132),r(6884),r(5346),r(3132),r(2815),r(4201),r(3886),r(5746),r(8479),r(7740),r(8474),r(7379),r(1254),r(5314),r(8029),r(8482),r(4144),r(2747),r(4694),r(1763),r(6080),r(253),r(7955),r(6312),r(3911),r(2678),r(7769),r(8211),r(7727),r(9082),r(5300),r(3739),r(3574),r(7197),r(6346),r(1647),r(5338),r(1914),r(933),r(7184),r(6638),r(4159),r(8139),r(5158),r(7931),r(340),r(651),r(6067),r(2028),r(5734),r(1434),r(8508),r(5605),r(7071),r(3244),r(178),r(3345),r(1193),r(8492),r(4647),r(5944),r(261),r(6704),r(7185),r(1703),r(5682),r(1438),r(3117),r(8874),r(7845),r(7036),r(6968),r(2189),r(7840),r(1646),r(167),r(5954),r(921),r(7885),r(5534),r(6304)],t=e.map((e=>e.title)),n=s.keys(s.pickBy(s.countBy(t),(e=>e>1)));a.ok(0===n.length,"Duplicate schemas for: "+n);const i=new u;return i.customFormats.xAddress=function(e){return void 0===e||h.isValidXAddress(e)},i.customFormats.classicAddress=function(e){return void 0===e||l(e)},i.customFormats.secret=function(e){return void 0===e||f.isValidSecret(e)},s.forEach(e,(e=>i.addSchema(e,"/"+e.title))),i}();function l(e){return h.isValidXAddress(e)||h.isValidClassicAddress(e)}t.schemaValidate=function(e,t){const r=d.getSchema("/"+e);if(void 0===r)throw new c.ValidationError("no schema for "+e);const n=d.validate(t,r);if(!n.valid)throw new c.ValidationError(n.errors.join())},t.isValidAddress=l},5605:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"api-options","type":"object","properties":{"trace":{"type":"boolean","description":"If true, log rippled requests and responses to stdout."},"feeCushion":{"type":"number","minimum":1,"description":"Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`."},"maxFeeXRP":{"type":"string","description":"Maximum fee to use with transactions, in XRP. Must be a string-encoded number. Defaults to `\'2\'`."},"server":{"type":"string","description":"URI for rippled websocket port to connect to. Must start with `wss://`, `ws://`, `wss+unix://`, or `ws+unix://`.","format":"uri","pattern":"^(wss?|wss?\\\\+unix)://"},"proxy":{"format":"uri","description":"URI for HTTP/HTTPS proxy to use to connect to the rippled server."},"timeout":{"type":"integer","description":"Request timeout in milliseconds before considering a request to have failed. See also: connectionTimeout.","minimum":1},"connectionTimeout":{"type":"integer","description":"Connection timeout, in milliseconds, before considering connect() to have failed.","minimum":1},"proxyAuthorization":{"type":"string","description":"Username and password for HTTP basic authentication to the proxy in the format **username:password**."},"authorization":{"type":"string","description":"Username and password for HTTP basic authentication to the rippled server in the format **username:password**."},"trustedCertificates":{"type":"array","description":"Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.","items":{"type":"string","description":"A PEM-formatted SSL certificate to trust when connecting to a proxy."}},"key":{"type":"string","description":"A string containing the private key of the client in PEM format. (Can be an array of keys)."},"passphrase":{"type":"string","description":"The passphrase for the private key of the client."},"certificate":{"type":"string","description":"A string containing the certificate key of the client in PEM format. (Can be an array of certificates)."}},"additionalProperties":false}')},6304:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"combineParameters","type":"object","properties":{"signedTransactions":{"type":"array","description":"An array of signed transactions (from the output of [sign](#sign)) to combine.","items":{"type":"string","pattern":"^[A-F0-9]+$","description":"A single-signed transaction represented as an uppercase hexadecimal string (from the output of [sign](#sign))"},"minLength":1}},"additionalProperties":false,"required":["signedTransactions"]}')},1646:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"computeLedgerHashParameters","type":"object","properties":{"ledger":{"$ref":"getLedger","description":"The ledger header to hash."}},"additionalProperties":false,"required":["ledger"]}')},921:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"generateAddressParameters","type":"object","properties":{"options":{"type":"object","description":"Options to control how the address and secret are generated.","properties":{"entropy":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"description":"The entropy to use to generate the seed. Must be an array of length 16 with values from 0-255 (16 bytes of entropy)"},"algorithm":{"type":"string","enum":["ecdsa-secp256k1","ed25519"],"description":"The digital signature algorithm to generate an address for. Can be `ecdsa-secp256k1` (default) or `ed25519`."},"test":{"type":"boolean","description":"Specifies whether the address is intended for use on a test network such as Testnet or Devnet. If `true`, the address should only be used for testing, and will start with `T`. If `false`, the address should only be used on mainnet, and will start with `X`."},"includeClassicAddress":{"type":"boolean","description":"If `true`, return the classic address, in addition to the X-address."}},"additionalProperties":false}},"additionalProperties":false}')},3244:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountInfoParameters","description":"Parameters for getAccountInfo","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the account info of."},"options":{"description":"Options that affect what to return.","properties":{"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the account info as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},178:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountObjectsOptions","description":"Request options for getAccountObjects","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the account objects of."},"options":{"description":"Options that affect what to return.","properties":{"type":{"type":"string","enum":["check","escrow","offer","payment_channel","signer_list","state"],"description":"(Optional) Filter results to include only this type of ledger object. The valid types are: `check`, `escrow`, `offer`, `payment_channel`, `signer_list`, and `state` (trust line)."},"ledgerHash":{"type":"string","description":"(Optional) A 20-byte hex string for the ledger version to use."},"ledgerIndex":{"oneOf":[{"$ref":"ledgerVersion"},{"type":"string"}],"description":"(Optional) The sequence number of the ledger to use, or a shortcut string to choose a ledger automatically."},"limit":{"type":"integer","minimum":1,"description":"(Optional) The maximum number of objects to include in the results."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},651:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalanceSheetParameters","description":"Parameters for getBalanceSheet","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the account to get the balance sheet of."},"options":{"properties":{"excludeAddresses":{"type":"array","items":{"$ref":"address"},"uniqueItems":true,"description":"Addresses to exclude from the balance totals."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the balance sheet as of this historical ledger version."}},"description":"Options to determine how the balances will be calculated.","additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},340:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalancesParameters","description":"Parameters for getBalances","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get balances for."},"options":{"description":"Options to filter and determine which balances to return.","properties":{"counterparty":{"$ref":"address","description":"Only return balances with this counterparty."},"currency":{"$ref":"currency","description":"Only return balances for this currency."},"limit":{"type":"integer","minimum":1,"description":"Return at most this many balances."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return balances as they were in this historical ledger version."}},"additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},6067:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getLedgerParameters","description":"Parameters for getLedger","type":"object","properties":{"options":{"description":"Options affecting what ledger and how much data to return.","properties":{"ledgerHash":{"type":"string","description":"Get ledger data for this historical ledger hash."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Get ledger data for this historical ledger version."},"includeAllData":{"type":"boolean","description":"Include full transactions and/or state information if `includeTransactions` and/or `includeState` is set."},"includeTransactions":{"type":"boolean","description":"Return an array of hashes for each transaction or an array of all transactions that were validated in this ledger version, depending on whether `includeAllData` is set."},"includeState":{"type":"boolean","description":"Return an array of hashes for all state data or an array of all state data in this ledger version, depending on whether `includeAllData` is set."}},"additionalProperties":false}},"additionalProperties":false}')},5734:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrderbookParameters","description":"Parameters for getOrderbook","type":"object","properties":{"address":{"$ref":"address","description":"Address of an account to use as point-of-view. (This affects which unfunded offers are returned.)"},"orderbook":{"$ref":"orderbook","description":"The order book to get."},"options":{"description":"Options to determine what to return.","properties":{"limit":{"type":"integer","minimum":1,"description":"Return at most this many orders from the order book."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return the order book as of this historical ledger version."}},"additionalProperties":false}},"required":["address","orderbook"],"additionalProperties":false}')},2028:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrdersParameters","description":"Parameters for getOrders","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the account to get open orders for."},"options":{"description":"Options that determine what orders will be returned.","properties":{"limit":{"type":"integer","minimum":1,"description":"At most this many orders will be returned."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return orders as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},1434:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPathsParameters","type":"object","properties":{"pathfind":{"description":"Specification of a pathfind request.","properties":{"source":{"description":"Properties of the source of funds.","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the account where funds will come from."},"amount":{"$ref":"laxAmount","description":"The amount of funds to send."},"currencies":{"description":"An array of currencies (with optional counterparty) that may be used in the payment paths.","type":"array","items":{"description":"A currency with optional counterparty.","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address","description":"The counterparty for the currency; if omitted any counterparty may be used."}},"required":["currency"],"additionalProperties":false},"uniqueItems":true}},"not":{"required":["amount","currencies"]},"additionalProperties":false,"required":["address"]},"destination":{"description":"Properties of the destination of funds.","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"amount":{"$ref":"laxLaxAmount","description":"The amount to be received by the receiver (`value` may be ommitted if a source amount is specified)."}},"required":["address","amount"],"additionalProperties":false}},"required":["source","destination"],"additionalProperties":false}},"additionalProperties":false,"required":["pathfind"]}')},8508:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaymentChannelParameters","description":"Parameters for getPaymentChannel","type":"object","properties":{"id":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."}},"additionalProperties":false,"required":["id"]}')},7071:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getSettingsParameters","description":"Parameters for getSettings","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the settings of."},"options":{"description":"Options that affect what to return.","properties":{"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the settings as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},3345:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactionParameters","description":"Parameters for getTransaction","type":"object","properties":{"id":{"$ref":"transactionHash"},"options":{"description":"Options to limit the ledger versions to search and/or to include raw transaction data.","properties":{"minLedgerVersion":{"$ref":"ledgerVersion","description":"The lowest ledger version to search. This must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."},"maxLedgerVersion":{"$ref":"ledgerVersion","description":"The highest ledger version to search. This must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."},"includeRawTransaction":{"description":"Include raw transaction data. For advanced users; exercise caution when interpreting this data."}},"additionalProperties":false}},"additionalProperties":false,"required":["id"]}')},1193:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactionsParameters","description":"Parameters for getTransactions","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get transactions for."},"options":{"description":"Options to filter the resulting transactions.","properties":{"start":{"$ref":"hash256","description":"If specified, this transaction will be the first transaction in the result. You cannot use `start` with `minLedgerVersion` or `maxLedgerVersion`. When `start` is specified, these ledger versions will be determined internally."},"limit":{"type":"integer","minimum":1,"description":"If specified, return at most this many transactions."},"minLedgerVersion":{"$ref":"ledgerVersion","description":"Return only transactions in this ledger version or higher."},"maxLedgerVersion":{"$ref":"ledgerVersion","description":"Return only transactions in this ledger version or lower."},"earliestFirst":{"type":"boolean","description":"If true, sort transactions so that the earliest ones come first. By default, the newest transactions will come first."},"excludeFailures":{"type":"boolean","description":"If true, the result will omit transactions that did not succeed."},"initiated":{"type":"boolean","description":"If true, return only transactions initiated by the account specified by `address`. If false, return only transactions not initiated by the account specified by `address`."},"counterparty":{"$ref":"address","description":"If provided, only return transactions with this account as a counterparty to the transaction."},"types":{"type":"array","items":{"$ref":"transactionType"},"description":"Only return transactions of the specified [Transaction Types](#transaction-types)."},"includeRawTransactions":{"description":"Include raw transaction data. For advanced users; exercise caution when interpreting this data. "},"binary":{"type":"boolean","description":"If true, the transactions will be sent from the server in a condensed binary format rather than JSON."}},"additionalProperties":false,"not":{"anyOf":[{"required":["start","minLedgerVersion"]},{"required":["start","maxLedgerVersion"]}]}}},"additionalProperties":false,"required":["address"]}')},8492:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTrustlinesParameters","description":"Parameters for getTrustlines","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get trustlines for."},"options":{"description":"Options to filter and determine which trustlines to return.","properties":{"counterparty":{"$ref":"address","description":"Only return trustlines with this counterparty."},"currency":{"$ref":"currency","description":"Only return trustlines for this currency."},"limit":{"type":"integer","minimum":1,"description":"Return at most this many trustlines."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return trustlines as they were in this historical ledger version."}},"additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},2189:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCancelParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCancel":{"$ref":"checkCancel","description":"The specification of the Check cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCancel"]}')},6968:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCashParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCash":{"$ref":"checkCash","description":"The specification of the Check cash to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCash"]}')},7036:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCreateParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCreate":{"$ref":"checkCreate","description":"The specification of the Check create creation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCreate"]}')},5682:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowCancellationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowCancellation":{"$ref":"escrowCancellation","description":"The specification of the escrow cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowCancellation"]}')},1703:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowCreationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowCreation":{"$ref":"escrowCreation","description":"The specification of the escrow creation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowCreation"]}')},1438:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowExecutionParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowExecution":{"$ref":"escrowExecution","description":"The specification of the escrow execution to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowExecution"]}')},6704:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareOrderCancellationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"orderCancellation":{"$ref":"orderCancellation","description":"The specification of the order cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","orderCancellation"]}')},5944:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareOrderParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"order":{"$ref":"order","description":"The specification of the order to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","order"]}')},7845:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelClaimParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelClaim":{"$ref":"paymentChannelClaim","description":"Details of the channel and claim."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelClaim"]}')},3117:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelCreateParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelCreate":{"$ref":"paymentChannelCreate","description":"The specification of the payment channel to create."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelCreate"]}')},8874:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelFundParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelFund":{"$ref":"paymentChannelFund","description":"The channel to fund, and the details of how to fund it."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelFund"]}')},4647:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"payment":{"$ref":"payment","description":"The specification of the payment to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","payment"]}')},7185:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareSettingsParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"settings":{"$ref":"settings","description":"The specification of the settings to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","settings"]}')},7840:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareTicketParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"ticketCount":{"type":"number","description":"The number of tickets to be created."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","ticketCount"]}')},261:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareTrustlineParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"trustline":{"$ref":"trustline","description":"The specification of the trustline to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","trustline"]}')},7885:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signPaymentChannelClaimParameters","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by the claim."},"privateKey":{"$ref":"publicKey","description":"The private key to sign the payment channel claim."}},"additionalProperties":false,"required":["channel","amount","privateKey"]}')},167:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signParameters","type":"object","properties":{"txJSON":{"type":"string","description":"Transaction represented as a JSON string in rippled format."},"secret":{"type":"string","format":"secret","description":"The secret of the account that is initiating the transaction. (This field cannot be used with keypair)."},"keypair":{"type":"object","properties":{"privateKey":{"type":"privateKey","description":"The uppercase hexadecimal representation of the secp256k1 or Ed25519 private key."},"publicKey":{"type":"publicKey","description":"The uppercase hexadecimal representation of the secp256k1 or Ed25519 public key."}},"description":"The private and public key of the account that is initiating the transaction. (This field cannot be used with secret).","required":["privateKey","publicKey"],"additionalProperties":false},"options":{"type":"object","description":"Options that control the type of signature that will be generated.","properties":{"signAs":{"$ref":"address","description":"The account that the signature should count for in multisigning."}},"additionalProperties":false}},"additionalProperties":false,"required":["txJSON"],"oneOf":[{"required":["secret"],"not":{"required":["keypair"]}},{"required":["keypair"],"not":{"required":["secret"]}}]}')},5954:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"submitParameters","type":"object","properties":{"signedTransaction":{"$ref":"blob","description":"A signed transaction as returned by [sign](#sign)."},"failHard":{"type":"boolean","description":"If `true`, and the transaction fails locally, do not retry or relay the transaction to other servers. Defaults to `false`."}},"additionalProperties":false,"required":["signedTransaction"]}')},5534:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"verifyPaymentChannelClaimParameters","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by the claim."},"signature":{"$ref":"signature","description":"Signature of this claim."},"publicKey":{"$ref":"publicKey","description":"Public key of the channel\'s sender"}},"additionalProperties":false,"required":["channel","amount","signature","publicKey"]}')},5049:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"address","description":"An account address on the XRP Ledger","type":"string","format":"address","link":"address","oneOf":[{"$ref":"xAddress"},{"$ref":"classicAddress"}]}')},7761:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"adjustment","type":"object","properties":{"address":{"$ref":"address"},"amount":{"$ref":"amount"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},4458:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"amount","link":"amount","description":"An Amount on the XRP Ledger","allOf":[{"$ref":"amountbase"},{"required":["value"]}]}')},5107:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"amountbase","description":"Base class for amount and issue","type":"object","properties":{"value":{"description":"The quantity of the currency, denoted as a string to retain floating point precision","$ref":"value"},"currency":{"description":"The three-character code or hexadecimal string used to denote currencies, or \\"drops\\" for the smallest unit of XRP.","$ref":"currency"},"counterparty":{"description":"The XRP Ledger address of the account that owes or is owed the funds (omitted if `currency` is \\"XRP\\" or \\"drops\\")","$ref":"address"}},"additionalProperties":false,"required":["currency"],"oneOf":[{"properties":{"currency":{"not":{"enum":["XRP","drops"]}}},"required":["counterparty"]},{"properties":{"currency":{"enum":["XRP","drops"]}},"not":{"required":["counterparty"]}}]}')},8789:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"balance","description":"Balance amount","link":"amount","type":"object","properties":{"value":{"description":"The balance on the trustline","$ref":"signedValue"},"currency":{"description":"The three-character code or hexadecimal string used to denote currencies","$ref":"currency"},"counterparty":{"description":"The XRP Ledger address of the account that owes or is owed the funds.","$ref":"address"}},"additionalProperties":false,"required":["currency","value"],"oneOf":[{"properties":{"currency":{"not":{"enum":["XRP"]}}},"required":["counterparty"]},{"properties":{"currency":{"enum":["XRP"]}},"not":{"required":["counterparty"]}}]}')},2702:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"blob","description":"An uppercase hexadecimal string representation of a transaction","type":"string","minLength":1,"pattern":"^[0-9A-F]*$"}')},6365:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"classicAddress","description":"A classic address (Account ID) for the XRP Ledger","type":"string","format":"classicAddress","link":"classic-address","pattern":"^r[1-9A-HJ-NP-Za-km-z]{24,34}$"}')},2132:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"currency","description":"The three-character code or hexadecimal string used to denote currencies","type":"string","link":"currency","pattern":"^([a-zA-Z0-9<>(){}[\\\\]|?!@#$%^&*]{3}|[A-F0-9]{40}|drops)$"}')},1648:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationAddressTag","description":"A destination address and optional tag, with no amount included. When parsing an incoming transaction, the original specification\'s amount is hidden to prevent misinterpretation. For the amount that the transaction delivered, see `outcome.deliveredAmount`.","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"tag":{"$ref":"tag"}},"required":["address"],"additionalProperties":false}')},1925:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationAdjustment","type":"object","oneOf":[{"$ref":"destinationExactAdjustment"},{"$ref":"minAdjustment"}]}')},2422:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationExactAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"amount":{"$ref":"laxAmount","description":"An exact amount to deliver to the recipient. If the counterparty is not specified, amounts with any counterparty may be used. (This field cannot be used with `destination.minAmount`.)"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},758:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"hash128","description":"The hexadecimal representation of a 128-bit hash","type":"string","pattern":"^[A-F0-9]{32}$"}')},8371:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"hash256","description":"The hexadecimal representation of a 256-bit hash","type":"string","pattern":"^[A-F0-9]{64}$"}')},3132:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"instructions","link":"transaction-instructions","description":"Instructions for executing the transaction","type":"object","properties":{"sequence":{"description":"The initiating account\'s sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set.","$ref":"sequence"},"ticketSequence":{"description":"The ticket sequence to be used for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set.","$ref":"ticket-sequence"},"fee":{"description":"An exact fee to pay for the transaction, before multiplying for multi-signed transactions. See [Transaction Fees](#transaction-fees) for more information.","$ref":"value"},"maxFee":{"description":"Deprecated: Use `maxFeeXRP` in the RippleAPI constructor instead. The maximum fee to pay for this transaction. If this exceeds `maxFeeXRP`, `maxFeeXRP` will be used instead. See [Transaction Fees](#transaction-fees) for more information.","$ref":"value"},"maxLedgerVersion":{"description":"The highest ledger version that the transaction can be included in. If this option and `maxLedgerVersionOffset` are both omitted, the `maxLedgerVersion` option will default to 3 greater than the current validated ledger version (equivalent to `maxLedgerVersionOffset=3`). Use `null` to not set a maximum ledger version. If not null, this must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'.","oneOf":[{"$ref":"ledgerVersion"},{"type":"null"}]},"maxLedgerVersionOffset":{"description":"Offset from current validated ledger version to highest ledger version that the transaction can be included in.","type":"integer","minimum":0},"signersCount":{"description":"Number of signers that will be signing this transaction.","type":"integer","minimum":1}},"additionalProperties":false,"not":{"anyOf":[{"description":"fee and maxFee are mutually exclusive","required":["fee","maxFee"]},{"description":"maxLedgerVersion and maxLedgerVersionOffset are mutually exclusive","required":["maxLedgerVersion","maxLedgerVersionOffset"]},{"description":"sequence and ticketSequence are mutually exclusive","required":["sequence","ticketSequence"]}]}}')},2714:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"issue","description":"A currency-counterparty pair, or just currency if it\'s XRP","allOf":[{"$ref":"amountbase"},{"not":{"required":["value"]}}]}')},3512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"laxAmount","description":"Amount where counterparty is optional","link":"amount","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address"},"value":{"$ref":"value"}},"required":["currency","value"],"additionalProperties":false}')},4329:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"laxLaxAmount","description":"Amount where counterparty and value are optional","link":"amount","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address"},"value":{"$ref":"value"}},"required":["currency"],"additionalProperties":false}')},945:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ledgerVersion","description":"A ledger version number","oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["validated","closed","current"]}]}')},1951:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"maxAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"The address to send from."},"maxAmount":{"$ref":"laxAmount","description":"The maximum amount to send. (This field cannot be used with source.amount)"},"tag":{"$ref":"tag"}},"required":["address","maxAmount"],"additionalProperties":false}')},9006:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"memo","description":"Memo objects represent arbitrary data that can be included in a transaction","type":"object","properties":{"type":{"pattern":"^[A-Za-z0-9\\\\-._~:/?#[\\\\]@!$&\'()*+,;=%]*$","description":"Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted."},"format":{"pattern":"^[A-Za-z0-9\\\\-._~:/?#[\\\\]@!$&\'()*+,;=%]*$","description":"Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted."},"data":{"type":"string","description":"Arbitrary string, conventionally containing the content of the memo."}},"additionalProperties":false,"anyOf":[{"required":["data"]},{"required":["type"]}]}')},952:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"memos","link":"transaction-memos","description":"Array of memos to attach to the transaction.","type":"array","items":{"$ref":"memo"}}')},8969:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"minAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"minAmount":{"$ref":"laxAmount","description":"The minimum amount to be delivered. (This field cannot be used with destination.amount)"},"tag":{"$ref":"tag"}},"required":["address","minAmount"],"additionalProperties":false}')},5346:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderbook","type":"object","properties":{"base":{"$ref":"issue"},"counter":{"$ref":"issue"}},"required":["base","counter"],"additionalProperties":false}')},3811:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"privateKey","description":"The hexadecimal representation of a secp256k1 or Ed25519 private key.","type":"string","pattern":"^[A-F0-9]+$"}')},3230:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"publicKey","description":"The hexadecimal representation of a secp256k1 or Ed25519 public key.","type":"string","pattern":"^[A-F0-9]+$"}')},159:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"quality","description":"Ratio for incoming/outgoing transit fees.","type":"number","minimum":1e-9,"maximum":4.294967295}')},4595:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sequence","link":"account-sequence-number","description":"An account transaction sequence number","type":"integer","minimum":0}')},2815:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"settingsPlusMemos","type":"object","properties":{"defaultRipple":{"type":"boolean","description":"Enable [rippling](https://ripple.com/build/understanding-the-noripple-flag/) on this account’s trust lines by default. (New in [rippled 0.27.3](https://github.com/ripple/rippled/releases/tag/0.27.3))"},"depositAuth":{"type":"boolean","description":"Enable [Deposit Authorization](https://ripple.com/build/deposit-authorization/) on this account. If set, transactions cannot send value of any kind to this account unless the sender of those transactions is the account itself. (Requires the [DepositAuth amendment](https://ripple.com/build/known-amendments/#depositauth))"},"disableMasterKey":{"type":"boolean","description":"Disallows use of the master key to sign transactions for this account. To disable the master key, you must authorize the transaction by signing it with the master key pair. You cannot use a regular key pair or a multi-signature. You can re-enable the master key pair using a regular key pair or multi-signature. See [AccountSet](https://developers.ripple.com/accountset.html)."},"disallowIncomingXRP":{"type":"boolean","description":"Indicates that client applications should not send XRP to this account. Not enforced by rippled."},"domain":{"type":"string","description":"The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."},"emailHash":{"description":"Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.","oneOf":[{"type":"null"},{"$ref":"hash128"}]},"walletLocator":{"description":"Transaction hash or any other 64 character hexadecimal string, that may or may not represent the result of a hash operation. Use `null` to clear.","oneOf":[{"type":"null"},{"$ref":"hash256"}]},"enableTransactionIDTracking":{"type":"boolean","description":"Track the ID of this account’s most recent transaction."},"globalFreeze":{"type":"boolean","description":"Freeze all assets issued by this account."},"memos":{"$ref":"memos"},"messageKey":{"type":"string","description":"Public key for sending encrypted messages to this account. Conventionally, it should be a secp256k1 key, the same encryption that is used by the rest of Ripple."},"noFreeze":{"type":"boolean","description":"Permanently give up the ability to freeze individual trust lines. This flag can never be disabled after being enabled."},"passwordSpent":{"type":"boolean","description":"Indicates that the account has used its free SetRegularKey transaction."},"regularKey":{"oneOf":[{"$ref":"address"},{"type":"null"}],"description":"The public key of a new keypair, to use as the regular key to this account, as a base-58-encoded string in the same format as an account address. Use `null` to remove the regular key."},"requireAuthorization":{"type":"boolean","description":"If set, this account must individually approve other users in order for those users to hold this account’s issuances."},"requireDestinationTag":{"type":"boolean","description":"Requires incoming payments to specify a destination tag."},"signers":{"type":"object","description":"Settings that determine what sets of accounts can be used to sign a transaction on behalf of this account using multisigning.","properties":{"threshold":{"$ref":"uint32","description":"A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is equal or greater than this value. To delete the signers setting, use the value `0`."},"weights":{"type":"array","description":"Weights of signatures for each signer.","items":{"type":"object","description":"An association of an address and a weight.","properties":{"address":{"$ref":"address"},"weight":{"$ref":"uint32","description":"The weight that the signature of this account counts as towards the threshold."}},"required":["address","weight"],"additionalProperties":false},"minItems":1,"maxItems":8}},"required":["threshold"],"additionalProperties":false},"transferRate":{"description":"The fee to charge when users transfer this account’s issuances, as the decimal amount that must be sent to deliver 1 unit. Has precision up to 9 digits beyond the decimal point. Use `null` to set no fee.","oneOf":[{"type":"null"},{"type":"number","minimum":1,"maximum":4.294967295}]},"tickSize":{"description":"Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are 3 to 15 inclusive, or 0 to disable.","enum":[0,3,4,5,6,7,8,9,10,11,12,13,14,15]}},"additionalProperties":false}')},8703:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signature","description":"The hexadecimal representation of a signature.","type":"string","pattern":"^[A-F0-9]+$"}')},6884:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signedValue","description":"A string representation of a floating point number","type":"string","link":"value","pattern":"^[-]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}')},3150:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sourceAdjustment","type":"object","oneOf":[{"$ref":"sourceExactAdjustment"},{"$ref":"maxAdjustment"}]}')},3640:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sourceExactAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"The address to send from."},"amount":{"$ref":"laxAmount","description":"An exact amount to send. If the counterparty is not specified, amounts with any counterparty may be used. (This field cannot be used with source.maxAmount)"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},1756:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"tag","description":"An arbitrary 32-bit unsigned integer. It typically maps to an off-ledger account; for example, a hosted wallet or exchange account.","type":"integer","$ref":"uint32"}')},6405:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ticket-sequence","link":"account-sequence-number","description":"An account transaction tickt sequence number","type":"integer","minimum":1}')},4442:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"transactionHash","link":"transaction-id","description":"A hash of a transaction used to identify the transaction, represented in hexadecimal.","type":"string","pattern":"^[A-F0-9]{64}$"}')},1912:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"transactionType","link":"transaction-types","description":"The type of the transaction.","type":"string","enum":["payment","order","orderCancellation","trustline","settings","escrowCreation","escrowCancellation","escrowExecution","paymentChannelCreate","paymentChannelFund","paymentChannelClaim","checkCreate","checkCancel","checkCash","depositPreauth","accountDelete"]}')},3153:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"tx-json","link":"https://developers.ripple.com/transaction-formats.html","description":"An object in rippled txJSON format","type":"object","properties":{"Account":{"$ref":"address"},"TransactionType":{"type":"string"}},"required":["Account","TransactionType"]}')},2578:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"uint32","description":"A 32-bit unsigned integer","type":"integer","minimum":0,"maximum":4294967295}')},935:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"value","link":"value","description":"A string representation of a non-negative floating point number","type":"string","pattern":"^[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}')},8180:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"xAddress","description":"An XRP Ledger address in X-address format","type":"string","format":"xAddress","link":"x-address","pattern":"^[XT][1-9A-HJ-NP-Za-km-z]{46}$"}')},3911:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountInfo","type":"object","properties":{"sequence":{"$ref":"sequence","description":"The next (smallest unused) sequence number for this account."},"xrpBalance":{"$ref":"value","description":"The XRP balance owned by the account."},"ownerCount":{"type":"integer","minimum":0,"description":"Number of other ledger entries (specifically, trust lines and offers) attributed to this account. This is used to calculate the total reserve required to use the account."},"previousInitiatedTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that was initiated by this account."},"previousAffectingTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that affected this account node directly. **Note:** This does not include changes to the account’s trust lines and offers."},"previousAffectingTransactionLedgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},"required":["sequence","xrpBalance","ownerCount","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],"additionalProperties":false}')},2678:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccountObjectsResponse","description":"Response format for account_objects","type":"object","properties":{"account":{"$ref":"address","description":"Unique address of the account this request corresponds to."},"account_objects":{"type":"array","items":{"type":"object"},"description":"Array of objects owned by this account. Each object is in its raw ledger format."},"ledger_hash":{"type":"string","description":"(May be omitted) The identifying hash of the ledger that was used to generate this response."},"ledger_index":{"$ref":"ledgerVersion","description":"(May be omitted) The sequence number of the ledger that was used to generate this response."},"ledger_current_index":{"$ref":"ledgerVersion","description":"(May be omitted) The sequence number of the ledger that was used to generate this response."},"limit":{"type":"integer","description":"(May be omitted) The limit that was used in this request, if any."},"validated":{"type":"boolean","description":"If included and set to true, the information in this request comes from a validated ledger version. Otherwise, the information is subject to change."}},"required":["account","account_objects"],"additionalProperties":false}')},8211:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalanceSheet","description":"getBalanceSheet response","type":"object","properties":{"balances":{"type":"array","items":{"$ref":"amount"},"description":"Amounts issued to the hotwallet accounts from the request. The keys are hot wallet addresses and the values are arrays of currency amounts they hold. The issuer (omitted from the currency amounts) is the account from the request."},"assets":{"type":"array","items":{"$ref":"amount"},"description":"Total amounts held that are issued by others. For the recommended gateway configuration, there should be none."},"obligations":{"type":"array","items":{"type":"object","required":["currency","value"],"additionalProperties":false,"properties":{"currency":{"$ref":"currency"},"value":{"$ref":"value"}},"description":"An amount that is owed."},"description":"Total amounts issued to accounts that are not hot wallets, as a map of currencies to the total value issued."}},"additionalProperties":false}')},7769:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalances","type":"array","items":{"$ref":"balance"}}')},7727:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getLedger","type":"object","properties":{"stateHash":{"$ref":"hash256","description":"Hash of all state information in this ledger."},"closeTime":{"type":"string","format":"date-time","description":"The approximate time when this ledger was closed. This number is rounded based on the `closeTimeResolution`. If it would have been rounded to the same time as a previous ledger, the close time is recorded as 1 second later instead."},"closeTimeResolution":{"type":"integer","minimum":1,"description":"A number of seconds, indicating how much the `closeTime` could be rounded. Ledger close times are approximate so that small differences in servers clocks don\'t hinder consensus."},"closeFlags":{"type":"integer","minimum":0,"description":"A bit-map of flags relating to the closing of this ledger. Currently, the ledger has only one flag defined for `closeFlags`: **sLCF_NoConsensusTime** (value 1). If this flag is enabled, it means that validators were in conflict regarding the correct close time for the ledger, but built otherwise the same ledger, so they declared consensus while \\"agreeing to disagree\\" on the close time. In this case, the consensus ledger contains a `closeTime` value that is 1 second after that of the previous ledger. (In this case, there is no official close time, but the actual real-world close time is probably 3-6 seconds later than the specified `closeTime`.)"},"ledgerHash":{"$ref":"hash256","description":"Unique identifying hash of the entire ledger."},"ledgerVersion":{"$ref":"ledgerVersion","description":"The ledger version of this ledger."},"parentLedgerHash":{"$ref":"hash256","description":"Unique identifying hash of the ledger that came immediately before this one."},"parentCloseTime":{"type":"string","format":"date-time","description":"The previous ledger\'s recorded close time."},"totalDrops":{"$ref":"value","description":"Total number of drops (1/1,000,000th of an XRP) in the network, as a quoted integer. (This decreases as transaction fees cause XRP to be destroyed.)"},"transactionHash":{"$ref":"hash256","description":"Hash of the transaction information included in this ledger."},"transactions":{"description":"Array of all transactions that were validated in this ledger. Transactions are represented in the same format as the return value of [getTransaction](#gettransaction).","type":"array","items":{"$ref":"getTransaction","description":"A transaction in the same format as the return value of [getTransaction](#gettransaction)."}},"transactionHashes":{"description":"An array of hashes of all transactions that were validated in this ledger.","type":"array","items":{"$ref":"transactionHash"}},"rawState":{"type":"string","description":"A JSON string containing all state data for this ledger in rippled JSON format."},"stateHashes":{"description":"An array of hashes of all state data in this ledger.","type":"array","items":{"$ref":"hash256"}}},"required":["stateHash","closeTime","closeTimeResolution","closeFlags","ledgerHash","ledgerVersion","parentLedgerHash","parentCloseTime","totalDrops","transactionHash"],"additionalProperties":false}')},9082:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrderbook","type":"object","properties":{"bids":{"$ref":"orderbookOrders","description":"The buy orders in the order book."},"asks":{"$ref":"orderbookOrders","description":"The sell orders in the order book."}},"required":["bids","asks"],"additionalProperties":false}')},5300:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrders","type":"array","items":{"type":"object","properties":{"specification":{"$ref":"order","description":"An order specification that would create an order equivalent to the current state of this order."},"properties":{"description":"Properties of the order not in the specification.","type":"object","properties":{"maker":{"$ref":"address","description":"The address of the account that submitted the order."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction that created this order."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate from the point of view of the account that submitted the order (also known as \\"quality\\")."}},"required":["maker","sequence","makerExchangeRate"],"addtionalProperties":false}},"required":["specification","properties"],"additionalProperties":false}}')},1647:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaths","type":"array","items":{"type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"Properties of the source of the payment."},"destination":{"$ref":"destinationAdjustment","description":"Properties of the destination of the payment."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."}},"required":["source","destination","paths"],"additionalProperties":false}}')},3574:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaymentChannel","type":"object","properties":{"account":{"$ref":"address","description":"Address that created the payment channel."},"destination":{"$ref":"address","description":"Address to receive XRP claims against this channel."},"amount":{"$ref":"value","description":"The total amount of XRP funded in this channel."},"balance":{"$ref":"value","description":"The total amount of XRP delivered by this channel."},"settleDelay":{"type":"number","description":"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},"expiration":{"type":"string","format":"date-time","description":"Time when this channel expires."},"publicKey":{"$ref":"publicKey","description":"Public key of the key pair the source will use to sign claims against this channel."},"cancelAfter":{"type":"string","format":"date-time","description":"Time when this channel expires as specified at creation."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."},"previousAffectingTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that affected this payment channel."},"previousAffectingTransactionLedgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},"required":["account","destination","amount","balance","settleDelay","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],"additionalProperties":false}')},5338:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getServerInfo","type":"object","properties":{"buildVersion":{"type":"string","description":"The version number of the running rippled version."},"completeLedgers":{"type":"string","pattern":"[0-9,-]+","description":"Range expression indicating the sequence numbers of the ledger versions the local rippled has in its database. It is possible to be a disjoint sequence, e.g. “2500-5000,32570-7695432”."},"hostID":{"type":"string","description":"On an admin request, returns the hostname of the server running the rippled instance; otherwise, returns a unique four letter word."},"ioLatencyMs":{"type":"number","description":"Amount of time spent waiting for I/O operations to be performed, in milliseconds. If this number is not very, very low, then the rippled server is probably having serious load issues."},"load":{"type":"object","description":"*(Admin only)* Detailed information about the current load state of the server.","properties":{"jobTypes":{"type":"array","description":"*(Admin only)* Information about the rate of different types of jobs being performed by the server and how much time it spends on each.","items":{"type":"object"}},"threads":{"type":"number","description":"*(Admin only)* The number of threads in the server’s main job pool, performing various operations."}},"required":["jobTypes","threads"]},"lastClose":{"type":"object","description":"Information about the last time the server closed a ledger.","properties":{"convergeTimeS":{"type":"number","description":"The time it took to reach a consensus for the last ledger closing, in seconds."},"proposers":{"type":"integer","minimum":0,"description":"Number of trusted validators participating in the ledger closing."}},"required":["convergeTimeS","proposers"]},"loadFactor":{"type":"number","description":"The load factor the server is currently enforcing, as a multiplier on the base transaction fee. The load factor is determined by the highest of the individual server’s load factor, cluster’s load factor, and the overall network’s load factor."},"peers":{"type":"integer","minimum":0,"description":"How many other rippled servers the node is currently connected to."},"pubkeyNode":{"type":"string","description":"Public key used to verify this node for internal communications; this key is automatically generated by the server the first time it starts up. (If deleted, the node can just create a new pair of keys.)"},"pubkeyValidator":{"type":"string","description":"*(Admin only)* Public key used by this node to sign ledger validations."},"serverState":{"type":"string","description":"A string indicating to what extent the server is participating in the network. See [Possible Server States](https://developers.ripple.com/rippled-server-states.html) for more details.","enum":["disconnected","connected","syncing","tracking","full","validating","proposing"]},"validatedLedger":{"type":"object","description":"Information about the fully-validated ledger with the highest sequence number (the most recent).","properties":{"age":{"type":"integer","minimum":0,"description":"The time since the ledger was closed, in seconds."},"baseFeeXRP":{"$ref":"value","description":"Base fee, in XRP. This may be represented in scientific notation such as 1e-05 for 0.00005."},"hash":{"$ref":"hash256","description":"Unique hash for the ledger, as an uppercase hexadecimal string."},"reserveBaseXRP":{"$ref":"value","description":"Minimum amount of XRP necessary for every account to keep in reserve."},"reserveIncrementXRP":{"$ref":"value","description":"Amount of XRP added to the account reserve for each object an account is responsible for in the ledger."},"ledgerVersion":{"type":"integer","minimum":0,"description":"Identifying sequence number of this ledger version."}},"additionalProperties":false,"required":["age","baseFeeXRP","hash","reserveBaseXRP","reserveIncrementXRP","ledgerVersion"]},"validationQuorum":{"type":"number","description":"Minimum number of trusted validations required in order to validate a ledger version. Some circumstances may cause the server to require more validations."}},"required":["buildVersion","completeLedgers","hostID","ioLatencyMs","lastClose","loadFactor","peers","pubkeyNode","serverState","validatedLedger","validationQuorum"],"additionalProperties":false}')},1914:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getSettings","$ref":"settingsPlusMemos","not":{"required":["memos"]}}')},6638:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransaction","description":"getTransaction response","link":"gettransaction","properties":{"type":{"$ref":"transactionType"},"specification":{"description":"A specification that would produce the same outcome as this transaction. *Exception:* For payment transactions, this omits the `destination.amount` field, to prevent misunderstanding. The structure of the specification depends on the value of the `type` field (see [Transaction Types](#transaction-types) for details). *Note:* This is **not** necessarily the same as the original specification."},"outcome":{"$ref":"outcome","description":"The outcome of the transaction (what effects it had)."},"id":{"$ref":"transactionHash","description":"A hash of the transaction that can be used to identify it."},"address":{"$ref":"address","description":"The address of the account that initiated the transaction."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction for the account that initiated it."},"rawTransaction":{"description":"The raw transaction data as a JSON string. For advanced users only; exercise caution when interpreting this data.","type":"string"}},"required":["id","address","sequence","type","specification","outcome"],"additionalProperties":false,"oneOf":[{"properties":{"type":{"enum":["payment"]},"specification":{"$ref":"getPayment"}}},{"properties":{"type":{"enum":["order"]},"specification":{"$ref":"order"}}},{"properties":{"type":{"enum":["orderCancellation"]},"specification":{"$ref":"orderCancellation"}}},{"properties":{"type":{"enum":["trustline"]},"specification":{"$ref":"trustline"}}},{"properties":{"type":{"enum":["settings"]},"specification":{"$ref":"getSettings"}}},{"properties":{"type":{"enum":["checkCreate"]},"specification":{"$ref":"checkCreate"}}},{"properties":{"type":{"enum":["checkCancel"]},"specification":{"$ref":"checkCancel"}}},{"properties":{"type":{"enum":["checkCash"]},"specification":{"$ref":"checkCash"}}},{"properties":{"type":{"enum":["escrowCreation"]},"specification":{"$ref":"escrowCreation"}}},{"properties":{"type":{"enum":["escrowCancellation"]},"specification":{"$ref":"escrowCancellation"}}},{"properties":{"type":{"enum":["escrowExecution"]},"specification":{"$ref":"escrowExecution"}}},{"properties":{"type":{"enum":["paymentChannelCreate"]},"specification":{"$ref":"paymentChannelCreate"}}},{"properties":{"type":{"enum":["paymentChannelFund"]},"specification":{"$ref":"paymentChannelFund"}}},{"properties":{"type":{"enum":["paymentChannelClaim"]},"specification":{"$ref":"paymentChannelClaim"}}},{"properties":{"type":{"enum":["depositPreauth"]},"specification":{"$ref":"depositPreauth"}}},{"properties":{"type":{"enum":["accountDelete"]},"specification":{"$ref":"accountDelete"}}}]}')},4159:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactions","type":"array","items":{"$ref":"getTransaction"}}')},8139:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTrustlines","type":"array","items":{"properties":{"specification":{"$ref":"trustline","description":"A trustline specification that would produce this trustline in its current state."},"counterparty":{"properties":{"limit":{"$ref":"value","description":"The maximum amount that the counterparty can be owed through the trustline."},"ripplingDisabled":{"type":"boolean","description":"If true, payments cannot ripple through this trustline."},"frozen":{"type":"boolean","description":"If true, the trustline is frozen, which means that funds can only be sent to the counterparty."},"authorized":{"type":"boolean","description":"If true, the counterparty authorizes this party to hold issuances from the counterparty."}},"description":"Properties of the trustline from the perspective of the counterparty.","required":["limit"],"additionalProperties":false},"state":{"properties":{"balance":{"$ref":"signedValue","description":"The balance on the trustline, representing which party owes the other and by how much."}},"description":"Properties of the trustline regarding it\'s current state that are not part of the specification.","required":["balance"],"additionalProperties":false}},"required":["specification","counterparty","state"],"additionalProperties":false}}')},6346:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ledgerEvent","description":"A ledger event message","type":"object","properties":{"baseFeeXRP":{"$ref":"value","description":"Base fee, in XRP."},"ledgerHash":{"$ref":"hash256","description":"Unique hash of the ledger that was closed, as hex."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Ledger version of the ledger that closed."},"ledgerTimestamp":{"type":"string","format":"date-time","description":"The time at which this ledger closed."},"reserveBaseXRP":{"$ref":"value","description":"The minimum reserve, in XRP, that is required for an account."},"reserveIncrementXRP":{"$ref":"value","description":"The increase in account reserve that is added for each item the account owns, such as offers or trust lines."},"transactionCount":{"type":"integer","minimum":0,"description":"Number of new transactions included in this ledger."},"validatedLedgerVersions":{"type":"string","description":"Range of ledgers that the server has available. This may be discontiguous."}},"addtionalProperties":false,"required":["baseFeeXRP","ledgerHash","ledgerTimestamp","reserveBaseXRP","reserveIncrementXRP","transactionCount","ledgerVersion","validatedLedgerVersions"]}')},3739:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderChange","type":"object","description":"A change to an order.","properties":{"direction":{"type":"string","enum":["buy","sell"],"description":"Equal to \\"buy\\" for buy orders and \\"sell\\" for sell orders."},"quantity":{"$ref":"amount","description":"The amount to be bought or sold by the maker."},"totalPrice":{"$ref":"amount","description":"The total amount to be paid or received by the taker."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate between the `quantity` currency and the `totalPrice` currency from the point of view of the maker."},"sequence":{"$ref":"sequence","description":"The order sequence number, used to identify the order for cancellation"},"status":{"enum":["created","filled","partially-filled","cancelled"],"description":"The status of the order. One of \\"created\\", \\"filled\\", \\"partially-filled\\", \\"cancelled\\"."},"expirationTime":{"type":"string","format":"date-time","description":"The time after which the order expires, if any."}},"required":["direction","quantity","totalPrice","sequence","status"],"additionalProperties":false}')},933:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderbookOrders","type":"array","items":{"description":"An order in the order book.","type":"object","properties":{"specification":{"$ref":"order","description":"An order specification that would create an order equivalent to the current state of this order."},"properties":{"description":"Properties of the order not in the specification.","type":"object","properties":{"maker":{"$ref":"address","description":"The address of the account that submitted the order."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction that created this order."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate from the point of view of the account that submitted the order (also known as \\"quality\\")."}},"required":["maker","sequence","makerExchangeRate"],"addtionalProperties":false},"state":{"description":"The state of the order.","type":"object","properties":{"fundedAmount":{"$ref":"amount","description":"How much of the amount the maker would have to pay that the maker currently holds."},"priceOfFundedAmount":{"$ref":"amount","description":"How much the `fundedAmount` would convert to through the exchange rate of this order."}},"required":["fundedAmount","priceOfFundedAmount"],"additionalProperties":false},"data":{"description":"The raw order data. This may include `owner_funds`, `Flags`, and other fields.","type":"object","additionalProperties":true}},"required":["specification","properties","data"],"additionalProperties":false}}')},7184:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"outcome","type":"object","description":"The outcome of the transaction (what effects it had).","properties":{"result":{"type":"string","description":"Result code returned by rippled. See [Transaction Results](https://developers.ripple.com/transaction-results.html) for a complete list."},"timestamp":{"type":"string","format":"date-time","description":"The timestamp when the transaction was validated. (May be missing when requesting transactions in binary mode.)"},"fee":{"$ref":"value","description":"The XRP fee that was charged for the transaction."},"deliveredAmount":{"$ref":"amount","description":"For payment transactions, it is impossible to reliably compute the actual delivered amount from the balanceChanges due to fixed precision. If the payment is not a partial payment and the transaction succeeded, the deliveredAmount should always be considered to be the amount specified in the transaction."},"balanceChanges":{"type":"object","additionalProperties":{"type":"array","description":"Key is the XRP Ledger address; value is an array of signed amounts representing changes of balances for that address.","items":{"$ref":"balance"}}},"orderbookChanges":{"type":"object","additionalProperties":{"type":"array","description":"Key is the maker\'s XRP Ledger address; value is an array of changes","items":{"$ref":"orderChange"}}},"channelChanges":{"type":"object","description":"Properties reflecting the details of the payment channel."},"ledgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction was validated in."},"indexInLedger":{"type":"integer","minimum":0,"description":"The ordering index of the transaction in the ledger."}},"required":["result","fee","balanceChanges","orderbookChanges","ledgerVersion","indexInLedger"],"additionalProperties":false}')},7197:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepare","description":"Result of prepare function","type":"object","properties":{"txJSON":{"type":"string","description":"The prepared transaction in rippled JSON format."},"instructions":{"description":"The instructions for how to execute the transaction after adding automatic defaults.","type":"object","properties":{"fee":{"$ref":"value","description":"The fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information. For multi-signed transactions, this fee will be multiplied by (N+1), where N is the number of signatures you plan to provide."},"sequence":{"$ref":"sequence","description":"The initiating account\'s sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set."},"ticketSequence":{"$ref":"ticket-sequence","description":"The initiating account\'s ticket sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set."},"maxLedgerVersion":{"oneOf":[{"$ref":"ledgerVersion"},{"type":"null"}],"description":"The highest ledger version that the transaction can be included in. Set to `null` if there is no maximum. If not null, this must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."}},"additionalProperties":false,"required":["fee","maxLedgerVersion"],"anyOf":[{"required":["sequence"]},{"required":["ticketSequence"]}]}},"additionalProperties":false,"required":["txJSON","instructions"]}')},5158:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signPaymentChannelClaim","type":"string","$ref":"signature","additionalProperties":false}')},7955:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sign","type":"object","properties":{"signedTransaction":{"type":"string","pattern":"^[A-F0-9]+$","description":"The signed transaction represented as an uppercase hexadecimal string."},"id":{"$ref":"transactionHash","description":"The [Transaction ID](#transaction-id) of the signed transaction."}},"required":["signedTransaction","id"],"additionalProperties":false}')},6312:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"submit","type":"object","properties":{"resultCode":{"type":"string","description":"Deprecated: Use `engine_result` instead."},"resultMessage":{"type":"string","description":"Deprecated: Use `engine_result_message` instead."},"engine_result":{"type":"string","description":"Code indicating the preliminary result of the transaction, for example `tesSUCCESS`. [List of transaction responses](https://developers.ripple.com/transaction-results.html)"},"engine_result_code":{"type":"integer","description":"Numeric code indicating the preliminary result of the transaction, directly correlated to `engine_result`"},"engine_result_message":{"type":"string","description":"Human-readable explanation of the transaction\'s preliminary result."},"tx_blob":{"type":"string","description":"The complete transaction in hex string format."},"tx_json":{"$ref":"tx-json","description":"The complete transaction in JSON format."}},"required":["resultCode","resultMessage","engine_result","engine_result_code","engine_result_message","tx_blob","tx_json"],"additionalProperties":false}')},7931:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"verifyPaymentChannelClaim","type":"boolean","additionalProperties":false}')},253:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"accountDelete","link":"account-delete","type":"object","properties":{"destination":{"$ref":"address","description":"Address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account."},"destinationTag":{"$ref":"tag","description":"(Optional) Arbitrary destination tag that identifies a hosted recipient or other information for the recipient of the deleted account\'s leftover XRP."},"destinationXAddress":{"$ref":"address","description":"X-address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account."}},"anyOf":[{"required":["destination"]},{"required":["destinationXAddress"]}],"additionalProperties":false}')},4694:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCancel","link":"check-cancel","type":"object","properties":{"checkID":{"$ref":"hash256","description":"The ID of the Check ledger object to cancel, as a 64-character hexadecimal string."}},"required":["checkID"],"additionalProperties":false}')},2747:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCash","link":"check-cash","type":"object","properties":{"checkID":{"$ref":"hash256","description":"The ID of the Check ledger object to cash, as a 64-character hexadecimal string."},"amount":{"$ref":"laxAmount","description":"Redeem the Check for exactly this amount, if possible. The currency must match that of the sendMax of the corresponding CheckCreate transaction. You must provide either this field or deliverMin."},"deliverMin":{"$ref":"laxAmount","description":"Redeem the Check for at least this amount and for as much as possible. The currency must match that of the sendMax of the corresponding CheckCreate transaction. You must provide either this field or amount."}},"required":["checkID"],"oneOf":[{"required":["amount"]},{"required":["deliverMin"]}],"additionalProperties":false}')},4144:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCreate","link":"check-create","type":"object","properties":{"destination":{"$ref":"address","description":"Address of the account that can cash the check."},"sendMax":{"$ref":"laxAmount","description":"Amount of source currency the check is allowed to debit the sender, including transfer fees on non-XRP currencies."},"destinationTag":{"$ref":"tag","description":"Destination tag that identifies the reason for the check, or a hosted recipient to pay."},"expiration":{"type":"string","format":"date-time","description":"Time after which the check is no longer valid."},"invoiceID":{"$ref":"hash256","description":"256-bit hash, as a 64-character hexadecimal string, representing a specific reason or identifier for this check."}},"required":["destination","sendMax"],"additionalProperties":false}')},6080:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"depositPreauth","link":"deposit-preauth","type":"object","properties":{"authorize":{"$ref":"address","description":"Address of the account that can cash the check."},"unauthorize":{"$ref":"address","description":"Address of the account that can cash the check."}},"oneOf":[{"required":["authorize"]},{"required":["unauthorize"]}],"additionalProperties":false}')},8479:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowCancellation","link":"escrow-cancellation","type":"object","properties":{"memos":{"$ref":"memos"},"owner":{"$ref":"address","description":"The address of the owner of the escrow to cancel."},"escrowSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to cancel."}},"required":["owner","escrowSequence"],"additionalProperties":false}')},1254:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowCreation","link":"escrow-creation","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP for sender to escrow."},"destination":{"$ref":"address","description":"Address to receive escrowed XRP."},"memos":{"$ref":"memos"},"condition":{"type":"string","description":"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). If present, `fulfillment` is required upon execution.","pattern":"^[A-F0-9]{0,256}$"},"allowCancelAfter":{"type":"string","format":"date-time","description":"If present, the escrow may be cancelled after this time."},"allowExecuteAfter":{"type":"string","format":"date-time","description":"If present, the escrow can not be executed before this time."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."}},"required":["amount","destination"],"additionalProperties":false}')},7379:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowExecution","link":"escrow-execution","type":"object","properties":{"memos":{"$ref":"memos"},"owner":{"$ref":"address","description":"The address of the owner of the escrow to execute."},"escrowSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to execute."},"condition":{"type":"string","description":"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). This must match the original `condition` from the escrow creation transaction.","pattern":"^[A-F0-9]{0,256}$"},"fulfillment":{"type":"string","description":"A hex value representing the [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) fulfillment for `condition`.","pattern":"^[A-F0-9]+$"}},"required":["owner","escrowSequence"],"additionalProperties":false}')},5746:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPayment","description":"A specification of a payment in a response for getTransaction or getTransactions.","type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"The source of the funds to be sent."},"destination":{"$ref":"destinationAddressTag","description":"The destination of the funds to be sent. Since this is a payment response, the amount is not shown here. For the amount that the transaction delivered, see `outcome.deliveredAmount`."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."},"memos":{"$ref":"memos"},"invoiceID":{"description":"A 256-bit hash that can be used to identify a particular payment.","$ref":"hash256"},"allowPartialPayment":{"description":"If true, this payment should proceed even if the whole amount cannot be delivered due to a lack of liquidity or a lack of funds in the source account.","type":"boolean"},"noDirectRipple":{"description":"If true and paths are specified, the sender would like the XRP Ledger to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet.","type":"boolean"},"limitQuality":{"description":"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false}')},7740:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderCancellation","link":"order-cancellation","type":"object","properties":{"orderSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the order to cancel."},"memos":{"$ref":"memos"}},"required":["orderSequence"],"additionalProperties":false}')},8474:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"order","link":"order","type":"object","properties":{"direction":{"type":"string","enum":["buy","sell"],"description":"Equal to \\"buy\\" for buy orders and \\"sell\\" for sell orders."},"quantity":{"$ref":"amount","description":"The amount of currency to buy or sell."},"totalPrice":{"$ref":"amount","description":"The total price to be paid for the `quantity` to be bought or sold."},"immediateOrCancel":{"type":"boolean","description":"Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger. This cannot be used with `fillOrKill`."},"fillOrKill":{"type":"boolean","description":"Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged. This cannot be used with `immediateOrCancel`."},"passive":{"description":"If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.","type":"boolean"},"expirationTime":{"type":"string","format":"date-time","description":"Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)."},"orderToReplace":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order."},"memos":{"$ref":"memos"}},"required":["direction","quantity","totalPrice"],"additionalProperties":false,"not":{"description":"immediateOrCancel and fillOrKill are mutually exclusive","required":["immediateOrCancel","fillOrKill"]}}')},8482:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelClaim","link":"payment-channel-claim","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by this signature."},"balance":{"$ref":"value","description":"Total XRP balance delivered by this channel after claim is processed."},"signature":{"$ref":"signature","description":"Signed claim authorizing withdrawal of XRP from the channel. (Required except from the channel\'s source address.)"},"publicKey":{"$ref":"publicKey","description":"Public key of the channel. (For verifying the signature.)"},"renew":{"type":"boolean","description":"Clear the channel\'s expiration time."},"close":{"type":"boolean","description":"Request to close the channel. If the channel has no XRP remaining or the destination address requests it, closes the channel immediately (returning unclaimed XRP to the source address). Otherwise, sets the channel to expire after settleDelay seconds have passed."}},"required":["channel"],"additionalProperties":false}')},5314:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelCreate","link":"payment-channel-create","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP for sender to set aside in this channel."},"destination":{"$ref":"address","description":"Address to receive XRP claims against this channel."},"settleDelay":{"type":"number","description":"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},"publicKey":{"$ref":"publicKey","description":"Public key of the key pair the source may use to sign claims against this channel."},"cancelAfter":{"type":"string","format":"date-time","description":"Time when this channel expires. This expiration cannot be changed after creating the channel."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."}},"required":["amount","destination","settleDelay","publicKey"],"additionalProperties":false}')},8029:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelFund","link":"payment-channel-fund","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP to fund the channel with."},"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"expiration":{"type":"string","format":"date-time","description":"New expiration for this channel. (This does not change the cancelAfter expiration, if the channel has one.) Cannot move the expiration sooner than settleDelay seconds from time of the request."}},"required":["amount","channel"],"additionalProperties":false}')},3886:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"payment","link":"payment","type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"The source of the funds to be sent."},"destination":{"$ref":"destinationAdjustment","description":"The destination of the funds to be sent."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."},"memos":{"$ref":"memos"},"invoiceID":{"description":"A 256-bit hash that can be used to identify a particular payment.","$ref":"hash256"},"allowPartialPayment":{"description":"If true, this payment should proceed even if the whole amount cannot be delivered due to a lack of liquidity or a lack of funds in the source account.","type":"boolean"},"noDirectRipple":{"description":"If true and paths are specified, the sender would like the XRP Ledger to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet.","type":"boolean"},"limitQuality":{"description":"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false}')},4201:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"settings","link":"settings","$ref":"settingsPlusMemos","oneOf":[{"required":["memos"],"minProperties":2,"maxProperties":2},{"not":{"required":["memos"]},"minProperties":1,"maxProperties":1}]}')},1763:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"trustline","link":"trustline","type":"object","properties":{"currency":{"$ref":"currency","description":"The currency this trustline applies to."},"counterparty":{"$ref":"address","description":"The address of the account this trustline extends trust to."},"limit":{"$ref":"value","description":"The maximum amount that the owner of the trustline can be owed through the trustline."},"qualityIn":{"$ref":"quality","description":"Incoming balances on this trustline are valued at this ratio."},"qualityOut":{"$ref":"quality","description":"Outgoing balances on this trustline are valued at this ratio."},"ripplingDisabled":{"type":"boolean","description":"If true, payments cannot ripple through this trustline."},"authorized":{"type":"boolean","description":"If true, authorize the counterparty to hold issuances from this account."},"frozen":{"type":"boolean","description":"If true, the trustline is frozen, which means that funds can only be sent to the owner."},"memos":{"$ref":"memos"}},"required":["currency","counterparty","limit"],"additionalProperties":false}')},8715:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getFee=t.getServerInfo=void 0;const u=o(r(6215)),c=r(4330),h=a(r(4431));function f(e,t){u.forEach(t,((t,r)=>{e[t]=e[r],delete e[r]}))}t.getServerInfo=function(){return this.request("server_info").then((e=>{const t=c.convertKeysFromSnakeCaseToCamelCase(e.info);return f(t,{hostid:"hostID"}),t.validatedLedger&&(f(t.validatedLedger,{baseFeeXrp:"baseFeeXRP",reserveBaseXrp:"reserveBaseXRP",reserveIncXrp:"reserveIncrementXRP",seq:"ledgerVersion"}),t.validatedLedger.baseFeeXRP=t.validatedLedger.baseFeeXRP.toString(),t.validatedLedger.reserveBaseXRP=t.validatedLedger.reserveBaseXRP.toString(),t.validatedLedger.reserveIncrementXRP=t.validatedLedger.reserveIncrementXRP.toString()),t}))},t.getFee=function(e){return s(this,void 0,void 0,(function*(){void 0===e&&(e=this._feeCushion),void 0===e&&(e=1.2);const t=(yield this.request("server_info")).info;let r=new h.default(t.validated_ledger.base_fee_xrp).times(t.load_factor).times(e);return r=h.default.min(r,this._maxFeeXRP),new h.default(r.toFixed(6)).toString(10)}))}},4684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.txFlagIndices=t.txFlags=void 0,t.txFlags={Universal:{FullyCanonicalSig:2147483648},AccountSet:{RequireDestTag:65536,OptionalDestTag:131072,RequireAuth:262144,OptionalAuth:524288,DisallowXRP:1048576,AllowXRP:2097152},TrustSet:{SetAuth:65536,NoRipple:131072,SetNoRipple:131072,ClearNoRipple:262144,SetFreeze:1048576,ClearFreeze:2097152},OfferCreate:{Passive:65536,ImmediateOrCancel:131072,FillOrKill:262144,Sell:524288},Payment:{NoRippleDirect:65536,PartialPayment:131072,LimitQuality:262144},PaymentChannelClaim:{Renew:65536,Close:131072}},t.txFlagIndices={AccountSet:{asfRequireDest:1,asfRequireAuth:2,asfDisallowXRP:3,asfDisableMaster:4,asfAccountTxnID:5,asfNoFreeze:6,asfGlobalFreeze:7,asfDefaultRipple:8,asfDepositAuth:9}}},977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4330:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidSecret=t.iso8601ToRippleTime=t.rippleTimeToISO8601=t.removeUndefined=t.convertKeysFromSnakeCaseToCamelCase=t.toRippledAmount=t.xrpToDrops=t.dropsToXrp=void 0;const a=o(r(6215)),u=s(r(4431)),c=r(9140),h=r(8015);function f(e){if("string"==typeof e){if(!e.match(/^-?[0-9]*\.?[0-9]*$/))throw new h.ValidationError(`xrpToDrops: invalid value '${e}', should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);if("."===e)throw new h.ValidationError(`xrpToDrops: invalid value '${e}', should be a BigNumber or string-encoded number.`)}if(!(e=new u.default(e).toString(10)).match(/^-?[0-9.]+$/))throw new h.ValidationError(`xrpToDrops: failed sanity check - value '${e}', does not match (^-?[0-9.]+$).`);const t=e.split(".");if(t.length>2)throw new h.ValidationError(`xrpToDrops: failed sanity check - value '${e}' has too many decimal points.`);if((t[1]||"0").length>6)throw new h.ValidationError(`xrpToDrops: value '${e}' has too many decimal places.`);return new u.default(e).times(1e6).integerValue(u.default.ROUND_FLOOR).toString(10)}t.isValidSecret=function(e){try{return c.deriveKeypair(e),!0}catch(e){return!1}},t.dropsToXrp=function(e){if("string"==typeof e){if(!e.match(/^-?[0-9]*\.?[0-9]*$/))throw new h.ValidationError(`dropsToXrp: invalid value '${e}', should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);if("."===e)throw new h.ValidationError(`dropsToXrp: invalid value '${e}', should be a BigNumber or string-encoded number.`)}if((e=new u.default(e).toString(10)).includes("."))throw new h.ValidationError(`dropsToXrp: value '${e}' has too many decimal places.`);if(!e.match(/^-?[0-9]+$/))throw new h.ValidationError(`dropsToXrp: failed sanity check - value '${e}', does not match (^-?[0-9]+$).`);return new u.default(e).dividedBy(1e6).toString(10)},t.xrpToDrops=f,t.toRippledAmount=function(e){return"XRP"===e.currency?f(e.value):"drops"===e.currency?e.value:{currency:e.currency,issuer:e.counterparty?e.counterparty:e.issuer?e.issuer:void 0,value:e.value}},t.convertKeysFromSnakeCaseToCamelCase=function e(t){if("object"==typeof t){const r=Array.isArray(t)?[]:{};let n;return a.reduce(t,((t,r,i)=>{n=i;const o=/([a-zA-Z]_[a-zA-Z])/g;return o.test(i)&&(n=i.replace(o,(e=>e[0]+e[2].toUpperCase()))),t[n]=e(r),t}),r)}return t},t.removeUndefined=function(e){return a.omitBy(e,a.isUndefined)},t.rippleTimeToISO8601=function(e){return new Date((t=e,1e3*(t+946684800))).toISOString();var t},t.iso8601ToRippleTime=function(e){return t=Date.parse(e),Math.round(t/1e3)-946684800;var t}},6008:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tx_json=t.instructions=t.apiOptions=t.verifyPaymentChannelClaim=t.signPaymentChannelClaim=t.generateAddress=t.computeLedgerHash=t.submit=t.combine=t.sign=t.prepareTicketCreate=t.prepareCheckCancel=t.prepareCheckCash=t.prepareCheckCreate=t.preparePaymentChannelClaim=t.preparePaymentChannelFund=t.preparePaymentChannelCreate=t.prepareEscrowExecution=t.prepareEscrowCancellation=t.prepareEscrowCreation=t.prepareSettings=t.prepareTrustline=t.prepareOrderCancellation=t.prepareOrder=t.preparePayment=t.getLedger=t.getPaymentChannel=t.getTransaction=t.getOrderbook=t.getOrders=t.getBalanceSheet=t.getBalances=t.getTrustlines=t.getAccountInfo=t.getSettings=t.getTransactions=t.getPaths=void 0;const s=o(r(6215)),a=r(8015),u=r(7384);function c(e,t){u.schemaValidate(e,t),function(e){if(!s.isUndefined(e)&&!s.isUndefined(e.minLedgerVersion)&&!s.isUndefined(e.maxLedgerVersion)&&Number(e.minLedgerVersion)>Number(e.maxLedgerVersion))throw new a.ValidationError("minLedgerVersion must not be greater than maxLedgerVersion")}(t.options)}t.getPaths=s.partial(u.schemaValidate,"getPathsParameters"),t.getTransactions=s.partial(c,"getTransactionsParameters"),t.getSettings=s.partial(c,"getSettingsParameters"),t.getAccountInfo=s.partial(c,"getAccountInfoParameters"),t.getTrustlines=s.partial(c,"getTrustlinesParameters"),t.getBalances=s.partial(c,"getBalancesParameters"),t.getBalanceSheet=s.partial(c,"getBalanceSheetParameters"),t.getOrders=s.partial(c,"getOrdersParameters"),t.getOrderbook=s.partial(c,"getOrderbookParameters"),t.getTransaction=s.partial(c,"getTransactionParameters"),t.getPaymentChannel=s.partial(c,"getPaymentChannelParameters"),t.getLedger=s.partial(c,"getLedgerParameters"),t.preparePayment=s.partial(u.schemaValidate,"preparePaymentParameters"),t.prepareOrder=s.partial(u.schemaValidate,"prepareOrderParameters"),t.prepareOrderCancellation=s.partial(u.schemaValidate,"prepareOrderCancellationParameters"),t.prepareTrustline=s.partial(u.schemaValidate,"prepareTrustlineParameters"),t.prepareSettings=s.partial(u.schemaValidate,"prepareSettingsParameters"),t.prepareEscrowCreation=s.partial(u.schemaValidate,"prepareEscrowCreationParameters"),t.prepareEscrowCancellation=s.partial(u.schemaValidate,"prepareEscrowCancellationParameters"),t.prepareEscrowExecution=s.partial(u.schemaValidate,"prepareEscrowExecutionParameters"),t.preparePaymentChannelCreate=s.partial(u.schemaValidate,"preparePaymentChannelCreateParameters"),t.preparePaymentChannelFund=s.partial(u.schemaValidate,"preparePaymentChannelFundParameters"),t.preparePaymentChannelClaim=s.partial(u.schemaValidate,"preparePaymentChannelClaimParameters"),t.prepareCheckCreate=s.partial(u.schemaValidate,"prepareCheckCreateParameters"),t.prepareCheckCash=s.partial(u.schemaValidate,"prepareCheckCashParameters"),t.prepareCheckCancel=s.partial(u.schemaValidate,"prepareCheckCancelParameters"),t.prepareTicketCreate=s.partial(u.schemaValidate,"prepareTicketParameters"),t.sign=s.partial(u.schemaValidate,"signParameters"),t.combine=s.partial(u.schemaValidate,"combineParameters"),t.submit=s.partial(u.schemaValidate,"submitParameters"),t.computeLedgerHash=s.partial(u.schemaValidate,"computeLedgerHashParameters"),t.generateAddress=s.partial(u.schemaValidate,"generateAddressParameters"),t.signPaymentChannelClaim=s.partial(u.schemaValidate,"signPaymentChannelClaimParameters"),t.verifyPaymentChannelClaim=s.partial(u.schemaValidate,"verifyPaymentChannelClaimParameters"),t.apiOptions=s.partial(u.schemaValidate,"api-options"),t.instructions=s.partial(u.schemaValidate,"instructions"),t.tx_json=s.partial(u.schemaValidate,"tx-json")},9491:(e,t,r)=>{"use strict";const n=r(7187);class i extends n.EventEmitter{constructor(e,t,r){super(),this.setMaxListeners(1/0),this._ws=new WebSocket(e),this._ws.onclose=()=>{this.emit("close")},this._ws.onopen=()=>{this.emit("open")},this._ws.onerror=e=>{this.emit("error",e)},this._ws.onmessage=e=>{this.emit("message",e.data)}}close(){1===this.readyState&&this._ws.close()}send(e){this._ws.send(e)}get readyState(){return this._ws.readyState}}i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,e.exports=i},3081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4419),t),i(r(8123),t),i(r(977),t);var o=r(5162);Object.defineProperty(t,"RippleAPIBroadcast",{enumerable:!0,get:function(){return o.RippleAPIBroadcast}})},2490:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007);t.default=function(e,t={}){return n(this,void 0,void 0,(function*(){return i.validate.getAccountInfo({address:e,options:t}),e=i.ensureClassicAddress(e),function(e){const t=e.account_data;return i.removeUndefined({sequence:t.Sequence,xrpBalance:i.dropsToXrp(t.Balance),ownerCount:t.OwnerCount,previousInitiatedTransactionID:t.AccountTxnID,previousAffectingTransactionID:t.PreviousTxnID,previousAffectingTransactionLedgerVersion:t.PreviousTxnLgrSeq})}(yield this.request("account_info",{account:e,ledger_index:t.ledgerVersion||"validated"}))}))}},7117:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007);t.default=function(e,t={}){return n(this,void 0,void 0,(function*(){return yield this.request("account_objects",i.removeUndefined({account:e,type:t.type,ledger_hash:t.ledgerHash,ledger_index:t.ledgerIndex,limit:t.limit,marker:t.marker}))}))}},4885:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=r(1007),c=r(6699);t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){return u.validate.getBalanceSheet({address:e,options:t}),t=yield c.ensureLedgerVersion.call(this,t),function(e){const t={};return a.isUndefined(e.balances)||(t.balances=[],a.forEach(e.balances,((e,r)=>{a.forEach(e,(e=>{t.balances.push(Object.assign({counterparty:r},e))}))}))),a.isUndefined(e.assets)||(t.assets=[],a.forEach(e.assets,((e,r)=>{a.forEach(e,(e=>{t.assets.push(Object.assign({counterparty:r},e))}))}))),a.isUndefined(e.obligations)||(t.obligations=a.map(e.obligations,((e,t)=>({currency:t,value:e})))),t}(yield this.request("gateway_balances",{account:e,strict:!0,hotwallet:t.excludeAddresses,ledger_index:t.ledgerVersion}))}))}},8080:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6699)),a=r(1007);function u(e){return{currency:e.specification.currency,counterparty:e.specification.counterparty,value:e.state.balance}}t.default=function(e,t={}){return a.validate.getTrustlines({address:e,options:t}),e=a.ensureClassicAddress(e),Promise.all([(r=this.connection,n=t.ledgerVersion,null!=n?Promise.resolve(n):r.getLedgerVersion()).then((t=>s.getXRPBalance(this.connection,e,t))),this.getTrustlines(e,t)]).then((e=>function(e,t){const r=t.trustlines.map(u);if(!(e.counterparty||e.currency&&"XRP"!==e.currency)){const e={currency:"XRP",value:t.xrp};r.unshift(e)}if(e.limit&&r.length>e.limit){const t=r.length-e.limit;r.splice(-t,t)}return r}(t,{xrp:e[0],trustlines:e[1]})));var r,n}},62:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007),o=r(6812);t.default=function(e={}){return n(this,void 0,void 0,(function*(){i.validate.getLedger({options:e});const t=yield this.request("ledger",{ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion||"validated",expand:e.includeAllData,transactions:e.includeTransactions,accounts:e.includeState});return o.parseLedger(t.ledger)}))}},2964:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOrderbook=t.formatBidsAndAsks=void 0;const u=o(r(6215)),c=o(r(6699)),h=r(7472),f=r(1007),d=a(r(4431));function l(e,t){return t.specification.direction===e}function p(e,t){return n=e,(r=t.specification.quantity).currency===n.currency&&r.counterparty===n.counterparty?t:function(e){const t=e.specification,r={quantity:t.totalPrice,totalPrice:t.quantity,direction:"buy"===t.direction?"sell":"buy"},n=u.merge({},t,r);return u.merge({},e,{specification:n})}(t);var r,n}function m(e,t){const r=t.sort(((e,t)=>new d.default(e.quality).comparedTo(t.quality))).map(h.parseOrderbookOrder).map(u.partial(p,e.base));return{bids:r.filter(u.partial(l,"buy")),asks:r.filter(u.partial(l,"sell"))}}function y(e,t,r,n,i){return s(this,void 0,void 0,(function*(){const o=c.renameCounterpartyToIssuerInOrder({taker_gets:n,taker_pays:i});return e._requestAll("book_offers",{taker_gets:o.taker_gets,taker_pays:o.taker_pays,ledger_index:r.ledgerVersion||"validated",limit:r.limit,taker:t})}))}t.formatBidsAndAsks=m,t.getOrderbook=function(e,t,r={}){return s(this,void 0,void 0,(function*(){f.validate.getOrderbook({address:e,orderbook:t,options:r});const[n,i]=yield Promise.all([y(this,e,r,t.base,t.counter),y(this,e,r,t.counter,t.base)]),o=u.flatMap(n,(e=>e.offers)),s=u.flatMap(i,(e=>e.offers));return m(t,[...o,...s])}))}},6274:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=r(1007),c=r(4774);t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){u.validate.getOrders({address:e,options:t});const r=yield this._requestAll("account_offers",{account:e,ledger_index:t.ledgerVersion||(yield this.getLedgerVersion()),limit:t.limit});return function(e,t){let r=[];for(const n of t){const t=n.offers.map((t=>c.parseAccountOrder(e,t)));r=r.concat(t)}return a.sortBy(r,(e=>e.properties.sequence))}(e,r)}))}},9941:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007),u=r(8914);t.default=function(e){return s.ok("AccountDelete"===e.TransactionType),a.removeUndefined({destination:e.Destination,destinationTag:e.DestinationTag,destinationXAddress:u.classicAddressToXAddress(e.Destination,void 0!==e.DestinationTag&&e.DestinationTag,!1)})}},4774:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccountOrder=void 0;const i=n(r(4431)),o=n(r(4257)),s=r(2243),a=r(1007),u=r(8365);t.parseAccountOrder=function(e,t){const r=0==(t.flags&u.orderFlags.Sell)?"buy":"sell",n=o.default(t.taker_gets),c=o.default(t.taker_pays),h="buy"===r?c:n,f="buy"===r?n:c,d=a.removeUndefined({direction:r,quantity:h,totalPrice:f,passive:0!=(t.flags&u.orderFlags.Passive)||void 0,expirationTime:s.parseTimestamp(t.expiration)}),l=t.quality?s.adjustQualityForXRP(t.quality.toString(),n.currency,c.currency):(p=n,m=c,new i.default(m.value).dividedBy(p.value).precision(16,i.default.ROUND_HALF_UP).toString());var p,m;return{specification:d,properties:{maker:e,sequence:t.seq,makerExchangeRate:l}}}},9030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2243),i=r(1007);t.default=function(e){return{specification:i.removeUndefined({limit:e.limit,currency:e.currency,counterparty:e.account,qualityIn:n.parseQuality(e.quality_in)||void 0,qualityOut:n.parseQuality(e.quality_out)||void 0,ripplingDisabled:e.no_ripple||void 0,frozen:e.freeze||void 0,authorized:e.authorized||void 0}),counterparty:i.removeUndefined({limit:e.limit_peer,ripplingDisabled:e.no_ripple_peer||void 0,frozen:e.freeze_peer||void 0,authorized:e.peer_authorized||void 0}),state:{balance:e.balance}}}},3286:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{amendment:e.Amendment}}},4257:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(1007));t.default=function(e){return"string"==typeof e?{currency:"XRP",value:s.dropsToXrp(e)}:{currency:e.currency,value:e.value,counterparty:e.issuer}}},5937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282));t.default=function(e){return s.ok("OfferCancel"===e.TransactionType),{orderSequence:e.OfferSequence}}},4755:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007);t.default=function(e){return s.ok("CheckCancel"===e.TransactionType),a.removeUndefined({checkID:e.CheckID})}},979:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(1007),c=s(r(4257));t.default=function(e){return a.ok("CheckCash"===e.TransactionType),u.removeUndefined({checkID:e.CheckID,amount:e.Amount&&c.default(e.Amount),deliverMin:e.DeliverMin&&c.default(e.DeliverMin)})}},2619:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),h=s(r(4257));t.default=function(e){return a.ok("CheckCreate"===e.TransactionType),c.removeUndefined({destination:e.Destination,sendMax:h.default(e.SendMax),destinationTag:e.DestinationTag,expiration:e.Expiration&&u.parseTimestamp(e.Expiration),invoiceID:e.InvoiceID})}},5738:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007);t.default=function(e){return s.ok("DepositPreauth"===e.TransactionType),a.removeUndefined({authorize:e.Authorize,unauthorize:e.Unauthorize})}},9523:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007);t.default=function(e){return s.ok("EscrowCancel"===e.TransactionType),u.removeUndefined({memos:a.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence})}},5053:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=s(r(4257)),c=r(2243),h=r(1007);t.default=function(e){return a.ok("EscrowCreate"===e.TransactionType),h.removeUndefined({amount:u.default(e.Amount).value,destination:e.Destination,memos:c.parseMemos(e),condition:e.Condition,allowCancelAfter:c.parseTimestamp(e.CancelAfter),allowExecuteAfter:c.parseTimestamp(e.FinishAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}},8975:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007);t.default=function(e){return s.ok("EscrowFinish"===e.TransactionType),u.removeUndefined({memos:a.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence,condition:e.Condition,fulfillment:e.Fulfillment})}},2685:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(4431)),o=r(1007);t.default=function(e){const t=new i.default(e.BaseFee,16).toString();return{baseFeeXRP:o.dropsToXrp(t),referenceFeeUnits:e.ReferenceFeeUnits,reserveBaseXRP:o.dropsToXrp(e.ReserveBase),reserveIncrementXRP:o.dropsToXrp(e.ReserveIncrement)}}},9218:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(6215)),c=a(r(4431)),h=r(1007).constants.AccountFields;function f(e,t){return"hex"!==e.encoding||e.length?e.shift?new c.default(t).shiftedBy(-e.shift).toNumber():t:n.from(t,"hex").toString("ascii")}t.default=function(e){const t={};for(const r in h){const n=e[r];if(void 0!==n){const e=h[r];t[e.name]=f(e,n)}}return e.RegularKey&&(t.regularKey=e.RegularKey),e.signer_lists&&1===e.signer_lists.length&&(t.signers={},e.signer_lists[0].SignerQuorum&&(t.signers.threshold=e.signer_lists[0].SignerQuorum),e.signer_lists[0].SignerEntries&&(t.signers.weights=u.map(e.signer_lists[0].SignerEntries,(e=>({address:e.SignerEntry.Account,weight:e.SignerEntry.SignerWeight}))))),t}},8365:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trustlineFlags=t.orderFlags=void 0,t.orderFlags={Passive:65536,Sell:131072},t.trustlineFlags={LowReserve:65536,HighReserve:131072,LowAuth:262144,HighAuth:524288,LowNoRipple:1048576,HighNoRipple:2097152,LowFreeze:4194304,HighFreeze:8388608}},6812:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseLedger=void 0;const a=o(r(6215)),u=r(1007),c=s(r(7797));function h(e,t){const r=a.assign({},a.omit(t,"metaData"),{meta:t.metaData,ledger_index:e}),n=c.default(r,!0);return n.outcome.ledgerVersion||(n.outcome.ledgerVersion=e),n}t.parseLedger=function(e){const t=parseInt(e.ledger_index||e.seqNum,10);return u.removeUndefined(Object.assign({stateHash:e.account_hash,closeTime:u.rippleTimeToISO8601(e.close_time),closeTimeResolution:e.close_time_resolution,closeFlags:e.close_flags,ledgerHash:e.hash||e.ledger_hash,ledgerVersion:t,parentLedgerHash:e.parent_hash,parentCloseTime:u.rippleTimeToISO8601(e.parent_close_time),totalDrops:e.total_coins||e.totalCoins,transactionHash:e.transaction_hash},function(e,t){return a.isEmpty(e)?{}:a.isString(e[0])?{transactionHashes:e}:{transactions:a.map(e,a.partial(h,t))}}(e.transactions,t),(r=e.accountState,a.isEmpty(r)?{}:a.isString(r[0])?{stateHashes:r}:{rawState:JSON.stringify(r)})));var r}},3832:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=s(r(4257)),h=r(1007),f=h.txFlags.OfferCreate;t.default=function(e){a.ok("OfferCreate"===e.TransactionType);const t=0==(e.Flags&f.Sell)?"buy":"sell",r=c.default(e.TakerGets),n=c.default(e.TakerPays),i="buy"===t?n:r,o="buy"===t?r:n;return h.removeUndefined({direction:t,quantity:i,totalPrice:o,passive:0!=(e.Flags&f.Passive)||void 0,immediateOrCancel:0!=(e.Flags&f.ImmediateOrCancel)||void 0,fillOrKill:0!=(e.Flags&f.FillOrKill)||void 0,expirationTime:u.parseTimestamp(e.Expiration)})}},7472:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseOrderbookOrder=void 0;const a=o(r(6215)),u=r(2243),c=r(1007),h=r(8365),f=s(r(4257));t.parseOrderbookOrder=function(e){const t=0==(e.Flags&h.orderFlags.Sell)?"buy":"sell",r=f.default(e.TakerGets),n=f.default(e.TakerPays),i="buy"===t?n:r,o="buy"===t?r:n,s=c.removeUndefined({direction:t,quantity:i,totalPrice:o,passive:0!=(e.Flags&h.orderFlags.Passive)||void 0,expirationTime:u.parseTimestamp(e.Expiration)}),d={maker:e.Account,sequence:e.Sequence,makerExchangeRate:u.adjustQualityForXRP(e.quality,r.currency,n.currency)},l=e.taker_gets_funded?f.default(e.taker_gets_funded):void 0,p=e.taker_pays_funded?f.default(e.taker_pays_funded):void 0,m=c.removeUndefined({fundedAmount:l,priceOfFundedAmount:p}),y=a.isEmpty(m)?void 0:m;return c.removeUndefined({specification:s,properties:d,state:y,data:e})}},2985:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=s(r(4257));function c(e,t){const r=a.keys(t)[0],n=t[r];return a.set({address:e},r,function(e,t){return t.counterparty===e?a.omit(t,"counterparty"):t}(e,n))}t.default=function(e){const t=e.source_account,r=e.destination_account,n=e.destination_amount;return e.alternatives.map((e=>function(e,t,r,n){const i=void 0!==n.destination_amount?{source:{amount:u.default(n.source_amount)},destination:{minAmount:u.default(n.destination_amount)}}:{source:{maxAmount:u.default(n.source_amount)},destination:{amount:u.default(r)}};return{source:c(e,i.source),destination:c(t,i.destination),paths:JSON.stringify((o=n.paths_computed,o.map((e=>e.map((e=>a.omit(e,["type","type_hex"])))))))};var o}(t,r,n,e)))}},7186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(1007),c=s(r(4257)),h=u.txFlags.PaymentChannelClaim;t.default=function(e){return a.ok("PaymentChannelClaim"===e.TransactionType),u.removeUndefined({channel:e.Channel,balance:e.Balance&&c.default(e.Balance).value,amount:e.Amount&&c.default(e.Amount).value,signature:e.Signature,publicKey:e.PublicKey,renew:Boolean(e.Flags&h.Renew)||void 0,close:Boolean(e.Flags&h.Close)||void 0})}},8034:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),h=s(r(4257));t.default=function(e){return a.ok("PaymentChannelCreate"===e.TransactionType),c.removeUndefined({amount:h.default(e.Amount).value,destination:e.Destination,settleDelay:e.SettleDelay,publicKey:e.PublicKey,cancelAfter:e.CancelAfter&&u.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}},9340:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),h=s(r(4257));t.default=function(e){return a.ok("PaymentChannelFund"===e.TransactionType),c.removeUndefined({channel:e.Channel,amount:h.default(e.Amount).value,expiration:e.Expiration&&u.parseTimestamp(e.Expiration)})}},3769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePaymentChannel=void 0;const n=r(2243),i=r(1007);t.parsePaymentChannel=function(e){return i.removeUndefined({account:e.Account,amount:i.dropsToXrp(e.Amount),balance:i.dropsToXrp(e.Balance),destination:e.Destination,publicKey:e.PublicKey,settleDelay:e.SettleDelay,expiration:n.parseTimestamp(e.Expiration),cancelAfter:n.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag,previousAffectingTransactionID:e.PreviousTxnID,previousAffectingTransactionLedgerVersion:e.PreviousTxnLgrSeq})}},8267:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=o(r(9282)),c=o(r(2243)),h=r(1007),f=s(r(4257));function d(e){return 0!=(e.Flags&h.txFlags.Payment.NoRippleDirect)}function l(e){return 0!=(e.Flags&h.txFlags.Payment.LimitQuality)}t.default=function(e){u.ok("Payment"===e.TransactionType);const t={address:e.Account,maxAmount:(r=f.default(e.SendMax||e.Amount),n=e.Account,r.counterparty===n?a.omit(r,"counterparty"):r),tag:e.SourceTag};var r,n;const i={address:e.Destination,tag:e.DestinationTag};return h.removeUndefined({source:h.removeUndefined(t),destination:h.removeUndefined(i),memos:c.parseMemos(e),invoiceID:e.InvoiceID,paths:e.Paths?JSON.stringify(e.Paths):void 0,allowPartialPayment:c.isPartialPayment(e)||void 0,noDirectRipple:d(e)||void 0,limitQuality:l(e)||void 0})}},4570:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=o(r(9282)),c=r(1007).constants.AccountFlags,h=s(r(9218));t.default=function(e){const t=e.TransactionType;return u.ok("AccountSet"===t||"SetRegularKey"===t||"SignerListSet"===t),a.assign({},function(e){const t={};if("AccountSet"!==e.TransactionType)return t;const r=function(e){const t=e.meta.AffectedNodes.filter((e=>"AccountRoot"===e.ModifiedNode.LedgerEntryType));return u.ok(1===t.length),t[0].ModifiedNode}(e),n=a.get(r.PreviousFields,"Flags"),i=a.get(r.FinalFields,"Flags");if(void 0!==n&&void 0!==i){const e=n^i,r=i&e,o=n&e;a.forEach(c,((e,n)=>{r&e?t[n]=!0:o&e&&(t[n]=!1)}))}const o=a.get(r.PreviousFields,"AccountTxnID"),s=a.get(r.FinalFields,"AccountTxnID");return s&&!o?t.enableTransactionIDTracking=!0:o&&!s&&(t.enableTransactionIDTracking=!1),t}(e),h.default(e))}},6611:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007);t.default=function(e){return s.ok("TicketCreate"===e.TransactionType),a.removeUndefined({ticketCount:e.TicketCount})}},7797:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(2243),o=r(1007),s=n(r(4570)),a=n(r(9941)),u=n(r(4755)),c=n(r(979)),h=n(r(2619)),f=n(r(5738)),d=n(r(9523)),l=n(r(5053)),p=n(r(8975)),m=n(r(5937)),y=n(r(3832)),g=n(r(8267)),b=n(r(7186)),v=n(r(8034)),w=n(r(9340)),_=n(r(6611)),M=n(r(1316)),S=n(r(3286)),A=n(r(2685));t.default=function(e,t){const r=function(e){return{AccountSet:"settings",AccountDelete:"accountDelete",CheckCancel:"checkCancel",CheckCash:"checkCash",CheckCreate:"checkCreate",DepositPreauth:"depositPreauth",EscrowCancel:"escrowCancellation",EscrowCreate:"escrowCreation",EscrowFinish:"escrowExecution",OfferCancel:"orderCancellation",OfferCreate:"order",Payment:"payment",PaymentChannelClaim:"paymentChannelClaim",PaymentChannelCreate:"paymentChannelCreate",PaymentChannelFund:"paymentChannelFund",SetRegularKey:"settings",SignerListSet:"settings",TicketCreate:"ticketCreate",TrustSet:"trustline",EnableAmendment:"amendment",SetFee:"feeUpdate"}[e]||null}(e.TransactionType),n={settings:s.default,accountDelete:a.default,checkCancel:u.default,checkCash:c.default,checkCreate:h.default,depositPreauth:f.default,escrowCancellation:d.default,escrowCreation:l.default,escrowExecution:p.default,orderCancellation:m.default,order:y.default,payment:g.default,paymentChannelClaim:b.default,paymentChannelCreate:v.default,paymentChannelFund:w.default,ticketCreate:_.default,trustline:M.default,amendment:S.default,feeUpdate:A.default}[r],E=n?n(e):{UNAVAILABLE:"Unrecognized transaction type.",SEE_RAW_TRANSACTION:"Since this type is unrecognized, `rawTransaction` is included in this response."};n||(t=!0);const O=i.parseOutcome(e);return o.removeUndefined({type:r,address:e.Account,sequence:e.Sequence,id:e.hash,specification:o.removeUndefined(E),outcome:O?o.removeUndefined(O):void 0,rawTransaction:t?JSON.stringify(e):void 0})}},1316:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007),c=u.txFlags.TrustSet;function h(e,t,r){return!!(e&t)||!(e&r)&&void 0}t.default=function(e){return s.ok("TrustSet"===e.TransactionType),u.removeUndefined({limit:e.LimitAmount.value,currency:e.LimitAmount.currency,counterparty:e.LimitAmount.issuer,memos:a.parseMemos(e),qualityIn:a.parseQuality(e.QualityIn),qualityOut:a.parseQuality(e.QualityOut),ripplingDisabled:h(e.Flags,c.SetNoRipple,c.ClearNoRipple),frozen:h(e.Flags,c.SetFreeze,c.ClearFreeze),authorized:h(e.Flags,c.SetAuth,0)})}},2243:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isPartialPayment=t.adjustQualityForXRP=t.parseTimestamp=t.hexToString=t.parseMemos=t.parseOutcome=t.parseQuality=void 0;const u=s(r(6215)),c=a(r(654)),h=a(r(4431)),f=s(r(1007)),d=a(r(4257));function l(e){if("number"==typeof e)return f.rippleTimeToISO8601(e)}function p(e){""===e.counterparty&&delete e.counterparty}function m(e){return 0!=(e.Flags&f.txFlags.Payment.PartialPayment)}function y(e){if("Payment"===e.TransactionType&&"tesSUCCESS"===e.meta.TransactionResult&&(!e.meta.delivered_amount||"unavailable"!==e.meta.delivered_amount))return e.meta.delivered_amount?d.default(e.meta.delivered_amount):e.meta.DeliveredAmount?d.default(e.meta.DeliveredAmount):e.Amount&&!m(e)||e.Amount&&e.ledger_index>4594094?d.default(e.Amount):void 0}function g(e){return e?n.from(e,"hex").toString("utf-8"):void 0}t.adjustQualityForXRP=function(e,t,r){const n=("XRP"===r?-6:0)-("XRP"===t?-6:0);return 0===n?e:new h.default(e).shiftedBy(n).toString()},t.parseQuality=function(e){if("number"==typeof e)return new h.default(e).shiftedBy(-9).toNumber()},t.parseTimestamp=l,t.isPartialPayment=m,t.parseOutcome=function(e){const t=e.meta||e.metaData;if(!t)return;const r=c.default.parseBalanceChanges(t),n=c.default.parseOrderbookChanges(t),i=c.default.parseChannelChanges(t);return function(e){u.forEach(e,(e=>{u.forEach(e,p)}))}(r),function(e){u.forEach(e,(e=>{u.forEach(e,(e=>{u.forEach(e,p)}))}))}(n),f.removeUndefined({result:e.meta.TransactionResult,timestamp:l(e.date),fee:f.dropsToXrp(e.Fee),balanceChanges:r,orderbookChanges:n,channelChanges:i,ledgerVersion:e.ledger_index,indexInLedger:e.meta.TransactionIndex,deliveredAmount:y(e)})},t.hexToString=g,t.parseMemos=function(e){if(Array.isArray(e.Memos)&&0!==e.Memos.length)return e.Memos.map((e=>f.removeUndefined({type:e.Memo.parsed_memo_type||g(e.Memo.MemoType),format:e.Memo.parsed_memo_format||g(e.Memo.MemoFormat),data:e.Memo.parsed_memo_data||g(e.Memo.MemoData)})))}},9048:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=s(r(4431)),c=r(6699),h=r(1007),f=s(r(2985)),d=h.errors.NotFoundError,l=h.errors.ValidationError;t.default=function(e){h.validate.getPaths({pathfind:e});const t=e.source.address;return function(e,t){const r=a.assign({value:"XRP"===t.destination.amount.currency?h.dropsToXrp("-1"):"-1"},t.destination.amount),n={command:"ripple_path_find",source_account:t.source.address,destination_account:t.destination.address,destination_amount:h.toRippledAmount(r)};if("object"!=typeof n.destination_amount||n.destination_amount.issuer||(n.destination_amount.issuer=n.destination_account),t.source.currencies&&t.source.currencies.length>0&&(n.source_currencies=t.source.currencies.map((e=>c.renameCounterpartyToIssuer(e)))),t.source.amount){if(void 0!==t.destination.amount.value)throw new l("Cannot specify both source.amount and destination.amount.value in getPaths");n.send_max=h.toRippledAmount(t.source.amount),"string"==typeof n.send_max||n.send_max.issuer||(n.send_max.issuer=t.source.address)}return e.request(n).then((e=>function(e,t){return a.defaults(a.assign({},t,{source_account:e.source_account,source_currencies:e.source_currencies}),{destination_amount:e.destination_amount})}(n,e)))}(this.connection,e).then((e=>function(e,t,r){return"object"==typeof(n=r.destination_amount)&&n.currency&&"XRP"!==n.currency||!a.includes(r.destination_currencies,"XRP")?Promise.resolve(r):c.getXRPBalance(e,t,void 0).then((e=>function(e,t){const r=e.destination_amount;return new u.default(t).isGreaterThanOrEqualTo(r)&&e.alternatives.unshift({paths_computed:[],source_amount:e.destination_amount}),e}(r,e)));var n}(this.connection,t,e))).then((t=>function(e,t){return e.source.amount&&void 0===e.destination.amount.value&&t.alternatives&&(t.alternatives=a.filter(t.alternatives,(t=>{if(!t.source_amount)return!1;const r=new u.default("XRP"===e.source.amount.currency?h.xrpToDrops(e.source.amount.value):e.source.amount.value);return new u.default("string"==typeof t.source_amount?t.source_amount:t.source_amount.value).eq(r)}))),t}(e,t))).then((t=>function(e,t){if(t.alternatives&&t.alternatives.length>0)return f.default(t);throw void 0===t.destination_currencies||a.includes(t.destination_currencies,e.destination.amount.currency)?t.source_currencies&&t.source_currencies.length>0?new d("No paths found. Please ensure that the source_account has sufficient funds to execute the payment in one of the specified source_currencies. If it does there may be insufficient liquidity in the network to execute this payment right now"):new d("No paths found. Please ensure that the source_account has sufficient funds to execute the payment. If it does there may be insufficient liquidity in the network to execute this payment right now"):new d("No paths found. The destination_account does not accept "+e.destination.amount.currency+", they only accept: "+t.destination_currencies.join(", "))}(e,t)))}},2827:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(3769),o=r(1007),s=o.errors.NotFoundError;t.default=function(e){return n(this,void 0,void 0,(function*(){return o.validate.getPaymentChannel({id:e}),function(e){if(void 0===e.node||"PayChannel"!==e.node.LedgerEntryType)throw new s("Payment channel ledger entry not found");return i.parsePaymentChannel(e.node)}(yield this.request("ledger_entry",{index:e,binary:!1,ledger_index:"validated"}))}))}},5210:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSettings=t.parseAccountFlags=void 0;const u=o(r(6215)),c=a(r(9218)),h=r(1007),f=h.constants.AccountFlags;function d(e,t={}){const r={};for(const n in f)e&f[n]?r[n]=!0:t.excludeFalse||(r[n]=!1);return r}t.parseAccountFlags=d,t.getSettings=function(e,t={}){return s(this,void 0,void 0,(function*(){return h.validate.getSettings({address:e,options:t}),e=h.ensureClassicAddress(e),function(e){const t=e.account_data,r=d(t.Flags,{excludeFalse:!0}),n=c.default(t);return u.assign({},r,n)}(yield this.request("account_info",{account:e,ledger_index:t.ledgerVersion||"validated",signer_lists:!0}))}))}},3028:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(6215)),c=o(r(6699)),h=a(r(7797)),f=r(1007);t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){f.validate.getTransaction({id:e,options:t});const r=yield c.ensureLedgerVersion.call(this,t);try{const t=yield this.request("tx",{transaction:e,binary:!1});return function(e,t){if(!0!==t.validated||!function(e,t){return(!t.minLedgerVersion||e.ledger_index>=t.minLedgerVersion)&&(!t.maxLedgerVersion||e.ledger_index<=t.maxLedgerVersion)}(t,e))throw new f.errors.NotFoundError("Transaction not found");return h.default(t,e.includeRawTransaction)}(r,yield function(e,t){if(t.date)return Promise.resolve(t);const r=t.ledger_index||t.LedgerSequence;if(!r)return new Promise((()=>{const e=new f.errors.NotFoundError("Transaction has not been validated yet; try again later");throw e.data={details:"(ledger_index and LedgerSequence not found in tx)"},e}));const n={command:"ledger",ledger_index:r};return e.request(n).then((e=>{if("number"==typeof e.ledger.close_time)return u.assign({date:e.ledger.close_time},t);throw new f.errors.UnexpectedError("Ledger missing close_time")})).catch((e=>{if(e instanceof f.errors.UnexpectedError)throw e;throw new f.errors.NotFoundError("Transaction ledger not found")}))}(this.connection,t))}catch(e){throw yield function(e,t,r){let n=!1;(r.data&&"txnNotFound"===r.data.error||"txnNotFound"===r.message)&&(n=!0);const i=n?new f.errors.NotFoundError("Transaction not found"):r;return i instanceof f.errors.NotFoundError?c.hasCompleteLedgerRange(e,t.minLedgerVersion,t.maxLedgerVersion).then((r=>r?i:c.isPendingLedgerVersion(e,t.maxLedgerVersion).then((e=>e?new f.errors.PendingLedgerVersionError:new f.errors.MissingLedgerHistoryError)))):Promise.resolve(i)}(this.connection,r,e)}}))}},5797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=s(r(2353)),c=r(7854),h=o(r(6699)),f=s(r(7797)),d=s(r(3028)),l=r(1007);function p(e,t,r){return!(t.excludeFailures&&"tesSUCCESS"!==r.outcome.result||t.types&&!a.includes(t.types,r.type)||!0===t.initiated&&r.address!==e||!1===t.initiated&&r.address===e||t.counterparty&&!function(e,t){if(t.address===e.counterparty)return!0;const r=t.specification;return!(!r||!(r.destination&&r.destination.address===e.counterparty||r.counterparty===e.counterparty))}(t,r))}function m(e,t){return!e.startTx||(e.earliestFirst?h.compareTransactions(t,e.startTx)>0:h.compareTransactions(t,e.startTx)<0)}function y(e,t,r,n,i){const o={command:"account_tx",account:t,ledger_index_min:r.minLedgerVersion||-1,ledger_index_max:r.maxLedgerVersion||-1,forward:r.earliestFirst,binary:r.binary,limit:h.clamp(i,10,400),marker:n};return e.request(o).then((e=>function(e,t,r){return{marker:r.marker,results:r.transactions.filter((e=>e.validated)).map((e=>function(e,t){const r=e.tx_blob?function(e){const t=u.default.decode(e.tx_blob);return t.hash=c.computeTransactionHash(t),t.ledger_index=e.ledger_index,{tx:t,meta:u.default.decode(e.meta),validated:e.validated}}(e):e;return f.default(a.assign({},r.tx,{meta:r.meta,validated:r.validated}),t)}(e,t.includeRawTransactions))).filter(a.partial(p,e,t)).filter(a.partial(m,t))}}(t,r,e)))}function g(e,t,r){const n=t.earliestFirst?h.compareTransactions:a.rearg(h.compareTransactions,1,0),i=r.sort(n);return function(e,t,r){let{minLedgerVersion:n,maxLedgerVersion:i}=t;return t.limit&&r.length===t.limit&&(t.earliestFirst?i=a.last(r).outcome.ledgerVersion:n=a.last(r).outcome.ledgerVersion),h.hasCompleteLedgerRange(e,n,i).then((e=>{if(!e)throw new l.errors.MissingLedgerHistoryError}))}(e,t,i).then((()=>i))}function b(e,t,r){const n=a.partial(y,e,t,r),i=a.partial(g,e,r);return h.getRecursive(n,r.limit).then(i)}t.default=function(e,t={}){l.validate.getTransactions({address:e,options:t}),e=l.ensureClassicAddress(e);const r={maxLedgerVersion:-1};if(t.start)return d.default.call(this,t.start).then((n=>{const i=n.outcome.ledgerVersion,o=t.earliestFirst?{minLedgerVersion:i}:{maxLedgerVersion:i},s=a.assign({},r,t,{startTx:n},o);return b(this.connection,e,s)}));const n=a.assign({},r,t);return b(this.connection,e,n)}},5114:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(6215)),c=r(1007),h=a(r(9030));t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){c.validate.getTrustlines({address:e,options:t}),e=c.ensureClassicAddress(e);const r=yield this._requestAll("account_lines",{account:e,ledger_index:yield this.getLedgerVersion(),limit:t.limit,peer:t.counterparty});return u.flatMap(r,(e=>e.lines)).map(h.default).filter((e=>function(e,t){return null===e||t.specification.currency===e}(t.currency||null,e)))}))}},6699:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.common=t.clamp=t.isPendingLedgerVersion=t.hasCompleteLedgerRange=t.getRecursive=t.renameCounterpartyToIssuerInOrder=t.renameCounterpartyToIssuer=t.compareTransactions=t.ensureLedgerVersion=t.getXRPBalance=void 0;const s=o(r(6215)),a=o(r(9282)),u=o(r(1007));function c(e,t,r){return e(t,r).then((t=>{const n=r-t.results.length;return n>0&&void 0!==t.marker?c(e,t.marker,n).then((e=>t.results.concat(e))):t.results.slice(0,r)}))}function h(e){const t=void 0!==e.counterparty?e.counterparty:void 0!==e.issuer?e.issuer:void 0,r=Object.assign({},e,{issuer:t});return delete r.counterparty,r}t.common=u,t.clamp=function(e,t,r){return a.ok(t<=r,"Illegal clamp bounds"),Math.min(Math.max(e,t),r)},t.getXRPBalance=function(e,t,r){const n={command:"account_info",account:t,ledger_index:r};return e.request(n).then((e=>u.dropsToXrp(e.account_data.Balance)))},t.getRecursive=function(e,t){return c(e,void 0,t||1/0)},t.renameCounterpartyToIssuer=h,t.renameCounterpartyToIssuerInOrder=function(e){const t={taker_gets:h(e.taker_gets),taker_pays:h(e.taker_pays)};return s.assign({},e,s.omitBy(t,s.isUndefined))},t.compareTransactions=function(e,t){return e.outcome&&t.outcome?e.outcome.ledgerVersion===t.outcome.ledgerVersion?0==(r=e.outcome.indexInLedger-t.outcome.indexInLedger)?0:r>0?1:-1:e.outcome.ledgerVersion<t.outcome.ledgerVersion?-1:1:0;var r},t.hasCompleteLedgerRange=function(e,t,r){return e.hasLedgerVersions(t||32570,r)},t.isPendingLedgerVersion=function(e,t){return e.getLedgerVersion().then((e=>e<(t||0)))},t.ensureLedgerVersion=function(e){return Boolean(e)&&void 0!==e.ledgerVersion&&null!==e.ledgerVersion?Promise.resolve(e):this.getLedgerVersion().then((t=>s.assign({},e,{ledgerVersion:t})))}},1310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deriveXAddress=t.deriveAddress=t.deriveKeypair=void 0;const n=r(9140);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return n.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return n.deriveAddress}});const i=r(8914);t.deriveXAddress=function(e){const t=n.deriveAddress(e.publicKey);return i.classicAddressToXAddress(t,e.tag,e.test)}},2247:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateAddressAPI=void 0;const i=r(8914),o=n(r(9140)),s=r(1007);t.generateAddressAPI=function(e){s.validate.generateAddress({options:e});try{const t={algorithm:e.algorithm};e.entropy&&(t.entropy=Uint8Array.from(e.entropy));const r=o.default.generateSeed(t),n=o.default.deriveKeypair(r),s=o.default.deriveAddress(n.publicKey),a={xAddress:i.classicAddressToXAddress(s,!1,e&&e.test),secret:r};return e.includeClassicAddress&&(a.classicAddress=s,a.address=s),a}catch(e){throw new s.errors.UnexpectedError(e.message)}}},6773:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6215)),a=r(7854),u=o(r(1007));function c(e,t){let r;if(e.rawTransactions)r=JSON.parse(e.rawTransactions);else{if(!e.transactions){if(t.computeTreeHashes)throw new u.errors.ValidationError("transactions property is missing from the ledger");return e.transactionHash}try{r=e.transactions.map((e=>JSON.parse(e.rawTransaction)))}catch(e){if("SyntaxError: Unexpected token u in JSON at position 0"===e.toString())throw new u.errors.ValidationError("ledger is missing raw transactions")}}const n=s.map(r,(e=>{const t=s.assign({},s.omit(e,"tx"),e.tx||{});return s.assign({},s.omit(t,"meta"),e.meta?{metaData:e.meta}:{})})),i=a.computeTransactionTreeHash(n);if(void 0!==e.transactionHash&&e.transactionHash!==i)throw new u.errors.ValidationError("transactionHash in header does not match computed hash of transactions",{transactionHashInHeader:e.transactionHash,computedHashOfTransactions:i});return i}function h(e,t){if(void 0===e.rawState){if(t.computeTreeHashes)throw new u.errors.ValidationError("rawState property is missing from the ledger");return e.stateHash}const r=JSON.parse(e.rawState),n=a.computeStateTreeHash(r);if(void 0!==e.stateHash&&e.stateHash!==n)throw new u.errors.ValidationError("stateHash in header does not match computed hash of state");return n}t.default=function(e,t={}){const r={transactionHash:c(e,t),stateHash:h(e,t)};return function(e){const t=function(e){return{account_hash:e.stateHash,close_time:u.iso8601ToRippleTime(e.closeTime),close_time_resolution:e.closeTimeResolution,close_flags:e.closeFlags,hash:e.ledgerHash,ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion.toString(),seqNum:e.ledgerVersion.toString(),parent_hash:e.parentLedgerHash,parent_close_time:u.iso8601ToRippleTime(e.parentCloseTime),total_coins:e.totalDrops,totalCoins:e.totalDrops,transaction_hash:e.transactionHash}}(e);return a.computeLedgerHash(t)}(s.assign({},e,r))}},4009:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(1007)),u=s(r(9140)),c=s(r(2353)),{validate:h,xrpToDrops:f}=a;t.default=function(e,t,r){h.signPaymentChannelClaim({channel:e,amount:t,privateKey:r});const n=c.default.encodeForSigningClaim({channel:e,amount:f(t)});return u.default.sign(n,r)}},4371:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9140)),o=n(r(2353)),s=r(1007);t.default=function(e,t,r,n){s.validate.verifyPaymentChannelClaim({channel:e,amount:t,signature:r,publicKey:n});const a=o.default.encodeForSigningClaim({channel:e,amount:s.xrpToDrops(t)});return i.default.verify(a,r,n)}},5130:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.formatLedgerClose=t.getLedgerVersion=t.isConnected=t.disconnect=t.connect=void 0;const a=o(r(1007));t.isConnected=function(){return this.connection.isConnected()},t.getLedgerVersion=function(){return this.connection.getLedgerVersion()},t.connect=function(){return s(this,void 0,void 0,(function*(){return this.connection.connect()}))},t.disconnect=function(){return s(this,void 0,void 0,(function*(){yield this.connection.disconnect()}))},t.formatLedgerClose=function(e){return{baseFeeXRP:a.dropsToXrp(e.fee_base),ledgerHash:e.ledger_hash,ledgerVersion:e.ledger_index,ledgerTimestamp:a.rippleTimeToISO8601(e.ledger_time),reserveBaseXRP:a.dropsToXrp(e.reserve_base),reserveIncrementXRP:a.dropsToXrp(e.reserve_inc),transactionCount:e.txn_count,validatedLedgerVersions:e.validated_ledgers}}},5313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4377),i=r(1007);t.default=function(e,t,r={}){try{i.validate.prepareCheckCancel({address:e,checkCancel:t,instructions:r});const o={Account:e,TransactionType:"CheckCancel",CheckID:t.checkID};return n.prepareTransaction(o,this,r)}catch(e){return Promise.reject(e)}}},420:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.errors.ValidationError,u=s.common.toRippledAmount,c=r(1007);t.default=function(e,t,r={}){try{c.validate.prepareCheckCash({address:e,checkCash:t,instructions:r});const n=function(e,t){if(t.amount&&t.deliverMin)throw new a('"amount" and "deliverMin" properties on CheckCash are mutually exclusive');const r={Account:e,TransactionType:"CheckCash",CheckID:t.checkID};return void 0!==t.amount&&(r.Amount=u(t.amount)),void 0!==t.deliverMin&&(r.DeliverMin=u(t.deliverMin)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.toRippledAmount,u=r(1007);t.default=function(e,t,r={}){try{u.validate.prepareCheckCreate({address:e,checkCreate:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"CheckCreate",Destination:t.destination,SendMax:a(t.sendMax)};return void 0!==t.destinationTag&&(r.DestinationTag=t.destinationTag),void 0!==t.expiration&&(r.Expiration=u.iso8601ToRippleTime(t.expiration)),void 0!==t.invoiceID&&(r.InvoiceID=t.invoiceID),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4036:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(6215)),c=a(r(2353)),h=s(r(4377)),f=a(r(4431)),d=r(8914),l=r(1007),p=r(7854);function m(e){const t=n.from(d.decodeAccountID(e)).toString("hex");return new f.default(t,16)}function y(e,t){return m(e.Signer.Account).comparedTo(m(t.Signer.Account))}t.default=function(e){l.validate.combine({signedTransactions:e});const t=u.map(e,c.default.decode),r=u.omit(t[0],"Signers");if(!u.every(t,(e=>u.isEqual(r,u.omit(e,"Signers")))))throw new h.common.errors.ValidationError("txJSON is not the same for all signedTransactions");const n=u.reduce(t,((e,t)=>e.concat(t.Signers||[])),[]).sort(y),i=u.assign({},r,{Signers:n}),o=c.default.encode(i);return{signedTransaction:o,id:p.computeBinaryTransactionHash(o)}}},6857:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate;t.default=function(e,t,r={}){a.prepareEscrowCancellation({address:e,escrowCancellation:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowCancel",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};return void 0!==t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}},6759:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007),u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.validate.prepareEscrowCreation({address:e,escrowCreation:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowCreate",Account:e,Destination:t.destination,Amount:a.xrpToDrops(t.amount)};if(void 0!==t.condition&&(r.Condition=t.condition),void 0!==t.allowCancelAfter&&(r.CancelAfter=a.iso8601ToRippleTime(t.allowCancelAfter)),void 0!==t.allowExecuteAfter&&(r.FinishAfter=a.iso8601ToRippleTime(t.allowExecuteAfter)),void 0!==t.sourceTag&&(r.SourceTag=t.sourceTag),void 0!==t.destinationTag&&(r.DestinationTag=t.destinationTag),void 0!==t.memos&&(r.Memos=t.memos.map(s.convertMemo)),Boolean(t.allowCancelAfter)&&Boolean(t.allowExecuteAfter)&&r.CancelAfter<=r.FinishAfter)throw new u('prepareEscrowCreation: "allowCancelAfter" must be after "allowExecuteAfter"');return r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4656:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate,u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.prepareEscrowExecution({address:e,escrowExecution:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowFinish",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};if(Boolean(t.condition)!==Boolean(t.fulfillment))throw new u('"condition" and "fulfillment" fields on EscrowFinish must only be specified together.');return void 0!==t.condition&&(r.Condition=t.condition),void 0!==t.fulfillment&&(r.Fulfillment=t.fulfillment),void 0!==t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},5070:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.txFlags.OfferCreate,u=r(1007);t.default=function(e,t,r={}){try{u.validate.prepareOrder({address:e,order:t,instructions:r});const n=function(e,t){const r=s.common.toRippledAmount("buy"===t.direction?t.quantity:t.totalPrice),n={TransactionType:"OfferCreate",Account:e,TakerGets:s.common.toRippledAmount("buy"===t.direction?t.totalPrice:t.quantity),TakerPays:r,Flags:0};return"sell"===t.direction&&(n.Flags|=a.Sell),!0===t.passive&&(n.Flags|=a.Passive),!0===t.immediateOrCancel&&(n.Flags|=a.ImmediateOrCancel),!0===t.fillOrKill&&(n.Flags|=a.FillOrKill),void 0!==t.expirationTime&&(n.Expiration=u.iso8601ToRippleTime(t.expirationTime)),void 0!==t.orderToReplace&&(n.OfferSequence=t.orderToReplace),void 0!==t.memos&&(n.Memos=t.memos.map(s.convertMemo)),n}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},8788:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate;t.default=function(e,t,r={}){try{a.prepareOrderCancellation({address:e,orderCancellation:t,instructions:r});const n=function(e,t){const r={TransactionType:"OfferCancel",Account:e,OfferSequence:t.orderSequence};return void 0!==t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},2299:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.errors.ValidationError,u=s.common.txFlags.PaymentChannelClaim,c=r(1007);t.default=function(e,t,r={}){try{c.validate.preparePaymentChannelClaim({address:e,paymentChannelClaim:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelClaim",Channel:t.channel,Flags:0};if(void 0!==t.balance&&(r.Balance=c.xrpToDrops(t.balance)),void 0!==t.amount&&(r.Amount=c.xrpToDrops(t.amount)),Boolean(t.signature)!==Boolean(t.publicKey))throw new a('"signature" and "publicKey" fields on PaymentChannelClaim must only be specified together.');if(void 0!==t.signature&&(r.Signature=t.signature),void 0!==t.publicKey&&(r.PublicKey=t.publicKey),!0===t.renew&&!0===t.close)throw new a('"renew" and "close" flags on PaymentChannelClaim are mutually exclusive');return!0===t.renew&&(r.Flags|=u.Renew),!0===t.close&&(r.Flags|=u.Close),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4112:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007);t.default=function(e,t,r={}){try{a.validate.preparePaymentChannelCreate({address:e,paymentChannelCreate:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelCreate",Amount:a.xrpToDrops(t.amount),Destination:t.destination,SettleDelay:t.settleDelay,PublicKey:t.publicKey.toUpperCase()};return void 0!==t.cancelAfter&&(r.CancelAfter=a.iso8601ToRippleTime(t.cancelAfter)),void 0!==t.sourceTag&&(r.SourceTag=t.sourceTag),void 0!==t.destinationTag&&(r.DestinationTag=t.destinationTag),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},9712:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007);t.default=function(e,t,r={}){try{a.validate.preparePaymentChannelFund({address:e,paymentChannelFund:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelFund",Channel:t.channel,Amount:a.xrpToDrops(t.amount)};return void 0!==t.expiration&&(r.Expiration=a.iso8601ToRippleTime(t.expiration)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},2331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6215)),a=o(r(4377)),u=a.common.validate,c=a.common.toRippledAmount,h=a.common.txFlags.Payment,f=a.common.errors.ValidationError,d=r(1007),l=r(4377);function p(e){return void 0!==e.maxAmount}function m(e){return void 0!==e.minAmount}function y(e){const{source:t,destination:r}=e,n=p(t)?t.maxAmount.currency:t.amount.currency,i=m(r)?r.minAmount.currency:r.amount.currency;return!("XRP"!==n&&"drops"!==n||"XRP"!==i&&"drops"!==i)}function g(e,t){const r=l.getClassicAccountAndTag(e,t);return r.tag=!1===r.tag?void 0:r.tag,r}t.default=function(e,t,r={}){try{u.preparePayment({address:e,payment:t,instructions:r});const n=function(e,t){const r=s.cloneDeep(t);!function(e){s.forEach([e.source,e.destination],(e=>{s.forEach(["amount","minAmount","maxAmount"],(t=>{var r;(r=e[t])&&"XRP"!==r.currency&&"drops"!==r.currency&&void 0===r.counterparty&&(e[t].counterparty=e.address)}))}))}(r);const n=g(r.source.address,r.source.tag),i=g(e,void 0);if(i.classicAccount!==n.classicAccount)throw new f("address must match payment.source.address");if(void 0!==i.tag&&void 0!==n.tag&&i.tag!==n.tag)throw new f("address includes a tag that does not match payment.source.tag");const o=g(r.destination.address,r.destination.tag);if(p(r.source)&&m(r.destination)||!p(r.source)&&!m(r.destination))throw new f("payment must specify either (source.maxAmount and destination.amount) or (source.amount and destination.minAmount)");const u=m(r.destination)?r.destination.minAmount:r.destination.amount,l=p(r.source)?r.source.maxAmount:r.source.amount,b=m(r.destination)&&!y(r)?function(e){const t="100000000000";let r;return r="XRP"===e.currency?t:"drops"===e.currency?d.xrpToDrops(t):"999999999999999900000000000000000000000000000000000000000000000000000000000000000000000000000000",s.assign({},e,{value:r})}(u):u,v={TransactionType:"Payment",Account:n.classicAccount,Destination:o.classicAccount,Amount:c(b),Flags:0};if(void 0!==r.invoiceID&&(v.InvoiceID=r.invoiceID),void 0!==n.tag&&(v.SourceTag=n.tag),void 0!==o.tag&&(v.DestinationTag=o.tag),void 0!==r.memos&&(v.Memos=s.map(r.memos,a.convertMemo)),!0===r.noDirectRipple&&(v.Flags|=h.NoRippleDirect),!0===r.limitQuality&&(v.Flags|=h.LimitQuality),y(r)){if(!0===r.allowPartialPayment)throw new f("XRP to XRP payments cannot be partial payments")}else(r.allowPartialPayment||m(r.destination))&&(v.Flags|=h.PartialPayment),v.SendMax=c(l),m(r.destination)&&(v.DeliverMin=c(u)),void 0!==r.paths&&(v.Paths=JSON.parse(r.paths));return v}(e,t);return a.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},3963:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(9282)),c=a(r(4431)),h=s(r(4377)),f=h.common.validate,d=h.common.constants.AccountFlagIndices,l=h.common.constants.AccountFields;function p(e){return{SignerEntry:{Account:e.address,SignerWeight:e.weight}}}t.default=function(e,t,r={}){try{f.prepareSettings({address:e,settings:t,instructions:r});const i=function(e,t){const r=function(e,t){if(void 0!==t.regularKey){const r={TransactionType:"SetRegularKey",Account:e};return null===t.regularKey?r:Object.assign({},r,{RegularKey:t.regularKey})}if(void 0!==t.signers){const r={TransactionType:"SignerListSet",Account:e,SignerEntries:[],SignerQuorum:t.signers.threshold};return void 0!==t.signers.weights&&(r.SignerEntries=t.signers.weights.map(p)),r}const r={TransactionType:"AccountSet",Account:e},i=Object.assign({},t);var o;return delete i.memos,function(e,t){const r=Object.keys(t);u.ok(1===r.length,"ERROR: can only set one setting per transaction");const n=r[0],i=t[n],o=d[n];void 0!==o&&(i?e.SetFlag=o:e.ClearFlag=o)}(r,i),function(e,t){const r=l;for(const i in r){const o=r[i];let s=t[o.name];void 0!==s&&(null===s&&o.hasOwnProperty("defaults")&&(s=o.defaults),"hex"!==o.encoding||o.length||(s=n.from(s,"ascii").toString("hex").toUpperCase()),e[i]=s)}}(r,t),void 0!==r.TransferRate&&(r.TransferRate=(o=r.TransferRate,new c.default(o).shiftedBy(9).toNumber())),r}(e,t);return void 0!==t.memos&&(r.Memos=t.memos.map(h.convertMemo)),r}(e,t);return h.prepareTransaction(i,this,r)}catch(e){return Promise.reject(e)}}},1655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(r(2307)),u=o(r(4377)),c=s(r(9140)),h=s(r(2353)),f=r(7854),d=r(4431),l=r(1007),p=u.common.validate;function m(e,t,r){const n=r?h.default.encodeForMultisigning(e,r):h.default.encodeForSigning(e);return c.default.sign(n,t)}function y(e,t,r,n={signAs:""}){p.sign({txJSON:t,keypair:r});const i=JSON.parse(t);if(i.TxnSignature||i.Signers)throw new u.common.errors.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');!function(e,t){const r=new d.BigNumber(t),n=l.xrpToDrops(e._maxFeeXRP);if(r.isGreaterThan(n))throw new u.common.errors.ValidationError(`"Fee" should not exceed "${n}". To use a higher fee, set \`maxFeeXRP\` in the RippleAPI constructor.`)}(e,i.Fee);const o=Object.assign({},i);if(o.SigningPubKey=n.signAs?"":r.publicKey,n.signAs){const e={Account:n.signAs,SigningPubKey:r.publicKey,TxnSignature:m(o,r.privateKey,n.signAs)};o.Signers=[{Signer:e}]}else o.TxnSignature=m(o,r.privateKey);const s=h.default.encode(o);return function(e,t){const r=h.default.decode(e);if(!r.TxnSignature&&!r.Signers)throw new u.common.errors.ValidationError("Serialized transaction must have a TxnSignature or Signers property");if(delete r.TxnSignature,delete r.Signers,t.SigningPubKey||delete r.SigningPubKey,!a.default(r,t)){const e=new u.common.errors.ValidationError("Serialized transaction does not match original txJSON. See `error.data`");throw e.data={decoded:r,tx:t,diff:g(t,r)},e}}(s,i),{signedTransaction:s,id:f.computeBinaryTransactionHash(s)}}function g(e,t){const r={},n=function(e,t,n){const i=Object.prototype.toString.call(e),o=Object.prototype.toString.call(t);if("[object Undefined]"!==o)if(i===o)if("[object Object]"!==i)"[object Array]"!==i?"[object Function]"!==i?e!==t&&(r[n]=t):e.toString()!==t.toString()&&(r[n]=t):a.default(e,t)||(r[n]=t);else{const i=g(e,t);Object.keys(i).length>0&&(r[n]=i)}else r[n]=t;else r[n]=null};for(const r in e)e.hasOwnProperty(r)&&n(e[r],t[r],r);for(const n in t)t.hasOwnProperty(n)&&(e[n]||e[n]===t[n]||(r[n]=t[n]));return r}t.default=function(e,t,r,n){if("string"==typeof t)return p.sign({txJSON:e,secret:t}),y(this,e,c.default.deriveKeypair(t),r);if(!n&&!t)throw new u.common.errors.ValidationError("sign: Missing secret or keypair.");return y(this,e,n||t,r)}},6250:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6215)),u=o(r(4377)),c=r(1007);t.default=function(e,t){return s(this,void 0,void 0,(function*(){return c.validate.submit({signedTransaction:e}),function(e){const t={resultCode:e.engine_result,resultMessage:e.engine_result_message,engine_result:e.engine_result,engine_result_code:e.engine_result_code,engine_result_message:e.engine_result_message,tx_blob:e.tx_blob,tx_json:e.tx_json};if(r=e.engine_result,a.startsWith(r,"tem"))throw new u.common.errors.RippledError("Submit failed",t);var r;return t}(yield this.request("submit",Object.assign({tx_blob:e},t?{fail_hard:t}:{})))}))}},8220:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate,u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.prepareTicketCreate({address:e,ticketCount:t,instructions:r});const n=function(e,t){if(!t||0===t)throw new u("Ticket count must be greater than 0.");return{TransactionType:"TicketCreate",Account:e,TicketCount:t}}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},3487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(r(4431)),u=o(r(4377)),c=u.common.validate,h=u.common.txFlags.TrustSet;function f(e){return new a.default(e).shiftedBy(9).integerValue(a.default.ROUND_DOWN).toNumber()}t.default=function(e,t,r={}){try{c.prepareTrustline({address:e,trustline:t,instructions:r});const n=function(e,t){const r={TransactionType:"TrustSet",Account:e,LimitAmount:{currency:t.currency,issuer:t.counterparty,value:t.limit},Flags:0};return void 0!==t.qualityIn&&(r.QualityIn=f(t.qualityIn)),void 0!==t.qualityOut&&(r.QualityOut=f(t.qualityOut)),!0===t.authorized&&(r.Flags|=h.SetAuth),void 0!==t.ripplingDisabled&&(r.Flags|=t.ripplingDisabled?h.NoRipple:h.ClearNoRipple),void 0!==t.frozen&&(r.Flags|=t.frozen?h.SetFreeze:h.ClearFreeze),void 0!==t.memos&&(r.Memos=t.memos.map(u.convertMemo)),r}(e,t);return u.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},8123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4377:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getClassicAccountAndTag=t.setCanonicalFlag=t.common=t.prepareTransaction=t.convertMemo=t.convertStringToHex=void 0;const c=u(r(4431)),h=s(r(1007));t.common=h;const f=r(8015),d=r(8914),l=h.txFlags,p=["Payment","CheckCreate","EscrowCreate","PaymentChannelCreate"];function m(e){e.Flags|=l.Universal.FullyCanonicalSig,e.Flags=e.Flags>>>0}function y(e,t,r=0){return new c.default(e).times(t).plus(r).toString()}function g(e,t){if(d.isValidXAddress(e)){const r=d.xAddressToClassicAddress(e);if(void 0!==t&&r.tag!==t)throw new f.ValidationError("address includes a tag that does not match the tag specified in the transaction");return{classicAccount:r.classicAddress,tag:r.tag}}return{classicAccount:e,tag:t}}function b(e){return n.from(e,"utf8").toString("hex").toUpperCase()}t.setCanonicalFlag=m,t.getClassicAccountAndTag=g,t.prepareTransaction=function(e,t,r){if(h.validate.instructions(r),h.validate.tx_json(e),void 0!==r.sequence&&0===r.sequence)return Promise.reject(new f.ValidationError("`sequence` cannot be 0"));const i=["maxLedgerVersion","maxLedgerVersionOffset","fee","sequence","ticketSequence"].filter((t=>e[t]));if(i.length)return Promise.reject(new f.ValidationError('txJSON additionalProperty "'+i[0]+'" exists in instance when not allowed'));const o=Object.assign({},e);0===e.SignerQuorum&&delete o.SignerEntries;const{classicAccount:s,tag:u}=g(e.Account);if(o.Account=s,void 0!==u){if(e.SourceTag&&e.SourceTag!==u)return Promise.reject(new f.ValidationError("The `SourceTag`, if present, must match the tag of the `Account` X-address"));u&&(o.SourceTag=u)}if("string"==typeof e.Destination){const{classicAccount:t,tag:r}=g(e.Destination);if(o.Destination=t,void 0!==r&&p.includes(e.TransactionType)){if(e.DestinationTag&&e.DestinationTag!==r)return Promise.reject(new f.ValidationError("The Payment `DestinationTag`, if present, must match the tag of the `Destination` X-address"));r&&(o.DestinationTag=r)}}function d(t){const r=e[t];if("string"==typeof r){const{classicAccount:e}=g(r);o[t]=e}}return d("Authorize"),d("Unauthorize"),d("Owner"),d("RegularKey"),m(o),Promise.all([function(){if(o.LastLedgerSequence&&r.maxLedgerVersion)return Promise.reject(new f.ValidationError("`LastLedgerSequence` in txJSON and `maxLedgerVersion` in `instructions` cannot both be set"));if(o.LastLedgerSequence&&r.maxLedgerVersionOffset)return Promise.reject(new f.ValidationError("`LastLedgerSequence` in txJSON and `maxLedgerVersionOffset` in `instructions` cannot both be set"));if(o.LastLedgerSequence)return Promise.resolve();if(void 0!==r.maxLedgerVersion)return null!==r.maxLedgerVersion&&(o.LastLedgerSequence=r.maxLedgerVersion),Promise.resolve();const e=void 0!==r.maxLedgerVersionOffset?r.maxLedgerVersionOffset:3;return t.connection.getLedgerVersion().then((t=>{o.LastLedgerSequence=t+e}))}(),function(){if(o.Fee&&r.fee)return Promise.reject(new f.ValidationError("`Fee` in txJSON and `fee` in `instructions` cannot both be set"));if(o.Fee)return Promise.resolve();const e=void 0===r.signersCount?1:r.signersCount+1;if(void 0!==r.fee){const n=new c.default(r.fee);return n.isGreaterThan(t._maxFeeXRP)?Promise.reject(new f.ValidationError(`Fee of ${n.toString(10)} XRP exceeds max of ${t._maxFeeXRP} XRP. To use this fee, increase \`maxFeeXRP\` in the RippleAPI constructor.`)):(o.Fee=y(h.xrpToDrops(r.fee),e),Promise.resolve())}const i=t._feeCushion;return t.getFee(i).then((s=>t.connection.getFeeRef().then((a=>{const u="EscrowFinish"!==o.TransactionType||void 0===o.Fulfillment?0:i*a*(32+Math.floor(n.from(o.Fulfillment,"hex").length/16)),f=h.xrpToDrops(s),d=r.maxFee?c.default.min(t._maxFeeXRP,r.maxFee):t._maxFeeXRP,l=h.xrpToDrops(d),p=y(f,e,u);o.Fee=c.default.min(p,l).toString(10)}))))}(),function(){return a(this,void 0,void 0,(function*(){if(void 0!==r.sequence)return void 0===o.Sequence||r.sequence===o.Sequence?(o.Sequence=r.sequence,Promise.resolve()):Promise.reject(new f.ValidationError("`Sequence` in txJSON must match `sequence` in `instructions`"));if(void 0!==o.Sequence)return Promise.resolve();if(void 0!==r.ticketSequence)return o.Sequence=0,o.TicketSequence=r.ticketSequence,Promise.resolve();try{const e=yield t.request("account_info",{account:s});return o.Sequence=e.account_data.Sequence,Promise.resolve()}catch(e){return Promise.reject(e)}}))}()]).then((()=>function(e){const t={fee:h.dropsToXrp(e.Fee),maxLedgerVersion:void 0===e.LastLedgerSequence?null:e.LastLedgerSequence};return void 0!==e.TicketSequence?t.ticketSequence=e.TicketSequence:t.sequence=e.Sequence,{txJSON:JSON.stringify(e),instructions:t}}(o)))},t.convertStringToHex=b,t.convertMemo=function(e){return{Memo:h.removeUndefined({MemoData:e.data?b(e.data):void 0,MemoType:e.type?b(e.type):void 0,MemoFormat:e.format?b(e.format):void 0})}}},2190:e=>{e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e)throw new TypeError;if("function"!=typeof r)throw new TypeError;for(var i=[],o=0;o<e.length;o++)if(t.call(e,o)){var s=e[o];r.call(n,s,o,e)&&i.push(s)}return i};var t=Object.prototype.hasOwnProperty},9809:(e,t,r)=>{"use strict";const n=t;n.bignum=r(3550),n.define=r(2500).define,n.base=r(1979),n.constants=r(6826),n.decoders=r(8307),n.encoders=r(6579)},2500:(e,t,r)=>{"use strict";const n=r(6579),i=r(8307),o=r(5717);function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},s.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},s.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},6625:(e,t,r)=>{"use strict";const n=r(5717),i=r(8465).b,o=r(2399).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.C=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=a,a.isEncoderBuffer=function(e){return e instanceof a||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},1979:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(8465).b,n.DecoderBuffer=r(6625).C,n.EncoderBuffer=r(6625).R,n.Node=r(1949)},1949:(e,t,r)=>{"use strict";const n=r(8465).b,i=r(6625).R,o=r(6625).C,s=r(9746),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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};h.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(e,n,r.any),e.isError(s))return s}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(n)}}if(r.obj&&s&&(n=e.enterObject()),s){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&s&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),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},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const s=e.save(),a=r.choice[o];try{const r=a._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)s=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(s=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,a,r,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},8465:(e,t,r)=>{"use strict";const n=r(5717);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},160:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.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"},t.tagByName=r(t.tag)},6826:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(160)},1671:(e,t,r)=>{"use strict";const n=r(5717),i=r(3550),o=r(6625).C,s=r(1949),a=r(160);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function h(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}e.exports=u,u.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,s),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=h(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){const n=h(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=f(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const r=h(e,t);if(e.isError(r))return r;const n=f(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},c.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,s,a,u;if("gentime"===t)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),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" 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),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const r=e.raw();let n=new i(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},8307:(e,t,r)=>{"use strict";const n=t;n.der=r(1671),n.pem=r(9631)},9631:(e,t,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1671);function s(e){o.call(this,e),this.enc="pem"}n(s,o),e.exports=s,s.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let e=0;e<r.length;e++){const t=r[e].match(s);if(null!==t&&t[2]===n){if(-1!==a){if("END"!==t[1])break;u=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);const c=r.slice(a+1,u).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const h=i.from(c,"base64");return o.prototype.decode.call(this,h,t)}},6984:(e,t,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1949),s=r(160);function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let a=1;for(let e=n.length;e>=256;e>>=8)a++;const u=i.alloc(2+a);u[0]=o,u[1]=128|a;for(let e=1+a,t=n.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},6579:(e,t,r)=>{"use strict";const n=t;n.der=r(6984),n.pem=r(2883)},2883:(e,t,r)=>{"use strict";const n=r(5717),i=r(6984);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},9282:(e,t,r)=>{"use strict";var n=r(4155);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,s,a=r(2136).codes,u=a.ERR_AMBIGUOUS_ARGUMENT,c=a.ERR_INVALID_ARG_TYPE,h=a.ERR_INVALID_ARG_VALUE,f=a.ERR_INVALID_RETURN_VALUE,d=a.ERR_MISSING_ARGS,l=r(5961),p=r(9539).inspect,m=r(9539).types,y=m.isPromise,g=m.isRegExp,b=Object.assign?Object.assign:r(8091).assign,v=Object.is?Object.is:r(609);function w(){var e=r(9158);o=e.isDeepEqual,s=e.isDeepStrictEqual}new Map;var _=!1,M=e.exports=O,S={};function A(e){if(e.message instanceof Error)throw e.message;throw new l(e)}function E(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new l({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function O(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];E.apply(void 0,[O,t.length].concat(t))}M.fail=function e(t,r,i,o,s){var a,u=arguments.length;if(0===u)a="Failed";else if(1===u)i=t,t=void 0;else{if(!1===_){_=!0;var c=n.emitWarning?n.emitWarning:console.warn.bind(console);c("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===u&&(o="!=")}if(i instanceof Error)throw i;var h={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:s||e};void 0!==i&&(h.message=i);var f=new l(h);throw a&&(f.message=a,f.generatedMessage=!0),f},M.AssertionError=l,M.ok=O,M.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&A({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},M.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&A({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},M.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),o(t,r)||A({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},M.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),o(t,r)&&A({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},M.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),s(t,r)||A({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},M.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),s(t,r)&&A({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},M.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");v(t,r)||A({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},M.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");v(t,r)&&A({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var P=function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&g(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])}))};function x(e,t,r,n,i,o){if(!(r in e)||!s(e[r],t[r])){if(!n){var a=new P(e,i),u=new P(t,i,e),c=new l({actual:a,expected:u,operator:"deepStrictEqual",stackStartFn:o});throw c.actual=e,c.expected=t,c.operator=o.name,c}A({actual:e,expected:t,message:n,operator:o.name,stackStartFn:o})}}function T(e,t,r,n){if("function"!=typeof t){if(g(t))return t.test(e);if(2===arguments.length)throw new c("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var s=new l({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw s.operator=n.name,s}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===o&&w(),a.forEach((function(i){"string"==typeof e[i]&&g(t[i])&&t[i].test(e[i])||x(e,t,i,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function j(e){if("function"!=typeof e)throw new c("fn","Function",e);try{e()}catch(e){return e}return S}function k(e){return y(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function I(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!k(t=e()))throw new f("instance of Promise","promiseFn",t)}else{if(!k(e))throw new c("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return S})).catch((function(e){return e}))}))}function R(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new u("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new u("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(t===S){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var s="rejects"===e.name?"rejection":"exception";A({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(s).concat(o),stackStartFn:e})}if(r&&!T(t,r,n,e))throw t}function B(e,t,r,n){if(t!==S){if("string"==typeof r&&(n=r,r=void 0),!r||T(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";A({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function N(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];E.apply(void 0,[N,t.length].concat(t))}M.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];R.apply(void 0,[e,j(t)].concat(n))},M.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return I(t).then((function(t){return R.apply(void 0,[e,t].concat(n))}))},M.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];B.apply(void 0,[e,j(t)].concat(n))},M.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return I(t).then((function(t){return B.apply(void 0,[e,t].concat(n))}))},M.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=p(t);var n=new l({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var s=o.split("\n");s.shift();for(var a=n.stack.split("\n"),u=0;u<s.length;u++){var c=a.indexOf(s[u]);if(-1!==c){a=a.slice(0,c);break}}n.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw n}},M.strict=b(N,M,{equal:M.strictEqual,deepEqual:M.deepStrictEqual,notEqual:M.notStrictEqual,notDeepEqual:M.notDeepStrictEqual}),M.strict.strict=M.strict},5961:(e,t,r)=>{"use strict";var n=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return h(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e,t,r){return(h=c()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&f(i,r.prototype),i}).apply(null,arguments)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var p=r(9539).inspect,m=r(2136).codes.ERR_INVALID_ARG_TYPE;function y(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",b="",v="",w="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function M(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function S(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var A=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==l(e)||null===e)throw new m("options","Object",e);var i=e.message,o=e.operator,u=e.stackStartFn,c=e.actual,h=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=s(this,d(t).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(g="",b="",w="",v=""):(g="",b="",w="",v="")),"object"===l(c)&&null!==c&&"object"===l(h)&&null!==h&&"stack"in c&&c instanceof Error&&"stack"in h&&h instanceof Error&&(c=M(c),h=M(h)),"deepStrictEqual"===o||"strictEqual"===o)r=s(this,d(t).call(this,function(e,t,r){var i="",o="",s=0,a="",u=!1,c=S(e),h=c.split("\n"),f=S(t).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===l(e)&&"object"===l(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===h.length&&1===f.length&&h[0]!==f[0]){var m=h[0].length+f[0].length;if(m<=10){if(!("object"===l(e)&&null!==e||"object"===l(t)&&null!==t||0===e&&0===t))return"".concat(_[r],"\n\n")+"".concat(h[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&m<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;h[0][d]===f[0][d];)d++;d>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}for(var M=h[h.length-1],A=f[f.length-1];M===A&&(d++<2?a="\n ".concat(M).concat(a):i=M,h.pop(),f.pop(),0!==h.length&&0!==f.length);)M=h[h.length-1],A=f[f.length-1];var E=Math.max(h.length,f.length);if(0===E){var O=c.split("\n");if(O.length>30)for(O[26]="".concat(g,"...").concat(w);O.length>27;)O.pop();return"".concat(_.notIdentical,"\n\n").concat(O.join("\n"),"\n")}d>3&&(a="\n".concat(g,"...").concat(w).concat(a),u=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var P=0,x=_[r]+"\n".concat(b,"+ actual").concat(w," ").concat(v,"- expected").concat(w),T=" ".concat(g,"...").concat(w," Lines skipped");for(d=0;d<E;d++){var j=d-s;if(h.length<d+1)j>1&&d>2&&(j>4?(o+="\n".concat(g,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(f[d-2]),P++),o+="\n ".concat(f[d-1]),P++),s=d,i+="\n".concat(v,"-").concat(w," ").concat(f[d]),P++;else if(f.length<d+1)j>1&&d>2&&(j>4?(o+="\n".concat(g,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(h[d-2]),P++),o+="\n ".concat(h[d-1]),P++),s=d,o+="\n".concat(b,"+").concat(w," ").concat(h[d]),P++;else{var k=f[d],I=h[d],R=I!==k&&(!y(I,",")||I.slice(0,-1)!==k);R&&y(k,",")&&k.slice(0,-1)===I&&(R=!1,I+=","),R?(j>1&&d>2&&(j>4?(o+="\n".concat(g,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(h[d-2]),P++),o+="\n ".concat(h[d-1]),P++),s=d,o+="\n".concat(b,"+").concat(w," ").concat(I),i+="\n".concat(v,"-").concat(w," ").concat(k),P+=2):(o+=i,i="",1!==j&&0!==d||(o+="\n ".concat(I),P++))}if(P>20&&d<E-2)return"".concat(x).concat(T,"\n").concat(o,"\n").concat(g,"...").concat(w).concat(i,"\n")+"".concat(g,"...").concat(w)}return"".concat(x).concat(u?T:"","\n").concat(o).concat(i).concat(a).concat(p)}(c,h,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=_[o],A=S(c).split("\n");if("notStrictEqual"===o&&"object"===l(c)&&null!==c&&(p=_.notStrictEqualObject),A.length>30)for(A[26]="".concat(g,"...").concat(w);A.length>27;)A.pop();r=1===A.length?s(this,d(t).call(this,"".concat(p," ").concat(A[0]))):s(this,d(t).call(this,"".concat(p,"\n\n").concat(A.join("\n"),"\n")))}else{var E=S(c),O="",P=_[o];"notDeepEqual"===o||"notEqual"===o?(E="".concat(_[o],"\n\n").concat(E)).length>1024&&(E="".concat(E.slice(0,1021),"...")):(O="".concat(S(h)),E.length>512&&(E="".concat(E.slice(0,509),"...")),O.length>512&&(O="".concat(O.slice(0,509),"...")),"deepEqual"===o||"equal"===o?E="".concat(P,"\n\n").concat(E,"\n\nshould equal\n\n"):O=" ".concat(o," ").concat(O)),r=s(this,d(t).call(this,"".concat(E).concat(O)))}return Error.stackTraceLimit=f,r.generatedMessage=!i,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=h,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(a(r),u),r.stack,r.name="AssertionError",s(r)}var r,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),r=t,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}])&&o(r.prototype,u),t}(u(Error));e.exports=A},2136:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s,a,u={};function c(e,t,r){r||(r=Error);var s=function(r){function s(r,o,a){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(u=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,i(s).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,o,a)))).code=e,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,r),s}(r);u[e]=s}function h(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,u,c,f;if(void 0===s&&(s=r(9282)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))u="The ".concat(e," ").concat(o," ").concat(h(t,"type"));else{var d=("number"!=typeof f&&(f=0),f+".".length>(c=e).length||-1===c.indexOf(".",f)?"argument":"property");u='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(h(t,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(9539));var i=a.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===s&&(s=r(9282)),s(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=u},9158:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},u=Object.is?Object.is:r(609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},h=Number.isNaN?Number.isNaN:r(360);function f(e){return e.call.bind(e)}var d=f(Object.prototype.hasOwnProperty),l=f(Object.prototype.propertyIsEnumerable),p=f(Object.prototype.toString),m=r(9539).types,y=m.isAnyArrayBuffer,g=m.isArrayBufferView,b=m.isDate,v=m.isMap,w=m.isRegExp,_=m.isSet,M=m.isNativeError,S=m.isBoxedPrimitive,A=m.isNumberObject,E=m.isStringObject,O=m.isBooleanObject,P=m.isBigIntObject,x=m.isSymbolObject,T=m.isFloat32Array,j=m.isFloat64Array;function k(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(k).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function B(e,t,r,n){if(e===t)return 0!==e||!r||u(e,t);if(r){if("object"!==i(e))return"number"==typeof e&&h(e)&&h(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var s,a,c,f,d=p(e);if(d!==p(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var l=I(e),m=I(t);return l.length===m.length&&C(e,t,r,n,1,l)}if("[object Object]"===d&&(!v(e)&&v(t)||!_(e)&&_(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(w(e)){if(!w(t)||(c=e,f=t,!(o?c.source===f.source&&c.flags===f.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(f))))return!1}else if(M(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(g(e)){if(r||!T(e)&&!j(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===R(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var k=I(e),B=I(t);return k.length===B.length&&C(e,t,r,n,0,k)}if(_(e))return!(!_(t)||e.size!==t.size)&&C(e,t,r,n,2);if(v(e))return!(!v(t)||e.size!==t.size)&&C(e,t,r,n,3);if(y(e)){if(a=t,(s=e).byteLength!==a.byteLength||0!==R(new Uint8Array(s),new Uint8Array(a)))return!1}else if(S(e)&&!function(e,t){return A(e)?A(t)&&u(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):E(e)?E(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):O(e)?O(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):P(e)?P(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):x(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return C(e,t,r,n,0)}function N(e,t){return t.filter((function(t){return l(e,t)}))}function C(e,t,r,n,i,o){if(5===arguments.length){o=Object.keys(e);var s=Object.keys(t);if(o.length!==s.length)return!1}for(var a=0;a<o.length;a++)if(!d(t,o[a]))return!1;if(r&&5===arguments.length){var u=c(e);if(0!==u.length){var h=0;for(a=0;a<u.length;a++){var f=u[a];if(l(e,f)){if(!l(t,f))return!1;o.push(f),h++}else if(l(t,f))return!1}var p=c(t);if(u.length!==p.length&&N(t,p).length!==h)return!1}else{var m=c(t);if(0!==m.length&&0!==N(t,m).length)return!1}}if(0===o.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var y=n.val1.get(e);if(void 0!==y){var g=n.val2.get(t);if(void 0!==g)return y===g}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=z(e,t,r,o,n,i);return n.val1.delete(e),n.val2.delete(t),b}function L(e,t,r,n){for(var i=s(e),o=0;o<i.length;o++){var a=i[o];if(B(t,a,r,n))return e.delete(a),!0}return!1}function D(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(h(e))return!1}return!0}function F(e,t,r){var n=D(r);return null!=n?n:t.has(n)&&!e.has(n)}function q(e,t,r,n,i){var o=D(r);if(null!=o)return o;var s=t.get(o);return!(void 0===s&&!t.has(o)||!B(n,s,!1,i))&&!e.has(o)&&B(n,s,!1,i)}function U(e,t,r,n,i,o){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(B(r,c,i,o)&&B(n,t.get(c),i,o))return e.delete(c),!0}return!1}function z(e,t,r,o,u,c){var h=0;if(2===c){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!F(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var h=s(t),f=0;f<h.length;f++){var d=h[f];if("object"===i(d)&&null!==d){if(!L(o,d,r,n))return!1}else if(!r&&!e.has(d)&&!L(o,d,r,n))return!1}return 0===o.size}return!0}(e,t,r,u))return!1}else if(3===c){if(!function(e,t,r,o){for(var s=null,u=a(e),c=0;c<u.length;c++){var h=n(u[c],2),f=h[0],d=h[1];if("object"===i(f)&&null!==f)null===s&&(s=new Set),s.add(f);else{var l=t.get(f);if(void 0===l&&!t.has(f)||!B(d,l,r,o)){if(r)return!1;if(!q(e,t,f,d,o))return!1;null===s&&(s=new Set),s.add(f)}}}if(null!==s){for(var p=a(t),m=0;m<p.length;m++){var y=n(p[m],2),g=(f=y[0],y[1]);if("object"===i(f)&&null!==f){if(!U(s,e,f,g,r,o))return!1}else if(!(r||e.has(f)&&B(e.get(f),g,!1,o)||U(s,e,f,g,!1,o)))return!1}return 0===s.size}return!0}(e,t,r,u))return!1}else if(1===c)for(;h<e.length;h++){if(!d(e,h)){if(d(t,h))return!1;for(var f=Object.keys(e);h<f.length;h++){var l=f[h];if(!d(t,l)||!B(e[l],t[l],r,u))return!1}return f.length===Object.keys(t).length}if(!d(t,h)||!B(e[h],t[h],r,u))return!1}for(h=0;h<o.length;h++){var p=o[h];if(!B(e[p],t[p],r,u))return!1}return!0}e.exports={isDeepEqual:function(e,t){return B(e,t,!1)},isDeepStrictEqual:function(e,t){return B(e,t,!0)}}},6314:(e,t,r)=>{"use strict";var n=r(2190);e.exports=function(){return n(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],(function(e){return"function"==typeof r.g[e]}))}},8162:(e,t,r)=>{"use strict";var n=r(9509).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==t[s])throw new TypeError(o+" is ambiguous");t[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return n.alloc(0);var r=0;if(" "!==e[r]){for(var i=0,o=0;e[r]===u;)i++,r++;for(var s=(e.length-r)*c+1>>>0,h=new Uint8Array(s);e[r];){var f=t[e.charCodeAt(r)];if(255===f)return;for(var d=0,l=s-1;(0!==f||d<o)&&-1!==l;l--,d++)f+=a*h[l]>>>0,h[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,r++}if(" "!==e[r]){for(var p=s-o;p!==s&&0===h[p];)p++;var m=n.allocUnsafe(i+(s-p));m.fill(0,0,i);for(var y=i;p!==s;)m[y++]=h[p++];return m}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,r++;for(var c=(s-o)*h+1>>>0,f=new Uint8Array(c);o!==s;){for(var d=t[o],l=0,p=c-1;(0!==d||l<i)&&-1!==p;p--,l++)d+=256*f[p]>>>0,f[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");i=l,o++}for(var m=c-i;m!==c&&0===f[m];)m++;for(var y=u.repeat(r);m<c;++m)y+=e.charAt(f[m]);return y},decodeUnsafe:f,decode:function(e){var t=f(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),h=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4736:(e,t,r)=>{var n;e=r.nmd(e);var i=function(e){"use strict";var t=1e7,r=9007199254740992,n=d(r),o="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function a(e,t,r,n){return void 0===e?a[0]:void 0===t||10==+t&&!r?Z(e):$(e,t,r,n)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function c(e){this.value=e,this.sign=e<0,this.isSmall=!0}function h(e){this.value=e}function f(e){return-r<e&&e<r}function d(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function l(e){p(e);var r=e.length;if(r<4&&j(e,n)<0)switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function p(e){for(var t=e.length;0===e[--t];);e.length=t+1}function m(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function y(e){return e>0?Math.floor(e):Math.ceil(e)}function g(e,r){var n,i,o=e.length,s=r.length,a=new Array(o),u=0,c=t;for(i=0;i<s;i++)u=(n=e[i]+r[i]+u)>=c?1:0,a[i]=n-u*c;for(;i<o;)u=(n=e[i]+u)===c?1:0,a[i++]=n-u*c;return u>0&&a.push(u),a}function b(e,t){return e.length>=t.length?g(e,t):g(t,e)}function v(e,r){var n,i,o=e.length,s=new Array(o),a=t;for(i=0;i<o;i++)n=e[i]-a+r,r=Math.floor(n/a),s[i]=n-r*a,r+=1;for(;r>0;)s[i++]=r%a,r=Math.floor(r/a);return s}function w(e,r){var n,i,o=e.length,s=r.length,a=new Array(o),u=0,c=t;for(n=0;n<s;n++)(i=e[n]-u-r[n])<0?(i+=c,u=1):u=0,a[n]=i;for(n=s;n<o;n++){if(!((i=e[n]-u)<0)){a[n++]=i;break}i+=c,a[n]=i}for(;n<o;n++)a[n]=e[n];return p(a),a}function _(e,r,n){var i,o,s=e.length,a=new Array(s),h=-r,f=t;for(i=0;i<s;i++)o=e[i]+h,h=Math.floor(o/f),o%=f,a[i]=o<0?o+f:o;return"number"==typeof(a=l(a))?(n&&(a=-a),new c(a)):new u(a,n)}function M(e,r){var n,i,o,s,a=e.length,u=r.length,c=m(a+u),h=t;for(o=0;o<a;++o){s=e[o];for(var f=0;f<u;++f)n=s*r[f]+c[o+f],i=Math.floor(n/h),c[o+f]=n-i*h,c[o+f+1]+=i}return p(c),c}function S(e,r){var n,i,o=e.length,s=new Array(o),a=t,u=0;for(i=0;i<o;i++)n=e[i]*r+u,u=Math.floor(n/a),s[i]=n-u*a;for(;u>0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function E(e,t){var r=Math.max(e.length,t.length);if(r<=30)return M(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),s=t.slice(0,r),a=E(i,s),u=E(n,o),c=E(b(i,n),b(s,o)),h=b(b(a,A(w(w(c,a),u),r)),A(u,2*r));return p(h),h}function O(e,r,n){return new u(e<t?S(r,e):M(r,d(e)),n)}function P(e){var r,n,i,o,s=e.length,a=m(s+s),u=t;for(i=0;i<s;i++){n=0-(o=e[i])*o;for(var c=i;c<s;c++)r=o*e[c]*2+a[i+c]+n,n=Math.floor(r/u),a[i+c]=r-n*u;a[i+s]=n}return p(a),a}function x(e,t){var r,n,i,o,s=e.length,a=m(s);for(i=0,r=s-1;r>=0;--r)i=(o=1e7*i+e[r])-(n=y(o/t))*t,a[r]=0|n;return[a,0|i]}function T(e,r){var n,i=Z(r);if(s)return[new h(e.value/i.value),new h(e.value%i.value)];var o,f=e.value,g=i.value;if(0===g)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new c(y(f/g)),new c(f%g)]:[a[0],e];if(i.isSmall){if(1===g)return[e,a[0]];if(-1==g)return[e.negate(),a[0]];var b=Math.abs(g);if(b<t){o=l((n=x(f,b))[0]);var v=n[1];return e.sign&&(v=-v),"number"==typeof o?(e.sign!==i.sign&&(o=-o),[new c(o),new c(v)]):[new u(o,e.sign!==i.sign),new c(v)]}g=d(b)}var _=j(f,g);if(-1===_)return[a[0],e];if(0===_)return[a[e.sign===i.sign?1:-1],a[0]];o=(n=f.length+g.length<=200?function(e,r){var n,i,o,s,a,u,c,h=e.length,f=r.length,d=t,p=m(r.length),y=r[f-1],g=Math.ceil(d/(2*y)),b=S(e,g),v=S(r,g);for(b.length<=h&&b.push(0),v.push(0),y=v[f-1],i=h-f;i>=0;i--){for(n=d-1,b[i+f]!==y&&(n=Math.floor((b[i+f]*d+b[i+f-1])/y)),o=0,s=0,u=v.length,a=0;a<u;a++)o+=n*v[a],c=Math.floor(o/d),s+=b[i+a]-(o-c*d),o=c,s<0?(b[i+a]=s+d,s=-1):(b[i+a]=s,s=0);for(;0!==s;){for(n-=1,o=0,a=0;a<u;a++)(o+=b[i+a]-d+v[a])<0?(b[i+a]=o+d,o=0):(b[i+a]=o,o=1);s+=o}p[i]=n}return b=x(b,g)[0],[l(p),l(b)]}(f,g):function(e,r){for(var n,i,o,s,a,u=e.length,c=r.length,h=[],f=[],d=t;u;)if(f.unshift(e[--u]),p(f),j(f,r)<0)h.push(0);else{o=f[(i=f.length)-1]*d+f[i-2],s=r[c-1]*d+r[c-2],i>c&&(o=(o+1)*d),n=Math.ceil(o/s);do{if(j(a=S(r,n),f)<=0)break;n--}while(n);h.push(n),f=w(f,a)}return h.reverse(),[l(h),l(f)]}(f,g))[0];var M=e.sign!==i.sign,A=n[1],E=e.sign;return"number"==typeof o?(M&&(o=-o),o=new c(o)):o=new u(o,M),"number"==typeof A?(E&&(A=-A),A=new c(A)):A=new u(A,E),[o,A]}function j(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function k(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function I(e,t){for(var r,n,o,s=e.prev(),a=s,u=0;a.isEven();)a=a.divide(2),u++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(o=i(t[n]).modPow(a,e)).isUnit()&&!o.equals(s)){for(r=u-1;0!=r;r--){if((o=o.square().mod(e)).isUnit())return!1;if(o.equals(s))continue e}return!1}return!0}u.prototype=Object.create(a.prototype),c.prototype=Object.create(a.prototype),h.prototype=Object.create(a.prototype),u.prototype.add=function(e){var t=Z(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new u(v(r,Math.abs(n)),this.sign):new u(b(r,n),this.sign)},u.prototype.plus=u.prototype.add,c.prototype.add=function(e){var t=Z(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(f(r+n))return new c(r+n);n=d(Math.abs(n))}return new u(v(n,Math.abs(r)),r<0)},c.prototype.plus=c.prototype.add,h.prototype.add=function(e){return new h(this.value+Z(e).value)},h.prototype.plus=h.prototype.add,u.prototype.subtract=function(e){var t=Z(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?_(r,Math.abs(n),this.sign):function(e,t,r){var n;return j(e,t)>=0?n=w(e,t):(n=w(t,e),r=!r),"number"==typeof(n=l(n))?(r&&(n=-n),new c(n)):new u(n,r)}(r,n,this.sign)},u.prototype.minus=u.prototype.subtract,c.prototype.subtract=function(e){var t=Z(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new c(r-n):_(n,Math.abs(r),r>=0)},c.prototype.minus=c.prototype.subtract,h.prototype.subtract=function(e){return new h(this.value-Z(e).value)},h.prototype.minus=h.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},c.prototype.negate=function(){var e=this.sign,t=new c(-this.value);return t.sign=!e,t},h.prototype.negate=function(){return new h(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},h.prototype.abs=function(){return new h(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(e){var r,n,i,o=Z(e),s=this.value,c=o.value,h=this.sign!==o.sign;if(o.isSmall){if(0===c)return a[0];if(1===c)return this;if(-1===c)return this.negate();if((r=Math.abs(c))<t)return new u(S(s,r),h);c=d(r)}return new u(-.012*(n=s.length)-.012*(i=c.length)+15e-6*n*i>0?E(s,c):M(s,c),h)},u.prototype.times=u.prototype.multiply,c.prototype._multiplyBySmall=function(e){return f(e.value*this.value)?new c(e.value*this.value):O(Math.abs(e.value),d(Math.abs(this.value)),this.sign!==e.sign)},u.prototype._multiplyBySmall=function(e){return 0===e.value?a[0]:1===e.value?this:-1===e.value?this.negate():O(Math.abs(e.value),this.value,this.sign!==e.sign)},c.prototype.multiply=function(e){return Z(e)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,h.prototype.multiply=function(e){return new h(this.value*Z(e).value)},h.prototype.times=h.prototype.multiply,u.prototype.square=function(){return new u(P(this.value),!1)},c.prototype.square=function(){var e=this.value*this.value;return f(e)?new c(e):new u(P(d(Math.abs(this.value))),!1)},h.prototype.square=function(e){return new h(this.value*this.value)},u.prototype.divmod=function(e){var t=T(this,e);return{quotient:t[0],remainder:t[1]}},h.prototype.divmod=c.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(e){return T(this,e)[0]},h.prototype.over=h.prototype.divide=function(e){return new h(this.value/Z(e).value)},c.prototype.over=c.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(e){return T(this,e)[1]},h.prototype.mod=h.prototype.remainder=function(e){return new h(this.value%Z(e).value)},c.prototype.remainder=c.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(e){var t,r,n,i=Z(e),o=this.value,s=i.value;if(0===s)return a[1];if(0===o)return a[0];if(1===o)return a[1];if(-1===o)return i.isEven()?a[1]:a[-1];if(i.sign)return a[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&f(t=Math.pow(o,s)))return new c(y(t));for(r=this,n=a[1];!0&s&&(n=n.times(r),--s),0!==s;)s/=2,r=r.square();return n},c.prototype.pow=u.prototype.pow,h.prototype.pow=function(e){var t=Z(e),r=this.value,n=t.value,i=BigInt(0),o=BigInt(1),s=BigInt(2);if(n===i)return a[1];if(r===i)return a[0];if(r===o)return a[1];if(r===BigInt(-1))return t.isEven()?a[1]:a[-1];if(t.isNegative())return new h(i);for(var u=this,c=a[1];(n&o)===o&&(c=c.times(u),--n),n!==i;)n/=s,u=u.square();return c},u.prototype.modPow=function(e,t){if(e=Z(e),(t=Z(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=a[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(a[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return a[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},h.prototype.modPow=c.prototype.modPow=u.prototype.modPow,u.prototype.compareAbs=function(e){var t=Z(e),r=this.value,n=t.value;return t.isSmall?1:j(r,n)},c.prototype.compareAbs=function(e){var t=Z(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},h.prototype.compareAbs=function(e){var t=this.value,r=Z(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=Z(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:j(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,c.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=Z(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},c.prototype.compareTo=c.prototype.compare,h.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=Z(e).value;return t===r?0:t>r?1:-1},h.prototype.compareTo=h.prototype.compare,u.prototype.equals=function(e){return 0===this.compare(e)},h.prototype.eq=h.prototype.equals=c.prototype.eq=c.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return 0!==this.compare(e)},h.prototype.neq=h.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},h.prototype.gt=h.prototype.greater=c.prototype.gt=c.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return this.compare(e)<0},h.prototype.lt=h.prototype.lesser=c.prototype.lt=c.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},h.prototype.geq=h.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},h.prototype.leq=h.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return 0==(1&this.value[0])},c.prototype.isEven=function(){return 0==(1&this.value)},h.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return 1==(1&this.value[0])},c.prototype.isOdd=function(){return 1==(1&this.value)},h.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},h.prototype.isPositive=c.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},h.prototype.isNegative=c.prototype.isNegative,u.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return 1===Math.abs(this.value)},h.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return 0===this.value},h.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(e){var t=Z(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},h.prototype.isDivisibleBy=c.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(t){var r=k(this);if(r!==e)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return I(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var s=Math.log(2)*o.toJSNumber(),a=Math.ceil(!0===t?2*Math.pow(s,2):s),u=[],c=0;c<a;c++)u.push(i(c+2));return I(n,u)},h.prototype.isPrime=c.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(t,r){var n=k(this);if(n!==e)return n;for(var o=this.abs(),s=t===e?5:t,a=[],u=0;u<s;u++)a.push(i.randBetween(2,o.minus(2),r));return I(o,a)},h.prototype.isProbablePrime=c.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(e){for(var t,r,n,o=i.zero,s=i.one,a=Z(e),u=this.abs();!u.isZero();)t=a.divide(u),r=o,n=a,o=s,a=u,s=r.subtract(t.multiply(s)),u=n.subtract(t.multiply(u));if(!a.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(e)),this.isNegative()?o.negate():o},h.prototype.modInv=c.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var e=this.value;return this.sign?_(e,1,this.sign):new u(v(e,1),this.sign)},c.prototype.next=function(){var e=this.value;return e+1<r?new c(e+1):new u(n,!1)},h.prototype.next=function(){return new h(this.value+BigInt(1))},u.prototype.prev=function(){var e=this.value;return this.sign?new u(v(e,1),!0):_(e,1,this.sign)},c.prototype.prev=function(){var e=this.value;return e-1>-r?new c(e-1):new u(n,!0)},h.prototype.prev=function(){return new h(this.value-BigInt(1))};for(var R=[1];2*R[R.length-1]<=t;)R.push(2*R[R.length-1]);var B=R.length,N=R[B-1];function C(e){return Math.abs(e)<=t}function L(e,t,r){t=Z(t);for(var n=e.isNegative(),o=t.isNegative(),s=n?e.not():e,a=o?t.not():t,u=0,c=0,h=null,f=null,d=[];!s.isZero()||!a.isZero();)u=(h=T(s,N))[1].toJSNumber(),n&&(u=N-1-u),c=(f=T(a,N))[1].toJSNumber(),o&&(c=N-1-c),s=h[0],a=f[0],d.push(r(u,c));for(var l=0!==r(n?1:0,o?1:0)?i(-1):i(0),p=d.length-1;p>=0;p-=1)l=l.multiply(N).add(i(d[p]));return l}u.prototype.shiftLeft=function(e){var t=Z(e).toJSNumber();if(!C(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=B;)r=r.multiply(N),t-=B-1;return r.multiply(R[t])},h.prototype.shiftLeft=c.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t,r=Z(e).toJSNumber();if(!C(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=B;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=T(n,N))[1].isNegative()?t[0].prev():t[0],r-=B-1}return(t=T(n,R[r]))[1].isNegative()?t[0].prev():t[0]},h.prototype.shiftRight=c.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},h.prototype.not=c.prototype.not=u.prototype.not,u.prototype.and=function(e){return L(this,e,(function(e,t){return e&t}))},h.prototype.and=c.prototype.and=u.prototype.and,u.prototype.or=function(e){return L(this,e,(function(e,t){return e|t}))},h.prototype.or=c.prototype.or=u.prototype.or,u.prototype.xor=function(e){return L(this,e,(function(e,t){return e^t}))},h.prototype.xor=c.prototype.xor=u.prototype.xor;var D=1<<30;function F(e){var r=e.value,n="number"==typeof r?r|D:"bigint"==typeof r?r|BigInt(D):r[0]+r[1]*t|1073758208;return n&-n}function q(e,t){if(t.compareTo(e)<=0){var r=q(e,t.square(t)),n=r.p,o=r.e,s=n.multiply(t);return s.compareTo(e)<=0?{p:s,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function U(e,t){return e=Z(e),t=Z(t),e.greater(t)?e:t}function z(e,t){return e=Z(e),t=Z(t),e.lesser(t)?e:t}function V(e,t){if(e=Z(e).abs(),t=Z(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=a[1];e.isEven()&&t.isEven();)r=z(F(e),F(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(F(e));do{for(;t.isEven();)t=t.divide(F(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}u.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(q(e,i(2)).e).add(i(1))},h.prototype.bitLength=c.prototype.bitLength=u.prototype.bitLength;var $=function(e,t,r,n){r=r||o,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,s=e.length,a=Math.abs(t),u={};for(i=0;i<r.length;i++)u[r[i]]=i;for(i=0;i<s;i++)if("-"!==(f=e[i])&&f in u&&u[f]>=a){if("1"===f&&1===a)continue;throw new Error(f+" is not a valid digit in base "+t+".")}t=Z(t);var c=[],h="-"===e[0];for(i=h?1:0;i<e.length;i++){var f;if((f=e[i])in u)c.push(Z(u[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");var d=i;do{i++}while(">"!==e[i]&&i<e.length);c.push(Z(e.slice(d+1,i)))}}return H(c,t,h)};function H(e,t,r){var n,i=a[0],o=a[1];for(n=e.length-1;n>=0;n--)i=i.add(e[n].times(o)),o=o.times(t);return r?i.negate():i}function X(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,s=[],a=e;a.isNegative()||a.compareAbs(t)>=0;){o=a.divmod(t),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=t.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:n}}function J(e,t,r){var n=X(e,t);return(n.isNegative?"-":"")+n.value.map((function(e){return function(e,t){return e<(t=t||o).length?t[e]:"<"+e+">"}(e,r)})).join("")}function K(e){if(f(+e)){var t=+e;if(t===y(t))return s?new h(BigInt(t)):new c(t);throw new Error("Invalid integer: "+e)}var r="-"===e[0];r&&(e=e.slice(1));var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==y(i)||!f(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],a=o.indexOf(".");if(a>=0&&(i-=o.length-a-1,o=o.slice(0,a)+o.slice(a+1)),i<0)throw new Error("Cannot include negative exponent part for integers");e=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(s)return new h(BigInt(r?"-"+e:e));for(var d=[],l=e.length,m=l-7;l>0;)d.push(+e.slice(m,l)),(m-=7)<0&&(m=0),l-=7;return p(d),new u(d,r)}function Z(e){return"number"==typeof e?function(e){if(s)return new h(BigInt(e));if(f(e)){if(e!==y(e))throw new Error(e+" is not an integer.");return new c(e)}return K(e.toString())}(e):"string"==typeof e?K(e):"bigint"==typeof e?new h(e):e}u.prototype.toArray=function(e){return X(this,e)},c.prototype.toArray=function(e){return X(this,e)},h.prototype.toArray=function(e){return X(this,e)},u.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t)return J(this,t,r);for(var n,i=this.value,o=i.length,s=String(i[--o]);--o>=0;)n=String(i[o]),s+="0000000".slice(n.length)+n;return(this.sign?"-":"")+s},c.prototype.toString=function(t,r){return t===e&&(t=10),10!=t?J(this,t,r):String(this.value)},h.prototype.toString=c.prototype.toString,h.prototype.toJSON=u.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,h.prototype.valueOf=h.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var G=0;G<1e3;G++)a[G]=Z(G),G>0&&(a[-G]=Z(-G));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=U,a.min=z,a.gcd=V,a.lcm=function(e,t){return e=Z(e).abs(),t=Z(t).abs(),e.divide(V(e,t)).multiply(t)},a.isInstance=function(e){return e instanceof u||e instanceof c||e instanceof h},a.randBetween=function(e,r,n){e=Z(e),r=Z(r);var i=n||Math.random,o=z(e,r),s=U(e,r).subtract(o).add(1);if(s.isSmall)return o.add(Math.floor(i()*s));for(var u=X(s,t).value,c=[],h=!0,f=0;f<u.length;f++){var d=h?u[f]:t,l=y(i()*d);c.push(l),l<d&&(h=!1)}return o.add(a.fromArray(c,t,!1))},a.fromArray=function(e,t,r){return H(e.map(Z),Z(t||10),r)},a}();e.hasOwnProperty("exports")&&(e.exports=i),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},4431:function(e,t,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c="[BigNumber Error] ",h=c+"Number primitive has more than 15 significant digits: ",f=1e14,d=14,l=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,y=1e9;function g(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=d-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function v(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return g(e.e/d)==t&&e.c[t]%2!=0}function M(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var r,n,i,o,A,E,O,P,x,T,j=V.prototype={constructor:V,toString:null,valueOf:null},k=new V(1),I=20,R=4,B=-7,N=21,C=-1e7,L=1e7,D=!1,F=1,q=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz";function V(e,t){var r,o,a,c,f,p,m,y,g=this;if(!(g instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>L?g.c=g.e=null:e.e<C?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>L?g.c=g.e=null:(g.e=c,g.c=[e]))}y=String(e)}else{if(!s.test(y=String(e)))return i(g,y,p);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(c=y.indexOf("."))>-1&&(y=y.replace(".","")),(f=y.search(/e/i))>0?(c<0&&(c=f),c+=+y.slice(f+1),y=y.substring(0,f)):c<0&&(c=y.length)}else{if(w(t,2,z.length,"Base"),10==t)return J(g=new V(e),I+g.e+1,R);if(y=String(e),p="number"==typeof e){if(0*e!=0)return i(g,y,p,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,V.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=z.slice(0,t),c=f=0,m=y.length;f<m;f++)if(r.indexOf(o=y.charAt(f))<0){if("."==o){if(f>c){c=m;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,f=-1,c=0;continue}return i(g,String(e),p,t)}p=!1,(c=(y=n(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):c=y.length}for(f=0;48===y.charCodeAt(f);f++);for(m=y.length;48===y.charCodeAt(--m););if(y=y.slice(f,++m)){if(m-=f,p&&V.DEBUG&&m>15&&(e>l||e!==u(e)))throw Error(h+g.s*e);if((c=c-f-1)>L)g.c=g.e=null;else if(c<C)g.c=[g.e=0];else{if(g.e=c,g.c=[],f=(c+1)%d,c<0&&(f+=d),f<m){for(f&&g.c.push(+y.slice(0,f)),m-=d;f<m;)g.c.push(+y.slice(f,f+=d));f=d-(y=y.slice(f)).length}else f-=m;for(;f--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function $(e,t,r,n){var i,o,s,a,u;if(null==r?r=R:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=b(e.c),u=1==n||2==n&&(s<=B||s>=N)?M(u,s):S(u,s,"0");else if(o=(e=J(new V(e),t,r)).e,a=(u=b(e.c)).length,1==n||2==n&&(t<=o||o<=B)){for(;a<t;u+="0",a++);u=M(u,o)}else if(t-=s,u=S(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function H(e,t){for(var r,n=1,i=new V(e[0]);n<e.length;n++){if(!(r=new V(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function X(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*d-1)>L?e.c=e.e=null:r<C?e.c=[e.e=0]:(e.e=r,e.c=t),e}function J(e,t,r,n){var i,o,s,c,h,l,m,y=e.c,g=p;if(y){e:{for(i=1,c=y[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=d,s=t,m=(h=y[l=0])/g[i-s-1]%10|0;else if((l=a((o+1)/d))>=y.length){if(!n)break e;for(;y.length<=l;y.push(0));h=m=0,i=1,s=(o%=d)-d+1}else{for(h=c=y[l],i=1;c>=10;c/=10,i++);m=(s=(o%=d)-d+i)<0?0:h/g[i-s-1]%10|0}if(n=n||t<0||null!=y[l+1]||(s<0?h:h%g[i-s-1]),n=r<4?(m||n)&&(0==r||r==(e.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?s>0?h/g[i-s]:0:y[l-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=g[(d-t%d)%d],e.e=-t||0):y[0]=e.e=0,e;if(0==o?(y.length=l,c=1,l--):(y.length=l+1,c=g[d-o],y[l]=s>0?u(h/g[i-s]%g[s])*c:0),n)for(;;){if(0==l){for(o=1,s=y[0];s>=10;s/=10,o++);for(s=y[0]+=c,c=1;s>=10;s/=10,c++);o!=c&&(e.e++,y[0]==f&&(y[0]=1));break}if(y[l]+=c,y[l]!=f)break;y[l--]=0,c=1}for(o=y.length;0===y[--o];y.pop());}e.e>L?e.c=e.e=null:e.e<C&&(e.c=[e.e=0])}return e}function K(e){var t,r=e.e;return null===r?e.toString():(t=b(e.c),t=r<=B||r>=N?M(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),R=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),B=r[0],N=r[1]):(w(r,-y,y,t),B=-(N=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),C=r[0],L=r[1];else{if(w(r,-y,y,t),!r)throw Error(c+t+" cannot be zero: "+r);C=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!r,Error(c+"crypto unavailable");D=r}else D=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),q=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);U=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);z=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:R,EXPONENTIAL_AT:[B,N],RANGE:[C,L],CRYPTO:D,MODULO_MODE:F,POW_PRECISION:q,FORMAT:U,ALPHABET:z}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-y&&i<=y&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=f||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,j.lt)},V.minimum=V.min=function(){return H(arguments,j.gt)},V.random=(o=9007199254740992,A=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,s=0,h=[],f=new V(k);if(null==e?e=I:w(e,0,y),i=a(e/d),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(o=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(h.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(o=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(h.push(o%1e14),s+=7);s=i/7}if(!D)for(;s<i;)(o=A())<9e15&&(h[s++]=o%1e14);for(i=h[--s],e%=d,i&&e&&(o=p[d-e],h[s]=u(i/o)*o);0===h[s];h.pop(),s--);if(s<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=d);for(s=1,o=h[0];o>=10;o/=10,s++);s<d&&(n-=d-s)}return f.e=n,f.c=h,f}),V.sum=function(){for(var e=1,t=arguments,r=new V(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,h,f,d,l,p,m,y=n.indexOf("."),g=I,v=R;for(y>=0&&(f=q,q=0,n=n.replace(".",""),l=(m=new V(i)).pow(n.length-y),q=f,m.c=t(S(b(l.c),l.e,"0"),10,o,e),m.e=m.c.length),h=f=(p=t(n,i,o,a?(u=z,e):(u=e,z))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(y<0?--h:(l.c=p,l.e=h,l.s=s,p=(l=r(l,m,g,v,o)).c,d=l.r,h=l.e),y=p[c=h+g+1],f=o/2,d=d||c<0||null!=p[c+1],d=v<4?(null!=y||d)&&(0==v||v==(l.s<0?3:2)):y>f||y==f&&(4==v||d||6==v&&1&p[c-1]||v==(l.s<0?8:7)),c<1||!p[0])n=d?S(u.charAt(1),-g,u.charAt(0)):u.charAt(0);else{if(p.length=c,d)for(--o;++p[--c]>o;)p[c]=0,c||(++h,p=[1].concat(p));for(f=p.length;!p[--f];);for(y=0,n="";y<=f;n+=u.charAt(p[y++]));n=S(n,h,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%m,h=t/m|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%m)+(n=h*o+(s=e[u]/m|0)*c)%m*m+a)/r|0)+(n/m|0)+h*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,h,l,p,m,y,b,v,w,_,M,S,A,E,O,P,x,T=n.s==i.s?1:-1,j=n.c,k=i.c;if(!(j&&j[0]&&k&&k[0]))return new V(n.s&&i.s&&(j?!k||j[0]!=k[0]:k)?j&&0==j[0]||!k?0*T:T/0:NaN);for(w=(v=new V(T)).c=[],T=o+(h=n.e-i.e)+1,a||(a=f,h=g(n.e/d)-g(i.e/d),T=T/d|0),l=0;k[l]==(j[l]||0);l++);if(k[l]>(j[l]||0)&&h--,T<0)w.push(1),p=!0;else{for(E=j.length,P=k.length,l=0,T+=2,(m=u(a/(k[0]+1)))>1&&(k=e(k,m,a),j=e(j,m,a),P=k.length,E=j.length),A=P,M=(_=j.slice(0,P)).length;M<P;_[M++]=0);x=k.slice(),x=[0].concat(x),O=k[0],k[1]>=a/2&&O++;do{if(m=0,(c=t(k,_,P,M))<0){if(S=_[0],P!=M&&(S=S*a+(_[1]||0)),(m=u(S/O))>1)for(m>=a&&(m=a-1),b=(y=e(k,m,a)).length,M=_.length;1==t(y,_,b,M);)m--,r(y,P<b?x:k,b,a),b=y.length,c=1;else 0==m&&(c=m=1),b=(y=k.slice()).length;if(b<M&&(y=[0].concat(y)),r(_,y,M,a),M=_.length,-1==c)for(;t(k,_,P,M)<1;)m++,r(_,P<M?x:k,M,a),M=_.length}else 0===c&&(m++,_=[0]);w[l++]=m,_[0]?_[M++]=j[A]||0:(_=[j[A]],M=1)}while((A++<E||null!=_[0])&&T--);p=null!=_[0],w[0]||w.splice(0,1)}if(a==f){for(l=1,T=w[0];T>=10;T/=10,l++);J(v,o+(v.e=l+h*d-1)+1,s,p)}else v.e=h,v.r=+p;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,P=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(T,"");if(x.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(O,"$1").replace(P,"0.$1")),t!=o))return new V(o,i);if(V.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},j.absoluteValue=j.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return v(this,new V(e,t))},j.decimalPlaces=j.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,y),null==t?t=R:w(t,0,8),J(new V(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-g(this.e/d))*d,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},j.dividedBy=j.div=function(e,t){return r(this,new V(e,t),I,R)},j.dividedToIntegerBy=j.idiv=function(e,t){return r(this,new V(e,t),0,1)},j.exponentiatedBy=j.pow=function(e,t){var r,n,i,o,s,h,f,l,p=this;if((e=new V(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new V(t)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return l=new V(Math.pow(+K(p),s?2-_(e):+K(e))),t?l.mod(t):l;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return o=p.s<0&&_(e)?-0:0,p.e>-1&&(o=1/o),new V(h?1/o:o);q&&(o=a(q/d+2))}for(s?(r=new V(.5),h&&(e.s=1),f=_(e)):f=(i=Math.abs(+K(e)))%2,l=new V(k);;){if(f){if(!(l=l.times(p)).c)break;o?l.c.length>o&&(l.c.length=o):n&&(l=l.mod(t))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(J(e=e.times(r),e.e+1,1),e.e>14)f=_(e);else{if(0==(i=+K(e)))break;f=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?l:(h&&(l=k.div(l)),t?l.mod(t):o?J(l,q,R,void 0):l)},j.integerValue=function(e){var t=new V(this);return null==e?e=R:w(e,0,8),J(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===v(this,new V(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return v(this,new V(e,t))>0},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=v(this,new V(e,t)))||0===t},j.isInteger=function(){return!!this.c&&g(this.e/d)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return v(this,new V(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=v(this,new V(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return this.s>0},j.isZero=function(){return!!this.c&&0==this.c[0]},j.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new V(e,t)).s,!a||!t)return new V(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/d,c=e.e/d,h=s.c,l=e.c;if(!u||!c){if(!h||!l)return h?(e.s=-t,e):new V(l?s:NaN);if(!h[0]||!l[0])return l[0]?(e.s=-t,e):new V(h[0]?s:3==R?-0:0)}if(u=g(u),c=g(c),h=h.slice(),a=u-c){for((o=a<0)?(a=-a,i=h):(c=u,i=l),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=h.length)<(t=l.length))?a:t,a=t=0;t<n;t++)if(h[t]!=l[t]){o=h[t]<l[t];break}if(o&&(i=h,h=l,l=i,e.s=-e.s),(t=(n=l.length)-(r=h.length))>0)for(;t--;h[r++]=0);for(t=f-1;n>a;){if(h[--n]<l[n]){for(r=n;r&&!h[--r];h[r]=t);--h[r],h[n]+=f}h[n]-=l[n]}for(;0==h[0];h.splice(0,1),--c);return h[0]?X(e,h,c):(e.s=3==R?-1:1,e.c=[e.e=0],e)},j.modulo=j.mod=function(e,t){var n,i,o=this;return e=new V(e,t),!o.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||o.c&&!o.c[0]?new V(o):(9==F?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,F),(e=o.minus(n.times(e))).c[0]||1!=F||(e.s=o.s),e)},j.multipliedBy=j.times=function(e,t){var r,n,i,o,s,a,u,c,h,l,p,y,b,v,w,_=this,M=_.c,S=(e=new V(e,t)).c;if(!(M&&S&&M[0]&&S[0]))return!_.s||!e.s||M&&!M[0]&&!S||S&&!S[0]&&!M?e.c=e.e=e.s=null:(e.s*=_.s,M&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=g(_.e/d)+g(e.e/d),e.s*=_.s,(u=M.length)<(l=S.length)&&(b=M,M=S,S=b,i=u,u=l,l=i),i=u+l,b=[];i--;b.push(0));for(v=f,w=m,i=l;--i>=0;){for(r=0,p=S[i]%w,y=S[i]/w|0,o=i+(s=u);o>i;)r=((c=p*(c=M[--s]%w)+(a=y*c+(h=M[s]/w|0)*p)%w*w+b[o]+r)/v|0)+(a/w|0)+y*h,b[o--]=c%v;b[o]=r}return r?++n:b.splice(0,1),X(e,b,n)},j.negated=function(){var e=new V(this);return e.s=-e.s||null,e},j.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/d,s=e.e/d,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new V(i/0);if(!a[0]||!u[0])return u[0]?e:new V(a[0]?n:0*i)}if(o=g(o),s=g(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/f|0,a[t]=f===a[t]?0:a[t]%f;return i&&(a=[i].concat(a),++s),X(e,a,s)},j.precision=j.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=R:w(t,0,8),J(new V(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*d+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},j.shiftedBy=function(e){return w(e,-9007199254740991,l),this.times("1e"+e)},j.squareRoot=j.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,h=I+4,f=new V("0.5");if(1!==u||!a||!a[0])return new V(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+K(s)))||u==1/0?(((t=b(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=g((c+1)/2)-(c<0||c%2),n=new V(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new V(u+""),n.c[0])for((u=(c=n.e)+h)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(s,o,h,1))),b(o.c).slice(0,u)===(t=b(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(J(n,n.e+I+2,1),e=!n.times(n).eq(s));break}if(!i&&(J(o,o.e+I+2,0),o.times(o).eq(s))){n=o;break}h+=4,u+=4,i=1}return J(n,n.e+I+1,R,e)},j.toExponential=function(e,t){return null!=e&&(w(e,0,y),e++),$(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(w(e,0,y),e=e+this.e+1),$(this,e,t)},j.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=U;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,h=r.groupSeparator||"",f=s[0],d=s[1],l=i.s<0,p=l?f.slice(1):f,m=p.length;if(u&&(o=a,a=u,u=o,m-=o),a>0&&m>0){for(o=m%a||a,f=p.substr(0,o);o<m;o+=a)f+=h+p.substr(o,a);u>0&&(f+=h+p.slice(o)),l&&(f="-"+f)}n=d?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):f}return(r.prefix||"")+n+(r.suffix||"")},j.toFraction=function(e){var t,n,i,o,s,a,u,h,f,l,m,y,g=this,v=g.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!v)return new V(g);for(t=new V(k),f=n=new V(k),i=h=new V(k),y=b(v),s=t.e=y.length-g.e-1,t.c[0]=p[(a=s%d)<0?d+a:a],e=!e||u.comparedTo(t)>0?s>0?t:f:u,a=L,L=1/0,u=new V(y),h.c[0]=0;l=r(u,t,0,1),1!=(o=n.plus(l.times(i))).comparedTo(e);)n=i,i=o,f=h.plus(l.times(o=f)),h=o,t=u.minus(l.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),h=h.plus(o.times(f)),n=n.plus(o.times(i)),h.s=f.s=g.s,m=r(f,i,s*=2,R).minus(g).abs().comparedTo(r(h,n,s,R).minus(g).abs())<1?[f,i]:[h,n],L=a,m},j.toNumber=function(){return+K(this)},j.toPrecision=function(e,t){return null!=e&&w(e,1,y),$(this,e,t,2)},j.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=B||o>=N?M(b(r.c),o):S(b(r.c),o,"0"):10===e?t=S(b((r=J(new V(r),I+o+1,R)).c),r.e,"0"):(w(e,2,z.length,"Base"),t=n(S(b(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},j.valueOf=j.toJSON=function(){return K(this)},j._isBigNumber=!0,null!=t&&V.set(t),V}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},3550:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(2574).Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o<i;o++){var s=e.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[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<e.length;i+=3)s=e[i]|e[i+1]<<8|e[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(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=e.length-6,n=0;r>=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,h=r;h<a;h+=n)c=u(e,h,h+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var f=1;for(c=u(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var 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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var h=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;h+=(s=(i=0|e.words[p])*(o=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],l=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,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,u="le"===t,c=new e(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;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(e){return this.clone().isub(e)};var l=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,m=l>>>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,A=M>>>13,E=0|s[5],O=8191&E,P=E>>>13,x=0|s[6],T=8191&x,j=x>>>13,k=0|s[7],I=8191&k,R=k>>>13,B=0|s[8],N=8191&B,C=B>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],J=8191&X,K=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],fe=8191&he,de=he>>>13,le=0|a[9],pe=8191&le,me=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(F,J)|0,o=Math.imul(F,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Te=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var ke=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=Pe,u[12]=xe,u[13]=Te,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(l=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?l(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,f=(0|e.words[h])*(0|t.words[c]),d=67108863&f;a=67108863&(d=d+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>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,e,t):p(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,d=c,l=0;l<s;l++){var p=r[h+l],m=n[h+l],y=r[h+l+s],g=n[h+l+s],b=f*y-d*g;g=f*g+d*y,y=b,r[h+l]=p+y,n[h+l]=m+g,r[h+l+s]=p-y,n[h+l+s]=m-g,l!==a&&(b=u*f-c*d,d=u*d+c*f,f=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,h,f,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*f[l];u[l]=a[l]*f[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),p(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/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(e,t){var r=(this.length,e.length),n=this.clone(),i=e,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,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),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()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(b,g),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,g),i(w,g),i(_,g),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=y}return d},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},9931:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3906);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},4497:(e,t,r)=>{var n=r(9509).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,r,n,i){for(var o,s,a,u,c=r[0],h=r[1],f=r[2],d=r[3],l=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],y=e[3]^t[3],g=4,b=1;b<i;b++)o=c[l>>>24]^h[p>>>16&255]^f[m>>>8&255]^d[255&y]^t[g++],s=c[p>>>24]^h[m>>>16&255]^f[y>>>8&255]^d[255&l]^t[g++],a=c[m>>>24]^h[y>>>16&255]^f[l>>>8&255]^d[255&p]^t[g++],u=c[y>>>24]^h[l>>>16&255]^f[p>>>8&255]^d[255&m]^t[g++],l=o,p=s,m=a,y=u;return o=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^t[g++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&l])^t[g++],a=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^t[g++],u=(n[y>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[g++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var h=e[s],f=e[h],d=e[f],l=257*e[c]^16843008*c;i[0][s]=l<<24|l>>>8,i[1][s]=l<<16|l>>>16,i[2][s]=l<<8|l>>>24,i[3][s]=l,l=16843009*d^65537*f^257*h^16843008*s,o[0][c]=l<<24|l>>>8,o[1][c]=l<<16|l>>>16,o[2][c]=l<<8|l>>>24,o[3][c]=l,0===s?s=a=1:(s=h^e[e[e[d^h]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var s=i[o-1];o%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var c=[],h=0;h<n;h++){var f=n-h,d=i[f-(h%4?0:4)];c[h]=h<4||f<=4?d:u.INV_SUB_MIX[0][u.SBOX[d>>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.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},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},4848:(e,t,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027),s=r(5717),a=r(3288),u=r(7295),c=r(685);function h(e,t,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var h=this._cipher.encryptBlock(u);this._ghash=new a(h),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new a(r),o=t.length,s=o%16;n.update(t),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,h=i.alloc(8);h.writeUIntBE(u,0,8),n.update(h),e._finID=n.state;var f=i.from(e._finID);return c(f),f}(this,r,h),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=e,this._authTag=null,this._called=!1}s(h,o),h.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},h.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=h},4696:(e,t,r)=>{var n=r(1494),i=r(6193),o=r(5415);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},6193:(e,t,r)=>{var n=r(4848),i=r(9509).Buffer,o=r(45),s=r(5969),a=r(1027),u=r(4497),c=r(3048);function h(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var a=o[e.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 t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new h(a.module,t,r)}r(5717)(h,a),h.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=i.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},1494:(e,t,r)=>{var n=r(45),i=r(4848),o=r(9509).Buffer,s=r(5969),a=r(1027),u=r(4497),c=r(3048);function h(e,t,r){a.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(5717)(h,a),h.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function l(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.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,t,r):"auth"===a.type?new i(a.module,t,r):new h(a.module,t,r)}h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=l,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return l(e,i.key,i.iv)}},3288:(e,t,r)=>{var n=r(9509).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(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=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},685:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},5292:(e,t,r)=>{var n=r(7295);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},6311:(e,t,r)=>{var n=r(9509).Buffer,i=r(7295);function o(e,t,r){var o=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:s]),s}t.encrypt=function(e,t,r){for(var i,s=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){s=n.concat([s,o(e,t,r)]);break}i=e._cache.length,s=n.concat([s,o(e,t.slice(0,i),r)]),t=t.slice(i)}return s}},1510:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t,r){for(var n,i,s=-1,a=0;++s<8;)n=t&1<<7-s?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},1964:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},6009:(e,t,r)=>{var n=r(7295),i=r(9509).Buffer,o=r(685);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(e),c=o+16*a;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var h=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,h)}},1084:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},45:(e,t,r)=>{var n={ECB:r(1084),CBC:r(5292),CFB:r(6311),CFB8:r(1964),CFB1:r(1510),OFB:r(8861),CTR:r(6009),GCM:r(6009)},i=r(5415);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},5415:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},8861:(e,t,r)=>{var n=r(8764).Buffer,i=r(7295);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},5969:(e,t,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027);function s(e,t,r,s){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}r(5717)(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},3614:(e,t,r)=>{var n=r(7667),i=r(4696),o=r(45),s=r(9715),a=r(3048);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},7667:(e,t,r)=>{var n=r(1027),i=r(5251),o=r(5717),s=r(9509).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 u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},9715:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},3663:(e,t,r)=>{var n=r(8764).Buffer,i=r(3982),o=r(1798);function s(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=s(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),a=new i(e).mul(r.blinder).umod(t.modulus),u=a.toRed(i.mont(t.prime1)),c=a.toRed(i.mont(t.prime2)),h=t.coefficient,f=t.prime1,d=t.prime2,l=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=l.isub(p).imul(h).umod(f).imul(d);return p.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}a.getr=s,e.exports=a},3982:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(2574).Buffer}catch(e){}function a(e,t,r){for(var i=0,o=Math.min(e.length,r),s=0,a=t;a<o;a++){var u,c=e.charCodeAt(a)-48;i<<=4,i|=u=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,s|=u}return n(!(240&s),"Invalid character in "+e),i}function u(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[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<e.length;i+=3)s=e[i]|e[i+1]<<8|e[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(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=e.length-6,n=0;r>=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,h=r;h<a;h+=n)c=u(e,h,h+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var f=1;for(c=u(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){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"],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],l=[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 p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var h=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;h+=(s=(i=0|e.words[p])*(o=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,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(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;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(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,m=l>>>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,A=M>>>13,E=0|s[5],O=8191&E,P=E>>>13,x=0|s[6],T=8191&x,j=x>>>13,k=0|s[7],I=8191&k,R=k>>>13,B=0|s[8],N=8191&B,C=B>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],J=8191&X,K=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],fe=8191&he,de=he>>>13,le=0|a[9],pe=8191&le,me=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(F,J)|0,o=Math.imul(F,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Te=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var ke=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=Pe,u[12]=xe,u[13]=Te,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,f=(0|e.words[h])*(0|t.words[c]),d=67108863&f;a=67108863&(d=d+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>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 g(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,d=c,l=0;l<s;l++){var p=r[h+l],m=n[h+l],y=r[h+l+s],g=n[h+l+s],b=f*y-d*g;g=f*g+d*y,y=b,r[h+l]=p+y,n[h+l]=m+g,r[h+l+s]=p-y,n[h+l+s]=m-g,l!==a&&(b=u*f-c*d,d=u*d+c*f,f=b)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,h,f,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*f[l];u[l]=a[l]*f[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,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++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/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(e,t){var r=(this.length,e.length),n=this.clone(),i=e,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,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),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()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,w),i(S,w),i(A,w),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new M;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=y}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,E),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6042:(e,t,r)=>{e.exports=r(2063)},2063:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},2236:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},4743:(e,t,r)=>{var n=r(9509).Buffer,i=r(3482),o=r(8473),s=r(5717),a=r(2957),u=r(7753),c=r(2063);function h(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new h(e)}function l(e){return new f(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),s(h,o.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},s(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:l,createSign:d,createVerify:l}},2957:(e,t,r)=>{var n=r(9509).Buffer,i=r(8355),o=r(3663),s=r(6266).ec,a=r(8815),u=r(980),c=r(2236);function h(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var s=n.alloc(t.byteLength()-e.length);e=n.concat([s,e])}var a=r.length,u=function(e,t){e=(e=f(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),c=n.alloc(a);c.fill(1);var h=n.alloc(a);return h=i(o,h).update(c).update(n.from([0])).update(e).update(u).digest(),c=i(o,h).update(c).digest(),{k:h=i(o,h).update(c).update(n.from([1])).update(e).update(u).digest(),v:c=i(o,h).update(c).digest()}}function f(e,t){var r=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function d(e,t,r){var o,s;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);s=f(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function l(e,t,r,n){return e.toRed(a.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var m=u(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new s(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,o=t.params.priv_key,s=t.params.p,u=t.params.q,c=t.params.g,p=new a(0),m=f(e,u).mod(u),y=!1,g=h(o,u,e,r);!1===y;)p=l(c,i=d(u,g,r),s,u),0===(y=i.invm(u).imul(m.add(o.mul(p))).mod(u)).cmpn(0)&&(y=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,y)}(e,m,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var y=m.modulus.byteLength(),g=[0,1];e.length+g.length+1<y;)g.push(255);g.push(0);for(var b=-1;++b<e.length;)g.push(e[b]);return o(g,m)},e.exports.getKey=h,e.exports.makeKey=d},7753:(e,t,r)=>{var n=r(9509).Buffer,i=r(8815),o=r(6266).ec,s=r(980),a=r(2236);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,h){var f=s(r);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,a=r.data.g,c=r.data.pub_key,h=s.signature.decode(e,"der"),f=h.s,d=h.r;u(f,o),u(d,o);var l=i.mont(n),p=f.invm(o);return 0===a.toRed(l).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(l).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([h,t]);for(var d=f.modulus.byteLength(),l=[1],p=0;t.length+l.length+2<d;)l.push(255),p++;l.push(0);for(var m=-1;++m<t.length;)l.push(t[m]);l=n.from(l);var y=i.mont(f.modulus);e=(e=new i(e).toRed(y)).redPow(new i(f.publicExponent)),e=n.from(e.fromRed().toArray());var g=p<8?1:0;for(d=Math.min(e.length,l.length),e.length!==l.length&&(g=1),m=-1;++m<d;)g|=e[m]^l[m];return 0===g}},8815:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(2574).Buffer}catch(e){}function a(e,t,r){for(var i=0,o=Math.min(e.length,r),s=0,a=t;a<o;a++){var u,c=e.charCodeAt(a)-48;i<<=4,i|=u=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,s|=u}return n(!(240&s),"Invalid character in "+e),i}function u(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[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<e.length;i+=3)s=e[i]|e[i+1]<<8|e[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(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=e.length-6,n=0;r>=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,h=r;h<a;h+=n)c=u(e,h,h+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var f=1;for(c=u(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){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"],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],l=[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 p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var h=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;h+=(s=(i=0|e.words[p])*(o=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,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(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;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(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,m=l>>>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,A=M>>>13,E=0|s[5],O=8191&E,P=E>>>13,x=0|s[6],T=8191&x,j=x>>>13,k=0|s[7],I=8191&k,R=k>>>13,B=0|s[8],N=8191&B,C=B>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],J=8191&X,K=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],fe=8191&he,de=he>>>13,le=0|a[9],pe=8191&le,me=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(F,J)|0,o=Math.imul(F,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Te=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var ke=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=Pe,u[12]=xe,u[13]=Te,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,f=(0|e.words[h])*(0|t.words[c]),d=67108863&f;a=67108863&(d=d+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>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 g(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,d=c,l=0;l<s;l++){var p=r[h+l],m=n[h+l],y=r[h+l+s],g=n[h+l+s],b=f*y-d*g;g=f*g+d*y,y=b,r[h+l]=p+y,n[h+l]=m+g,r[h+l+s]=p-y,n[h+l+s]=m-g,l!==a&&(b=u*f-c*d,d=u*d+c*f,f=b)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,h,f,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*f[l];u[l]=a[l]*f[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,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++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/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(e,t){var r=(this.length,e.length),n=this.clone(),i=e,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,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),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()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,w),i(S,w),i(A,w),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new M;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=y}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,E),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7295:(e,t,r)=>{var n=r(8764).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||G(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return h(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:X(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),G(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(G(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return K(X(t,e.length-r),e,r,n)}function M(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return K(J(t),e,r,n)}function A(e,t,r,n){return K(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}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(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),h=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==h[e]){o=c[e],s=h[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return M(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function j(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=W[e[n]];return i}function k(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function N(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function C(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Y((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Y((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const F={};function q(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function X(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function G(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.defineProperty%",!0);if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(){return a(n,s,arguments)};var c=function(){return a(n,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c},1027:(e,t,r)=>{var n=r(9509).Buffer,i=r(2830).Transform,o=r(2553).s;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(5717)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},6393:(e,t,r)=>{var n=r(8764).Buffer,i=r(6266),o=r(3550);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),u(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,e)},a.prototype.getPrivateKey=function(e){return u(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},3482:(e,t,r)=>{"use strict";var n=r(5717),i=r(2318),o=r(9785),s=r(9072),a=r(1027);function u(e){a.call(this,"digest"),this._hash=e}n(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},8028:(e,t,r)=>{var n=r(2318);e.exports=function(e){return(new n).update(e).digest()}},8355:(e,t,r)=>{"use strict";var n=r(5717),i=r(1031),o=r(1027),s=r(9509).Buffer,a=r(8028),u=r(9785),c=r(9072),h=s.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=s.concat([t,h],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new u:c(e),this._hash.update(n)}n(f,o),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(a,t):new f(e,t)}},1031:(e,t,r)=>{"use strict";var n=r(5717),i=r(9509).Buffer,o=r(1027),s=i.alloc(128),a=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=i.concat([t,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^t[u],n[u]=92^t[u];this._hash=[r]}n(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},5835:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(1798),t.createHash=t.Hash=r(3482),t.createHmac=t.Hmac=r(8355);var n=r(6042),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(5632);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(3614);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=r(2607);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(4743);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(6393);var h=r(7900);t.publicEncrypt=h.publicEncrypt,t.privateEncrypt=h.privateEncrypt,t.publicDecrypt=h.publicDecrypt,t.privateDecrypt=h.privateDecrypt;var f=r(7963);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.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}},3776:function(e,t,r){var n;!function(i){"use strict";var o,s,a,u=9e15,c=1e9,h="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",d="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",l={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},p=!0,m="[DecimalError] ",y=m+"Invalid argument: ",g=m+"Precision limit exceeded",b=m+"crypto unavailable",v=Math.floor,w=Math.pow,_=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,M=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,S=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,A=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,E=1e7,O=f.length-1,P=d.length-1,x={name:"[object Decimal]"};function T(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=q(r)),o+=n;(r=7-(n=(s=e[t])+"").length)&&(o+=q(r))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function j(e,t,r){if(e!==~~e||e<t||e>r)throw Error(y+e)}function k(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=w(10,7-t),a=e[i]%o|0,null==n?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=r<4&&99999==a||r>3&&49999==a||5e4==a||0==a):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==w(10,t-2)-1||(a==o/2||0==a)&&0==(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(n||r<4)&&9999==a||!n&&r>3&&4999==a):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==w(10,t-3)-1,s}function I(e,t,r){for(var n,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=h.indexOf(e.charAt(s++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}x.absoluteValue=x.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),B(e)},x.ceil=function(){return B(new this.constructor(this),this.e+1,2)},x.comparedTo=x.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,c=e.s;if(!s||!a)return u&&c?u!==c?u:s===a?0:!s^u<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?u:a[0]?-c:0;if(u!==c)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,r=(n=s.length)<(i=a.length)?n:i;t<r;++t)if(s[t]!==a[t])return s[t]>a[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1},x.cosine=x.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i=t.d.length;i<32?n=(1/G(4,r=Math.ceil(i/3))).toString():(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=Z(e,1,t.times(n),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}(n,W(n,r)),n.precision=e,n.rounding=t,B(2==a||3==a?r.neg():r,e,t,!0)):new n(1):new n(NaN)},x.cubeRoot=x.cbrt=function(){var e,t,r,n,i,o,s,a,u,c,h=this,f=h.constructor;if(!h.isFinite()||h.isZero())return new f(h);for(p=!1,(o=h.s*w(h.s*h,1/3))&&Math.abs(o)!=1/0?n=new f(o.toString()):(r=T(h.d),(o=((e=h.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=w(r,1/3),e=v((e+1)/3)-(e%3==(e<0?-1:2)),(n=new f(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=h.s),s=(e=f.precision)+3;;)if(c=(u=(a=n).times(a).times(a)).plus(h),n=R(c.plus(h).times(a),c.plus(u),s+2,1),T(a.d).slice(0,s)===(r=T(n.d)).slice(0,s)){if("9999"!=(r=r.slice(s-3,s+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(B(n,e+1,1),t=!n.times(n).times(n).eq(h));break}if(!i&&(B(a,e+1,0),a.times(a).times(a).eq(h))){n=a;break}s+=4,i=1}return p=!0,B(n,e,f.rounding,t)},x.decimalPlaces=x.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-v(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},x.dividedBy=x.div=function(e){return R(this,new this.constructor(e))},x.dividedToIntegerBy=x.divToInt=function(e){var t=this.constructor;return B(R(this,new t(e),0,1,1),t.precision,t.rounding)},x.equals=x.eq=function(e){return 0===this.cmp(e)},x.floor=function(){return B(new this.constructor(this),this.e+1,3)},x.greaterThan=x.gt=function(e){return this.cmp(e)>0},x.greaterThanOrEqualTo=x.gte=function(e){var t=this.cmp(e);return 1==t||0===t},x.hyperbolicCosine=x.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/G(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Z(s,1,o.times(t),new s(1),!0);for(var u,c=e,h=new s(8);c--;)u=o.times(o),o=a.minus(u.times(h.minus(u.times(h))));return B(o,s.precision=r,s.rounding=n,!0)},x.hyperbolicSine=x.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=Z(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=Z(o,2,i=i.times(1/G(5,e)),i,!0);for(var s,a=new o(5),u=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(c))))}return o.precision=t,o.rounding=r,B(i,t,r,!0)},x.hyperbolicTangent=x.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,R(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},x.inverseCosine=x.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return-1!==n?0===n?t.isNeg()?D(r,i,o):new r(0):new r(NaN):t.isZero()?D(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=D(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))},x.inverseHyperbolicCosine=x.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,p=!1,r=r.times(r).minus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},x.inverseHyperbolicSine=x.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,p=!1,r=r.times(r).plus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln())},x.inverseHyperbolicTangent=x.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?B(new o(i),e,t,!0):(o.precision=r=n-i.e,i=R(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},x.inverseSine=x.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=D(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},x.inverseTangent=x.atan=function(){var e,t,r,n,i,o,s,a,u,c=this,h=c.constructor,f=h.precision,d=h.rounding;if(c.isFinite()){if(c.isZero())return new h(c);if(c.abs().eq(1)&&f+4<=P)return(s=D(h,f+4,d).times(.25)).s=c.s,s}else{if(!c.s)return new h(NaN);if(f+4<=P)return(s=D(h,f+4,d).times(.5)).s=c.s,s}for(h.precision=a=f+10,h.rounding=1,e=r=Math.min(28,a/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(a/7),n=1,u=c.times(c),s=new h(c),i=c;-1!==e;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),void 0!==(s=o.plus(i.div(n+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<<r-1)),p=!0,B(s,h.precision=f,h.rounding=d,!0)},x.isFinite=function(){return!!this.d},x.isInteger=x.isInt=function(){return!!this.d&&v(this.e/7)>this.d.length-2},x.isNaN=function(){return!this.s},x.isNegative=x.isNeg=function(){return this.s<0},x.isPositive=x.isPos=function(){return this.s>0},x.isZero=function(){return!!this.d&&0===this.d[0]},x.lessThan=x.lt=function(e){return this.cmp(e)<0},x.lessThanOrEqualTo=x.lte=function(e){return this.cmp(e)<1},x.logarithm=x.log=function(e){var t,r,n,i,o,s,a,u,c=this,h=c.constructor,f=h.precision,d=h.rounding;if(null==e)e=new h(10),t=!0;else{if(r=(e=new h(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new h(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new h(r&&!r[0]?-1/0:1!=c.s?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}if(p=!1,s=H(c,a=f+5),n=t?L(h,a+10):H(e,a),k((u=R(s,n,a,1)).d,i=f,d))do{if(s=H(c,a+=10),n=t?L(h,a+10):H(e,a),u=R(s,n,a,1),!o){+T(u.d).slice(i+1,i+15)+1==1e14&&(u=B(u,f+1,0));break}}while(k(u.d,i+=10,d));return p=!0,B(u,f,d)},x.minus=x.sub=function(e){var t,r,n,i,o,s,a,u,c,h,f,d,l=this,m=l.constructor;if(e=new m(e),!l.d||!e.d)return l.s&&e.s?l.d?e.s=-e.s:e=new m(e.d||l.s!==e.s?l:NaN):e=new m(NaN),e;if(l.s!=e.s)return e.s=-e.s,l.plus(e);if(c=l.d,d=e.d,a=m.precision,u=m.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(l)}return p?B(e,a,u):e}if(r=v(e.e/7),h=v(l.e/7),c=c.slice(),o=h-r){for((f=o<0)?(t=c,o=-o,s=d.length):(t=d,r=h,s=c.length),o>(n=Math.max(Math.ceil(a/7),s)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((f=(n=c.length)<(s=d.length))&&(s=n),n=0;n<s;n++)if(c[n]!=d[n]){f=c[n]<d[n];break}o=0}for(f&&(t=c,c=d,d=t,e.s=-e.s),s=c.length,n=d.length-s;n>0;--n)c[s++]=0;for(n=d.length;n>o;){if(c[--n]<d[n]){for(i=n;i&&0===c[--i];)c[i]=E-1;--c[i],c[n]+=E}c[n]-=d[n]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=C(c,r),p?B(e,a,u):e):new m(3===u?-0:0)},x.modulo=x.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?B(new n(r),n.precision,n.rounding):(p=!1,9==n.modulo?(t=R(r,e.abs(),0,3,1)).s*=e.s:t=R(r,e,0,n.modulo,1),t=t.times(e),p=!0,r.minus(t))},x.naturalExponential=x.exp=function(){return $(this)},x.naturalLogarithm=x.ln=function(){return H(this)},x.negated=x.neg=function(){var e=new this.constructor(this);return e.s=-e.s,B(e)},x.plus=x.add=function(e){var t,r,n,i,o,s,a,u,c,h,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,h=e.d,a=d.precision,u=d.rounding,!c[0]||!h[0])return h[0]||(e=new d(f)),p?B(e,a,u):e;if(o=v(f.e/7),n=v(e.e/7),c=c.slice(),i=o-n){for(i<0?(r=c,i=-i,s=h.length):(r=h,n=o,s=c.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=c.length)-(i=h.length)<0&&(i=s,r=h,h=c,c=r),t=0;i;)t=(c[--i]=c[i]+h[i]+t)/E|0,c[i]%=E;for(t&&(c.unshift(t),++n),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=C(c,n),p?B(e,a,u):e},x.precision=x.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(y+e);return r.d?(t=F(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},x.round=function(){var e=this,t=e.constructor;return B(new t(e),e.e+1,t.rounding)},x.sine=x.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return Z(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=Z(e,2,t=t.times(1/G(5,r)),t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(n,W(n,r)),n.precision=e,n.rounding=t,B(a>2?r.neg():r,e,t,!0)):new n(NaN)},x.squareRoot=x.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,c=s.s,h=s.constructor;if(1!==c||!a||!a[0])return new h(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);for(p=!1,0==(c=Math.sqrt(+s))||c==1/0?(((t=T(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=v((u+1)/2)-(u<0||u%2),n=new h(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new h(c.toString()),r=(u=h.precision)+3;;)if(n=(o=n).plus(R(s,o,r+2,1)).times(.5),T(o.d).slice(0,r)===(t=T(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(B(n,u+1,1),e=!n.times(n).eq(s));break}if(!i&&(B(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}return p=!0,B(n,u,h.rounding,e)},x.tangent=x.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=R(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,B(2==a||4==a?r.neg():r,e,t,!0)):new n(NaN)},x.times=x.mul=function(e){var t,r,n,i,o,s,a,u,c,h=this,f=h.constructor,d=h.d,l=(e=new f(e)).d;if(e.s*=h.s,!(d&&d[0]&&l&&l[0]))return new f(!e.s||d&&!d[0]&&!l||l&&!l[0]&&!d?NaN:d&&l?0*e.s:e.s/0);for(r=v(h.e/7)+v(e.e/7),(u=d.length)<(c=l.length)&&(o=d,d=l,l=o,s=u,u=c,c=s),o=[],n=s=u+c;n--;)o.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)a=o[i]+l[n]*d[i-n-1]+t,o[i--]=a%E|0,t=a/E|0;o[i]=(o[i]+t)%E|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=C(o,r),p?B(e,f.precision,f.rounding):e},x.toBinary=function(e,t){return Y(this,2,e,t)},x.toDecimalPlaces=x.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(j(e,0,c),void 0===t?t=n.rounding:j(t,0,8),B(r,e+r.e+1,t))},x.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=N(n,!0):(j(e,0,c),void 0===t?t=i.rounding:j(t,0,8),r=N(n=B(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},x.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?r=N(i):(j(e,0,c),void 0===t?t=o.rounding:j(t,0,8),r=N(n=B(new o(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},x.toFraction=function(e){var t,r,n,i,o,s,a,u,c,h,f,d,l=this,m=l.d,g=l.constructor;if(!m)return new g(l);if(c=r=new g(1),n=u=new g(0),s=(o=(t=new g(n)).e=F(m)-l.e-1)%7,t.d[0]=w(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(a=new g(e)).isInt()||a.lt(c))throw Error(y+a);e=a.gt(t)?o>0?t:c:a}for(p=!1,a=new g(T(m)),h=g.precision,g.precision=o=7*m.length*2;f=R(a,t,0,1,1),1!=(i=r.plus(f.times(n))).cmp(e);)r=n,n=i,i=c,c=u.plus(f.times(i)),u=i,i=t,t=a.minus(f.times(i)),a=i;return i=R(e.minus(r),n,0,1,1),u=u.plus(i.times(c)),r=r.plus(i.times(n)),u.s=c.s=l.s,d=R(c,n,o,1).minus(l).abs().cmp(R(u,r,o,1).minus(l).abs())<1?[c,n]:[u,r],g.precision=h,p=!0,d},x.toHexadecimal=x.toHex=function(e,t){return Y(this,16,e,t)},x.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:j(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(p=!1,r=R(r,e,0,t,1).times(e),p=!0,B(r)):(e.s=r.s,r=e),r},x.toNumber=function(){return+this},x.toOctal=function(e,t){return Y(this,8,e,t)},x.toPower=x.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,c=+(e=new u(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new u(w(+a,c));if((a=new u(a)).eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return B(a,n,o);if((t=v(e.e/7))>=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=U(u,a,r,n),e.s<0?new u(1).div(i):B(i,n,o);if((s=a.s)<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(r=w(+a,c))&&isFinite(r)?new u(r+"").e:v(c*(Math.log("0."+T(a.d))/Math.LN10+a.e+1)))>u.maxE+1||t<u.minE-1?new u(t>0?s/0:0):(p=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),(i=$(e.times(H(a,n+r)),n)).d&&k((i=B(i,n+5,1)).d,n,o)&&(t=n+10,+T((i=B($(e.times(H(a,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=B(i,n+1,0))),i.s=s,p=!0,u.rounding=o,B(i,n,o))},x.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=N(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(j(e,1,c),void 0===t?t=i.rounding:j(t,0,8),r=N(n=B(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},x.toSignificantDigits=x.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(j(e,1,c),void 0===t?t=r.rounding:j(t,0,8)),B(new r(this),e,t)},x.toString=function(){var e=this,t=e.constructor,r=N(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},x.truncated=x.trunc=function(){return B(new this.constructor(this),this.e+1,1)},x.valueOf=x.toJSON=function(){var e=this,t=e.constructor,r=N(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var R=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,u,c){var h,f,d,l,p,m,y,g,b,w,_,M,S,A,O,P,x,T,j,k,I=n.constructor,R=n.s==i.s?1:-1,N=n.d,C=i.d;if(!(N&&N[0]&&C&&C[0]))return new I(n.s&&i.s&&(N?!C||N[0]!=C[0]:C)?N&&0==N[0]||!C?0*R:R/0:NaN);for(c?(p=1,f=n.e-i.e):(c=E,p=7,f=v(n.e/p)-v(i.e/p)),j=C.length,x=N.length,w=(b=new I(R)).d=[],d=0;C[d]==(N[d]||0);d++);if(C[d]>(N[d]||0)&&f--,null==o?(A=o=I.precision,a=I.rounding):A=u?o+(n.e-i.e)+1:o,A<0)w.push(1),m=!0;else{if(A=A/p+2|0,d=0,1==j){for(l=0,C=C[0],A++;(d<x||l)&&A--;d++)O=l*c+(N[d]||0),w[d]=O/C|0,l=O%C|0;m=l||d<x}else{for((l=c/(C[0]+1)|0)>1&&(C=e(C,l,c),N=e(N,l,c),j=C.length,x=N.length),P=j,M=(_=N.slice(0,j)).length;M<j;)_[M++]=0;(k=C.slice()).unshift(0),T=C[0],C[1]>=c/2&&++T;do{l=0,(h=t(C,_,j,M))<0?(S=_[0],j!=M&&(S=S*c+(_[1]||0)),(l=S/T|0)>1?(l>=c&&(l=c-1),1==(h=t(y=e(C,l,c),_,g=y.length,M=_.length))&&(l--,r(y,j<g?k:C,g,c))):(0==l&&(h=l=1),y=C.slice()),(g=y.length)<M&&y.unshift(0),r(_,y,M,c),-1==h&&(h=t(C,_,j,M=_.length))<1&&(l++,r(_,j<M?k:C,M,c)),M=_.length):0===h&&(l++,_=[0]),w[d++]=l,h&&_[0]?_[M++]=N[P]||0:(_=[N[P]],M=1)}while((P++<x||void 0!==_[0])&&A--);m=void 0!==_[0]}w[0]||w.shift()}if(1==p)b.e=f,s=m;else{for(d=1,l=w[0];l>=10;l/=10)d++;b.e=d+f*p-1,B(b,u?o+b.e+1:o,a,m)}return b}}();function B(e,t,r,n){var i,o,s,a,u,c,h,f,d,l=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,a=f[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=7,s=t,u=(h=f[d=0])/w(10,i-s-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(a=f.length)){if(!n)break e;for(;a++<=d;)f.push(0);h=u=0,i=1,s=(o%=7)-7+1}else{for(h=a=f[d],i=1;a>=10;a/=10)i++;u=(s=(o%=7)-7+i)<0?0:h/w(10,i-s-1)%10|0}if(n=n||t<0||void 0!==f[d+1]||(s<0?h:h%w(10,i-s-1)),c=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?h/w(10,i-s):0:f[d-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=w(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,a=1,d--):(f.length=d+1,a=w(10,7-o),f[d]=s>0?(h/w(10,i-s)%w(10,s)|0)*a:0),c)for(;;){if(0==d){for(o=1,s=f[0];s>=10;s/=10)o++;for(s=f[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,f[0]==E&&(f[0]=1));break}if(f[d]+=a,f[d]!=E)break;f[d--]=0,a=1}for(o=f.length;0===f[--o];)f.pop()}return p&&(e.e>l.maxE?(e.d=null,e.e=NaN):e.e<l.minE&&(e.e=0,e.d=[0])),e}function N(e,t,r){if(!e.isFinite())return X(e);var n,i=e.e,o=T(e.d),s=o.length;return t?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+q(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+q(-i-1)+o,r&&(n=r-s)>0&&(o+=q(n))):i>=s?(o+=q(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+q(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=q(n))),o}function C(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function L(e,t,r){if(t>O)throw p=!0,r&&(e.precision=r),Error(g);return B(new e(f),t,1,!0)}function D(e,t,r){if(t>P)throw Error(g);return B(new e(d),t,r,!0)}function F(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function q(e){for(var t="";e--;)t+="0";return t}function U(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/7+4);for(p=!1;;){if(r%2&&Q((o=o.times(t)).d,s)&&(i=!0),0===(r=v(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}Q((t=t.times(t)).d,s)}return p=!0,o}function z(e){return 1&e.d[e.d.length-1]}function V(e,t,r){for(var n,i=new e(t[0]),o=0;++o<t.length;){if(!(n=new e(t[o])).s){i=n;break}i[r](n)&&(i=n)}return i}function $(e,t){var r,n,i,o,s,a,u,c=0,h=0,f=0,d=e.constructor,l=d.rounding,m=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(p=!1,u=m):u=t,a=new d(.03125);e.e>-2;)e=e.times(a),f+=5;for(u+=n=Math.log(w(2,f))/Math.LN10*2+5|0,r=o=s=new d(1),d.precision=u;;){if(o=B(o.times(e),u,1),r=r.times(++h),T((a=s.plus(R(o,r,u,1))).d).slice(0,u)===T(s.d).slice(0,u)){for(i=f;i--;)s=B(s.times(s),u,1);if(null!=t)return d.precision=m,s;if(!(c<3&&k(s.d,u-n,l,c)))return B(s,d.precision=m,l,p=!0);d.precision=u+=10,r=o=a=new d(1),h=0,c++}s=a}}function H(e,t){var r,n,i,o,s,a,u,c,h,f,d,l=1,m=e,y=m.d,g=m.constructor,b=g.rounding,v=g.precision;if(m.s<0||!y||!y[0]||!m.e&&1==y[0]&&1==y.length)return new g(y&&!y[0]?-1/0:1!=m.s?NaN:y?0:m);if(null==t?(p=!1,h=v):h=t,g.precision=h+=10,n=(r=T(y)).charAt(0),!(Math.abs(o=m.e)<15e14))return c=L(g,h+2,v).times(o+""),m=H(new g(n+"."+r.slice(1)),h-10).plus(c),g.precision=v,null==t?B(m,v,b,p=!0):m;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=T((m=m.times(e)).d)).charAt(0),l++;for(o=m.e,n>1?(m=new g("0."+r),o++):m=new g(n+"."+r.slice(1)),f=m,u=s=m=R(m.minus(1),m.plus(1),h,1),d=B(m.times(m),h,1),i=3;;){if(s=B(s.times(d),h,1),T((c=u.plus(R(s,new g(i),h,1))).d).slice(0,h)===T(u.d).slice(0,h)){if(u=u.times(2),0!==o&&(u=u.plus(L(g,h+2,v).times(o+""))),u=R(u,new g(l),h,1),null!=t)return g.precision=v,u;if(!k(u.d,h-10,b,a))return B(u,g.precision=v,b,p=!0);g.precision=h+=10,c=s=m=R(f.minus(1),f.plus(1),h,1),d=B(m.times(m),h,1),i=a=1}u=c,i+=2}}function X(e){return String(e.s*e.s/0)}function J(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function K(e,t){var r,n,i,s,a,u,c,h,f;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(M.test(t))r=16,t=t.toLowerCase();else if(_.test(t))r=2;else{if(!S.test(t))throw Error(y+t);r=8}for((s=t.search(/p/i))>0?(c=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),a=(s=t.indexOf("."))>=0,n=e.constructor,a&&(s=(u=(t=t.replace(".","")).length)-s,i=U(n,new n(r),s,2*s)),s=f=(h=I(t,r,E)).length-1;0===h[s];--s)h.pop();return s<0?new n(0*e.s):(e.e=C(h,f),e.d=h,p=!1,a&&(e=R(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?w(2,c):o.pow(2,c))),p=!0,e)}function Z(e,t,r,n,i){var o,s,a,u,c=e.precision,h=Math.ceil(c/7);for(p=!1,u=r.times(r),a=new e(n);;){if(s=R(a.times(u),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=R(s.times(u),new e(t++*t++),c,1),void 0!==(s=a.plus(n)).d[h]){for(o=h;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=n,n=s,s=o}return p=!0,s.d.length=h+1,s}function G(e,t){for(var r=e;--t;)r*=e;return r}function W(e,t){var r,n=t.s<0,i=D(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return a=n?4:1,t;if((r=t.divToInt(i)).isZero())a=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return a=z(r)?n?2:3:n?4:1,t;a=z(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Y(e,t,r,n){var i,o,a,u,f,d,l,p,m,y=e.constructor,g=void 0!==r;if(g?(j(r,1,c),void 0===n?n=y.rounding:j(n,0,8)):(r=y.precision,n=y.rounding),e.isFinite()){for(g?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(a=(l=N(e)).indexOf("."))>=0&&(l=l.replace(".",""),(m=new y(1)).e=l.length-a,m.d=I(N(m),10,i),m.e=m.d.length),o=f=(p=I(l,10,i)).length;0==p[--f];)p.pop();if(p[0]){if(a<0?o--:((e=new y(e)).d=p,e.e=o,p=(e=R(e,m,r,n,0,i)).d,o=e.e,d=s),a=p[r],u=i/2,d=d||void 0!==p[r+1],d=n<4?(void 0!==a||d)&&(0===n||n===(e.s<0?3:2)):a>u||a===u&&(4===n||d||6===n&&1&p[r-1]||n===(e.s<0?8:7)),p.length=r,d)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(f=p.length;!p[f-1];--f);for(a=0,l="";a<f;a++)l+=h.charAt(p[a]);if(g){if(f>1)if(16==t||8==t){for(a=16==t?4:3,--f;f%a;f++)l+="0";for(f=(p=I(l,i,t)).length;!p[f-1];--f);for(a=1,l="1.";a<f;a++)l+=h.charAt(p[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>f)for(o-=f;o--;)l+="0";else o<f&&(l=l.slice(0,o)+"."+l.slice(o))}else l=g?"0p+0":"0";l=(16==t?"0x":2==t?"0b":8==t?"0o":"")+l}else l=X(e);return e.s<0?"-"+l:l}function Q(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function re(e){return new this(e).acosh()}function ne(e,t){return new this(e).plus(t)}function ie(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function ae(e){return new this(e).atanh()}function ue(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?D(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=D(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(R(e,t,o,1)),t=D(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(R(e,t,o,1)):(r=D(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function ce(e){return new this(e).cbrt()}function he(e){return B(e=new this(e),e.e+1,2)}function fe(e){if(!e||"object"!=typeof e)throw Error(m+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,c,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=l[r]),void 0!==(n=e[r])){if(!(v(n)===n&&n>=o[t+1]&&n<=o[t+2]))throw Error(y+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=l[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(y+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(b);this[r]=!0}else this[r]=!1}return this}function de(e){return new this(e).cos()}function le(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function me(e){return new this(e).exp()}function ye(e){return B(e=new this(e),e.e+1,3)}function ge(){var e,t,r=new this(0);for(p=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return p=!0,new this(1/0);r=t}return p=!0,r.sqrt()}function be(e){return e instanceof o||e&&"[object Decimal]"===e.name||!1}function ve(e){return new this(e).ln()}function we(e,t){return new this(e).log(t)}function _e(e){return new this(e).log(2)}function Me(e){return new this(e).log(10)}function Se(){return V(this,arguments,"lt")}function Ae(){return V(this,arguments,"gt")}function Ee(e,t){return new this(e).mod(t)}function Oe(e,t){return new this(e).mul(t)}function Pe(e,t){return new this(e).pow(t)}function xe(e){var t,r,n,i,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:j(e,1,c),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(b);for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else for(;o<n;)a[o++]=1e7*Math.random()|0;for(e%=7,(n=a[--o])&&e&&(i=w(10,7-e),a[o]=(n/i|0)*i);0===a[o];o--)a.pop();if(o<0)r=0,a=[0];else{for(r=-1;0===a[0];r-=7)a.shift();for(n=1,i=a[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return s.e=r,s.d=a,s}function Te(e){return B(e=new this(e),e.e+1,this.rounding)}function je(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function ke(e){return new this(e).sin()}function Ie(e){return new this(e).sinh()}function Re(e){return new this(e).sqrt()}function Be(e,t){return new this(e).sub(t)}function Ne(e){return new this(e).tan()}function Ce(e){return new this(e).tanh()}function Le(e){return B(e=new this(e),e.e+1,1)}(o=function e(t){var r,n,i;function o(e){var t,r,n,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,e instanceof o)return i.s=e.s,void(p?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"==(n=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;return void(p?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):J(i,e.toString())}if("string"!==n)throw Error(y+e);return 45===(r=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===r&&(e=e.slice(1)),i.s=1),A.test(e)?J(i,e):K(i,e)}if(o.prototype=x,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=fe,o.clone=e,o.isDecimal=be,o.abs=ee,o.acos=te,o.acosh=re,o.add=ne,o.asin=ie,o.asinh=oe,o.atan=se,o.atanh=ae,o.atan2=ue,o.cbrt=ce,o.ceil=he,o.cos=de,o.cosh=le,o.div=pe,o.exp=me,o.floor=ye,o.hypot=ge,o.ln=ve,o.log=we,o.log10=Me,o.log2=_e,o.max=Se,o.min=Ae,o.mod=Ee,o.mul=Oe,o.pow=Pe,o.random=xe,o.round=Te,o.sign=je,o.sin=ke,o.sinh=Ie,o.sqrt=Re,o.sub=Be,o.tan=Ne,o.tanh=Ce,o.trunc=Le,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(l)).default=o.Decimal=o,f=new o(f),d=new o(d),void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},4289:(e,t,r)=>{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=a&&function(){var e={};try{for(var t in a(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},h=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a<o.length;a+=1)c(e,o[a],t[o[a]],r[o[a]])};h.supportsDescriptors=!!u,e.exports=h},5251:(e,t,r)=>{"use strict";t.utils=r(1278),t.Cipher=r(5756),t.DES=r(778),t.CBC=r(9051),t.EDE=r(8762)},9051:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,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]^=e[t+a];for(o._update.call(this,s,0,r,n),a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{for(o._update.call(this,e,t,r,n),a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},5756:(e,t,r)=>{"use strict";var n=r(9746);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.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},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},778:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(1278),s=r(5756);function a(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=c[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,e.keys,s)}},u.prototype._update=function(e,t,r,n){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+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)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var s=t,a=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],h=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var f=o.substitute(c,h),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var s=r,a=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],h=e.keys[u+1];o.expand(s,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var f=o.substitute(c,h),d=s;s=(a^o.permute(f))>>>0,a=d}o.rip(s,a,n,i)}},8762:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(5756),s=r(778);function a(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[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 u(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},1278:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,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|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var 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(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};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];t.pc2=function(e,t,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u<a;u++)o<<=1,o|=e>>>r[u]&1;for(u=a;u<r.length;u++)s<<=1,s|=t>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[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];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>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];t.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},2607:(e,t,r)=>{var n=r(8764).Buffer,i=r(3590),o=r(1930),s=r(7426),a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new s(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,u){return n.isBuffer(r)||void 0===a[r]?e(t,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof t?new s(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new s(t,o,!0)))}},7426:(e,t,r)=>{var n=r(8764).Buffer,i=r(3550),o=new(r(3047)),s=new i(24),a=new i(11),u=new i(10),c=new i(3),h=new i(7),f=r(3590),d=r(1798);function l(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=y;var m={};function y(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=p):this._primeCode=8}function g(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in m)return m[n];var i,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!o.test(e))return d+=1,d+="02"===r||"05"===r?8:4,m[n]=d,d;switch(o.test(e.shrn(1))||(d+=2),r){case"02":e.mod(s).cmp(a)&&(d+=8);break;case"05":(i=e.mod(u)).cmp(c)&&i.cmp(h)&&(d+=8);break;default:d+=4}return m[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.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(e){return g(this._pub,e)},y.prototype.getPrivateKey=function(e){return g(this._priv,e)},y.prototype.getPrime=function(e){return g(this.__prime,e)},y.prototype.getGenerator=function(e){return g(this._gen,e)},y.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new i(e),this}},3590:(e,t,r)=>{var n=r(1798);e.exports=b,b.simpleSieve=y,b.fermatTest=g;var i=r(3550),o=new i(24),s=new(r(3047)),a=new i(1),u=new i(2),c=new i(5),h=(new i(16),new i(8),new i(10)),f=new i(3),d=(new i(7),new i(11)),l=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function y(e){for(var t=m(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function g(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(h).cmp(f);)r.iadd(l)}else for(;r.mod(o).cmp(d);)r.iadd(l);if(y(p=r.shrn(1))&&y(r)&&g(p)&&g(r)&&s.test(p)&&s.test(r))return r}}},1930:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},6266:(e,t,r)=>{"use strict";var n=t;n.version=r(7519).i8,n.utils=r(953),n.rand=r(9931),n.curve=r(8254),n.curves=r(5427),n.ec=r(7954),n.eddsa=r(5980)},4918:(e,t,r)=>{"use strict";var n=r(3785),i=r(953),o=i.getNAF,s=i.getJSF,a=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<n.length;s+=r.step){u=0;for(var h=s+r.step-1;h>=s;h--)u=(u<<1)+n[h];c.push(u)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=i;l>0;l--){for(s=0;s<c.length;s++)(u=c[s])===l?d=d.mixedAdd(r.points[s]):u===-l&&(d=d.mixedAdd(r.points[s].neg()));f=f.add(d)}return f.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var h=0;c>=0&&0===s[c];c--)h++;if(c>=0&&h++,u=u.dblp(h),c<0)break;var f=s[c];a(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var a,u,c,h=this._wnafT1,f=this._wnafT2,d=this._wnafT3,l=0;for(a=0;a<n;a++){var p=(c=t[a])._getNAFPoints(e);h[a]=p.wnd,f[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,y=a;if(1===h[m]&&1===h[y]){var g=[t[m],null,null,t[y]];0===t[m].y.cmp(t[y].y)?(g[1]=t[m].add(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg())):0===t[m].y.cmp(t[y].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].add(t[y].neg())):(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[m],r[y]);for(l=Math.max(v[0].length,l),d[m]=new Array(l),d[y]=new Array(l),u=0;u<l;u++){var w=0|v[0][u],_=0|v[1][u];d[m][u]=b[3*(w+1)+(_+1)],d[y][u]=0,f[m]=g}}else d[m]=o(r[m],h[m],this._bitLength),d[y]=o(r[y],h[y],this._bitLength),l=Math.max(d[m].length,l),l=Math.max(d[y].length,l)}var M=this.jpoint(null,null,null),S=this._wnafT4;for(a=l;a>=0;a--){for(var A=0;a>=0;){var E=!0;for(u=0;u<n;u++)S[u]=0|d[u][a],0!==S[u]&&(E=!1);if(!E)break;A++,a--}if(a>=0&&A++,M=M.dblp(A),a<0)break;for(u=0;u<n;u++){var O=S[u];0!==O&&(O>0?c=f[u][O-1>>1]:O<0&&(c=f[u][-O-1>>1].neg()),M="affine"===c.type?M.mixedAdd(c):M.add(c))}}for(a=0;a<n;a++)f[a]=null;return i?M:M.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},1138:(e,t,r)=>{"use strict";var n=r(953),i=r(3785),o=r(5717),s=r(4918),a=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,s.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),u=i.redMul(s),c=o.redMul(a),h=i.redMul(a),f=s.redMul(o);return this.curve.point(u,c,f,h)},c.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=s.redSub(a).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(t),c=o.redMul(s),h=a.redMul(u),f=o.redMul(u),d=s.redMul(a);return this.curve.point(c,h,d,f)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),f=n.redMul(u).redMul(h);return this.curve.twisted?(t=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8254:(e,t,r)=>{"use strict";var n=t;n.base=r(4918),n.short=r(6673),n.mont=r(2881),n.edwards=r(1138)},2881:(e,t,r)=>{"use strict";var n=r(3785),i=r(5717),o=r(4918),s=r(953);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new u(this,e,t)},a.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,r)=>{"use strict";var n=r(953),i=r(3785),o=r(5717),s=r(4918),a=n.assert;function u(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,u,c,h,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new i(1),m=new i(0),y=new i(0),g=new i(1),b=0;0!==d.cmpn(0);){var v=l.div(d);c=l.sub(v.mul(d)),h=y.sub(v.mul(p));var w=g.sub(v.mul(m));if(!n&&c.cmp(f)<0)t=u.neg(),r=p,n=c.neg(),o=h;else if(n&&2==++b)break;u=c,l=d,d=c,y=p,p=h,g=m,m=w}s=c.neg(),a=h;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return c},o(c,s.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),h=c.redMul(a),f=n.redMul(c),d=u.redSqr().redIAdd(h).redISub(f).redISub(f),l=u.redMul(f.redISub(d)).redISub(o.redMul(h)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,l,p)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),h=r.redMul(u),f=a.redSqr().redIAdd(c).redISub(h).redISub(h),d=a.redMul(h.redISub(f)).redISub(i.redMul(c)),l=this.z.redMul(s);return this.curve.jpoint(f,d,l)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var h=o.redSqr(),f=c.redSqr(),d=f.redSqr(),l=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(u)),p=o.redMul(f),m=l.redSqr().redISub(p.redAdd(p)),y=p.redISub(m),g=l.redMul(y);g=g.redIAdd(g).redISub(d);var b=c.redMul(a);t+1<e&&(u=u.redMul(d)),o=m,a=b,c=g}return this.curve.jpoint(o,c.redMul(i),a)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),l=this.x.redAdd(f).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h),m=p.redSqr(),y=d.redIAdd(d);y=(y=y.redIAdd(y)).redIAdd(y),e=m.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},h.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),l=this.x.redSub(h).redMul(this.x.redAdd(h));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=l.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(h);var y=f.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=l.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},h.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(s),h=a.redSqr().redISub(c.redAdd(c)),f=c.redISub(h),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=a.redMul(f).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(h,l,p)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),h=t.redMul(c);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.x.redMul(a).redISub(h);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,d,l)},h.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},h.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(e,t,r)=>{"use strict";var n,i=t,o=r(3715),s=r(8254),a=r(953).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(1037)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},7954:(e,t,r)=>{"use strict";var n=r(3785),i=r(2156),o=r(953),s=r(5427),a=r(9931),u=o.assert,c=r(1251),h=r(611);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new c(this,e)},f.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),d=0;;d++){var l=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(f)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var m=p.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var g=l.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),b^=1),new h({r:y,s:g,recoveryParam:b})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new h(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new h(t,i);var o=this.n,s=new n(e),a=t.r,c=t.s,f=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var l=t.r.invm(o),p=o.sub(s).mul(l).umod(o),m=c.mul(l).umod(o);return this.g.mulAdd(p,a,m)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new h(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},1251:(e,t,r)=>{"use strict";var n=r(3785),i=r(953).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},611:(e,t,r)=>{"use strict";var n=r(3785),i=r(953),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function h(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=u(e,r);if(!1===s)return!1;var c=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var h=u(e,r);if(!1===h)return!1;if(e.length!==h+r.place)return!1;var f=e.slice(r.place,h+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,t.length),(n=n.concat(t)).push(2),h(n,r.length);var o=n.concat(r),s=[48];return h(s,o.length),s=s.concat(o),i.encode(s,e)}},5980:(e,t,r)=>{"use strict";var n=r(3715),i=r(5427),o=r(953),s=o.assert,a=o.parseBytes,u=r(9087),c=r(3622);function h(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof h))return new h(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=h,h.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},h.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},h.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},h.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},h.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},h.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},h.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},h.prototype.decodeInt=function(e){return o.intFromLE(e)},h.prototype.isPoint=function(e){return e instanceof this.pointClass}},9087:(e,t,r)=>{"use strict";var n=r(953),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},3622:(e,t,r)=>{"use strict";var n=r(3785),i=r(953),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},1037:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(e,t,r)=>{"use strict";var n=t,i=r(3785),o=r(9746),s=r(4504);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(s),a=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},3785:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(2574).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[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<e.length;i+=3)s=e[i]|e[i+1]<<8|e[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(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,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(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h<a;h+=n)u=c(e,h,h+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var h=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;h+=(s=(i=0|e.words[p])*(o=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],l=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:h[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,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,u="le"===t,c=new e(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;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(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,m=l>>>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,A=M>>>13,E=0|s[5],O=8191&E,P=E>>>13,x=0|s[6],T=8191&x,j=x>>>13,k=0|s[7],I=8191&k,R=k>>>13,B=0|s[8],N=8191&B,C=B>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],J=8191&X,K=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],fe=8191&he,de=he>>>13,le=0|a[9],pe=8191&le,me=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(F,J)|0,o=Math.imul(F,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Te=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var ke=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=Pe,u[12]=xe,u[13]=Te,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,f=(0|e.words[h])*(0|t.words[c]),d=67108863&f;a=67108863&(d=d+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>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,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,d=c,l=0;l<s;l++){var p=r[h+l],m=n[h+l],y=r[h+l+s],g=n[h+l+s],b=f*y-d*g;g=f*g+d*y,y=b,r[h+l]=p+y,n[h+l]=m+g,r[h+l+s]=p-y,n[h+l+s]=m-g,l!==a&&(b=u*f-c*d,d=u*d+c*f,f=b)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,h,f,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*f[l];u[l]=a[l]*f[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/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(e,t){var r=(this.length,e.length),n=this.clone(),i=e,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,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),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()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function 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(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return g[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=y}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,S),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7519:e=>{"use strict";e.exports={i8:"6.5.4"}},8769:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return Function('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},h=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(1405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},l=a("async function* () {}"),p=l?l.prototype:n,m=p?p.prototype:n,y="undefined"==typeof Uint8Array?n:d(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":a("async function () {}"),"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":l,"%AsyncIteratorPrototype%":m?d(m):n,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":a("function* () {}"),"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},b={"%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"]},v=r(8612),w=r(7642),_=v.call(Function.call,Array.prototype.concat),M=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,O=function(e){var t=[];return S(e,A,(function(e,r,n,i){t[t.length]=n?S(i,E,"$1"):r||e})),t},P=function(e,t){var r,n=e;if(w(b,n)&&(n="%"+(r=b[n])[0]+"%"),w(g,n)){var o=g[n];if(void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');var r=O(e),n=r.length>0?r[0]:"",i=P("%"+n+"%",t),o=i.name,a=i.value,c=!1,h=i.alias;h&&(n=h[0],M(r,_([0,1],h)));for(var f=1,d=!0;f<r.length;f+=1){var l=r[f];if("constructor"!==l&&d||(c=!0),w(g,o="%"+(n+="."+l)+"%"))a=g[o];else if(null!=a){if(u&&f+1>=r.length){var p=u(a,l);if(d=!!p,!t&&!(l in a))throw new s("base intrinsic for "+e+" exists, but the property is not available.");a=d&&"get"in p&&!("originalValue"in p.get)?p.get:a[l]}else d=w(a,l),a=a[l];d&&!c&&(g[o]=a)}}return a}},4079:(e,t,r)=>{"use strict";var n=r(8769)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8091:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),s=0,a=o.length;s<a;s++){var u=o[s],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(){void 0!==o&&e.removeListener("error",o),r([].slice.call(arguments))}var o;"error"!==t&&(o=function(r){e.removeListener(t,i),n(r)},e.once("error",o)),e.once(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=s.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function l(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),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(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,h=p(u,c);for(r=0;r<c;++r)n(h[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,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(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},o.prototype.listenerCount=l,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},3048:(e,t,r)=>{var n=r(9509).Buffer,i=r(2318);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var h=new i;h.update(c),h.update(e),t&&h.update(t),c=h.digest();var f=0;if(s>0){var d=a.length-s;f=Math.min(s,c.length),c.copy(a,d,0,f),s-=f}if(f<c.length&&o>0){var l=u.length-o,p=Math.min(o,c.length-f);c.copy(u,l,f,f+p),o-=p}}return c.fill(0),{key:a,iv:u}}},9804:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var s=0;s<o;s++)n.call(i,e[s],s,e);else for(var a in e)t.call(e,a)&&n.call(i,e[a],a,e)}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(t+o);for(var s,a=r.call(arguments,1),u=function(){if(this instanceof s){var t=o.apply(this,a.concat(r.call(arguments)));return Object(t)===t?t:this}return o.apply(e,a.concat(r.call(arguments)))},c=Math.max(0,o.length-a.length),h=[],f=0;f<c;f++)h.push("$"+f);if(s=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var d=function(){};d.prototype=o.prototype,s.prototype=new d,d.prototype=null}return s}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return Function('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},h=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(1405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},l=a("async function* () {}"),p=l?l.prototype:n,m=p?p.prototype:n,y="undefined"==typeof Uint8Array?n:d(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":a("async function () {}"),"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":l,"%AsyncIteratorPrototype%":m?d(m):n,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":a("function* () {}"),"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},b={"%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"]},v=r(8612),w=r(7642),_=v.call(Function.call,Array.prototype.concat),M=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,O=function(e){var t=[];return S(e,A,(function(e,r,n,i){t[t.length]=n?S(i,E,"$1"):r||e})),t},P=function(e,t){var r,n=e;if(w(b,n)&&(n="%"+(r=b[n])[0]+"%"),w(g,n)){var o=g[n];if(void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');var r=O(e),n=r.length>0?r[0]:"",i=P("%"+n+"%",t),o=i.name,a=i.value,c=!1,h=i.alias;h&&(n=h[0],M(r,_([0,1],h)));for(var f=1,d=!0;f<r.length;f+=1){var l=r[f];if("constructor"!==l&&d||(c=!0),w(g,o="%"+(n+="."+l)+"%"))a=g[o];else if(null!=a){if(u&&f+1>=r.length){var p=u(a,l);if(d=!!p,!t&&!(l in a))throw new s("base intrinsic for "+e+" exists, but the property is not available.");a=d&&"get"in p&&!("originalValue"in p.get)?p.get:a[l]}else d=w(a,l),a=a[l];d&&!c&&(g[o]=a)}}return a}},1405:(e,t,r)=>{"use strict";var n=r.g.Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},3349:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=r(8473).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(5717)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},3715:(e,t,r)=>{var n=t;n.utils=r(6436),n.common=r(5772),n.sha=r(9041),n.ripemd=r(2949),n.hmac=r(2344),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},5772:(e,t,r)=>{"use strict";var n=r(6436),i=r(9746);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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},2344:(e,t,r)=>{"use strict";var n=r(6436),i=r(9746);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2949:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(h,c),t.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],h=this.h[4],b=r,v=n,w=i,_=c,M=h,S=0;S<80;S++){var A=s(o(u(r,f(S,n,i,c),e[p[S]+t],d(S)),y[S]),h);r=h,h=c,c=o(i,10),i=n,n=A,A=s(o(u(b,f(79-S,v,w,_),e[m[S]+t],l(S)),g[S]),M),b=M,M=_,_=o(w,10),w=v,v=A}A=a(this.h[1],i,_),this.h[1]=a(this.h[2],c,M),this.h[2]=a(this.h[3],h,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},h.prototype._digest=function(e){return"hex"===e?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]},9041:(e,t,r)=>{"use strict";t.sha1=r(4761),t.sha224=r(799),t.sha256=r(9344),t.sha384=r(772),t.sha512=r(5900)},4761:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,h=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,h),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],d=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),c(p,o,h,d),l,r[n],f[p]);l=d,d=h,h=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],h),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],l)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},799:(e,t,r)=>{"use strict";var n=r(6436),i=r(9344);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),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},9344:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=r(9746),a=n.sum32,u=n.sum32_4,c=n.sum32_5,h=o.ch32,f=o.maj32,d=o.s0_256,l=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),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(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=c(_,l(b),h(b,v,w),this.k[n],r[n]),S=a(d(i),f(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(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},772:(e,t,r)=>{"use strict";var n=r(6436),i=r(5900);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),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},5900:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(9746),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,h=n.sum64,f=n.sum64_hi,d=n.sum64_lo,l=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(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function M(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function S(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(y=r[n-4],g=r[n-3],b=void 0,(b=s(y,g,19)^s(g,y,29)^u(y,g,6))<0&&(b+=4294967296),b),o=T(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],h=P(r[n-30],r[n-29]),f=x(r[n-30],r[n-29]),d=r[n-32],m=r[n-31];r[n]=l(i,o,a,c,h,f,d,m),r[n+1]=p(i,o,a,c,h,f,d,m)}var y,g,b},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,u=this.h[0],c=this.h[1],l=this.h[2],p=this.h[3],g=this.h[4],b=this.h[5],v=this.h[6],P=this.h[7],x=this.h[8],T=this.h[9],j=this.h[10],k=this.h[11],I=this.h[12],R=this.h[13],B=this.h[14],N=this.h[15];o(this.k.length===a.length);for(var C=0;C<a.length;C+=2){var L=B,D=N,F=(i=void 0,(i=s(r=x,n=T,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),q=O(x,T),U=w(x,0,j,0,I),z=_(0,T,0,k,0,R),V=this.k[C],$=this.k[C+1],H=a[C],X=a[C+1],J=m(L,D,F,q,U,z,V,$,H,X),K=y(L,D,F,q,U,z,V,$,H,X);L=A(u,c),D=E(u,c),F=M(u,0,l,0,g),q=S(0,c,0,p,0,b);var Z=f(L,D,F,q),G=d(L,D,F,q);B=I,N=R,I=j,R=k,j=x,k=T,x=f(v,P,J,K),T=d(P,P,J,K),v=g,P=b,g=l,b=p,l=u,p=c,u=f(J,K,Z,G),c=d(J,K,Z,G)}h(this.h,0,u,c),h(this.h,2,l,p),h(this.h,4,g,b),h(this.h,6,v,P),h(this.h,8,x,T),h(this.h,10,j,k),h(this.h,12,I,R),h(this.h,14,B,N)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7038:(e,t,r)=>{"use strict";var n=r(6436).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},6436:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.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<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=u(i.toString(16))}return r},t.zero2=a,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,u,c){var h=0,f=t;return h+=(f=f+n>>>0)<t?1:0,h+=(f=f+o>>>0)<o?1:0,h+=(f=f+a>>>0)<a?1:0,e+r+i+s+u+(h+=(f=f+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2156:(e,t,r)=>{"use strict";var n=r(3715),i=r(4504),o=r(9746);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,h=-7,f=r?i-1:0,d=r?-1:1,l=e[t+f];for(f+=d,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+e[t+f],f+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+f],f+=d,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),o-=c}return(l?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,f=h>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=255&a,l+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+l]=255&s,l+=p,s/=256,c-=8);e[r+l-p]|=128*m}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2584:(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=r(1924)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},8662:e=>{"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),a=!(!o||!s)&&o(s);e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o&&o(e)===a:"[object GeneratorFunction]"===t.call(e)))}},8611:e=>{"use strict";e.exports=function(e){return e!=e}},360:(e,t,r)=>{"use strict";var n=r(4289),i=r(8611),o=r(9415),s=r(3194),a=o();n(a,{getPolyfill:o,implementation:i,shim:s}),e.exports=a},9415:(e,t,r)=>{"use strict";var n=r(8611);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:(e,t,r)=>{"use strict";var n=r(4289),i=r(9415);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},5692:(e,t,r)=>{"use strict";var n=r(9804),i=r(6314),o=r(1924),s=o("Object.prototype.toString"),a=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},h=o("String.prototype.slice"),f={},d=r(4079),l=Object.getPrototypeOf;a&&d&&l&&n(u,(function(e){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=l(t),i=d(n,Symbol.toStringTag);if(!i){var o=l(n);i=d(o,Symbol.toStringTag)}f[e]=i.get})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a){var t=h(s(e),8,-1);return c(u,t)>-1}return!!d&&function(e){var t=!1;return n(f,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},6481:(e,t,r)=>{"use strict";var n=r(9177),i=n.ValidatorResult,o=n.SchemaError,s={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,extends:!0}},a=s.validators={};function u(e,t,r,n,i){var o=this.validateSchema(e,i,t,r);return!o.valid&&n instanceof Function&&n(o),o.valid}function c(e,t,r,n,i,o){if(!t.properties||void 0===t.properties[i])if(!1===t.additionalProperties)o.addError({name:"additionalProperties",argument:i,message:"additionalProperty "+JSON.stringify(i)+" exists in instance when not allowed"});else{var s=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,i,s,r,n);var a=this.validateSchema(e[i],s,r,n.makeChild(s,i));a.instance!==o.instance[i]&&(o.instance[i]=a.instance),o.importErrors(a)}}a.type=function(e,t,r,n){if(void 0===e)return null;var o=new i(e,t,r,n),s=Array.isArray(t.type)?t.type:[t.type];if(!s.some(this.testType.bind(this,e,t,r,n))){var a=s.map((function(e){return e.id&&"<"+e.id+">"||e+""}));o.addError({name:"type",argument:a,message:"is not of a type(s) "+a})}return o},a.anyOf=function(e,t,r,n){if(void 0===e)return null;var s=new i(e,t,r,n),a=new i(e,t,r,n);if(!Array.isArray(t.anyOf))throw new o("anyOf must be an array");if(!t.anyOf.some(u.bind(this,e,r,n,(function(e){a.importErrors(e)})))){var c=t.anyOf.map((function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));r.nestedErrors&&s.importErrors(a),s.addError({name:"anyOf",argument:c,message:"is not any of "+c.join(",")})}return s},a.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new o("allOf must be an array");var s=new i(e,t,r,n),a=this;return t.allOf.forEach((function(t,i){var o=a.validateSchema(e,t,r,n);if(!o.valid){var u=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";s.addError({name:"allOf",argument:{id:u,length:o.errors.length,valid:o},message:"does not match allOf schema "+u+" with "+o.errors.length+" error[s]:"}),s.importErrors(o)}})),s},a.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new o("oneOf must be an array");var s=new i(e,t,r,n),a=new i(e,t,r,n),c=t.oneOf.filter(u.bind(this,e,r,n,(function(e){a.importErrors(e)}))).length,h=t.oneOf.map((function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==c&&(r.nestedErrors&&s.importErrors(a),s.addError({name:"oneOf",argument:h,message:"is not exactly one from "+h.join(",")})),s},a.properties=function(e,t,r,n){if(void 0!==e&&e instanceof Object){var o=new i(e,t,r,n),s=t.properties||{};for(var a in s){"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,a,s[a],r,n);var u=e?e[a]:void 0,c=this.validateSchema(u,s[a],r,n.makeChild(s[a],a));c.instance!==o.instance[a]&&(o.instance[a]=c.instance),o.importErrors(c)}return o}},a.patternProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){var o=new i(e,t,r,n),s=t.patternProperties||{};for(var a in e){var u=!0;for(var h in s)if(new RegExp(h).test(a)){u=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,a,s[h],r,n);var f=this.validateSchema(e[a],s[h],r,n.makeChild(s[h],a));f.instance!==o.instance[a]&&(o.instance[a]=f.instance),o.importErrors(f)}u&&c.call(this,e,t,r,n,a,o)}return o}},a.additionalProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var o=new i(e,t,r,n);for(var s in e)c.call(this,e,t,r,n,s,o);return o}},a.minProperties=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);return Object.keys(e).length>=t.minProperties||o.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),o},a.maxProperties=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);return Object.keys(e).length<=t.maxProperties||o.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),o},a.items=function(e,t,r,n){if(!Array.isArray(e))return null;var o=this,s=new i(e,t,r,n);return void 0!==e&&t.items?(e.every((function(e,i){var a=Array.isArray(t.items)?t.items[i]||t.additionalItems:t.items;if(void 0===a)return!0;if(!1===a)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(e,a,r,n.makeChild(a,i));return u.instance!==s.instance[i]&&(s.instance[i]=u.instance),s.importErrors(u),!0})),s):s},a.minimum=function(e,t,r,n){if("number"!=typeof e)return null;var o=new i(e,t,r,n);return(t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum:e>=t.minimum)||o.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),o},a.maximum=function(e,t,r,n){if("number"!=typeof e)return null;var o=new i(e,t,r,n);return(t.exclusiveMaximum&&!0===t.exclusiveMaximum?e<t.maximum:e<=t.maximum)||o.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),o};var h=function(e,t,r,s,a,u){if("number"!=typeof e)return null;var c=t[a];if(0==c)throw new o(a+" cannot be zero");var h=new i(e,t,r,s),f=n.getDecimalPlaces(e),d=n.getDecimalPlaces(c),l=Math.max(f,d),p=Math.pow(10,l);return Math.round(e*p)%Math.round(c*p)!=0&&h.addError({name:a,argument:c,message:u+JSON.stringify(c)}),h};function f(e,t,r){var i,o=r.length;for(i=t+1;i<o;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}a.multipleOf=function(e,t,r,n){return h(e,t,r,n,"multipleOf","is not a multiple of (divisible by) ")},a.divisibleBy=function(e,t,r,n){return h(e,t,r,n,"divisibleBy","is not divisible by (multiple of) ")},a.required=function(e,t,r,n){var o=new i(e,t,r,n);return void 0===e&&!0===t.required?o.addError({name:"required",message:"is required"}):e&&"object"==typeof e&&Array.isArray(t.required)&&t.required.forEach((function(t){void 0===e[t]&&o.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})})),o},a.pattern=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.match(t.pattern)||o.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),o},a.format=function(e,t,r,o){var s=new i(e,t,r,o);return s.disableFormat||n.isFormat(e,t.format,this)||s.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),s},a.minLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.length>=t.minLength||o.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),o},a.maxLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.length<=t.maxLength||o.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),o},a.minItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.length>=t.minItems||o.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),o},a.maxItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.length<=t.maxItems||o.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),o},a.uniqueItems=function(e,t,r,o){var s=new i(e,t,r,o);return Array.isArray(e)?(e.every((function(e,t,r){for(var i=t+1;i<r.length;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}))||s.addError({name:"uniqueItems",message:"contains duplicate item"}),s):s},a.uniqueItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.every(f)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o},a.dependencies=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);for(var s in t.dependencies)if(void 0!==e[s]){var a=t.dependencies[s],u=n.makeChild(a,s);if("string"==typeof a&&(a=[a]),Array.isArray(a))a.forEach((function(t){void 0===e[t]&&o.addError({name:"dependencies",argument:u.propertyPath,message:"property "+t+" not found, required by "+u.propertyPath})}));else{var c=this.validateSchema(e,a,r,u);o.instance!==c.instance&&(o.instance=c.instance),c&&c.errors.length&&(o.addError({name:"dependencies",argument:u.propertyPath,message:"does not meet dependency required by "+u.propertyPath}),o.importErrors(c))}}return o},a.enum=function(e,t,r,s){if(!Array.isArray(t.enum))throw new o("enum expects an array",t);if(void 0===e)return null;var a=new i(e,t,r,s);return t.enum.some(n.deepCompareStrict.bind(null,e))||a.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.join(",")}),a},a.const=function(e,t,r,o){var s=new i(e,t,r,o);return n.deepCompareStrict(t.const,e)||s.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),s},a.not=a.disallow=function(e,t,r,n){var o=this;if(void 0===e)return null;var s=new i(e,t,r,n),a=t.not||t.disallow;return a?(Array.isArray(a)||(a=[a]),a.forEach((function(i){if(o.testType(e,t,r,n,i)){var a=i&&i.id&&"<"+i.id+">"||i;s.addError({name:"not",argument:a,message:"is of prohibited type "+a})}})),s):null},e.exports=s},9177:(e,t,r)=>{"use strict";var n=r(8575),i=t.ValidationError=function(e,t,r,n,i,o){n&&(this.property=n),e&&(this.message=e),r&&(r.id?this.schema=r.id:this.schema=r),t&&(this.instance=t),this.name=i,this.argument=o,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.disableFormat=r&&!0===r.disableFormat};function s(e,t){return t+": "+e.toString()+"\n"}o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},o.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&Array.prototype.push.apply(this.errors,e.errors)},o.prototype.toString=function(e){return this.errors.map(s).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}});var a=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};a.prototype=Object.create(Error.prototype,{constructor:{value:a,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=t.SchemaContext=function(e,t,r,n,i){this.schema=e,this.options=t,this.propertyPath=r,this.base=n,this.schemas=i};u.prototype.resolve=function(e){return n.resolve(this.base,e)},u.prototype.makeChild=function(e,t){var r=void 0===t?this.propertyPath:this.propertyPath+h(t),i=n.resolve(this.base,e.id||""),o=new u(e,this.options,r,i,Object.create(this.schemas));return e.id&&!o.schemas[i]&&(o.schemas[i]=e),o};var c=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};c.regexp=c.regex,c.pattern=c.regex,c.ipv4=c["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==c[t]){if(c[t]instanceof RegExp)return c[t].test(e);if("function"==typeof c[t])return c[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var h=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function f(e,t,r,n){"object"==typeof r?t[n]=p(e[n],r):-1===e.indexOf(r)&&t.push(r)}function d(e,t,r){t[r]=e[r]}function l(e,t,r,n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=p(e[n],t[n]):r[n]=t[n]}function p(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(f.bind(null,e,n))):(e&&"object"==typeof e&&Object.keys(e).forEach(d.bind(null,e,n)),Object.keys(t).forEach(l.bind(null,e,t,n))),n}function m(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(t instanceof Array)return r instanceof Array&&t.length===r.length&&t.every((function(n,i){return e(t[i],r[i])}));if("object"==typeof t){if(!t||!r)return t===r;var n=Object.keys(t),i=Object.keys(r);return n.length===i.length&&n.every((function(n){return e(t[n],r[n])}))}return t===r},e.exports.deepMerge=p,t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var i=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(m).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var r=e.toString().split("e");if(2===r.length){if("-"!==r[1][0])return t;t=Number(r[1].slice(1))}var n=r[0].split(".");return 2===n.length&&(t+=n[1].length),t}},660:(e,t,r)=>{"use strict";var n=e.exports.Validator=r(3058);e.exports.ValidatorResult=r(9177).ValidatorResult,e.exports.ValidationError=r(9177).ValidationError,e.exports.SchemaError=r(9177).SchemaError,e.exports.validate=function(e,t,r){return(new n).validate(e,t,r)}},3058:(e,t,r)=>{"use strict";var n=r(8575),i=r(6481),o=r(9177),s=o.ValidatorResult,a=o.SchemaError,u=o.SchemaContext,c=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(f),this.attributes=Object.create(i.validators)};function h(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}c.prototype.customFormats={},c.prototype.schemas=null,c.prototype.types=null,c.prototype.attributes=null,c.prototype.unresolvedRefs=null,c.prototype.addSchema=function(e,t){if(!e)return null;var r=t||e.id;return this.addSubSchema(r,e),r&&(this.schemas[r]=e),this.schemas[r]},c.prototype.addSubSchema=function(e,t){if(t&&"object"==typeof t){if(!t.$ref){var r=t.id&&n.resolve(e,t.id),i=r||e;if(r){if(this.schemas[r]){if(!o.deepCompareStrict(this.schemas[r],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[r]}this.schemas[r]=t;var s=r.replace(/^([^#]*)#$/,"$1");this.schemas[s]=t}return this.addSubSchemaArray(i,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(i,t.extends instanceof Array?t.extends:[t.extends]),this.addSubSchema(i,t.additionalItems),this.addSubSchemaObject(i,t.properties),this.addSubSchema(i,t.additionalProperties),this.addSubSchemaObject(i,t.definitions),this.addSubSchemaObject(i,t.patternProperties),this.addSubSchemaObject(i,t.dependencies),this.addSubSchemaArray(i,t.disallow),this.addSubSchemaArray(i,t.allOf),this.addSubSchemaArray(i,t.anyOf),this.addSubSchemaArray(i,t.oneOf),this.addSubSchema(i,t.not),this.schemas[r]}var a=n.resolve(e,t.$ref);void 0===this.schemas[a]&&(this.schemas[a]=null,this.unresolvedRefs.push(a))}},c.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},c.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var r in t)this.addSubSchema(e,t[r])},c.prototype.setSchemas=function(e){this.schemas=e},c.prototype.getSchema=function(e){return this.schemas[e]},c.prototype.validate=function(e,t,r,i){r||(r={});var o=r.propertyName||"instance",s=n.resolve(r.base||"/",t.id||"");if(i||(i=new u(t,r,o,s,Object.create(this.schemas))).schemas[s]||(i.schemas[s]=t),t){var c=this.validateSchema(e,t,r,i);if(!c)throw new Error("Result undefined");return c}throw new a("no schema specified",t)},c.prototype.validateSchema=function(e,t,r,n){var c,f=new s(e,t,r,n);if(!t)throw new Error("schema is undefined");if(t.extends)if(t.extends instanceof Array){var d={schema:t,ctx:n};t.extends.forEach(this.schemaTraverser.bind(this,d)),t=d.schema,d.schema=null,d.ctx=null,d=null}else t=o.deepMerge(t,this.superResolve(t.extends,n));if(c=h(t)){var l=this.resolve(t,c,n),p=new u(l.subschema,r,n.propertyPath,l.switchSchema,n.schemas);return this.validateSchema(e,l.subschema,r,p)}var m=r&&r.skipAttributes||[];for(var y in t)if(!i.ignoreProperties[y]&&m.indexOf(y)<0){var g=null,b=this.attributes[y];if(b)g=b.call(this,e,t,r,n);else if(!1===r.allowUnknownAttributes)throw new a("Unsupported attribute: "+y,t);g&&f.importErrors(g)}if("function"==typeof r.rewrite){var v=r.rewrite.call(this,e,t,r,n);f.instance=v}return f},c.prototype.schemaTraverser=function(e,t){e.schema=o.deepMerge(e.schema,this.superResolve(t,e.ctx))},c.prototype.superResolve=function(e,t){var r;return(r=h(e))?this.resolve(e,r,t).subschema:e},c.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var i=n.parse(t),s=i&&i.hash,u=s&&s.length&&t.substr(0,t.length-s.length);if(!u||!r.schemas[u])throw new a("no such schema <"+t+">",e);var c=o.objectGetPath(r.schemas[u],s.substr(1));if(void 0===c)throw new a("no such schema "+s+" located in <"+u+">",e);return{subschema:c,switchSchema:t}},c.prototype.testType=function(e,t,r,n,i){if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var o=this.validateSchema(e,i,r,n);return void 0===o||!(o&&o.errors.length)}return!0};var f=c.prototype.types={};f.string=function(e){return"string"==typeof e},f.number=function(e){return"number"==typeof e&&isFinite(e)},f.integer=function(e){return"number"==typeof e&&e%1==0},f.boolean=function(e){return"boolean"==typeof e},f.array=function(e){return Array.isArray(e)},f.null=function(e){return null===e},f.date=function(e){return e instanceof Date},f.any=function(e){return!0},f.object=function(e){return e&&"object"==typeof e&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=c},2307:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",h="[object Function]",f="[object Map]",d="[object Number]",l="[object Object]",p="[object Promise]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[s]=S[v]=S[a]=S[w]=S[u]=S[c]=S[h]=S[f]=S[d]=S[l]=S[m]=S[y]=S[g]=S[b]=!1;var A="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,E="object"==typeof self&&self&&self.Object===Object&&self,O=A||E||Function("return this")(),P=t&&!t.nodeType&&t,x=P&&e&&!e.nodeType&&e,T=x&&x.exports===P,j=T&&A.process,k=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),I=k&&k.isTypedArray;function R(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function B(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function N(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var C,L,D,F=Array.prototype,q=Function.prototype,U=Object.prototype,z=O["__core-js_shared__"],V=q.toString,$=U.hasOwnProperty,H=(C=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",X=U.toString,J=RegExp("^"+V.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=T?O.Buffer:void 0,Z=O.Symbol,G=O.Uint8Array,W=U.propertyIsEnumerable,Y=F.splice,Q=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,re=(L=Object.keys,D=Object,function(e){return L(D(e))}),ne=xe(O,"DataView"),ie=xe(O,"Map"),oe=xe(O,"Promise"),se=xe(O,"Set"),ae=xe(O,"WeakMap"),ue=xe(Object,"create"),ce=Ie(ne),he=Ie(ie),fe=Ie(oe),de=Ie(se),le=Ie(ae),pe=Z?Z.prototype:void 0,me=pe?pe.valueOf:void 0;function ye(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ge(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function be(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ve(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new be;++t<r;)this.add(e[t])}function we(e){var t=this.__data__=new ge(e);this.size=t.size}function _e(e,t){for(var r=e.length;r--;)if(Re(e[r][0],t))return r;return-1}function Me(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=$.call(e,Q),r=e[Q];try{e[Q]=void 0;var n=!0}catch(e){}var i=X.call(e);return n&&(t?e[Q]=r:delete e[Q]),i}(e):function(e){return X.call(e)}(e)}function Se(e){return qe(e)&&Me(e)==o}function Ae(e,t,r,n,i){return e===t||(null==e||null==t||!qe(e)&&!qe(t)?e!=e&&t!=t:function(e,t,r,n,i,h){var p=Ne(e),b=Ne(t),_=p?s:je(e),M=b?s:je(t),S=(_=_==o?l:_)==l,A=(M=M==o?l:M)==l,E=_==M;if(E&&Ce(e)){if(!Ce(t))return!1;p=!0,S=!1}if(E&&!S)return h||(h=new we),p||Ue(e)?Ee(e,t,r,n,i,h):function(e,t,r,n,i,o,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!o(new G(e),new G(t)));case a:case u:case d:return Re(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case g:return e==t+"";case f:var h=B;case y:var l=1&n;if(h||(h=N),e.size!=t.size&&!l)return!1;var p=s.get(e);if(p)return p==t;n|=2,s.set(e,t);var b=Ee(h(e),h(t),n,i,o,s);return s.delete(e),b;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,_,r,n,i,h);if(!(1&r)){var O=S&&$.call(e,"__wrapped__"),P=A&&$.call(t,"__wrapped__");if(O||P){var x=O?e.value():e,T=P?t.value():t;return h||(h=new we),i(x,T,r,n,h)}}return!!E&&(h||(h=new we),function(e,t,r,n,i,o){var s=1&r,a=Oe(e),u=a.length;if(u!=Oe(t).length&&!s)return!1;for(var c=u;c--;){var h=a[c];if(!(s?h in t:$.call(t,h)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var d=!0;o.set(e,t),o.set(t,e);for(var l=s;++c<u;){var p=e[h=a[c]],m=t[h];if(n)var y=s?n(m,p,h,t,e,o):n(p,m,h,e,t,o);if(!(void 0===y?p===m||i(p,m,r,n,o):y)){d=!1;break}l||(l="constructor"==h)}if(d&&!l){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,r,n,i,h))}(e,t,r,n,Ae,i))}function Ee(e,t,r,n,i,o){var s=1&r,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var h=-1,f=!0,d=2&r?new ve:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var l=e[h],p=t[h];if(n)var m=s?n(p,l,h,t,e,o):n(l,p,h,e,t,o);if(void 0!==m){if(m)continue;f=!1;break}if(d){if(!R(t,(function(e,t){if(s=t,!d.has(s)&&(l===e||i(l,e,r,n,o)))return d.push(t);var s}))){f=!1;break}}else if(l!==p&&!i(l,p,r,n,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Oe(e){return function(e,t,r){var n=t(e);return Ne(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,ze,Te)}function Pe(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function xe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!H&&H in e}(e))&&(Le(e)?J:_).test(Ie(e))}(r)?r:void 0}ye.prototype.clear=function(){this.__data__=ue?ue(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(ue){var r=t[e];return r===n?void 0:r}return $.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return ue?void 0!==t[e]:$.call(t,e)},ye.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ue&&void 0===t?n:t,this},ge.prototype.clear=function(){this.__data__=[],this.size=0},ge.prototype.delete=function(e){var t=this.__data__,r=_e(t,e);return!(r<0||(r==t.length-1?t.pop():Y.call(t,r,1),--this.size,0))},ge.prototype.get=function(e){var t=this.__data__,r=_e(t,e);return r<0?void 0:t[r][1]},ge.prototype.has=function(e){return _e(this.__data__,e)>-1},ge.prototype.set=function(e,t){var r=this.__data__,n=_e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(ie||ge),string:new ye}},be.prototype.delete=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Pe(this,e).get(e)},be.prototype.has=function(e){return Pe(this,e).has(e)},be.prototype.set=function(e,t){var r=Pe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ve.prototype.add=ve.prototype.push=function(e){return this.__data__.set(e,n),this},ve.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new ge,this.size=0},we.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ge){var n=r.__data__;if(!ie||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new be(n)}return r.set(e,t),this.size=r.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,i=null==t?0:t.length,o=0,s=[];++n<i;){var a=t[n];u=a,W.call(e,u)&&(s[o++]=a)}var u;return s}(ee(e)))}:function(){return[]},je=Me;function ke(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e){if(null!=e){try{return V.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Re(e,t){return e===t||e!=e&&t!=t}(ne&&je(new ne(new ArrayBuffer(1)))!=w||ie&&je(new ie)!=f||oe&&je(oe.resolve())!=p||se&&je(new se)!=y||ae&&je(new ae)!=b)&&(je=function(e){var t=Me(e),r=t==l?e.constructor:void 0,n=r?Ie(r):"";if(n)switch(n){case ce:return w;case he:return f;case fe:return p;case de:return y;case le:return b}return t});var Be=Se(function(){return arguments}())?Se:function(e){return qe(e)&&$.call(e,"callee")&&!W.call(e,"callee")},Ne=Array.isArray,Ce=te||function(){return!1};function Le(e){if(!Fe(e))return!1;var t=Me(e);return t==h||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function De(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qe(e){return null!=e&&"object"==typeof e}var Ue=I?function(e){return function(t){return e(t)}}(I):function(e){return qe(e)&&De(e.length)&&!!S[Me(e)]};function ze(e){return null!=(t=e)&&De(t.length)&&!Le(t)?function(e,t){var r=Ne(e),n=!r&&Be(e),i=!r&&!n&&Ce(e),o=!r&&!n&&!i&&Ue(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var c in e)!t&&!$.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ke(c,u))||a.push(c);return a}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||U))return re(e);var t,r,n=[];for(var i in Object(e))$.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e);var t}e.exports=function(e,t){return Ae(e,t)}},2318:(e,t,r)=>{"use strict";var n=r(5717),i=r(3349),o=r(9509).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,o,s){return u(e+(t&r|~t&n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return u(e+(t&n|r&~n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return u(e+(t^r^n)+i+o|0,s)+t|0}function d(e,t,r,n,i,o,s){return u(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=h(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=h(o,r,n,i,e[6],3225465664,9),i=h(i,o,r,n,e[11],643717713,14),n=h(n,i,o,r,e[0],3921069994,20),r=h(r,n,i,o,e[5],3593408605,5),o=h(o,r,n,i,e[10],38016083,9),i=h(i,o,r,n,e[15],3634488961,14),n=h(n,i,o,r,e[4],3889429448,20),r=h(r,n,i,o,e[9],568446438,5),o=h(o,r,n,i,e[14],3275163606,9),i=h(i,o,r,n,e[3],4107603335,14),n=h(n,i,o,r,e[8],1163531501,20),r=h(r,n,i,o,e[13],2850285829,5),o=h(o,r,n,i,e[2],4243563512,9),i=h(i,o,r,n,e[7],1735328473,14),r=f(r,n=h(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},3047:(e,t,r)=>{var n=r(3550),i=r(9931);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var c=e.shrn(u),h=a.toRed(o);t>0;t--){var f=this._randrange(new n(2),a);r&&r(f);var d=f.toRed(o).redPow(c);if(0!==d.cmp(s)&&0!==d.cmp(h)){for(var l=1;l<u;l++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(h))break}if(l===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var u=e.shrn(a),c=s.toRed(i);t>0;t--){var h=this._randrange(new n(2),s),f=e.gcd(h);if(0!==f.cmpn(1))return f;var d=h.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var l=1;l<a;l++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(c))break}if(l===a)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},9746:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},4504:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},609:(e,t,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(4244),s=r(5624),a=r(2281),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},5624:(e,t,r)=>{"use strict";var n=r(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(e,t,r)=>{"use strict";var n=r(5624),i=r(4289);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1414),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},l=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(a&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(n&&e.length>0)for(var y=0;y<e.length;++y)d.push(String(y));else for(var g in e)p&&"prototype"===g||!i.call(e,g)||d.push(String(g));if(u)for(var b=function(e){if("undefined"==typeof window||!l)return f(e);try{return f(e)}catch(e){return!1}}(e),v=0;v<h.length;++v)b&&"constructor"===h[v]||!i.call(e,h[v])||d.push(h[v]);return d}}e.exports=n},2215:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,s=o?function(e){return o(e)}:r(8987),a=Object.keys;s.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)}):Object.keys=s,Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},873:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},2818:(e,t,r)=>{"use strict";var n=r(9809);t.certificate=r(1934);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())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=s;var a=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())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=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())}));t.EncryptedPrivateKey=c;var h=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())}));t.DSAPrivateKey=h,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var d=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(e,t,r)=>{"use strict";var n=r(9809),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())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),h=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),l=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(h),this.key("validity").use(f),this.key("subject").use(h),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(d).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},7631:(e,t,r)=>{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(3048),a=r(4696),u=r(9509).Buffer;e.exports=function(e,t){var r,c=e.toString(),h=c.match(n);if(h){var f="aes"+h[1],d=u.from(h[2],"hex"),l=u.from(h[3].replace(/[\r\n]/g,""),"base64"),p=s(t,d.slice(0,8),parseInt(h[1],10)).key,m=[],y=a.createDecipheriv(f,p,d);m.push(y.update(l)),m.push(y.final()),r=u.concat(m)}else{var g=c.match(o);r=u.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},980:(e,t,r)=>{var n=r(2818),i=r(873),o=r(7631),s=r(4696),a=r(5632),u=r(9509).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,h=o(e,t),f=h.tag,d=h.data;switch(f){case"CERTIFICATE":c=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(d,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,h=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,d=a.pbkdf2Sync(t,r,n,f,"sha1"),l=s.createDecipheriv(o,d,c),p=[];return p.push(l.update(h)),p.push(l.final()),u.concat(p)}(d=n.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=n.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=c,c.signature=n.signature},5632:(e,t,r)=>{t.pbkdf2=r(8638),t.pbkdf2Sync=r(1257)},8638:(e,t,r)=>{var n,i=r(4155),o=r(9509).Buffer,s=r(7357),a=r(2368),u=r(1257),c=r(7777),h=r.g.crypto&&r.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function l(e,t,r,n,i){return h.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return h.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,p,m,y,g){"function"==typeof y&&(g=y,y=void 0);var b=f[(y=y||"sha1").toLowerCase()];if(!b||"function"!=typeof r.g.Promise)return i.nextTick((function(){var r;try{r=u(e,t,p,m,y)}catch(e){return g(e)}g(null,r)}));if(s(p,m),e=c(e,a,"Password"),t=c(t,a,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=l(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(b).then((function(r){return r?l(e,t,p,m,b):u(e,t,p,m,y)})),g)}},2368:(e,t,r)=>{var n,i=r(4155);n=i.browser?"utf-8":i.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},7357:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1257:(e,t,r)=>{var n=r(8028),i=r(9785),o=r(9072),s=r(9509).Buffer,a=r(7357),u=r(2368),c=r(7777),h=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=a(t):t.length<u&&(t=s.concat([t,h],u));for(var c=s.allocUnsafe(u+f[e]),d=s.allocUnsafe(u+f[e]),l=0;l<u;l++)c[l]=54^t[l],d[l]=92^t[l];var p=s.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=d,this.alg=e,this.blocksize=u,this.hash=a,this.size=f[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){a(r,n);var o=new d(i=i||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),h=s.allocUnsafe(n),l=s.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var p=0,m=f[i],y=Math.ceil(n/m),g=1;g<=y;g++){l.writeUInt32BE(g,t.length);for(var b=o.run(l,o.ipad1),v=b,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var _=0;_<m;_++)b[_]^=v[_]}b.copy(h,p),p+=m}return h}},7777:(e,t,r)=>{var n=r(9509).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,h=-1;function f(){c&&a&&(c=!1,a.length?u=a.concat(u):h=-1,u.length&&d())}function d(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(a=u,u=[];++h<t;)a&&a[h].run();h=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new l(e,t)),1!==u.length||c||s(d)},l.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},7900:(e,t,r)=>{t.publicEncrypt=r(6559),t.privateDecrypt=r(6138),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},9199:(e,t,r)=>{var n=r(3482),i=r(9509).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=i.alloc(0),a=0;s.length<t;)r=o(a++),s=i.concat([s,n("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},6138:(e,t,r)=>{var n=r(980),i=r(9199),o=r(7859),s=r(3550),a=r(3663),u=r(3482),c=r(4818),h=r(9509).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,l=n(e),p=l.modulus.byteLength();if(t.length>p||new s(t).cmp(l.modulus)>=0)throw new Error("decryption error");d=r?c(new s(t),l):a(t,l);var m=h.alloc(p-d.length);if(d=h.concat([m,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(h.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),c=t.slice(s+1),f=o(a,i(c,s)),d=o(c,i(f,r-s-1));if(function(e,t){e=h.from(e),t=h.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,d.slice(0,s)))throw new Error("decryption error");for(var l=s;0===d[l];)l++;if(1!==d[l++])throw new Error("decryption error");return d.slice(l)}(l,d);if(1===f)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var s=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},6559:(e,t,r)=>{var n=r(980),i=r(1798),o=r(3482),s=r(9199),a=r(7859),u=r(3550),c=r(4818),h=r(3663),f=r(9509).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var l,p=n(e);if(4===d)l=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(f.alloc(0)).digest(),h=c.length,d=2*h;if(n>r-d-2)throw new Error("message too long");var l=f.alloc(r-n-d-2),p=r-h-1,m=i(h),y=a(f.concat([c,l,f.alloc(1,1),t],p),s(m,p)),g=a(m,s(y,h));return new u(f.concat([f.alloc(1),g,y],r))}(p,t);else if(1===d)l=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n=r?f.alloc(s-o-3,255):function(e){for(var t,r=f.allocUnsafe(e),n=0,o=i(2*e),s=0;n<e;)s===o.length&&(o=i(2*e),s=0),(t=o[s++])&&(r[n++]=t);return r}(s-o-3),new u(f.concat([f.from([0,r?1:2]),n,f.alloc(1),t],s))}(p,t,r);else{if(3!==d)throw new Error("unknown padding");if((l=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?h(l,p):c(l,p)}},4818:(e,t,r)=>{var n=r(3550),i=r(9509).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},7859:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},4971:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=/^xn--/,h=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,p=String.fromCharCode;function m(e){throw RangeError(d[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function v(e){return y(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=u)e=l(e/35);return l(n+36*e/(e+38))}function M(e){var t,r,n,i,o,s,c,h,f,d,p,y=[],g=e.length,b=0,w=128,M=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m("not-basic"),y.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=b,s=1,c=u;i>=g&&m("invalid-input"),((h=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||h>l((a-b)/s))&&m("overflow"),b+=h*s,!(h<(f=c<=M?1:c>=M+26?26:c-M));c+=u)s>l(a/(d=u-f))&&m("overflow"),s*=d;M=_(b-o,t=y.length+1,0==o),l(b/t)>a-w&&m("overflow"),w+=l(b/t),b%=t,y.splice(b++,0,w)}return v(y)}function S(e){var t,r,n,i,o,s,c,h,f,d,y,g,v,M,S,A=[];for(g=(e=b(e)).length,t=128,r=0,o=72,s=0;s<g;++s)(y=e[s])<128&&A.push(p(y));for(n=i=A.length,i&&A.push("-");n<g;){for(c=a,s=0;s<g;++s)(y=e[s])>=t&&y<c&&(c=y);for(c-t>l((a-r)/(v=n+1))&&m("overflow"),r+=(c-t)*v,t=c,s=0;s<g;++s)if((y=e[s])<t&&++r>a&&m("overflow"),y==t){for(h=r,f=u;!(h<(d=f<=o?1:f>=o+26?26:f-o));f+=u)S=h-d,M=u-d,A.push(p(w(d+S%M,0))),h=l(S/M);A.push(p(w(h,0))),o=_(r,v,n==i),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:b,encode:v},decode:M,encode:S,toASCII:function(e){return g(e,(function(e){return h.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return g(e,(function(e){return c.test(e)?M(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},2587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var h,f,d,l,p=e[c].replace(s,"%20"),m=p.indexOf(n);m>=0?(h=p.substr(0,m),f=p.substr(m+1)):(h=p,f=""),d=decodeURIComponent(h),l=decodeURIComponent(f),t(o,d)?Array.isArray(o[d])?o[d].push(l):o[d]=[o[d],l]:o[d]=l}return o}},2361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},7673:(e,t,r)=>{"use strict";t.decode=t.parse=r(2587),t.encode=t.stringify=r(2361)},1798:(e,t,r)=>{"use strict";var n=r(4155),i=65536,o=r(9509).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var a=0;a<e;a+=i)s.getRandomValues(r.slice(a,a+i));else s.getRandomValues(r);return"function"==typeof t?n.nextTick((function(){t(null,r)})):r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},7963:(e,t,r)=>{"use strict";var n=r(4155);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(9509),s=r(1798),a=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,h=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>h||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>h||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function l(e,t,r,i){if(n.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return c.getRandomValues(a),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),d(n,t,e.length),l(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),d(n,t,e.length),l(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=r(4155),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var o=r(9481),s=r(4229);r(5717)(h,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];h.prototype[c]||(h.prototype[c]=s.prototype[c])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n,i=r(4155);e.exports=E,E.ReadableState=A,r(7187).EventEmitter;var o,s=function(e,t){return e.listeners(t).length},a=r(2503),u=r(8764).Buffer,c=r.g.Uint8Array||function(){},h=r(1758);o=h&&h.debuglog?h.debuglog("stream"):function(){};var f,d,l,p=r(7327),m=r(1195),y=r(2457).getHighWaterMark,g=r(4281).q,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(5717)(E,a);var M=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(2553).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function E(e){if(n=n||r(6753),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function O(e,t,r,n,i){o("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}(e,a);else if(i||(s=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(a,t)),s)M(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?M(e,new _):P(e,a,t,!0);else if(a.ended)M(e,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):I(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,I(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function P(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),I(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},E.prototype.unshift=function(e){return O(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){f||(f=r(2553).s);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var x=1073741824;function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function I(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function C(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(q,t,e))}function q(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):j(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){M(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?m:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",(function t(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var h=!1;function f(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!h&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){o("onerror",t),m(),e.removeListener("error",d),0===s(e,"error")&&M(e,t)}function l(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",l),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",d),e.once("close",l),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?j(this):n.reading||i.nextTick(N,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<S.length;s++)e.on(S[s],this.emit.bind(this,S[s]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(5850)),d(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=D,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===l&&(l=r(5167)),l(E,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=h;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function c(e,t){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!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(5717)(h,u),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";var n,i=r(4155);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=A;var s,a={deprecate:r(4927)},u=r(2503),c=r(8764).Buffer,h=r.g.Uint8Array||function(){},f=r(1195),d=r(2457).getHighWaterMark,l=r(4281).q,p=l.ERR_INVALID_ARG_TYPE,m=l.ERR_METHOD_NOT_IMPLEMENTED,y=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,v=l.ERR_STREAM_NULL_VALUES,w=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;function S(){}function A(e,t,s){n=n||r(6753),e=e||{},"boolean"!=typeof s&&(s=t instanceof n),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(k,e,t),e._writableState.errorEmitted=!0,M(e,n)):(o(n),e._writableState.errorEmitted=!0,M(e,n),k(e,t))}(e,r,n,t,o);else{var s=T(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?i.nextTick(P,e,r,s,o):P(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function E(e){var t=this instanceof(n=n||r(6753));if(!t&&!s.call(E,this))return new E(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function O(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function P(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,O(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,f=r.callback;if(O(e,t,!1,t.objectMode?1:c.length,c,h,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&M(e,r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var r=T(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(E,u),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===E&&e&&e._writableState instanceof A}})):s=function(e){return e instanceof this},E.prototype.pipe=function(){M(this,new g)},E.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof h);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new w;M(e,r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(M(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n,i=r(4155);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(8610),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),l=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var r=e[l].read();null!==r&&(e[f]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function y(e){i.nextTick(m,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(n={get stream(){return this[l]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[l].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(p(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var o=this[l].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[d])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[l].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(b,(o(t={},l,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,h,{value:e._readableState.endEmitted,writable:!0}),o(t,d,{value:function(e,t){var n=r[l].read();n?(r[f]=null,r[a]=null,r[u]=null,e(p(n,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[f]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[f]=null,r[a]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[h]=!0})),e.on("readable",y.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=r(8764).Buffer,a=r(1758).inspect,u=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),e}()},1195:(e,t,r)=>{"use strict";var n=r(4155);function i(e,t){s(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,e)):n.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){a=!1,c=!0,s||o.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){s=!1,f=!0,a||o.call(t)},l=function(e){o.call(t,e)},p=function(){var e;return s&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},m=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",d),t.on("finish",h),!1!==r.error&&t.on("error",l),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",d),t.removeListener("error",l),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function c(e){e()}function h(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var s=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return t.reduce(h)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,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 e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725),t.finished=r(8610),t.pipeline=r(9946)},9785:(e,t,r)=>{"use strict";var n=r(8764).Buffer,i=r(5717),o=r(3349),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],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[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],f=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(l,o),l.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var O,P;E<16?(O=m(r,n,i,o,l,e[a[E]],f[0],c[E]),P=v(w,_,M,S,A,e[u[E]],d[0],h[E])):E<32?(O=y(r,n,i,o,l,e[a[E]],f[1],c[E]),P=b(w,_,M,S,A,e[u[E]],d[1],h[E])):E<48?(O=g(r,n,i,o,l,e[a[E]],f[2],c[E]),P=g(w,_,M,S,A,e[u[E]],d[2],h[E])):E<64?(O=b(r,n,i,o,l,e[a[E]],f[3],c[E]),P=y(w,_,M,S,A,e[u[E]],d[3],h[E])):(O=v(r,n,i,o,l,e[a[E]],f[4],c[E]),P=m(w,_,M,S,A,e[u[E]],d[4],h[E])),r=l,l=o,o=p(i,10),i=n,n=O,w=A,A=S,S=p(M,10),M=_,_=P}var x=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+l+w|0,this._d=this._e+r+_|0,this._e=this._a+n+M|0,this._a=x},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=l},8914:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isValidXAddress=t.decodeXAddress=t.xAddressToClassicAddress=t.encodeXAddress=t.classicAddressToXAddress=t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const i=r(8537);Object.defineProperty(t,"codec",{enumerable:!0,get:function(){return i.codec}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}});const o=r(9282),s={MAIN:n.from([5,68]),TEST:n.from([4,147])};function a(e,t,r){if(20!==e.length)throw new Error("Account ID must be 20 bytes");const o=!1===t?0:t<=4294967295?1:2;if(2===o)throw new Error("Invalid tag");!1===t&&(t=0);const a=n.concat([r?s.TEST:s.MAIN,e,n.from([o,255&t,t>>8&255,t>>16&255,t>>24&255,0,0,0,0])]);return i.codec.encodeChecked(a)}function u(e){const t=i.codec.decodeChecked(e),r=function(e){const t=e.slice(0,2);if(s.MAIN.equals(t))return!1;if(s.TEST.equals(t))return!0;throw new Error("Invalid X-address: bad prefix")}(t);return{accountId:t.slice(2,22),tag:function(e){const t=e[22];if(t>=2)throw new Error("Unsupported X-address");return 1===t?e[23]+256*e[24]+65536*e[25]+16777216*e[26]:(o.strictEqual(t,0,"flag must be zero to indicate no tag"),o.ok(n.from("0000000000000000","hex").equals(e.slice(23,31)),"remaining bytes must be zero"),!1)}(t),test:r}}t.classicAddressToXAddress=function(e,t,r){return a(i.decodeAccountID(e),t,r)},t.encodeXAddress=a,t.xAddressToClassicAddress=function(e){const{accountId:t,tag:r,test:n}=u(e);return{classicAddress:i.encodeAccountID(t),tag:r,test:n}},t.decodeXAddress=u,t.isValidXAddress=function(e){try{u(e)}catch(e){return!1}return!0}},9896:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatArgs=t.seqEqual=void 0,t.seqEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.concatArgs=function(...e){const t=[];return e.forEach((function(e){if(void 0!==e.length)for(let r=0;r<e.length;r++)t.push(e[r]);else t.push(e)})),t}},8537:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.encodeNodePublic=t.decodeNodePublic=t.decodeAddress=t.decodeAccountID=t.encodeAddress=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const i=r(8162),o=r(9896),s=r(3482),a=[1,225,75],u={sha256:function(e){return s("sha256").update(n.from(e)).digest()},alphabet:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"},c=new class{constructor(e){this.sha256=e.sha256,this.alphabet=e.alphabet,this.codec=i(this.alphabet),this.base=this.alphabet.length}encode(e,t){const r=t.versions;return this.encodeVersioned(e,r,t.expectedLength)}encodeVersioned(e,t,r){if(r&&e.length!==r)throw new Error("unexpected_payload_length: bytes.length does not match expectedLength. Ensure that the bytes are a Buffer.");return this.encodeChecked(n.from(o.concatArgs(t,e)))}encodeChecked(e){const t=this.sha256(this.sha256(e)).slice(0,4);return this.encodeRaw(n.from(o.concatArgs(e,t)))}encodeRaw(e){return this.codec.encode(e)}decode(e,t){const r=t.versions,n=t.versionTypes,i=this.decodeChecked(e);if(r.length>1&&!t.expectedLength)throw new Error("expectedLength is required because there are >= 2 possible versions");const s="number"==typeof r[0]?1:r[0].length,a=t.expectedLength||i.length-s,u=i.slice(0,-a),c=i.slice(-a);for(let e=0;e<r.length;e++){const t=Array.isArray(r[e])?r[e]:[r[e]];if(o.seqEqual(u,t))return{version:t,bytes:c,type:n?n[e]:null}}throw new Error("version_invalid: version bytes do not match any of the provided version(s)")}decodeChecked(e){const t=this.decodeRaw(e);if(t.length<5)throw new Error("invalid_input_size: decoded data must have length >= 5");if(!this.verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}decodeRaw(e){return this.codec.decode(e)}verifyCheckSum(e){const t=this.sha256(this.sha256(e.slice(0,-4))).slice(0,4),r=e.slice(-4);return o.seqEqual(t,r)}}(u);function h(e){return c.encode(e,{versions:[0],expectedLength:20})}function f(e){return c.decode(e,{versions:[0],expectedLength:20}).bytes}t.codec=c,t.encodeSeed=function(e,t){if(16!==e.length)throw new Error("entropy must have length 16");const r={expectedLength:16,versions:"ed25519"===t?a:[33]};return c.encode(e,r)},t.decodeSeed=function(e,t={versionTypes:["ed25519","secp256k1"],versions:[a,33],expectedLength:16}){return c.decode(e,t)},t.encodeAccountID=h,t.encodeAddress=h,t.decodeAccountID=f,t.decodeAddress=f,t.decodeNodePublic=function(e){return c.decode(e,{versions:[28],expectedLength:33}).bytes},t.encodeNodePublic=function(e){return c.encode(e,{versions:[28],expectedLength:33})},t.encodeAccountPublic=function(e){return c.encode(e,{versions:[35],expectedLength:33})},t.decodeAccountPublic=function(e){return c.decode(e,{versions:[35],expectedLength:33}).bytes},t.isValidClassicAddress=function(e){try{f(e)}catch(e){return!1}return!0}},2509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.binaryToJSON=t.signingClaimData=t.signingData=t.multiSigningData=t.readJSON=t.serializeObject=t.makeParser=t.BytesList=t.BinarySerializer=t.BinaryParser=void 0;var n=r(5003),i=r(6633);Object.defineProperty(t,"BinaryParser",{enumerable:!0,get:function(){return i.BinaryParser}});var o=r(1771),s=r(7894);Object.defineProperty(t,"BinarySerializer",{enumerable:!0,get:function(){return s.BinarySerializer}}),Object.defineProperty(t,"BytesList",{enumerable:!0,get:function(){return s.BytesList}});var a=r(9019);Object.defineProperty(t,"sha512Half",{enumerable:!0,get:function(){return a.sha512Half}}),Object.defineProperty(t,"transactionID",{enumerable:!0,get:function(){return a.transactionID}});var u=r(4736),c=function(e){return new i.BinaryParser(e)};t.makeParser=c;var h=function(e){return e.readType(n.coreTypes.STObject).toJSON()};function f(e,t){void 0===t&&(t={});var r=t.prefix,i=t.suffix,o=t.signingFieldsOnly,a=void 0!==o&&o,u=new s.BytesList;r&&u.put(r);var c=a?function(e){return e.isSigningField}:void 0;return n.coreTypes.STObject.from(e,c).toBytesSink(u),i&&u.put(i),u.toBytes()}t.readJSON=h,t.binaryToJSON=function(e){return h(c(e))},t.serializeObject=f,t.signingData=function(e,t){return void 0===t&&(t=o.HashPrefix.transactionSig),f(e,{prefix:t,signingFieldsOnly:!0})},t.signingClaimData=function(e){var t=u(String(e.amount)),r=o.HashPrefix.paymentChannelClaim,i=n.coreTypes.Hash256.from(e.channel).toBytes(),a=n.coreTypes.UInt64.from(t).toBytes(),c=new s.BytesList;return c.put(r),c.put(i),c.put(a),c.toBytes()},t.multiSigningData=function(e,t){return f(e,{prefix:o.HashPrefix.transactionMultiSig,suffix:n.coreTypes.AccountID.from(t).toBytes(),signingFieldsOnly:!0})}},8381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.types=t.ShaMap=t.HashPrefix=t.quality=t.TransactionResult=t.Type=t.LedgerEntryType=t.TransactionType=t.Field=t.ledgerHashes=t.binary=t.hashes=void 0;var n=r(4543);Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return n.Field}}),Object.defineProperty(t,"TransactionType",{enumerable:!0,get:function(){return n.TransactionType}}),Object.defineProperty(t,"LedgerEntryType",{enumerable:!0,get:function(){return n.LedgerEntryType}}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return n.Type}}),Object.defineProperty(t,"TransactionResult",{enumerable:!0,get:function(){return n.TransactionResult}});var i=r(5003);t.types=i;var o=r(2509);t.binary=o;var s=r(9059);Object.defineProperty(t,"ShaMap",{enumerable:!0,get:function(){return s.ShaMap}});var a=r(3453);t.ledgerHashes=a;var u=r(9019);t.hashes=u;var c=r(2369);Object.defineProperty(t,"quality",{enumerable:!0,get:function(){return c.quality}});var h=r(1771);Object.defineProperty(t,"HashPrefix",{enumerable:!0,get:function(){return h.HashPrefix}})},344:e=>{"use strict";e.exports=JSON.parse('{"TYPES":{"Validation":10003,"Done":-1,"Hash128":4,"Blob":7,"AccountID":8,"Amount":6,"Hash256":5,"UInt8":16,"Vector256":19,"STObject":14,"Unknown":-2,"Transaction":10001,"Hash160":17,"PathSet":18,"LedgerEntry":10002,"UInt16":1,"NotPresent":0,"UInt64":3,"UInt32":2,"STArray":15},"LEDGER_ENTRY_TYPES":{"Any":-3,"Child":-2,"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"LedgerHashes":104,"Amendments":102,"FeeSettings":115,"Escrow":117,"PayChannel":120,"DepositPreauth":112,"Check":67,"Nickname":110,"Contract":99,"GeneratorMap":103,"NegativeUNL":78},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TicketID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Generator",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Target",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Transaction",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Transaction"}],["LedgerEntry",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"LedgerEntry"}],["Validation",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Validation"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temUNCERTAIN":-266,"temUNKNOWN":-265,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}')},4543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionType=t.TransactionResult=t.LedgerEntryType=t.Type=t.Field=void 0;var n=r(344),i=r(1883),o=r(9691),s=function(){function e(e,t,r){this.name=e,this.ordinal=t,this.ordinalWidth=r,this.bytes=o.Buffer.alloc(r);for(var n=0;n<r;n++)this.bytes[r-n-1]=t>>>8*n&255}return e.prototype.toJSON=function(){return this.name},e.prototype.toBytesSink=function(e){e.put(this.bytes)},e.prototype.toBytes=function(){return this.bytes},e}(),a=function(){function e(e,t){var r=this;this.ordinalWidth=t,Object.entries(e).forEach((function(e){var n=e[0],i=e[1];r[n]=new s(n,i,t),r[i.toString()]=r[n]}))}return e.prototype.from=function(e){return e instanceof s?e:this[e]},e.prototype.fromParser=function(e){return this.from(e.readUIntN(this.ordinalWidth).toString())},e}();var u=function(){function e(e){var t=this;e.forEach((function(e){var r=e[0],a=e[1];t[r]=function(e){var t,r,a,u=e[0],c=e[1],h=n.TYPES[c.type],f=(t=h,r=c.nth,a=[],t<16?r<16?a.push(t<<4|r):a.push(t<<4,r):r<16?a.push(r,t):a.push(0,t,r),o.Buffer.from(a));return{name:u,nth:c.nth,isVariableLengthEncoded:c.isVLEncoded,isSerialized:c.isSerialized,isSigningField:c.isSigningField,ordinal:h<<16|c.nth,type:new s(c.type,h,2),header:f,associatedType:i.SerializedType}}([r,a]),t[t[r].ordinal.toString()]=t[r]}))}return e.prototype.fromString=function(e){return this[e]},e}(),c=new a(n.TYPES,2);t.Type=c;var h=new a(n.LEDGER_ENTRY_TYPES,2);t.LedgerEntryType=h;var f=new a(n.TRANSACTION_TYPES,2);t.TransactionType=f;var d=new a(n.TRANSACTION_RESULTS,1);t.TransactionResult=d;var l=new u(n.FIELDS);t.Field=l},1771:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPrefix=void 0;var n=r(9691);function i(e){var t=n.Buffer.alloc(4);return t.writeUInt32BE(e,0),t}var o={transactionID:i(1415073280),transaction:i(1397638144),accountStateEntry:i(1296846336),innerNode:i(1296649728),ledgerHeader:i(1280791040),transactionSig:i(1398036480),transactionMultiSig:i(1397576704),validation:i(1447119872),proposal:i(1347571712),paymentChannelClaim:i(1129073920)};t.HashPrefix=o},9019:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.Sha512Half=void 0;var o=r(1771),s=r(3482),a=r(9334),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hash=s("sha512"),t}return i(t,e),t.put=function(e){return(new t).put(e)},t.prototype.put=function(e){return this.hash.update(e),this},t.prototype.finish256=function(){return this.hash.digest().slice(0,32)},t.prototype.finish=function(){return new a.Hash256(this.finish256())},t}(r(7894).BytesList);function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new u;return e.forEach((function(e){return r.put(e)})),r.finish256()}t.Sha512Half=u,t.sha512Half=c,t.transactionID=function(e){return new a.Hash256(c(o.HashPrefix.transactionID,e))}},2353:(e,t,r)=>{"use strict";var n=r(9282),i=r(8381),o=r(3453),s=i.binary.signingData,a=i.binary.signingClaimData,u=i.binary.multiSigningData,c=i.binary.binaryToJSON,h=i.binary.serializeObject;e.exports={decode:function(e){return n("string"==typeof e,"binary must be a hex string"),c(e)},encode:function(e){return n("object"==typeof e),h(e).toString("hex").toUpperCase()},encodeForSigning:function(e){return n("object"==typeof e),s(e).toString("hex").toUpperCase()},encodeForSigningClaim:function(e){return n("object"==typeof e),a(e).toString("hex").toUpperCase()},encodeForMultisigning:function(e,t){return n("object"==typeof e),n.equal(e.SigningPubKey,""),u(e,t).toString("hex").toUpperCase()},encodeQuality:function(e){return n("string"==typeof e),i.quality.encode(e).toString("hex").toUpperCase()},decodeQuality:function(e){return n("string"==typeof e),i.quality.decode(e).toString()},decodeLedgerData:o.decodeLedgerData}},3453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLedgerData=t.ledgerHash=t.transactionTreeHash=t.accountStateHash=void 0;var n=r(9282),i=r(9059),o=r(1771),s=r(9019),a=r(2509),u=r(9334),c=r(409),h=r(7569),f=r(9441),d=r(7158),l=r(6633),p=r(4736);function m(e,t){var r=new i.ShaMap;return t.forEach((function(t){return r.addItem.apply(r,e(t))})),r.hash()}function y(e){return n(e.hash),[u.Hash256.from(e.hash),{hashPrefix:function(){return o.HashPrefix.transaction},toBytesSink:function(t){var r=new a.BinarySerializer(t);r.writeLengthEncoded(c.STObject.from(e)),r.writeLengthEncoded(c.STObject.from(e.metaData))}},void 0]}function g(e){var t=u.Hash256.from(e.index),r=a.serializeObject(e);return[t,{hashPrefix:function(){return o.HashPrefix.accountStateEntry},toBytesSink:function(e){e.put(r)}},void 0]}t.transactionTreeHash=function(e){return m(y,e)},t.accountStateHash=function(e){return m(g,e)},t.ledgerHash=function(e){var t=new s.Sha512Half;return t.put(o.HashPrefix.ledgerHeader),n(void 0!==e.parent_close_time),n(void 0!==e.close_flags),f.UInt32.from(e.ledger_index).toBytesSink(t),h.UInt64.from(p(String(e.total_coins))).toBytesSink(t),u.Hash256.from(e.parent_hash).toBytesSink(t),u.Hash256.from(e.transaction_hash).toBytesSink(t),u.Hash256.from(e.account_hash).toBytesSink(t),f.UInt32.from(e.parent_close_time).toBytesSink(t),f.UInt32.from(e.close_time).toBytesSink(t),d.UInt8.from(e.close_time_resolution).toBytesSink(t),d.UInt8.from(e.close_flags).toBytesSink(t),t.finish()},t.decodeLedgerData=function(e){n("string"==typeof e,"binary must be a hex string");var t=new l.BinaryParser(e);return{ledger_index:t.readUInt32(),total_coins:t.readType(h.UInt64).valueOf().toString(),parent_hash:t.readType(u.Hash256).toHex(),transaction_hash:t.readType(u.Hash256).toHex(),account_hash:t.readType(u.Hash256).toHex(),parent_close_time:t.readUInt32(),close_time:t.readUInt32(),close_time_resolution:t.readUInt8(),close_flags:t.readUInt8()}}},2369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.quality=void 0;var n=r(5003),i=r(3776),o=r(4736),s=r(9691),a=function(){function e(){}return e.encode=function(e){var t=new i.Decimal(e),r=t.e-15,s=t.times("1e"+-r).abs().toString(),a=n.coreTypes.UInt64.from(o(s)).toBytes();return a[0]=r+100,a},e.decode=function(e){var t=s.Buffer.from(e,"hex").slice(-8),r=t[0]-100;return new i.Decimal("0x"+t.slice(1).toString("hex")).times("1e"+r)},e}();t.quality=a},6633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryParser=void 0;var n=r(9282),i=r(4543),o=r(9691),s=function(){function e(e){this.bytes=o.Buffer.from(e,"hex")}return e.prototype.peek=function(){return n(0!==this.bytes.byteLength),this.bytes[0]},e.prototype.skip=function(e){n(e<=this.bytes.byteLength),this.bytes=this.bytes.slice(e)},e.prototype.read=function(e){n(e<=this.bytes.byteLength);var t=this.bytes.slice(0,e);return this.skip(e),t},e.prototype.readUIntN=function(e){return n(0<e&&e<=4,"invalid n"),this.read(e).reduce((function(e,t){return e<<8|t}))>>>0},e.prototype.readUInt8=function(){return this.readUIntN(1)},e.prototype.readUInt16=function(){return this.readUIntN(2)},e.prototype.readUInt32=function(){return this.readUIntN(4)},e.prototype.size=function(){return this.bytes.byteLength},e.prototype.end=function(e){var t=this.bytes.byteLength;return 0===t||void 0!==e&&t<=e},e.prototype.readVariableLength=function(){return this.read(this.readVariableLengthLength())},e.prototype.readVariableLengthLength=function(){var e=this.readUInt8();if(e<=192)return e;if(e<=240)return 193+256*(e-193)+this.readUInt8();if(e<=254)return 12481+65536*(e-241)+256*this.readUInt8()+this.readUInt8();throw new Error("Invalid variable length indicator")},e.prototype.readFieldOrdinal=function(){var e=this.readUInt8(),t=15&e;if(0==(e>>=4)&&(0===(e=this.readUInt8())||e<16))throw new Error("Cannot read FieldOrdinal, type_code out of range");if(0===t&&(0===(t=this.readUInt8())||t<16))throw new Error("Cannot read FieldOrdinal, field_code out of range");return e<<16|t},e.prototype.readField=function(){return i.Field.fromString(this.readFieldOrdinal().toString())},e.prototype.readType=function(e){return e.fromParser(this)},e.prototype.typeForField=function(e){return e.associatedType},e.prototype.readFieldValue=function(e){var t=this.typeForField(e);if(!t)throw new Error("unsupported: ("+e.name+", "+e.type.name+")");var r=e.isVariableLengthEncoded?this.readVariableLengthLength():void 0,n=t.fromParser(this,r);if(void 0===n)throw new Error("fromParser for ("+e.name+", "+e.type.name+") -> undefined ");return n},e.prototype.readFieldAndValue=function(){var e=this.readField();return[e,this.readFieldValue(e)]},e}();t.BinaryParser=s},7894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySerializer=t.BytesList=void 0;var n=r(9282),i=r(9691),o=function(){function e(){this.bytesArray=[]}return e.prototype.getLength=function(){return i.Buffer.concat(this.bytesArray).byteLength},e.prototype.put=function(e){var t=i.Buffer.from(e);return this.bytesArray.push(t),this},e.prototype.toBytesSink=function(e){e.put(this.toBytes())},e.prototype.toBytes=function(){return i.Buffer.concat(this.bytesArray)},e.prototype.toHex=function(){return this.toBytes().toString("hex").toUpperCase()},e}();t.BytesList=o;var s=function(){function e(e){this.sink=new o,this.sink=e}return e.prototype.write=function(e){e.toBytesSink(this.sink)},e.prototype.put=function(e){this.sink.put(e)},e.prototype.writeType=function(e,t){this.write(e.from(t))},e.prototype.writeBytesList=function(e){e.toBytesSink(this.sink)},e.prototype.encodeVariableLength=function(e){var t=i.Buffer.alloc(3);if(e<=192)return t[0]=e,t.slice(0,1);if(e<=12480)return e-=193,t[0]=193+(e>>>8),t[1]=255&e,t.slice(0,2);if(e<=918744)return e-=12481,t[0]=241+(e>>>16),t[1]=e>>8&255,t[2]=255&e,t.slice(0,3);throw new Error("Overflow error")},e.prototype.writeFieldAndValue=function(e,t){var r=e.associatedType.from(t);n(void 0!==r.toBytesSink),n(void 0!==e.name),this.sink.put(e.header),e.isVariableLengthEncoded?this.writeLengthEncoded(r):r.toBytesSink(this.sink)},e.prototype.writeLengthEncoded=function(e){var t=new o;e.toBytesSink(t),this.put(this.encodeVariableLength(t.getLength())),this.writeBytesList(t)},e}();t.BinarySerializer=s},9059:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShaMapLeaf=t.ShaMapNode=t.ShaMap=void 0;var o=r(9282),s=r(5003),a=r(1771),u=r(9019),c=r(9691),h=function(){};t.ShaMapNode=h;var f=function(e){function t(t,r){var n=e.call(this)||this;return n.index=t,n.item=r,n}return i(t,e),t.prototype.isLeaf=function(){return!0},t.prototype.isInner=function(){return!1},t.prototype.hashPrefix=function(){return void 0===this.item?c.Buffer.alloc(0):this.item.hashPrefix()},t.prototype.hash=function(){var e=u.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()},t.prototype.toBytesSink=function(e){void 0!==this.item&&this.item.toBytesSink(e),this.index.toBytesSink(e)},t}(h);t.ShaMapLeaf=f;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(function(e){function t(t){void 0===t&&(t=0);var r=e.call(this)||this;return r.depth=t,r.slotBits=0,r.branches=Array(16),r}return i(t,e),t.prototype.isInner=function(){return!0},t.prototype.isLeaf=function(){return!1},t.prototype.hashPrefix=function(){return a.HashPrefix.innerNode},t.prototype.setBranch=function(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t},t.prototype.empty=function(){return 0===this.slotBits},t.prototype.hash=function(){if(this.empty())return s.coreTypes.Hash256.ZERO_256;var e=u.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()},t.prototype.toBytesSink=function(e){for(var t=0;t<this.branches.length;t++){var r=this.branches[t];(r?r.hash():s.coreTypes.Hash256.ZERO_256).toBytesSink(e)}},t.prototype.addItem=function(e,r,n){o.strict(void 0!==e);var i=e.nibblet(this.depth),s=this.branches[i];if(void 0===s)this.setBranch(i,n||new f(e,r));else if(s instanceof f){var a=new t(this.depth+1);a.addItem(s.index,void 0,s),a.addItem(e,r,n),this.setBranch(i,a)}else{if(!(s instanceof t))throw new Error("invalid ShaMap.addItem call");s.addItem(e,r,n)}},t}(h));t.ShaMap=d},403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AccountID=void 0;var o=r(8914),s=r(9292),a=r(9691),u=/^[A-F0-9]{40}$/,c=function(e){function t(r){return e.call(this,null!=r?r:t.defaultAccountID.bytes)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return""===e?new t:u.test(e)?new t(a.Buffer.from(e,"hex")):this.fromBase58(e);throw new Error("Cannot construct AccountID from value given")},t.fromBase58=function(e){if(o.isValidXAddress(e)){var r=o.xAddressToClassicAddress(e);if(!1!==r.tag)throw new Error("Only allowed to have tag on Account or Destination");e=r.classicAddress}return new t(a.Buffer.from(o.decodeAccountID(e)))},t.prototype.toJSON=function(){return this.toBase58()},t.prototype.toBase58=function(){return o.encodeAccountID(this.bytes)},t.defaultAccountID=new t(a.Buffer.alloc(20)),t}(s.Hash160);t.AccountID=c},7829:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Amount=void 0;var o=r(3776),s=r(6633),a=r(403),u=r(729),c=r(1883),h=r(4736),f=r(9691),d=new o.Decimal("1e17"),l=new o.Decimal("1e-6"),p=h(4294967295);o.Decimal.config({toExpPos:96,toExpNeg:-112});var m=function(e){function t(r){return e.call(this,null!=r?r:t.defaultAmount.bytes)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r,n,i=f.Buffer.alloc(8);if("string"==typeof e){t.assertXrpIsValid(e);var s=h(e);return(c=[f.Buffer.alloc(4),f.Buffer.alloc(4)])[0].writeUInt32BE(Number(s.shiftRight(32)),0),c[1].writeUInt32BE(Number(s.and(p)),0),(i=f.Buffer.concat(c))[0]|=64,new t(i)}if(r=e,3===(n=Object.keys(r).sort()).length&&"currency"===n[0]&&"issuer"===n[1]&&"value"===n[2]){if(s=new o.Decimal(e.value),t.assertIouIsValid(s),s.isZero())i[0]|=128;else{var c,d=s.times("1e"+-(s.e-15)).abs().toString(),l=h(d);(c=[f.Buffer.alloc(4),f.Buffer.alloc(4)])[0].writeUInt32BE(Number(l.shiftRight(32)),0),c[1].writeUInt32BE(Number(l.and(p)),0),(i=f.Buffer.concat(c))[0]|=128,s.gt(new o.Decimal(0))&&(i[0]|=64);var m=s.e-15+97;i[0]|=m>>>2,i[1]|=(3&m)<<6}var y=u.Currency.from(e.currency).toBytes(),g=a.AccountID.from(e.issuer).toBytes();return new t(f.Buffer.concat([i,y,g]))}throw new Error("Invalid type to construct an Amount")},t.fromParser=function(e){var r=128&e.peek()?48:8;return new t(e.read(r))},t.prototype.toJSON=function(){if(this.isNative()){var e=this.bytes,r=64&e[0]?"":"-";e[0]&=63;var n=h(e.slice(0,4).readUInt32BE(0)),i=h(e.slice(4).readUInt32BE(0));return""+r+n.shiftLeft(32).or(i).toString()}var c=new s.BinaryParser(this.toString()),f=c.read(8),d=u.Currency.fromParser(c),l=a.AccountID.fromParser(c),p=f[0],m=(r=64&p?"":"-",((63&p)<<2)+((255&f[1])>>6)-97);f[0]=0,f[1]&=63;var y=new o.Decimal(r+"0x"+f.toString("hex")).times("1e"+m);return t.assertIouIsValid(y),{value:y.toString(),currency:d.toJSON(),issuer:l.toJSON()}},t.assertXrpIsValid=function(e){if(-1!==e.indexOf("."))throw new Error(e.toString()+" is an illegal amount");var t=new o.Decimal(e);if(!t.isZero()&&(t.lt(l)||t.gt(d)))throw new Error(e.toString()+" is an illegal amount")},t.assertIouIsValid=function(e){if(!e.isZero()){var t=e.precision(),r=e.e-15;if(t>16||r>80||r<-96)throw new Error("Decimal precision out of range");this.verifyNoDecimal(e)}},t.verifyNoDecimal=function(e){if(-1!==e.times("1e"+-(e.e-15)).abs().toString().indexOf("."))throw new Error("Decimal place found in integerNumberString")},t.prototype.isNative=function(){return 0==(128&this.bytes[0])},t.defaultAmount=new t(f.Buffer.from("4000000000000000","hex")),t}(c.SerializedType);t.Amount=m},8906:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Blob=void 0;var o=r(1883),s=r(9691),a=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.fromParser=function(e,r){return new t(e.read(r))},t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return new t(s.Buffer.from(e,"hex"));throw new Error("Cannot construct Blob from value given")},t}(o.SerializedType);t.Blob=a},729:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Currency=void 0;var o=r(9292),s=r(9691),a=/^[A-Z0-9]{3}$/,u=/^[A-F0-9]{40}$/;function c(e){if(!function(e){return e instanceof s.Buffer?20===e.byteLength:function(e){return 3===e.length||(t=e,u.test(t));var t}(e)}(e))throw new Error("Unsupported Currency representation: "+e);return 3===e.length?function(e){var t=s.Buffer.alloc(20);if("XRP"!==e){var r=e.split("").map((function(e){return e.charCodeAt(0)}));t.set(r,12)}return t}(e):s.Buffer.from(e,"hex")}var h=function(e){function t(r){for(var n=e.call(this,null!=r?r:t.XRP.bytes)||this,i=!0,o=n.bytes,s=n.bytes.slice(12,15),u=s.toString(),c=o.length-1;c>=0;c--)if(0!==o[c]&&12!==c&&13!==c&&14!==c){i=!1;break}var h=i&&"XRP"!==u&&a.test(u);return n._isNative=i&&"000000"===s.toString("hex"),n._iso=n._isNative?"XRP":h?u:void 0,n}return i(t,e),t.prototype.isNative=function(){return this._isNative},t.prototype.iso=function(){return this._iso},t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return new t(c(e));throw new Error("Cannot construct Currency from value given")},t.prototype.toJSON=function(){var e=this.iso();return void 0!==e?e:this.bytes.toString("hex").toUpperCase()},t.XRP=new t(s.Buffer.alloc(20)),t}(o.Hash160);t.Currency=h},7477:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash128=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.ZERO_128.bytes)||this}return i(t,e),t.width=16,t.ZERO_128=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash128=a},9292:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash160=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return r&&0===r.byteLength&&(r=t.ZERO_160.bytes),e.call(this,null!=r?r:t.ZERO_160.bytes)||this}return i(t,e),t.width=20,t.ZERO_160=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash160=a},9334:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash256=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.ZERO_256.bytes)||this}return i(t,e),t.width=32,t.ZERO_256=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash256=a},142:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;var o=r(1883),s=r(9691),a=function(e){function t(t){var r=e.call(this,t)||this;if(r.bytes.byteLength!==r.constructor.width)throw new Error("Invalid Hash length "+r.bytes.byteLength);return r}return i(t,e),t.from=function(e){if(e instanceof this)return e;if("string"==typeof e)return new this(s.Buffer.from(e,"hex"));throw new Error("Cannot construct Hash from given value")},t.fromParser=function(e,t){return new this(e.read(null!=t?t:this.width))},t.prototype.compareTo=function(e){return this.bytes.compare(this.constructor.from(e).bytes)},t.prototype.toString=function(){return this.toHex()},t.prototype.nibblet=function(e){var t=e>0?e/2|0:0,r=this.bytes[t];return e%2==0?r=(240&r)>>>4:r&=15,r},t}(o.Comparable);t.Hash=a},5003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreTypes=void 0;var n=r(4543),i=r(403),o=r(7829),s=r(8906),a=r(729),u=r(7477),c=r(9292),h=r(9334),f=r(6284),d=r(1194),l=r(409),p=r(3774),m=r(9441),y=r(7569),g=r(7158),b=r(9403),v={AccountID:i.AccountID,Amount:o.Amount,Blob:s.Blob,Currency:a.Currency,Hash128:u.Hash128,Hash160:c.Hash160,Hash256:h.Hash256,PathSet:f.PathSet,STArray:d.STArray,STObject:l.STObject,UInt8:g.UInt8,UInt16:p.UInt16,UInt32:m.UInt32,UInt64:y.UInt64,Vector256:b.Vector256};t.coreTypes=v,Object.values(n.Field).forEach((function(e){e.associatedType=v[e.type.name]})),n.Field.TransactionType.associatedType=n.TransactionType,n.Field.TransactionResult.associatedType=n.TransactionResult,n.Field.LedgerEntryType.associatedType=n.LedgerEntryType},6284:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PathSet=void 0;var o=r(403),s=r(729),a=r(6633),u=r(1883),c=r(9691),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r=[c.Buffer.from([0])];return e.account&&(r.push(o.AccountID.from(e.account).toBytes()),r[0][0]|=1),e.currency&&(r.push(s.Currency.from(e.currency).toBytes()),r[0][0]|=16),e.issuer&&(r.push(o.AccountID.from(e.issuer).toBytes()),r[0][0]|=32),new t(c.Buffer.concat(r))},t.fromParser=function(e){var r=e.readUInt8(),n=[c.Buffer.from([r])];return 1&r&&n.push(e.read(o.AccountID.width)),16&r&&n.push(e.read(s.Currency.width)),32&r&&n.push(e.read(o.AccountID.width)),new t(c.Buffer.concat(n))},t.prototype.toJSON=function(){var e,t,r,n=new a.BinaryParser(this.bytes.toString("hex")),i=n.readUInt8();1&i&&(e=o.AccountID.fromParser(n).toJSON()),16&i&&(t=s.Currency.fromParser(n).toJSON()),32&i&&(r=o.AccountID.fromParser(n).toJSON());var u={};return e&&(u.account=e),r&&(u.issuer=r),t&&(u.currency=t),u},t.prototype.type=function(){return this.bytes[0]},t}(u.SerializedType),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r=[];return e.forEach((function(e){r.push(h.from(e).toBytes())})),new t(c.Buffer.concat(r))},t.fromParser=function(e){for(var r=[];!e.end()&&(r.push(h.fromParser(e).toBytes()),0!==e.peek()&&255!==e.peek()););return new t(c.Buffer.concat(r))},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();)e.push(h.fromParser(t).toJSON());return e},t}(u.SerializedType),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&0===n.length||Array.isArray(n)&&Array.isArray(n[0])&&0===n[0].length||Array.isArray(n)&&Array.isArray(n[0])&&function(e){return void 0!==e.issuer||void 0!==e.account||void 0!==e.currency}(n[0][0])){var r=[];return e.forEach((function(e){r.push(f.from(e).toBytes()),r.push(c.Buffer.from([255]))})),r[r.length-1]=c.Buffer.from([0]),new t(c.Buffer.concat(r))}var n;throw new Error("Cannot construct PathSet from given value")},t.fromParser=function(e){for(var r=[];!e.end()&&(r.push(f.fromParser(e).toBytes()),r.push(e.read(1)),0!=r[r.length-1][0]););return new t(c.Buffer.concat(r))},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();)e.push(f.fromParser(t).toJSON()),t.skip(1);return e},t}(u.SerializedType);t.PathSet=d},1883:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Comparable=t.SerializedType=void 0;var o=r(7894),s=r(9691),a=function(){function e(e){this.bytes=s.Buffer.alloc(0),this.bytes=null!=e?e:s.Buffer.alloc(0)}return e.fromParser=function(e,t){throw new Error("fromParser not implemented")},e.from=function(e){throw new Error("from not implemented")},e.prototype.toBytesSink=function(e){e.put(this.bytes)},e.prototype.toHex=function(){return this.toBytes().toString("hex").toUpperCase()},e.prototype.toBytes=function(){if(this.bytes)return this.bytes;var e=new o.BytesList;return this.toBytesSink(e),e.toBytes()},e.prototype.toJSON=function(){return this.toHex()},e.prototype.toString=function(){return this.toHex()},e}();t.SerializedType=a;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.lt=function(e){return this.compareTo(e)<0},t.prototype.eq=function(e){return 0===this.compareTo(e)},t.prototype.gt=function(e){return this.compareTo(e)>0},t.prototype.gte=function(e){return this.compareTo(e)>-1},t.prototype.lte=function(e){return this.compareTo(e)<1},t.prototype.compareTo=function(e){throw new Error("cannot compare "+this.toString()+" and "+e.toString())},t}(a);t.Comparable=u},1194:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.STArray=void 0;var o=r(1883),s=r(409),a=r(6633),u=r(9691),c=u.Buffer.from([241]),h="ArrayEndMarker",f=u.Buffer.from([225]),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.fromParser=function(e){for(var r=[];!e.end();){var n=e.readField();if(n.name===h)break;r.push(n.header,e.readFieldValue(n).toBytes(),f)}return r.push(c),new t(u.Buffer.concat(r))},t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&(0===n.length||"object"==typeof n[0])){var r=[];return e.forEach((function(e){r.push(s.STObject.from(e).toBytes())})),r.push(c),new t(u.Buffer.concat(r))}var n;throw new Error("Cannot construct STArray from value given")},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();){var r=t.readField();if(r.name===h)break;var n={};n[r.name]=s.STObject.fromParser(t).toJSON(),e.push(n)}return e},t}(o.SerializedType);t.STArray=d},409:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.STObject=void 0;var o=r(4543),s=r(1883),a=r(8914),u=r(6633),c=r(7894),h=r(9691).Buffer.from([225]),f="ObjectEndMarker",d="STObject",l="DestinationTag",p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.fromParser=function(e){for(var r=new c.BytesList,n=new c.BinarySerializer(r);!e.end();){var i=e.readField();if(i.name===f)break;var o=e.readFieldValue(i);n.writeFieldAndValue(i,o),i.type.name===d&&n.put(h)}return new t(r.toBytes())},t.from=function(e,r){if(e instanceof t)return e;var n=new c.BytesList,i=new c.BinarySerializer(n),s=Object.entries(e).reduce((function(t,r){var n,i=r[0],o=r[1],s=void 0;return a.isValidXAddress(o)&&function(e,t){if(void 0!==e.SourceTag&&void 0!==t.SourceTag)throw new Error("Cannot have Account X-Address and SourceTag");if(void 0!==e[l]&&void 0!==t[l])throw new Error("Cannot have Destination X-Address and DestinationTag")}(s=function(e,t){var r,n,i,o=a.xAddressToClassicAddress(t);if("Destination"===e)i=l;else if("Account"===e)i="SourceTag";else if(!1!==o.tag)throw new Error(e+" cannot have an associated tag");return!1!==o.tag?((r={})[e]=o.classicAddress,r[i]=o.tag,r):((n={})[e]=o.classicAddress,n)}(i,o),e),Object.assign(t,null!=s?s:((n={})[i]=o,n))}),{}),u=Object.keys(s).map((function(e){return o.Field[e]})).filter((function(e){return void 0!==e&&void 0!==s[e.name]&&e.isSerialized})).sort((function(e,t){return e.ordinal-t.ordinal}));return void 0!==r&&(u=u.filter(r)),u.forEach((function(e){var t=e.associatedType.from(s[e.name]);i.writeFieldAndValue(e,t),e.type.name===d&&i.put(h)})),new t(n.toBytes())},t.prototype.toJSON=function(){for(var e=new u.BinaryParser(this.toString()),t={};!e.end();){var r=e.readField();if(r.name===f)break;t[r.name]=e.readFieldValue(r).toJSON()}return t},t}(s.SerializedType);t.STObject=p},3774:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt16=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt16.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if("number"==typeof e){var r=s.Buffer.alloc(t.width);return r.writeUInt16BE(e,0),new t(r)}throw new Error("Can not construct UInt16 with given value")},t.prototype.valueOf=function(){return this.bytes.readUInt16BE(0)},t.width=2,t.defaultUInt16=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt16=a},9441:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt32=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt32.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;var r=s.Buffer.alloc(t.width);if("string"==typeof e){var n=Number.parseInt(e);return r.writeUInt32BE(n,0),new t(r)}if("number"==typeof e)return r.writeUInt32BE(e,0),new t(r);throw new Error("Cannot construct UInt32 from given value")},t.prototype.valueOf=function(){return this.bytes.readUInt32BE(0)},t.width=4,t.defaultUInt32=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt32=a},7569:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt64=void 0;var o=r(6770),s=r(4736),a=r(4736),u=r(9691),c=/^[A-F0-9]{16}$/,h=s(4294967295),f=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt64.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if(u.Buffer.alloc(t.width),"number"==typeof e){if(e<0)throw new Error("value must be an unsigned integer");var r,n=s(e);return(r=[u.Buffer.alloc(4),u.Buffer.alloc(4)])[0].writeUInt32BE(Number(n.shiftRight(32)),0),r[1].writeUInt32BE(Number(n.and(h)),0),new t(u.Buffer.concat(r))}if("string"==typeof e){if("0"===e)return t.from(0);if(!c.test(e))throw new Error(e+" is not a valid hex-string");return new t(u.Buffer.from(e,"hex"))}if(a.isInstance(e))return(r=[u.Buffer.alloc(4),u.Buffer.alloc(4)])[0].writeUInt32BE(Number(e.shiftRight(s(32))),0),r[1].writeUInt32BE(Number(e.and(h)),0),new t(u.Buffer.concat(r));throw new Error("Cannot construct UInt64 from given value")},t.prototype.toJSON=function(){return this.bytes.toString("hex").toUpperCase()},t.prototype.valueOf=function(){var e=s(this.bytes.slice(0,4).readUInt32BE(0)),t=s(this.bytes.slice(4).readUInt32BE(0));return e.shiftLeft(s(32)).or(t)},t.prototype.toBytes=function(){return this.bytes},t.width=8,t.defaultUInt64=new t(u.Buffer.alloc(t.width)),t}(o.UInt);t.UInt64=f},7158:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt8=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt8.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if("number"==typeof e){var r=s.Buffer.alloc(t.width);return r.writeUInt8(e,0),new t(r)}throw new Error("Cannot construct UInt8 from given value")},t.prototype.valueOf=function(){return this.bytes.readUInt8(0)},t.width=1,t.defaultUInt8=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt8=a},6770:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt=void 0;var o=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.compareTo=function(e){return(t=this.valueOf())<(r=e.valueOf())?-1:t==r?0:1;var t,r},t.prototype.toJSON=function(){var e=this.valueOf();return"number"==typeof e?e:e.toString()},t}(r(1883).Comparable);t.UInt=o},9403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=void 0;var o=r(1883),s=r(9334),a=r(7894),u=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.fromParser=function(e,r){for(var n=new a.BytesList,i=(null!=r?r:e.size())/32,o=0;o<i;o++)s.Hash256.fromParser(e).toBytesSink(n);return new t(n.toBytes())},t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&(0===n.length||"string"==typeof n[0])){var r=new a.BytesList;return e.forEach((function(e){s.Hash256.from(e).toBytesSink(r)})),new t(r.toBytes())}var n;throw new Error("Cannot construct Vector256 from given value")},t.prototype.toJSON=function(){if(this.bytes.byteLength%32!=0)throw new Error("Invalid bytes for Vector256");for(var e=[],t=0;t<this.bytes.byteLength;t+=32)e.push(this.bytes.slice(t,t+32).toString("hex").toUpperCase());return e},t}(o.SerializedType);t.Vector256=u},9691:(e,t,r)=>{"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=function(e){if(u.isBuffer(e)){var t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return h(e),a(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:F(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function _(e,t,r,n){return U(F(t,e.length-r),e,r,n)}function M(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return M(e,t,r,n)}function A(e,t,r,n){return U(q(t),e,r,n)}function E(e,t,r,n){return U(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],h=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=f}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(z(o,Uint8Array)&&(o=u.from(o)),!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),h=e.slice(t,r),f=0;f<a;++f)if(c[f]!==h[f]){o=c[f],s=h[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return M(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function k(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=$[e[o]];return i}function I(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||B(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||B(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=u.isBuffer(e)?e:u.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+/0-9A-Za-z-_]/g;function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},9140:(e,t,r)=>{"use strict";var n=r(8764).Buffer;const i=r(9282),o=r(9931),s=r(3715),a=r(6266),u=r(8914),c=r(3342),h=r(864),f=a.eddsa("ed25519"),d=a.ec("secp256k1"),{hexToBytes:l}=h,{bytesToHex:p}=h;function m(e){return s.sha512().update(e).digest().slice(0,32)}const y={deriveKeypair(e,t){const r="00"+c.derivePrivateKey(e,t).toString(16,64).toUpperCase(),n=p(d.keyFromPrivate(r.slice(2)).getPublic().encodeCompressed());return{privateKey:r,publicKey:n}},sign:(e,t)=>p(d.sign(m(e),l(t),{canonical:!0}).toDER()),verify:(e,t,r)=>d.verify(m(e),t,l(r))},g={deriveKeypair(e){const t=m(e);return{privateKey:"ED"+p(t),publicKey:"ED"+p(f.keyFromSecret(t).pubBytes())}},sign:(e,t)=>(i(Array.isArray(e),"message must be array of octets"),p(f.sign(e,l(t).slice(1)).toBytes())),verify:(e,t,r)=>f.verify(e,l(t),l(r).slice(1))};function b(e){return{"ecdsa-secp256k1":y,ed25519:g}[e]}function v(e){const t=l(e);return 33===t.length&&237===t[0]?"ed25519":"ecdsa-secp256k1"}function w(e){return u.encodeAccountID(h.computePublicKeyHash(e))}const{decodeSeed:_}=u;e.exports={generateSeed:function(e={}){i(!e.entropy||e.entropy.length>=16,"entropy too short");const t=e.entropy?e.entropy.slice(0,16):o(16),r="ed25519"===e.algorithm?"ed25519":"secp256k1";return u.encodeSeed(t,r)},deriveKeypair:function(e,t){const r=u.decodeSeed(e),n=b("ed25519"===r.type?"ed25519":"ecdsa-secp256k1"),i=n.deriveKeypair(r.bytes,t),o=m("This test message should verify."),s=n.sign(o,i.privateKey);if(!0!==n.verify(o,s,i.publicKey))throw new Error("derived keypair did not generate verifiable signature");return i},sign:function(e,t){return b(v(t)).sign(l(e),t)},verify:function(e,t,r){return b(v(r)).verify(l(e),t,r)},deriveAddress:function(e){return w(n.from(l(e)))},deriveNodeAddress:function(e){const t=u.decodeNodePublic(e);return w(c.accountPublicFromPublicGenerator(t))},decodeSeed:_}},3342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountPublicFromPublicGenerator=t.derivePrivateKey=void 0;const n=r(6266),i=r(7268),o=n.ec("secp256k1");function s(e,t){const r=o.curve.n;for(let n=0;n<=4294967295;n++){const o=(new i.default).add(e);void 0!==t&&o.addU32(t),o.addU32(n);const s=o.first256BN();if(s.cmpn(0)>0&&s.cmp(r)<0)return s}throw new Error("impossible unicorn ;)")}t.derivePrivateKey=function(e,t={}){const r=t.validator,n=o.curve.n,i=s(e);if(r)return i;const a=o.g.mul(i),u=t.accountIndex||0;return s(a.encodeCompressed(),u).add(i).mod(n)},t.accountPublicFromPublicGenerator=function(e){const t=o.curve.decodePoint(e),r=s(e,0),n=o.g.mul(r);return t.add(n).encodeCompressed()}},7268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3715),i=r(6331);t.default=class{constructor(){this.hash=n.sha512()}add(e){return this.hash.update(e),this}addU32(e){return this.add([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}finish(){return this.hash.digest()}first256(){return this.finish().slice(0,32)}first256BN(){return new i(this.first256())}}},864:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.computePublicKeyHash=t.hexToBytes=t.bytesToHex=void 0;const i=r(9282),o=r(3715),s=r(6331);t.bytesToHex=function(e){return e.map((e=>{const t=e.toString(16).toUpperCase();return t.length>1?t:`0${t}`})).join("")},t.hexToBytes=function(e){return i(e.length%2==0),new s(e,16).toArray(null,e.length/2)},t.computePublicKeyHash=function(e){const t=o.sha256().update(e).digest(),r=o.ripemd160().update(t).digest();return n.from(r)}},6331:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(2574).Buffer}catch(e){}function a(e,t,r){for(var i=0,o=Math.min(e.length,r),s=0,a=t;a<o;a++){var u,c=e.charCodeAt(a)-48;i<<=4,i|=u=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,s|=u}return n(!(240&s),"Invalid character in "+e),i}function u(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[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<e.length;i+=3)s=e[i]|e[i+1]<<8|e[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(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=e.length-6,n=0;r>=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,h=r;h<a;h+=n)c=u(e,h,h+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var f=1;for(c=u(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){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"],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],l=[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 p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var h=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;h+=(s=(i=0|e.words[p])*(o=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,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(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;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(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;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(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,m=l>>>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,A=M>>>13,E=0|s[5],O=8191&E,P=E>>>13,x=0|s[6],T=8191&x,j=x>>>13,k=0|s[7],I=8191&k,R=k>>>13,B=0|s[8],N=8191&B,C=B>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],J=8191&X,K=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],fe=8191&he,de=he>>>13,le=0|a[9],pe=8191&le,me=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(F,J)|0,o=Math.imul(F,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Te=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var ke=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Re=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=Pe,u[12]=xe,u[13]=Te,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,f=(0|e.words[h])*(0|t.words[c]),d=67108863&f;a=67108863&(d=d+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>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 g(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,d=c,l=0;l<s;l++){var p=r[h+l],m=n[h+l],y=r[h+l+s],g=n[h+l+s],b=f*y-d*g;g=f*g+d*y,y=b,r[h+l]=p+y,n[h+l]=m+g,r[h+l+s]=p-y,n[h+l+s]=m-g,l!==a&&(b=u*f-c*d,d=u*d+c*f,f=b)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,h,f,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*f[l];u[l]=a[l]*f[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,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++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/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(e,t){var r=(this.length,e.length),n=this.clone(),i=e,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,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),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()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,w),i(S,w),i(A,w),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new M;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=y}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,E),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7865:(e,t,r)=>{"use strict";var n=r(6215),i=r(4431),o=r(306).normalizeNodes,s=r(306).dropsToXRP;function a(e){return new i(e.value||e)}function u(e){var t=null;return e.newFields.Balance?t=a(e.newFields.Balance):e.previousFields.Balance&&e.finalFields.Balance&&(t=a(e.finalFields.Balance).minus(a(e.previousFields.Balance))),null===t||t.isZero()?null:t}function c(e){return e.newFields.Balance?a(e.newFields.Balance):e.finalFields.Balance?a(e.finalFields.Balance):null}function h(e,t){var r=t(e);return null===r?null:{address:e.finalFields.Account||e.newFields.Account,balance:{counterparty:"",currency:"XRP",value:s(r).toString()}}}function f(e,t){var r,s,a=o(e).map((function(e){return"AccountRoot"===e.entryType?[h(e,t)]:"RippleState"===e.entryType?function(e,t){var r=t(e);if(null===r)return null;var o,s,a=n.isEmpty(e.newFields)?e.finalFields:e.newFields,u={address:a.LowLimit.issuer,balance:{counterparty:a.HighLimit.issuer,currency:a.Balance.currency,value:r.toString()}};return[u,(o=u,s=new i(o.balance.value).negated(),{address:o.balance.counterparty,balance:{counterparty:o.address,currency:o.balance.currency,value:s.toString()}})]}(e,t):[]}));return r=n.compact(n.flatten(a)),s=n.groupBy(r,(function(e){return e.address})),n.mapValues(s,(function(e){return n.map(e,(function(e){return e.balance}))}))}e.exports.parseBalanceChanges=function(e){return f(e,u)},e.exports.parseFinalBalances=function(e){return f(e,c)}},4634:(e,t,r)=>{"use strict";const n=r(306).normalizeNodes,i=r(4431);function o(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"modified":"DeletedNode"===e.diffType?"deleted":void 0}e.exports.parseChannelChanges=function(e){const t=n(e).filter((e=>"PayChannel"===e.entryType));return 1===t.length?function(e){const t="CreatedNode"===e.diffType?e.newFields:e.finalFields,r=e.previousFields||{},n={status:o(e),channelId:e.ledgerIndex,source:t.Account,destination:t.Destination,channelAmountDrops:new i(t.Amount||0).toString(10),channelBalanceDrops:new i(t.Balance||0).toString(10)};return r.Amount&&(n.channelAmountChangeDrops=new i(t.Amount).minus(new i(r.Amount||0)).toString(10)),r.Balance&&(n.channelBalanceChangeDrops=new i(t.Balance).minus(new i(r.Balance||0)).toString(10)),e.PreviousTxnID&&(n.previousTxnId=e.PreviousTxnID),n}(t[0]):void 0}},654:(e,t,r)=>{"use strict";e.exports.parseBalanceChanges=r(7865).parseBalanceChanges,e.exports.parseFinalBalances=r(7865).parseFinalBalances,e.exports.parseOrderbookChanges=r(4211).parseOrderbookChanges,e.exports.getAffectedAccounts=r(306).getAffectedAccounts,e.exports.parseChannelChanges=r(4634).parseChannelChanges},4211:(e,t,r)=>{"use strict";var n=r(6215),i=r(306),o=r(4431).clone({DECIMAL_PLACES:40}),s=r(4482);function a(e){var t,r=e.finalFields.Expiration||e.newFields.Expiration;if(void 0!==r)return new Date((t=r,1e3*(t+946684800))).toISOString()}function u(e){var t=e.finalFields.TakerGets||e.newFields.TakerGets,r=e.finalFields.TakerPays||e.newFields.TakerPays,n=t.currency||"XRP",i=r.currency||"XRP",o=e.finalFields.BookDirectory||e.newFields.BookDirectory,a=o.substring(o.length-16);return s(a,n,i)}function c(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"partially-filled":"DeletedNode"===e.diffType?e.previousFields.hasOwnProperty("TakerPays")?"filled":"cancelled":void 0}function h(e,t){var r=c(e);if("cancelled"===r)return i.parseCurrencyAmount(e.finalFields[t]);if("created"===r)return i.parseCurrencyAmount(e.newFields[t]);var s=i.parseCurrencyAmount(e.finalFields[t]),a=function(e,t){if(t){var r=new o(e.value),n=new o(t.value);return r.minus(n).abs().toString()}return"0"}(s,i.parseCurrencyAmount(e.previousFields[t]));return n.assign({},s,{value:a})}function f(e){var t,r,i,o,s,f=(t={taker_pays:h(e,"TakerPays"),taker_gets:h(e,"TakerGets"),sell:0!=(131072&e.finalFields.Flags),sequence:e.finalFields.Sequence||e.newFields.Sequence,status:c(e),quality:u(e),expiration:a(e)},i=t.taker_gets,o=t.taker_pays,s=t.sell?"sell":"buy",r={direction:s,quantity:"buy"===s?o:i,totalPrice:"buy"===s?i:o,sequence:t.sequence,status:t.status,makerExchangeRate:t.quality,expirationTime:t.expiration},n.omitBy(r,n.isUndefined));return Object.defineProperty(f,"account",{value:e.finalFields.Account||e.newFields.Account}),f}t.parseOrderbookChanges=function(e){var t,r=i.normalizeNodes(e);return t=n.map(n.filter(r,(function(e){return"Offer"===e.entryType})),f),n.groupBy(t,(function(e){return e.account}))}},4482:(e,t,r)=>{"use strict";var n=r(9282),i=r(4431);e.exports=function(e,t,r){n(16===e.length);var o=new i(e.substring(2),16),s=parseInt(e.substring(0,2),16)-100;return function(e,t,r){var n=("XRP"===r?-6:0)-("XRP"===t?-6:0);return 0===n?new i(e).toString():new i(e).shiftedBy(n).toString()}(o.toString()+"e"+s.toString(),t,r)}},306:(e,t,r)=>{"use strict";var n=r(6215),i=r(4431);function o(e){return e.dividedBy(1e6)}function s(e){var t=Object.keys(e)[0],r=e[t];return Object.assign({},r,{diffType:t,entryType:r.LedgerEntryType,ledgerIndex:r.LedgerIndex,newFields:r.NewFields||{},finalFields:r.FinalFields||{},previousFields:r.PreviousFields||{}})}function a(e){return e.AffectedNodes?e.AffectedNodes.map(s):[]}e.exports={dropsToXRP:o,normalizeNodes:a,parseCurrencyAmount:function(e){if(void 0!==e)return"string"==typeof e?{currency:"XRP",value:o(new i(e)).toString()}:{currency:e.currency,counterparty:e.issuer,value:e.value}},getAffectedAccounts:function(e){var t=[];return n.forEach(a(e),(function(e){var r="CreatedNode"===e.diffType?e.newFields:e.finalFields;n.forEach(r,(function(e,r){!function(e){return n.includes(["Account","Owner","Destination","Issuer","Target"],e)}(r)?function(e){return n.includes(["LowLimit","HighLimit","TakerPays","TakerGets"],e)}(r)&&e.issuer&&t.push(e.issuer):t.push(e)}))})),n.uniq(t)}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2399:(e,t,r)=>{"use strict";var n,i=r(4155),o=r(8764),s=o.Buffer,a={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=o[n]);var u=a.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=s[n]);if(a.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),u.alloc||(u.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a},4189:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),h=0;h<c;h++)r[u+h]=e[a+h];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9072:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((t=n)<<5|t>>>27)+h(l,i,o,a)+u+r[d]+s[l];u=a,a=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},8336:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function h(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),m=c(n)+f(p,i,o,a)+u+r[l]+s[p]|0;u=a,a=o,o=h(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},8432:(e,t,r)=>{var n=r(5717),i=r(7499),o=r(4189),s=r(9509).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},7499:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).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 u(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function h(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.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},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+l(r[g-15])+r[g-16];for(var b=0;b<64;++b){var v=y+d(u)+c(u,p,m)+s[b]+r[b]|0,w=f(n)+h(n,i,o)|0;y=m,m=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},1686:(e,t,r)=>{var n=r(5717),i=r(7816),o=r(4189),s=r(9509).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},7816:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).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 u(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function h(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=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,A=0|this._el,E=0|this._fl,O=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var T=t[x-30],j=t[x-30+1],k=l(T,j),I=p(j,T),R=m(T=t[x-4],j=t[x-4+1]),B=y(j,T),N=t[x-14],C=t[x-14+1],L=t[x-32],D=t[x-32+1],F=I+C|0,q=k+N+g(F,I)|0;q=(q=q+R+g(F=F+B|0,B)|0)+L+g(F=F+D|0,D)|0,t[x]=q,t[x+1]=F}for(var U=0;U<160;U+=2){q=t[U],F=t[U+1];var z=h(r,n,i),V=h(w,_,M),$=f(r,w),H=f(w,r),X=d(a,A),J=d(A,a),K=s[U],Z=s[U+1],G=c(a,u,b),W=c(A,E,O),Y=P+J|0,Q=v+X+g(Y,P)|0;Q=(Q=(Q=Q+G+g(Y=Y+W|0,W)|0)+K+g(Y=Y+Z|0,Z)|0)+q+g(Y=Y+F|0,F)|0;var ee=H+V|0,te=$+z+g(ee,H)|0;v=b,P=O,b=u,O=E,u=a,E=A,a=o+Q+g(A=S+Y|0,S)|0,o=i,S=M,i=n,M=_,n=r,_=w,r=Q+te+g(w=Y+ee|0,Y)|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+A|0,this._fl=this._fl+E|0,this._gl=this._gl+O|0,this._hl=this._hl+P|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,A)|0,this._fh=this._fh+u+g(this._fl,E)|0,this._gh=this._gh+b+g(this._gl,O)|0,this._hh=this._hh+v+g(this._hl,P)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(h(),0===n.listenerCount(this,"error"))throw e}function h(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("error",c),e.on("error",c),r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=f,t=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8575:(e,t,r)=>{"use strict";var n=r(4971),i=r(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(c),f=["%","/","?",";","#"].concat(h),d=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(7673);function v(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(v);if(_){var M=(_=_[0]).toLowerCase();this.protocol=M,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===v.substr(0,2);!S||_&&y[_]||(v=v.substr(2),this.slashes=!0)}if(!y[_]&&(S||_&&!g[_])){for(var A,E,O=-1,P=0;P<d.length;P++)-1!==(x=v.indexOf(d[P]))&&(-1===O||x<O)&&(O=x);for(-1!==(E=-1===O?v.lastIndexOf("@"):v.lastIndexOf("@",O))&&(A=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(A)),O=-1,P=0;P<f.length;P++){var x;-1!==(x=v.indexOf(f[P]))&&(-1===O||x<O)&&(O=x)}-1===O&&(O=v.length),this.host=v.slice(0,O),v=v.slice(O),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var j=this.hostname.split(/\./),k=(P=0,j.length);P<k;P++){var I=j[P];if(I&&!I.match(l)){for(var R="",B=0,N=I.length;B<N;B++)I.charCodeAt(B)>127?R+="x":R+=I[B];if(!R.match(l)){var C=j.slice(0,P),L=j.slice(P+1),D=I.match(p);D&&(C.push(D[1]),L.unshift(D[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=C.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[M])for(P=0,k=h.length;P<k;P++){var U=h[P];if(-1!==v.indexOf(U)){var z=encodeURIComponent(U);z===U&&(z=escape(U)),v=v.split(U).join(z)}}var V=v.indexOf("#");-1!==V&&(this.hash=v.substr(V),v=v.slice(0,V));var $=v.indexOf("?");if(-1!==$?(this.search=v.substr($),this.query=v.substr($+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,$)):t&&(this.search="",this.query={}),v&&(this.pathname=v),g[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var H=this.search||"";this.path=F+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var h=u[c];"protocol"!==h&&(r[h]=e[h])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var l=f[d];r[l]=e[l]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||v||r.host&&e.pathname,M=_,S=r.pathname&&r.pathname.split("/")||[],A=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===S[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return A&&(r.hostname=r.host=S.shift(),(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],O=(r.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,P=0,x=S.length;x>=0;x--)"."===(E=S[x])?S.splice(x,1):".."===E?(S.splice(x,1),P++):P&&(S.splice(x,1),P--);if(!_&&!M)for(;P--;P)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),O&&"/"!==S.join("/").substr(-1)&&S.push("");var T,j=""===S[0]||S[0]&&"/"===S[0].charAt(0);return A&&(r.hostname=r.host=j?"":S.length?S.shift():"",(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift())),(_=_||r.host&&S.length)&&!j&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},2502:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},384:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},5955:(e,t,r)=>{"use strict";var n=r(2584),i=r(8662),o=r(6430),s=r(5692);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,h=a(Object.prototype.toString),f=a(Number.prototype.valueOf),d=a(String.prototype.valueOf),l=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var m=a(Symbol.prototype.valueOf);function y(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===h(e)}function b(e){return"[object Set]"===h(e)}function v(e){return"[object WeakMap]"===h(e)}function w(e){return"[object WeakSet]"===h(e)}function _(e){return"[object ArrayBuffer]"===h(e)}function M(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===h(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}function E(e){return"[object SharedArrayBuffer]"===h(e)}function O(e){return"undefined"!=typeof SharedArrayBuffer&&(E.working?E(e):e instanceof SharedArrayBuffer)}function P(e){return y(e,f)}function x(e){return y(e,d)}function T(e){return y(e,l)}function j(e){return u&&y(e,p)}function k(e){return c&&y(e,m)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=M,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A,E.working="undefined"!=typeof SharedArrayBuffer&&E(new SharedArrayBuffer),t.isSharedArrayBuffer=O,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===h(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===h(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===h(e)},t.isGeneratorObject=function(e){return"[object Generator]"===h(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===h(e)},t.isNumberObject=P,t.isStringObject=x,t.isBooleanObject=T,t.isBigIntObject=j,t.isSymbolObject=k,t.isBoxedPrimitive=function(e){return P(e)||x(e)||T(e)||j(e)||k(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(M(e)||O(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9539:(e,t,r)=>{var n=r(4155),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])g(a)||!M(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),d(n,e,n.depth)}function h(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function f(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=d(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),A(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return l(r)}var c,h="",f=!1,M=["{","}"];return m(r)&&(f=!0,M=["[","]"]),E(r)&&(h=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(h=" "+RegExp.prototype.toString.call(r)),S(r)&&(h=" "+Date.prototype.toUTCString.call(r)),A(r)&&(h=" "+l(r)),0!==s.length||f&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)j(t,String(s))?o.push(p(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return p(e,r,n,a,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,h,M)):M[0]+h+M[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),j(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(r)?d(e,u.value,null):d(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function m(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return M(e)&&"[object RegExp]"===O(e)}function M(e){return"object"==typeof e&&null!==e}function S(e){return M(e)&&"[object Date]"===O(e)}function A(e){return M(e)&&("[object Error]"===O(e)||e instanceof Error)}function E(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(5955),t.isArray=m,t.isBoolean=y,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=M,t.isDate=S,t.types.isDate=S,t.isError=A,t.types.isNativeError=A,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(384);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(5717),t._extend=function(e,t){if(!t||!M(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),k&&Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=k,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(s.bind(null,null,e))}),(function(e){n.nextTick(I.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},6430:(e,t,r)=>{"use strict";var n=r(9804),i=r(6314),o=r(1924),s=o("Object.prototype.toString"),a=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("String.prototype.slice"),h={},f=r(4079),d=Object.getPrototypeOf;a&&f&&d&&n(u,(function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=d(t),i=f(n,Symbol.toStringTag);if(!i){var o=d(n);i=f(o,Symbol.toStringTag)}h[e]=i.get}}));var l=r(5692);e.exports=function(e){return!!l(e)&&(a?function(e){var t=!1;return n(h,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):c(s(e),8,-1))}},6215:e=>{"use strict";e.exports=_},2574:()=>{},3906:()=>{},1578:()=>{},1758:()=>{}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(3081)})();
\No newline at end of file