@chillicream/nitro-embedded 30.0.2 → 31.0.0-insider.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var us=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports);import{p as process$1,B as Buffer}from"./monaco.b80d8424.CcJBgAKd.js";var cs=us((exports,module)=>{const APP_NAME="Nitro",APP_VERSION="30.0.2",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION} (${APP_TYPE})`;getOsName();isMacLike();function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const r=navigator.userAgent.toLowerCase();return r.includes("mac os")||r.includes("ipad")}const HEADER_AUTHORIZATION="Authorization",HEADER_CONTENT_TYPE="Content-Type",HEADER_USER_AGENT="User-Agent",HTTP_SCHEME_PATTERN=/^https?:\/\//i,INTERPOLATION_VARIABLE_NAME_PATTERN=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN=/fusion-operation-plan/i,INTROSPECTION_PREFIX=/^_{2}(?!_)/i,FIFTY_MILLISECONDS=50,ONE_SECOND=1e3,FIVE_SECONDS=5e3,ONE_MINUTE=6e4,ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(n,i){this.#e=n,this.#t=i}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(n){return this.#e.dispatchEvent(n)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const n=this;let i=!1;return this.#r=new Promise((a,u)=>{if(n.aborted){i=!0,u(TIMEOUT_ABORT_ERROR);return}if(n.cancelled){i=!0,a();return}function s(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),i||(i=!0,u(TIMEOUT_ABORT_ERROR))}function l(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),i||(i=!0,a())}n.addEventListener("abort",s),n.addEventListener("cancelled",l)}),this.#r}addEventListener(n,i,a){this.#e.addEventListener(n,i,a)}removeEventListener(n,i,a){this.#e.removeEventListener(n,i,a)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(n){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},n)}get signal(){return this._signal}abort(n){this._controller.abort(n)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(r){return r instanceof DOMException&&r.name===ABORT_ERROR_NAME}function isTimeoutAbortError(r){return isAbortError(r)&&r.message===TIMEOUT_ABORT_ERROR_MESSAGE}function createAbortScope(r,n,i){return i?i.aborted?Promise.reject(ABORT_ERROR):(i.addEventListener("abort",r),n().finally(()=>{i.removeEventListener("abort",r)})):n()}function distinct(r){return r.filter((n,i,a)=>a.indexOf(n)===i)}function isObjectArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="object"&&!Array.isArray(n))}function isStringArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="string")}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function getAugmentedNamespace(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var n=r.default;if(typeof n=="function"){var i=function a(){var u=!1;try{u=this instanceof a}catch{}return u?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var u=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(i,a,u.get?u:{enumerable:!0,get:function(){return r[a]}})}),i}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(n,i){if(i){n.super_=i;var a=function(){};a.prototype=i.prototype,n.prototype=new a,n.prototype.constructor=n}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var n={},i={};i.byteLength=v,i.toByteArray=Rn,i.fromByteArray=Hn;for(var a=[],u=[],s=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,on=l.length;D<on;++D)a[D]=l[D],u[l.charCodeAt(D)]=D;u[45]=62,u[95]=63;function h(bi){var Ti=bi.length;if(Ti%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Si=bi.indexOf("=");Si===-1&&(Si=Ti);var Ii=Si===Ti?0:4-Si%4;return[Si,Ii]}function v(bi){var Ti=h(bi),Si=Ti[0],Ii=Ti[1];return(Si+Ii)*3/4-Ii}function In(bi,Ti,Si){return(Ti+Si)*3/4-Si}function Rn(bi){var Ti,Si=h(bi),Ii=Si[0],Ni=Si[1],Oi=new s(In(bi,Ii,Ni)),Fi=0,Mi=Ni>0?Ii-4:Ii,ki;for(ki=0;ki<Mi;ki+=4)Ti=u[bi.charCodeAt(ki)]<<18|u[bi.charCodeAt(ki+1)]<<12|u[bi.charCodeAt(ki+2)]<<6|u[bi.charCodeAt(ki+3)],Oi[Fi++]=Ti>>16&255,Oi[Fi++]=Ti>>8&255,Oi[Fi++]=Ti&255;return Ni===2&&(Ti=u[bi.charCodeAt(ki)]<<2|u[bi.charCodeAt(ki+1)]>>4,Oi[Fi++]=Ti&255),Ni===1&&(Ti=u[bi.charCodeAt(ki)]<<10|u[bi.charCodeAt(ki+1)]<<4|u[bi.charCodeAt(ki+2)]>>2,Oi[Fi++]=Ti>>8&255,Oi[Fi++]=Ti&255),Oi}function Mn(bi){return a[bi>>18&63]+a[bi>>12&63]+a[bi>>6&63]+a[bi&63]}function jn(bi,Ti,Si){for(var Ii,Ni=[],Oi=Ti;Oi<Si;Oi+=3)Ii=(bi[Oi]<<16&16711680)+(bi[Oi+1]<<8&65280)+(bi[Oi+2]&255),Ni.push(Mn(Ii));return Ni.join("")}function Hn(bi){for(var Ti,Si=bi.length,Ii=Si%3,Ni=[],Oi=16383,Fi=0,Mi=Si-Ii;Fi<Mi;Fi+=Oi)Ni.push(jn(bi,Fi,Fi+Oi>Mi?Mi:Fi+Oi));return Ii===1?(Ti=bi[Si-1],Ni.push(a[Ti>>2]+a[Ti<<4&63]+"==")):Ii===2&&(Ti=(bi[Si-2]<<8)+bi[Si-1],Ni.push(a[Ti>>10]+a[Ti>>4&63]+a[Ti<<2&63]+"=")),Ni.join("")}var hi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */hi.read=function(bi,Ti,Si,Ii,Ni){var Oi,Fi,Mi=Ni*8-Ii-1,ki=(1<<Mi)-1,Ci=ki>>1,Ei=-7,vi=Si?Ni-1:0,Ln=Si?-1:1,Yn=bi[Ti+vi];for(vi+=Ln,Oi=Yn&(1<<-Ei)-1,Yn>>=-Ei,Ei+=Mi;Ei>0;Oi=Oi*256+bi[Ti+vi],vi+=Ln,Ei-=8);for(Fi=Oi&(1<<-Ei)-1,Oi>>=-Ei,Ei+=Ii;Ei>0;Fi=Fi*256+bi[Ti+vi],vi+=Ln,Ei-=8);if(Oi===0)Oi=1-Ci;else{if(Oi===ki)return Fi?NaN:(Yn?-1:1)*(1/0);Fi=Fi+Math.pow(2,Ii),Oi=Oi-Ci}return(Yn?-1:1)*Fi*Math.pow(2,Oi-Ii)},hi.write=function(bi,Ti,Si,Ii,Ni,Oi){var Fi,Mi,ki,Ci=Oi*8-Ni-1,Ei=(1<<Ci)-1,vi=Ei>>1,Ln=Ni===23?Math.pow(2,-24)-Math.pow(2,-77):0,Yn=Ii?0:Oi-1,mi=Ii?1:-1,gi=Ti<0||Ti===0&&1/Ti<0?1:0;for(Ti=Math.abs(Ti),isNaN(Ti)||Ti===1/0?(Mi=isNaN(Ti)?1:0,Fi=Ei):(Fi=Math.floor(Math.log(Ti)/Math.LN2),Ti*(ki=Math.pow(2,-Fi))<1&&(Fi--,ki*=2),Fi+vi>=1?Ti+=Ln/ki:Ti+=Ln*Math.pow(2,1-vi),Ti*ki>=2&&(Fi++,ki/=2),Fi+vi>=Ei?(Mi=0,Fi=Ei):Fi+vi>=1?(Mi=(Ti*ki-1)*Math.pow(2,Ni),Fi=Fi+vi):(Mi=Ti*Math.pow(2,vi-1)*Math.pow(2,Ni),Fi=0));Ni>=8;bi[Si+Yn]=Mi&255,Yn+=mi,Mi/=256,Ni-=8);for(Fi=Fi<<Ni|Mi,Ci+=Ni;Ci>0;bi[Si+Yn]=Fi&255,Yn+=mi,Fi/=256,Ci-=8);bi[Si+Yn-mi]|=gi*128};/*!
1
+ var us=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports);import{p as process$1,B as Buffer}from"./monaco.b80d8424.CcJBgAKd.js";var cs=us((exports,module)=>{const APP_NAME="Nitro",APP_VERSION="31.0.0-insider.1",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION} (${APP_TYPE})`;getOsName();isMacLike();function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const r=navigator.userAgent.toLowerCase();return r.includes("mac os")||r.includes("ipad")}const HEADER_AUTHORIZATION="Authorization",HEADER_CONTENT_TYPE="Content-Type",HEADER_USER_AGENT="User-Agent",HTTP_SCHEME_PATTERN=/^https?:\/\//i,INTERPOLATION_VARIABLE_NAME_PATTERN=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN=/fusion-operation-plan/i,INTROSPECTION_PREFIX=/^_{2}(?!_)/i,FIFTY_MILLISECONDS=50,ONE_SECOND=1e3,FIVE_SECONDS=5e3,ONE_MINUTE=6e4,ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(n,i){this.#e=n,this.#t=i}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(n){return this.#e.dispatchEvent(n)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const n=this;let i=!1;return this.#r=new Promise((a,u)=>{if(n.aborted){i=!0,u(TIMEOUT_ABORT_ERROR);return}if(n.cancelled){i=!0,a();return}function s(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),i||(i=!0,u(TIMEOUT_ABORT_ERROR))}function l(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),i||(i=!0,a())}n.addEventListener("abort",s),n.addEventListener("cancelled",l)}),this.#r}addEventListener(n,i,a){this.#e.addEventListener(n,i,a)}removeEventListener(n,i,a){this.#e.removeEventListener(n,i,a)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(n){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},n)}get signal(){return this._signal}abort(n){this._controller.abort(n)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(r){return r instanceof DOMException&&r.name===ABORT_ERROR_NAME}function isTimeoutAbortError(r){return isAbortError(r)&&r.message===TIMEOUT_ABORT_ERROR_MESSAGE}function createAbortScope(r,n,i){return i?i.aborted?Promise.reject(ABORT_ERROR):(i.addEventListener("abort",r),n().finally(()=>{i.removeEventListener("abort",r)})):n()}function distinct(r){return r.filter((n,i,a)=>a.indexOf(n)===i)}function isObjectArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="object"&&!Array.isArray(n))}function isStringArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="string")}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function getAugmentedNamespace(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var n=r.default;if(typeof n=="function"){var i=function a(){var u=!1;try{u=this instanceof a}catch{}return u?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var u=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(i,a,u.get?u:{enumerable:!0,get:function(){return r[a]}})}),i}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(n,i){if(i){n.super_=i;var a=function(){};a.prototype=i.prototype,n.prototype=new a,n.prototype.constructor=n}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var n={},i={};i.byteLength=v,i.toByteArray=Rn,i.fromByteArray=Hn;for(var a=[],u=[],s=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,on=l.length;D<on;++D)a[D]=l[D],u[l.charCodeAt(D)]=D;u[45]=62,u[95]=63;function h(bi){var Ti=bi.length;if(Ti%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Si=bi.indexOf("=");Si===-1&&(Si=Ti);var Ii=Si===Ti?0:4-Si%4;return[Si,Ii]}function v(bi){var Ti=h(bi),Si=Ti[0],Ii=Ti[1];return(Si+Ii)*3/4-Ii}function In(bi,Ti,Si){return(Ti+Si)*3/4-Si}function Rn(bi){var Ti,Si=h(bi),Ii=Si[0],Ni=Si[1],Oi=new s(In(bi,Ii,Ni)),Fi=0,Mi=Ni>0?Ii-4:Ii,ki;for(ki=0;ki<Mi;ki+=4)Ti=u[bi.charCodeAt(ki)]<<18|u[bi.charCodeAt(ki+1)]<<12|u[bi.charCodeAt(ki+2)]<<6|u[bi.charCodeAt(ki+3)],Oi[Fi++]=Ti>>16&255,Oi[Fi++]=Ti>>8&255,Oi[Fi++]=Ti&255;return Ni===2&&(Ti=u[bi.charCodeAt(ki)]<<2|u[bi.charCodeAt(ki+1)]>>4,Oi[Fi++]=Ti&255),Ni===1&&(Ti=u[bi.charCodeAt(ki)]<<10|u[bi.charCodeAt(ki+1)]<<4|u[bi.charCodeAt(ki+2)]>>2,Oi[Fi++]=Ti>>8&255,Oi[Fi++]=Ti&255),Oi}function Mn(bi){return a[bi>>18&63]+a[bi>>12&63]+a[bi>>6&63]+a[bi&63]}function jn(bi,Ti,Si){for(var Ii,Ni=[],Oi=Ti;Oi<Si;Oi+=3)Ii=(bi[Oi]<<16&16711680)+(bi[Oi+1]<<8&65280)+(bi[Oi+2]&255),Ni.push(Mn(Ii));return Ni.join("")}function Hn(bi){for(var Ti,Si=bi.length,Ii=Si%3,Ni=[],Oi=16383,Fi=0,Mi=Si-Ii;Fi<Mi;Fi+=Oi)Ni.push(jn(bi,Fi,Fi+Oi>Mi?Mi:Fi+Oi));return Ii===1?(Ti=bi[Si-1],Ni.push(a[Ti>>2]+a[Ti<<4&63]+"==")):Ii===2&&(Ti=(bi[Si-2]<<8)+bi[Si-1],Ni.push(a[Ti>>10]+a[Ti>>4&63]+a[Ti<<2&63]+"=")),Ni.join("")}var hi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */hi.read=function(bi,Ti,Si,Ii,Ni){var Oi,Fi,Mi=Ni*8-Ii-1,ki=(1<<Mi)-1,Ci=ki>>1,Ei=-7,vi=Si?Ni-1:0,Ln=Si?-1:1,Yn=bi[Ti+vi];for(vi+=Ln,Oi=Yn&(1<<-Ei)-1,Yn>>=-Ei,Ei+=Mi;Ei>0;Oi=Oi*256+bi[Ti+vi],vi+=Ln,Ei-=8);for(Fi=Oi&(1<<-Ei)-1,Oi>>=-Ei,Ei+=Ii;Ei>0;Fi=Fi*256+bi[Ti+vi],vi+=Ln,Ei-=8);if(Oi===0)Oi=1-Ci;else{if(Oi===ki)return Fi?NaN:(Yn?-1:1)*(1/0);Fi=Fi+Math.pow(2,Ii),Oi=Oi-Ci}return(Yn?-1:1)*Fi*Math.pow(2,Oi-Ii)},hi.write=function(bi,Ti,Si,Ii,Ni,Oi){var Fi,Mi,ki,Ci=Oi*8-Ni-1,Ei=(1<<Ci)-1,vi=Ei>>1,Ln=Ni===23?Math.pow(2,-24)-Math.pow(2,-77):0,Yn=Ii?0:Oi-1,mi=Ii?1:-1,gi=Ti<0||Ti===0&&1/Ti<0?1:0;for(Ti=Math.abs(Ti),isNaN(Ti)||Ti===1/0?(Mi=isNaN(Ti)?1:0,Fi=Ei):(Fi=Math.floor(Math.log(Ti)/Math.LN2),Ti*(ki=Math.pow(2,-Fi))<1&&(Fi--,ki*=2),Fi+vi>=1?Ti+=Ln/ki:Ti+=Ln*Math.pow(2,1-vi),Ti*ki>=2&&(Fi++,ki/=2),Fi+vi>=Ei?(Mi=0,Fi=Ei):Fi+vi>=1?(Mi=(Ti*ki-1)*Math.pow(2,Ni),Fi=Fi+vi):(Mi=Ti*Math.pow(2,vi-1)*Math.pow(2,Ni),Fi=0));Ni>=8;bi[Si+Yn]=Mi&255,Yn+=mi,Mi/=256,Ni-=8);for(Fi=Fi<<Ni|Mi,Ci+=Ni;Ci>0;bi[Si+Yn]=Fi&255,Yn+=mi,Fi/=256,Ci-=8);bi[Si+Yn-mi]|=gi*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -94,7 +94,7 @@ in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",cate
94
94
  `,jn)}return{formatted:Mn,cursorOffset:Rn,comments:v.comments}}function tr(r,n,i){return typeof n!="number"||Number.isNaN(n)||n<0||n>r.length?i:n}function ru(r,n){let{cursorOffset:i,rangeStart:a,rangeEnd:u}=n;return i=tr(r,i,-1),a=tr(r,a,0),u=tr(r,u,r.length),{...n,cursorOffset:i,rangeStart:a,rangeEnd:u}}function iu(r,n){let{cursorOffset:i,rangeStart:a,rangeEnd:u,endOfLine:s}=ru(r,n),l=r.charAt(0)===uu;if(l&&(r=r.slice(1),i--,a--,u--),s==="auto"&&(s=Fr(r)),r.includes("\r")){let D=on=>wt(r.slice(0,Math.max(on,0)),`\r
95
95
  `);i-=D(i),a-=D(a),u-=D(u),r=mr$1(r)}return{hasBOM:l,text:r,options:ru(r,{...n,cursorOffset:i,rangeStart:a,rangeEnd:u,endOfLine:s})}}async function nu(r,n){let i=await ht(n);return!i.hasPragma||i.hasPragma(r)}async function rr(r,n){let{hasBOM:i,text:a,options:u}=iu(r,await se(n));if(u.rangeStart>=u.rangeEnd&&a!==""||u.requirePragma&&!await nu(a,u))return{formatted:r,cursorOffset:n.cursorOffset,comments:[]};let s;return u.rangeStart>0||u.rangeEnd<a.length?s=await Uo(a,u):(!u.requirePragma&&u.insertPragma&&u.printer.insertPragma&&!await nu(a,u)&&(a=u.printer.insertPragma(a)),s=await ou(a,u)),i&&(s.formatted=uu+s.formatted,s.cursorOffset>=0&&s.cursorOffset++),s}async function su(r,n,i){let{text:a,options:u}=iu(r,await se(n)),s=await ce(a,u);return i&&(i.preprocessForPrint&&(s.ast=await Qt(s.ast,u)),i.massage&&(s.ast=qn(s.ast,u))),s}async function au(r,n){n=await se(n);let i=await Ye(r,n);return Fe(i,n)}async function Du(r,n){let i=Or(r),{formatted:a}=await rr(i,{...n,parser:"__js_expression"});return a}async function lu(r,n){n=await se(n);let{ast:i}=await ce(r,n);return Ye(i,n)}async function cu(r,n){return Fe(r,await se(n))}var nr={};We(nr,{builders:()=>Go,printer:()=>Ko,utils:()=>qo});var Go={join:be,line:Ke,softline:vr,hardline:q,literalline:qe,group:_t,conditionalGroup:Ar,fill:Ge,lineSuffix:xe,lineSuffixBoundary:xr,cursor:ve,breakParent:de,ifBreak:Br,trim:_r,indent:De,indentIfBreak:wr,align:ae,addAlignmentToDoc:Je,markAsRoot:gr,dedentToRoot:Cr,dedent:yr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:vt,label:br,concat:r=>r},Ko={printDocToString:Fe},qo={willBreak:Ir,traverseDoc:we,findInDoc:Xe,mapDoc:Ne,removeLines:Yr,stripTrailingHardline:Ze,replaceEndOfLine:jr,canBreak:Hr},fu="3.3.3",or={};We(or,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>oe,getAlignmentSize:()=>me,getIndentSize:()=>pu,getMaxContinuousCount:()=>du,getNextNonSpaceNonCommentCharacter:()=>Fu,getNextNonSpaceNonCommentCharacterIndex:()=>si,getStringWidth:()=>Oe,hasNewline:()=>V,hasNewlineInRange:()=>mu,hasSpaces:()=>Eu,isNextLineEmpty:()=>ci,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>Di,makeString:()=>hu,skip:()=>Ee,skipEverythingButNewLine:()=>nt,skipInlineComment:()=>Ce,skipNewline:()=>M,skipSpaces:()=>T,skipToLineEnd:()=>rt,skipTrailingComment:()=>ge,skipWhitespace:()=>zr});function Jo(r,n){if(n===!1)return!1;if(r.charAt(n)==="/"&&r.charAt(n+1)==="*"){for(let i=n+2;i<r.length;++i)if(r.charAt(i)==="*"&&r.charAt(i+1)==="/")return i+2}return n}var Ce=Jo;function Xo(r,n){return n===!1?!1:r.charAt(n)==="/"&&r.charAt(n+1)==="/"?nt(r,n):n}var ge=Xo;function Zo(r,n){let i=null,a=n;for(;a!==i;)i=a,a=T(r,a),a=Ce(r,a),a=ge(r,a),a=M(r,a);return a}var je=Zo;function Qo(r,n){let i=null,a=n;for(;a!==i;)i=a,a=rt(r,a),a=Ce(r,a),a=T(r,a);return a=ge(r,a),a=M(r,a),a!==!1&&V(r,a)}var gt=Qo;function ei(r,n){let i=r.lastIndexOf(`
96
96
  `);return i===-1?0:me(r.slice(i+1).match(/^[\t ]*/u)[0],n)}var pu=ei;function ur(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ti(r,n){let i=r.match(new RegExp(`(${ur(n)})+`,"gu"));return i===null?0:i.reduce((a,u)=>Math.max(a,u.length/n.length),0)}var du=ti;function ri(r,n){let i=je(r,n);return i===!1?"":r.charAt(i)}var Fu=ri;function ni(r,n,i){for(let a=n;a<i;++a)if(r.charAt(a)===`
97
- `)return!0;return!1}var mu=ni;function ui(r,n,i={}){return T(r,i.backwards?n-1:n,i)!==n}var Eu=ui;function oi(r,n,i){let a=n==='"'?"'":'"',u=ne(!1,r,/\\(.)|(["'])/gsu,(s,l,D)=>l===a?l:D===n?"\\"+D:D||(i&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return n+u+n}var hu=oi;function ii(r,n,i){return je(r,i(n))}function si(r,n){return arguments.length===2||typeof n=="number"?je(r,n):ii(...arguments)}function ai(r,n,i){return Le(r,i(n))}function Di(r,n){return arguments.length===2||typeof n=="number"?Le(r,n):ai(...arguments)}function li(r,n,i){return gt(r,i(n))}function ci(r,n){return arguments.length===2||typeof n=="number"?gt(r,n):li(...arguments)}function fe(r,n=1){return async(...i)=>{let a=i[n]??{},u=a.plugins??[];return i[n]={...a,plugins:Array.isArray(u)?u:Object.values(u)},r(...i)}}var Cu=fe(rr);async function gu(r,n){let{formatted:i}=await Cu(r,{...n,cursorOffset:-1});return i}async function fi(r,n){return await gu(r,n)===r}var pi=fe(ot,0),di={parse:fe(su),formatAST:fe(au),formatDoc:fe(Du),printToDoc:fe(lu),printDocToString:fe(cu)};function delay(r){return new Promise(n=>void self.setTimeout(n,r))}function isSessionExpired(r,n=ONE_MINUTE){return msUntilSessionExpired(r,n)<1}function msUntilSessionExpired(r,n=ONE_MINUTE){return r.expiresAt-now()-n}const instanceOfAny=(r,n)=>n.some(i=>r instanceof i);let idbProxyableTypes,cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap,transactionDoneMap=new WeakMap,transactionStoreNamesMap=new WeakMap,transformCache=new WeakMap,reverseTransformCache=new WeakMap;function promisifyRequest(r){const n=new Promise((i,a)=>{const u=()=>{r.removeEventListener("success",s),r.removeEventListener("error",l)},s=()=>{i(wrap$1(r.result)),u()},l=()=>{a(r.error),u()};r.addEventListener("success",s),r.addEventListener("error",l)});return n.then(i=>{i instanceof IDBCursor&&cursorRequestMap.set(i,r)}).catch(()=>{}),reverseTransformCache.set(n,r),n}function cacheDonePromiseForTransaction(r){if(transactionDoneMap.has(r))return;const n=new Promise((i,a)=>{const u=()=>{r.removeEventListener("complete",s),r.removeEventListener("error",l),r.removeEventListener("abort",l)},s=()=>{i(),u()},l=()=>{a(r.error||new DOMException("AbortError","AbortError")),u()};r.addEventListener("complete",s),r.addEventListener("error",l),r.addEventListener("abort",l)});transactionDoneMap.set(r,n)}let idbProxyTraps={get(r,n,i){if(r instanceof IDBTransaction){if(n==="done")return transactionDoneMap.get(r);if(n==="objectStoreNames")return r.objectStoreNames||transactionStoreNamesMap.get(r);if(n==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return wrap$1(r[n])},set(r,n,i){return r[n]=i,!0},has(r,n){return r instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in r}};function replaceTraps(r){idbProxyTraps=r(idbProxyTraps)}function wrapFunction(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(n,...i){const a=r.call(unwrap(this),n,...i);return transactionStoreNamesMap.set(a,n.sort?n.sort():[n]),wrap$1(a)}:getCursorAdvanceMethods().includes(r)?function(...n){return r.apply(unwrap(this),n),wrap$1(cursorRequestMap.get(this))}:function(...n){return wrap$1(r.apply(unwrap(this),n))}}function transformCachableValue(r){return typeof r=="function"?wrapFunction(r):(r instanceof IDBTransaction&&cacheDonePromiseForTransaction(r),instanceOfAny(r,getIdbProxyableTypes())?new Proxy(r,idbProxyTraps):r)}function wrap$1(r){if(r instanceof IDBRequest)return promisifyRequest(r);if(transformCache.has(r))return transformCache.get(r);const n=transformCachableValue(r);return n!==r&&(transformCache.set(r,n),reverseTransformCache.set(n,r)),n}const unwrap=r=>reverseTransformCache.get(r);function openDB(r,n,{blocked:i,upgrade:a,blocking:u,terminated:s}={}){const l=indexedDB.open(r,n),D=wrap$1(l);return a&&l.addEventListener("upgradeneeded",on=>{a(wrap$1(l.result),on.oldVersion,on.newVersion,wrap$1(l.transaction),on)}),i&&l.addEventListener("blocked",on=>i(on.oldVersion,on.newVersion,on)),D.then(on=>{s&&on.addEventListener("close",()=>s()),u&&on.addEventListener("versionchange",h=>u(h.oldVersion,h.newVersion,h))}).catch(()=>{}),D}const readMethods=["get","getKey","getAll","getAllKeys","count"],writeMethods=["put","add","delete","clear"],cachedMethods=new Map;function getMethod(r,n){if(!(r instanceof IDBDatabase&&!(n in r)&&typeof n=="string"))return;if(cachedMethods.get(n))return cachedMethods.get(n);const i=n.replace(/FromIndex$/,""),a=n!==i,u=writeMethods.includes(i);if(!(i in(a?IDBIndex:IDBObjectStore).prototype)||!(u||readMethods.includes(i)))return;const s=async function(l,...D){const on=this.transaction(l,u?"readwrite":"readonly");let h=on.store;return a&&(h=h.index(D.shift())),(await Promise.all([h[i](...D),u&&on.done]))[0]};return cachedMethods.set(n,s),s}replaceTraps(r=>({...r,get:(n,i,a)=>getMethod(n,i)||r.get(n,i,a),has:(n,i)=>!!getMethod(n,i)||r.has(n,i)}));const advanceMethodProps=["continue","continuePrimaryKey","advance"],methodMap={},advanceResults=new WeakMap,ittrProxiedCursorToOriginalProxy=new WeakMap,cursorIteratorTraps={get(r,n){if(!advanceMethodProps.includes(n))return r[n];let i=methodMap[n];return i||(i=methodMap[n]=function(...a){advanceResults.set(this,ittrProxiedCursorToOriginalProxy.get(this)[n](...a))}),i}};async function*iterate(...r){let n=this;if(n instanceof IDBCursor||(n=await n.openCursor(...r)),!n)return;n=n;const i=new Proxy(n,cursorIteratorTraps);for(ittrProxiedCursorToOriginalProxy.set(i,n),reverseTransformCache.set(i,unwrap(n));n;)yield i,n=await(advanceResults.get(i)||n.continue()),advanceResults.delete(i)}function isIteratorProp(r,n){return n===Symbol.asyncIterator&&instanceOfAny(r,[IDBIndex,IDBObjectStore,IDBCursor])||n==="iterate"&&instanceOfAny(r,[IDBIndex,IDBObjectStore])}replaceTraps(r=>({...r,get(n,i,a){return isIteratorProp(n,i)?iterate:r.get(n,i,a)},has(n,i){return isIteratorProp(n,i)||r.has(n,i)}}));const DB_NAME="chillicream-nitro";function getDatabaseName(){return self.appNamespace?`${DB_NAME}-${self.appNamespace}`:DB_NAME}function getEntityByKey(r,n){return openDatabaseScope(i=>i.get(r,n))}function putEntity(r,n){return openDatabaseScope(async i=>{await i.put(r,n)})}function openDatabase(){return openDB(getDatabaseName())}async function openDatabaseScope(r){const n=await openDatabase();try{return await r(n)}finally{n.close()}}async function openTransactionScope(r,n,i,a,u){const s=await createTransaction(r,n,i);try{return u?await createAbortScope(()=>s.abort("transaction aborted"),()=>a(s,r.version),u):await a(s,r.version)}finally{await s.done}}function openDatabaseWithTransactionScope(r,n,i,a){return openDatabaseScope(u=>openTransactionScope(u,r,n,i,a))}const camelizationCache=new Map;function camelizeString(r){let n=camelizationCache.get(r);return n||(n=r.split("-").reduce((i,a)=>(a&&(i!==""?(i+=a[0].toUpperCase(),i+=a.substring(1)):i=a),i),""),camelizationCache.set(r,n)),n}async function createTransaction(r,n,i){const a=r.transaction(n,i),u={},s={};for(const l of n){const D=a.objectStore(l),on=camelizeString(l);u[on]=D,s[on]={};for(const h of D.indexNames)s[on][h]=D.index(h)}return{abort:l=>abortWithError(a,l),done:a.done.catch(l=>{if(!isAbortError(l))throw l}),store:u,index:s}}function abortWithError(r,n){throw r.abort(),new Error(n)}globalThis.idbGet=function(r,n){return openDatabaseScope(async i=>{console.log("IDB_GET",{store:r,key:n,data:await i.get(r,n)})})};globalThis.idbSet=function(r,n,i){return openDatabaseScope(async a=>{console.log("IDB_SET",{store:r,key:i,value:n,result:await a.put(r,n,i)})})};async function getUserSession({sub:r,tenant:n,issuer:i}){return openDatabaseWithTransactionScope(["session"],"readonly",a=>a.index.session.key.get([r,n,i]))}async function replaceUserSession(r){return await putEntity("session",r),r}const APP_CURRENT_TENANT="current-tenant";function getCurrentTenant(){return getEntityByKey("app",APP_CURRENT_TENANT)}var cryptoJs$1={exports:{}};function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}},cryptoBrowserify={},browser$b={exports:{}},hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var r=65536,n=4294967295;function i(){throw new Error(`Secure random number generation is not supported by this browser.
97
+ `)return!0;return!1}var mu=ni;function ui(r,n,i={}){return T(r,i.backwards?n-1:n,i)!==n}var Eu=ui;function oi(r,n,i){let a=n==='"'?"'":'"',u=ne(!1,r,/\\(.)|(["'])/gsu,(s,l,D)=>l===a?l:D===n?"\\"+D:D||(i&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return n+u+n}var hu=oi;function ii(r,n,i){return je(r,i(n))}function si(r,n){return arguments.length===2||typeof n=="number"?je(r,n):ii(...arguments)}function ai(r,n,i){return Le(r,i(n))}function Di(r,n){return arguments.length===2||typeof n=="number"?Le(r,n):ai(...arguments)}function li(r,n,i){return gt(r,i(n))}function ci(r,n){return arguments.length===2||typeof n=="number"?gt(r,n):li(...arguments)}function fe(r,n=1){return async(...i)=>{let a=i[n]??{},u=a.plugins??[];return i[n]={...a,plugins:Array.isArray(u)?u:Object.values(u)},r(...i)}}var Cu=fe(rr);async function gu(r,n){let{formatted:i}=await Cu(r,{...n,cursorOffset:-1});return i}async function fi(r,n){return await gu(r,n)===r}var pi=fe(ot,0),di={parse:fe(su),formatAST:fe(au),formatDoc:fe(Du),printToDoc:fe(lu),printDocToString:fe(cu)};function delay(r){return new Promise(n=>void self.setTimeout(n,r))}function isSessionExpired(r,n=ONE_MINUTE){return msUntilSessionExpired(r,n)<1}function msUntilSessionExpired(r,n=ONE_MINUTE){return r.expiresAt-now()-n}const instanceOfAny=(r,n)=>n.some(i=>r instanceof i);let idbProxyableTypes,cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap,transactionDoneMap=new WeakMap,transactionStoreNamesMap=new WeakMap,transformCache=new WeakMap,reverseTransformCache=new WeakMap;function promisifyRequest(r){const n=new Promise((i,a)=>{const u=()=>{r.removeEventListener("success",s),r.removeEventListener("error",l)},s=()=>{i(wrap$1(r.result)),u()},l=()=>{a(r.error),u()};r.addEventListener("success",s),r.addEventListener("error",l)});return n.then(i=>{i instanceof IDBCursor&&cursorRequestMap.set(i,r)}).catch(()=>{}),reverseTransformCache.set(n,r),n}function cacheDonePromiseForTransaction(r){if(transactionDoneMap.has(r))return;const n=new Promise((i,a)=>{const u=()=>{r.removeEventListener("complete",s),r.removeEventListener("error",l),r.removeEventListener("abort",l)},s=()=>{i(),u()},l=()=>{a(r.error||new DOMException("AbortError","AbortError")),u()};r.addEventListener("complete",s),r.addEventListener("error",l),r.addEventListener("abort",l)});transactionDoneMap.set(r,n)}let idbProxyTraps={get(r,n,i){if(r instanceof IDBTransaction){if(n==="done")return transactionDoneMap.get(r);if(n==="objectStoreNames")return r.objectStoreNames||transactionStoreNamesMap.get(r);if(n==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return wrap$1(r[n])},set(r,n,i){return r[n]=i,!0},has(r,n){return r instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in r}};function replaceTraps(r){idbProxyTraps=r(idbProxyTraps)}function wrapFunction(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(n,...i){const a=r.call(unwrap(this),n,...i);return transactionStoreNamesMap.set(a,n.sort?n.sort():[n]),wrap$1(a)}:getCursorAdvanceMethods().includes(r)?function(...n){return r.apply(unwrap(this),n),wrap$1(cursorRequestMap.get(this))}:function(...n){return wrap$1(r.apply(unwrap(this),n))}}function transformCachableValue(r){return typeof r=="function"?wrapFunction(r):(r instanceof IDBTransaction&&cacheDonePromiseForTransaction(r),instanceOfAny(r,getIdbProxyableTypes())?new Proxy(r,idbProxyTraps):r)}function wrap$1(r){if(r instanceof IDBRequest)return promisifyRequest(r);if(transformCache.has(r))return transformCache.get(r);const n=transformCachableValue(r);return n!==r&&(transformCache.set(r,n),reverseTransformCache.set(n,r)),n}const unwrap=r=>reverseTransformCache.get(r);function openDB(r,n,{blocked:i,upgrade:a,blocking:u,terminated:s}={}){const l=indexedDB.open(r,n),D=wrap$1(l);return a&&l.addEventListener("upgradeneeded",on=>{a(wrap$1(l.result),on.oldVersion,on.newVersion,wrap$1(l.transaction),on)}),i&&l.addEventListener("blocked",on=>i(on.oldVersion,on.newVersion,on)),D.then(on=>{s&&on.addEventListener("close",()=>s()),u&&on.addEventListener("versionchange",h=>u(h.oldVersion,h.newVersion,h))}).catch(()=>{}),D}const readMethods=["get","getKey","getAll","getAllKeys","count"],writeMethods=["put","add","delete","clear"],cachedMethods=new Map;function getMethod(r,n){if(!(r instanceof IDBDatabase&&!(n in r)&&typeof n=="string"))return;if(cachedMethods.get(n))return cachedMethods.get(n);const i=n.replace(/FromIndex$/,""),a=n!==i,u=writeMethods.includes(i);if(!(i in(a?IDBIndex:IDBObjectStore).prototype)||!(u||readMethods.includes(i)))return;const s=async function(l,...D){const on=this.transaction(l,u?"readwrite":"readonly");let h=on.store;return a&&(h=h.index(D.shift())),(await Promise.all([h[i](...D),u&&on.done]))[0]};return cachedMethods.set(n,s),s}replaceTraps(r=>({...r,get:(n,i,a)=>getMethod(n,i)||r.get(n,i,a),has:(n,i)=>!!getMethod(n,i)||r.has(n,i)}));const advanceMethodProps=["continue","continuePrimaryKey","advance"],methodMap={},advanceResults=new WeakMap,ittrProxiedCursorToOriginalProxy=new WeakMap,cursorIteratorTraps={get(r,n){if(!advanceMethodProps.includes(n))return r[n];let i=methodMap[n];return i||(i=methodMap[n]=function(...a){advanceResults.set(this,ittrProxiedCursorToOriginalProxy.get(this)[n](...a))}),i}};async function*iterate(...r){let n=this;if(n instanceof IDBCursor||(n=await n.openCursor(...r)),!n)return;n=n;const i=new Proxy(n,cursorIteratorTraps);for(ittrProxiedCursorToOriginalProxy.set(i,n),reverseTransformCache.set(i,unwrap(n));n;)yield i,n=await(advanceResults.get(i)||n.continue()),advanceResults.delete(i)}function isIteratorProp(r,n){return n===Symbol.asyncIterator&&instanceOfAny(r,[IDBIndex,IDBObjectStore,IDBCursor])||n==="iterate"&&instanceOfAny(r,[IDBIndex,IDBObjectStore])}replaceTraps(r=>({...r,get(n,i,a){return isIteratorProp(n,i)?iterate:r.get(n,i,a)},has(n,i){return isIteratorProp(n,i)||r.has(n,i)}}));const DB_NAME="chillicream-nitro-insider";function getDatabaseName(){return self.appNamespace?`${DB_NAME}-${self.appNamespace}`:DB_NAME}function getEntityByKey(r,n){return openDatabaseScope(i=>i.get(r,n))}function putEntity(r,n){return openDatabaseScope(async i=>{await i.put(r,n)})}function openDatabase(){return openDB(getDatabaseName())}async function openDatabaseScope(r){const n=await openDatabase();try{return await r(n)}finally{n.close()}}async function openTransactionScope(r,n,i,a,u){const s=await createTransaction(r,n,i);try{return u?await createAbortScope(()=>s.abort("transaction aborted"),()=>a(s,r.version),u):await a(s,r.version)}finally{await s.done}}function openDatabaseWithTransactionScope(r,n,i,a){return openDatabaseScope(u=>openTransactionScope(u,r,n,i,a))}const camelizationCache=new Map;function camelizeString(r){let n=camelizationCache.get(r);return n||(n=r.split("-").reduce((i,a)=>(a&&(i!==""?(i+=a[0].toUpperCase(),i+=a.substring(1)):i=a),i),""),camelizationCache.set(r,n)),n}async function createTransaction(r,n,i){const a=r.transaction(n,i),u={},s={};for(const l of n){const D=a.objectStore(l),on=camelizeString(l);u[on]=D,s[on]={};for(const h of D.indexNames)s[on][h]=D.index(h)}return{abort:l=>abortWithError(a,l),done:a.done.catch(l=>{if(!isAbortError(l))throw l}),store:u,index:s}}function abortWithError(r,n){throw r.abort(),new Error(n)}globalThis.idbGet=function(r,n){return openDatabaseScope(async i=>{console.log("IDB_GET",{store:r,key:n,data:await i.get(r,n)})})};globalThis.idbSet=function(r,n,i){return openDatabaseScope(async a=>{console.log("IDB_SET",{store:r,key:i,value:n,result:await a.put(r,n,i)})})};async function getUserSession({sub:r,tenant:n,issuer:i}){return openDatabaseWithTransactionScope(["session"],"readonly",a=>a.index.session.key.get([r,n,i]))}async function replaceUserSession(r){return await putEntity("session",r),r}const APP_CURRENT_TENANT="current-tenant";function getCurrentTenant(){return getEntityByKey("app",APP_CURRENT_TENANT)}var cryptoJs$1={exports:{}};function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}},cryptoBrowserify={},browser$b={exports:{}},hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var r=65536,n=4294967295;function i(){throw new Error(`Secure random number generation is not supported by this browser.
98
98
  Use Chrome, Firefox or Internet Explorer 11`)}var a=requireSafeBuffer$1().Buffer,u=commonjsGlobal.crypto||commonjsGlobal.msCrypto;u&&u.getRandomValues?browser$b.exports=s:browser$b.exports=i;function s(l,D){if(l>n)throw new RangeError("requested too many random bytes");var on=a.allocUnsafe(l);if(l>0)if(l>r)for(var h=0;h<l;h+=r)u.getRandomValues(on.slice(h,h+r));else u.getRandomValues(on);return typeof D=="function"?process$1.nextTick(function(){D(null,on)}):on}return browser$b.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var r=requireSafeBuffer$1().Buffer,n=requireReadableBrowser$1().Transform,i=requireInherits_browser();function a(s,l){if(!r.isBuffer(s)&&typeof s!="string")throw new TypeError(l+" must be a string or a buffer")}function u(s){n.call(this),this._block=r.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return i(u,n),u.prototype._transform=function(s,l,D){var on=null;try{this.update(s,l)}catch(h){on=h}D(on)},u.prototype._flush=function(s){var l=null;try{this.push(this.digest())}catch(D){l=D}s(l)},u.prototype.update=function(s,l){if(a(s,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(s)||(s=r.from(s,l));for(var D=this._block,on=0;this._blockOffset+s.length-on>=this._blockSize;){for(var h=this._blockOffset;h<this._blockSize;)D[h++]=s[on++];this._update(),this._blockOffset=0}for(;on<s.length;)D[this._blockOffset++]=s[on++];for(var v=0,In=s.length*8;In>0;++v)this._length[v]+=In,In=this._length[v]/4294967296|0,In>0&&(this._length[v]-=4294967296*In);return this},u.prototype._update=function(){throw new Error("_update is not implemented")},u.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var l=this._digest();s!==void 0&&(l=l.toString(s)),this._block.fill(0),this._blockOffset=0;for(var D=0;D<4;++D)this._length[D]=0;return l},u.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=u,hashBase$1}var ripemd160$3,hasRequiredRipemd160$2;function requireRipemd160$2(){if(hasRequiredRipemd160$2)return ripemd160$3;hasRequiredRipemd160$2=1;var r=requireDist().Buffer,n=requireInherits_browser(),i=requireHashBase$1(),a=new Array(16),u=[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],s=[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],l=[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],D=[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],on=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function v(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}n(v,i),v.prototype._update=function(){for(var yi=a,bi=0;bi<16;++bi)yi[bi]=this._block.readInt32LE(bi*4);for(var Ti=this._a|0,Si=this._b|0,Ii=this._c|0,Ni=this._d|0,Oi=this._e|0,Fi=this._a|0,Mi=this._b|0,ki=this._c|0,Ci=this._d|0,Ei=this._e|0,vi=0;vi<80;vi+=1){var Ln,Yn;vi<16?(Ln=Rn(Ti,Si,Ii,Ni,Oi,yi[u[vi]],on[0],l[vi]),Yn=hi(Fi,Mi,ki,Ci,Ei,yi[s[vi]],h[0],D[vi])):vi<32?(Ln=Mn(Ti,Si,Ii,Ni,Oi,yi[u[vi]],on[1],l[vi]),Yn=Hn(Fi,Mi,ki,Ci,Ei,yi[s[vi]],h[1],D[vi])):vi<48?(Ln=jn(Ti,Si,Ii,Ni,Oi,yi[u[vi]],on[2],l[vi]),Yn=jn(Fi,Mi,ki,Ci,Ei,yi[s[vi]],h[2],D[vi])):vi<64?(Ln=Hn(Ti,Si,Ii,Ni,Oi,yi[u[vi]],on[3],l[vi]),Yn=Mn(Fi,Mi,ki,Ci,Ei,yi[s[vi]],h[3],D[vi])):(Ln=hi(Ti,Si,Ii,Ni,Oi,yi[u[vi]],on[4],l[vi]),Yn=Rn(Fi,Mi,ki,Ci,Ei,yi[s[vi]],h[4],D[vi])),Ti=Oi,Oi=Ni,Ni=In(Ii,10),Ii=Si,Si=Ln,Fi=Ei,Ei=Ci,Ci=In(ki,10),ki=Mi,Mi=Yn}var mi=this._b+Ii+Ci|0;this._b=this._c+Ni+Ei|0,this._c=this._d+Oi+Fi|0,this._d=this._e+Ti+Mi|0,this._e=this._a+Si+ki|0,this._a=mi},v.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 yi=r.alloc?r.alloc(20):new r(20);return yi.writeInt32LE(this._a,0),yi.writeInt32LE(this._b,4),yi.writeInt32LE(this._c,8),yi.writeInt32LE(this._d,12),yi.writeInt32LE(this._e,16),yi};function In(yi,bi){return yi<<bi|yi>>>32-bi}function Rn(yi,bi,Ti,Si,Ii,Ni,Oi,Fi){return In(yi+(bi^Ti^Si)+Ni+Oi|0,Fi)+Ii|0}function Mn(yi,bi,Ti,Si,Ii,Ni,Oi,Fi){return In(yi+(bi&Ti|~bi&Si)+Ni+Oi|0,Fi)+Ii|0}function jn(yi,bi,Ti,Si,Ii,Ni,Oi,Fi){return In(yi+((bi|~Ti)^Si)+Ni+Oi|0,Fi)+Ii|0}function Hn(yi,bi,Ti,Si,Ii,Ni,Oi,Fi){return In(yi+(bi&Si|Ti&~Si)+Ni+Oi|0,Fi)+Ii|0}function hi(yi,bi,Ti,Si,Ii,Ni,Oi,Fi){return In(yi+(bi^(Ti|~Si))+Ni+Oi|0,Fi)+Ii|0}return ripemd160$3=v,ripemd160$3}var sha_js={exports:{}},isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var r={}.toString;return isarray$1=Array.isArray||function(n){return r.call(n)=="[object Array]"},isarray$1}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var r=requireWhichTypedArray();return isTypedArray=function(i){return!!r(i)},isTypedArray}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var r=requireType(),n=requireCallBound(),i=n("TypedArray.prototype.buffer",!0),a=requireIsTypedArray();return typedArrayBuffer=i||function(s){if(!a(s))throw new r("Not a Typed Array");return s.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer;hasRequiredToBuffer$1=1;var r=requireSafeBuffer$1().Buffer,n=requireIsarray$1(),i=requireTypedArrayBuffer(),a=ArrayBuffer.isView||function(on){try{return i(on),!0}catch{return!1}},u=typeof Uint8Array<"u",s=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",l=s&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);return toBuffer=function(on,h){if(on instanceof r)return on;if(typeof on=="string")return r.from(on,h);if(s&&a(on)){if(on.byteLength===0)return r.alloc(0);if(l){var v=r.from(on.buffer,on.byteOffset,on.byteLength);if(v.byteLength===on.byteLength)return v}var In=on instanceof Uint8Array?on:new Uint8Array(on.buffer,on.byteOffset,on.byteLength),Rn=r.from(In);if(Rn.length===on.byteLength)return Rn}if(u&&on instanceof Uint8Array)return r.from(on);var Mn=n(on);if(Mn)for(var jn=0;jn<on.length;jn+=1){var Hn=on[jn];if(typeof Hn!="number"||Hn<0||Hn>255||~~Hn!==Hn)throw new RangeError("Array items must be numbers in the range 0-255.")}if(Mn||r.isBuffer(on)&&on.constructor&&typeof on.constructor.isBuffer=="function"&&on.constructor.isBuffer(on))return r.from(on);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var r=requireSafeBuffer$1().Buffer,n=requireToBuffer$1();function i(a,u){this._block=r.alloc(a),this._finalSize=u,this._blockSize=a,this._len=0}return i.prototype.update=function(a,u){a=n(a,u||"utf8");for(var s=this._block,l=this._blockSize,D=a.length,on=this._len,h=0;h<D;){for(var v=on%l,In=Math.min(D-h,l-v),Rn=0;Rn<In;Rn++)s[v+Rn]=a[h+Rn];on+=In,h+=In,on%l===0&&this._update(s)}return this._len+=D,this},i.prototype.digest=function(a){var u=this._len%this._blockSize;this._block[u]=128,this._block.fill(0,u+1),u>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var l=(s&4294967295)>>>0,D=(s-l)/4294967296;this._block.writeUInt32BE(D,this._blockSize-8),this._block.writeUInt32BE(l,this._blockSize-4)}this._update(this._block);var on=this._hash();return a?on.toString(a):on},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=i,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var r=requireInherits_browser(),n=requireHash$1(),i=requireSafeBuffer$1().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);function s(){this.init(),this._w=u,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(h){return h<<5|h>>>27}function D(h){return h<<30|h>>>2}function on(h,v,In,Rn){return h===0?v&In|~v&Rn:h===2?v&In|v&Rn|In&Rn:v^In^Rn}return s.prototype._update=function(h){for(var v=this._w,In=this._a|0,Rn=this._b|0,Mn=this._c|0,jn=this._d|0,Hn=this._e|0,hi=0;hi<16;++hi)v[hi]=h.readInt32BE(hi*4);for(;hi<80;++hi)v[hi]=v[hi-3]^v[hi-8]^v[hi-14]^v[hi-16];for(var yi=0;yi<80;++yi){var bi=~~(yi/20),Ti=l(In)+on(bi,Rn,Mn,jn)+Hn+v[yi]+a[bi]|0;Hn=jn,jn=Mn,Mn=D(Rn),Rn=In,In=Ti}this._a=In+this._a|0,this._b=Rn+this._b|0,this._c=Mn+this._c|0,this._d=jn+this._d|0,this._e=Hn+this._e|0},s.prototype._hash=function(){var h=i.allocUnsafe(20);return h.writeInt32BE(this._a|0,0),h.writeInt32BE(this._b|0,4),h.writeInt32BE(this._c|0,8),h.writeInt32BE(this._d|0,12),h.writeInt32BE(this._e|0,16),h},sha$1=s,sha$1}var sha1$2,hasRequiredSha1$1;function requireSha1$1(){if(hasRequiredSha1$1)return sha1$2;hasRequiredSha1$1=1;var r=requireInherits_browser(),n=requireHash$1(),i=requireSafeBuffer$1().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);function s(){this.init(),this._w=u,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(v){return v<<1|v>>>31}function D(v){return v<<5|v>>>27}function on(v){return v<<30|v>>>2}function h(v,In,Rn,Mn){return v===0?In&Rn|~In&Mn:v===2?In&Rn|In&Mn|Rn&Mn:In^Rn^Mn}return s.prototype._update=function(v){for(var In=this._w,Rn=this._a|0,Mn=this._b|0,jn=this._c|0,Hn=this._d|0,hi=this._e|0,yi=0;yi<16;++yi)In[yi]=v.readInt32BE(yi*4);for(;yi<80;++yi)In[yi]=l(In[yi-3]^In[yi-8]^In[yi-14]^In[yi-16]);for(var bi=0;bi<80;++bi){var Ti=~~(bi/20),Si=D(Rn)+h(Ti,Mn,jn,Hn)+hi+In[bi]+a[Ti]|0;hi=Hn,Hn=jn,jn=on(Mn),Mn=Rn,Rn=Si}this._a=Rn+this._a|0,this._b=Mn+this._b|0,this._c=jn+this._c|0,this._d=Hn+this._d|0,this._e=hi+this._e|0},s.prototype._hash=function(){var v=i.allocUnsafe(20);return v.writeInt32BE(this._a|0,0),v.writeInt32BE(this._b|0,4),v.writeInt32BE(this._c|0,8),v.writeInt32BE(this._d|0,12),v.writeInt32BE(this._e|0,16),v},sha1$2=s,sha1$2}var sha256$3,hasRequiredSha256$1;function requireSha256$1(){if(hasRequiredSha256$1)return sha256$3;hasRequiredSha256$1=1;var r=requireInherits_browser(),n=requireHash$1(),i=requireSafeBuffer$1().Buffer,a=[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],u=new Array(64);function s(){this.init(),this._w=u,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function l(Rn,Mn,jn){return jn^Rn&(Mn^jn)}function D(Rn,Mn,jn){return Rn&Mn|jn&(Rn|Mn)}function on(Rn){return(Rn>>>2|Rn<<30)^(Rn>>>13|Rn<<19)^(Rn>>>22|Rn<<10)}function h(Rn){return(Rn>>>6|Rn<<26)^(Rn>>>11|Rn<<21)^(Rn>>>25|Rn<<7)}function v(Rn){return(Rn>>>7|Rn<<25)^(Rn>>>18|Rn<<14)^Rn>>>3}function In(Rn){return(Rn>>>17|Rn<<15)^(Rn>>>19|Rn<<13)^Rn>>>10}return s.prototype._update=function(Rn){for(var Mn=this._w,jn=this._a|0,Hn=this._b|0,hi=this._c|0,yi=this._d|0,bi=this._e|0,Ti=this._f|0,Si=this._g|0,Ii=this._h|0,Ni=0;Ni<16;++Ni)Mn[Ni]=Rn.readInt32BE(Ni*4);for(;Ni<64;++Ni)Mn[Ni]=In(Mn[Ni-2])+Mn[Ni-7]+v(Mn[Ni-15])+Mn[Ni-16]|0;for(var Oi=0;Oi<64;++Oi){var Fi=Ii+h(bi)+l(bi,Ti,Si)+a[Oi]+Mn[Oi]|0,Mi=on(jn)+D(jn,Hn,hi)|0;Ii=Si,Si=Ti,Ti=bi,bi=yi+Fi|0,yi=hi,hi=Hn,Hn=jn,jn=Fi+Mi|0}this._a=jn+this._a|0,this._b=Hn+this._b|0,this._c=hi+this._c|0,this._d=yi+this._d|0,this._e=bi+this._e|0,this._f=Ti+this._f|0,this._g=Si+this._g|0,this._h=Ii+this._h|0},s.prototype._hash=function(){var Rn=i.allocUnsafe(32);return Rn.writeInt32BE(this._a,0),Rn.writeInt32BE(this._b,4),Rn.writeInt32BE(this._c,8),Rn.writeInt32BE(this._d,12),Rn.writeInt32BE(this._e,16),Rn.writeInt32BE(this._f,20),Rn.writeInt32BE(this._g,24),Rn.writeInt32BE(this._h,28),Rn},sha256$3=s,sha256$3}var sha224$3,hasRequiredSha224$1;function requireSha224$1(){if(hasRequiredSha224$1)return sha224$3;hasRequiredSha224$1=1;var r=requireInherits_browser(),n=requireSha256$1(),i=requireHash$1(),a=requireSafeBuffer$1().Buffer,u=new Array(64);function s(){this.init(),this._w=u,i.call(this,64,56)}return r(s,n),s.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},s.prototype._hash=function(){var l=a.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},sha224$3=s,sha224$3}var sha512$3,hasRequiredSha512$1;function requireSha512$1(){if(hasRequiredSha512$1)return sha512$3;hasRequiredSha512$1=1;var r=requireInherits_browser(),n=requireHash$1(),i=requireSafeBuffer$1().Buffer,a=[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],u=new Array(160);function s(){this.init(),this._w=u,n.call(this,128,112)}r(s,n),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function l(Hn,hi,yi){return yi^Hn&(hi^yi)}function D(Hn,hi,yi){return Hn&hi|yi&(Hn|hi)}function on(Hn,hi){return(Hn>>>28|hi<<4)^(hi>>>2|Hn<<30)^(hi>>>7|Hn<<25)}function h(Hn,hi){return(Hn>>>14|hi<<18)^(Hn>>>18|hi<<14)^(hi>>>9|Hn<<23)}function v(Hn,hi){return(Hn>>>1|hi<<31)^(Hn>>>8|hi<<24)^Hn>>>7}function In(Hn,hi){return(Hn>>>1|hi<<31)^(Hn>>>8|hi<<24)^(Hn>>>7|hi<<25)}function Rn(Hn,hi){return(Hn>>>19|hi<<13)^(hi>>>29|Hn<<3)^Hn>>>6}function Mn(Hn,hi){return(Hn>>>19|hi<<13)^(hi>>>29|Hn<<3)^(Hn>>>6|hi<<26)}function jn(Hn,hi){return Hn>>>0<hi>>>0?1:0}return s.prototype._update=function(Hn){for(var hi=this._w,yi=this._ah|0,bi=this._bh|0,Ti=this._ch|0,Si=this._dh|0,Ii=this._eh|0,Ni=this._fh|0,Oi=this._gh|0,Fi=this._hh|0,Mi=this._al|0,ki=this._bl|0,Ci=this._cl|0,Ei=this._dl|0,vi=this._el|0,Ln=this._fl|0,Yn=this._gl|0,mi=this._hl|0,gi=0;gi<32;gi+=2)hi[gi]=Hn.readInt32BE(gi*4),hi[gi+1]=Hn.readInt32BE(gi*4+4);for(;gi<160;gi+=2){var _i=hi[gi-30],Ai=hi[gi-30+1],xi=v(_i,Ai),Ri=In(Ai,_i);_i=hi[gi-4],Ai=hi[gi-4+1];var Wn=Rn(_i,Ai),wi=Mn(Ai,_i),qi=hi[gi-14],Gi=hi[gi-14+1],ji=hi[gi-32],Li=hi[gi-32+1],$i=Ri+Gi|0,zi=xi+qi+jn($i,Ri)|0;$i=$i+wi|0,zi=zi+Wn+jn($i,wi)|0,$i=$i+Li|0,zi=zi+ji+jn($i,Li)|0,hi[gi]=zi,hi[gi+1]=$i}for(var Qi=0;Qi<160;Qi+=2){zi=hi[Qi],$i=hi[Qi+1];var Vi=D(yi,bi,Ti),Bi=D(Mi,ki,Ci),Hi=on(yi,Mi),Yi=on(Mi,yi),Ji=h(Ii,vi),ra=h(vi,Ii),aa=a[Qi],ea=a[Qi+1],Zi=l(Ii,Ni,Oi),ca=l(vi,Ln,Yn),Xi=mi+ra|0,ia=Fi+Ji+jn(Xi,mi)|0;Xi=Xi+ca|0,ia=ia+Zi+jn(Xi,ca)|0,Xi=Xi+ea|0,ia=ia+aa+jn(Xi,ea)|0,Xi=Xi+$i|0,ia=ia+zi+jn(Xi,$i)|0;var na=Yi+Bi|0,oa=Hi+Vi+jn(na,Yi)|0;Fi=Oi,mi=Yn,Oi=Ni,Yn=Ln,Ni=Ii,Ln=vi,vi=Ei+Xi|0,Ii=Si+ia+jn(vi,Ei)|0,Si=Ti,Ei=Ci,Ti=bi,Ci=ki,bi=yi,ki=Mi,Mi=Xi+na|0,yi=ia+oa+jn(Mi,Xi)|0}this._al=this._al+Mi|0,this._bl=this._bl+ki|0,this._cl=this._cl+Ci|0,this._dl=this._dl+Ei|0,this._el=this._el+vi|0,this._fl=this._fl+Ln|0,this._gl=this._gl+Yn|0,this._hl=this._hl+mi|0,this._ah=this._ah+yi+jn(this._al,Mi)|0,this._bh=this._bh+bi+jn(this._bl,ki)|0,this._ch=this._ch+Ti+jn(this._cl,Ci)|0,this._dh=this._dh+Si+jn(this._dl,Ei)|0,this._eh=this._eh+Ii+jn(this._el,vi)|0,this._fh=this._fh+Ni+jn(this._fl,Ln)|0,this._gh=this._gh+Oi+jn(this._gl,Yn)|0,this._hh=this._hh+Fi+jn(this._hl,mi)|0},s.prototype._hash=function(){var Hn=i.allocUnsafe(64);function hi(yi,bi,Ti){Hn.writeInt32BE(yi,Ti),Hn.writeInt32BE(bi,Ti+4)}return hi(this._ah,this._al,0),hi(this._bh,this._bl,8),hi(this._ch,this._cl,16),hi(this._dh,this._dl,24),hi(this._eh,this._el,32),hi(this._fh,this._fl,40),hi(this._gh,this._gl,48),hi(this._hh,this._hl,56),Hn},sha512$3=s,sha512$3}var sha384$3,hasRequiredSha384$1;function requireSha384$1(){if(hasRequiredSha384$1)return sha384$3;hasRequiredSha384$1=1;var r=requireInherits_browser(),n=requireSha512$1(),i=requireHash$1(),a=requireSafeBuffer$1().Buffer,u=new Array(160);function s(){this.init(),this._w=u,i.call(this,128,112)}return r(s,n),s.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},s.prototype._hash=function(){var l=a.allocUnsafe(48);function D(on,h,v){l.writeInt32BE(on,v),l.writeInt32BE(h,v+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),l},sha384$3=s,sha384$3}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,function(r){r.exports=function(i){var a=i.toLowerCase(),u=r.exports[a];if(!u)throw new Error(a+" is not supported (we accept pull requests)");return new u},r.exports.sha=requireSha$1(),r.exports.sha1=requireSha1$1(),r.exports.sha224=requireSha224$1(),r.exports.sha256=requireSha256$1(),r.exports.sha384=requireSha384$1(),r.exports.sha512=requireSha512$1()}(sha_js)),sha_js.exports}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=i;var r=requireEvents().EventEmitter,n=requireInherits_browser();n(i,r),i.Readable=require_stream_readable$1(),i.Writable=require_stream_writable$1(),i.Duplex=require_stream_duplex$1(),i.Transform=require_stream_transform$1(),i.PassThrough=require_stream_passthrough$1(),i.finished=requireEndOfStream(),i.pipeline=requirePipeline(),i.Stream=i;function i(){r.call(this)}return i.prototype.pipe=function(a,u){var s=this;function l(Mn){a.writable&&a.write(Mn)===!1&&s.pause&&s.pause()}s.on("data",l);function D(){s.readable&&s.resume&&s.resume()}a.on("drain",D),!a._isStdio&&(!u||u.end!==!1)&&(s.on("end",h),s.on("close",v));var on=!1;function h(){on||(on=!0,a.end())}function v(){on||(on=!0,typeof a.destroy=="function"&&a.destroy())}function In(Mn){if(Rn(),r.listenerCount(this,"error")===0)throw Mn}s.on("error",In),a.on("error",In);function Rn(){s.removeListener("data",l),a.removeListener("drain",D),s.removeListener("end",h),s.removeListener("close",v),s.removeListener("error",In),a.removeListener("error",In),s.removeListener("end",Rn),s.removeListener("close",Rn),a.removeListener("close",Rn)}return s.on("end",Rn),s.on("close",Rn),a.on("close",Rn),a.emit("pipe",s),a},streamBrowserify}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var r=requireSafeBuffer$1().Buffer,n=requireStreamBrowserify().Transform,i=requireString_decoder().StringDecoder,a=requireInherits_browser();function u(on){n.call(this),this.hashMode=typeof on=="string",this.hashMode?this[on]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}a(u,n);var s=typeof Uint8Array<"u",l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);function D(on,h){if(on instanceof r)return on;if(typeof on=="string")return r.from(on,h);if(l&&ArrayBuffer.isView(on)){if(on.byteLength===0)return r.alloc(0);var v=r.from(on.buffer,on.byteOffset,on.byteLength);if(v.byteLength===on.byteLength)return v}if(s&&on instanceof Uint8Array||r.isBuffer(on)&&on.constructor&&typeof on.constructor.isBuffer=="function"&&on.constructor.isBuffer(on))return r.from(on);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return u.prototype.update=function(on,h,v){var In=D(on,h),Rn=this._update(In);return this.hashMode?this:(v&&(Rn=this._toString(Rn,v)),Rn)},u.prototype.setAutoPadding=function(){},u.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},u.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},u.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},u.prototype._transform=function(on,h,v){var In;try{this.hashMode?this._update(on):this.push(this._update(on))}catch(Rn){In=Rn}finally{v(In)}},u.prototype._flush=function(on){var h;try{this.push(this.__final())}catch(v){h=v}on(h)},u.prototype._finalOrDigest=function(on){var h=this.__final()||r.alloc(0);return on&&(h=this._toString(h,on,!0)),h},u.prototype._toString=function(on,h,v){if(this._decoder||(this._decoder=new i(h),this._encoding=h),this._encoding!==h)throw new Error("can’t switch encodings");var In=this._decoder.write(on);return v&&(In+=this._decoder.end()),In},cipherBase=u,cipherBase}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var r=requireInherits_browser(),n=requireMd5_js(),i=requireRipemd160$2(),a=requireSha_js(),u=requireCipherBase();function s(l){u.call(this,"digest"),this._hash=l}return r(s,u),s.prototype._update=function(l){this._hash.update(l)},s.prototype._final=function(){return this._hash.digest()},browser$a=function(D){return D=D.toLowerCase(),D==="md5"?new n:D==="rmd160"||D==="ripemd160"?new i:new s(a(D))},browser$a}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var r=requireInherits_browser(),n=requireSafeBuffer$1().Buffer,i=requireCipherBase(),a=n.alloc(128),u=64;function s(l,D){i.call(this,"digest"),typeof D=="string"&&(D=n.from(D)),this._alg=l,this._key=D,D.length>u?D=l(D):D.length<u&&(D=n.concat([D,a],u));for(var on=this._ipad=n.allocUnsafe(u),h=this._opad=n.allocUnsafe(u),v=0;v<u;v++)on[v]=D[v]^54,h[v]=D[v]^92;this._hash=[on]}return r(s,i),s.prototype._update=function(l){this._hash.push(l)},s.prototype._final=function(){var l=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,l]))},legacy=s,legacy}var md5$3,hasRequiredMd5$2;function requireMd5$2(){if(hasRequiredMd5$2)return md5$3;hasRequiredMd5$2=1;var r=requireMd5_js();return md5$3=function(n){return new r().update(n).digest()},md5$3}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var r=requireInherits_browser(),n=requireLegacy(),i=requireCipherBase(),a=requireSafeBuffer$1().Buffer,u=requireMd5$2(),s=requireRipemd160$2(),l=requireSha_js(),D=a.alloc(128);function on(h,v){i.call(this,"digest"),typeof v=="string"&&(v=a.from(v));var In=h==="sha512"||h==="sha384"?128:64;if(this._alg=h,this._key=v,v.length>In){var Rn=h==="rmd160"?new s:l(h);v=Rn.update(v).digest()}else v.length<In&&(v=a.concat([v,D],In));for(var Mn=this._ipad=a.allocUnsafe(In),jn=this._opad=a.allocUnsafe(In),Hn=0;Hn<In;Hn++)Mn[Hn]=v[Hn]^54,jn[Hn]=v[Hn]^92;this._hash=h==="rmd160"?new s:l(h),this._hash.update(Mn)}return r(on,i),on.prototype._update=function(h){this._hash.update(h)},on.prototype._final=function(){var h=this._hash.digest(),v=this._alg==="rmd160"?new s:l(this._alg);return v.update(this._opad).update(h).digest()},browser$9=function(v,In){return v=v.toLowerCase(),v==="rmd160"||v==="ripemd160"?new on("rmd160",In):v==="md5"?new n(u,In):new on(v,In)},browser$9}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256$2={sign:"ecdsa",hash:"sha256",id:""},sha224$2={sign:"ecdsa",hash:"sha224",id:""},sha384$2={sign:"ecdsa",hash:"sha384",id:""},sha512$2={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"};var require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"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:sha256$2,sha224:sha224$2,sha384:sha384$2,sha512:sha512$2,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"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,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$8={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var r=Math.pow(2,30)-1;return precondition=function(n,i){if(typeof n!="number")throw new TypeError("Iterations not a number");if(n<0)throw new TypeError("Bad iterations");if(typeof i!="number")throw new TypeError("Key length not a number");if(i<0||i>r||i!==i)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var r;if(commonjsGlobal.process&&commonjsGlobal.process.browser)r="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var n=parseInt(process$1.version.split(".")[0].slice(1),10);r=n>=6?"utf-8":"binary"}else r="utf-8";return defaultEncoding_1=r,defaultEncoding_1}var makeHash,hasRequiredMakeHash;function requireMakeHash(){if(hasRequiredMakeHash)return makeHash;hasRequiredMakeHash=1;var r=4,n=new Buffer(r);n.fill(0);var i=8,a=16;function u(s){if(s.length%r!==0){var l=s.length+(r-s.length%r);s=Buffer.concat([s,n],l)}for(var D=new Array(s.length>>>2),on=0,h=0;on<s.length;on+=r,h++)D[h]=s.readInt32LE(on);return D}return makeHash=function(l,D){var on=D(u(l),l.length*i);l=new Buffer(a);for(var h=0;h<on.length;h++)l.writeInt32LE(on[h],h<<2,!0);return l},makeHash}var md5$2,hasRequiredMd5$1;function requireMd5$1(){if(hasRequiredMd5$1)return md5$2;hasRequiredMd5$1=1;var r=requireMakeHash();function n(h,v){h[v>>5]|=128<<v%32,h[(v+64>>>9<<4)+14]=v;for(var In=1732584193,Rn=-271733879,Mn=-1732584194,jn=271733878,Hn=0;Hn<h.length;Hn+=16){var hi=In,yi=Rn,bi=Mn,Ti=jn;In=a(In,Rn,Mn,jn,h[Hn+0],7,-680876936),jn=a(jn,In,Rn,Mn,h[Hn+1],12,-389564586),Mn=a(Mn,jn,In,Rn,h[Hn+2],17,606105819),Rn=a(Rn,Mn,jn,In,h[Hn+3],22,-1044525330),In=a(In,Rn,Mn,jn,h[Hn+4],7,-176418897),jn=a(jn,In,Rn,Mn,h[Hn+5],12,1200080426),Mn=a(Mn,jn,In,Rn,h[Hn+6],17,-1473231341),Rn=a(Rn,Mn,jn,In,h[Hn+7],22,-45705983),In=a(In,Rn,Mn,jn,h[Hn+8],7,1770035416),jn=a(jn,In,Rn,Mn,h[Hn+9],12,-1958414417),Mn=a(Mn,jn,In,Rn,h[Hn+10],17,-42063),Rn=a(Rn,Mn,jn,In,h[Hn+11],22,-1990404162),In=a(In,Rn,Mn,jn,h[Hn+12],7,1804603682),jn=a(jn,In,Rn,Mn,h[Hn+13],12,-40341101),Mn=a(Mn,jn,In,Rn,h[Hn+14],17,-1502002290),Rn=a(Rn,Mn,jn,In,h[Hn+15],22,1236535329),In=u(In,Rn,Mn,jn,h[Hn+1],5,-165796510),jn=u(jn,In,Rn,Mn,h[Hn+6],9,-1069501632),Mn=u(Mn,jn,In,Rn,h[Hn+11],14,643717713),Rn=u(Rn,Mn,jn,In,h[Hn+0],20,-373897302),In=u(In,Rn,Mn,jn,h[Hn+5],5,-701558691),jn=u(jn,In,Rn,Mn,h[Hn+10],9,38016083),Mn=u(Mn,jn,In,Rn,h[Hn+15],14,-660478335),Rn=u(Rn,Mn,jn,In,h[Hn+4],20,-405537848),In=u(In,Rn,Mn,jn,h[Hn+9],5,568446438),jn=u(jn,In,Rn,Mn,h[Hn+14],9,-1019803690),Mn=u(Mn,jn,In,Rn,h[Hn+3],14,-187363961),Rn=u(Rn,Mn,jn,In,h[Hn+8],20,1163531501),In=u(In,Rn,Mn,jn,h[Hn+13],5,-1444681467),jn=u(jn,In,Rn,Mn,h[Hn+2],9,-51403784),Mn=u(Mn,jn,In,Rn,h[Hn+7],14,1735328473),Rn=u(Rn,Mn,jn,In,h[Hn+12],20,-1926607734),In=s(In,Rn,Mn,jn,h[Hn+5],4,-378558),jn=s(jn,In,Rn,Mn,h[Hn+8],11,-2022574463),Mn=s(Mn,jn,In,Rn,h[Hn+11],16,1839030562),Rn=s(Rn,Mn,jn,In,h[Hn+14],23,-35309556),In=s(In,Rn,Mn,jn,h[Hn+1],4,-1530992060),jn=s(jn,In,Rn,Mn,h[Hn+4],11,1272893353),Mn=s(Mn,jn,In,Rn,h[Hn+7],16,-155497632),Rn=s(Rn,Mn,jn,In,h[Hn+10],23,-1094730640),In=s(In,Rn,Mn,jn,h[Hn+13],4,681279174),jn=s(jn,In,Rn,Mn,h[Hn+0],11,-358537222),Mn=s(Mn,jn,In,Rn,h[Hn+3],16,-722521979),Rn=s(Rn,Mn,jn,In,h[Hn+6],23,76029189),In=s(In,Rn,Mn,jn,h[Hn+9],4,-640364487),jn=s(jn,In,Rn,Mn,h[Hn+12],11,-421815835),Mn=s(Mn,jn,In,Rn,h[Hn+15],16,530742520),Rn=s(Rn,Mn,jn,In,h[Hn+2],23,-995338651),In=l(In,Rn,Mn,jn,h[Hn+0],6,-198630844),jn=l(jn,In,Rn,Mn,h[Hn+7],10,1126891415),Mn=l(Mn,jn,In,Rn,h[Hn+14],15,-1416354905),Rn=l(Rn,Mn,jn,In,h[Hn+5],21,-57434055),In=l(In,Rn,Mn,jn,h[Hn+12],6,1700485571),jn=l(jn,In,Rn,Mn,h[Hn+3],10,-1894986606),Mn=l(Mn,jn,In,Rn,h[Hn+10],15,-1051523),Rn=l(Rn,Mn,jn,In,h[Hn+1],21,-2054922799),In=l(In,Rn,Mn,jn,h[Hn+8],6,1873313359),jn=l(jn,In,Rn,Mn,h[Hn+15],10,-30611744),Mn=l(Mn,jn,In,Rn,h[Hn+6],15,-1560198380),Rn=l(Rn,Mn,jn,In,h[Hn+13],21,1309151649),In=l(In,Rn,Mn,jn,h[Hn+4],6,-145523070),jn=l(jn,In,Rn,Mn,h[Hn+11],10,-1120210379),Mn=l(Mn,jn,In,Rn,h[Hn+2],15,718787259),Rn=l(Rn,Mn,jn,In,h[Hn+9],21,-343485551),In=D(In,hi),Rn=D(Rn,yi),Mn=D(Mn,bi),jn=D(jn,Ti)}return[In,Rn,Mn,jn]}function i(h,v,In,Rn,Mn,jn){return D(on(D(D(v,h),D(Rn,jn)),Mn),In)}function a(h,v,In,Rn,Mn,jn,Hn){return i(v&In|~v&Rn,h,v,Mn,jn,Hn)}function u(h,v,In,Rn,Mn,jn,Hn){return i(v&Rn|In&~Rn,h,v,Mn,jn,Hn)}function s(h,v,In,Rn,Mn,jn,Hn){return i(v^In^Rn,h,v,Mn,jn,Hn)}function l(h,v,In,Rn,Mn,jn,Hn){return i(In^(v|~Rn),h,v,Mn,jn,Hn)}function D(h,v){var In=(h&65535)+(v&65535),Rn=(h>>16)+(v>>16)+(In>>16);return Rn<<16|In&65535}function on(h,v){return h<<v|h>>>32-v}return md5$2=function(v){return r(v,n)},md5$2}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var r=requireStreamBrowserify().Transform,n=requireInherits_browser();function i(a){r.call(this),this._block=new Buffer(a),this._blockSize=a,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return n(i,r),i.prototype._transform=function(a,u,s){var l=null;try{u!=="buffer"&&(a=new Buffer(a,u)),this.update(a)}catch(D){l=D}s(l)},i.prototype._flush=function(a){var u=null;try{this.push(this._digest())}catch(s){u=s}a(u)},i.prototype.update=function(a,u){if(!Buffer.isBuffer(a)&&typeof a!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");Buffer.isBuffer(a)||(a=new Buffer(a,u||"binary"));for(var s=this._block,l=0;this._blockOffset+a.length-l>=this._blockSize;){for(var D=this._blockOffset;D<this._blockSize;)s[D++]=a[l++];this._update(),this._blockOffset=0}for(;l<a.length;)s[this._blockOffset++]=a[l++];for(var on=0,h=a.length*8;h>0;++on)this._length[on]+=h,h=this._length[on]/4294967296|0,h>0&&(this._length[on]-=4294967296*h);return this},i.prototype._update=function(a){throw new Error("_update is not implemented")},i.prototype.digest=function(a){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var u=this._digest();return a!==void 0&&(u=u.toString(a)),u},i.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=i,hashBase}var ripemd160$2,hasRequiredRipemd160$1;function requireRipemd160$1(){if(hasRequiredRipemd160$1)return ripemd160$2;hasRequiredRipemd160$1=1;var r=requireInherits_browser(),n=requireHashBase();function i(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}r(i,n),i.prototype._update=function(){for(var h=new Array(16),v=0;v<16;++v)h[v]=this._block.readInt32LE(v*4);var In=this._a,Rn=this._b,Mn=this._c,jn=this._d,Hn=this._e;In=u(In,Rn,Mn,jn,Hn,h[0],0,11),Mn=a(Mn,10),Hn=u(Hn,In,Rn,Mn,jn,h[1],0,14),Rn=a(Rn,10),jn=u(jn,Hn,In,Rn,Mn,h[2],0,15),In=a(In,10),Mn=u(Mn,jn,Hn,In,Rn,h[3],0,12),Hn=a(Hn,10),Rn=u(Rn,Mn,jn,Hn,In,h[4],0,5),jn=a(jn,10),In=u(In,Rn,Mn,jn,Hn,h[5],0,8),Mn=a(Mn,10),Hn=u(Hn,In,Rn,Mn,jn,h[6],0,7),Rn=a(Rn,10),jn=u(jn,Hn,In,Rn,Mn,h[7],0,9),In=a(In,10),Mn=u(Mn,jn,Hn,In,Rn,h[8],0,11),Hn=a(Hn,10),Rn=u(Rn,Mn,jn,Hn,In,h[9],0,13),jn=a(jn,10),In=u(In,Rn,Mn,jn,Hn,h[10],0,14),Mn=a(Mn,10),Hn=u(Hn,In,Rn,Mn,jn,h[11],0,15),Rn=a(Rn,10),jn=u(jn,Hn,In,Rn,Mn,h[12],0,6),In=a(In,10),Mn=u(Mn,jn,Hn,In,Rn,h[13],0,7),Hn=a(Hn,10),Rn=u(Rn,Mn,jn,Hn,In,h[14],0,9),jn=a(jn,10),In=u(In,Rn,Mn,jn,Hn,h[15],0,8),Mn=a(Mn,10),Hn=s(Hn,In,Rn,Mn,jn,h[7],1518500249,7),Rn=a(Rn,10),jn=s(jn,Hn,In,Rn,Mn,h[4],1518500249,6),In=a(In,10),Mn=s(Mn,jn,Hn,In,Rn,h[13],1518500249,8),Hn=a(Hn,10),Rn=s(Rn,Mn,jn,Hn,In,h[1],1518500249,13),jn=a(jn,10),In=s(In,Rn,Mn,jn,Hn,h[10],1518500249,11),Mn=a(Mn,10),Hn=s(Hn,In,Rn,Mn,jn,h[6],1518500249,9),Rn=a(Rn,10),jn=s(jn,Hn,In,Rn,Mn,h[15],1518500249,7),In=a(In,10),Mn=s(Mn,jn,Hn,In,Rn,h[3],1518500249,15),Hn=a(Hn,10),Rn=s(Rn,Mn,jn,Hn,In,h[12],1518500249,7),jn=a(jn,10),In=s(In,Rn,Mn,jn,Hn,h[0],1518500249,12),Mn=a(Mn,10),Hn=s(Hn,In,Rn,Mn,jn,h[9],1518500249,15),Rn=a(Rn,10),jn=s(jn,Hn,In,Rn,Mn,h[5],1518500249,9),In=a(In,10),Mn=s(Mn,jn,Hn,In,Rn,h[2],1518500249,11),Hn=a(Hn,10),Rn=s(Rn,Mn,jn,Hn,In,h[14],1518500249,7),jn=a(jn,10),In=s(In,Rn,Mn,jn,Hn,h[11],1518500249,13),Mn=a(Mn,10),Hn=s(Hn,In,Rn,Mn,jn,h[8],1518500249,12),Rn=a(Rn,10),jn=l(jn,Hn,In,Rn,Mn,h[3],1859775393,11),In=a(In,10),Mn=l(Mn,jn,Hn,In,Rn,h[10],1859775393,13),Hn=a(Hn,10),Rn=l(Rn,Mn,jn,Hn,In,h[14],1859775393,6),jn=a(jn,10),In=l(In,Rn,Mn,jn,Hn,h[4],1859775393,7),Mn=a(Mn,10),Hn=l(Hn,In,Rn,Mn,jn,h[9],1859775393,14),Rn=a(Rn,10),jn=l(jn,Hn,In,Rn,Mn,h[15],1859775393,9),In=a(In,10),Mn=l(Mn,jn,Hn,In,Rn,h[8],1859775393,13),Hn=a(Hn,10),Rn=l(Rn,Mn,jn,Hn,In,h[1],1859775393,15),jn=a(jn,10),In=l(In,Rn,Mn,jn,Hn,h[2],1859775393,14),Mn=a(Mn,10),Hn=l(Hn,In,Rn,Mn,jn,h[7],1859775393,8),Rn=a(Rn,10),jn=l(jn,Hn,In,Rn,Mn,h[0],1859775393,13),In=a(In,10),Mn=l(Mn,jn,Hn,In,Rn,h[6],1859775393,6),Hn=a(Hn,10),Rn=l(Rn,Mn,jn,Hn,In,h[13],1859775393,5),jn=a(jn,10),In=l(In,Rn,Mn,jn,Hn,h[11],1859775393,12),Mn=a(Mn,10),Hn=l(Hn,In,Rn,Mn,jn,h[5],1859775393,7),Rn=a(Rn,10),jn=l(jn,Hn,In,Rn,Mn,h[12],1859775393,5),In=a(In,10),Mn=D(Mn,jn,Hn,In,Rn,h[1],2400959708,11),Hn=a(Hn,10),Rn=D(Rn,Mn,jn,Hn,In,h[9],2400959708,12),jn=a(jn,10),In=D(In,Rn,Mn,jn,Hn,h[11],2400959708,14),Mn=a(Mn,10),Hn=D(Hn,In,Rn,Mn,jn,h[10],2400959708,15),Rn=a(Rn,10),jn=D(jn,Hn,In,Rn,Mn,h[0],2400959708,14),In=a(In,10),Mn=D(Mn,jn,Hn,In,Rn,h[8],2400959708,15),Hn=a(Hn,10),Rn=D(Rn,Mn,jn,Hn,In,h[12],2400959708,9),jn=a(jn,10),In=D(In,Rn,Mn,jn,Hn,h[4],2400959708,8),Mn=a(Mn,10),Hn=D(Hn,In,Rn,Mn,jn,h[13],2400959708,9),Rn=a(Rn,10),jn=D(jn,Hn,In,Rn,Mn,h[3],2400959708,14),In=a(In,10),Mn=D(Mn,jn,Hn,In,Rn,h[7],2400959708,5),Hn=a(Hn,10),Rn=D(Rn,Mn,jn,Hn,In,h[15],2400959708,6),jn=a(jn,10),In=D(In,Rn,Mn,jn,Hn,h[14],2400959708,8),Mn=a(Mn,10),Hn=D(Hn,In,Rn,Mn,jn,h[5],2400959708,6),Rn=a(Rn,10),jn=D(jn,Hn,In,Rn,Mn,h[6],2400959708,5),In=a(In,10),Mn=D(Mn,jn,Hn,In,Rn,h[2],2400959708,12),Hn=a(Hn,10),Rn=on(Rn,Mn,jn,Hn,In,h[4],2840853838,9),jn=a(jn,10),In=on(In,Rn,Mn,jn,Hn,h[0],2840853838,15),Mn=a(Mn,10),Hn=on(Hn,In,Rn,Mn,jn,h[5],2840853838,5),Rn=a(Rn,10),jn=on(jn,Hn,In,Rn,Mn,h[9],2840853838,11),In=a(In,10),Mn=on(Mn,jn,Hn,In,Rn,h[7],2840853838,6),Hn=a(Hn,10),Rn=on(Rn,Mn,jn,Hn,In,h[12],2840853838,8),jn=a(jn,10),In=on(In,Rn,Mn,jn,Hn,h[2],2840853838,13),Mn=a(Mn,10),Hn=on(Hn,In,Rn,Mn,jn,h[10],2840853838,12),Rn=a(Rn,10),jn=on(jn,Hn,In,Rn,Mn,h[14],2840853838,5),In=a(In,10),Mn=on(Mn,jn,Hn,In,Rn,h[1],2840853838,12),Hn=a(Hn,10),Rn=on(Rn,Mn,jn,Hn,In,h[3],2840853838,13),jn=a(jn,10),In=on(In,Rn,Mn,jn,Hn,h[8],2840853838,14),Mn=a(Mn,10),Hn=on(Hn,In,Rn,Mn,jn,h[11],2840853838,11),Rn=a(Rn,10),jn=on(jn,Hn,In,Rn,Mn,h[6],2840853838,8),In=a(In,10),Mn=on(Mn,jn,Hn,In,Rn,h[15],2840853838,5),Hn=a(Hn,10),Rn=on(Rn,Mn,jn,Hn,In,h[13],2840853838,6),jn=a(jn,10);var hi=this._a,yi=this._b,bi=this._c,Ti=this._d,Si=this._e;hi=on(hi,yi,bi,Ti,Si,h[5],1352829926,8),bi=a(bi,10),Si=on(Si,hi,yi,bi,Ti,h[14],1352829926,9),yi=a(yi,10),Ti=on(Ti,Si,hi,yi,bi,h[7],1352829926,9),hi=a(hi,10),bi=on(bi,Ti,Si,hi,yi,h[0],1352829926,11),Si=a(Si,10),yi=on(yi,bi,Ti,Si,hi,h[9],1352829926,13),Ti=a(Ti,10),hi=on(hi,yi,bi,Ti,Si,h[2],1352829926,15),bi=a(bi,10),Si=on(Si,hi,yi,bi,Ti,h[11],1352829926,15),yi=a(yi,10),Ti=on(Ti,Si,hi,yi,bi,h[4],1352829926,5),hi=a(hi,10),bi=on(bi,Ti,Si,hi,yi,h[13],1352829926,7),Si=a(Si,10),yi=on(yi,bi,Ti,Si,hi,h[6],1352829926,7),Ti=a(Ti,10),hi=on(hi,yi,bi,Ti,Si,h[15],1352829926,8),bi=a(bi,10),Si=on(Si,hi,yi,bi,Ti,h[8],1352829926,11),yi=a(yi,10),Ti=on(Ti,Si,hi,yi,bi,h[1],1352829926,14),hi=a(hi,10),bi=on(bi,Ti,Si,hi,yi,h[10],1352829926,14),Si=a(Si,10),yi=on(yi,bi,Ti,Si,hi,h[3],1352829926,12),Ti=a(Ti,10),hi=on(hi,yi,bi,Ti,Si,h[12],1352829926,6),bi=a(bi,10),Si=D(Si,hi,yi,bi,Ti,h[6],1548603684,9),yi=a(yi,10),Ti=D(Ti,Si,hi,yi,bi,h[11],1548603684,13),hi=a(hi,10),bi=D(bi,Ti,Si,hi,yi,h[3],1548603684,15),Si=a(Si,10),yi=D(yi,bi,Ti,Si,hi,h[7],1548603684,7),Ti=a(Ti,10),hi=D(hi,yi,bi,Ti,Si,h[0],1548603684,12),bi=a(bi,10),Si=D(Si,hi,yi,bi,Ti,h[13],1548603684,8),yi=a(yi,10),Ti=D(Ti,Si,hi,yi,bi,h[5],1548603684,9),hi=a(hi,10),bi=D(bi,Ti,Si,hi,yi,h[10],1548603684,11),Si=a(Si,10),yi=D(yi,bi,Ti,Si,hi,h[14],1548603684,7),Ti=a(Ti,10),hi=D(hi,yi,bi,Ti,Si,h[15],1548603684,7),bi=a(bi,10),Si=D(Si,hi,yi,bi,Ti,h[8],1548603684,12),yi=a(yi,10),Ti=D(Ti,Si,hi,yi,bi,h[12],1548603684,7),hi=a(hi,10),bi=D(bi,Ti,Si,hi,yi,h[4],1548603684,6),Si=a(Si,10),yi=D(yi,bi,Ti,Si,hi,h[9],1548603684,15),Ti=a(Ti,10),hi=D(hi,yi,bi,Ti,Si,h[1],1548603684,13),bi=a(bi,10),Si=D(Si,hi,yi,bi,Ti,h[2],1548603684,11),yi=a(yi,10),Ti=l(Ti,Si,hi,yi,bi,h[15],1836072691,9),hi=a(hi,10),bi=l(bi,Ti,Si,hi,yi,h[5],1836072691,7),Si=a(Si,10),yi=l(yi,bi,Ti,Si,hi,h[1],1836072691,15),Ti=a(Ti,10),hi=l(hi,yi,bi,Ti,Si,h[3],1836072691,11),bi=a(bi,10),Si=l(Si,hi,yi,bi,Ti,h[7],1836072691,8),yi=a(yi,10),Ti=l(Ti,Si,hi,yi,bi,h[14],1836072691,6),hi=a(hi,10),bi=l(bi,Ti,Si,hi,yi,h[6],1836072691,6),Si=a(Si,10),yi=l(yi,bi,Ti,Si,hi,h[9],1836072691,14),Ti=a(Ti,10),hi=l(hi,yi,bi,Ti,Si,h[11],1836072691,12),bi=a(bi,10),Si=l(Si,hi,yi,bi,Ti,h[8],1836072691,13),yi=a(yi,10),Ti=l(Ti,Si,hi,yi,bi,h[12],1836072691,5),hi=a(hi,10),bi=l(bi,Ti,Si,hi,yi,h[2],1836072691,14),Si=a(Si,10),yi=l(yi,bi,Ti,Si,hi,h[10],1836072691,13),Ti=a(Ti,10),hi=l(hi,yi,bi,Ti,Si,h[0],1836072691,13),bi=a(bi,10),Si=l(Si,hi,yi,bi,Ti,h[4],1836072691,7),yi=a(yi,10),Ti=l(Ti,Si,hi,yi,bi,h[13],1836072691,5),hi=a(hi,10),bi=s(bi,Ti,Si,hi,yi,h[8],2053994217,15),Si=a(Si,10),yi=s(yi,bi,Ti,Si,hi,h[6],2053994217,5),Ti=a(Ti,10),hi=s(hi,yi,bi,Ti,Si,h[4],2053994217,8),bi=a(bi,10),Si=s(Si,hi,yi,bi,Ti,h[1],2053994217,11),yi=a(yi,10),Ti=s(Ti,Si,hi,yi,bi,h[3],2053994217,14),hi=a(hi,10),bi=s(bi,Ti,Si,hi,yi,h[11],2053994217,14),Si=a(Si,10),yi=s(yi,bi,Ti,Si,hi,h[15],2053994217,6),Ti=a(Ti,10),hi=s(hi,yi,bi,Ti,Si,h[0],2053994217,14),bi=a(bi,10),Si=s(Si,hi,yi,bi,Ti,h[5],2053994217,6),yi=a(yi,10),Ti=s(Ti,Si,hi,yi,bi,h[12],2053994217,9),hi=a(hi,10),bi=s(bi,Ti,Si,hi,yi,h[2],2053994217,12),Si=a(Si,10),yi=s(yi,bi,Ti,Si,hi,h[13],2053994217,9),Ti=a(Ti,10),hi=s(hi,yi,bi,Ti,Si,h[9],2053994217,12),bi=a(bi,10),Si=s(Si,hi,yi,bi,Ti,h[7],2053994217,5),yi=a(yi,10),Ti=s(Ti,Si,hi,yi,bi,h[10],2053994217,15),hi=a(hi,10),bi=s(bi,Ti,Si,hi,yi,h[14],2053994217,8),Si=a(Si,10),yi=u(yi,bi,Ti,Si,hi,h[12],0,8),Ti=a(Ti,10),hi=u(hi,yi,bi,Ti,Si,h[15],0,5),bi=a(bi,10),Si=u(Si,hi,yi,bi,Ti,h[10],0,12),yi=a(yi,10),Ti=u(Ti,Si,hi,yi,bi,h[4],0,9),hi=a(hi,10),bi=u(bi,Ti,Si,hi,yi,h[1],0,12),Si=a(Si,10),yi=u(yi,bi,Ti,Si,hi,h[5],0,5),Ti=a(Ti,10),hi=u(hi,yi,bi,Ti,Si,h[8],0,14),bi=a(bi,10),Si=u(Si,hi,yi,bi,Ti,h[7],0,6),yi=a(yi,10),Ti=u(Ti,Si,hi,yi,bi,h[6],0,8),hi=a(hi,10),bi=u(bi,Ti,Si,hi,yi,h[2],0,13),Si=a(Si,10),yi=u(yi,bi,Ti,Si,hi,h[13],0,6),Ti=a(Ti,10),hi=u(hi,yi,bi,Ti,Si,h[14],0,5),bi=a(bi,10),Si=u(Si,hi,yi,bi,Ti,h[0],0,15),yi=a(yi,10),Ti=u(Ti,Si,hi,yi,bi,h[3],0,13),hi=a(hi,10),bi=u(bi,Ti,Si,hi,yi,h[9],0,11),Si=a(Si,10),yi=u(yi,bi,Ti,Si,hi,h[11],0,11),Ti=a(Ti,10);var Ii=this._b+Mn+Ti|0;this._b=this._c+jn+Si|0,this._c=this._d+Hn+hi|0,this._d=this._e+In+yi|0,this._e=this._a+Rn+bi|0,this._a=Ii},i.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 h=new Buffer(20);return h.writeInt32LE(this._a,0),h.writeInt32LE(this._b,4),h.writeInt32LE(this._c,8),h.writeInt32LE(this._d,12),h.writeInt32LE(this._e,16),h};function a(h,v){return h<<v|h>>>32-v}function u(h,v,In,Rn,Mn,jn,Hn,hi){return a(h+(v^In^Rn)+jn+Hn|0,hi)+Mn|0}function s(h,v,In,Rn,Mn,jn,Hn,hi){return a(h+(v&In|~v&Rn)+jn+Hn|0,hi)+Mn|0}function l(h,v,In,Rn,Mn,jn,Hn,hi){return a(h+((v|~In)^Rn)+jn+Hn|0,hi)+Mn|0}function D(h,v,In,Rn,Mn,jn,Hn,hi){return a(h+(v&Rn|In&~Rn)+jn+Hn|0,hi)+Mn|0}function on(h,v,In,Rn,Mn,jn,Hn,hi){return a(h+(v^(In|~Rn))+jn+Hn|0,hi)+Mn|0}return ripemd160$2=i,ripemd160$2}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var r=requireSafeBuffer$1().Buffer,n=requireToBuffer$1(),i=typeof Uint8Array<"u",a=i&&typeof ArrayBuffer<"u",u=a&&ArrayBuffer.isView;return toBuffer_1=function(s,l,D){if(typeof s=="string"||r.isBuffer(s)||i&&s instanceof Uint8Array||u&&u(s))return n(s,l);throw new TypeError(D+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var r=requireMd5$1(),n=requireRipemd160$1(),i=requireSha_js(),a=requireSafeBuffer$1().Buffer,u=requirePrecondition(),s=requireDefaultEncoding(),l=requireToBuffer(),D=a.alloc(128),on={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},h={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function v(jn){return new n().update(jn).digest()}function In(jn){function Hn(hi){return i(jn).update(hi).digest()}return jn==="rmd160"||jn==="ripemd160"?v:jn==="md5"?r:Hn}function Rn(jn,Hn,hi){var yi=In(jn),bi=jn==="sha512"||jn==="sha384"?128:64;Hn.length>bi?Hn=yi(Hn):Hn.length<bi&&(Hn=a.concat([Hn,D],bi));for(var Ti=a.allocUnsafe(bi+on[jn]),Si=a.allocUnsafe(bi+on[jn]),Ii=0;Ii<bi;Ii++)Ti[Ii]=Hn[Ii]^54,Si[Ii]=Hn[Ii]^92;var Ni=a.allocUnsafe(bi+hi+4);Ti.copy(Ni,0,0,bi),this.ipad1=Ni,this.ipad2=Ti,this.opad=Si,this.alg=jn,this.blocksize=bi,this.hash=yi,this.size=on[jn]}Rn.prototype.run=function(jn,Hn){jn.copy(Hn,this.blocksize);var hi=this.hash(Hn);return hi.copy(this.opad,this.blocksize),this.hash(this.opad)};function Mn(jn,Hn,hi,yi,bi){u(hi,yi),jn=l(jn,s,"Password"),Hn=l(Hn,s,"Salt");var Ti=(bi||"sha1").toLowerCase(),Si=h[Ti]||Ti,Ii=on[Si];if(typeof Ii!="number"||!Ii)throw new TypeError("Digest algorithm not supported: "+bi);var Ni=new Rn(Si,jn,Hn.length),Oi=a.allocUnsafe(yi),Fi=a.allocUnsafe(Hn.length+4);Hn.copy(Fi,0,0,Hn.length);for(var Mi=0,ki=Ii,Ci=Math.ceil(yi/ki),Ei=1;Ei<=Ci;Ei++){Fi.writeUInt32BE(Ei,Hn.length);for(var vi=Ni.run(Fi,Ni.ipad1),Ln=vi,Yn=1;Yn<hi;Yn++){Ln=Ni.run(Ln,Ni.ipad2);for(var mi=0;mi<ki;mi++)vi[mi]^=Ln[mi]}vi.copy(Oi,Mi),Mi+=ki}return Oi}return syncBrowser=Mn,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var r=requireSafeBuffer$1().Buffer,n=requirePrecondition(),i=requireDefaultEncoding(),a=requireSyncBrowser(),u=requireToBuffer(),s,l=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,D={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"},on=[],h;function v(){return h||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?h=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?h=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?h=commonjsGlobal.setImmediate:h=commonjsGlobal.setTimeout,h)}function In(jn,Hn,hi,yi,bi){return l.importKey("raw",jn,{name:"PBKDF2"},!1,["deriveBits"]).then(function(Ti){return l.deriveBits({name:"PBKDF2",salt:Hn,iterations:hi,hash:{name:bi}},Ti,yi<<3)}).then(function(Ti){return r.from(Ti)})}function Rn(jn){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(on[jn]!==void 0)return on[jn];s=s||r.alloc(8);var Hn=In(s,s,10,128,jn).then(function(){return!0},function(){return!1});return on[jn]=Hn,Hn}function Mn(jn,Hn){jn.then(function(hi){v()(function(){Hn(null,hi)})},function(hi){v()(function(){Hn(hi)})})}return async=function(jn,Hn,hi,yi,bi,Ti){typeof bi=="function"&&(Ti=bi,bi=void 0),bi=bi||"sha1";var Si=D[bi.toLowerCase()];if(!Si||typeof commonjsGlobal.Promise!="function"){v()(function(){var Ii;try{Ii=a(jn,Hn,hi,yi,bi)}catch(Ni){Ti(Ni);return}Ti(null,Ii)});return}if(n(hi,yi),jn=u(jn,i,"Password"),Hn=u(Hn,i,"Salt"),typeof Ti!="function")throw new Error("No callback provided to pbkdf2");Mn(Rn(Si).then(function(Ii){return Ii?In(jn,Hn,hi,yi,Si):a(jn,Hn,hi,yi,bi)}),Ti)},async}var hasRequiredBrowser$8;function requireBrowser$8(){return hasRequiredBrowser$8||(hasRequiredBrowser$8=1,browser$8.pbkdf2=requireAsync(),browser$8.pbkdf2Sync=requireSyncBrowser()),browser$8}var browser$7={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(u,s){var l=u[0+s]<<24|u[1+s]<<16|u[2+s]<<8|u[3+s];return l>>>0},utils$3.writeUInt32BE=function(u,s,l){u[0+l]=s>>>24,u[1+l]=s>>>16&255,u[2+l]=s>>>8&255,u[3+l]=s&255},utils$3.ip=function(u,s,l,D){for(var on=0,h=0,v=6;v>=0;v-=2){for(var In=0;In<=24;In+=8)on<<=1,on|=s>>>In+v&1;for(var In=0;In<=24;In+=8)on<<=1,on|=u>>>In+v&1}for(var v=6;v>=0;v-=2){for(var In=1;In<=25;In+=8)h<<=1,h|=s>>>In+v&1;for(var In=1;In<=25;In+=8)h<<=1,h|=u>>>In+v&1}l[D+0]=on>>>0,l[D+1]=h>>>0},utils$3.rip=function(u,s,l,D){for(var on=0,h=0,v=0;v<4;v++)for(var In=24;In>=0;In-=8)on<<=1,on|=s>>>In+v&1,on<<=1,on|=u>>>In+v&1;for(var v=4;v<8;v++)for(var In=24;In>=0;In-=8)h<<=1,h|=s>>>In+v&1,h<<=1,h|=u>>>In+v&1;l[D+0]=on>>>0,l[D+1]=h>>>0},utils$3.pc1=function(u,s,l,D){for(var on=0,h=0,v=7;v>=5;v--){for(var In=0;In<=24;In+=8)on<<=1,on|=s>>In+v&1;for(var In=0;In<=24;In+=8)on<<=1,on|=u>>In+v&1}for(var In=0;In<=24;In+=8)on<<=1,on|=s>>In+v&1;for(var v=1;v<=3;v++){for(var In=0;In<=24;In+=8)h<<=1,h|=s>>In+v&1;for(var In=0;In<=24;In+=8)h<<=1,h|=u>>In+v&1}for(var In=0;In<=24;In+=8)h<<=1,h|=u>>In+v&1;l[D+0]=on>>>0,l[D+1]=h>>>0},utils$3.r28shl=function(u,s){return u<<s&268435455|u>>>28-s};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];utils$3.pc2=function(u,s,l,D){for(var on=0,h=0,v=r.length>>>1,In=0;In<v;In++)on<<=1,on|=u>>>r[In]&1;for(var In=v;In<r.length;In++)h<<=1,h|=s>>>r[In]&1;l[D+0]=on>>>0,l[D+1]=h>>>0},utils$3.expand=function(u,s,l){var D=0,on=0;D=(u&1)<<5|u>>>27;for(var h=23;h>=15;h-=4)D<<=6,D|=u>>>h&63;for(var h=11;h>=3;h-=4)on|=u>>>h&63,on<<=6;on|=(u&31)<<1|u>>>31,s[l+0]=D>>>0,s[l+1]=on>>>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];utils$3.substitute=function(u,s){for(var l=0,D=0;D<4;D++){var on=u>>>18-D*6&63,h=n[D*64+on];l<<=4,l|=h}for(var D=0;D<4;D++){var on=s>>>18-D*6&63,h=n[256+D*64+on];l<<=4,l|=h}return l>>>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];return utils$3.permute=function(u){for(var s=0,l=0;l<i.length;l++)s<<=1,s|=u>>>i[l]&1;return s>>>0},utils$3.padSplit=function(u,s,l){for(var D=u.toString(2);D.length<s;)D="0"+D;for(var on=[],h=0;h<s;h+=l)on.push(D.slice(h,h+l));return on.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=r;function r(n,i){if(!n)throw new Error(i||"Assertion failed")}return r.equal=function(i,a,u){if(i!=a)throw new Error(u||"Assertion failed: "+i+" != "+a)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var r=requireMinimalisticAssert();function n(i){this.options=i,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=i.padding!==!1}return cipher=n,n.prototype._init=function(){},n.prototype.update=function(a){return a.length===0?[]:this.type==="decrypt"?this._updateDecrypt(a):this._updateEncrypt(a)},n.prototype._buffer=function(a,u){for(var s=Math.min(this.buffer.length-this.bufferOff,a.length-u),l=0;l<s;l++)this.buffer[this.bufferOff+l]=a[u+l];return this.bufferOff+=s,s},n.prototype._flushBuffer=function(a,u){return this._update(this.buffer,0,a,u),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(a){var u=0,s=0,l=(this.bufferOff+a.length)/this.blockSize|0,D=new Array(l*this.blockSize);this.bufferOff!==0&&(u+=this._buffer(a,u),this.bufferOff===this.buffer.length&&(s+=this._flushBuffer(D,s)));for(var on=a.length-(a.length-u)%this.blockSize;u<on;u+=this.blockSize)this._update(a,u,D,s),s+=this.blockSize;for(;u<a.length;u++,this.bufferOff++)this.buffer[this.bufferOff]=a[u];return D},n.prototype._updateDecrypt=function(a){for(var u=0,s=0,l=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,D=new Array(l*this.blockSize);l>0;l--)u+=this._buffer(a,u),s+=this._flushBuffer(D,s);return u+=this._buffer(a,u),D},n.prototype.final=function(a){var u;a&&(u=this.update(a));var s;return this.type==="encrypt"?s=this._finalEncrypt():s=this._finalDecrypt(),u?u.concat(s):s},n.prototype._pad=function(a,u){if(u===0)return!1;for(;u<a.length;)a[u++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},n.prototype._unpad=function(a){return a},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),i=requireUtils$3(),a=requireCipher();function u(){this.tmp=new Array(2),this.keys=null}function s(D){a.call(this,D);var on=new u;this._desState=on,this.deriveKeys(on,D.key)}n(s,a),des=s,s.create=function(on){return new s(on)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return s.prototype.deriveKeys=function(on,h){on.keys=new Array(32),r.equal(h.length,this.blockSize,"Invalid key length");var v=i.readUInt32BE(h,0),In=i.readUInt32BE(h,4);i.pc1(v,In,on.tmp,0),v=on.tmp[0],In=on.tmp[1];for(var Rn=0;Rn<on.keys.length;Rn+=2){var Mn=l[Rn>>>1];v=i.r28shl(v,Mn),In=i.r28shl(In,Mn),i.pc2(v,In,on.keys,Rn)}},s.prototype._update=function(on,h,v,In){var Rn=this._desState,Mn=i.readUInt32BE(on,h),jn=i.readUInt32BE(on,h+4);i.ip(Mn,jn,Rn.tmp,0),Mn=Rn.tmp[0],jn=Rn.tmp[1],this.type==="encrypt"?this._encrypt(Rn,Mn,jn,Rn.tmp,0):this._decrypt(Rn,Mn,jn,Rn.tmp,0),Mn=Rn.tmp[0],jn=Rn.tmp[1],i.writeUInt32BE(v,Mn,In),i.writeUInt32BE(v,jn,In+4)},s.prototype._pad=function(on,h){if(this.padding===!1)return!1;for(var v=on.length-h,In=h;In<on.length;In++)on[In]=v;return!0},s.prototype._unpad=function(on){if(this.padding===!1)return on;for(var h=on[on.length-1],v=on.length-h;v<on.length;v++)r.equal(on[v],h);return on.slice(0,on.length-h)},s.prototype._encrypt=function(on,h,v,In,Rn){for(var Mn=h,jn=v,Hn=0;Hn<on.keys.length;Hn+=2){var hi=on.keys[Hn],yi=on.keys[Hn+1];i.expand(jn,on.tmp,0),hi^=on.tmp[0],yi^=on.tmp[1];var bi=i.substitute(hi,yi),Ti=i.permute(bi),Si=jn;jn=(Mn^Ti)>>>0,Mn=Si}i.rip(jn,Mn,In,Rn)},s.prototype._decrypt=function(on,h,v,In,Rn){for(var Mn=v,jn=h,Hn=on.keys.length-2;Hn>=0;Hn-=2){var hi=on.keys[Hn],yi=on.keys[Hn+1];i.expand(Mn,on.tmp,0),hi^=on.tmp[0],yi^=on.tmp[1];var bi=i.substitute(hi,yi),Ti=i.permute(bi),Si=Mn;Mn=(jn^Ti)>>>0,jn=Si}i.rip(Mn,jn,In,Rn)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),i={};function a(s){r.equal(s.length,8,"Invalid IV length"),this.iv=new Array(8);for(var l=0;l<this.iv.length;l++)this.iv[l]=s[l]}function u(s){function l(v){s.call(this,v),this._cbcInit()}n(l,s);for(var D=Object.keys(i),on=0;on<D.length;on++){var h=D[on];l.prototype[h]=i[h]}return l.create=function(In){return new l(In)},l}return cbc$1.instantiate=u,i._cbcInit=function(){var l=new a(this.options.iv);this._cbcState=l},i._update=function(l,D,on,h){var v=this._cbcState,In=this.constructor.super_.prototype,Rn=v.iv;if(this.type==="encrypt"){for(var Mn=0;Mn<this.blockSize;Mn++)Rn[Mn]^=l[D+Mn];In._update.call(this,Rn,0,on,h);for(var Mn=0;Mn<this.blockSize;Mn++)Rn[Mn]=on[h+Mn]}else{In._update.call(this,l,D,on,h);for(var Mn=0;Mn<this.blockSize;Mn++)on[h+Mn]^=Rn[Mn];for(var Mn=0;Mn<this.blockSize;Mn++)Rn[Mn]=l[D+Mn]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),i=requireCipher(),a=requireDes$1();function u(l,D){r.equal(D.length,24,"Invalid key length");var on=D.slice(0,8),h=D.slice(8,16),v=D.slice(16,24);l==="encrypt"?this.ciphers=[a.create({type:"encrypt",key:on}),a.create({type:"decrypt",key:h}),a.create({type:"encrypt",key:v})]:this.ciphers=[a.create({type:"decrypt",key:v}),a.create({type:"encrypt",key:h}),a.create({type:"decrypt",key:on})]}function s(l){i.call(this,l);var D=new u(this.type,this.options.key);this._edeState=D}return n(s,i),ede=s,s.create=function(D){return new s(D)},s.prototype._update=function(D,on,h,v){var In=this._edeState;In.ciphers[0]._update(D,on,h,v),In.ciphers[1]._update(h,v,h,v),In.ciphers[2]._update(h,v,h,v)},s.prototype._pad=a.prototype._pad,s.prototype._unpad=a.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var r=requireCipherBase(),n=requireDes(),i=requireInherits_browser(),a=requireSafeBuffer$1().Buffer,u={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};u.des=u["des-cbc"],u.des3=u["des-ede3-cbc"],browserifyDes=s,i(s,r);function s(l){r.call(this);var D=l.mode.toLowerCase(),on=u[D],h;l.decrypt?h="decrypt":h="encrypt";var v=l.key;a.isBuffer(v)||(v=a.from(v)),(D==="des-ede"||D==="des-ede-cbc")&&(v=a.concat([v,v.slice(0,8)]));var In=l.iv;a.isBuffer(In)||(In=a.from(In)),this._des=on.create({key:v,iv:In,type:h})}return s.prototype._update=function(l){return a.from(this._des.update(l))},s.prototype._final=function(){return a.from(this._des.final())},browserifyDes}var browser$6={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(r,n){return r._cipher.encryptBlock(n)},ecb.decrypt=function(r,n){return r._cipher.decryptBlock(n)}),ecb}var cbc={},bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(n,i){for(var a=Math.min(n.length,i.length),u=new Buffer(a),s=0;s<a;++s)u[s]=n[s]^i[s];return u}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var r=requireBufferXor();return cbc.encrypt=function(n,i){var a=r(i,n._prev);return n._prev=n._cipher.encryptBlock(a),n._prev},cbc.decrypt=function(n,i){var a=n._prev;n._prev=i;var u=n._cipher.decryptBlock(i);return r(u,a)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var r=requireSafeBuffer$1().Buffer,n=requireBufferXor();function i(a,u,s){var l=u.length,D=n(u,a._cache);return a._cache=a._cache.slice(l),a._prev=r.concat([a._prev,s?u:D]),D}return cfb.encrypt=function(a,u,s){for(var l=r.allocUnsafe(0),D;u.length;)if(a._cache.length===0&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=r.allocUnsafe(0)),a._cache.length<=u.length)D=a._cache.length,l=r.concat([l,i(a,u.slice(0,D),s)]),u=u.slice(D);else{l=r.concat([l,i(a,u,s)]);break}return l},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var r=requireSafeBuffer$1().Buffer;function n(i,a,u){var s=i._cipher.encryptBlock(i._prev),l=s[0]^a;return i._prev=r.concat([i._prev.slice(1),r.from([u?a:l])]),l}return cfb8.encrypt=function(i,a,u){for(var s=a.length,l=r.allocUnsafe(s),D=-1;++D<s;)l[D]=n(i,a[D],u);return l},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var r=requireSafeBuffer$1().Buffer;function n(a,u,s){for(var l,D=-1,on=8,h=0,v,In;++D<on;)l=a._cipher.encryptBlock(a._prev),v=u&1<<7-D?128:0,In=l[0]^v,h+=(In&128)>>D%8,a._prev=i(a._prev,s?v:In);return h}function i(a,u){var s=a.length,l=-1,D=r.allocUnsafe(a.length);for(a=r.concat([a,r.from([u])]);++l<s;)D[l]=a[l]<<1|a[l+1]>>7;return D}return cfb1.encrypt=function(a,u,s){for(var l=u.length,D=r.allocUnsafe(l),on=-1;++on<l;)D[on]=n(a,u[on],s);return D},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var r=requireBufferXor();function n(i){return i._prev=i._cipher.encryptBlock(i._prev),i._prev}return ofb.encrypt=function(i,a){for(;i._cache.length<a.length;)i._cache=Buffer.concat([i._cache,n(i)]);var u=i._cache.slice(0,a.length);return i._cache=i._cache.slice(a.length),r(a,u)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function r(n){for(var i=n.length,a;i--;)if(a=n.readUInt8(i),a===255)n.writeUInt8(0,i);else{a++,n.writeUInt8(a,i);break}}return incr32_1=r,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var r=requireBufferXor(),n=requireSafeBuffer$1().Buffer,i=requireIncr32();function a(s){var l=s._cipher.encryptBlockRaw(s._prev);return i(s._prev),l}var u=16;return ctr.encrypt=function(s,l){var D=Math.ceil(l.length/u),on=s._cache.length;s._cache=n.concat([s._cache,n.allocUnsafe(D*u)]);for(var h=0;h<D;h++){var v=a(s),In=on+h*u;s._cache.writeUInt32BE(v[0],In+0),s._cache.writeUInt32BE(v[1],In+4),s._cache.writeUInt32BE(v[2],In+8),s._cache.writeUInt32BE(v[3],In+12)}var Rn=s._cache.slice(0,l.length);return s._cache=s._cache.slice(l.length),r(l,Rn)},ctr}const 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"};var require$$2={"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,aes192,aes256,"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"}},modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var r={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},n=require$$2;for(var i in n)n[i].module=r[n[i].mode];return modes_1=n,modes_1}var aes$2={},hasRequiredAes$1;function requireAes$1(){if(hasRequiredAes$1)return aes$2;hasRequiredAes$1=1;var r=requireSafeBuffer$1().Buffer;function n(D){r.isBuffer(D)||(D=r.from(D));for(var on=D.length/4|0,h=new Array(on),v=0;v<on;v++)h[v]=D.readUInt32BE(v*4);return h}function i(D){for(var on=0;on<D.length;D++)D[on]=0}function a(D,on,h,v,In){for(var Rn=h[0],Mn=h[1],jn=h[2],Hn=h[3],hi=D[0]^on[0],yi=D[1]^on[1],bi=D[2]^on[2],Ti=D[3]^on[3],Si,Ii,Ni,Oi,Fi=4,Mi=1;Mi<In;Mi++)Si=Rn[hi>>>24]^Mn[yi>>>16&255]^jn[bi>>>8&255]^Hn[Ti&255]^on[Fi++],Ii=Rn[yi>>>24]^Mn[bi>>>16&255]^jn[Ti>>>8&255]^Hn[hi&255]^on[Fi++],Ni=Rn[bi>>>24]^Mn[Ti>>>16&255]^jn[hi>>>8&255]^Hn[yi&255]^on[Fi++],Oi=Rn[Ti>>>24]^Mn[hi>>>16&255]^jn[yi>>>8&255]^Hn[bi&255]^on[Fi++],hi=Si,yi=Ii,bi=Ni,Ti=Oi;return Si=(v[hi>>>24]<<24|v[yi>>>16&255]<<16|v[bi>>>8&255]<<8|v[Ti&255])^on[Fi++],Ii=(v[yi>>>24]<<24|v[bi>>>16&255]<<16|v[Ti>>>8&255]<<8|v[hi&255])^on[Fi++],Ni=(v[bi>>>24]<<24|v[Ti>>>16&255]<<16|v[hi>>>8&255]<<8|v[yi&255])^on[Fi++],Oi=(v[Ti>>>24]<<24|v[hi>>>16&255]<<16|v[yi>>>8&255]<<8|v[bi&255])^on[Fi++],Si=Si>>>0,Ii=Ii>>>0,Ni=Ni>>>0,Oi=Oi>>>0,[Si,Ii,Ni,Oi]}var u=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var D=new Array(256),on=0;on<256;on++)on<128?D[on]=on<<1:D[on]=on<<1^283;for(var h=[],v=[],In=[[],[],[],[]],Rn=[[],[],[],[]],Mn=0,jn=0,Hn=0;Hn<256;++Hn){var hi=jn^jn<<1^jn<<2^jn<<3^jn<<4;hi=hi>>>8^hi&255^99,h[Mn]=hi,v[hi]=Mn;var yi=D[Mn],bi=D[yi],Ti=D[bi],Si=D[hi]*257^hi*16843008;In[0][Mn]=Si<<24|Si>>>8,In[1][Mn]=Si<<16|Si>>>16,In[2][Mn]=Si<<8|Si>>>24,In[3][Mn]=Si,Si=Ti*16843009^bi*65537^yi*257^Mn*16843008,Rn[0][hi]=Si<<24|Si>>>8,Rn[1][hi]=Si<<16|Si>>>16,Rn[2][hi]=Si<<8|Si>>>24,Rn[3][hi]=Si,Mn===0?Mn=jn=1:(Mn=yi^D[D[D[Ti^yi]]],jn^=D[D[jn]])}return{SBOX:h,INV_SBOX:v,SUB_MIX:In,INV_SUB_MIX:Rn}}();function l(D){this._key=n(D),this._reset()}return l.blockSize=16,l.keySize=256/8,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var D=this._key,on=D.length,h=on+6,v=(h+1)*4,In=[],Rn=0;Rn<on;Rn++)In[Rn]=D[Rn];for(Rn=on;Rn<v;Rn++){var Mn=In[Rn-1];Rn%on===0?(Mn=Mn<<8|Mn>>>24,Mn=s.SBOX[Mn>>>24]<<24|s.SBOX[Mn>>>16&255]<<16|s.SBOX[Mn>>>8&255]<<8|s.SBOX[Mn&255],Mn^=u[Rn/on|0]<<24):on>6&&Rn%on===4&&(Mn=s.SBOX[Mn>>>24]<<24|s.SBOX[Mn>>>16&255]<<16|s.SBOX[Mn>>>8&255]<<8|s.SBOX[Mn&255]),In[Rn]=In[Rn-on]^Mn}for(var jn=[],Hn=0;Hn<v;Hn++){var hi=v-Hn,yi=In[hi-(Hn%4?0:4)];Hn<4||hi<=4?jn[Hn]=yi:jn[Hn]=s.INV_SUB_MIX[0][s.SBOX[yi>>>24]]^s.INV_SUB_MIX[1][s.SBOX[yi>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[yi>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[yi&255]]}this._nRounds=h,this._keySchedule=In,this._invKeySchedule=jn},l.prototype.encryptBlockRaw=function(D){return D=n(D),a(D,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},l.prototype.encryptBlock=function(D){var on=this.encryptBlockRaw(D),h=r.allocUnsafe(16);return h.writeUInt32BE(on[0],0),h.writeUInt32BE(on[1],4),h.writeUInt32BE(on[2],8),h.writeUInt32BE(on[3],12),h},l.prototype.decryptBlock=function(D){D=n(D);var on=D[1];D[1]=D[3],D[3]=on;var h=a(D,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),v=r.allocUnsafe(16);return v.writeUInt32BE(h[0],0),v.writeUInt32BE(h[3],4),v.writeUInt32BE(h[2],8),v.writeUInt32BE(h[1],12),v},l.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},aes$2.AES=l,aes$2}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var r=requireSafeBuffer$1().Buffer,n=r.alloc(16,0);function i(s){return[s.readUInt32BE(0),s.readUInt32BE(4),s.readUInt32BE(8),s.readUInt32BE(12)]}function a(s){var l=r.allocUnsafe(16);return l.writeUInt32BE(s[0]>>>0,0),l.writeUInt32BE(s[1]>>>0,4),l.writeUInt32BE(s[2]>>>0,8),l.writeUInt32BE(s[3]>>>0,12),l}function u(s){this.h=s,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}return u.prototype.ghash=function(s){for(var l=-1;++l<s.length;)this.state[l]^=s[l];this._multiply()},u.prototype._multiply=function(){for(var s=i(this.h),l=[0,0,0,0],D,on,h,v=-1;++v<128;){for(on=(this.state[~~(v/8)]&1<<7-v%8)!==0,on&&(l[0]^=s[0],l[1]^=s[1],l[2]^=s[2],l[3]^=s[3]),h=(s[3]&1)!==0,D=3;D>0;D--)s[D]=s[D]>>>1|(s[D-1]&1)<<31;s[0]=s[0]>>>1,h&&(s[0]=s[0]^225<<24)}this.state=a(l)},u.prototype.update=function(s){this.cache=r.concat([this.cache,s]);for(var l;this.cache.length>=16;)l=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(l)},u.prototype.final=function(s,l){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,s,0,l])),this.state},ghash=u,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var r=requireAes$1(),n=requireSafeBuffer$1().Buffer,i=requireCipherBase(),a=requireInherits_browser(),u=requireGhash(),s=requireBufferXor(),l=requireIncr32();function D(v,In){var Rn=0;v.length!==In.length&&Rn++;for(var Mn=Math.min(v.length,In.length),jn=0;jn<Mn;++jn)Rn+=v[jn]^In[jn];return Rn}function on(v,In,Rn){if(In.length===12)return v._finID=n.concat([In,n.from([0,0,0,1])]),n.concat([In,n.from([0,0,0,2])]);var Mn=new u(Rn),jn=In.length,Hn=jn%16;Mn.update(In),Hn&&(Hn=16-Hn,Mn.update(n.alloc(Hn,0))),Mn.update(n.alloc(8,0));var hi=jn*8,yi=n.alloc(8);yi.writeUIntBE(hi,0,8),Mn.update(yi),v._finID=Mn.state;var bi=n.from(v._finID);return l(bi),bi}function h(v,In,Rn,Mn){i.call(this);var jn=n.alloc(4,0);this._cipher=new r.AES(In);var Hn=this._cipher.encryptBlock(jn);this._ghash=new u(Hn),Rn=on(this,Rn,Hn),this._prev=n.from(Rn),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=Mn,this._alen=0,this._len=0,this._mode=v,this._authTag=null,this._called=!1}return a(h,i),h.prototype._update=function(v){if(!this._called&&this._alen){var In=16-this._alen%16;In<16&&(In=n.alloc(In,0),this._ghash.update(In))}this._called=!0;var Rn=this._mode.encrypt(this,v);return this._decrypt?this._ghash.update(v):this._ghash.update(Rn),this._len+=v.length,Rn},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var v=s(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&D(v,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=v,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function(In){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=In},h.prototype.setAAD=function(In){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(In),this._alen+=In.length},authCipher=h,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var r=requireAes$1(),n=requireSafeBuffer$1().Buffer,i=requireCipherBase(),a=requireInherits_browser();function u(s,l,D,on){i.call(this),this._cipher=new r.AES(l),this._prev=n.from(D),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=on,this._mode=s}return a(u,i),u.prototype._update=function(s){return this._mode.encrypt(this,s,this._decrypt)},u.prototype._final=function(){this._cipher.scrub()},streamCipher=u,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var r=requireSafeBuffer$1().Buffer,n=requireMd5_js();function i(a,u,s,l){if(r.isBuffer(a)||(a=r.from(a,"binary")),u&&(r.isBuffer(u)||(u=r.from(u,"binary")),u.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var D=s/8,on=r.alloc(D),h=r.alloc(l||0),v=r.alloc(0);D>0||l>0;){var In=new n;In.update(v),In.update(a),u&&In.update(u),v=In.digest();var Rn=0;if(D>0){var Mn=on.length-D;Rn=Math.min(D,v.length),v.copy(on,Mn,0,Rn),D-=Rn}if(Rn<v.length&&l>0){var jn=h.length-l,Hn=Math.min(l,v.length-Rn);v.copy(h,jn,Rn,Rn+Hn),l-=Hn}}return v.fill(0),{key:on,iv:h}}return evp_bytestokey=i,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var r=requireModes$1(),n=requireAuthCipher(),i=requireSafeBuffer$1().Buffer,a=requireStreamCipher(),u=requireCipherBase(),s=requireAes$1(),l=requireEvp_bytestokey(),D=requireInherits_browser();function on(Mn,jn,Hn){u.call(this),this._cache=new v,this._cipher=new s.AES(jn),this._prev=i.from(Hn),this._mode=Mn,this._autopadding=!0}D(on,u),on.prototype._update=function(Mn){this._cache.add(Mn);for(var jn,Hn,hi=[];jn=this._cache.get();)Hn=this._mode.encrypt(this,jn),hi.push(Hn);return i.concat(hi)};var h=i.alloc(16,16);on.prototype._final=function(){var Mn=this._cache.flush();if(this._autopadding)return Mn=this._mode.encrypt(this,Mn),this._cipher.scrub(),Mn;if(!Mn.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},on.prototype.setAutoPadding=function(Mn){return this._autopadding=!!Mn,this};function v(){this.cache=i.allocUnsafe(0)}v.prototype.add=function(Mn){this.cache=i.concat([this.cache,Mn])},v.prototype.get=function(){if(this.cache.length>15){var Mn=this.cache.slice(0,16);return this.cache=this.cache.slice(16),Mn}return null},v.prototype.flush=function(){for(var Mn=16-this.cache.length,jn=i.allocUnsafe(Mn),Hn=-1;++Hn<Mn;)jn.writeUInt8(Mn,Hn);return i.concat([this.cache,jn])};function In(Mn,jn,Hn){var hi=r[Mn.toLowerCase()];if(!hi)throw new TypeError("invalid suite type");if(typeof jn=="string"&&(jn=i.from(jn)),jn.length!==hi.key/8)throw new TypeError("invalid key length "+jn.length);if(typeof Hn=="string"&&(Hn=i.from(Hn)),hi.mode!=="GCM"&&Hn.length!==hi.iv)throw new TypeError("invalid iv length "+Hn.length);return hi.type==="stream"?new a(hi.module,jn,Hn):hi.type==="auth"?new n(hi.module,jn,Hn):new on(hi.module,jn,Hn)}function Rn(Mn,jn){var Hn=r[Mn.toLowerCase()];if(!Hn)throw new TypeError("invalid suite type");var hi=l(jn,!1,Hn.key,Hn.iv);return In(Mn,hi.key,hi.iv)}return encrypter.createCipheriv=In,encrypter.createCipher=Rn,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var r=requireAuthCipher(),n=requireSafeBuffer$1().Buffer,i=requireModes$1(),a=requireStreamCipher(),u=requireCipherBase(),s=requireAes$1(),l=requireEvp_bytestokey(),D=requireInherits_browser();function on(Mn,jn,Hn){u.call(this),this._cache=new h,this._last=void 0,this._cipher=new s.AES(jn),this._prev=n.from(Hn),this._mode=Mn,this._autopadding=!0}D(on,u),on.prototype._update=function(Mn){this._cache.add(Mn);for(var jn,Hn,hi=[];jn=this._cache.get(this._autopadding);)Hn=this._mode.decrypt(this,jn),hi.push(Hn);return n.concat(hi)},on.prototype._final=function(){var Mn=this._cache.flush();if(this._autopadding)return v(this._mode.decrypt(this,Mn));if(Mn)throw new Error("data not multiple of block length")},on.prototype.setAutoPadding=function(Mn){return this._autopadding=!!Mn,this};function h(){this.cache=n.allocUnsafe(0)}h.prototype.add=function(Mn){this.cache=n.concat([this.cache,Mn])},h.prototype.get=function(Mn){var jn;if(Mn){if(this.cache.length>16)return jn=this.cache.slice(0,16),this.cache=this.cache.slice(16),jn}else if(this.cache.length>=16)return jn=this.cache.slice(0,16),this.cache=this.cache.slice(16),jn;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache};function v(Mn){var jn=Mn[15];if(jn<1||jn>16)throw new Error("unable to decrypt data");for(var Hn=-1;++Hn<jn;)if(Mn[Hn+(16-jn)]!==jn)throw new Error("unable to decrypt data");if(jn!==16)return Mn.slice(0,16-jn)}function In(Mn,jn,Hn){var hi=i[Mn.toLowerCase()];if(!hi)throw new TypeError("invalid suite type");if(typeof Hn=="string"&&(Hn=n.from(Hn)),hi.mode!=="GCM"&&Hn.length!==hi.iv)throw new TypeError("invalid iv length "+Hn.length);if(typeof jn=="string"&&(jn=n.from(jn)),jn.length!==hi.key/8)throw new TypeError("invalid key length "+jn.length);return hi.type==="stream"?new a(hi.module,jn,Hn,!0):hi.type==="auth"?new r(hi.module,jn,Hn,!0):new on(hi.module,jn,Hn)}function Rn(Mn,jn){var Hn=i[Mn.toLowerCase()];if(!Hn)throw new TypeError("invalid suite type");var hi=l(jn,!1,Hn.key,Hn.iv);return In(Mn,hi.key,hi.iv)}return decrypter.createDecipher=Rn,decrypter.createDecipheriv=In,decrypter}var hasRequiredBrowser$7;function requireBrowser$7(){if(hasRequiredBrowser$7)return browser$6;hasRequiredBrowser$7=1;var r=requireEncrypter(),n=requireDecrypter(),i=require$$2;function a(){return Object.keys(i)}return browser$6.createCipher=browser$6.Cipher=r.createCipher,browser$6.createCipheriv=browser$6.Cipheriv=r.createCipheriv,browser$6.createDecipher=browser$6.Decipher=n.createDecipher,browser$6.createDecipheriv=browser$6.Decipheriv=n.createDecipheriv,browser$6.listCiphers=browser$6.getCiphers=a,browser$6}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,function(r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}}(modes)),modes}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$7;hasRequiredBrowser$6=1;var r=requireBrowserifyDes(),n=requireBrowser$7(),i=requireModes$1(),a=requireModes(),u=requireEvp_bytestokey();function s(v,In){v=v.toLowerCase();var Rn,Mn;if(i[v])Rn=i[v].key,Mn=i[v].iv;else if(a[v])Rn=a[v].key*8,Mn=a[v].iv;else throw new TypeError("invalid suite type");var jn=u(In,!1,Rn,Mn);return D(v,jn.key,jn.iv)}function l(v,In){v=v.toLowerCase();var Rn,Mn;if(i[v])Rn=i[v].key,Mn=i[v].iv;else if(a[v])Rn=a[v].key*8,Mn=a[v].iv;else throw new TypeError("invalid suite type");var jn=u(In,!1,Rn,Mn);return on(v,jn.key,jn.iv)}function D(v,In,Rn){if(v=v.toLowerCase(),i[v])return n.createCipheriv(v,In,Rn);if(a[v])return new r({key:In,iv:Rn,mode:v});throw new TypeError("invalid suite type")}function on(v,In,Rn){if(v=v.toLowerCase(),i[v])return n.createDecipheriv(v,In,Rn);if(a[v])return new r({key:In,iv:Rn,mode:v,decrypt:!0});throw new TypeError("invalid suite type")}function h(){return Object.keys(a).concat(n.getCiphers())}return browser$7.createCipher=browser$7.Cipher=s,browser$7.createCipheriv=browser$7.Cipheriv=D,browser$7.createDecipher=browser$7.Decipher=l,browser$7.createDecipheriv=browser$7.Decipheriv=on,browser$7.listCiphers=browser$7.getCiphers=h,browser$7}var browser$5={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,function(r){(function(n,i){function a(Ci,Ei){if(!Ci)throw new Error(Ei||"Assertion failed")}function u(Ci,Ei){Ci.super_=Ei;var vi=function(){};vi.prototype=Ei.prototype,Ci.prototype=new vi,Ci.prototype.constructor=Ci}function s(Ci,Ei,vi){if(s.isBN(Ci))return Ci;this.negative=0,this.words=null,this.length=0,this.red=null,Ci!==null&&((Ei==="le"||Ei==="be")&&(vi=Ei,Ei=10),this._init(Ci||0,Ei||10,vi||"be"))}typeof n=="object"?n.exports=s:i.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(Ei){return Ei instanceof s?!0:Ei!==null&&typeof Ei=="object"&&Ei.constructor.wordSize===s.wordSize&&Array.isArray(Ei.words)},s.max=function(Ei,vi){return Ei.cmp(vi)>0?Ei:vi},s.min=function(Ei,vi){return Ei.cmp(vi)<0?Ei:vi},s.prototype._init=function(Ei,vi,Ln){if(typeof Ei=="number")return this._initNumber(Ei,vi,Ln);if(typeof Ei=="object")return this._initArray(Ei,vi,Ln);vi==="hex"&&(vi=16),a(vi===(vi|0)&&vi>=2&&vi<=36),Ei=Ei.toString().replace(/\s+/g,"");var Yn=0;Ei[0]==="-"&&(Yn++,this.negative=1),Yn<Ei.length&&(vi===16?this._parseHex(Ei,Yn,Ln):(this._parseBase(Ei,vi,Yn),Ln==="le"&&this._initArray(this.toArray(),vi,Ln)))},s.prototype._initNumber=function(Ei,vi,Ln){Ei<0&&(this.negative=1,Ei=-Ei),Ei<67108864?(this.words=[Ei&67108863],this.length=1):Ei<4503599627370496?(this.words=[Ei&67108863,Ei/67108864&67108863],this.length=2):(a(Ei<9007199254740992),this.words=[Ei&67108863,Ei/67108864&67108863,1],this.length=3),Ln==="le"&&this._initArray(this.toArray(),vi,Ln)},s.prototype._initArray=function(Ei,vi,Ln){if(a(typeof Ei.length=="number"),Ei.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Ei.length/3),this.words=new Array(this.length);for(var Yn=0;Yn<this.length;Yn++)this.words[Yn]=0;var mi,gi,_i=0;if(Ln==="be")for(Yn=Ei.length-1,mi=0;Yn>=0;Yn-=3)gi=Ei[Yn]|Ei[Yn-1]<<8|Ei[Yn-2]<<16,this.words[mi]|=gi<<_i&67108863,this.words[mi+1]=gi>>>26-_i&67108863,_i+=24,_i>=26&&(_i-=26,mi++);else if(Ln==="le")for(Yn=0,mi=0;Yn<Ei.length;Yn+=3)gi=Ei[Yn]|Ei[Yn+1]<<8|Ei[Yn+2]<<16,this.words[mi]|=gi<<_i&67108863,this.words[mi+1]=gi>>>26-_i&67108863,_i+=24,_i>=26&&(_i-=26,mi++);return this.strip()};function D(Ci,Ei){var vi=Ci.charCodeAt(Ei);return vi>=65&&vi<=70?vi-55:vi>=97&&vi<=102?vi-87:vi-48&15}function on(Ci,Ei,vi){var Ln=D(Ci,vi);return vi-1>=Ei&&(Ln|=D(Ci,vi-1)<<4),Ln}s.prototype._parseHex=function(Ei,vi,Ln){this.length=Math.ceil((Ei.length-vi)/6),this.words=new Array(this.length);for(var Yn=0;Yn<this.length;Yn++)this.words[Yn]=0;var mi=0,gi=0,_i;if(Ln==="be")for(Yn=Ei.length-1;Yn>=vi;Yn-=2)_i=on(Ei,vi,Yn)<<mi,this.words[gi]|=_i&67108863,mi>=18?(mi-=18,gi+=1,this.words[gi]|=_i>>>26):mi+=8;else{var Ai=Ei.length-vi;for(Yn=Ai%2===0?vi+1:vi;Yn<Ei.length;Yn+=2)_i=on(Ei,vi,Yn)<<mi,this.words[gi]|=_i&67108863,mi>=18?(mi-=18,gi+=1,this.words[gi]|=_i>>>26):mi+=8}this.strip()};function h(Ci,Ei,vi,Ln){for(var Yn=0,mi=Math.min(Ci.length,vi),gi=Ei;gi<mi;gi++){var _i=Ci.charCodeAt(gi)-48;Yn*=Ln,_i>=49?Yn+=_i-49+10:_i>=17?Yn+=_i-17+10:Yn+=_i}return Yn}s.prototype._parseBase=function(Ei,vi,Ln){this.words=[0],this.length=1;for(var Yn=0,mi=1;mi<=67108863;mi*=vi)Yn++;Yn--,mi=mi/vi|0;for(var gi=Ei.length-Ln,_i=gi%Yn,Ai=Math.min(gi,gi-_i)+Ln,xi=0,Ri=Ln;Ri<Ai;Ri+=Yn)xi=h(Ei,Ri,Ri+Yn,vi),this.imuln(mi),this.words[0]+xi<67108864?this.words[0]+=xi:this._iaddn(xi);if(_i!==0){var Wn=1;for(xi=h(Ei,Ri,Ei.length,vi),Ri=0;Ri<_i;Ri++)Wn*=vi;this.imuln(Wn),this.words[0]+xi<67108864?this.words[0]+=xi:this._iaddn(xi)}this.strip()},s.prototype.copy=function(Ei){Ei.words=new Array(this.length);for(var vi=0;vi<this.length;vi++)Ei.words[vi]=this.words[vi];Ei.length=this.length,Ei.negative=this.negative,Ei.red=this.red},s.prototype.clone=function(){var Ei=new s(null);return this.copy(Ei),Ei},s.prototype._expand=function(Ei){for(;this.length<Ei;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var v=["","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"],In=[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],Rn=[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];s.prototype.toString=function(Ei,vi){Ei=Ei||10,vi=vi|0||1;var Ln;if(Ei===16||Ei==="hex"){Ln="";for(var Yn=0,mi=0,gi=0;gi<this.length;gi++){var _i=this.words[gi],Ai=((_i<<Yn|mi)&16777215).toString(16);mi=_i>>>24-Yn&16777215,Yn+=2,Yn>=26&&(Yn-=26,gi--),mi!==0||gi!==this.length-1?Ln=v[6-Ai.length]+Ai+Ln:Ln=Ai+Ln}for(mi!==0&&(Ln=mi.toString(16)+Ln);Ln.length%vi!==0;)Ln="0"+Ln;return this.negative!==0&&(Ln="-"+Ln),Ln}if(Ei===(Ei|0)&&Ei>=2&&Ei<=36){var xi=In[Ei],Ri=Rn[Ei];Ln="";var Wn=this.clone();for(Wn.negative=0;!Wn.isZero();){var wi=Wn.modn(Ri).toString(Ei);Wn=Wn.idivn(Ri),Wn.isZero()?Ln=wi+Ln:Ln=v[xi-wi.length]+wi+Ln}for(this.isZero()&&(Ln="0"+Ln);Ln.length%vi!==0;)Ln="0"+Ln;return this.negative!==0&&(Ln="-"+Ln),Ln}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var Ei=this.words[0];return this.length===2?Ei+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Ei+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Ei:Ei},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(Ei,vi){return a(typeof l<"u"),this.toArrayLike(l,Ei,vi)},s.prototype.toArray=function(Ei,vi){return this.toArrayLike(Array,Ei,vi)},s.prototype.toArrayLike=function(Ei,vi,Ln){var Yn=this.byteLength(),mi=Ln||Math.max(1,Yn);a(Yn<=mi,"byte array longer than desired length"),a(mi>0,"Requested array length <= 0"),this.strip();var gi=vi==="le",_i=new Ei(mi),Ai,xi,Ri=this.clone();if(gi){for(xi=0;!Ri.isZero();xi++)Ai=Ri.andln(255),Ri.iushrn(8),_i[xi]=Ai;for(;xi<mi;xi++)_i[xi]=0}else{for(xi=0;xi<mi-Yn;xi++)_i[xi]=0;for(xi=0;!Ri.isZero();xi++)Ai=Ri.andln(255),Ri.iushrn(8),_i[mi-xi-1]=Ai}return _i},Math.clz32?s.prototype._countBits=function(Ei){return 32-Math.clz32(Ei)}:s.prototype._countBits=function(Ei){var vi=Ei,Ln=0;return vi>=4096&&(Ln+=13,vi>>>=13),vi>=64&&(Ln+=7,vi>>>=7),vi>=8&&(Ln+=4,vi>>>=4),vi>=2&&(Ln+=2,vi>>>=2),Ln+vi},s.prototype._zeroBits=function(Ei){if(Ei===0)return 26;var vi=Ei,Ln=0;return(vi&8191)===0&&(Ln+=13,vi>>>=13),(vi&127)===0&&(Ln+=7,vi>>>=7),(vi&15)===0&&(Ln+=4,vi>>>=4),(vi&3)===0&&(Ln+=2,vi>>>=2),(vi&1)===0&&Ln++,Ln},s.prototype.bitLength=function(){var Ei=this.words[this.length-1],vi=this._countBits(Ei);return(this.length-1)*26+vi};function Mn(Ci){for(var Ei=new Array(Ci.bitLength()),vi=0;vi<Ei.length;vi++){var Ln=vi/26|0,Yn=vi%26;Ei[vi]=(Ci.words[Ln]&1<<Yn)>>>Yn}return Ei}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Ei=0,vi=0;vi<this.length;vi++){var Ln=this._zeroBits(this.words[vi]);if(Ei+=Ln,Ln!==26)break}return Ei},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(Ei){return this.negative!==0?this.abs().inotn(Ei).iaddn(1):this.clone()},s.prototype.fromTwos=function(Ei){return this.testn(Ei-1)?this.notn(Ei).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(Ei){for(;this.length<Ei.length;)this.words[this.length++]=0;for(var vi=0;vi<Ei.length;vi++)this.words[vi]=this.words[vi]|Ei.words[vi];return this.strip()},s.prototype.ior=function(Ei){return a((this.negative|Ei.negative)===0),this.iuor(Ei)},s.prototype.or=function(Ei){return this.length>Ei.length?this.clone().ior(Ei):Ei.clone().ior(this)},s.prototype.uor=function(Ei){return this.length>Ei.length?this.clone().iuor(Ei):Ei.clone().iuor(this)},s.prototype.iuand=function(Ei){var vi;this.length>Ei.length?vi=Ei:vi=this;for(var Ln=0;Ln<vi.length;Ln++)this.words[Ln]=this.words[Ln]&Ei.words[Ln];return this.length=vi.length,this.strip()},s.prototype.iand=function(Ei){return a((this.negative|Ei.negative)===0),this.iuand(Ei)},s.prototype.and=function(Ei){return this.length>Ei.length?this.clone().iand(Ei):Ei.clone().iand(this)},s.prototype.uand=function(Ei){return this.length>Ei.length?this.clone().iuand(Ei):Ei.clone().iuand(this)},s.prototype.iuxor=function(Ei){var vi,Ln;this.length>Ei.length?(vi=this,Ln=Ei):(vi=Ei,Ln=this);for(var Yn=0;Yn<Ln.length;Yn++)this.words[Yn]=vi.words[Yn]^Ln.words[Yn];if(this!==vi)for(;Yn<vi.length;Yn++)this.words[Yn]=vi.words[Yn];return this.length=vi.length,this.strip()},s.prototype.ixor=function(Ei){return a((this.negative|Ei.negative)===0),this.iuxor(Ei)},s.prototype.xor=function(Ei){return this.length>Ei.length?this.clone().ixor(Ei):Ei.clone().ixor(this)},s.prototype.uxor=function(Ei){return this.length>Ei.length?this.clone().iuxor(Ei):Ei.clone().iuxor(this)},s.prototype.inotn=function(Ei){a(typeof Ei=="number"&&Ei>=0);var vi=Math.ceil(Ei/26)|0,Ln=Ei%26;this._expand(vi),Ln>0&&vi--;for(var Yn=0;Yn<vi;Yn++)this.words[Yn]=~this.words[Yn]&67108863;return Ln>0&&(this.words[Yn]=~this.words[Yn]&67108863>>26-Ln),this.strip()},s.prototype.notn=function(Ei){return this.clone().inotn(Ei)},s.prototype.setn=function(Ei,vi){a(typeof Ei=="number"&&Ei>=0);var Ln=Ei/26|0,Yn=Ei%26;return this._expand(Ln+1),vi?this.words[Ln]=this.words[Ln]|1<<Yn:this.words[Ln]=this.words[Ln]&~(1<<Yn),this.strip()},s.prototype.iadd=function(Ei){var vi;if(this.negative!==0&&Ei.negative===0)return this.negative=0,vi=this.isub(Ei),this.negative^=1,this._normSign();if(this.negative===0&&Ei.negative!==0)return Ei.negative=0,vi=this.isub(Ei),Ei.negative=1,vi._normSign();var Ln,Yn;this.length>Ei.length?(Ln=this,Yn=Ei):(Ln=Ei,Yn=this);for(var mi=0,gi=0;gi<Yn.length;gi++)vi=(Ln.words[gi]|0)+(Yn.words[gi]|0)+mi,this.words[gi]=vi&67108863,mi=vi>>>26;for(;mi!==0&&gi<Ln.length;gi++)vi=(Ln.words[gi]|0)+mi,this.words[gi]=vi&67108863,mi=vi>>>26;if(this.length=Ln.length,mi!==0)this.words[this.length]=mi,this.length++;else if(Ln!==this)for(;gi<Ln.length;gi++)this.words[gi]=Ln.words[gi];return this},s.prototype.add=function(Ei){var vi;return Ei.negative!==0&&this.negative===0?(Ei.negative=0,vi=this.sub(Ei),Ei.negative^=1,vi):Ei.negative===0&&this.negative!==0?(this.negative=0,vi=Ei.sub(this),this.negative=1,vi):this.length>Ei.length?this.clone().iadd(Ei):Ei.clone().iadd(this)},s.prototype.isub=function(Ei){if(Ei.negative!==0){Ei.negative=0;var vi=this.iadd(Ei);return Ei.negative=1,vi._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Ei),this.negative=1,this._normSign();var Ln=this.cmp(Ei);if(Ln===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Yn,mi;Ln>0?(Yn=this,mi=Ei):(Yn=Ei,mi=this);for(var gi=0,_i=0;_i<mi.length;_i++)vi=(Yn.words[_i]|0)-(mi.words[_i]|0)+gi,gi=vi>>26,this.words[_i]=vi&67108863;for(;gi!==0&&_i<Yn.length;_i++)vi=(Yn.words[_i]|0)+gi,gi=vi>>26,this.words[_i]=vi&67108863;if(gi===0&&_i<Yn.length&&Yn!==this)for(;_i<Yn.length;_i++)this.words[_i]=Yn.words[_i];return this.length=Math.max(this.length,_i),Yn!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(Ei){return this.clone().isub(Ei)};function jn(Ci,Ei,vi){vi.negative=Ei.negative^Ci.negative;var Ln=Ci.length+Ei.length|0;vi.length=Ln,Ln=Ln-1|0;var Yn=Ci.words[0]|0,mi=Ei.words[0]|0,gi=Yn*mi,_i=gi&67108863,Ai=gi/67108864|0;vi.words[0]=_i;for(var xi=1;xi<Ln;xi++){for(var Ri=Ai>>>26,Wn=Ai&67108863,wi=Math.min(xi,Ei.length-1),qi=Math.max(0,xi-Ci.length+1);qi<=wi;qi++){var Gi=xi-qi|0;Yn=Ci.words[Gi]|0,mi=Ei.words[qi]|0,gi=Yn*mi+Wn,Ri+=gi/67108864|0,Wn=gi&67108863}vi.words[xi]=Wn|0,Ai=Ri|0}return Ai!==0?vi.words[xi]=Ai|0:vi.length--,vi.strip()}var Hn=function(Ei,vi,Ln){var Yn=Ei.words,mi=vi.words,gi=Ln.words,_i=0,Ai,xi,Ri,Wn=Yn[0]|0,wi=Wn&8191,qi=Wn>>>13,Gi=Yn[1]|0,ji=Gi&8191,Li=Gi>>>13,$i=Yn[2]|0,zi=$i&8191,Qi=$i>>>13,Vi=Yn[3]|0,Bi=Vi&8191,Hi=Vi>>>13,Yi=Yn[4]|0,Ji=Yi&8191,ra=Yi>>>13,aa=Yn[5]|0,ea=aa&8191,Zi=aa>>>13,ca=Yn[6]|0,Xi=ca&8191,ia=ca>>>13,na=Yn[7]|0,oa=na&8191,la=na>>>13,da=Yn[8]|0,fa=da&8191,ba=da>>>13,pa=Yn[9]|0,ha=pa&8191,Ia=pa>>>13,Da=mi[0]|0,ya=Da&8191,Fa=Da>>>13,Sa=mi[1]|0,ga=Sa&8191,Pa=Sa>>>13,wa=mi[2]|0,ma=wa&8191,$a=wa>>>13,Na=mi[3]|0,_a=Na&8191,Ba=Na>>>13,Ca=mi[4]|0,Ra=Ca&8191,ka=Ca>>>13,Ma=mi[5]|0,Ki=Ma&8191,Pi=Ma>>>13,Ui=mi[6]|0,Wi=Ui&8191,ta=Ui>>>13,sa=mi[7]|0,ua=sa&8191,Ta=sa>>>13,xa=mi[8]|0,va=xa&8191,Oa=xa>>>13,Ea=mi[9]|0,Aa=Ea&8191,Ua=Ea>>>13;Ln.negative=Ei.negative^vi.negative,Ln.length=19,Ai=Math.imul(wi,ya),xi=Math.imul(wi,Fa),xi=xi+Math.imul(qi,ya)|0,Ri=Math.imul(qi,Fa);var qa=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(qa>>>26)|0,qa&=67108863,Ai=Math.imul(ji,ya),xi=Math.imul(ji,Fa),xi=xi+Math.imul(Li,ya)|0,Ri=Math.imul(Li,Fa),Ai=Ai+Math.imul(wi,ga)|0,xi=xi+Math.imul(wi,Pa)|0,xi=xi+Math.imul(qi,ga)|0,Ri=Ri+Math.imul(qi,Pa)|0;var La=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(La>>>26)|0,La&=67108863,Ai=Math.imul(zi,ya),xi=Math.imul(zi,Fa),xi=xi+Math.imul(Qi,ya)|0,Ri=Math.imul(Qi,Fa),Ai=Ai+Math.imul(ji,ga)|0,xi=xi+Math.imul(ji,Pa)|0,xi=xi+Math.imul(Li,ga)|0,Ri=Ri+Math.imul(Li,Pa)|0,Ai=Ai+Math.imul(wi,ma)|0,xi=xi+Math.imul(wi,$a)|0,xi=xi+Math.imul(qi,ma)|0,Ri=Ri+Math.imul(qi,$a)|0;var ja=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(ja>>>26)|0,ja&=67108863,Ai=Math.imul(Bi,ya),xi=Math.imul(Bi,Fa),xi=xi+Math.imul(Hi,ya)|0,Ri=Math.imul(Hi,Fa),Ai=Ai+Math.imul(zi,ga)|0,xi=xi+Math.imul(zi,Pa)|0,xi=xi+Math.imul(Qi,ga)|0,Ri=Ri+Math.imul(Qi,Pa)|0,Ai=Ai+Math.imul(ji,ma)|0,xi=xi+Math.imul(ji,$a)|0,xi=xi+Math.imul(Li,ma)|0,Ri=Ri+Math.imul(Li,$a)|0,Ai=Ai+Math.imul(wi,_a)|0,xi=xi+Math.imul(wi,Ba)|0,xi=xi+Math.imul(qi,_a)|0,Ri=Ri+Math.imul(qi,Ba)|0;var Va=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Va>>>26)|0,Va&=67108863,Ai=Math.imul(Ji,ya),xi=Math.imul(Ji,Fa),xi=xi+Math.imul(ra,ya)|0,Ri=Math.imul(ra,Fa),Ai=Ai+Math.imul(Bi,ga)|0,xi=xi+Math.imul(Bi,Pa)|0,xi=xi+Math.imul(Hi,ga)|0,Ri=Ri+Math.imul(Hi,Pa)|0,Ai=Ai+Math.imul(zi,ma)|0,xi=xi+Math.imul(zi,$a)|0,xi=xi+Math.imul(Qi,ma)|0,Ri=Ri+Math.imul(Qi,$a)|0,Ai=Ai+Math.imul(ji,_a)|0,xi=xi+Math.imul(ji,Ba)|0,xi=xi+Math.imul(Li,_a)|0,Ri=Ri+Math.imul(Li,Ba)|0,Ai=Ai+Math.imul(wi,Ra)|0,xi=xi+Math.imul(wi,ka)|0,xi=xi+Math.imul(qi,Ra)|0,Ri=Ri+Math.imul(qi,ka)|0;var Ga=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,Ai=Math.imul(ea,ya),xi=Math.imul(ea,Fa),xi=xi+Math.imul(Zi,ya)|0,Ri=Math.imul(Zi,Fa),Ai=Ai+Math.imul(Ji,ga)|0,xi=xi+Math.imul(Ji,Pa)|0,xi=xi+Math.imul(ra,ga)|0,Ri=Ri+Math.imul(ra,Pa)|0,Ai=Ai+Math.imul(Bi,ma)|0,xi=xi+Math.imul(Bi,$a)|0,xi=xi+Math.imul(Hi,ma)|0,Ri=Ri+Math.imul(Hi,$a)|0,Ai=Ai+Math.imul(zi,_a)|0,xi=xi+Math.imul(zi,Ba)|0,xi=xi+Math.imul(Qi,_a)|0,Ri=Ri+Math.imul(Qi,Ba)|0,Ai=Ai+Math.imul(ji,Ra)|0,xi=xi+Math.imul(ji,ka)|0,xi=xi+Math.imul(Li,Ra)|0,Ri=Ri+Math.imul(Li,ka)|0,Ai=Ai+Math.imul(wi,Ki)|0,xi=xi+Math.imul(wi,Pi)|0,xi=xi+Math.imul(qi,Ki)|0,Ri=Ri+Math.imul(qi,Pi)|0;var Ka=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,Ai=Math.imul(Xi,ya),xi=Math.imul(Xi,Fa),xi=xi+Math.imul(ia,ya)|0,Ri=Math.imul(ia,Fa),Ai=Ai+Math.imul(ea,ga)|0,xi=xi+Math.imul(ea,Pa)|0,xi=xi+Math.imul(Zi,ga)|0,Ri=Ri+Math.imul(Zi,Pa)|0,Ai=Ai+Math.imul(Ji,ma)|0,xi=xi+Math.imul(Ji,$a)|0,xi=xi+Math.imul(ra,ma)|0,Ri=Ri+Math.imul(ra,$a)|0,Ai=Ai+Math.imul(Bi,_a)|0,xi=xi+Math.imul(Bi,Ba)|0,xi=xi+Math.imul(Hi,_a)|0,Ri=Ri+Math.imul(Hi,Ba)|0,Ai=Ai+Math.imul(zi,Ra)|0,xi=xi+Math.imul(zi,ka)|0,xi=xi+Math.imul(Qi,Ra)|0,Ri=Ri+Math.imul(Qi,ka)|0,Ai=Ai+Math.imul(ji,Ki)|0,xi=xi+Math.imul(ji,Pi)|0,xi=xi+Math.imul(Li,Ki)|0,Ri=Ri+Math.imul(Li,Pi)|0,Ai=Ai+Math.imul(wi,Wi)|0,xi=xi+Math.imul(wi,ta)|0,xi=xi+Math.imul(qi,Wi)|0,Ri=Ri+Math.imul(qi,ta)|0;var Ha=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Ha>>>26)|0,Ha&=67108863,Ai=Math.imul(oa,ya),xi=Math.imul(oa,Fa),xi=xi+Math.imul(la,ya)|0,Ri=Math.imul(la,Fa),Ai=Ai+Math.imul(Xi,ga)|0,xi=xi+Math.imul(Xi,Pa)|0,xi=xi+Math.imul(ia,ga)|0,Ri=Ri+Math.imul(ia,Pa)|0,Ai=Ai+Math.imul(ea,ma)|0,xi=xi+Math.imul(ea,$a)|0,xi=xi+Math.imul(Zi,ma)|0,Ri=Ri+Math.imul(Zi,$a)|0,Ai=Ai+Math.imul(Ji,_a)|0,xi=xi+Math.imul(Ji,Ba)|0,xi=xi+Math.imul(ra,_a)|0,Ri=Ri+Math.imul(ra,Ba)|0,Ai=Ai+Math.imul(Bi,Ra)|0,xi=xi+Math.imul(Bi,ka)|0,xi=xi+Math.imul(Hi,Ra)|0,Ri=Ri+Math.imul(Hi,ka)|0,Ai=Ai+Math.imul(zi,Ki)|0,xi=xi+Math.imul(zi,Pi)|0,xi=xi+Math.imul(Qi,Ki)|0,Ri=Ri+Math.imul(Qi,Pi)|0,Ai=Ai+Math.imul(ji,Wi)|0,xi=xi+Math.imul(ji,ta)|0,xi=xi+Math.imul(Li,Wi)|0,Ri=Ri+Math.imul(Li,ta)|0,Ai=Ai+Math.imul(wi,ua)|0,xi=xi+Math.imul(wi,Ta)|0,xi=xi+Math.imul(qi,ua)|0,Ri=Ri+Math.imul(qi,Ta)|0;var Qa=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,Ai=Math.imul(fa,ya),xi=Math.imul(fa,Fa),xi=xi+Math.imul(ba,ya)|0,Ri=Math.imul(ba,Fa),Ai=Ai+Math.imul(oa,ga)|0,xi=xi+Math.imul(oa,Pa)|0,xi=xi+Math.imul(la,ga)|0,Ri=Ri+Math.imul(la,Pa)|0,Ai=Ai+Math.imul(Xi,ma)|0,xi=xi+Math.imul(Xi,$a)|0,xi=xi+Math.imul(ia,ma)|0,Ri=Ri+Math.imul(ia,$a)|0,Ai=Ai+Math.imul(ea,_a)|0,xi=xi+Math.imul(ea,Ba)|0,xi=xi+Math.imul(Zi,_a)|0,Ri=Ri+Math.imul(Zi,Ba)|0,Ai=Ai+Math.imul(Ji,Ra)|0,xi=xi+Math.imul(Ji,ka)|0,xi=xi+Math.imul(ra,Ra)|0,Ri=Ri+Math.imul(ra,ka)|0,Ai=Ai+Math.imul(Bi,Ki)|0,xi=xi+Math.imul(Bi,Pi)|0,xi=xi+Math.imul(Hi,Ki)|0,Ri=Ri+Math.imul(Hi,Pi)|0,Ai=Ai+Math.imul(zi,Wi)|0,xi=xi+Math.imul(zi,ta)|0,xi=xi+Math.imul(Qi,Wi)|0,Ri=Ri+Math.imul(Qi,ta)|0,Ai=Ai+Math.imul(ji,ua)|0,xi=xi+Math.imul(ji,Ta)|0,xi=xi+Math.imul(Li,ua)|0,Ri=Ri+Math.imul(Li,Ta)|0,Ai=Ai+Math.imul(wi,va)|0,xi=xi+Math.imul(wi,Oa)|0,xi=xi+Math.imul(qi,va)|0,Ri=Ri+Math.imul(qi,Oa)|0;var Ya=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Ya>>>26)|0,Ya&=67108863,Ai=Math.imul(ha,ya),xi=Math.imul(ha,Fa),xi=xi+Math.imul(Ia,ya)|0,Ri=Math.imul(Ia,Fa),Ai=Ai+Math.imul(fa,ga)|0,xi=xi+Math.imul(fa,Pa)|0,xi=xi+Math.imul(ba,ga)|0,Ri=Ri+Math.imul(ba,Pa)|0,Ai=Ai+Math.imul(oa,ma)|0,xi=xi+Math.imul(oa,$a)|0,xi=xi+Math.imul(la,ma)|0,Ri=Ri+Math.imul(la,$a)|0,Ai=Ai+Math.imul(Xi,_a)|0,xi=xi+Math.imul(Xi,Ba)|0,xi=xi+Math.imul(ia,_a)|0,Ri=Ri+Math.imul(ia,Ba)|0,Ai=Ai+Math.imul(ea,Ra)|0,xi=xi+Math.imul(ea,ka)|0,xi=xi+Math.imul(Zi,Ra)|0,Ri=Ri+Math.imul(Zi,ka)|0,Ai=Ai+Math.imul(Ji,Ki)|0,xi=xi+Math.imul(Ji,Pi)|0,xi=xi+Math.imul(ra,Ki)|0,Ri=Ri+Math.imul(ra,Pi)|0,Ai=Ai+Math.imul(Bi,Wi)|0,xi=xi+Math.imul(Bi,ta)|0,xi=xi+Math.imul(Hi,Wi)|0,Ri=Ri+Math.imul(Hi,ta)|0,Ai=Ai+Math.imul(zi,ua)|0,xi=xi+Math.imul(zi,Ta)|0,xi=xi+Math.imul(Qi,ua)|0,Ri=Ri+Math.imul(Qi,Ta)|0,Ai=Ai+Math.imul(ji,va)|0,xi=xi+Math.imul(ji,Oa)|0,xi=xi+Math.imul(Li,va)|0,Ri=Ri+Math.imul(Li,Oa)|0,Ai=Ai+Math.imul(wi,Aa)|0,xi=xi+Math.imul(wi,Ua)|0,xi=xi+Math.imul(qi,Aa)|0,Ri=Ri+Math.imul(qi,Ua)|0;var za=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(za>>>26)|0,za&=67108863,Ai=Math.imul(ha,ga),xi=Math.imul(ha,Pa),xi=xi+Math.imul(Ia,ga)|0,Ri=Math.imul(Ia,Pa),Ai=Ai+Math.imul(fa,ma)|0,xi=xi+Math.imul(fa,$a)|0,xi=xi+Math.imul(ba,ma)|0,Ri=Ri+Math.imul(ba,$a)|0,Ai=Ai+Math.imul(oa,_a)|0,xi=xi+Math.imul(oa,Ba)|0,xi=xi+Math.imul(la,_a)|0,Ri=Ri+Math.imul(la,Ba)|0,Ai=Ai+Math.imul(Xi,Ra)|0,xi=xi+Math.imul(Xi,ka)|0,xi=xi+Math.imul(ia,Ra)|0,Ri=Ri+Math.imul(ia,ka)|0,Ai=Ai+Math.imul(ea,Ki)|0,xi=xi+Math.imul(ea,Pi)|0,xi=xi+Math.imul(Zi,Ki)|0,Ri=Ri+Math.imul(Zi,Pi)|0,Ai=Ai+Math.imul(Ji,Wi)|0,xi=xi+Math.imul(Ji,ta)|0,xi=xi+Math.imul(ra,Wi)|0,Ri=Ri+Math.imul(ra,ta)|0,Ai=Ai+Math.imul(Bi,ua)|0,xi=xi+Math.imul(Bi,Ta)|0,xi=xi+Math.imul(Hi,ua)|0,Ri=Ri+Math.imul(Hi,Ta)|0,Ai=Ai+Math.imul(zi,va)|0,xi=xi+Math.imul(zi,Oa)|0,xi=xi+Math.imul(Qi,va)|0,Ri=Ri+Math.imul(Qi,Oa)|0,Ai=Ai+Math.imul(ji,Aa)|0,xi=xi+Math.imul(ji,Ua)|0,xi=xi+Math.imul(Li,Aa)|0,Ri=Ri+Math.imul(Li,Ua)|0;var Wa=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,Ai=Math.imul(ha,ma),xi=Math.imul(ha,$a),xi=xi+Math.imul(Ia,ma)|0,Ri=Math.imul(Ia,$a),Ai=Ai+Math.imul(fa,_a)|0,xi=xi+Math.imul(fa,Ba)|0,xi=xi+Math.imul(ba,_a)|0,Ri=Ri+Math.imul(ba,Ba)|0,Ai=Ai+Math.imul(oa,Ra)|0,xi=xi+Math.imul(oa,ka)|0,xi=xi+Math.imul(la,Ra)|0,Ri=Ri+Math.imul(la,ka)|0,Ai=Ai+Math.imul(Xi,Ki)|0,xi=xi+Math.imul(Xi,Pi)|0,xi=xi+Math.imul(ia,Ki)|0,Ri=Ri+Math.imul(ia,Pi)|0,Ai=Ai+Math.imul(ea,Wi)|0,xi=xi+Math.imul(ea,ta)|0,xi=xi+Math.imul(Zi,Wi)|0,Ri=Ri+Math.imul(Zi,ta)|0,Ai=Ai+Math.imul(Ji,ua)|0,xi=xi+Math.imul(Ji,Ta)|0,xi=xi+Math.imul(ra,ua)|0,Ri=Ri+Math.imul(ra,Ta)|0,Ai=Ai+Math.imul(Bi,va)|0,xi=xi+Math.imul(Bi,Oa)|0,xi=xi+Math.imul(Hi,va)|0,Ri=Ri+Math.imul(Hi,Oa)|0,Ai=Ai+Math.imul(zi,Aa)|0,xi=xi+Math.imul(zi,Ua)|0,xi=xi+Math.imul(Qi,Aa)|0,Ri=Ri+Math.imul(Qi,Ua)|0;var Ja=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,Ai=Math.imul(ha,_a),xi=Math.imul(ha,Ba),xi=xi+Math.imul(Ia,_a)|0,Ri=Math.imul(Ia,Ba),Ai=Ai+Math.imul(fa,Ra)|0,xi=xi+Math.imul(fa,ka)|0,xi=xi+Math.imul(ba,Ra)|0,Ri=Ri+Math.imul(ba,ka)|0,Ai=Ai+Math.imul(oa,Ki)|0,xi=xi+Math.imul(oa,Pi)|0,xi=xi+Math.imul(la,Ki)|0,Ri=Ri+Math.imul(la,Pi)|0,Ai=Ai+Math.imul(Xi,Wi)|0,xi=xi+Math.imul(Xi,ta)|0,xi=xi+Math.imul(ia,Wi)|0,Ri=Ri+Math.imul(ia,ta)|0,Ai=Ai+Math.imul(ea,ua)|0,xi=xi+Math.imul(ea,Ta)|0,xi=xi+Math.imul(Zi,ua)|0,Ri=Ri+Math.imul(Zi,Ta)|0,Ai=Ai+Math.imul(Ji,va)|0,xi=xi+Math.imul(Ji,Oa)|0,xi=xi+Math.imul(ra,va)|0,Ri=Ri+Math.imul(ra,Oa)|0,Ai=Ai+Math.imul(Bi,Aa)|0,xi=xi+Math.imul(Bi,Ua)|0,xi=xi+Math.imul(Hi,Aa)|0,Ri=Ri+Math.imul(Hi,Ua)|0;var Xa=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,Ai=Math.imul(ha,Ra),xi=Math.imul(ha,ka),xi=xi+Math.imul(Ia,Ra)|0,Ri=Math.imul(Ia,ka),Ai=Ai+Math.imul(fa,Ki)|0,xi=xi+Math.imul(fa,Pi)|0,xi=xi+Math.imul(ba,Ki)|0,Ri=Ri+Math.imul(ba,Pi)|0,Ai=Ai+Math.imul(oa,Wi)|0,xi=xi+Math.imul(oa,ta)|0,xi=xi+Math.imul(la,Wi)|0,Ri=Ri+Math.imul(la,ta)|0,Ai=Ai+Math.imul(Xi,ua)|0,xi=xi+Math.imul(Xi,Ta)|0,xi=xi+Math.imul(ia,ua)|0,Ri=Ri+Math.imul(ia,Ta)|0,Ai=Ai+Math.imul(ea,va)|0,xi=xi+Math.imul(ea,Oa)|0,xi=xi+Math.imul(Zi,va)|0,Ri=Ri+Math.imul(Zi,Oa)|0,Ai=Ai+Math.imul(Ji,Aa)|0,xi=xi+Math.imul(Ji,Ua)|0,xi=xi+Math.imul(ra,Aa)|0,Ri=Ri+Math.imul(ra,Ua)|0;var Za=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(Za>>>26)|0,Za&=67108863,Ai=Math.imul(ha,Ki),xi=Math.imul(ha,Pi),xi=xi+Math.imul(Ia,Ki)|0,Ri=Math.imul(Ia,Pi),Ai=Ai+Math.imul(fa,Wi)|0,xi=xi+Math.imul(fa,ta)|0,xi=xi+Math.imul(ba,Wi)|0,Ri=Ri+Math.imul(ba,ta)|0,Ai=Ai+Math.imul(oa,ua)|0,xi=xi+Math.imul(oa,Ta)|0,xi=xi+Math.imul(la,ua)|0,Ri=Ri+Math.imul(la,Ta)|0,Ai=Ai+Math.imul(Xi,va)|0,xi=xi+Math.imul(Xi,Oa)|0,xi=xi+Math.imul(ia,va)|0,Ri=Ri+Math.imul(ia,Oa)|0,Ai=Ai+Math.imul(ea,Aa)|0,xi=xi+Math.imul(ea,Ua)|0,xi=xi+Math.imul(Zi,Aa)|0,Ri=Ri+Math.imul(Zi,Ua)|0;var es=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(es>>>26)|0,es&=67108863,Ai=Math.imul(ha,Wi),xi=Math.imul(ha,ta),xi=xi+Math.imul(Ia,Wi)|0,Ri=Math.imul(Ia,ta),Ai=Ai+Math.imul(fa,ua)|0,xi=xi+Math.imul(fa,Ta)|0,xi=xi+Math.imul(ba,ua)|0,Ri=Ri+Math.imul(ba,Ta)|0,Ai=Ai+Math.imul(oa,va)|0,xi=xi+Math.imul(oa,Oa)|0,xi=xi+Math.imul(la,va)|0,Ri=Ri+Math.imul(la,Oa)|0,Ai=Ai+Math.imul(Xi,Aa)|0,xi=xi+Math.imul(Xi,Ua)|0,xi=xi+Math.imul(ia,Aa)|0,Ri=Ri+Math.imul(ia,Ua)|0;var rs=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(rs>>>26)|0,rs&=67108863,Ai=Math.imul(ha,ua),xi=Math.imul(ha,Ta),xi=xi+Math.imul(Ia,ua)|0,Ri=Math.imul(Ia,Ta),Ai=Ai+Math.imul(fa,va)|0,xi=xi+Math.imul(fa,Oa)|0,xi=xi+Math.imul(ba,va)|0,Ri=Ri+Math.imul(ba,Oa)|0,Ai=Ai+Math.imul(oa,Aa)|0,xi=xi+Math.imul(oa,Ua)|0,xi=xi+Math.imul(la,Aa)|0,Ri=Ri+Math.imul(la,Ua)|0;var ts=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(ts>>>26)|0,ts&=67108863,Ai=Math.imul(ha,va),xi=Math.imul(ha,Oa),xi=xi+Math.imul(Ia,va)|0,Ri=Math.imul(Ia,Oa),Ai=Ai+Math.imul(fa,Aa)|0,xi=xi+Math.imul(fa,Ua)|0,xi=xi+Math.imul(ba,Aa)|0,Ri=Ri+Math.imul(ba,Ua)|0;var ns=(_i+Ai|0)+((xi&8191)<<13)|0;_i=(Ri+(xi>>>13)|0)+(ns>>>26)|0,ns&=67108863,Ai=Math.imul(ha,Aa),xi=Math.imul(ha,Ua),xi=xi+Math.imul(Ia,Aa)|0,Ri=Math.imul(Ia,Ua);var is=(_i+Ai|0)+((xi&8191)<<13)|0;return _i=(Ri+(xi>>>13)|0)+(is>>>26)|0,is&=67108863,gi[0]=qa,gi[1]=La,gi[2]=ja,gi[3]=Va,gi[4]=Ga,gi[5]=Ka,gi[6]=Ha,gi[7]=Qa,gi[8]=Ya,gi[9]=za,gi[10]=Wa,gi[11]=Ja,gi[12]=Xa,gi[13]=Za,gi[14]=es,gi[15]=rs,gi[16]=ts,gi[17]=ns,gi[18]=is,_i!==0&&(gi[19]=_i,Ln.length++),Ln};Math.imul||(Hn=jn);function hi(Ci,Ei,vi){vi.negative=Ei.negative^Ci.negative,vi.length=Ci.length+Ei.length;for(var Ln=0,Yn=0,mi=0;mi<vi.length-1;mi++){var gi=Yn;Yn=0;for(var _i=Ln&67108863,Ai=Math.min(mi,Ei.length-1),xi=Math.max(0,mi-Ci.length+1);xi<=Ai;xi++){var Ri=mi-xi,Wn=Ci.words[Ri]|0,wi=Ei.words[xi]|0,qi=Wn*wi,Gi=qi&67108863;gi=gi+(qi/67108864|0)|0,Gi=Gi+_i|0,_i=Gi&67108863,gi=gi+(Gi>>>26)|0,Yn+=gi>>>26,gi&=67108863}vi.words[mi]=_i,Ln=gi,gi=Yn}return Ln!==0?vi.words[mi]=Ln:vi.length--,vi.strip()}function yi(Ci,Ei,vi){var Ln=new bi;return Ln.mulp(Ci,Ei,vi)}s.prototype.mulTo=function(Ei,vi){var Ln,Yn=this.length+Ei.length;return this.length===10&&Ei.length===10?Ln=Hn(this,Ei,vi):Yn<63?Ln=jn(this,Ei,vi):Yn<1024?Ln=hi(this,Ei,vi):Ln=yi(this,Ei,vi),Ln};function bi(Ci,Ei){this.x=Ci,this.y=Ei}bi.prototype.makeRBT=function(Ei){for(var vi=new Array(Ei),Ln=s.prototype._countBits(Ei)-1,Yn=0;Yn<Ei;Yn++)vi[Yn]=this.revBin(Yn,Ln,Ei);return vi},bi.prototype.revBin=function(Ei,vi,Ln){if(Ei===0||Ei===Ln-1)return Ei;for(var Yn=0,mi=0;mi<vi;mi++)Yn|=(Ei&1)<<vi-mi-1,Ei>>=1;return Yn},bi.prototype.permute=function(Ei,vi,Ln,Yn,mi,gi){for(var _i=0;_i<gi;_i++)Yn[_i]=vi[Ei[_i]],mi[_i]=Ln[Ei[_i]]},bi.prototype.transform=function(Ei,vi,Ln,Yn,mi,gi){this.permute(gi,Ei,vi,Ln,Yn,mi);for(var _i=1;_i<mi;_i<<=1)for(var Ai=_i<<1,xi=Math.cos(2*Math.PI/Ai),Ri=Math.sin(2*Math.PI/Ai),Wn=0;Wn<mi;Wn+=Ai)for(var wi=xi,qi=Ri,Gi=0;Gi<_i;Gi++){var ji=Ln[Wn+Gi],Li=Yn[Wn+Gi],$i=Ln[Wn+Gi+_i],zi=Yn[Wn+Gi+_i],Qi=wi*$i-qi*zi;zi=wi*zi+qi*$i,$i=Qi,Ln[Wn+Gi]=ji+$i,Yn[Wn+Gi]=Li+zi,Ln[Wn+Gi+_i]=ji-$i,Yn[Wn+Gi+_i]=Li-zi,Gi!==Ai&&(Qi=xi*wi-Ri*qi,qi=xi*qi+Ri*wi,wi=Qi)}},bi.prototype.guessLen13b=function(Ei,vi){var Ln=Math.max(vi,Ei)|1,Yn=Ln&1,mi=0;for(Ln=Ln/2|0;Ln;Ln=Ln>>>1)mi++;return 1<<mi+1+Yn},bi.prototype.conjugate=function(Ei,vi,Ln){if(!(Ln<=1))for(var Yn=0;Yn<Ln/2;Yn++){var mi=Ei[Yn];Ei[Yn]=Ei[Ln-Yn-1],Ei[Ln-Yn-1]=mi,mi=vi[Yn],vi[Yn]=-vi[Ln-Yn-1],vi[Ln-Yn-1]=-mi}},bi.prototype.normalize13b=function(Ei,vi){for(var Ln=0,Yn=0;Yn<vi/2;Yn++){var mi=Math.round(Ei[2*Yn+1]/vi)*8192+Math.round(Ei[2*Yn]/vi)+Ln;Ei[Yn]=mi&67108863,mi<67108864?Ln=0:Ln=mi/67108864|0}return Ei},bi.prototype.convert13b=function(Ei,vi,Ln,Yn){for(var mi=0,gi=0;gi<vi;gi++)mi=mi+(Ei[gi]|0),Ln[2*gi]=mi&8191,mi=mi>>>13,Ln[2*gi+1]=mi&8191,mi=mi>>>13;for(gi=2*vi;gi<Yn;++gi)Ln[gi]=0;a(mi===0),a((mi&-8192)===0)},bi.prototype.stub=function(Ei){for(var vi=new Array(Ei),Ln=0;Ln<Ei;Ln++)vi[Ln]=0;return vi},bi.prototype.mulp=function(Ei,vi,Ln){var Yn=2*this.guessLen13b(Ei.length,vi.length),mi=this.makeRBT(Yn),gi=this.stub(Yn),_i=new Array(Yn),Ai=new Array(Yn),xi=new Array(Yn),Ri=new Array(Yn),Wn=new Array(Yn),wi=new Array(Yn),qi=Ln.words;qi.length=Yn,this.convert13b(Ei.words,Ei.length,_i,Yn),this.convert13b(vi.words,vi.length,Ri,Yn),this.transform(_i,gi,Ai,xi,Yn,mi),this.transform(Ri,gi,Wn,wi,Yn,mi);for(var Gi=0;Gi<Yn;Gi++){var ji=Ai[Gi]*Wn[Gi]-xi[Gi]*wi[Gi];xi[Gi]=Ai[Gi]*wi[Gi]+xi[Gi]*Wn[Gi],Ai[Gi]=ji}return this.conjugate(Ai,xi,Yn),this.transform(Ai,xi,qi,gi,Yn,mi),this.conjugate(qi,gi,Yn),this.normalize13b(qi,Yn),Ln.negative=Ei.negative^vi.negative,Ln.length=Ei.length+vi.length,Ln.strip()},s.prototype.mul=function(Ei){var vi=new s(null);return vi.words=new Array(this.length+Ei.length),this.mulTo(Ei,vi)},s.prototype.mulf=function(Ei){var vi=new s(null);return vi.words=new Array(this.length+Ei.length),yi(this,Ei,vi)},s.prototype.imul=function(Ei){return this.clone().mulTo(Ei,this)},s.prototype.imuln=function(Ei){a(typeof Ei=="number"),a(Ei<67108864);for(var vi=0,Ln=0;Ln<this.length;Ln++){var Yn=(this.words[Ln]|0)*Ei,mi=(Yn&67108863)+(vi&67108863);vi>>=26,vi+=Yn/67108864|0,vi+=mi>>>26,this.words[Ln]=mi&67108863}return vi!==0&&(this.words[Ln]=vi,this.length++),this.length=Ei===0?1:this.length,this},s.prototype.muln=function(Ei){return this.clone().imuln(Ei)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(Ei){var vi=Mn(Ei);if(vi.length===0)return new s(1);for(var Ln=this,Yn=0;Yn<vi.length&&vi[Yn]===0;Yn++,Ln=Ln.sqr());if(++Yn<vi.length)for(var mi=Ln.sqr();Yn<vi.length;Yn++,mi=mi.sqr())vi[Yn]!==0&&(Ln=Ln.mul(mi));return Ln},s.prototype.iushln=function(Ei){a(typeof Ei=="number"&&Ei>=0);var vi=Ei%26,Ln=(Ei-vi)/26,Yn=67108863>>>26-vi<<26-vi,mi;if(vi!==0){var gi=0;for(mi=0;mi<this.length;mi++){var _i=this.words[mi]&Yn,Ai=(this.words[mi]|0)-_i<<vi;this.words[mi]=Ai|gi,gi=_i>>>26-vi}gi&&(this.words[mi]=gi,this.length++)}if(Ln!==0){for(mi=this.length-1;mi>=0;mi--)this.words[mi+Ln]=this.words[mi];for(mi=0;mi<Ln;mi++)this.words[mi]=0;this.length+=Ln}return this.strip()},s.prototype.ishln=function(Ei){return a(this.negative===0),this.iushln(Ei)},s.prototype.iushrn=function(Ei,vi,Ln){a(typeof Ei=="number"&&Ei>=0);var Yn;vi?Yn=(vi-vi%26)/26:Yn=0;var mi=Ei%26,gi=Math.min((Ei-mi)/26,this.length),_i=67108863^67108863>>>mi<<mi,Ai=Ln;if(Yn-=gi,Yn=Math.max(0,Yn),Ai){for(var xi=0;xi<gi;xi++)Ai.words[xi]=this.words[xi];Ai.length=gi}if(gi!==0)if(this.length>gi)for(this.length-=gi,xi=0;xi<this.length;xi++)this.words[xi]=this.words[xi+gi];else this.words[0]=0,this.length=1;var Ri=0;for(xi=this.length-1;xi>=0&&(Ri!==0||xi>=Yn);xi--){var Wn=this.words[xi]|0;this.words[xi]=Ri<<26-mi|Wn>>>mi,Ri=Wn&_i}return Ai&&Ri!==0&&(Ai.words[Ai.length++]=Ri),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(Ei,vi,Ln){return a(this.negative===0),this.iushrn(Ei,vi,Ln)},s.prototype.shln=function(Ei){return this.clone().ishln(Ei)},s.prototype.ushln=function(Ei){return this.clone().iushln(Ei)},s.prototype.shrn=function(Ei){return this.clone().ishrn(Ei)},s.prototype.ushrn=function(Ei){return this.clone().iushrn(Ei)},s.prototype.testn=function(Ei){a(typeof Ei=="number"&&Ei>=0);var vi=Ei%26,Ln=(Ei-vi)/26,Yn=1<<vi;if(this.length<=Ln)return!1;var mi=this.words[Ln];return!!(mi&Yn)},s.prototype.imaskn=function(Ei){a(typeof Ei=="number"&&Ei>=0);var vi=Ei%26,Ln=(Ei-vi)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=Ln)return this;if(vi!==0&&Ln++,this.length=Math.min(Ln,this.length),vi!==0){var Yn=67108863^67108863>>>vi<<vi;this.words[this.length-1]&=Yn}return this.strip()},s.prototype.maskn=function(Ei){return this.clone().imaskn(Ei)},s.prototype.iaddn=function(Ei){return a(typeof Ei=="number"),a(Ei<67108864),Ei<0?this.isubn(-Ei):this.negative!==0?this.length===1&&(this.words[0]|0)<Ei?(this.words[0]=Ei-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Ei),this.negative=1,this):this._iaddn(Ei)},s.prototype._iaddn=function(Ei){this.words[0]+=Ei;for(var vi=0;vi<this.length&&this.words[vi]>=67108864;vi++)this.words[vi]-=67108864,vi===this.length-1?this.words[vi+1]=1:this.words[vi+1]++;return this.length=Math.max(this.length,vi+1),this},s.prototype.isubn=function(Ei){if(a(typeof Ei=="number"),a(Ei<67108864),Ei<0)return this.iaddn(-Ei);if(this.negative!==0)return this.negative=0,this.iaddn(Ei),this.negative=1,this;if(this.words[0]-=Ei,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var vi=0;vi<this.length&&this.words[vi]<0;vi++)this.words[vi]+=67108864,this.words[vi+1]-=1;return this.strip()},s.prototype.addn=function(Ei){return this.clone().iaddn(Ei)},s.prototype.subn=function(Ei){return this.clone().isubn(Ei)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(Ei,vi,Ln){var Yn=Ei.length+Ln,mi;this._expand(Yn);var gi,_i=0;for(mi=0;mi<Ei.length;mi++){gi=(this.words[mi+Ln]|0)+_i;var Ai=(Ei.words[mi]|0)*vi;gi-=Ai&67108863,_i=(gi>>26)-(Ai/67108864|0),this.words[mi+Ln]=gi&67108863}for(;mi<this.length-Ln;mi++)gi=(this.words[mi+Ln]|0)+_i,_i=gi>>26,this.words[mi+Ln]=gi&67108863;if(_i===0)return this.strip();for(a(_i===-1),_i=0,mi=0;mi<this.length;mi++)gi=-(this.words[mi]|0)+_i,_i=gi>>26,this.words[mi]=gi&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(Ei,vi){var Ln=this.length-Ei.length,Yn=this.clone(),mi=Ei,gi=mi.words[mi.length-1]|0,_i=this._countBits(gi);Ln=26-_i,Ln!==0&&(mi=mi.ushln(Ln),Yn.iushln(Ln),gi=mi.words[mi.length-1]|0);var Ai=Yn.length-mi.length,xi;if(vi!=="mod"){xi=new s(null),xi.length=Ai+1,xi.words=new Array(xi.length);for(var Ri=0;Ri<xi.length;Ri++)xi.words[Ri]=0}var Wn=Yn.clone()._ishlnsubmul(mi,1,Ai);Wn.negative===0&&(Yn=Wn,xi&&(xi.words[Ai]=1));for(var wi=Ai-1;wi>=0;wi--){var qi=(Yn.words[mi.length+wi]|0)*67108864+(Yn.words[mi.length+wi-1]|0);for(qi=Math.min(qi/gi|0,67108863),Yn._ishlnsubmul(mi,qi,wi);Yn.negative!==0;)qi--,Yn.negative=0,Yn._ishlnsubmul(mi,1,wi),Yn.isZero()||(Yn.negative^=1);xi&&(xi.words[wi]=qi)}return xi&&xi.strip(),Yn.strip(),vi!=="div"&&Ln!==0&&Yn.iushrn(Ln),{div:xi||null,mod:Yn}},s.prototype.divmod=function(Ei,vi,Ln){if(a(!Ei.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var Yn,mi,gi;return this.negative!==0&&Ei.negative===0?(gi=this.neg().divmod(Ei,vi),vi!=="mod"&&(Yn=gi.div.neg()),vi!=="div"&&(mi=gi.mod.neg(),Ln&&mi.negative!==0&&mi.iadd(Ei)),{div:Yn,mod:mi}):this.negative===0&&Ei.negative!==0?(gi=this.divmod(Ei.neg(),vi),vi!=="mod"&&(Yn=gi.div.neg()),{div:Yn,mod:gi.mod}):(this.negative&Ei.negative)!==0?(gi=this.neg().divmod(Ei.neg(),vi),vi!=="div"&&(mi=gi.mod.neg(),Ln&&mi.negative!==0&&mi.isub(Ei)),{div:gi.div,mod:mi}):Ei.length>this.length||this.cmp(Ei)<0?{div:new s(0),mod:this}:Ei.length===1?vi==="div"?{div:this.divn(Ei.words[0]),mod:null}:vi==="mod"?{div:null,mod:new s(this.modn(Ei.words[0]))}:{div:this.divn(Ei.words[0]),mod:new s(this.modn(Ei.words[0]))}:this._wordDiv(Ei,vi)},s.prototype.div=function(Ei){return this.divmod(Ei,"div",!1).div},s.prototype.mod=function(Ei){return this.divmod(Ei,"mod",!1).mod},s.prototype.umod=function(Ei){return this.divmod(Ei,"mod",!0).mod},s.prototype.divRound=function(Ei){var vi=this.divmod(Ei);if(vi.mod.isZero())return vi.div;var Ln=vi.div.negative!==0?vi.mod.isub(Ei):vi.mod,Yn=Ei.ushrn(1),mi=Ei.andln(1),gi=Ln.cmp(Yn);return gi<0||mi===1&&gi===0?vi.div:vi.div.negative!==0?vi.div.isubn(1):vi.div.iaddn(1)},s.prototype.modn=function(Ei){a(Ei<=67108863);for(var vi=(1<<26)%Ei,Ln=0,Yn=this.length-1;Yn>=0;Yn--)Ln=(vi*Ln+(this.words[Yn]|0))%Ei;return Ln},s.prototype.idivn=function(Ei){a(Ei<=67108863);for(var vi=0,Ln=this.length-1;Ln>=0;Ln--){var Yn=(this.words[Ln]|0)+vi*67108864;this.words[Ln]=Yn/Ei|0,vi=Yn%Ei}return this.strip()},s.prototype.divn=function(Ei){return this.clone().idivn(Ei)},s.prototype.egcd=function(Ei){a(Ei.negative===0),a(!Ei.isZero());var vi=this,Ln=Ei.clone();vi.negative!==0?vi=vi.umod(Ei):vi=vi.clone();for(var Yn=new s(1),mi=new s(0),gi=new s(0),_i=new s(1),Ai=0;vi.isEven()&&Ln.isEven();)vi.iushrn(1),Ln.iushrn(1),++Ai;for(var xi=Ln.clone(),Ri=vi.clone();!vi.isZero();){for(var Wn=0,wi=1;(vi.words[0]&wi)===0&&Wn<26;++Wn,wi<<=1);if(Wn>0)for(vi.iushrn(Wn);Wn-- >0;)(Yn.isOdd()||mi.isOdd())&&(Yn.iadd(xi),mi.isub(Ri)),Yn.iushrn(1),mi.iushrn(1);for(var qi=0,Gi=1;(Ln.words[0]&Gi)===0&&qi<26;++qi,Gi<<=1);if(qi>0)for(Ln.iushrn(qi);qi-- >0;)(gi.isOdd()||_i.isOdd())&&(gi.iadd(xi),_i.isub(Ri)),gi.iushrn(1),_i.iushrn(1);vi.cmp(Ln)>=0?(vi.isub(Ln),Yn.isub(gi),mi.isub(_i)):(Ln.isub(vi),gi.isub(Yn),_i.isub(mi))}return{a:gi,b:_i,gcd:Ln.iushln(Ai)}},s.prototype._invmp=function(Ei){a(Ei.negative===0),a(!Ei.isZero());var vi=this,Ln=Ei.clone();vi.negative!==0?vi=vi.umod(Ei):vi=vi.clone();for(var Yn=new s(1),mi=new s(0),gi=Ln.clone();vi.cmpn(1)>0&&Ln.cmpn(1)>0;){for(var _i=0,Ai=1;(vi.words[0]&Ai)===0&&_i<26;++_i,Ai<<=1);if(_i>0)for(vi.iushrn(_i);_i-- >0;)Yn.isOdd()&&Yn.iadd(gi),Yn.iushrn(1);for(var xi=0,Ri=1;(Ln.words[0]&Ri)===0&&xi<26;++xi,Ri<<=1);if(xi>0)for(Ln.iushrn(xi);xi-- >0;)mi.isOdd()&&mi.iadd(gi),mi.iushrn(1);vi.cmp(Ln)>=0?(vi.isub(Ln),Yn.isub(mi)):(Ln.isub(vi),mi.isub(Yn))}var Wn;return vi.cmpn(1)===0?Wn=Yn:Wn=mi,Wn.cmpn(0)<0&&Wn.iadd(Ei),Wn},s.prototype.gcd=function(Ei){if(this.isZero())return Ei.abs();if(Ei.isZero())return this.abs();var vi=this.clone(),Ln=Ei.clone();vi.negative=0,Ln.negative=0;for(var Yn=0;vi.isEven()&&Ln.isEven();Yn++)vi.iushrn(1),Ln.iushrn(1);do{for(;vi.isEven();)vi.iushrn(1);for(;Ln.isEven();)Ln.iushrn(1);var mi=vi.cmp(Ln);if(mi<0){var gi=vi;vi=Ln,Ln=gi}else if(mi===0||Ln.cmpn(1)===0)break;vi.isub(Ln)}while(!0);return Ln.iushln(Yn)},s.prototype.invm=function(Ei){return this.egcd(Ei).a.umod(Ei)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(Ei){return this.words[0]&Ei},s.prototype.bincn=function(Ei){a(typeof Ei=="number");var vi=Ei%26,Ln=(Ei-vi)/26,Yn=1<<vi;if(this.length<=Ln)return this._expand(Ln+1),this.words[Ln]|=Yn,this;for(var mi=Yn,gi=Ln;mi!==0&&gi<this.length;gi++){var _i=this.words[gi]|0;_i+=mi,mi=_i>>>26,_i&=67108863,this.words[gi]=_i}return mi!==0&&(this.words[gi]=mi,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(Ei){var vi=Ei<0;if(this.negative!==0&&!vi)return-1;if(this.negative===0&&vi)return 1;this.strip();var Ln;if(this.length>1)Ln=1;else{vi&&(Ei=-Ei),a(Ei<=67108863,"Number is too big");var Yn=this.words[0]|0;Ln=Yn===Ei?0:Yn<Ei?-1:1}return this.negative!==0?-Ln|0:Ln},s.prototype.cmp=function(Ei){if(this.negative!==0&&Ei.negative===0)return-1;if(this.negative===0&&Ei.negative!==0)return 1;var vi=this.ucmp(Ei);return this.negative!==0?-vi|0:vi},s.prototype.ucmp=function(Ei){if(this.length>Ei.length)return 1;if(this.length<Ei.length)return-1;for(var vi=0,Ln=this.length-1;Ln>=0;Ln--){var Yn=this.words[Ln]|0,mi=Ei.words[Ln]|0;if(Yn!==mi){Yn<mi?vi=-1:Yn>mi&&(vi=1);break}}return vi},s.prototype.gtn=function(Ei){return this.cmpn(Ei)===1},s.prototype.gt=function(Ei){return this.cmp(Ei)===1},s.prototype.gten=function(Ei){return this.cmpn(Ei)>=0},s.prototype.gte=function(Ei){return this.cmp(Ei)>=0},s.prototype.ltn=function(Ei){return this.cmpn(Ei)===-1},s.prototype.lt=function(Ei){return this.cmp(Ei)===-1},s.prototype.lten=function(Ei){return this.cmpn(Ei)<=0},s.prototype.lte=function(Ei){return this.cmp(Ei)<=0},s.prototype.eqn=function(Ei){return this.cmpn(Ei)===0},s.prototype.eq=function(Ei){return this.cmp(Ei)===0},s.red=function(Ei){return new Mi(Ei)},s.prototype.toRed=function(Ei){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),Ei.convertTo(this)._forceRed(Ei)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(Ei){return this.red=Ei,this},s.prototype.forceRed=function(Ei){return a(!this.red,"Already a number in reduction context"),this._forceRed(Ei)},s.prototype.redAdd=function(Ei){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,Ei)},s.prototype.redIAdd=function(Ei){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Ei)},s.prototype.redSub=function(Ei){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,Ei)},s.prototype.redISub=function(Ei){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,Ei)},s.prototype.redShl=function(Ei){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,Ei)},s.prototype.redMul=function(Ei){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ei),this.red.mul(this,Ei)},s.prototype.redIMul=function(Ei){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ei),this.red.imul(this,Ei)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(Ei){return a(this.red&&!Ei.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Ei)};var Ti={k256:null,p224:null,p192:null,p25519:null};function Si(Ci,Ei){this.name=Ci,this.p=new s(Ei,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Si.prototype._tmp=function(){var Ei=new s(null);return Ei.words=new Array(Math.ceil(this.n/13)),Ei},Si.prototype.ireduce=function(Ei){var vi=Ei,Ln;do this.split(vi,this.tmp),vi=this.imulK(vi),vi=vi.iadd(this.tmp),Ln=vi.bitLength();while(Ln>this.n);var Yn=Ln<this.n?-1:vi.ucmp(this.p);return Yn===0?(vi.words[0]=0,vi.length=1):Yn>0?vi.isub(this.p):vi.strip!==void 0?vi.strip():vi._strip(),vi},Si.prototype.split=function(Ei,vi){Ei.iushrn(this.n,0,vi)},Si.prototype.imulK=function(Ei){return Ei.imul(this.k)};function Ii(){Si.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}u(Ii,Si),Ii.prototype.split=function(Ei,vi){for(var Ln=4194303,Yn=Math.min(Ei.length,9),mi=0;mi<Yn;mi++)vi.words[mi]=Ei.words[mi];if(vi.length=Yn,Ei.length<=9){Ei.words[0]=0,Ei.length=1;return}var gi=Ei.words[9];for(vi.words[vi.length++]=gi&Ln,mi=10;mi<Ei.length;mi++){var _i=Ei.words[mi]|0;Ei.words[mi-10]=(_i&Ln)<<4|gi>>>22,gi=_i}gi>>>=22,Ei.words[mi-10]=gi,gi===0&&Ei.length>10?Ei.length-=10:Ei.length-=9},Ii.prototype.imulK=function(Ei){Ei.words[Ei.length]=0,Ei.words[Ei.length+1]=0,Ei.length+=2;for(var vi=0,Ln=0;Ln<Ei.length;Ln++){var Yn=Ei.words[Ln]|0;vi+=Yn*977,Ei.words[Ln]=vi&67108863,vi=Yn*64+(vi/67108864|0)}return Ei.words[Ei.length-1]===0&&(Ei.length--,Ei.words[Ei.length-1]===0&&Ei.length--),Ei};function Ni(){Si.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}u(Ni,Si);function Oi(){Si.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}u(Oi,Si);function Fi(){Si.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}u(Fi,Si),Fi.prototype.imulK=function(Ei){for(var vi=0,Ln=0;Ln<Ei.length;Ln++){var Yn=(Ei.words[Ln]|0)*19+vi,mi=Yn&67108863;Yn>>>=26,Ei.words[Ln]=mi,vi=Yn}return vi!==0&&(Ei.words[Ei.length++]=vi),Ei},s._prime=function(Ei){if(Ti[Ei])return Ti[Ei];var vi;if(Ei==="k256")vi=new Ii;else if(Ei==="p224")vi=new Ni;else if(Ei==="p192")vi=new Oi;else if(Ei==="p25519")vi=new Fi;else throw new Error("Unknown prime "+Ei);return Ti[Ei]=vi,vi};function Mi(Ci){if(typeof Ci=="string"){var Ei=s._prime(Ci);this.m=Ei.p,this.prime=Ei}else a(Ci.gtn(1),"modulus must be greater than 1"),this.m=Ci,this.prime=null}Mi.prototype._verify1=function(Ei){a(Ei.negative===0,"red works only with positives"),a(Ei.red,"red works only with red numbers")},Mi.prototype._verify2=function(Ei,vi){a((Ei.negative|vi.negative)===0,"red works only with positives"),a(Ei.red&&Ei.red===vi.red,"red works only with red numbers")},Mi.prototype.imod=function(Ei){return this.prime?this.prime.ireduce(Ei)._forceRed(this):Ei.umod(this.m)._forceRed(this)},Mi.prototype.neg=function(Ei){return Ei.isZero()?Ei.clone():this.m.sub(Ei)._forceRed(this)},Mi.prototype.add=function(Ei,vi){this._verify2(Ei,vi);var Ln=Ei.add(vi);return Ln.cmp(this.m)>=0&&Ln.isub(this.m),Ln._forceRed(this)},Mi.prototype.iadd=function(Ei,vi){this._verify2(Ei,vi);var Ln=Ei.iadd(vi);return Ln.cmp(this.m)>=0&&Ln.isub(this.m),Ln},Mi.prototype.sub=function(Ei,vi){this._verify2(Ei,vi);var Ln=Ei.sub(vi);return Ln.cmpn(0)<0&&Ln.iadd(this.m),Ln._forceRed(this)},Mi.prototype.isub=function(Ei,vi){this._verify2(Ei,vi);var Ln=Ei.isub(vi);return Ln.cmpn(0)<0&&Ln.iadd(this.m),Ln},Mi.prototype.shl=function(Ei,vi){return this._verify1(Ei),this.imod(Ei.ushln(vi))},Mi.prototype.imul=function(Ei,vi){return this._verify2(Ei,vi),this.imod(Ei.imul(vi))},Mi.prototype.mul=function(Ei,vi){return this._verify2(Ei,vi),this.imod(Ei.mul(vi))},Mi.prototype.isqr=function(Ei){return this.imul(Ei,Ei.clone())},Mi.prototype.sqr=function(Ei){return this.mul(Ei,Ei)},Mi.prototype.sqrt=function(Ei){if(Ei.isZero())return Ei.clone();var vi=this.m.andln(3);if(a(vi%2===1),vi===3){var Ln=this.m.add(new s(1)).iushrn(2);return this.pow(Ei,Ln)}for(var Yn=this.m.subn(1),mi=0;!Yn.isZero()&&Yn.andln(1)===0;)mi++,Yn.iushrn(1);a(!Yn.isZero());var gi=new s(1).toRed(this),_i=gi.redNeg(),Ai=this.m.subn(1).iushrn(1),xi=this.m.bitLength();for(xi=new s(2*xi*xi).toRed(this);this.pow(xi,Ai).cmp(_i)!==0;)xi.redIAdd(_i);for(var Ri=this.pow(xi,Yn),Wn=this.pow(Ei,Yn.addn(1).iushrn(1)),wi=this.pow(Ei,Yn),qi=mi;wi.cmp(gi)!==0;){for(var Gi=wi,ji=0;Gi.cmp(gi)!==0;ji++)Gi=Gi.redSqr();a(ji<qi);var Li=this.pow(Ri,new s(1).iushln(qi-ji-1));Wn=Wn.redMul(Li),Ri=Li.redSqr(),wi=wi.redMul(Ri),qi=ji}return Wn},Mi.prototype.invm=function(Ei){var vi=Ei._invmp(this.m);return vi.negative!==0?(vi.negative=0,this.imod(vi).redNeg()):this.imod(vi)},Mi.prototype.pow=function(Ei,vi){if(vi.isZero())return new s(1).toRed(this);if(vi.cmpn(1)===0)return Ei.clone();var Ln=4,Yn=new Array(1<<Ln);Yn[0]=new s(1).toRed(this),Yn[1]=Ei;for(var mi=2;mi<Yn.length;mi++)Yn[mi]=this.mul(Yn[mi-1],Ei);var gi=Yn[0],_i=0,Ai=0,xi=vi.bitLength()%26;for(xi===0&&(xi=26),mi=vi.length-1;mi>=0;mi--){for(var Ri=vi.words[mi],Wn=xi-1;Wn>=0;Wn--){var wi=Ri>>Wn&1;if(gi!==Yn[0]&&(gi=this.sqr(gi)),wi===0&&_i===0){Ai=0;continue}_i<<=1,_i|=wi,Ai++,!(Ai!==Ln&&(mi!==0||Wn!==0))&&(gi=this.mul(gi,Yn[_i]),Ai=0,_i=0)}xi=26}return gi},Mi.prototype.convertTo=function(Ei){var vi=Ei.umod(this.m);return vi===Ei?vi.clone():vi},Mi.prototype.convertFrom=function(Ei){var vi=Ei.clone();return vi.red=null,vi},s.mont=function(Ei){return new ki(Ei)};function ki(Ci){Mi.call(this,Ci),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}u(ki,Mi),ki.prototype.convertTo=function(Ei){return this.imod(Ei.ushln(this.shift))},ki.prototype.convertFrom=function(Ei){var vi=this.imod(Ei.mul(this.rinv));return vi.red=null,vi},ki.prototype.imul=function(Ei,vi){if(Ei.isZero()||vi.isZero())return Ei.words[0]=0,Ei.length=1,Ei;var Ln=Ei.imul(vi),Yn=Ln.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),mi=Ln.isub(Yn).iushrn(this.shift),gi=mi;return mi.cmp(this.m)>=0?gi=mi.isub(this.m):mi.cmpn(0)<0&&(gi=mi.iadd(this.m)),gi._forceRed(this)},ki.prototype.mul=function(Ei,vi){if(Ei.isZero()||vi.isZero())return new s(0)._forceRed(this);var Ln=Ei.mul(vi),Yn=Ln.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),mi=Ln.isub(Yn).iushrn(this.shift),gi=mi;return mi.cmp(this.m)>=0?gi=mi.isub(this.m):mi.cmpn(0)<0&&(gi=mi.iadd(this.m)),gi._forceRed(this)},ki.prototype.invm=function(Ei){var vi=this.imod(Ei._invmp(this.m).mul(this.r2));return vi._forceRed(this)}})(r,bn$4)}(bn$5)),bn$5.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var r;brorand.exports=function(u){return r||(r=new n(null)),r.generate(u)};function n(a){this.rand=a}if(brorand.exports.Rand=n,n.prototype.generate=function(u){return this._rand(u)},n.prototype._rand=function(u){if(this.rand.getBytes)return this.rand.getBytes(u);for(var s=new Uint8Array(u),l=0;l<s.length;l++)s[l]=this.rand.getByte();return s},typeof self=="object")self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(u){var s=new Uint8Array(u);return self.crypto.getRandomValues(s),s}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(u){var s=new Uint8Array(u);return self.msCrypto.getRandomValues(s),s}:typeof window=="object"&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=requireCryptoBrowserify();if(typeof i.randomBytes!="function")throw new Error("Not supported");n.prototype._rand=function(u){return i.randomBytes(u)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var r=requireBn$2(),n=requireBrorand();function i(a){this.rand=a||new n.Rand}return mr=i,i.create=function(u){return new i(u)},i.prototype._randbelow=function(u){var s=u.bitLength(),l=Math.ceil(s/8);do var D=new r(this.rand.generate(l));while(D.cmp(u)>=0);return D},i.prototype._randrange=function(u,s){var l=s.sub(u);return u.add(this._randbelow(l))},i.prototype.test=function(u,s,l){var D=u.bitLength(),on=r.mont(u),h=new r(1).toRed(on);s||(s=Math.max(1,D/48|0));for(var v=u.subn(1),In=0;!v.testn(In);In++);for(var Rn=u.shrn(In),Mn=v.toRed(on),jn=!0;s>0;s--){var Hn=this._randrange(new r(2),v);l&&l(Hn);var hi=Hn.toRed(on).redPow(Rn);if(!(hi.cmp(h)===0||hi.cmp(Mn)===0)){for(var yi=1;yi<In;yi++){if(hi=hi.redSqr(),hi.cmp(h)===0)return!1;if(hi.cmp(Mn)===0)break}if(yi===In)return!1}}return jn},i.prototype.getDivisor=function(u,s){var l=u.bitLength(),D=r.mont(u),on=new r(1).toRed(D);s||(s=Math.max(1,l/48|0));for(var h=u.subn(1),v=0;!h.testn(v);v++);for(var In=u.shrn(v),Rn=h.toRed(D);s>0;s--){var Mn=this._randrange(new r(2),h),jn=u.gcd(Mn);if(jn.cmpn(1)!==0)return jn;var Hn=Mn.toRed(D).redPow(In);if(!(Hn.cmp(on)===0||Hn.cmp(Rn)===0)){for(var hi=1;hi<v;hi++){if(Hn=Hn.redSqr(),Hn.cmp(on)===0)return Hn.fromRed().subn(1).gcd(u);if(Hn.cmp(Rn)===0)break}if(hi===v)return Hn=Hn.redSqr(),Hn.fromRed().subn(1).gcd(u)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var r=requireBrowser$b();generatePrime=hi,hi.simpleSieve=jn,hi.fermatTest=Hn;var n=requireBn$2(),i=new n(24),a=requireMr(),u=new a,s=new n(1),l=new n(2),D=new n(5);new n(16),new n(8);var on=new n(10),h=new n(3);new n(7);var v=new n(11),In=new n(4);new n(12);var Rn=null;function Mn(){if(Rn!==null)return Rn;var yi=1048576,bi=[];bi[0]=2;for(var Ti=1,Si=3;Si<yi;Si+=2){for(var Ii=Math.ceil(Math.sqrt(Si)),Ni=0;Ni<Ti&&bi[Ni]<=Ii&&Si%bi[Ni]!==0;Ni++);Ti!==Ni&&bi[Ni]<=Ii||(bi[Ti++]=Si)}return Rn=bi,bi}function jn(yi){for(var bi=Mn(),Ti=0;Ti<bi.length;Ti++)if(yi.modn(bi[Ti])===0)return yi.cmpn(bi[Ti])===0;return!0}function Hn(yi){var bi=n.mont(yi);return l.toRed(bi).redPow(yi.subn(1)).fromRed().cmpn(1)===0}function hi(yi,bi){if(yi<16)return bi===2||bi===5?new n([140,123]):new n([140,39]);bi=new n(bi);for(var Ti,Si;;){for(Ti=new n(r(Math.ceil(yi/8)));Ti.bitLength()>yi;)Ti.ishrn(1);if(Ti.isEven()&&Ti.iadd(s),Ti.testn(1)||Ti.iadd(l),bi.cmp(l)){if(!bi.cmp(D))for(;Ti.mod(on).cmp(h);)Ti.iadd(In)}else for(;Ti.mod(i).cmp(v);)Ti.iadd(In);if(Si=Ti.shrn(1),jn(Si)&&jn(Ti)&&Hn(Si)&&Hn(Ti)&&u.test(Si)&&u.test(Ti))return Ti}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"};var require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18},dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var r=requireBn$2(),n=requireMr(),i=new n,a=new r(24),u=new r(11),s=new r(10),l=new r(3),D=new r(7),on=requireGeneratePrime(),h=requireBrowser$b();dh=jn;function v(hi,yi){return yi=yi||"utf8",Buffer.isBuffer(hi)||(hi=new Buffer(hi,yi)),this._pub=new r(hi),this}function In(hi,yi){return yi=yi||"utf8",Buffer.isBuffer(hi)||(hi=new Buffer(hi,yi)),this._priv=new r(hi),this}var Rn={};function Mn(hi,yi){var bi=yi.toString("hex"),Ti=[bi,hi.toString(16)].join("_");if(Ti in Rn)return Rn[Ti];var Si=0;if(hi.isEven()||!on.simpleSieve||!on.fermatTest(hi)||!i.test(hi))return Si+=1,bi==="02"||bi==="05"?Si+=8:Si+=4,Rn[Ti]=Si,Si;i.test(hi.shrn(1))||(Si+=2);var Ii;switch(bi){case"02":hi.mod(a).cmp(u)&&(Si+=8);break;case"05":Ii=hi.mod(s),Ii.cmp(l)&&Ii.cmp(D)&&(Si+=8);break;default:Si+=4}return Rn[Ti]=Si,Si}function jn(hi,yi,bi){this.setGenerator(yi),this.__prime=new r(hi),this._prime=r.mont(this.__prime),this._primeLen=hi.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,bi?(this.setPublicKey=v,this.setPrivateKey=In):this._primeCode=8}Object.defineProperty(jn.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=Mn(this.__prime,this.__gen)),this._primeCode}}),jn.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},jn.prototype.computeSecret=function(hi){hi=new r(hi),hi=hi.toRed(this._prime);var yi=hi.redPow(this._priv).fromRed(),bi=new Buffer(yi.toArray()),Ti=this.getPrime();if(bi.length<Ti.length){var Si=new Buffer(Ti.length-bi.length);Si.fill(0),bi=Buffer.concat([Si,bi])}return bi},jn.prototype.getPublicKey=function(yi){return Hn(this._pub,yi)},jn.prototype.getPrivateKey=function(yi){return Hn(this._priv,yi)},jn.prototype.getPrime=function(hi){return Hn(this.__prime,hi)},jn.prototype.getGenerator=function(hi){return Hn(this._gen,hi)},jn.prototype.setGenerator=function(hi,yi){return yi=yi||"utf8",Buffer.isBuffer(hi)||(hi=new Buffer(hi,yi)),this.__gen=hi,this._gen=new r(hi),this};function Hn(hi,yi){var bi=new Buffer(hi.toArray());return yi?bi.toString(yi):bi}return dh}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$5;hasRequiredBrowser$5=1;var r=requireGeneratePrime(),n=require$$1$1,i=requireDh();function a(l){var D=new Buffer(n[l].prime,"hex"),on=new Buffer(n[l].gen,"hex");return new i(D,on)}var u={binary:!0,hex:!0,base64:!0};function s(l,D,on,h){return Buffer.isBuffer(D)||u[D]===void 0?s(l,"binary",D,on):(D=D||"binary",h=h||"binary",on=on||new Buffer([2]),Buffer.isBuffer(on)||(on=new Buffer(on,h)),typeof l=="number"?new i(r(l,on),on,!0):(Buffer.isBuffer(l)||(l=new Buffer(l,D)),new i(l,on,!0)))}return browser$5.DiffieHellmanGroup=browser$5.createDiffieHellmanGroup=browser$5.getDiffieHellman=a,browser$5.createDiffieHellman=browser$5.DiffieHellman=s,browser$5}var readableBrowser={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:r}:processNextickArgs.exports=process$1;function r(n,i,a,u){if(typeof n!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,l,D;switch(s){case 0:case 1:return process$1.nextTick(n);case 2:return process$1.nextTick(function(){n.call(null,i)});case 3:return process$1.nextTick(function(){n.call(null,i,a)});case 4:return process$1.nextTick(function(){n.call(null,i,a,u)});default:for(l=new Array(s-1),D=0;D<l.length;)l[D++]=arguments[D];return process$1.nextTick(function(){n.apply(null,l)})}}return processNextickArgs.exports}var isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var r={}.toString;return isarray=Array.isArray||function(n){return r.call(n)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(r,n){var i=requireDist(),a=i.Buffer;function u(l,D){for(var on in l)D[on]=l[on]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?r.exports=i:(u(i,n),n.Buffer=s);function s(l,D,on){return a(l,D,on)}u(a,s),s.from=function(l,D,on){if(typeof l=="number")throw new TypeError("Argument must not be a number");return a(l,D,on)},s.alloc=function(l,D,on){if(typeof l!="number")throw new TypeError("Argument must be a number");var h=a(l);return D!==void 0?typeof on=="string"?h.fill(D,on):h.fill(D):h.fill(0),h},s.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a(l)},s.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function r(Hn){return Array.isArray?Array.isArray(Hn):jn(Hn)==="[object Array]"}util.isArray=r;function n(Hn){return typeof Hn=="boolean"}util.isBoolean=n;function i(Hn){return Hn===null}util.isNull=i;function a(Hn){return Hn==null}util.isNullOrUndefined=a;function u(Hn){return typeof Hn=="number"}util.isNumber=u;function s(Hn){return typeof Hn=="string"}util.isString=s;function l(Hn){return typeof Hn=="symbol"}util.isSymbol=l;function D(Hn){return Hn===void 0}util.isUndefined=D;function on(Hn){return jn(Hn)==="[object RegExp]"}util.isRegExp=on;function h(Hn){return typeof Hn=="object"&&Hn!==null}util.isObject=h;function v(Hn){return jn(Hn)==="[object Date]"}util.isDate=v;function In(Hn){return jn(Hn)==="[object Error]"||Hn instanceof Error}util.isError=In;function Rn(Hn){return typeof Hn=="function"}util.isFunction=Rn;function Mn(Hn){return Hn===null||typeof Hn=="boolean"||typeof Hn=="number"||typeof Hn=="string"||typeof Hn=="symbol"||typeof Hn>"u"}util.isPrimitive=Mn,util.isBuffer=requireDist().Buffer.isBuffer;function jn(Hn){return Object.prototype.toString.call(Hn)}return util}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,function(r){function n(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}var i=requireSafeBuffer().Buffer,a=requireUtil$1();function u(s,l,D){s.copy(l,D)}r.exports=function(){function s(){n(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(D){var on={data:D,next:null};this.length>0?this.tail.next=on:this.head=on,this.tail=on,++this.length},s.prototype.unshift=function(D){var on={data:D,next:this.head};this.length===0&&(this.tail=on),this.head=on,++this.length},s.prototype.shift=function(){if(this.length!==0){var D=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,D}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(D){if(this.length===0)return"";for(var on=this.head,h=""+on.data;on=on.next;)h+=D+on.data;return h},s.prototype.concat=function(D){if(this.length===0)return i.alloc(0);for(var on=i.allocUnsafe(D>>>0),h=this.head,v=0;h;)u(h.data,on,v),v+=h.data.length,h=h.next;return on},s}(),a&&a.inspect&&a.inspect.custom&&(r.exports.prototype[a.inspect.custom]=function(){var s=a.inspect({length:this.length});return this.constructor.name+" "+s})}(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var r=requireProcessNextickArgs();function n(u,s){var l=this,D=this._readableState&&this._readableState.destroyed,on=this._writableState&&this._writableState.destroyed;return D||on?(s?s(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,u)):r.nextTick(a,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(h){!s&&h?l._writableState?l._writableState.errorEmitted||(l._writableState.errorEmitted=!0,r.nextTick(a,l,h)):r.nextTick(a,l,h):s&&s(h)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(u,s){u.emit("error",s)}return destroy_1={destroy:n,undestroy:i},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var r=requireProcessNextickArgs();_stream_writable=Hn;function n(gi){var _i=this;this.next=null,this.entry=null,this.finish=function(){mi(_i,gi)}}var i=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:r.nextTick,a;Hn.WritableState=Mn;var u=Object.create(requireUtil());u.inherits=requireInherits_browser();var s={deprecate:requireBrowser$c()},l=requireStreamBrowser(),D=requireSafeBuffer().Buffer,on=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(gi){return D.from(gi)}function v(gi){return D.isBuffer(gi)||gi instanceof on}var In=requireDestroy();u.inherits(Hn,l);function Rn(){}function Mn(gi,_i){a=a||require_stream_duplex(),gi=gi||{};var Ai=_i instanceof a;this.objectMode=!!gi.objectMode,Ai&&(this.objectMode=this.objectMode||!!gi.writableObjectMode);var xi=gi.highWaterMark,Ri=gi.writableHighWaterMark,Wn=this.objectMode?16:16*1024;xi||xi===0?this.highWaterMark=xi:Ai&&(Ri||Ri===0)?this.highWaterMark=Ri:this.highWaterMark=Wn,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var wi=gi.decodeStrings===!1;this.decodeStrings=!wi,this.defaultEncoding=gi.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(qi){Oi(_i,qi)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}Mn.prototype.getBuffer=function(){for(var _i=this.bufferedRequest,Ai=[];_i;)Ai.push(_i),_i=_i.next;return Ai},function(){try{Object.defineProperty(Mn.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var jn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(jn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Hn,Symbol.hasInstance,{value:function(gi){return jn.call(this,gi)?!0:this!==Hn?!1:gi&&gi._writableState instanceof Mn}})):jn=function(gi){return gi instanceof this};function Hn(gi){if(a=a||require_stream_duplex(),!jn.call(Hn,this)&&!(this instanceof a))return new Hn(gi);this._writableState=new Mn(gi,this),this.writable=!0,gi&&(typeof gi.write=="function"&&(this._write=gi.write),typeof gi.writev=="function"&&(this._writev=gi.writev),typeof gi.destroy=="function"&&(this._destroy=gi.destroy),typeof gi.final=="function"&&(this._final=gi.final)),l.call(this)}Hn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function hi(gi,_i){var Ai=new Error("write after end");gi.emit("error",Ai),r.nextTick(_i,Ai)}function yi(gi,_i,Ai,xi){var Ri=!0,Wn=!1;return Ai===null?Wn=new TypeError("May not write null values to stream"):typeof Ai!="string"&&Ai!==void 0&&!_i.objectMode&&(Wn=new TypeError("Invalid non-string/buffer chunk")),Wn&&(gi.emit("error",Wn),r.nextTick(xi,Wn),Ri=!1),Ri}Hn.prototype.write=function(gi,_i,Ai){var xi=this._writableState,Ri=!1,Wn=!xi.objectMode&&v(gi);return Wn&&!D.isBuffer(gi)&&(gi=h(gi)),typeof _i=="function"&&(Ai=_i,_i=null),Wn?_i="buffer":_i||(_i=xi.defaultEncoding),typeof Ai!="function"&&(Ai=Rn),xi.ended?hi(this,Ai):(Wn||yi(this,xi,gi,Ai))&&(xi.pendingcb++,Ri=Ti(this,xi,Wn,gi,_i,Ai)),Ri},Hn.prototype.cork=function(){var gi=this._writableState;gi.corked++},Hn.prototype.uncork=function(){var gi=this._writableState;gi.corked&&(gi.corked--,!gi.writing&&!gi.corked&&!gi.bufferProcessing&&gi.bufferedRequest&&ki(this,gi))},Hn.prototype.setDefaultEncoding=function(_i){if(typeof _i=="string"&&(_i=_i.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_i+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+_i);return this._writableState.defaultEncoding=_i,this};function bi(gi,_i,Ai){return!gi.objectMode&&gi.decodeStrings!==!1&&typeof _i=="string"&&(_i=D.from(_i,Ai)),_i}Object.defineProperty(Hn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ti(gi,_i,Ai,xi,Ri,Wn){if(!Ai){var wi=bi(_i,xi,Ri);xi!==wi&&(Ai=!0,Ri="buffer",xi=wi)}var qi=_i.objectMode?1:xi.length;_i.length+=qi;var Gi=_i.length<_i.highWaterMark;if(Gi||(_i.needDrain=!0),_i.writing||_i.corked){var ji=_i.lastBufferedRequest;_i.lastBufferedRequest={chunk:xi,encoding:Ri,isBuf:Ai,callback:Wn,next:null},ji?ji.next=_i.lastBufferedRequest:_i.bufferedRequest=_i.lastBufferedRequest,_i.bufferedRequestCount+=1}else Si(gi,_i,!1,qi,xi,Ri,Wn);return Gi}function Si(gi,_i,Ai,xi,Ri,Wn,wi){_i.writelen=xi,_i.writecb=wi,_i.writing=!0,_i.sync=!0,Ai?gi._writev(Ri,_i.onwrite):gi._write(Ri,Wn,_i.onwrite),_i.sync=!1}function Ii(gi,_i,Ai,xi,Ri){--_i.pendingcb,Ai?(r.nextTick(Ri,xi),r.nextTick(Ln,gi,_i),gi._writableState.errorEmitted=!0,gi.emit("error",xi)):(Ri(xi),gi._writableState.errorEmitted=!0,gi.emit("error",xi),Ln(gi,_i))}function Ni(gi){gi.writing=!1,gi.writecb=null,gi.length-=gi.writelen,gi.writelen=0}function Oi(gi,_i){var Ai=gi._writableState,xi=Ai.sync,Ri=Ai.writecb;if(Ni(Ai),_i)Ii(gi,Ai,xi,_i,Ri);else{var Wn=Ci(Ai);!Wn&&!Ai.corked&&!Ai.bufferProcessing&&Ai.bufferedRequest&&ki(gi,Ai),xi?i(Fi,gi,Ai,Wn,Ri):Fi(gi,Ai,Wn,Ri)}}function Fi(gi,_i,Ai,xi){Ai||Mi(gi,_i),_i.pendingcb--,xi(),Ln(gi,_i)}function Mi(gi,_i){_i.length===0&&_i.needDrain&&(_i.needDrain=!1,gi.emit("drain"))}function ki(gi,_i){_i.bufferProcessing=!0;var Ai=_i.bufferedRequest;if(gi._writev&&Ai&&Ai.next){var xi=_i.bufferedRequestCount,Ri=new Array(xi),Wn=_i.corkedRequestsFree;Wn.entry=Ai;for(var wi=0,qi=!0;Ai;)Ri[wi]=Ai,Ai.isBuf||(qi=!1),Ai=Ai.next,wi+=1;Ri.allBuffers=qi,Si(gi,_i,!0,_i.length,Ri,"",Wn.finish),_i.pendingcb++,_i.lastBufferedRequest=null,Wn.next?(_i.corkedRequestsFree=Wn.next,Wn.next=null):_i.corkedRequestsFree=new n(_i),_i.bufferedRequestCount=0}else{for(;Ai;){var Gi=Ai.chunk,ji=Ai.encoding,Li=Ai.callback,$i=_i.objectMode?1:Gi.length;if(Si(gi,_i,!1,$i,Gi,ji,Li),Ai=Ai.next,_i.bufferedRequestCount--,_i.writing)break}Ai===null&&(_i.lastBufferedRequest=null)}_i.bufferedRequest=Ai,_i.bufferProcessing=!1}Hn.prototype._write=function(gi,_i,Ai){Ai(new Error("_write() is not implemented"))},Hn.prototype._writev=null,Hn.prototype.end=function(gi,_i,Ai){var xi=this._writableState;typeof gi=="function"?(Ai=gi,gi=null,_i=null):typeof _i=="function"&&(Ai=_i,_i=null),gi!=null&&this.write(gi,_i),xi.corked&&(xi.corked=1,this.uncork()),xi.ending||Yn(this,xi,Ai)};function Ci(gi){return gi.ending&&gi.length===0&&gi.bufferedRequest===null&&!gi.finished&&!gi.writing}function Ei(gi,_i){gi._final(function(Ai){_i.pendingcb--,Ai&&gi.emit("error",Ai),_i.prefinished=!0,gi.emit("prefinish"),Ln(gi,_i)})}function vi(gi,_i){!_i.prefinished&&!_i.finalCalled&&(typeof gi._final=="function"?(_i.pendingcb++,_i.finalCalled=!0,r.nextTick(Ei,gi,_i)):(_i.prefinished=!0,gi.emit("prefinish")))}function Ln(gi,_i){var Ai=Ci(_i);return Ai&&(vi(gi,_i),_i.pendingcb===0&&(_i.finished=!0,gi.emit("finish"))),Ai}function Yn(gi,_i,Ai){_i.ending=!0,Ln(gi,_i),Ai&&(_i.finished?r.nextTick(Ai):gi.once("finish",Ai)),_i.ended=!0,gi.writable=!1}function mi(gi,_i,Ai){var xi=gi.entry;for(gi.entry=null;xi;){var Ri=xi.callback;_i.pendingcb--,Ri(Ai),xi=xi.next}_i.corkedRequestsFree.next=gi}return Object.defineProperty(Hn.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(gi){this._writableState&&(this._writableState.destroyed=gi)}}),Hn.prototype.destroy=In.destroy,Hn.prototype._undestroy=In.undestroy,Hn.prototype._destroy=function(gi,_i){this.end(),_i(gi)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var r=requireProcessNextickArgs(),n=Object.keys||function(In){var Rn=[];for(var Mn in In)Rn.push(Mn);return Rn};_stream_duplex=on;var i=Object.create(requireUtil());i.inherits=requireInherits_browser();var a=require_stream_readable(),u=require_stream_writable();i.inherits(on,a);for(var s=n(u.prototype),l=0;l<s.length;l++){var D=s[l];on.prototype[D]||(on.prototype[D]=u.prototype[D])}function on(In){if(!(this instanceof on))return new on(In);a.call(this,In),u.call(this,In),In&&In.readable===!1&&(this.readable=!1),In&&In.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,In&&In.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",h)}Object.defineProperty(on.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(v,this)}function v(In){In.end()}return Object.defineProperty(on.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(In){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=In,this._writableState.destroyed=In)}}),on.prototype._destroy=function(In,Rn){this.push(null),this.end(),r.nextTick(Rn,In)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var r=requireProcessNextickArgs();_stream_readable=bi;var n=requireIsarray(),i;bi.ReadableState=yi,requireEvents().EventEmitter;var a=function(Li,$i){return Li.listeners($i).length},u=requireStreamBrowser(),s=requireSafeBuffer().Buffer,l=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function D(Li){return s.from(Li)}function on(Li){return s.isBuffer(Li)||Li instanceof l}var h=Object.create(requireUtil());h.inherits=requireInherits_browser();var v=requireUtil$1(),In=void 0;v&&v.debuglog?In=v.debuglog("stream"):In=function(){};var Rn=requireBufferList(),Mn=requireDestroy(),jn;h.inherits(bi,u);var Hn=["error","close","destroy","pause","resume"];function hi(Li,$i,zi){if(typeof Li.prependListener=="function")return Li.prependListener($i,zi);!Li._events||!Li._events[$i]?Li.on($i,zi):n(Li._events[$i])?Li._events[$i].unshift(zi):Li._events[$i]=[zi,Li._events[$i]]}function yi(Li,$i){i=i||require_stream_duplex(),Li=Li||{};var zi=$i instanceof i;this.objectMode=!!Li.objectMode,zi&&(this.objectMode=this.objectMode||!!Li.readableObjectMode);var Qi=Li.highWaterMark,Vi=Li.readableHighWaterMark,Bi=this.objectMode?16:16*1024;Qi||Qi===0?this.highWaterMark=Qi:zi&&(Vi||Vi===0)?this.highWaterMark=Vi:this.highWaterMark=Bi,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Rn,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Li.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Li.encoding&&(jn||(jn=requireString_decoder().StringDecoder),this.decoder=new jn(Li.encoding),this.encoding=Li.encoding)}function bi(Li){if(i=i||require_stream_duplex(),!(this instanceof bi))return new bi(Li);this._readableState=new yi(Li,this),this.readable=!0,Li&&(typeof Li.read=="function"&&(this._read=Li.read),typeof Li.destroy=="function"&&(this._destroy=Li.destroy)),u.call(this)}Object.defineProperty(bi.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Li){this._readableState&&(this._readableState.destroyed=Li)}}),bi.prototype.destroy=Mn.destroy,bi.prototype._undestroy=Mn.undestroy,bi.prototype._destroy=function(Li,$i){this.push(null),$i(Li)},bi.prototype.push=function(Li,$i){var zi=this._readableState,Qi;return zi.objectMode?Qi=!0:typeof Li=="string"&&($i=$i||zi.defaultEncoding,$i!==zi.encoding&&(Li=s.from(Li,$i),$i=""),Qi=!0),Ti(this,Li,$i,!1,Qi)},bi.prototype.unshift=function(Li){return Ti(this,Li,null,!0,!1)};function Ti(Li,$i,zi,Qi,Vi){var Bi=Li._readableState;if($i===null)Bi.reading=!1,ki(Li,Bi);else{var Hi;Vi||(Hi=Ii(Bi,$i)),Hi?Li.emit("error",Hi):Bi.objectMode||$i&&$i.length>0?(typeof $i!="string"&&!Bi.objectMode&&Object.getPrototypeOf($i)!==s.prototype&&($i=D($i)),Qi?Bi.endEmitted?Li.emit("error",new Error("stream.unshift() after end event")):Si(Li,Bi,$i,!0):Bi.ended?Li.emit("error",new Error("stream.push() after EOF")):(Bi.reading=!1,Bi.decoder&&!zi?($i=Bi.decoder.write($i),Bi.objectMode||$i.length!==0?Si(Li,Bi,$i,!1):vi(Li,Bi)):Si(Li,Bi,$i,!1))):Qi||(Bi.reading=!1)}return Ni(Bi)}function Si(Li,$i,zi,Qi){$i.flowing&&$i.length===0&&!$i.sync?(Li.emit("data",zi),Li.read(0)):($i.length+=$i.objectMode?1:zi.length,Qi?$i.buffer.unshift(zi):$i.buffer.push(zi),$i.needReadable&&Ci(Li)),vi(Li,$i)}function Ii(Li,$i){var zi;return!on($i)&&typeof $i!="string"&&$i!==void 0&&!Li.objectMode&&(zi=new TypeError("Invalid non-string/buffer chunk")),zi}function Ni(Li){return!Li.ended&&(Li.needReadable||Li.length<Li.highWaterMark||Li.length===0)}bi.prototype.isPaused=function(){return this._readableState.flowing===!1},bi.prototype.setEncoding=function(Li){return jn||(jn=requireString_decoder().StringDecoder),this._readableState.decoder=new jn(Li),this._readableState.encoding=Li,this};var Oi=8388608;function Fi(Li){return Li>=Oi?Li=Oi:(Li--,Li|=Li>>>1,Li|=Li>>>2,Li|=Li>>>4,Li|=Li>>>8,Li|=Li>>>16,Li++),Li}function Mi(Li,$i){return Li<=0||$i.length===0&&$i.ended?0:$i.objectMode?1:Li!==Li?$i.flowing&&$i.length?$i.buffer.head.data.length:$i.length:(Li>$i.highWaterMark&&($i.highWaterMark=Fi(Li)),Li<=$i.length?Li:$i.ended?$i.length:($i.needReadable=!0,0))}bi.prototype.read=function(Li){In("read",Li),Li=parseInt(Li,10);var $i=this._readableState,zi=Li;if(Li!==0&&($i.emittedReadable=!1),Li===0&&$i.needReadable&&($i.length>=$i.highWaterMark||$i.ended))return In("read: emitReadable",$i.length,$i.ended),$i.length===0&&$i.ended?qi(this):Ci(this),null;if(Li=Mi(Li,$i),Li===0&&$i.ended)return $i.length===0&&qi(this),null;var Qi=$i.needReadable;In("need readable",Qi),($i.length===0||$i.length-Li<$i.highWaterMark)&&(Qi=!0,In("length less than watermark",Qi)),$i.ended||$i.reading?(Qi=!1,In("reading or ended",Qi)):Qi&&(In("do read"),$i.reading=!0,$i.sync=!0,$i.length===0&&($i.needReadable=!0),this._read($i.highWaterMark),$i.sync=!1,$i.reading||(Li=Mi(zi,$i)));var Vi;return Li>0?Vi=xi(Li,$i):Vi=null,Vi===null?($i.needReadable=!0,Li=0):$i.length-=Li,$i.length===0&&($i.ended||($i.needReadable=!0),zi!==Li&&$i.ended&&qi(this)),Vi!==null&&this.emit("data",Vi),Vi};function ki(Li,$i){if(!$i.ended){if($i.decoder){var zi=$i.decoder.end();zi&&zi.length&&($i.buffer.push(zi),$i.length+=$i.objectMode?1:zi.length)}$i.ended=!0,Ci(Li)}}function Ci(Li){var $i=Li._readableState;$i.needReadable=!1,$i.emittedReadable||(In("emitReadable",$i.flowing),$i.emittedReadable=!0,$i.sync?r.nextTick(Ei,Li):Ei(Li))}function Ei(Li){In("emit readable"),Li.emit("readable"),Ai(Li)}function vi(Li,$i){$i.readingMore||($i.readingMore=!0,r.nextTick(Ln,Li,$i))}function Ln(Li,$i){for(var zi=$i.length;!$i.reading&&!$i.flowing&&!$i.ended&&$i.length<$i.highWaterMark&&(In("maybeReadMore read 0"),Li.read(0),zi!==$i.length);)zi=$i.length;$i.readingMore=!1}bi.prototype._read=function(Li){this.emit("error",new Error("_read() is not implemented"))},bi.prototype.pipe=function(Li,$i){var zi=this,Qi=this._readableState;switch(Qi.pipesCount){case 0:Qi.pipes=Li;break;case 1:Qi.pipes=[Qi.pipes,Li];break;default:Qi.pipes.push(Li);break}Qi.pipesCount+=1,In("pipe count=%d opts=%j",Qi.pipesCount,$i);var Vi=(!$i||$i.end!==!1)&&Li!==process$1.stdout&&Li!==process$1.stderr,Bi=Vi?Yi:na;Qi.endEmitted?r.nextTick(Bi):zi.once("end",Bi),Li.on("unpipe",Hi);function Hi(oa,la){In("onunpipe"),oa===zi&&la&&la.hasUnpiped===!1&&(la.hasUnpiped=!0,aa())}function Yi(){In("onend"),Li.end()}var Ji=Yn(zi);Li.on("drain",Ji);var ra=!1;function aa(){In("cleanup"),Li.removeListener("close",Xi),Li.removeListener("finish",ia),Li.removeListener("drain",Ji),Li.removeListener("error",ca),Li.removeListener("unpipe",Hi),zi.removeListener("end",Yi),zi.removeListener("end",na),zi.removeListener("data",Zi),ra=!0,Qi.awaitDrain&&(!Li._writableState||Li._writableState.needDrain)&&Ji()}var ea=!1;zi.on("data",Zi);function Zi(oa){In("ondata"),ea=!1;var la=Li.write(oa);la===!1&&!ea&&((Qi.pipesCount===1&&Qi.pipes===Li||Qi.pipesCount>1&&ji(Qi.pipes,Li)!==-1)&&!ra&&(In("false write response, pause",Qi.awaitDrain),Qi.awaitDrain++,ea=!0),zi.pause())}function ca(oa){In("onerror",oa),na(),Li.removeListener("error",ca),a(Li,"error")===0&&Li.emit("error",oa)}hi(Li,"error",ca);function Xi(){Li.removeListener("finish",ia),na()}Li.once("close",Xi);function ia(){In("onfinish"),Li.removeListener("close",Xi),na()}Li.once("finish",ia);function na(){In("unpipe"),zi.unpipe(Li)}return Li.emit("pipe",zi),Qi.flowing||(In("pipe resume"),zi.resume()),Li};function Yn(Li){return function(){var $i=Li._readableState;In("pipeOnDrain",$i.awaitDrain),$i.awaitDrain&&$i.awaitDrain--,$i.awaitDrain===0&&a(Li,"data")&&($i.flowing=!0,Ai(Li))}}bi.prototype.unpipe=function(Li){var $i=this._readableState,zi={hasUnpiped:!1};if($i.pipesCount===0)return this;if($i.pipesCount===1)return Li&&Li!==$i.pipes?this:(Li||(Li=$i.pipes),$i.pipes=null,$i.pipesCount=0,$i.flowing=!1,Li&&Li.emit("unpipe",this,zi),this);if(!Li){var Qi=$i.pipes,Vi=$i.pipesCount;$i.pipes=null,$i.pipesCount=0,$i.flowing=!1;for(var Bi=0;Bi<Vi;Bi++)Qi[Bi].emit("unpipe",this,{hasUnpiped:!1});return this}var Hi=ji($i.pipes,Li);return Hi===-1?this:($i.pipes.splice(Hi,1),$i.pipesCount-=1,$i.pipesCount===1&&($i.pipes=$i.pipes[0]),Li.emit("unpipe",this,zi),this)},bi.prototype.on=function(Li,$i){var zi=u.prototype.on.call(this,Li,$i);if(Li==="data")this._readableState.flowing!==!1&&this.resume();else if(Li==="readable"){var Qi=this._readableState;!Qi.endEmitted&&!Qi.readableListening&&(Qi.readableListening=Qi.needReadable=!0,Qi.emittedReadable=!1,Qi.reading?Qi.length&&Ci(this):r.nextTick(mi,this))}return zi},bi.prototype.addListener=bi.prototype.on;function mi(Li){In("readable nexttick read 0"),Li.read(0)}bi.prototype.resume=function(){var Li=this._readableState;return Li.flowing||(In("resume"),Li.flowing=!0,gi(this,Li)),this};function gi(Li,$i){$i.resumeScheduled||($i.resumeScheduled=!0,r.nextTick(_i,Li,$i))}function _i(Li,$i){$i.reading||(In("resume read 0"),Li.read(0)),$i.resumeScheduled=!1,$i.awaitDrain=0,Li.emit("resume"),Ai(Li),$i.flowing&&!$i.reading&&Li.read(0)}bi.prototype.pause=function(){return In("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(In("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ai(Li){var $i=Li._readableState;for(In("flow",$i.flowing);$i.flowing&&Li.read()!==null;);}bi.prototype.wrap=function(Li){var $i=this,zi=this._readableState,Qi=!1;Li.on("end",function(){if(In("wrapped end"),zi.decoder&&!zi.ended){var Hi=zi.decoder.end();Hi&&Hi.length&&$i.push(Hi)}$i.push(null)}),Li.on("data",function(Hi){if(In("wrapped data"),zi.decoder&&(Hi=zi.decoder.write(Hi)),!(zi.objectMode&&Hi==null)&&!(!zi.objectMode&&(!Hi||!Hi.length))){var Yi=$i.push(Hi);Yi||(Qi=!0,Li.pause())}});for(var Vi in Li)this[Vi]===void 0&&typeof Li[Vi]=="function"&&(this[Vi]=function(Hi){return function(){return Li[Hi].apply(Li,arguments)}}(Vi));for(var Bi=0;Bi<Hn.length;Bi++)Li.on(Hn[Bi],this.emit.bind(this,Hn[Bi]));return this._read=function(Hi){In("wrapped _read",Hi),Qi&&(Qi=!1,Li.resume())},this},Object.defineProperty(bi.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),bi._fromList=xi;function xi(Li,$i){if($i.length===0)return null;var zi;return $i.objectMode?zi=$i.buffer.shift():!Li||Li>=$i.length?($i.decoder?zi=$i.buffer.join(""):$i.buffer.length===1?zi=$i.buffer.head.data:zi=$i.buffer.concat($i.length),$i.buffer.clear()):zi=Ri(Li,$i.buffer,$i.decoder),zi}function Ri(Li,$i,zi){var Qi;return Li<$i.head.data.length?(Qi=$i.head.data.slice(0,Li),$i.head.data=$i.head.data.slice(Li)):Li===$i.head.data.length?Qi=$i.shift():Qi=zi?Wn(Li,$i):wi(Li,$i),Qi}function Wn(Li,$i){var zi=$i.head,Qi=1,Vi=zi.data;for(Li-=Vi.length;zi=zi.next;){var Bi=zi.data,Hi=Li>Bi.length?Bi.length:Li;if(Hi===Bi.length?Vi+=Bi:Vi+=Bi.slice(0,Li),Li-=Hi,Li===0){Hi===Bi.length?(++Qi,zi.next?$i.head=zi.next:$i.head=$i.tail=null):($i.head=zi,zi.data=Bi.slice(Hi));break}++Qi}return $i.length-=Qi,Vi}function wi(Li,$i){var zi=s.allocUnsafe(Li),Qi=$i.head,Vi=1;for(Qi.data.copy(zi),Li-=Qi.data.length;Qi=Qi.next;){var Bi=Qi.data,Hi=Li>Bi.length?Bi.length:Li;if(Bi.copy(zi,zi.length-Li,0,Hi),Li-=Hi,Li===0){Hi===Bi.length?(++Vi,Qi.next?$i.head=Qi.next:$i.head=$i.tail=null):($i.head=Qi,Qi.data=Bi.slice(Hi));break}++Vi}return $i.length-=Vi,zi}function qi(Li){var $i=Li._readableState;if($i.length>0)throw new Error('"endReadable()" called on non-empty stream');$i.endEmitted||($i.ended=!0,r.nextTick(Gi,$i,Li))}function Gi(Li,$i){!Li.endEmitted&&Li.length===0&&(Li.endEmitted=!0,$i.readable=!1,$i.emit("end"))}function ji(Li,$i){for(var zi=0,Qi=Li.length;zi<Qi;zi++)if(Li[zi]===$i)return zi;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=a;var r=require_stream_duplex(),n=Object.create(requireUtil());n.inherits=requireInherits_browser(),n.inherits(a,r);function i(l,D){var on=this._transformState;on.transforming=!1;var h=on.writecb;if(!h)return this.emit("error",new Error("write callback called multiple times"));on.writechunk=null,on.writecb=null,D!=null&&this.push(D),h(l);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function a(l){if(!(this instanceof a))return new a(l);r.call(this,l),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",u)}function u(){var l=this;typeof this._flush=="function"?this._flush(function(D,on){s(l,D,on)}):s(this,null,null)}a.prototype.push=function(l,D){return this._transformState.needTransform=!1,r.prototype.push.call(this,l,D)},a.prototype._transform=function(l,D,on){throw new Error("_transform() is not implemented")},a.prototype._write=function(l,D,on){var h=this._transformState;if(h.writecb=on,h.writechunk=l,h.writeencoding=D,!h.transforming){var v=this._readableState;(h.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},a.prototype._read=function(l){var D=this._transformState;D.writechunk!==null&&D.writecb&&!D.transforming?(D.transforming=!0,this._transform(D.writechunk,D.writeencoding,D.afterTransform)):D.needTransform=!0},a.prototype._destroy=function(l,D){var on=this;r.prototype._destroy.call(this,l,function(h){D(h),on.emit("close")})};function s(l,D,on){if(D)return l.emit("error",D);if(on!=null&&l.push(on),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=i;var r=require_stream_transform(),n=Object.create(requireUtil());n.inherits=requireInherits_browser(),n.inherits(i,r);function i(a){if(!(this instanceof i))return new i(a);r.call(this,a)}return i.prototype._transform=function(a,u,s){s(null,a)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,function(r,n){n=r.exports=require_stream_readable(),n.Stream=n,n.Readable=n,n.Writable=require_stream_writable(),n.Duplex=require_stream_duplex(),n.Transform=require_stream_transform(),n.PassThrough=require_stream_passthrough()}(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign={exports:{}},bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,function(r){(function(n,i){function a(vi,Ln){if(!vi)throw new Error(Ln||"Assertion failed")}function u(vi,Ln){vi.super_=Ln;var Yn=function(){};Yn.prototype=Ln.prototype,vi.prototype=new Yn,vi.prototype.constructor=vi}function s(vi,Ln,Yn){if(s.isBN(vi))return vi;this.negative=0,this.words=null,this.length=0,this.red=null,vi!==null&&((Ln==="le"||Ln==="be")&&(Yn=Ln,Ln=10),this._init(vi||0,Ln||10,Yn||"be"))}typeof n=="object"?n.exports=s:i.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(Ln){return Ln instanceof s?!0:Ln!==null&&typeof Ln=="object"&&Ln.constructor.wordSize===s.wordSize&&Array.isArray(Ln.words)},s.max=function(Ln,Yn){return Ln.cmp(Yn)>0?Ln:Yn},s.min=function(Ln,Yn){return Ln.cmp(Yn)<0?Ln:Yn},s.prototype._init=function(Ln,Yn,mi){if(typeof Ln=="number")return this._initNumber(Ln,Yn,mi);if(typeof Ln=="object")return this._initArray(Ln,Yn,mi);Yn==="hex"&&(Yn=16),a(Yn===(Yn|0)&&Yn>=2&&Yn<=36),Ln=Ln.toString().replace(/\s+/g,"");var gi=0;Ln[0]==="-"&&(gi++,this.negative=1),gi<Ln.length&&(Yn===16?this._parseHex(Ln,gi,mi):(this._parseBase(Ln,Yn,gi),mi==="le"&&this._initArray(this.toArray(),Yn,mi)))},s.prototype._initNumber=function(Ln,Yn,mi){Ln<0&&(this.negative=1,Ln=-Ln),Ln<67108864?(this.words=[Ln&67108863],this.length=1):Ln<4503599627370496?(this.words=[Ln&67108863,Ln/67108864&67108863],this.length=2):(a(Ln<9007199254740992),this.words=[Ln&67108863,Ln/67108864&67108863,1],this.length=3),mi==="le"&&this._initArray(this.toArray(),Yn,mi)},s.prototype._initArray=function(Ln,Yn,mi){if(a(typeof Ln.length=="number"),Ln.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Ln.length/3),this.words=new Array(this.length);for(var gi=0;gi<this.length;gi++)this.words[gi]=0;var _i,Ai,xi=0;if(mi==="be")for(gi=Ln.length-1,_i=0;gi>=0;gi-=3)Ai=Ln[gi]|Ln[gi-1]<<8|Ln[gi-2]<<16,this.words[_i]|=Ai<<xi&67108863,this.words[_i+1]=Ai>>>26-xi&67108863,xi+=24,xi>=26&&(xi-=26,_i++);else if(mi==="le")for(gi=0,_i=0;gi<Ln.length;gi+=3)Ai=Ln[gi]|Ln[gi+1]<<8|Ln[gi+2]<<16,this.words[_i]|=Ai<<xi&67108863,this.words[_i+1]=Ai>>>26-xi&67108863,xi+=24,xi>=26&&(xi-=26,_i++);return this._strip()};function D(vi,Ln){var Yn=vi.charCodeAt(Ln);if(Yn>=48&&Yn<=57)return Yn-48;if(Yn>=65&&Yn<=70)return Yn-55;if(Yn>=97&&Yn<=102)return Yn-87;a(!1,"Invalid character in "+vi)}function on(vi,Ln,Yn){var mi=D(vi,Yn);return Yn-1>=Ln&&(mi|=D(vi,Yn-1)<<4),mi}s.prototype._parseHex=function(Ln,Yn,mi){this.length=Math.ceil((Ln.length-Yn)/6),this.words=new Array(this.length);for(var gi=0;gi<this.length;gi++)this.words[gi]=0;var _i=0,Ai=0,xi;if(mi==="be")for(gi=Ln.length-1;gi>=Yn;gi-=2)xi=on(Ln,Yn,gi)<<_i,this.words[Ai]|=xi&67108863,_i>=18?(_i-=18,Ai+=1,this.words[Ai]|=xi>>>26):_i+=8;else{var Ri=Ln.length-Yn;for(gi=Ri%2===0?Yn+1:Yn;gi<Ln.length;gi+=2)xi=on(Ln,Yn,gi)<<_i,this.words[Ai]|=xi&67108863,_i>=18?(_i-=18,Ai+=1,this.words[Ai]|=xi>>>26):_i+=8}this._strip()};function h(vi,Ln,Yn,mi){for(var gi=0,_i=0,Ai=Math.min(vi.length,Yn),xi=Ln;xi<Ai;xi++){var Ri=vi.charCodeAt(xi)-48;gi*=mi,Ri>=49?_i=Ri-49+10:Ri>=17?_i=Ri-17+10:_i=Ri,a(Ri>=0&&_i<mi,"Invalid character"),gi+=_i}return gi}s.prototype._parseBase=function(Ln,Yn,mi){this.words=[0],this.length=1;for(var gi=0,_i=1;_i<=67108863;_i*=Yn)gi++;gi--,_i=_i/Yn|0;for(var Ai=Ln.length-mi,xi=Ai%gi,Ri=Math.min(Ai,Ai-xi)+mi,Wn=0,wi=mi;wi<Ri;wi+=gi)Wn=h(Ln,wi,wi+gi,Yn),this.imuln(_i),this.words[0]+Wn<67108864?this.words[0]+=Wn:this._iaddn(Wn);if(xi!==0){var qi=1;for(Wn=h(Ln,wi,Ln.length,Yn),wi=0;wi<xi;wi++)qi*=Yn;this.imuln(qi),this.words[0]+Wn<67108864?this.words[0]+=Wn:this._iaddn(Wn)}this._strip()},s.prototype.copy=function(Ln){Ln.words=new Array(this.length);for(var Yn=0;Yn<this.length;Yn++)Ln.words[Yn]=this.words[Yn];Ln.length=this.length,Ln.negative=this.negative,Ln.red=this.red};function v(vi,Ln){vi.words=Ln.words,vi.length=Ln.length,vi.negative=Ln.negative,vi.red=Ln.red}if(s.prototype._move=function(Ln){v(Ln,this)},s.prototype.clone=function(){var Ln=new s(null);return this.copy(Ln),Ln},s.prototype._expand=function(Ln){for(;this.length<Ln;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=In}catch{s.prototype.inspect=In}else s.prototype.inspect=In;function In(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var Rn=["","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"],Mn=[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],jn=[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];s.prototype.toString=function(Ln,Yn){Ln=Ln||10,Yn=Yn|0||1;var mi;if(Ln===16||Ln==="hex"){mi="";for(var gi=0,_i=0,Ai=0;Ai<this.length;Ai++){var xi=this.words[Ai],Ri=((xi<<gi|_i)&16777215).toString(16);_i=xi>>>24-gi&16777215,gi+=2,gi>=26&&(gi-=26,Ai--),_i!==0||Ai!==this.length-1?mi=Rn[6-Ri.length]+Ri+mi:mi=Ri+mi}for(_i!==0&&(mi=_i.toString(16)+mi);mi.length%Yn!==0;)mi="0"+mi;return this.negative!==0&&(mi="-"+mi),mi}if(Ln===(Ln|0)&&Ln>=2&&Ln<=36){var Wn=Mn[Ln],wi=jn[Ln];mi="";var qi=this.clone();for(qi.negative=0;!qi.isZero();){var Gi=qi.modrn(wi).toString(Ln);qi=qi.idivn(wi),qi.isZero()?mi=Gi+mi:mi=Rn[Wn-Gi.length]+Gi+mi}for(this.isZero()&&(mi="0"+mi);mi.length%Yn!==0;)mi="0"+mi;return this.negative!==0&&(mi="-"+mi),mi}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var Ln=this.words[0];return this.length===2?Ln+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Ln+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Ln:Ln},s.prototype.toJSON=function(){return this.toString(16,2)},l&&(s.prototype.toBuffer=function(Ln,Yn){return this.toArrayLike(l,Ln,Yn)}),s.prototype.toArray=function(Ln,Yn){return this.toArrayLike(Array,Ln,Yn)};var Hn=function(Ln,Yn){return Ln.allocUnsafe?Ln.allocUnsafe(Yn):new Ln(Yn)};s.prototype.toArrayLike=function(Ln,Yn,mi){this._strip();var gi=this.byteLength(),_i=mi||Math.max(1,gi);a(gi<=_i,"byte array longer than desired length"),a(_i>0,"Requested array length <= 0");var Ai=Hn(Ln,_i),xi=Yn==="le"?"LE":"BE";return this["_toArrayLike"+xi](Ai,gi),Ai},s.prototype._toArrayLikeLE=function(Ln,Yn){for(var mi=0,gi=0,_i=0,Ai=0;_i<this.length;_i++){var xi=this.words[_i]<<Ai|gi;Ln[mi++]=xi&255,mi<Ln.length&&(Ln[mi++]=xi>>8&255),mi<Ln.length&&(Ln[mi++]=xi>>16&255),Ai===6?(mi<Ln.length&&(Ln[mi++]=xi>>24&255),gi=0,Ai=0):(gi=xi>>>24,Ai+=2)}if(mi<Ln.length)for(Ln[mi++]=gi;mi<Ln.length;)Ln[mi++]=0},s.prototype._toArrayLikeBE=function(Ln,Yn){for(var mi=Ln.length-1,gi=0,_i=0,Ai=0;_i<this.length;_i++){var xi=this.words[_i]<<Ai|gi;Ln[mi--]=xi&255,mi>=0&&(Ln[mi--]=xi>>8&255),mi>=0&&(Ln[mi--]=xi>>16&255),Ai===6?(mi>=0&&(Ln[mi--]=xi>>24&255),gi=0,Ai=0):(gi=xi>>>24,Ai+=2)}if(mi>=0)for(Ln[mi--]=gi;mi>=0;)Ln[mi--]=0},Math.clz32?s.prototype._countBits=function(Ln){return 32-Math.clz32(Ln)}:s.prototype._countBits=function(Ln){var Yn=Ln,mi=0;return Yn>=4096&&(mi+=13,Yn>>>=13),Yn>=64&&(mi+=7,Yn>>>=7),Yn>=8&&(mi+=4,Yn>>>=4),Yn>=2&&(mi+=2,Yn>>>=2),mi+Yn},s.prototype._zeroBits=function(Ln){if(Ln===0)return 26;var Yn=Ln,mi=0;return(Yn&8191)===0&&(mi+=13,Yn>>>=13),(Yn&127)===0&&(mi+=7,Yn>>>=7),(Yn&15)===0&&(mi+=4,Yn>>>=4),(Yn&3)===0&&(mi+=2,Yn>>>=2),(Yn&1)===0&&mi++,mi},s.prototype.bitLength=function(){var Ln=this.words[this.length-1],Yn=this._countBits(Ln);return(this.length-1)*26+Yn};function hi(vi){for(var Ln=new Array(vi.bitLength()),Yn=0;Yn<Ln.length;Yn++){var mi=Yn/26|0,gi=Yn%26;Ln[Yn]=vi.words[mi]>>>gi&1}return Ln}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Ln=0,Yn=0;Yn<this.length;Yn++){var mi=this._zeroBits(this.words[Yn]);if(Ln+=mi,mi!==26)break}return Ln},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(Ln){return this.negative!==0?this.abs().inotn(Ln).iaddn(1):this.clone()},s.prototype.fromTwos=function(Ln){return this.testn(Ln-1)?this.notn(Ln).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(Ln){for(;this.length<Ln.length;)this.words[this.length++]=0;for(var Yn=0;Yn<Ln.length;Yn++)this.words[Yn]=this.words[Yn]|Ln.words[Yn];return this._strip()},s.prototype.ior=function(Ln){return a((this.negative|Ln.negative)===0),this.iuor(Ln)},s.prototype.or=function(Ln){return this.length>Ln.length?this.clone().ior(Ln):Ln.clone().ior(this)},s.prototype.uor=function(Ln){return this.length>Ln.length?this.clone().iuor(Ln):Ln.clone().iuor(this)},s.prototype.iuand=function(Ln){var Yn;this.length>Ln.length?Yn=Ln:Yn=this;for(var mi=0;mi<Yn.length;mi++)this.words[mi]=this.words[mi]&Ln.words[mi];return this.length=Yn.length,this._strip()},s.prototype.iand=function(Ln){return a((this.negative|Ln.negative)===0),this.iuand(Ln)},s.prototype.and=function(Ln){return this.length>Ln.length?this.clone().iand(Ln):Ln.clone().iand(this)},s.prototype.uand=function(Ln){return this.length>Ln.length?this.clone().iuand(Ln):Ln.clone().iuand(this)},s.prototype.iuxor=function(Ln){var Yn,mi;this.length>Ln.length?(Yn=this,mi=Ln):(Yn=Ln,mi=this);for(var gi=0;gi<mi.length;gi++)this.words[gi]=Yn.words[gi]^mi.words[gi];if(this!==Yn)for(;gi<Yn.length;gi++)this.words[gi]=Yn.words[gi];return this.length=Yn.length,this._strip()},s.prototype.ixor=function(Ln){return a((this.negative|Ln.negative)===0),this.iuxor(Ln)},s.prototype.xor=function(Ln){return this.length>Ln.length?this.clone().ixor(Ln):Ln.clone().ixor(this)},s.prototype.uxor=function(Ln){return this.length>Ln.length?this.clone().iuxor(Ln):Ln.clone().iuxor(this)},s.prototype.inotn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Math.ceil(Ln/26)|0,mi=Ln%26;this._expand(Yn),mi>0&&Yn--;for(var gi=0;gi<Yn;gi++)this.words[gi]=~this.words[gi]&67108863;return mi>0&&(this.words[gi]=~this.words[gi]&67108863>>26-mi),this._strip()},s.prototype.notn=function(Ln){return this.clone().inotn(Ln)},s.prototype.setn=function(Ln,Yn){a(typeof Ln=="number"&&Ln>=0);var mi=Ln/26|0,gi=Ln%26;return this._expand(mi+1),Yn?this.words[mi]=this.words[mi]|1<<gi:this.words[mi]=this.words[mi]&~(1<<gi),this._strip()},s.prototype.iadd=function(Ln){var Yn;if(this.negative!==0&&Ln.negative===0)return this.negative=0,Yn=this.isub(Ln),this.negative^=1,this._normSign();if(this.negative===0&&Ln.negative!==0)return Ln.negative=0,Yn=this.isub(Ln),Ln.negative=1,Yn._normSign();var mi,gi;this.length>Ln.length?(mi=this,gi=Ln):(mi=Ln,gi=this);for(var _i=0,Ai=0;Ai<gi.length;Ai++)Yn=(mi.words[Ai]|0)+(gi.words[Ai]|0)+_i,this.words[Ai]=Yn&67108863,_i=Yn>>>26;for(;_i!==0&&Ai<mi.length;Ai++)Yn=(mi.words[Ai]|0)+_i,this.words[Ai]=Yn&67108863,_i=Yn>>>26;if(this.length=mi.length,_i!==0)this.words[this.length]=_i,this.length++;else if(mi!==this)for(;Ai<mi.length;Ai++)this.words[Ai]=mi.words[Ai];return this},s.prototype.add=function(Ln){var Yn;return Ln.negative!==0&&this.negative===0?(Ln.negative=0,Yn=this.sub(Ln),Ln.negative^=1,Yn):Ln.negative===0&&this.negative!==0?(this.negative=0,Yn=Ln.sub(this),this.negative=1,Yn):this.length>Ln.length?this.clone().iadd(Ln):Ln.clone().iadd(this)},s.prototype.isub=function(Ln){if(Ln.negative!==0){Ln.negative=0;var Yn=this.iadd(Ln);return Ln.negative=1,Yn._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Ln),this.negative=1,this._normSign();var mi=this.cmp(Ln);if(mi===0)return this.negative=0,this.length=1,this.words[0]=0,this;var gi,_i;mi>0?(gi=this,_i=Ln):(gi=Ln,_i=this);for(var Ai=0,xi=0;xi<_i.length;xi++)Yn=(gi.words[xi]|0)-(_i.words[xi]|0)+Ai,Ai=Yn>>26,this.words[xi]=Yn&67108863;for(;Ai!==0&&xi<gi.length;xi++)Yn=(gi.words[xi]|0)+Ai,Ai=Yn>>26,this.words[xi]=Yn&67108863;if(Ai===0&&xi<gi.length&&gi!==this)for(;xi<gi.length;xi++)this.words[xi]=gi.words[xi];return this.length=Math.max(this.length,xi),gi!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(Ln){return this.clone().isub(Ln)};function yi(vi,Ln,Yn){Yn.negative=Ln.negative^vi.negative;var mi=vi.length+Ln.length|0;Yn.length=mi,mi=mi-1|0;var gi=vi.words[0]|0,_i=Ln.words[0]|0,Ai=gi*_i,xi=Ai&67108863,Ri=Ai/67108864|0;Yn.words[0]=xi;for(var Wn=1;Wn<mi;Wn++){for(var wi=Ri>>>26,qi=Ri&67108863,Gi=Math.min(Wn,Ln.length-1),ji=Math.max(0,Wn-vi.length+1);ji<=Gi;ji++){var Li=Wn-ji|0;gi=vi.words[Li]|0,_i=Ln.words[ji]|0,Ai=gi*_i+qi,wi+=Ai/67108864|0,qi=Ai&67108863}Yn.words[Wn]=qi|0,Ri=wi|0}return Ri!==0?Yn.words[Wn]=Ri|0:Yn.length--,Yn._strip()}var bi=function(Ln,Yn,mi){var gi=Ln.words,_i=Yn.words,Ai=mi.words,xi=0,Ri,Wn,wi,qi=gi[0]|0,Gi=qi&8191,ji=qi>>>13,Li=gi[1]|0,$i=Li&8191,zi=Li>>>13,Qi=gi[2]|0,Vi=Qi&8191,Bi=Qi>>>13,Hi=gi[3]|0,Yi=Hi&8191,Ji=Hi>>>13,ra=gi[4]|0,aa=ra&8191,ea=ra>>>13,Zi=gi[5]|0,ca=Zi&8191,Xi=Zi>>>13,ia=gi[6]|0,na=ia&8191,oa=ia>>>13,la=gi[7]|0,da=la&8191,fa=la>>>13,ba=gi[8]|0,pa=ba&8191,ha=ba>>>13,Ia=gi[9]|0,Da=Ia&8191,ya=Ia>>>13,Fa=_i[0]|0,Sa=Fa&8191,ga=Fa>>>13,Pa=_i[1]|0,wa=Pa&8191,ma=Pa>>>13,$a=_i[2]|0,Na=$a&8191,_a=$a>>>13,Ba=_i[3]|0,Ca=Ba&8191,Ra=Ba>>>13,ka=_i[4]|0,Ma=ka&8191,Ki=ka>>>13,Pi=_i[5]|0,Ui=Pi&8191,Wi=Pi>>>13,ta=_i[6]|0,sa=ta&8191,ua=ta>>>13,Ta=_i[7]|0,xa=Ta&8191,va=Ta>>>13,Oa=_i[8]|0,Ea=Oa&8191,Aa=Oa>>>13,Ua=_i[9]|0,qa=Ua&8191,La=Ua>>>13;mi.negative=Ln.negative^Yn.negative,mi.length=19,Ri=Math.imul(Gi,Sa),Wn=Math.imul(Gi,ga),Wn=Wn+Math.imul(ji,Sa)|0,wi=Math.imul(ji,ga);var ja=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ja>>>26)|0,ja&=67108863,Ri=Math.imul($i,Sa),Wn=Math.imul($i,ga),Wn=Wn+Math.imul(zi,Sa)|0,wi=Math.imul(zi,ga),Ri=Ri+Math.imul(Gi,wa)|0,Wn=Wn+Math.imul(Gi,ma)|0,Wn=Wn+Math.imul(ji,wa)|0,wi=wi+Math.imul(ji,ma)|0;var Va=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Va>>>26)|0,Va&=67108863,Ri=Math.imul(Vi,Sa),Wn=Math.imul(Vi,ga),Wn=Wn+Math.imul(Bi,Sa)|0,wi=Math.imul(Bi,ga),Ri=Ri+Math.imul($i,wa)|0,Wn=Wn+Math.imul($i,ma)|0,Wn=Wn+Math.imul(zi,wa)|0,wi=wi+Math.imul(zi,ma)|0,Ri=Ri+Math.imul(Gi,Na)|0,Wn=Wn+Math.imul(Gi,_a)|0,Wn=Wn+Math.imul(ji,Na)|0,wi=wi+Math.imul(ji,_a)|0;var Ga=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,Ri=Math.imul(Yi,Sa),Wn=Math.imul(Yi,ga),Wn=Wn+Math.imul(Ji,Sa)|0,wi=Math.imul(Ji,ga),Ri=Ri+Math.imul(Vi,wa)|0,Wn=Wn+Math.imul(Vi,ma)|0,Wn=Wn+Math.imul(Bi,wa)|0,wi=wi+Math.imul(Bi,ma)|0,Ri=Ri+Math.imul($i,Na)|0,Wn=Wn+Math.imul($i,_a)|0,Wn=Wn+Math.imul(zi,Na)|0,wi=wi+Math.imul(zi,_a)|0,Ri=Ri+Math.imul(Gi,Ca)|0,Wn=Wn+Math.imul(Gi,Ra)|0,Wn=Wn+Math.imul(ji,Ca)|0,wi=wi+Math.imul(ji,Ra)|0;var Ka=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,Ri=Math.imul(aa,Sa),Wn=Math.imul(aa,ga),Wn=Wn+Math.imul(ea,Sa)|0,wi=Math.imul(ea,ga),Ri=Ri+Math.imul(Yi,wa)|0,Wn=Wn+Math.imul(Yi,ma)|0,Wn=Wn+Math.imul(Ji,wa)|0,wi=wi+Math.imul(Ji,ma)|0,Ri=Ri+Math.imul(Vi,Na)|0,Wn=Wn+Math.imul(Vi,_a)|0,Wn=Wn+Math.imul(Bi,Na)|0,wi=wi+Math.imul(Bi,_a)|0,Ri=Ri+Math.imul($i,Ca)|0,Wn=Wn+Math.imul($i,Ra)|0,Wn=Wn+Math.imul(zi,Ca)|0,wi=wi+Math.imul(zi,Ra)|0,Ri=Ri+Math.imul(Gi,Ma)|0,Wn=Wn+Math.imul(Gi,Ki)|0,Wn=Wn+Math.imul(ji,Ma)|0,wi=wi+Math.imul(ji,Ki)|0;var Ha=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ha>>>26)|0,Ha&=67108863,Ri=Math.imul(ca,Sa),Wn=Math.imul(ca,ga),Wn=Wn+Math.imul(Xi,Sa)|0,wi=Math.imul(Xi,ga),Ri=Ri+Math.imul(aa,wa)|0,Wn=Wn+Math.imul(aa,ma)|0,Wn=Wn+Math.imul(ea,wa)|0,wi=wi+Math.imul(ea,ma)|0,Ri=Ri+Math.imul(Yi,Na)|0,Wn=Wn+Math.imul(Yi,_a)|0,Wn=Wn+Math.imul(Ji,Na)|0,wi=wi+Math.imul(Ji,_a)|0,Ri=Ri+Math.imul(Vi,Ca)|0,Wn=Wn+Math.imul(Vi,Ra)|0,Wn=Wn+Math.imul(Bi,Ca)|0,wi=wi+Math.imul(Bi,Ra)|0,Ri=Ri+Math.imul($i,Ma)|0,Wn=Wn+Math.imul($i,Ki)|0,Wn=Wn+Math.imul(zi,Ma)|0,wi=wi+Math.imul(zi,Ki)|0,Ri=Ri+Math.imul(Gi,Ui)|0,Wn=Wn+Math.imul(Gi,Wi)|0,Wn=Wn+Math.imul(ji,Ui)|0,wi=wi+Math.imul(ji,Wi)|0;var Qa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,Ri=Math.imul(na,Sa),Wn=Math.imul(na,ga),Wn=Wn+Math.imul(oa,Sa)|0,wi=Math.imul(oa,ga),Ri=Ri+Math.imul(ca,wa)|0,Wn=Wn+Math.imul(ca,ma)|0,Wn=Wn+Math.imul(Xi,wa)|0,wi=wi+Math.imul(Xi,ma)|0,Ri=Ri+Math.imul(aa,Na)|0,Wn=Wn+Math.imul(aa,_a)|0,Wn=Wn+Math.imul(ea,Na)|0,wi=wi+Math.imul(ea,_a)|0,Ri=Ri+Math.imul(Yi,Ca)|0,Wn=Wn+Math.imul(Yi,Ra)|0,Wn=Wn+Math.imul(Ji,Ca)|0,wi=wi+Math.imul(Ji,Ra)|0,Ri=Ri+Math.imul(Vi,Ma)|0,Wn=Wn+Math.imul(Vi,Ki)|0,Wn=Wn+Math.imul(Bi,Ma)|0,wi=wi+Math.imul(Bi,Ki)|0,Ri=Ri+Math.imul($i,Ui)|0,Wn=Wn+Math.imul($i,Wi)|0,Wn=Wn+Math.imul(zi,Ui)|0,wi=wi+Math.imul(zi,Wi)|0,Ri=Ri+Math.imul(Gi,sa)|0,Wn=Wn+Math.imul(Gi,ua)|0,Wn=Wn+Math.imul(ji,sa)|0,wi=wi+Math.imul(ji,ua)|0;var Ya=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ya>>>26)|0,Ya&=67108863,Ri=Math.imul(da,Sa),Wn=Math.imul(da,ga),Wn=Wn+Math.imul(fa,Sa)|0,wi=Math.imul(fa,ga),Ri=Ri+Math.imul(na,wa)|0,Wn=Wn+Math.imul(na,ma)|0,Wn=Wn+Math.imul(oa,wa)|0,wi=wi+Math.imul(oa,ma)|0,Ri=Ri+Math.imul(ca,Na)|0,Wn=Wn+Math.imul(ca,_a)|0,Wn=Wn+Math.imul(Xi,Na)|0,wi=wi+Math.imul(Xi,_a)|0,Ri=Ri+Math.imul(aa,Ca)|0,Wn=Wn+Math.imul(aa,Ra)|0,Wn=Wn+Math.imul(ea,Ca)|0,wi=wi+Math.imul(ea,Ra)|0,Ri=Ri+Math.imul(Yi,Ma)|0,Wn=Wn+Math.imul(Yi,Ki)|0,Wn=Wn+Math.imul(Ji,Ma)|0,wi=wi+Math.imul(Ji,Ki)|0,Ri=Ri+Math.imul(Vi,Ui)|0,Wn=Wn+Math.imul(Vi,Wi)|0,Wn=Wn+Math.imul(Bi,Ui)|0,wi=wi+Math.imul(Bi,Wi)|0,Ri=Ri+Math.imul($i,sa)|0,Wn=Wn+Math.imul($i,ua)|0,Wn=Wn+Math.imul(zi,sa)|0,wi=wi+Math.imul(zi,ua)|0,Ri=Ri+Math.imul(Gi,xa)|0,Wn=Wn+Math.imul(Gi,va)|0,Wn=Wn+Math.imul(ji,xa)|0,wi=wi+Math.imul(ji,va)|0;var za=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(za>>>26)|0,za&=67108863,Ri=Math.imul(pa,Sa),Wn=Math.imul(pa,ga),Wn=Wn+Math.imul(ha,Sa)|0,wi=Math.imul(ha,ga),Ri=Ri+Math.imul(da,wa)|0,Wn=Wn+Math.imul(da,ma)|0,Wn=Wn+Math.imul(fa,wa)|0,wi=wi+Math.imul(fa,ma)|0,Ri=Ri+Math.imul(na,Na)|0,Wn=Wn+Math.imul(na,_a)|0,Wn=Wn+Math.imul(oa,Na)|0,wi=wi+Math.imul(oa,_a)|0,Ri=Ri+Math.imul(ca,Ca)|0,Wn=Wn+Math.imul(ca,Ra)|0,Wn=Wn+Math.imul(Xi,Ca)|0,wi=wi+Math.imul(Xi,Ra)|0,Ri=Ri+Math.imul(aa,Ma)|0,Wn=Wn+Math.imul(aa,Ki)|0,Wn=Wn+Math.imul(ea,Ma)|0,wi=wi+Math.imul(ea,Ki)|0,Ri=Ri+Math.imul(Yi,Ui)|0,Wn=Wn+Math.imul(Yi,Wi)|0,Wn=Wn+Math.imul(Ji,Ui)|0,wi=wi+Math.imul(Ji,Wi)|0,Ri=Ri+Math.imul(Vi,sa)|0,Wn=Wn+Math.imul(Vi,ua)|0,Wn=Wn+Math.imul(Bi,sa)|0,wi=wi+Math.imul(Bi,ua)|0,Ri=Ri+Math.imul($i,xa)|0,Wn=Wn+Math.imul($i,va)|0,Wn=Wn+Math.imul(zi,xa)|0,wi=wi+Math.imul(zi,va)|0,Ri=Ri+Math.imul(Gi,Ea)|0,Wn=Wn+Math.imul(Gi,Aa)|0,Wn=Wn+Math.imul(ji,Ea)|0,wi=wi+Math.imul(ji,Aa)|0;var Wa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,Ri=Math.imul(Da,Sa),Wn=Math.imul(Da,ga),Wn=Wn+Math.imul(ya,Sa)|0,wi=Math.imul(ya,ga),Ri=Ri+Math.imul(pa,wa)|0,Wn=Wn+Math.imul(pa,ma)|0,Wn=Wn+Math.imul(ha,wa)|0,wi=wi+Math.imul(ha,ma)|0,Ri=Ri+Math.imul(da,Na)|0,Wn=Wn+Math.imul(da,_a)|0,Wn=Wn+Math.imul(fa,Na)|0,wi=wi+Math.imul(fa,_a)|0,Ri=Ri+Math.imul(na,Ca)|0,Wn=Wn+Math.imul(na,Ra)|0,Wn=Wn+Math.imul(oa,Ca)|0,wi=wi+Math.imul(oa,Ra)|0,Ri=Ri+Math.imul(ca,Ma)|0,Wn=Wn+Math.imul(ca,Ki)|0,Wn=Wn+Math.imul(Xi,Ma)|0,wi=wi+Math.imul(Xi,Ki)|0,Ri=Ri+Math.imul(aa,Ui)|0,Wn=Wn+Math.imul(aa,Wi)|0,Wn=Wn+Math.imul(ea,Ui)|0,wi=wi+Math.imul(ea,Wi)|0,Ri=Ri+Math.imul(Yi,sa)|0,Wn=Wn+Math.imul(Yi,ua)|0,Wn=Wn+Math.imul(Ji,sa)|0,wi=wi+Math.imul(Ji,ua)|0,Ri=Ri+Math.imul(Vi,xa)|0,Wn=Wn+Math.imul(Vi,va)|0,Wn=Wn+Math.imul(Bi,xa)|0,wi=wi+Math.imul(Bi,va)|0,Ri=Ri+Math.imul($i,Ea)|0,Wn=Wn+Math.imul($i,Aa)|0,Wn=Wn+Math.imul(zi,Ea)|0,wi=wi+Math.imul(zi,Aa)|0,Ri=Ri+Math.imul(Gi,qa)|0,Wn=Wn+Math.imul(Gi,La)|0,Wn=Wn+Math.imul(ji,qa)|0,wi=wi+Math.imul(ji,La)|0;var Ja=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,Ri=Math.imul(Da,wa),Wn=Math.imul(Da,ma),Wn=Wn+Math.imul(ya,wa)|0,wi=Math.imul(ya,ma),Ri=Ri+Math.imul(pa,Na)|0,Wn=Wn+Math.imul(pa,_a)|0,Wn=Wn+Math.imul(ha,Na)|0,wi=wi+Math.imul(ha,_a)|0,Ri=Ri+Math.imul(da,Ca)|0,Wn=Wn+Math.imul(da,Ra)|0,Wn=Wn+Math.imul(fa,Ca)|0,wi=wi+Math.imul(fa,Ra)|0,Ri=Ri+Math.imul(na,Ma)|0,Wn=Wn+Math.imul(na,Ki)|0,Wn=Wn+Math.imul(oa,Ma)|0,wi=wi+Math.imul(oa,Ki)|0,Ri=Ri+Math.imul(ca,Ui)|0,Wn=Wn+Math.imul(ca,Wi)|0,Wn=Wn+Math.imul(Xi,Ui)|0,wi=wi+Math.imul(Xi,Wi)|0,Ri=Ri+Math.imul(aa,sa)|0,Wn=Wn+Math.imul(aa,ua)|0,Wn=Wn+Math.imul(ea,sa)|0,wi=wi+Math.imul(ea,ua)|0,Ri=Ri+Math.imul(Yi,xa)|0,Wn=Wn+Math.imul(Yi,va)|0,Wn=Wn+Math.imul(Ji,xa)|0,wi=wi+Math.imul(Ji,va)|0,Ri=Ri+Math.imul(Vi,Ea)|0,Wn=Wn+Math.imul(Vi,Aa)|0,Wn=Wn+Math.imul(Bi,Ea)|0,wi=wi+Math.imul(Bi,Aa)|0,Ri=Ri+Math.imul($i,qa)|0,Wn=Wn+Math.imul($i,La)|0,Wn=Wn+Math.imul(zi,qa)|0,wi=wi+Math.imul(zi,La)|0;var Xa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,Ri=Math.imul(Da,Na),Wn=Math.imul(Da,_a),Wn=Wn+Math.imul(ya,Na)|0,wi=Math.imul(ya,_a),Ri=Ri+Math.imul(pa,Ca)|0,Wn=Wn+Math.imul(pa,Ra)|0,Wn=Wn+Math.imul(ha,Ca)|0,wi=wi+Math.imul(ha,Ra)|0,Ri=Ri+Math.imul(da,Ma)|0,Wn=Wn+Math.imul(da,Ki)|0,Wn=Wn+Math.imul(fa,Ma)|0,wi=wi+Math.imul(fa,Ki)|0,Ri=Ri+Math.imul(na,Ui)|0,Wn=Wn+Math.imul(na,Wi)|0,Wn=Wn+Math.imul(oa,Ui)|0,wi=wi+Math.imul(oa,Wi)|0,Ri=Ri+Math.imul(ca,sa)|0,Wn=Wn+Math.imul(ca,ua)|0,Wn=Wn+Math.imul(Xi,sa)|0,wi=wi+Math.imul(Xi,ua)|0,Ri=Ri+Math.imul(aa,xa)|0,Wn=Wn+Math.imul(aa,va)|0,Wn=Wn+Math.imul(ea,xa)|0,wi=wi+Math.imul(ea,va)|0,Ri=Ri+Math.imul(Yi,Ea)|0,Wn=Wn+Math.imul(Yi,Aa)|0,Wn=Wn+Math.imul(Ji,Ea)|0,wi=wi+Math.imul(Ji,Aa)|0,Ri=Ri+Math.imul(Vi,qa)|0,Wn=Wn+Math.imul(Vi,La)|0,Wn=Wn+Math.imul(Bi,qa)|0,wi=wi+Math.imul(Bi,La)|0;var Za=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Za>>>26)|0,Za&=67108863,Ri=Math.imul(Da,Ca),Wn=Math.imul(Da,Ra),Wn=Wn+Math.imul(ya,Ca)|0,wi=Math.imul(ya,Ra),Ri=Ri+Math.imul(pa,Ma)|0,Wn=Wn+Math.imul(pa,Ki)|0,Wn=Wn+Math.imul(ha,Ma)|0,wi=wi+Math.imul(ha,Ki)|0,Ri=Ri+Math.imul(da,Ui)|0,Wn=Wn+Math.imul(da,Wi)|0,Wn=Wn+Math.imul(fa,Ui)|0,wi=wi+Math.imul(fa,Wi)|0,Ri=Ri+Math.imul(na,sa)|0,Wn=Wn+Math.imul(na,ua)|0,Wn=Wn+Math.imul(oa,sa)|0,wi=wi+Math.imul(oa,ua)|0,Ri=Ri+Math.imul(ca,xa)|0,Wn=Wn+Math.imul(ca,va)|0,Wn=Wn+Math.imul(Xi,xa)|0,wi=wi+Math.imul(Xi,va)|0,Ri=Ri+Math.imul(aa,Ea)|0,Wn=Wn+Math.imul(aa,Aa)|0,Wn=Wn+Math.imul(ea,Ea)|0,wi=wi+Math.imul(ea,Aa)|0,Ri=Ri+Math.imul(Yi,qa)|0,Wn=Wn+Math.imul(Yi,La)|0,Wn=Wn+Math.imul(Ji,qa)|0,wi=wi+Math.imul(Ji,La)|0;var es=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(es>>>26)|0,es&=67108863,Ri=Math.imul(Da,Ma),Wn=Math.imul(Da,Ki),Wn=Wn+Math.imul(ya,Ma)|0,wi=Math.imul(ya,Ki),Ri=Ri+Math.imul(pa,Ui)|0,Wn=Wn+Math.imul(pa,Wi)|0,Wn=Wn+Math.imul(ha,Ui)|0,wi=wi+Math.imul(ha,Wi)|0,Ri=Ri+Math.imul(da,sa)|0,Wn=Wn+Math.imul(da,ua)|0,Wn=Wn+Math.imul(fa,sa)|0,wi=wi+Math.imul(fa,ua)|0,Ri=Ri+Math.imul(na,xa)|0,Wn=Wn+Math.imul(na,va)|0,Wn=Wn+Math.imul(oa,xa)|0,wi=wi+Math.imul(oa,va)|0,Ri=Ri+Math.imul(ca,Ea)|0,Wn=Wn+Math.imul(ca,Aa)|0,Wn=Wn+Math.imul(Xi,Ea)|0,wi=wi+Math.imul(Xi,Aa)|0,Ri=Ri+Math.imul(aa,qa)|0,Wn=Wn+Math.imul(aa,La)|0,Wn=Wn+Math.imul(ea,qa)|0,wi=wi+Math.imul(ea,La)|0;var rs=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(rs>>>26)|0,rs&=67108863,Ri=Math.imul(Da,Ui),Wn=Math.imul(Da,Wi),Wn=Wn+Math.imul(ya,Ui)|0,wi=Math.imul(ya,Wi),Ri=Ri+Math.imul(pa,sa)|0,Wn=Wn+Math.imul(pa,ua)|0,Wn=Wn+Math.imul(ha,sa)|0,wi=wi+Math.imul(ha,ua)|0,Ri=Ri+Math.imul(da,xa)|0,Wn=Wn+Math.imul(da,va)|0,Wn=Wn+Math.imul(fa,xa)|0,wi=wi+Math.imul(fa,va)|0,Ri=Ri+Math.imul(na,Ea)|0,Wn=Wn+Math.imul(na,Aa)|0,Wn=Wn+Math.imul(oa,Ea)|0,wi=wi+Math.imul(oa,Aa)|0,Ri=Ri+Math.imul(ca,qa)|0,Wn=Wn+Math.imul(ca,La)|0,Wn=Wn+Math.imul(Xi,qa)|0,wi=wi+Math.imul(Xi,La)|0;var ts=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ts>>>26)|0,ts&=67108863,Ri=Math.imul(Da,sa),Wn=Math.imul(Da,ua),Wn=Wn+Math.imul(ya,sa)|0,wi=Math.imul(ya,ua),Ri=Ri+Math.imul(pa,xa)|0,Wn=Wn+Math.imul(pa,va)|0,Wn=Wn+Math.imul(ha,xa)|0,wi=wi+Math.imul(ha,va)|0,Ri=Ri+Math.imul(da,Ea)|0,Wn=Wn+Math.imul(da,Aa)|0,Wn=Wn+Math.imul(fa,Ea)|0,wi=wi+Math.imul(fa,Aa)|0,Ri=Ri+Math.imul(na,qa)|0,Wn=Wn+Math.imul(na,La)|0,Wn=Wn+Math.imul(oa,qa)|0,wi=wi+Math.imul(oa,La)|0;var ns=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ns>>>26)|0,ns&=67108863,Ri=Math.imul(Da,xa),Wn=Math.imul(Da,va),Wn=Wn+Math.imul(ya,xa)|0,wi=Math.imul(ya,va),Ri=Ri+Math.imul(pa,Ea)|0,Wn=Wn+Math.imul(pa,Aa)|0,Wn=Wn+Math.imul(ha,Ea)|0,wi=wi+Math.imul(ha,Aa)|0,Ri=Ri+Math.imul(da,qa)|0,Wn=Wn+Math.imul(da,La)|0,Wn=Wn+Math.imul(fa,qa)|0,wi=wi+Math.imul(fa,La)|0;var is=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(is>>>26)|0,is&=67108863,Ri=Math.imul(Da,Ea),Wn=Math.imul(Da,Aa),Wn=Wn+Math.imul(ya,Ea)|0,wi=Math.imul(ya,Aa),Ri=Ri+Math.imul(pa,qa)|0,Wn=Wn+Math.imul(pa,La)|0,Wn=Wn+Math.imul(ha,qa)|0,wi=wi+Math.imul(ha,La)|0;var as=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(as>>>26)|0,as&=67108863,Ri=Math.imul(Da,qa),Wn=Math.imul(Da,La),Wn=Wn+Math.imul(ya,qa)|0,wi=Math.imul(ya,La);var ss=(xi+Ri|0)+((Wn&8191)<<13)|0;return xi=(wi+(Wn>>>13)|0)+(ss>>>26)|0,ss&=67108863,Ai[0]=ja,Ai[1]=Va,Ai[2]=Ga,Ai[3]=Ka,Ai[4]=Ha,Ai[5]=Qa,Ai[6]=Ya,Ai[7]=za,Ai[8]=Wa,Ai[9]=Ja,Ai[10]=Xa,Ai[11]=Za,Ai[12]=es,Ai[13]=rs,Ai[14]=ts,Ai[15]=ns,Ai[16]=is,Ai[17]=as,Ai[18]=ss,xi!==0&&(Ai[19]=xi,mi.length++),mi};Math.imul||(bi=yi);function Ti(vi,Ln,Yn){Yn.negative=Ln.negative^vi.negative,Yn.length=vi.length+Ln.length;for(var mi=0,gi=0,_i=0;_i<Yn.length-1;_i++){var Ai=gi;gi=0;for(var xi=mi&67108863,Ri=Math.min(_i,Ln.length-1),Wn=Math.max(0,_i-vi.length+1);Wn<=Ri;Wn++){var wi=_i-Wn,qi=vi.words[wi]|0,Gi=Ln.words[Wn]|0,ji=qi*Gi,Li=ji&67108863;Ai=Ai+(ji/67108864|0)|0,Li=Li+xi|0,xi=Li&67108863,Ai=Ai+(Li>>>26)|0,gi+=Ai>>>26,Ai&=67108863}Yn.words[_i]=xi,mi=Ai,Ai=gi}return mi!==0?Yn.words[_i]=mi:Yn.length--,Yn._strip()}function Si(vi,Ln,Yn){return Ti(vi,Ln,Yn)}s.prototype.mulTo=function(Ln,Yn){var mi,gi=this.length+Ln.length;return this.length===10&&Ln.length===10?mi=bi(this,Ln,Yn):gi<63?mi=yi(this,Ln,Yn):gi<1024?mi=Ti(this,Ln,Yn):mi=Si(this,Ln,Yn),mi},s.prototype.mul=function(Ln){var Yn=new s(null);return Yn.words=new Array(this.length+Ln.length),this.mulTo(Ln,Yn)},s.prototype.mulf=function(Ln){var Yn=new s(null);return Yn.words=new Array(this.length+Ln.length),Si(this,Ln,Yn)},s.prototype.imul=function(Ln){return this.clone().mulTo(Ln,this)},s.prototype.imuln=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(typeof Ln=="number"),a(Ln<67108864);for(var mi=0,gi=0;gi<this.length;gi++){var _i=(this.words[gi]|0)*Ln,Ai=(_i&67108863)+(mi&67108863);mi>>=26,mi+=_i/67108864|0,mi+=Ai>>>26,this.words[gi]=Ai&67108863}return mi!==0&&(this.words[gi]=mi,this.length++),this.length=Ln===0?1:this.length,Yn?this.ineg():this},s.prototype.muln=function(Ln){return this.clone().imuln(Ln)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(Ln){var Yn=hi(Ln);if(Yn.length===0)return new s(1);for(var mi=this,gi=0;gi<Yn.length&&Yn[gi]===0;gi++,mi=mi.sqr());if(++gi<Yn.length)for(var _i=mi.sqr();gi<Yn.length;gi++,_i=_i.sqr())Yn[gi]!==0&&(mi=mi.mul(_i));return mi},s.prototype.iushln=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26,gi=67108863>>>26-Yn<<26-Yn,_i;if(Yn!==0){var Ai=0;for(_i=0;_i<this.length;_i++){var xi=this.words[_i]&gi,Ri=(this.words[_i]|0)-xi<<Yn;this.words[_i]=Ri|Ai,Ai=xi>>>26-Yn}Ai&&(this.words[_i]=Ai,this.length++)}if(mi!==0){for(_i=this.length-1;_i>=0;_i--)this.words[_i+mi]=this.words[_i];for(_i=0;_i<mi;_i++)this.words[_i]=0;this.length+=mi}return this._strip()},s.prototype.ishln=function(Ln){return a(this.negative===0),this.iushln(Ln)},s.prototype.iushrn=function(Ln,Yn,mi){a(typeof Ln=="number"&&Ln>=0);var gi;Yn?gi=(Yn-Yn%26)/26:gi=0;var _i=Ln%26,Ai=Math.min((Ln-_i)/26,this.length),xi=67108863^67108863>>>_i<<_i,Ri=mi;if(gi-=Ai,gi=Math.max(0,gi),Ri){for(var Wn=0;Wn<Ai;Wn++)Ri.words[Wn]=this.words[Wn];Ri.length=Ai}if(Ai!==0)if(this.length>Ai)for(this.length-=Ai,Wn=0;Wn<this.length;Wn++)this.words[Wn]=this.words[Wn+Ai];else this.words[0]=0,this.length=1;var wi=0;for(Wn=this.length-1;Wn>=0&&(wi!==0||Wn>=gi);Wn--){var qi=this.words[Wn]|0;this.words[Wn]=wi<<26-_i|qi>>>_i,wi=qi&xi}return Ri&&wi!==0&&(Ri.words[Ri.length++]=wi),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(Ln,Yn,mi){return a(this.negative===0),this.iushrn(Ln,Yn,mi)},s.prototype.shln=function(Ln){return this.clone().ishln(Ln)},s.prototype.ushln=function(Ln){return this.clone().iushln(Ln)},s.prototype.shrn=function(Ln){return this.clone().ishrn(Ln)},s.prototype.ushrn=function(Ln){return this.clone().iushrn(Ln)},s.prototype.testn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26,gi=1<<Yn;if(this.length<=mi)return!1;var _i=this.words[mi];return!!(_i&gi)},s.prototype.imaskn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=mi)return this;if(Yn!==0&&mi++,this.length=Math.min(mi,this.length),Yn!==0){var gi=67108863^67108863>>>Yn<<Yn;this.words[this.length-1]&=gi}return this._strip()},s.prototype.maskn=function(Ln){return this.clone().imaskn(Ln)},s.prototype.iaddn=function(Ln){return a(typeof Ln=="number"),a(Ln<67108864),Ln<0?this.isubn(-Ln):this.negative!==0?this.length===1&&(this.words[0]|0)<=Ln?(this.words[0]=Ln-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Ln),this.negative=1,this):this._iaddn(Ln)},s.prototype._iaddn=function(Ln){this.words[0]+=Ln;for(var Yn=0;Yn<this.length&&this.words[Yn]>=67108864;Yn++)this.words[Yn]-=67108864,Yn===this.length-1?this.words[Yn+1]=1:this.words[Yn+1]++;return this.length=Math.max(this.length,Yn+1),this},s.prototype.isubn=function(Ln){if(a(typeof Ln=="number"),a(Ln<67108864),Ln<0)return this.iaddn(-Ln);if(this.negative!==0)return this.negative=0,this.iaddn(Ln),this.negative=1,this;if(this.words[0]-=Ln,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Yn=0;Yn<this.length&&this.words[Yn]<0;Yn++)this.words[Yn]+=67108864,this.words[Yn+1]-=1;return this._strip()},s.prototype.addn=function(Ln){return this.clone().iaddn(Ln)},s.prototype.subn=function(Ln){return this.clone().isubn(Ln)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(Ln,Yn,mi){var gi=Ln.length+mi,_i;this._expand(gi);var Ai,xi=0;for(_i=0;_i<Ln.length;_i++){Ai=(this.words[_i+mi]|0)+xi;var Ri=(Ln.words[_i]|0)*Yn;Ai-=Ri&67108863,xi=(Ai>>26)-(Ri/67108864|0),this.words[_i+mi]=Ai&67108863}for(;_i<this.length-mi;_i++)Ai=(this.words[_i+mi]|0)+xi,xi=Ai>>26,this.words[_i+mi]=Ai&67108863;if(xi===0)return this._strip();for(a(xi===-1),xi=0,_i=0;_i<this.length;_i++)Ai=-(this.words[_i]|0)+xi,xi=Ai>>26,this.words[_i]=Ai&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(Ln,Yn){var mi=this.length-Ln.length,gi=this.clone(),_i=Ln,Ai=_i.words[_i.length-1]|0,xi=this._countBits(Ai);mi=26-xi,mi!==0&&(_i=_i.ushln(mi),gi.iushln(mi),Ai=_i.words[_i.length-1]|0);var Ri=gi.length-_i.length,Wn;if(Yn!=="mod"){Wn=new s(null),Wn.length=Ri+1,Wn.words=new Array(Wn.length);for(var wi=0;wi<Wn.length;wi++)Wn.words[wi]=0}var qi=gi.clone()._ishlnsubmul(_i,1,Ri);qi.negative===0&&(gi=qi,Wn&&(Wn.words[Ri]=1));for(var Gi=Ri-1;Gi>=0;Gi--){var ji=(gi.words[_i.length+Gi]|0)*67108864+(gi.words[_i.length+Gi-1]|0);for(ji=Math.min(ji/Ai|0,67108863),gi._ishlnsubmul(_i,ji,Gi);gi.negative!==0;)ji--,gi.negative=0,gi._ishlnsubmul(_i,1,Gi),gi.isZero()||(gi.negative^=1);Wn&&(Wn.words[Gi]=ji)}return Wn&&Wn._strip(),gi._strip(),Yn!=="div"&&mi!==0&&gi.iushrn(mi),{div:Wn||null,mod:gi}},s.prototype.divmod=function(Ln,Yn,mi){if(a(!Ln.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var gi,_i,Ai;return this.negative!==0&&Ln.negative===0?(Ai=this.neg().divmod(Ln,Yn),Yn!=="mod"&&(gi=Ai.div.neg()),Yn!=="div"&&(_i=Ai.mod.neg(),mi&&_i.negative!==0&&_i.iadd(Ln)),{div:gi,mod:_i}):this.negative===0&&Ln.negative!==0?(Ai=this.divmod(Ln.neg(),Yn),Yn!=="mod"&&(gi=Ai.div.neg()),{div:gi,mod:Ai.mod}):(this.negative&Ln.negative)!==0?(Ai=this.neg().divmod(Ln.neg(),Yn),Yn!=="div"&&(_i=Ai.mod.neg(),mi&&_i.negative!==0&&_i.isub(Ln)),{div:Ai.div,mod:_i}):Ln.length>this.length||this.cmp(Ln)<0?{div:new s(0),mod:this}:Ln.length===1?Yn==="div"?{div:this.divn(Ln.words[0]),mod:null}:Yn==="mod"?{div:null,mod:new s(this.modrn(Ln.words[0]))}:{div:this.divn(Ln.words[0]),mod:new s(this.modrn(Ln.words[0]))}:this._wordDiv(Ln,Yn)},s.prototype.div=function(Ln){return this.divmod(Ln,"div",!1).div},s.prototype.mod=function(Ln){return this.divmod(Ln,"mod",!1).mod},s.prototype.umod=function(Ln){return this.divmod(Ln,"mod",!0).mod},s.prototype.divRound=function(Ln){var Yn=this.divmod(Ln);if(Yn.mod.isZero())return Yn.div;var mi=Yn.div.negative!==0?Yn.mod.isub(Ln):Yn.mod,gi=Ln.ushrn(1),_i=Ln.andln(1),Ai=mi.cmp(gi);return Ai<0||_i===1&&Ai===0?Yn.div:Yn.div.negative!==0?Yn.div.isubn(1):Yn.div.iaddn(1)},s.prototype.modrn=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(Ln<=67108863);for(var mi=(1<<26)%Ln,gi=0,_i=this.length-1;_i>=0;_i--)gi=(mi*gi+(this.words[_i]|0))%Ln;return Yn?-gi:gi},s.prototype.modn=function(Ln){return this.modrn(Ln)},s.prototype.idivn=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(Ln<=67108863);for(var mi=0,gi=this.length-1;gi>=0;gi--){var _i=(this.words[gi]|0)+mi*67108864;this.words[gi]=_i/Ln|0,mi=_i%Ln}return this._strip(),Yn?this.ineg():this},s.prototype.divn=function(Ln){return this.clone().idivn(Ln)},s.prototype.egcd=function(Ln){a(Ln.negative===0),a(!Ln.isZero());var Yn=this,mi=Ln.clone();Yn.negative!==0?Yn=Yn.umod(Ln):Yn=Yn.clone();for(var gi=new s(1),_i=new s(0),Ai=new s(0),xi=new s(1),Ri=0;Yn.isEven()&&mi.isEven();)Yn.iushrn(1),mi.iushrn(1),++Ri;for(var Wn=mi.clone(),wi=Yn.clone();!Yn.isZero();){for(var qi=0,Gi=1;(Yn.words[0]&Gi)===0&&qi<26;++qi,Gi<<=1);if(qi>0)for(Yn.iushrn(qi);qi-- >0;)(gi.isOdd()||_i.isOdd())&&(gi.iadd(Wn),_i.isub(wi)),gi.iushrn(1),_i.iushrn(1);for(var ji=0,Li=1;(mi.words[0]&Li)===0&&ji<26;++ji,Li<<=1);if(ji>0)for(mi.iushrn(ji);ji-- >0;)(Ai.isOdd()||xi.isOdd())&&(Ai.iadd(Wn),xi.isub(wi)),Ai.iushrn(1),xi.iushrn(1);Yn.cmp(mi)>=0?(Yn.isub(mi),gi.isub(Ai),_i.isub(xi)):(mi.isub(Yn),Ai.isub(gi),xi.isub(_i))}return{a:Ai,b:xi,gcd:mi.iushln(Ri)}},s.prototype._invmp=function(Ln){a(Ln.negative===0),a(!Ln.isZero());var Yn=this,mi=Ln.clone();Yn.negative!==0?Yn=Yn.umod(Ln):Yn=Yn.clone();for(var gi=new s(1),_i=new s(0),Ai=mi.clone();Yn.cmpn(1)>0&&mi.cmpn(1)>0;){for(var xi=0,Ri=1;(Yn.words[0]&Ri)===0&&xi<26;++xi,Ri<<=1);if(xi>0)for(Yn.iushrn(xi);xi-- >0;)gi.isOdd()&&gi.iadd(Ai),gi.iushrn(1);for(var Wn=0,wi=1;(mi.words[0]&wi)===0&&Wn<26;++Wn,wi<<=1);if(Wn>0)for(mi.iushrn(Wn);Wn-- >0;)_i.isOdd()&&_i.iadd(Ai),_i.iushrn(1);Yn.cmp(mi)>=0?(Yn.isub(mi),gi.isub(_i)):(mi.isub(Yn),_i.isub(gi))}var qi;return Yn.cmpn(1)===0?qi=gi:qi=_i,qi.cmpn(0)<0&&qi.iadd(Ln),qi},s.prototype.gcd=function(Ln){if(this.isZero())return Ln.abs();if(Ln.isZero())return this.abs();var Yn=this.clone(),mi=Ln.clone();Yn.negative=0,mi.negative=0;for(var gi=0;Yn.isEven()&&mi.isEven();gi++)Yn.iushrn(1),mi.iushrn(1);do{for(;Yn.isEven();)Yn.iushrn(1);for(;mi.isEven();)mi.iushrn(1);var _i=Yn.cmp(mi);if(_i<0){var Ai=Yn;Yn=mi,mi=Ai}else if(_i===0||mi.cmpn(1)===0)break;Yn.isub(mi)}while(!0);return mi.iushln(gi)},s.prototype.invm=function(Ln){return this.egcd(Ln).a.umod(Ln)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(Ln){return this.words[0]&Ln},s.prototype.bincn=function(Ln){a(typeof Ln=="number");var Yn=Ln%26,mi=(Ln-Yn)/26,gi=1<<Yn;if(this.length<=mi)return this._expand(mi+1),this.words[mi]|=gi,this;for(var _i=gi,Ai=mi;_i!==0&&Ai<this.length;Ai++){var xi=this.words[Ai]|0;xi+=_i,_i=xi>>>26,xi&=67108863,this.words[Ai]=xi}return _i!==0&&(this.words[Ai]=_i,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(Ln){var Yn=Ln<0;if(this.negative!==0&&!Yn)return-1;if(this.negative===0&&Yn)return 1;this._strip();var mi;if(this.length>1)mi=1;else{Yn&&(Ln=-Ln),a(Ln<=67108863,"Number is too big");var gi=this.words[0]|0;mi=gi===Ln?0:gi<Ln?-1:1}return this.negative!==0?-mi|0:mi},s.prototype.cmp=function(Ln){if(this.negative!==0&&Ln.negative===0)return-1;if(this.negative===0&&Ln.negative!==0)return 1;var Yn=this.ucmp(Ln);return this.negative!==0?-Yn|0:Yn},s.prototype.ucmp=function(Ln){if(this.length>Ln.length)return 1;if(this.length<Ln.length)return-1;for(var Yn=0,mi=this.length-1;mi>=0;mi--){var gi=this.words[mi]|0,_i=Ln.words[mi]|0;if(gi!==_i){gi<_i?Yn=-1:gi>_i&&(Yn=1);break}}return Yn},s.prototype.gtn=function(Ln){return this.cmpn(Ln)===1},s.prototype.gt=function(Ln){return this.cmp(Ln)===1},s.prototype.gten=function(Ln){return this.cmpn(Ln)>=0},s.prototype.gte=function(Ln){return this.cmp(Ln)>=0},s.prototype.ltn=function(Ln){return this.cmpn(Ln)===-1},s.prototype.lt=function(Ln){return this.cmp(Ln)===-1},s.prototype.lten=function(Ln){return this.cmpn(Ln)<=0},s.prototype.lte=function(Ln){return this.cmp(Ln)<=0},s.prototype.eqn=function(Ln){return this.cmpn(Ln)===0},s.prototype.eq=function(Ln){return this.cmp(Ln)===0},s.red=function(Ln){return new Ci(Ln)},s.prototype.toRed=function(Ln){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),Ln.convertTo(this)._forceRed(Ln)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(Ln){return this.red=Ln,this},s.prototype.forceRed=function(Ln){return a(!this.red,"Already a number in reduction context"),this._forceRed(Ln)},s.prototype.redAdd=function(Ln){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,Ln)},s.prototype.redIAdd=function(Ln){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Ln)},s.prototype.redSub=function(Ln){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,Ln)},s.prototype.redISub=function(Ln){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,Ln)},s.prototype.redShl=function(Ln){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,Ln)},s.prototype.redMul=function(Ln){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ln),this.red.mul(this,Ln)},s.prototype.redIMul=function(Ln){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ln),this.red.imul(this,Ln)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(Ln){return a(this.red&&!Ln.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Ln)};var Ii={k256:null,p224:null,p192:null,p25519:null};function Ni(vi,Ln){this.name=vi,this.p=new s(Ln,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Ni.prototype._tmp=function(){var Ln=new s(null);return Ln.words=new Array(Math.ceil(this.n/13)),Ln},Ni.prototype.ireduce=function(Ln){var Yn=Ln,mi;do this.split(Yn,this.tmp),Yn=this.imulK(Yn),Yn=Yn.iadd(this.tmp),mi=Yn.bitLength();while(mi>this.n);var gi=mi<this.n?-1:Yn.ucmp(this.p);return gi===0?(Yn.words[0]=0,Yn.length=1):gi>0?Yn.isub(this.p):Yn.strip!==void 0?Yn.strip():Yn._strip(),Yn},Ni.prototype.split=function(Ln,Yn){Ln.iushrn(this.n,0,Yn)},Ni.prototype.imulK=function(Ln){return Ln.imul(this.k)};function Oi(){Ni.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}u(Oi,Ni),Oi.prototype.split=function(Ln,Yn){for(var mi=4194303,gi=Math.min(Ln.length,9),_i=0;_i<gi;_i++)Yn.words[_i]=Ln.words[_i];if(Yn.length=gi,Ln.length<=9){Ln.words[0]=0,Ln.length=1;return}var Ai=Ln.words[9];for(Yn.words[Yn.length++]=Ai&mi,_i=10;_i<Ln.length;_i++){var xi=Ln.words[_i]|0;Ln.words[_i-10]=(xi&mi)<<4|Ai>>>22,Ai=xi}Ai>>>=22,Ln.words[_i-10]=Ai,Ai===0&&Ln.length>10?Ln.length-=10:Ln.length-=9},Oi.prototype.imulK=function(Ln){Ln.words[Ln.length]=0,Ln.words[Ln.length+1]=0,Ln.length+=2;for(var Yn=0,mi=0;mi<Ln.length;mi++){var gi=Ln.words[mi]|0;Yn+=gi*977,Ln.words[mi]=Yn&67108863,Yn=gi*64+(Yn/67108864|0)}return Ln.words[Ln.length-1]===0&&(Ln.length--,Ln.words[Ln.length-1]===0&&Ln.length--),Ln};function Fi(){Ni.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}u(Fi,Ni);function Mi(){Ni.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}u(Mi,Ni);function ki(){Ni.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}u(ki,Ni),ki.prototype.imulK=function(Ln){for(var Yn=0,mi=0;mi<Ln.length;mi++){var gi=(Ln.words[mi]|0)*19+Yn,_i=gi&67108863;gi>>>=26,Ln.words[mi]=_i,Yn=gi}return Yn!==0&&(Ln.words[Ln.length++]=Yn),Ln},s._prime=function(Ln){if(Ii[Ln])return Ii[Ln];var Yn;if(Ln==="k256")Yn=new Oi;else if(Ln==="p224")Yn=new Fi;else if(Ln==="p192")Yn=new Mi;else if(Ln==="p25519")Yn=new ki;else throw new Error("Unknown prime "+Ln);return Ii[Ln]=Yn,Yn};function Ci(vi){if(typeof vi=="string"){var Ln=s._prime(vi);this.m=Ln.p,this.prime=Ln}else a(vi.gtn(1),"modulus must be greater than 1"),this.m=vi,this.prime=null}Ci.prototype._verify1=function(Ln){a(Ln.negative===0,"red works only with positives"),a(Ln.red,"red works only with red numbers")},Ci.prototype._verify2=function(Ln,Yn){a((Ln.negative|Yn.negative)===0,"red works only with positives"),a(Ln.red&&Ln.red===Yn.red,"red works only with red numbers")},Ci.prototype.imod=function(Ln){return this.prime?this.prime.ireduce(Ln)._forceRed(this):(v(Ln,Ln.umod(this.m)._forceRed(this)),Ln)},Ci.prototype.neg=function(Ln){return Ln.isZero()?Ln.clone():this.m.sub(Ln)._forceRed(this)},Ci.prototype.add=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.add(Yn);return mi.cmp(this.m)>=0&&mi.isub(this.m),mi._forceRed(this)},Ci.prototype.iadd=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.iadd(Yn);return mi.cmp(this.m)>=0&&mi.isub(this.m),mi},Ci.prototype.sub=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.sub(Yn);return mi.cmpn(0)<0&&mi.iadd(this.m),mi._forceRed(this)},Ci.prototype.isub=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.isub(Yn);return mi.cmpn(0)<0&&mi.iadd(this.m),mi},Ci.prototype.shl=function(Ln,Yn){return this._verify1(Ln),this.imod(Ln.ushln(Yn))},Ci.prototype.imul=function(Ln,Yn){return this._verify2(Ln,Yn),this.imod(Ln.imul(Yn))},Ci.prototype.mul=function(Ln,Yn){return this._verify2(Ln,Yn),this.imod(Ln.mul(Yn))},Ci.prototype.isqr=function(Ln){return this.imul(Ln,Ln.clone())},Ci.prototype.sqr=function(Ln){return this.mul(Ln,Ln)},Ci.prototype.sqrt=function(Ln){if(Ln.isZero())return Ln.clone();var Yn=this.m.andln(3);if(a(Yn%2===1),Yn===3){var mi=this.m.add(new s(1)).iushrn(2);return this.pow(Ln,mi)}for(var gi=this.m.subn(1),_i=0;!gi.isZero()&&gi.andln(1)===0;)_i++,gi.iushrn(1);a(!gi.isZero());var Ai=new s(1).toRed(this),xi=Ai.redNeg(),Ri=this.m.subn(1).iushrn(1),Wn=this.m.bitLength();for(Wn=new s(2*Wn*Wn).toRed(this);this.pow(Wn,Ri).cmp(xi)!==0;)Wn.redIAdd(xi);for(var wi=this.pow(Wn,gi),qi=this.pow(Ln,gi.addn(1).iushrn(1)),Gi=this.pow(Ln,gi),ji=_i;Gi.cmp(Ai)!==0;){for(var Li=Gi,$i=0;Li.cmp(Ai)!==0;$i++)Li=Li.redSqr();a($i<ji);var zi=this.pow(wi,new s(1).iushln(ji-$i-1));qi=qi.redMul(zi),wi=zi.redSqr(),Gi=Gi.redMul(wi),ji=$i}return qi},Ci.prototype.invm=function(Ln){var Yn=Ln._invmp(this.m);return Yn.negative!==0?(Yn.negative=0,this.imod(Yn).redNeg()):this.imod(Yn)},Ci.prototype.pow=function(Ln,Yn){if(Yn.isZero())return new s(1).toRed(this);if(Yn.cmpn(1)===0)return Ln.clone();var mi=4,gi=new Array(1<<mi);gi[0]=new s(1).toRed(this),gi[1]=Ln;for(var _i=2;_i<gi.length;_i++)gi[_i]=this.mul(gi[_i-1],Ln);var Ai=gi[0],xi=0,Ri=0,Wn=Yn.bitLength()%26;for(Wn===0&&(Wn=26),_i=Yn.length-1;_i>=0;_i--){for(var wi=Yn.words[_i],qi=Wn-1;qi>=0;qi--){var Gi=wi>>qi&1;if(Ai!==gi[0]&&(Ai=this.sqr(Ai)),Gi===0&&xi===0){Ri=0;continue}xi<<=1,xi|=Gi,Ri++,!(Ri!==mi&&(_i!==0||qi!==0))&&(Ai=this.mul(Ai,gi[xi]),Ri=0,xi=0)}Wn=26}return Ai},Ci.prototype.convertTo=function(Ln){var Yn=Ln.umod(this.m);return Yn===Ln?Yn.clone():Yn},Ci.prototype.convertFrom=function(Ln){var Yn=Ln.clone();return Yn.red=null,Yn},s.mont=function(Ln){return new Ei(Ln)};function Ei(vi){Ci.call(this,vi),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}u(Ei,Ci),Ei.prototype.convertTo=function(Ln){return this.imod(Ln.ushln(this.shift))},Ei.prototype.convertFrom=function(Ln){var Yn=this.imod(Ln.mul(this.rinv));return Yn.red=null,Yn},Ei.prototype.imul=function(Ln,Yn){if(Ln.isZero()||Yn.isZero())return Ln.words[0]=0,Ln.length=1,Ln;var mi=Ln.imul(Yn),gi=mi.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_i=mi.isub(gi).iushrn(this.shift),Ai=_i;return _i.cmp(this.m)>=0?Ai=_i.isub(this.m):_i.cmpn(0)<0&&(Ai=_i.iadd(this.m)),Ai._forceRed(this)},Ei.prototype.mul=function(Ln,Yn){if(Ln.isZero()||Yn.isZero())return new s(0)._forceRed(this);var mi=Ln.mul(Yn),gi=mi.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_i=mi.isub(gi).iushrn(this.shift),Ai=_i;return _i.cmp(this.m)>=0?Ai=_i.isub(this.m):_i.cmpn(0)<0&&(Ai=_i.iadd(this.m)),Ai._forceRed(this)},Ei.prototype.invm=function(Ln){var Yn=this.imod(Ln._invmp(this.m).mul(this.r2));return Yn._forceRed(this)}})(r,bn$2)}(bn$3)),bn$3.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var r=requireBn$1(),n=requireBrowser$b(),i=requireSafeBuffer$1().Buffer;function a(l){var D=l.modulus.byteLength(),on;do on=new r(n(D));while(on.cmp(l.modulus)>=0||!on.umod(l.prime1)||!on.umod(l.prime2));return on}function u(l){var D=a(l),on=D.toRed(r.mont(l.modulus)).redPow(new r(l.publicExponent)).fromRed();return{blinder:on,unblinder:D.invm(l.modulus)}}function s(l,D){var on=u(D),h=D.modulus.byteLength(),v=new r(l).mul(on.blinder).umod(D.modulus),In=v.toRed(r.mont(D.prime1)),Rn=v.toRed(r.mont(D.prime2)),Mn=D.coefficient,jn=D.prime1,Hn=D.prime2,hi=In.redPow(D.exponent1).fromRed(),yi=Rn.redPow(D.exponent2).fromRed(),bi=hi.isub(yi).imul(Mn).umod(jn).imul(Hn);return yi.iadd(bi).imul(on.unblinder).umod(D.modulus).toArrayLike(i,"be",h)}return s.getr=a,browserifyRsa=s,browserifyRsa}var elliptic={};const version$1="6.6.1";var require$$0$1={version:version$1},utils$2={},utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,function(r){var n=r;function i(s,l){if(Array.isArray(s))return s.slice();if(!s)return[];var D=[];if(typeof s!="string"){for(var on=0;on<s.length;on++)D[on]=s[on]|0;return D}if(l==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var on=0;on<s.length;on+=2)D.push(parseInt(s[on]+s[on+1],16))}else for(var on=0;on<s.length;on++){var h=s.charCodeAt(on),v=h>>8,In=h&255;v?D.push(v,In):D.push(In)}return D}n.toArray=i;function a(s){return s.length===1?"0"+s:s}n.zero2=a;function u(s){for(var l="",D=0;D<s.length;D++)l+=a(s[D].toString(16));return l}n.toHex=u,n.encode=function(l,D){return D==="hex"?u(l):l}}(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,function(r){var n=r,i=requireBn$2(),a=requireMinimalisticAssert(),u=requireUtils$2();n.assert=a,n.toArray=u.toArray,n.zero2=u.zero2,n.toHex=u.toHex,n.encode=u.encode;function s(v,In,Rn){var Mn=new Array(Math.max(v.bitLength(),Rn)+1),jn;for(jn=0;jn<Mn.length;jn+=1)Mn[jn]=0;var Hn=1<<In+1,hi=v.clone();for(jn=0;jn<Mn.length;jn++){var yi,bi=hi.andln(Hn-1);hi.isOdd()?(bi>(Hn>>1)-1?yi=(Hn>>1)-bi:yi=bi,hi.isubn(yi)):yi=0,Mn[jn]=yi,hi.iushrn(1)}return Mn}n.getNAF=s;function l(v,In){var Rn=[[],[]];v=v.clone(),In=In.clone();for(var Mn=0,jn=0,Hn;v.cmpn(-Mn)>0||In.cmpn(-jn)>0;){var hi=v.andln(3)+Mn&3,yi=In.andln(3)+jn&3;hi===3&&(hi=-1),yi===3&&(yi=-1);var bi;(hi&1)===0?bi=0:(Hn=v.andln(7)+Mn&7,(Hn===3||Hn===5)&&yi===2?bi=-hi:bi=hi),Rn[0].push(bi);var Ti;(yi&1)===0?Ti=0:(Hn=In.andln(7)+jn&7,(Hn===3||Hn===5)&&hi===2?Ti=-yi:Ti=yi),Rn[1].push(Ti),2*Mn===bi+1&&(Mn=1-Mn),2*jn===Ti+1&&(jn=1-jn),v.iushrn(1),In.iushrn(1)}return Rn}n.getJSF=l;function D(v,In,Rn){var Mn="_"+In;v.prototype[In]=function(){return this[Mn]!==void 0?this[Mn]:this[Mn]=Rn.call(this)}}n.cachedProperty=D;function on(v){return typeof v=="string"?n.toArray(v,"hex"):v}n.parseBytes=on;function h(v){return new i(v,"hex","le")}n.intFromLE=h}(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var r=requireBn$2(),n=requireUtils$1(),i=n.getNAF,a=n.getJSF,u=n.assert;function s(D,on){this.type=D,this.p=new r(on.p,16),this.red=on.prime?r.red(on.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=on.n&&new r(on.n,16),this.g=on.g&&this.pointFromJSON(on.g,on.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 h=this.n&&this.p.div(this.n);!h||h.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(on,h){u(on.precomputed);var v=on._getDoubles(),In=i(h,1,this._bitLength),Rn=(1<<v.step+1)-(v.step%2===0?2:1);Rn/=3;var Mn=[],jn,Hn;for(jn=0;jn<In.length;jn+=v.step){Hn=0;for(var hi=jn+v.step-1;hi>=jn;hi--)Hn=(Hn<<1)+In[hi];Mn.push(Hn)}for(var yi=this.jpoint(null,null,null),bi=this.jpoint(null,null,null),Ti=Rn;Ti>0;Ti--){for(jn=0;jn<Mn.length;jn++)Hn=Mn[jn],Hn===Ti?bi=bi.mixedAdd(v.points[jn]):Hn===-Ti&&(bi=bi.mixedAdd(v.points[jn].neg()));yi=yi.add(bi)}return yi.toP()},s.prototype._wnafMul=function(on,h){var v=4,In=on._getNAFPoints(v);v=In.wnd;for(var Rn=In.points,Mn=i(h,v,this._bitLength),jn=this.jpoint(null,null,null),Hn=Mn.length-1;Hn>=0;Hn--){for(var hi=0;Hn>=0&&Mn[Hn]===0;Hn--)hi++;if(Hn>=0&&hi++,jn=jn.dblp(hi),Hn<0)break;var yi=Mn[Hn];u(yi!==0),on.type==="affine"?yi>0?jn=jn.mixedAdd(Rn[yi-1>>1]):jn=jn.mixedAdd(Rn[-yi-1>>1].neg()):yi>0?jn=jn.add(Rn[yi-1>>1]):jn=jn.add(Rn[-yi-1>>1].neg())}return on.type==="affine"?jn.toP():jn},s.prototype._wnafMulAdd=function(on,h,v,In,Rn){var Mn=this._wnafT1,jn=this._wnafT2,Hn=this._wnafT3,hi=0,yi,bi,Ti;for(yi=0;yi<In;yi++){Ti=h[yi];var Si=Ti._getNAFPoints(on);Mn[yi]=Si.wnd,jn[yi]=Si.points}for(yi=In-1;yi>=1;yi-=2){var Ii=yi-1,Ni=yi;if(Mn[Ii]!==1||Mn[Ni]!==1){Hn[Ii]=i(v[Ii],Mn[Ii],this._bitLength),Hn[Ni]=i(v[Ni],Mn[Ni],this._bitLength),hi=Math.max(Hn[Ii].length,hi),hi=Math.max(Hn[Ni].length,hi);continue}var Oi=[h[Ii],null,null,h[Ni]];h[Ii].y.cmp(h[Ni].y)===0?(Oi[1]=h[Ii].add(h[Ni]),Oi[2]=h[Ii].toJ().mixedAdd(h[Ni].neg())):h[Ii].y.cmp(h[Ni].y.redNeg())===0?(Oi[1]=h[Ii].toJ().mixedAdd(h[Ni]),Oi[2]=h[Ii].add(h[Ni].neg())):(Oi[1]=h[Ii].toJ().mixedAdd(h[Ni]),Oi[2]=h[Ii].toJ().mixedAdd(h[Ni].neg()));var Fi=[-3,-1,-5,-7,0,7,5,1,3],Mi=a(v[Ii],v[Ni]);for(hi=Math.max(Mi[0].length,hi),Hn[Ii]=new Array(hi),Hn[Ni]=new Array(hi),bi=0;bi<hi;bi++){var ki=Mi[0][bi]|0,Ci=Mi[1][bi]|0;Hn[Ii][bi]=Fi[(ki+1)*3+(Ci+1)],Hn[Ni][bi]=0,jn[Ii]=Oi}}var Ei=this.jpoint(null,null,null),vi=this._wnafT4;for(yi=hi;yi>=0;yi--){for(var Ln=0;yi>=0;){var Yn=!0;for(bi=0;bi<In;bi++)vi[bi]=Hn[bi][yi]|0,vi[bi]!==0&&(Yn=!1);if(!Yn)break;Ln++,yi--}if(yi>=0&&Ln++,Ei=Ei.dblp(Ln),yi<0)break;for(bi=0;bi<In;bi++){var mi=vi[bi];mi!==0&&(mi>0?Ti=jn[bi][mi-1>>1]:mi<0&&(Ti=jn[bi][-mi-1>>1].neg()),Ti.type==="affine"?Ei=Ei.mixedAdd(Ti):Ei=Ei.add(Ti))}}for(yi=0;yi<In;yi++)jn[yi]=null;return Rn?Ei:Ei.toP()};function l(D,on){this.curve=D,this.type=on,this.precomputed=null}return s.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(on,h){on=n.toArray(on,h);var v=this.p.byteLength();if((on[0]===4||on[0]===6||on[0]===7)&&on.length-1===2*v){on[0]===6?u(on[on.length-1]%2===0):on[0]===7&&u(on[on.length-1]%2===1);var In=this.point(on.slice(1,1+v),on.slice(1+v,1+2*v));return In}else if((on[0]===2||on[0]===3)&&on.length-1===v)return this.pointFromX(on.slice(1,1+v),on[0]===3);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(on){return this.encode(on,!0)},l.prototype._encode=function(on){var h=this.curve.p.byteLength(),v=this.getX().toArray("be",h);return on?[this.getY().isEven()?2:3].concat(v):[4].concat(v,this.getY().toArray("be",h))},l.prototype.encode=function(on,h){return n.encode(this._encode(h),on)},l.prototype.precompute=function(on){if(this.precomputed)return this;var h={doubles:null,naf:null,beta:null};return h.naf=this._getNAFPoints(8),h.doubles=this._getDoubles(4,on),h.beta=this._getBeta(),this.precomputed=h,this},l.prototype._hasDoubles=function(on){if(!this.precomputed)return!1;var h=this.precomputed.doubles;return h?h.points.length>=Math.ceil((on.bitLength()+1)/h.step):!1},l.prototype._getDoubles=function(on,h){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var v=[this],In=this,Rn=0;Rn<h;Rn+=on){for(var Mn=0;Mn<on;Mn++)In=In.dbl();v.push(In)}return{step:on,points:v}},l.prototype._getNAFPoints=function(on){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var h=[this],v=(1<<on)-1,In=v===1?null:this.dbl(),Rn=1;Rn<v;Rn++)h[Rn]=h[Rn-1].add(In);return{wnd:on,points:h}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(on){for(var h=this,v=0;v<on;v++)h=h.dbl();return h},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var r=requireUtils$1(),n=requireBn$2(),i=requireInherits_browser(),a=requireBase$1(),u=r.assert;function s(on){a.call(this,"short",on),this.a=new n(on.a,16).toRed(this.red),this.b=new n(on.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(on),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}i(s,a),short=s,s.prototype._getEndomorphism=function(h){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var v,In;if(h.beta)v=new n(h.beta,16).toRed(this.red);else{var Rn=this._getEndoRoots(this.p);v=Rn[0].cmp(Rn[1])<0?Rn[0]:Rn[1],v=v.toRed(this.red)}if(h.lambda)In=new n(h.lambda,16);else{var Mn=this._getEndoRoots(this.n);this.g.mul(Mn[0]).x.cmp(this.g.x.redMul(v))===0?In=Mn[0]:(In=Mn[1],u(this.g.mul(In).x.cmp(this.g.x.redMul(v))===0))}var jn;return h.basis?jn=h.basis.map(function(Hn){return{a:new n(Hn.a,16),b:new n(Hn.b,16)}}):jn=this._getEndoBasis(In),{beta:v,lambda:In,basis:jn}}},s.prototype._getEndoRoots=function(h){var v=h===this.p?this.red:n.mont(h),In=new n(2).toRed(v).redInvm(),Rn=In.redNeg(),Mn=new n(3).toRed(v).redNeg().redSqrt().redMul(In),jn=Rn.redAdd(Mn).fromRed(),Hn=Rn.redSub(Mn).fromRed();return[jn,Hn]},s.prototype._getEndoBasis=function(h){for(var v=this.n.ushrn(Math.floor(this.n.bitLength()/2)),In=h,Rn=this.n.clone(),Mn=new n(1),jn=new n(0),Hn=new n(0),hi=new n(1),yi,bi,Ti,Si,Ii,Ni,Oi,Fi=0,Mi,ki;In.cmpn(0)!==0;){var Ci=Rn.div(In);Mi=Rn.sub(Ci.mul(In)),ki=Hn.sub(Ci.mul(Mn));var Ei=hi.sub(Ci.mul(jn));if(!Ti&&Mi.cmp(v)<0)yi=Oi.neg(),bi=Mn,Ti=Mi.neg(),Si=ki;else if(Ti&&++Fi===2)break;Oi=Mi,Rn=In,In=Mi,Hn=Mn,Mn=ki,hi=jn,jn=Ei}Ii=Mi.neg(),Ni=ki;var vi=Ti.sqr().add(Si.sqr()),Ln=Ii.sqr().add(Ni.sqr());return Ln.cmp(vi)>=0&&(Ii=yi,Ni=bi),Ti.negative&&(Ti=Ti.neg(),Si=Si.neg()),Ii.negative&&(Ii=Ii.neg(),Ni=Ni.neg()),[{a:Ti,b:Si},{a:Ii,b:Ni}]},s.prototype._endoSplit=function(h){var v=this.endo.basis,In=v[0],Rn=v[1],Mn=Rn.b.mul(h).divRound(this.n),jn=In.b.neg().mul(h).divRound(this.n),Hn=Mn.mul(In.a),hi=jn.mul(Rn.a),yi=Mn.mul(In.b),bi=jn.mul(Rn.b),Ti=h.sub(Hn).sub(hi),Si=yi.add(bi).neg();return{k1:Ti,k2:Si}},s.prototype.pointFromX=function(h,v){h=new n(h,16),h.red||(h=h.toRed(this.red));var In=h.redSqr().redMul(h).redIAdd(h.redMul(this.a)).redIAdd(this.b),Rn=In.redSqrt();if(Rn.redSqr().redSub(In).cmp(this.zero)!==0)throw new Error("invalid point");var Mn=Rn.fromRed().isOdd();return(v&&!Mn||!v&&Mn)&&(Rn=Rn.redNeg()),this.point(h,Rn)},s.prototype.validate=function(h){if(h.inf)return!0;var v=h.x,In=h.y,Rn=this.a.redMul(v),Mn=v.redSqr().redMul(v).redIAdd(Rn).redIAdd(this.b);return In.redSqr().redISub(Mn).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(h,v,In){for(var Rn=this._endoWnafT1,Mn=this._endoWnafT2,jn=0;jn<h.length;jn++){var Hn=this._endoSplit(v[jn]),hi=h[jn],yi=hi._getBeta();Hn.k1.negative&&(Hn.k1.ineg(),hi=hi.neg(!0)),Hn.k2.negative&&(Hn.k2.ineg(),yi=yi.neg(!0)),Rn[jn*2]=hi,Rn[jn*2+1]=yi,Mn[jn*2]=Hn.k1,Mn[jn*2+1]=Hn.k2}for(var bi=this._wnafMulAdd(1,Rn,Mn,jn*2,In),Ti=0;Ti<jn*2;Ti++)Rn[Ti]=null,Mn[Ti]=null;return bi};function l(on,h,v,In){a.BasePoint.call(this,on,"affine"),h===null&&v===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(h,16),this.y=new n(v,16),In&&(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)}i(l,a.BasePoint),s.prototype.point=function(h,v,In){return new l(this,h,v,In)},s.prototype.pointFromJSON=function(h,v){return l.fromJSON(this,h,v)},l.prototype._getBeta=function(){if(this.curve.endo){var h=this.precomputed;if(h&&h.beta)return h.beta;var v=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(h){var In=this.curve,Rn=function(Mn){return In.point(Mn.x.redMul(In.endo.beta),Mn.y)};h.beta=v,v.precomputed={beta:null,naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(Rn)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(Rn)}}}return v}},l.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]},l.fromJSON=function(h,v,In){typeof v=="string"&&(v=JSON.parse(v));var Rn=h.point(v[0],v[1],In);if(!v[2])return Rn;function Mn(Hn){return h.point(Hn[0],Hn[1],In)}var jn=v[2];return Rn.precomputed={beta:null,doubles:jn.doubles&&{step:jn.doubles.step,points:[Rn].concat(jn.doubles.points.map(Mn))},naf:jn.naf&&{wnd:jn.naf.wnd,points:[Rn].concat(jn.naf.points.map(Mn))}},Rn},l.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)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(h){if(this.inf)return h;if(h.inf)return this;if(this.eq(h))return this.dbl();if(this.neg().eq(h))return this.curve.point(null,null);if(this.x.cmp(h.x)===0)return this.curve.point(null,null);var v=this.y.redSub(h.y);v.cmpn(0)!==0&&(v=v.redMul(this.x.redSub(h.x).redInvm()));var In=v.redSqr().redISub(this.x).redISub(h.x),Rn=v.redMul(this.x.redSub(In)).redISub(this.y);return this.curve.point(In,Rn)},l.prototype.dbl=function(){if(this.inf)return this;var h=this.y.redAdd(this.y);if(h.cmpn(0)===0)return this.curve.point(null,null);var v=this.curve.a,In=this.x.redSqr(),Rn=h.redInvm(),Mn=In.redAdd(In).redIAdd(In).redIAdd(v).redMul(Rn),jn=Mn.redSqr().redISub(this.x.redAdd(this.x)),Hn=Mn.redMul(this.x.redSub(jn)).redISub(this.y);return this.curve.point(jn,Hn)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(h){return h=new n(h,16),this.isInfinity()?this:this._hasDoubles(h)?this.curve._fixedNafMul(this,h):this.curve.endo?this.curve._endoWnafMulAdd([this],[h]):this.curve._wnafMul(this,h)},l.prototype.mulAdd=function(h,v,In){var Rn=[this,v],Mn=[h,In];return this.curve.endo?this.curve._endoWnafMulAdd(Rn,Mn):this.curve._wnafMulAdd(1,Rn,Mn,2)},l.prototype.jmulAdd=function(h,v,In){var Rn=[this,v],Mn=[h,In];return this.curve.endo?this.curve._endoWnafMulAdd(Rn,Mn,!0):this.curve._wnafMulAdd(1,Rn,Mn,2,!0)},l.prototype.eq=function(h){return this===h||this.inf===h.inf&&(this.inf||this.x.cmp(h.x)===0&&this.y.cmp(h.y)===0)},l.prototype.neg=function(h){if(this.inf)return this;var v=this.curve.point(this.x,this.y.redNeg());if(h&&this.precomputed){var In=this.precomputed,Rn=function(Mn){return Mn.neg()};v.precomputed={naf:In.naf&&{wnd:In.naf.wnd,points:In.naf.points.map(Rn)},doubles:In.doubles&&{step:In.doubles.step,points:In.doubles.points.map(Rn)}}}return v},l.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var h=this.curve.jpoint(this.x,this.y,this.curve.one);return h};function D(on,h,v,In){a.BasePoint.call(this,on,"jacobian"),h===null&&v===null&&In===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(h,16),this.y=new n(v,16),this.z=new n(In,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}return i(D,a.BasePoint),s.prototype.jpoint=function(h,v,In){return new D(this,h,v,In)},D.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var h=this.z.redInvm(),v=h.redSqr(),In=this.x.redMul(v),Rn=this.y.redMul(v).redMul(h);return this.curve.point(In,Rn)},D.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},D.prototype.add=function(h){if(this.isInfinity())return h;if(h.isInfinity())return this;var v=h.z.redSqr(),In=this.z.redSqr(),Rn=this.x.redMul(v),Mn=h.x.redMul(In),jn=this.y.redMul(v.redMul(h.z)),Hn=h.y.redMul(In.redMul(this.z)),hi=Rn.redSub(Mn),yi=jn.redSub(Hn);if(hi.cmpn(0)===0)return yi.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var bi=hi.redSqr(),Ti=bi.redMul(hi),Si=Rn.redMul(bi),Ii=yi.redSqr().redIAdd(Ti).redISub(Si).redISub(Si),Ni=yi.redMul(Si.redISub(Ii)).redISub(jn.redMul(Ti)),Oi=this.z.redMul(h.z).redMul(hi);return this.curve.jpoint(Ii,Ni,Oi)},D.prototype.mixedAdd=function(h){if(this.isInfinity())return h.toJ();if(h.isInfinity())return this;var v=this.z.redSqr(),In=this.x,Rn=h.x.redMul(v),Mn=this.y,jn=h.y.redMul(v).redMul(this.z),Hn=In.redSub(Rn),hi=Mn.redSub(jn);if(Hn.cmpn(0)===0)return hi.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var yi=Hn.redSqr(),bi=yi.redMul(Hn),Ti=In.redMul(yi),Si=hi.redSqr().redIAdd(bi).redISub(Ti).redISub(Ti),Ii=hi.redMul(Ti.redISub(Si)).redISub(Mn.redMul(bi)),Ni=this.z.redMul(Hn);return this.curve.jpoint(Si,Ii,Ni)},D.prototype.dblp=function(h){if(h===0)return this;if(this.isInfinity())return this;if(!h)return this.dbl();var v;if(this.curve.zeroA||this.curve.threeA){var In=this;for(v=0;v<h;v++)In=In.dbl();return In}var Rn=this.curve.a,Mn=this.curve.tinv,jn=this.x,Hn=this.y,hi=this.z,yi=hi.redSqr().redSqr(),bi=Hn.redAdd(Hn);for(v=0;v<h;v++){var Ti=jn.redSqr(),Si=bi.redSqr(),Ii=Si.redSqr(),Ni=Ti.redAdd(Ti).redIAdd(Ti).redIAdd(Rn.redMul(yi)),Oi=jn.redMul(Si),Fi=Ni.redSqr().redISub(Oi.redAdd(Oi)),Mi=Oi.redISub(Fi),ki=Ni.redMul(Mi);ki=ki.redIAdd(ki).redISub(Ii);var Ci=bi.redMul(hi);v+1<h&&(yi=yi.redMul(Ii)),jn=Fi,hi=Ci,bi=ki}return this.curve.jpoint(jn,bi.redMul(Mn),hi)},D.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},D.prototype._zeroDbl=function(){var h,v,In;if(this.zOne){var Rn=this.x.redSqr(),Mn=this.y.redSqr(),jn=Mn.redSqr(),Hn=this.x.redAdd(Mn).redSqr().redISub(Rn).redISub(jn);Hn=Hn.redIAdd(Hn);var hi=Rn.redAdd(Rn).redIAdd(Rn),yi=hi.redSqr().redISub(Hn).redISub(Hn),bi=jn.redIAdd(jn);bi=bi.redIAdd(bi),bi=bi.redIAdd(bi),h=yi,v=hi.redMul(Hn.redISub(yi)).redISub(bi),In=this.y.redAdd(this.y)}else{var Ti=this.x.redSqr(),Si=this.y.redSqr(),Ii=Si.redSqr(),Ni=this.x.redAdd(Si).redSqr().redISub(Ti).redISub(Ii);Ni=Ni.redIAdd(Ni);var Oi=Ti.redAdd(Ti).redIAdd(Ti),Fi=Oi.redSqr(),Mi=Ii.redIAdd(Ii);Mi=Mi.redIAdd(Mi),Mi=Mi.redIAdd(Mi),h=Fi.redISub(Ni).redISub(Ni),v=Oi.redMul(Ni.redISub(h)).redISub(Mi),In=this.y.redMul(this.z),In=In.redIAdd(In)}return this.curve.jpoint(h,v,In)},D.prototype._threeDbl=function(){var h,v,In;if(this.zOne){var Rn=this.x.redSqr(),Mn=this.y.redSqr(),jn=Mn.redSqr(),Hn=this.x.redAdd(Mn).redSqr().redISub(Rn).redISub(jn);Hn=Hn.redIAdd(Hn);var hi=Rn.redAdd(Rn).redIAdd(Rn).redIAdd(this.curve.a),yi=hi.redSqr().redISub(Hn).redISub(Hn);h=yi;var bi=jn.redIAdd(jn);bi=bi.redIAdd(bi),bi=bi.redIAdd(bi),v=hi.redMul(Hn.redISub(yi)).redISub(bi),In=this.y.redAdd(this.y)}else{var Ti=this.z.redSqr(),Si=this.y.redSqr(),Ii=this.x.redMul(Si),Ni=this.x.redSub(Ti).redMul(this.x.redAdd(Ti));Ni=Ni.redAdd(Ni).redIAdd(Ni);var Oi=Ii.redIAdd(Ii);Oi=Oi.redIAdd(Oi);var Fi=Oi.redAdd(Oi);h=Ni.redSqr().redISub(Fi),In=this.y.redAdd(this.z).redSqr().redISub(Si).redISub(Ti);var Mi=Si.redSqr();Mi=Mi.redIAdd(Mi),Mi=Mi.redIAdd(Mi),Mi=Mi.redIAdd(Mi),v=Ni.redMul(Oi.redISub(h)).redISub(Mi)}return this.curve.jpoint(h,v,In)},D.prototype._dbl=function(){var h=this.curve.a,v=this.x,In=this.y,Rn=this.z,Mn=Rn.redSqr().redSqr(),jn=v.redSqr(),Hn=In.redSqr(),hi=jn.redAdd(jn).redIAdd(jn).redIAdd(h.redMul(Mn)),yi=v.redAdd(v);yi=yi.redIAdd(yi);var bi=yi.redMul(Hn),Ti=hi.redSqr().redISub(bi.redAdd(bi)),Si=bi.redISub(Ti),Ii=Hn.redSqr();Ii=Ii.redIAdd(Ii),Ii=Ii.redIAdd(Ii),Ii=Ii.redIAdd(Ii);var Ni=hi.redMul(Si).redISub(Ii),Oi=In.redAdd(In).redMul(Rn);return this.curve.jpoint(Ti,Ni,Oi)},D.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var h=this.x.redSqr(),v=this.y.redSqr(),In=this.z.redSqr(),Rn=v.redSqr(),Mn=h.redAdd(h).redIAdd(h),jn=Mn.redSqr(),Hn=this.x.redAdd(v).redSqr().redISub(h).redISub(Rn);Hn=Hn.redIAdd(Hn),Hn=Hn.redAdd(Hn).redIAdd(Hn),Hn=Hn.redISub(jn);var hi=Hn.redSqr(),yi=Rn.redIAdd(Rn);yi=yi.redIAdd(yi),yi=yi.redIAdd(yi),yi=yi.redIAdd(yi);var bi=Mn.redIAdd(Hn).redSqr().redISub(jn).redISub(hi).redISub(yi),Ti=v.redMul(bi);Ti=Ti.redIAdd(Ti),Ti=Ti.redIAdd(Ti);var Si=this.x.redMul(hi).redISub(Ti);Si=Si.redIAdd(Si),Si=Si.redIAdd(Si);var Ii=this.y.redMul(bi.redMul(yi.redISub(bi)).redISub(Hn.redMul(hi)));Ii=Ii.redIAdd(Ii),Ii=Ii.redIAdd(Ii),Ii=Ii.redIAdd(Ii);var Ni=this.z.redAdd(Hn).redSqr().redISub(In).redISub(hi);return this.curve.jpoint(Si,Ii,Ni)},D.prototype.mul=function(h,v){return h=new n(h,v),this.curve._wnafMul(this,h)},D.prototype.eq=function(h){if(h.type==="affine")return this.eq(h.toJ());if(this===h)return!0;var v=this.z.redSqr(),In=h.z.redSqr();if(this.x.redMul(In).redISub(h.x.redMul(v)).cmpn(0)!==0)return!1;var Rn=v.redMul(this.z),Mn=In.redMul(h.z);return this.y.redMul(Mn).redISub(h.y.redMul(Rn)).cmpn(0)===0},D.prototype.eqXToP=function(h){var v=this.z.redSqr(),In=h.toRed(this.curve.red).redMul(v);if(this.x.cmp(In)===0)return!0;for(var Rn=h.clone(),Mn=this.curve.redN.redMul(v);;){if(Rn.iadd(this.curve.n),Rn.cmp(this.curve.p)>=0)return!1;if(In.redIAdd(Mn),this.x.cmp(In)===0)return!0}},D.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)+">"},D.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var r=requireBn$2(),n=requireInherits_browser(),i=requireBase$1(),a=requireUtils$1();function u(l){i.call(this,"mont",l),this.a=new r(l.a,16).toRed(this.red),this.b=new r(l.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}n(u,i),mont=u,u.prototype.validate=function(D){var on=D.normalize().x,h=on.redSqr(),v=h.redMul(on).redAdd(h.redMul(this.a)).redAdd(on),In=v.redSqrt();return In.redSqr().cmp(v)===0};function s(l,D,on){i.BasePoint.call(this,l,"projective"),D===null&&on===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(D,16),this.z=new r(on,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return n(s,i.BasePoint),u.prototype.decodePoint=function(D,on){return this.point(a.toArray(D,on),1)},u.prototype.point=function(D,on){return new s(this,D,on)},u.prototype.pointFromJSON=function(D){return s.fromJSON(this,D)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(D,on){return new s(D,on[0],on[1]||D.one)},s.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)+">"},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var D=this.x.redAdd(this.z),on=D.redSqr(),h=this.x.redSub(this.z),v=h.redSqr(),In=on.redSub(v),Rn=on.redMul(v),Mn=In.redMul(v.redAdd(this.curve.a24.redMul(In)));return this.curve.point(Rn,Mn)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(D,on){var h=this.x.redAdd(this.z),v=this.x.redSub(this.z),In=D.x.redAdd(D.z),Rn=D.x.redSub(D.z),Mn=Rn.redMul(h),jn=In.redMul(v),Hn=on.z.redMul(Mn.redAdd(jn).redSqr()),hi=on.x.redMul(Mn.redISub(jn).redSqr());return this.curve.point(Hn,hi)},s.prototype.mul=function(D){for(var on=D.clone(),h=this,v=this.curve.point(null,null),In=this,Rn=[];on.cmpn(0)!==0;on.iushrn(1))Rn.push(on.andln(1));for(var Mn=Rn.length-1;Mn>=0;Mn--)Rn[Mn]===0?(h=h.diffAdd(v,In),v=v.dbl()):(v=h.diffAdd(v,In),h=h.dbl());return v},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(D){return this.getX().cmp(D.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var r=requireUtils$1(),n=requireBn$2(),i=requireInherits_browser(),a=requireBase$1(),u=r.assert;function s(D){this.twisted=(D.a|0)!==1,this.mOneA=this.twisted&&(D.a|0)===-1,this.extended=this.mOneA,a.call(this,"edwards",D),this.a=new n(D.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(D.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(D.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(D.c|0)===1}i(s,a),edwards=s,s.prototype._mulA=function(on){return this.mOneA?on.redNeg():this.a.redMul(on)},s.prototype._mulC=function(on){return this.oneC?on:this.c.redMul(on)},s.prototype.jpoint=function(on,h,v,In){return this.point(on,h,v,In)},s.prototype.pointFromX=function(on,h){on=new n(on,16),on.red||(on=on.toRed(this.red));var v=on.redSqr(),In=this.c2.redSub(this.a.redMul(v)),Rn=this.one.redSub(this.c2.redMul(this.d).redMul(v)),Mn=In.redMul(Rn.redInvm()),jn=Mn.redSqrt();if(jn.redSqr().redSub(Mn).cmp(this.zero)!==0)throw new Error("invalid point");var Hn=jn.fromRed().isOdd();return(h&&!Hn||!h&&Hn)&&(jn=jn.redNeg()),this.point(on,jn)},s.prototype.pointFromY=function(on,h){on=new n(on,16),on.red||(on=on.toRed(this.red));var v=on.redSqr(),In=v.redSub(this.c2),Rn=v.redMul(this.d).redMul(this.c2).redSub(this.a),Mn=In.redMul(Rn.redInvm());if(Mn.cmp(this.zero)===0){if(h)throw new Error("invalid point");return this.point(this.zero,on)}var jn=Mn.redSqrt();if(jn.redSqr().redSub(Mn).cmp(this.zero)!==0)throw new Error("invalid point");return jn.fromRed().isOdd()!==h&&(jn=jn.redNeg()),this.point(jn,on)},s.prototype.validate=function(on){if(on.isInfinity())return!0;on.normalize();var h=on.x.redSqr(),v=on.y.redSqr(),In=h.redMul(this.a).redAdd(v),Rn=this.c2.redMul(this.one.redAdd(this.d.redMul(h).redMul(v)));return In.cmp(Rn)===0};function l(D,on,h,v,In){a.BasePoint.call(this,D,"projective"),on===null&&h===null&&v===null?(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 n(on,16),this.y=new n(h,16),this.z=v?new n(v,16):this.curve.one,this.t=In&&new n(In,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()))))}return i(l,a.BasePoint),s.prototype.pointFromJSON=function(on){return l.fromJSON(this,on)},s.prototype.point=function(on,h,v,In){return new l(this,on,h,v,In)},l.fromJSON=function(on,h){return new l(on,h[0],h[1],h[2])},l.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)+">"},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},l.prototype._extDbl=function(){var on=this.x.redSqr(),h=this.y.redSqr(),v=this.z.redSqr();v=v.redIAdd(v);var In=this.curve._mulA(on),Rn=this.x.redAdd(this.y).redSqr().redISub(on).redISub(h),Mn=In.redAdd(h),jn=Mn.redSub(v),Hn=In.redSub(h),hi=Rn.redMul(jn),yi=Mn.redMul(Hn),bi=Rn.redMul(Hn),Ti=jn.redMul(Mn);return this.curve.point(hi,yi,Ti,bi)},l.prototype._projDbl=function(){var on=this.x.redAdd(this.y).redSqr(),h=this.x.redSqr(),v=this.y.redSqr(),In,Rn,Mn,jn,Hn,hi;if(this.curve.twisted){jn=this.curve._mulA(h);var yi=jn.redAdd(v);this.zOne?(In=on.redSub(h).redSub(v).redMul(yi.redSub(this.curve.two)),Rn=yi.redMul(jn.redSub(v)),Mn=yi.redSqr().redSub(yi).redSub(yi)):(Hn=this.z.redSqr(),hi=yi.redSub(Hn).redISub(Hn),In=on.redSub(h).redISub(v).redMul(hi),Rn=yi.redMul(jn.redSub(v)),Mn=yi.redMul(hi))}else jn=h.redAdd(v),Hn=this.curve._mulC(this.z).redSqr(),hi=jn.redSub(Hn).redSub(Hn),In=this.curve._mulC(on.redISub(jn)).redMul(hi),Rn=this.curve._mulC(jn).redMul(h.redISub(v)),Mn=jn.redMul(hi);return this.curve.point(In,Rn,Mn)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(on){var h=this.y.redSub(this.x).redMul(on.y.redSub(on.x)),v=this.y.redAdd(this.x).redMul(on.y.redAdd(on.x)),In=this.t.redMul(this.curve.dd).redMul(on.t),Rn=this.z.redMul(on.z.redAdd(on.z)),Mn=v.redSub(h),jn=Rn.redSub(In),Hn=Rn.redAdd(In),hi=v.redAdd(h),yi=Mn.redMul(jn),bi=Hn.redMul(hi),Ti=Mn.redMul(hi),Si=jn.redMul(Hn);return this.curve.point(yi,bi,Si,Ti)},l.prototype._projAdd=function(on){var h=this.z.redMul(on.z),v=h.redSqr(),In=this.x.redMul(on.x),Rn=this.y.redMul(on.y),Mn=this.curve.d.redMul(In).redMul(Rn),jn=v.redSub(Mn),Hn=v.redAdd(Mn),hi=this.x.redAdd(this.y).redMul(on.x.redAdd(on.y)).redISub(In).redISub(Rn),yi=h.redMul(jn).redMul(hi),bi,Ti;return this.curve.twisted?(bi=h.redMul(Hn).redMul(Rn.redSub(this.curve._mulA(In))),Ti=jn.redMul(Hn)):(bi=h.redMul(Hn).redMul(Rn.redSub(In)),Ti=this.curve._mulC(jn).redMul(Hn)),this.curve.point(yi,bi,Ti)},l.prototype.add=function(on){return this.isInfinity()?on:on.isInfinity()?this:this.curve.extended?this._extAdd(on):this._projAdd(on)},l.prototype.mul=function(on){return this._hasDoubles(on)?this.curve._fixedNafMul(this,on):this.curve._wnafMul(this,on)},l.prototype.mulAdd=function(on,h,v){return this.curve._wnafMulAdd(1,[this,h],[on,v],2,!1)},l.prototype.jmulAdd=function(on,h,v){return this.curve._wnafMulAdd(1,[this,h],[on,v],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var on=this.z.redInvm();return this.x=this.x.redMul(on),this.y=this.y.redMul(on),this.t&&(this.t=this.t.redMul(on)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(on){return this===on||this.getX().cmp(on.getX())===0&&this.getY().cmp(on.getY())===0},l.prototype.eqXToP=function(on){var h=on.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(h)===0)return!0;for(var v=on.clone(),In=this.curve.redN.redMul(this.z);;){if(v.iadd(this.curve.n),v.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(In),this.x.cmp(h)===0)return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,function(r){var n=r;n.base=requireBase$1(),n.short=requireShort(),n.mont=requireMont(),n.edwards=requireEdwards()}(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var r=requireMinimalisticAssert(),n=requireInherits_browser();utils.inherits=n;function i(Ei,vi){return(Ei.charCodeAt(vi)&64512)!==55296||vi<0||vi+1>=Ei.length?!1:(Ei.charCodeAt(vi+1)&64512)===56320}function a(Ei,vi){if(Array.isArray(Ei))return Ei.slice();if(!Ei)return[];var Ln=[];if(typeof Ei=="string")if(vi){if(vi==="hex")for(Ei=Ei.replace(/[^a-z0-9]+/ig,""),Ei.length%2!==0&&(Ei="0"+Ei),mi=0;mi<Ei.length;mi+=2)Ln.push(parseInt(Ei[mi]+Ei[mi+1],16))}else for(var Yn=0,mi=0;mi<Ei.length;mi++){var gi=Ei.charCodeAt(mi);gi<128?Ln[Yn++]=gi:gi<2048?(Ln[Yn++]=gi>>6|192,Ln[Yn++]=gi&63|128):i(Ei,mi)?(gi=65536+((gi&1023)<<10)+(Ei.charCodeAt(++mi)&1023),Ln[Yn++]=gi>>18|240,Ln[Yn++]=gi>>12&63|128,Ln[Yn++]=gi>>6&63|128,Ln[Yn++]=gi&63|128):(Ln[Yn++]=gi>>12|224,Ln[Yn++]=gi>>6&63|128,Ln[Yn++]=gi&63|128)}else for(mi=0;mi<Ei.length;mi++)Ln[mi]=Ei[mi]|0;return Ln}utils.toArray=a;function u(Ei){for(var vi="",Ln=0;Ln<Ei.length;Ln++)vi+=D(Ei[Ln].toString(16));return vi}utils.toHex=u;function s(Ei){var vi=Ei>>>24|Ei>>>8&65280|Ei<<8&16711680|(Ei&255)<<24;return vi>>>0}utils.htonl=s;function l(Ei,vi){for(var Ln="",Yn=0;Yn<Ei.length;Yn++){var mi=Ei[Yn];vi==="little"&&(mi=s(mi)),Ln+=on(mi.toString(16))}return Ln}utils.toHex32=l;function D(Ei){return Ei.length===1?"0"+Ei:Ei}utils.zero2=D;function on(Ei){return Ei.length===7?"0"+Ei:Ei.length===6?"00"+Ei:Ei.length===5?"000"+Ei:Ei.length===4?"0000"+Ei:Ei.length===3?"00000"+Ei:Ei.length===2?"000000"+Ei:Ei.length===1?"0000000"+Ei:Ei}utils.zero8=on;function h(Ei,vi,Ln,Yn){var mi=Ln-vi;r(mi%4===0);for(var gi=new Array(mi/4),_i=0,Ai=vi;_i<gi.length;_i++,Ai+=4){var xi;Yn==="big"?xi=Ei[Ai]<<24|Ei[Ai+1]<<16|Ei[Ai+2]<<8|Ei[Ai+3]:xi=Ei[Ai+3]<<24|Ei[Ai+2]<<16|Ei[Ai+1]<<8|Ei[Ai],gi[_i]=xi>>>0}return gi}utils.join32=h;function v(Ei,vi){for(var Ln=new Array(Ei.length*4),Yn=0,mi=0;Yn<Ei.length;Yn++,mi+=4){var gi=Ei[Yn];vi==="big"?(Ln[mi]=gi>>>24,Ln[mi+1]=gi>>>16&255,Ln[mi+2]=gi>>>8&255,Ln[mi+3]=gi&255):(Ln[mi+3]=gi>>>24,Ln[mi+2]=gi>>>16&255,Ln[mi+1]=gi>>>8&255,Ln[mi]=gi&255)}return Ln}utils.split32=v;function In(Ei,vi){return Ei>>>vi|Ei<<32-vi}utils.rotr32=In;function Rn(Ei,vi){return Ei<<vi|Ei>>>32-vi}utils.rotl32=Rn;function Mn(Ei,vi){return Ei+vi>>>0}utils.sum32=Mn;function jn(Ei,vi,Ln){return Ei+vi+Ln>>>0}utils.sum32_3=jn;function Hn(Ei,vi,Ln,Yn){return Ei+vi+Ln+Yn>>>0}utils.sum32_4=Hn;function hi(Ei,vi,Ln,Yn,mi){return Ei+vi+Ln+Yn+mi>>>0}utils.sum32_5=hi;function yi(Ei,vi,Ln,Yn){var mi=Ei[vi],gi=Ei[vi+1],_i=Yn+gi>>>0,Ai=(_i<Yn?1:0)+Ln+mi;Ei[vi]=Ai>>>0,Ei[vi+1]=_i}utils.sum64=yi;function bi(Ei,vi,Ln,Yn){var mi=vi+Yn>>>0,gi=(mi<vi?1:0)+Ei+Ln;return gi>>>0}utils.sum64_hi=bi;function Ti(Ei,vi,Ln,Yn){var mi=vi+Yn;return mi>>>0}utils.sum64_lo=Ti;function Si(Ei,vi,Ln,Yn,mi,gi,_i,Ai){var xi=0,Ri=vi;Ri=Ri+Yn>>>0,xi+=Ri<vi?1:0,Ri=Ri+gi>>>0,xi+=Ri<gi?1:0,Ri=Ri+Ai>>>0,xi+=Ri<Ai?1:0;var Wn=Ei+Ln+mi+_i+xi;return Wn>>>0}utils.sum64_4_hi=Si;function Ii(Ei,vi,Ln,Yn,mi,gi,_i,Ai){var xi=vi+Yn+gi+Ai;return xi>>>0}utils.sum64_4_lo=Ii;function Ni(Ei,vi,Ln,Yn,mi,gi,_i,Ai,xi,Ri){var Wn=0,wi=vi;wi=wi+Yn>>>0,Wn+=wi<vi?1:0,wi=wi+gi>>>0,Wn+=wi<gi?1:0,wi=wi+Ai>>>0,Wn+=wi<Ai?1:0,wi=wi+Ri>>>0,Wn+=wi<Ri?1:0;var qi=Ei+Ln+mi+_i+xi+Wn;return qi>>>0}utils.sum64_5_hi=Ni;function Oi(Ei,vi,Ln,Yn,mi,gi,_i,Ai,xi,Ri){var Wn=vi+Yn+gi+Ai+Ri;return Wn>>>0}utils.sum64_5_lo=Oi;function Fi(Ei,vi,Ln){var Yn=vi<<32-Ln|Ei>>>Ln;return Yn>>>0}utils.rotr64_hi=Fi;function Mi(Ei,vi,Ln){var Yn=Ei<<32-Ln|vi>>>Ln;return Yn>>>0}utils.rotr64_lo=Mi;function ki(Ei,vi,Ln){return Ei>>>Ln}utils.shr64_hi=ki;function Ci(Ei,vi,Ln){var Yn=Ei<<32-Ln|vi>>>Ln;return Yn>>>0}return utils.shr64_lo=Ci,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var r=requireUtils(),n=requireMinimalisticAssert();function i(){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}return common$1.BlockHash=i,i.prototype.update=function(u,s){if(u=r.toArray(u,s),this.pending?this.pending=this.pending.concat(u):this.pending=u,this.pendingTotal+=u.length,this.pending.length>=this._delta8){u=this.pending;var l=u.length%this._delta8;this.pending=u.slice(u.length-l,u.length),this.pending.length===0&&(this.pending=null),u=r.join32(u,0,u.length-l,this.endian);for(var D=0;D<u.length;D+=this._delta32)this._update(u,D,D+this._delta32)}return this},i.prototype.digest=function(u){return this.update(this._pad()),n(this.pending===null),this._digest(u)},i.prototype._pad=function(){var u=this.pendingTotal,s=this._delta8,l=s-(u+this.padLength)%s,D=new Array(l+this.padLength);D[0]=128;for(var on=1;on<l;on++)D[on]=0;if(u<<=3,this.endian==="big"){for(var h=8;h<this.padLength;h++)D[on++]=0;D[on++]=0,D[on++]=0,D[on++]=0,D[on++]=0,D[on++]=u>>>24&255,D[on++]=u>>>16&255,D[on++]=u>>>8&255,D[on++]=u&255}else for(D[on++]=u&255,D[on++]=u>>>8&255,D[on++]=u>>>16&255,D[on++]=u>>>24&255,D[on++]=0,D[on++]=0,D[on++]=0,D[on++]=0,h=8;h<this.padLength;h++)D[on++]=0;return D},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var r=requireUtils(),n=r.rotr32;function i(v,In,Rn,Mn){if(v===0)return a(In,Rn,Mn);if(v===1||v===3)return s(In,Rn,Mn);if(v===2)return u(In,Rn,Mn)}common.ft_1=i;function a(v,In,Rn){return v&In^~v&Rn}common.ch32=a;function u(v,In,Rn){return v&In^v&Rn^In&Rn}common.maj32=u;function s(v,In,Rn){return v^In^Rn}common.p32=s;function l(v){return n(v,2)^n(v,13)^n(v,22)}common.s0_256=l;function D(v){return n(v,6)^n(v,11)^n(v,25)}common.s1_256=D;function on(v){return n(v,7)^n(v,18)^v>>>3}common.g0_256=on;function h(v){return n(v,17)^n(v,19)^v>>>10}return common.g1_256=h,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var r=requireUtils(),n=requireCommon$1(),i=requireCommon(),a=r.rotl32,u=r.sum32,s=r.sum32_5,l=i.ft_1,D=n.BlockHash,on=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;D.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(h,D),_1=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(In,Rn){for(var Mn=this.W,jn=0;jn<16;jn++)Mn[jn]=In[Rn+jn];for(;jn<Mn.length;jn++)Mn[jn]=a(Mn[jn-3]^Mn[jn-8]^Mn[jn-14]^Mn[jn-16],1);var Hn=this.h[0],hi=this.h[1],yi=this.h[2],bi=this.h[3],Ti=this.h[4];for(jn=0;jn<Mn.length;jn++){var Si=~~(jn/20),Ii=s(a(Hn,5),l(Si,hi,yi,bi),Ti,Mn[jn],on[Si]);Ti=bi,bi=yi,yi=a(hi,30),hi=Hn,Hn=Ii}this.h[0]=u(this.h[0],Hn),this.h[1]=u(this.h[1],hi),this.h[2]=u(this.h[2],yi),this.h[3]=u(this.h[3],bi),this.h[4]=u(this.h[4],Ti)},h.prototype._digest=function(In){return In==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var r=requireUtils(),n=requireCommon$1(),i=requireCommon(),a=requireMinimalisticAssert(),u=r.sum32,s=r.sum32_4,l=r.sum32_5,D=i.ch32,on=i.maj32,h=i.s0_256,v=i.s1_256,In=i.g0_256,Rn=i.g1_256,Mn=n.BlockHash,jn=[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 Hn(){if(!(this instanceof Hn))return new Hn;Mn.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=jn,this.W=new Array(64)}return r.inherits(Hn,Mn),_256=Hn,Hn.blockSize=512,Hn.outSize=256,Hn.hmacStrength=192,Hn.padLength=64,Hn.prototype._update=function(yi,bi){for(var Ti=this.W,Si=0;Si<16;Si++)Ti[Si]=yi[bi+Si];for(;Si<Ti.length;Si++)Ti[Si]=s(Rn(Ti[Si-2]),Ti[Si-7],In(Ti[Si-15]),Ti[Si-16]);var Ii=this.h[0],Ni=this.h[1],Oi=this.h[2],Fi=this.h[3],Mi=this.h[4],ki=this.h[5],Ci=this.h[6],Ei=this.h[7];for(a(this.k.length===Ti.length),Si=0;Si<Ti.length;Si++){var vi=l(Ei,v(Mi),D(Mi,ki,Ci),this.k[Si],Ti[Si]),Ln=u(h(Ii),on(Ii,Ni,Oi));Ei=Ci,Ci=ki,ki=Mi,Mi=u(Fi,vi),Fi=Oi,Oi=Ni,Ni=Ii,Ii=u(vi,Ln)}this.h[0]=u(this.h[0],Ii),this.h[1]=u(this.h[1],Ni),this.h[2]=u(this.h[2],Oi),this.h[3]=u(this.h[3],Fi),this.h[4]=u(this.h[4],Mi),this.h[5]=u(this.h[5],ki),this.h[6]=u(this.h[6],Ci),this.h[7]=u(this.h[7],Ei)},Hn.prototype._digest=function(yi){return yi==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var r=requireUtils(),n=require_256();function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return r.inherits(i,n),_224=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(u){return u==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var r=requireUtils(),n=requireCommon$1(),i=requireMinimalisticAssert(),a=r.rotr64_hi,u=r.rotr64_lo,s=r.shr64_hi,l=r.shr64_lo,D=r.sum64,on=r.sum64_hi,h=r.sum64_lo,v=r.sum64_4_hi,In=r.sum64_4_lo,Rn=r.sum64_5_hi,Mn=r.sum64_5_lo,jn=n.BlockHash,Hn=[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 hi(){if(!(this instanceof hi))return new hi;jn.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Hn,this.W=new Array(160)}r.inherits(hi,jn),_512=hi,hi.blockSize=1024,hi.outSize=512,hi.hmacStrength=192,hi.padLength=128,hi.prototype._prepareBlock=function(Ln,Yn){for(var mi=this.W,gi=0;gi<32;gi++)mi[gi]=Ln[Yn+gi];for(;gi<mi.length;gi+=2){var _i=Ci(mi[gi-4],mi[gi-3]),Ai=Ei(mi[gi-4],mi[gi-3]),xi=mi[gi-14],Ri=mi[gi-13],Wn=Mi(mi[gi-30],mi[gi-29]),wi=ki(mi[gi-30],mi[gi-29]),qi=mi[gi-32],Gi=mi[gi-31];mi[gi]=v(_i,Ai,xi,Ri,Wn,wi,qi,Gi),mi[gi+1]=In(_i,Ai,xi,Ri,Wn,wi,qi,Gi)}},hi.prototype._update=function(Ln,Yn){this._prepareBlock(Ln,Yn);var mi=this.W,gi=this.h[0],_i=this.h[1],Ai=this.h[2],xi=this.h[3],Ri=this.h[4],Wn=this.h[5],wi=this.h[6],qi=this.h[7],Gi=this.h[8],ji=this.h[9],Li=this.h[10],$i=this.h[11],zi=this.h[12],Qi=this.h[13],Vi=this.h[14],Bi=this.h[15];i(this.k.length===mi.length);for(var Hi=0;Hi<mi.length;Hi+=2){var Yi=Vi,Ji=Bi,ra=Oi(Gi,ji),aa=Fi(Gi,ji),ea=yi(Gi,ji,Li,$i,zi),Zi=bi(Gi,ji,Li,$i,zi,Qi),ca=this.k[Hi],Xi=this.k[Hi+1],ia=mi[Hi],na=mi[Hi+1],oa=Rn(Yi,Ji,ra,aa,ea,Zi,ca,Xi,ia,na),la=Mn(Yi,Ji,ra,aa,ea,Zi,ca,Xi,ia,na);Yi=Ii(gi,_i),Ji=Ni(gi,_i),ra=Ti(gi,_i,Ai,xi,Ri),aa=Si(gi,_i,Ai,xi,Ri,Wn);var da=on(Yi,Ji,ra,aa),fa=h(Yi,Ji,ra,aa);Vi=zi,Bi=Qi,zi=Li,Qi=$i,Li=Gi,$i=ji,Gi=on(wi,qi,oa,la),ji=h(qi,qi,oa,la),wi=Ri,qi=Wn,Ri=Ai,Wn=xi,Ai=gi,xi=_i,gi=on(oa,la,da,fa),_i=h(oa,la,da,fa)}D(this.h,0,gi,_i),D(this.h,2,Ai,xi),D(this.h,4,Ri,Wn),D(this.h,6,wi,qi),D(this.h,8,Gi,ji),D(this.h,10,Li,$i),D(this.h,12,zi,Qi),D(this.h,14,Vi,Bi)},hi.prototype._digest=function(Ln){return Ln==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function yi(vi,Ln,Yn,mi,gi){var _i=vi&Yn^~vi&gi;return _i<0&&(_i+=4294967296),_i}function bi(vi,Ln,Yn,mi,gi,_i){var Ai=Ln&mi^~Ln&_i;return Ai<0&&(Ai+=4294967296),Ai}function Ti(vi,Ln,Yn,mi,gi){var _i=vi&Yn^vi&gi^Yn&gi;return _i<0&&(_i+=4294967296),_i}function Si(vi,Ln,Yn,mi,gi,_i){var Ai=Ln&mi^Ln&_i^mi&_i;return Ai<0&&(Ai+=4294967296),Ai}function Ii(vi,Ln){var Yn=a(vi,Ln,28),mi=a(Ln,vi,2),gi=a(Ln,vi,7),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Ni(vi,Ln){var Yn=u(vi,Ln,28),mi=u(Ln,vi,2),gi=u(Ln,vi,7),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Oi(vi,Ln){var Yn=a(vi,Ln,14),mi=a(vi,Ln,18),gi=a(Ln,vi,9),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Fi(vi,Ln){var Yn=u(vi,Ln,14),mi=u(vi,Ln,18),gi=u(Ln,vi,9),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Mi(vi,Ln){var Yn=a(vi,Ln,1),mi=a(vi,Ln,8),gi=s(vi,Ln,7),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function ki(vi,Ln){var Yn=u(vi,Ln,1),mi=u(vi,Ln,8),gi=l(vi,Ln,7),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Ci(vi,Ln){var Yn=a(vi,Ln,19),mi=a(Ln,vi,29),gi=s(vi,Ln,6),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}function Ei(vi,Ln){var Yn=u(vi,Ln,19),mi=u(Ln,vi,29),gi=l(vi,Ln,6),_i=Yn^mi^gi;return _i<0&&(_i+=4294967296),_i}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var r=requireUtils(),n=require_512();function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return r.inherits(i,n),_384=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(u){return u==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var r=requireUtils(),n=requireCommon$1(),i=r.rotl32,a=r.sum32,u=r.sum32_3,s=r.sum32_4,l=n.BlockHash;function D(){if(!(this instanceof D))return new D;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}r.inherits(D,l),ripemd.ripemd160=D,D.blockSize=512,D.outSize=160,D.hmacStrength=192,D.padLength=64,D.prototype._update=function(hi,yi){for(var bi=this.h[0],Ti=this.h[1],Si=this.h[2],Ii=this.h[3],Ni=this.h[4],Oi=bi,Fi=Ti,Mi=Si,ki=Ii,Ci=Ni,Ei=0;Ei<80;Ei++){var vi=a(i(s(bi,on(Ei,Ti,Si,Ii),hi[In[Ei]+yi],h(Ei)),Mn[Ei]),Ni);bi=Ni,Ni=Ii,Ii=i(Si,10),Si=Ti,Ti=vi,vi=a(i(s(Oi,on(79-Ei,Fi,Mi,ki),hi[Rn[Ei]+yi],v(Ei)),jn[Ei]),Ci),Oi=Ci,Ci=ki,ki=i(Mi,10),Mi=Fi,Fi=vi}vi=u(this.h[1],Si,ki),this.h[1]=u(this.h[2],Ii,Ci),this.h[2]=u(this.h[3],Ni,Oi),this.h[3]=u(this.h[4],bi,Fi),this.h[4]=u(this.h[0],Ti,Mi),this.h[0]=vi},D.prototype._digest=function(hi){return hi==="hex"?r.toHex32(this.h,"little"):r.split32(this.h,"little")};function on(Hn,hi,yi,bi){return Hn<=15?hi^yi^bi:Hn<=31?hi&yi|~hi&bi:Hn<=47?(hi|~yi)^bi:Hn<=63?hi&bi|yi&~bi:hi^(yi|~bi)}function h(Hn){return Hn<=15?0:Hn<=31?1518500249:Hn<=47?1859775393:Hn<=63?2400959708:2840853838}function v(Hn){return Hn<=15?1352829926:Hn<=31?1548603684:Hn<=47?1836072691:Hn<=63?2053994217:0}var In=[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],Rn=[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],Mn=[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],jn=[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];return ripemd}var hmac$2,hasRequiredHmac$1;function requireHmac$1(){if(hasRequiredHmac$1)return hmac$2;hasRequiredHmac$1=1;var r=requireUtils(),n=requireMinimalisticAssert();function i(a,u,s){if(!(this instanceof i))return new i(a,u,s);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(u,s))}return hmac$2=i,i.prototype._init=function(u){u.length>this.blockSize&&(u=new this.Hash().update(u).digest()),n(u.length<=this.blockSize);for(var s=u.length;s<this.blockSize;s++)u.push(0);for(s=0;s<u.length;s++)u[s]^=54;for(this.inner=new this.Hash().update(u),s=0;s<u.length;s++)u[s]^=106;this.outer=new this.Hash().update(u)},i.prototype.update=function(u,s){return this.inner.update(u,s),this},i.prototype.digest=function(u){return this.outer.update(this.inner.digest()),this.outer.digest(u)},hmac$2}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,function(r){var n=r;n.utils=requireUtils(),n.common=requireCommon$1(),n.sha=requireSha(),n.ripemd=requireRipemd(),n.hmac=requireHmac$1(),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}(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={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"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,function(r){var n=r,i=requireHash(),a=requireCurve(),u=requireUtils$1(),s=u.assert;function l(h){h.type==="short"?this.curve=new a.short(h):h.type==="edwards"?this.curve=new a.edwards(h):this.curve=new a.mont(h),this.g=this.curve.g,this.n=this.curve.n,this.hash=h.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}n.PresetCurve=l;function D(h,v){Object.defineProperty(n,h,{configurable:!0,enumerable:!0,get:function(){var In=new l(v);return Object.defineProperty(n,h,{configurable:!0,enumerable:!0,value:In}),In}})}D("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),D("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),D("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),D("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:i.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"]}),D("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:i.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"]}),D("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),D("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var on;try{on=requireSecp256k1()}catch{on=void 0}D("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",on]})}(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var r=requireHash(),n=requireUtils$2(),i=requireMinimalisticAssert();function a(u){if(!(this instanceof a))return new a(u);this.hash=u.hash,this.predResist=!!u.predResist,this.outLen=this.hash.outSize,this.minEntropy=u.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var s=n.toArray(u.entropy,u.entropyEnc||"hex"),l=n.toArray(u.nonce,u.nonceEnc||"hex"),D=n.toArray(u.pers,u.persEnc||"hex");i(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,l,D)}return hmacDrbg=a,a.prototype._init=function(s,l,D){var on=s.concat(l).concat(D);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var h=0;h<this.V.length;h++)this.K[h]=0,this.V[h]=1;this._update(on),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(s){var l=this._hmac().update(this.V).update([0]);s&&(l=l.update(s)),this.K=l.digest(),this.V=this._hmac().update(this.V).digest(),s&&(this.K=this._hmac().update(this.V).update([1]).update(s).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(s,l,D,on){typeof l!="string"&&(on=D,D=l,l=null),s=n.toArray(s,l),D=n.toArray(D,on),i(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(s.concat(D||[])),this._reseed=1},a.prototype.generate=function(s,l,D,on){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof l!="string"&&(on=D,D=l,l=null),D&&(D=n.toArray(D,on||"hex"),this._update(D));for(var h=[];h.length<s;)this.V=this._hmac().update(this.V).digest(),h=h.concat(this.V);var v=h.slice(0,s);return this._update(D),this._reseed++,n.encode(v,l)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var r=requireBn$2(),n=requireUtils$1(),i=n.assert;function a(u,s){this.ec=u,this.priv=null,this.pub=null,s.priv&&this._importPrivate(s.priv,s.privEnc),s.pub&&this._importPublic(s.pub,s.pubEnc)}return key$1=a,a.fromPublic=function(s,l,D){return l instanceof a?l:new a(s,{pub:l,pubEnc:D})},a.fromPrivate=function(s,l,D){return l instanceof a?l:new a(s,{priv:l,privEnc:D})},a.prototype.validate=function(){var s=this.getPublic();return s.isInfinity()?{result:!1,reason:"Invalid public key"}:s.validate()?s.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"}},a.prototype.getPublic=function(s,l){return typeof s=="string"&&(l=s,s=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),l?this.pub.encode(l,s):this.pub},a.prototype.getPrivate=function(s){return s==="hex"?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(s,l){this.priv=new r(s,l||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(s,l){if(s.x||s.y){this.ec.curve.type==="mont"?i(s.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&i(s.x&&s.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(s.x,s.y);return}this.pub=this.ec.curve.decodePoint(s,l)},a.prototype.derive=function(s){return s.validate()||i(s.validate(),"public point not validated"),s.mul(this.priv).getX()},a.prototype.sign=function(s,l,D){return this.ec.sign(s,this,l,D)},a.prototype.verify=function(s,l,D){return this.ec.verify(s,l,this,void 0,D)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var r=requireBn$2(),n=requireUtils$1(),i=n.assert;function a(on,h){if(on instanceof a)return on;this._importDER(on,h)||(i(on.r&&on.s,"Signature without r or s"),this.r=new r(on.r,16),this.s=new r(on.s,16),on.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=on.recoveryParam)}signature$1=a;function u(){this.place=0}function s(on,h){var v=on[h.place++];if(!(v&128))return v;var In=v&15;if(In===0||In>4||on[h.place]===0)return!1;for(var Rn=0,Mn=0,jn=h.place;Mn<In;Mn++,jn++)Rn<<=8,Rn|=on[jn],Rn>>>=0;return Rn<=127?!1:(h.place=jn,Rn)}function l(on){for(var h=0,v=on.length-1;!on[h]&&!(on[h+1]&128)&&h<v;)h++;return h===0?on:on.slice(h)}a.prototype._importDER=function(h,v){h=n.toArray(h,v);var In=new u;if(h[In.place++]!==48)return!1;var Rn=s(h,In);if(Rn===!1||Rn+In.place!==h.length||h[In.place++]!==2)return!1;var Mn=s(h,In);if(Mn===!1||(h[In.place]&128)!==0)return!1;var jn=h.slice(In.place,Mn+In.place);if(In.place+=Mn,h[In.place++]!==2)return!1;var Hn=s(h,In);if(Hn===!1||h.length!==Hn+In.place||(h[In.place]&128)!==0)return!1;var hi=h.slice(In.place,Hn+In.place);if(jn[0]===0)if(jn[1]&128)jn=jn.slice(1);else return!1;if(hi[0]===0)if(hi[1]&128)hi=hi.slice(1);else return!1;return this.r=new r(jn),this.s=new r(hi),this.recoveryParam=null,!0};function D(on,h){if(h<128){on.push(h);return}var v=1+(Math.log(h)/Math.LN2>>>3);for(on.push(v|128);--v;)on.push(h>>>(v<<3)&255);on.push(h)}return a.prototype.toDER=function(h){var v=this.r.toArray(),In=this.s.toArray();for(v[0]&128&&(v=[0].concat(v)),In[0]&128&&(In=[0].concat(In)),v=l(v),In=l(In);!In[0]&&!(In[1]&128);)In=In.slice(1);var Rn=[2];D(Rn,v.length),Rn=Rn.concat(v),Rn.push(2),D(Rn,In.length);var Mn=Rn.concat(In),jn=[48];return D(jn,Mn.length),jn=jn.concat(Mn),n.encode(jn,h)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var r=requireBn$2(),n=requireHmacDrbg(),i=requireUtils$1(),a=requireCurves(),u=requireBrorand(),s=i.assert,l=requireKey$1(),D=requireSignature$1();function on(h){if(!(this instanceof on))return new on(h);typeof h=="string"&&(s(Object.prototype.hasOwnProperty.call(a,h),"Unknown curve "+h),h=a[h]),h instanceof a.PresetCurve&&(h={curve:h}),this.curve=h.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=h.curve.g,this.g.precompute(h.curve.n.bitLength()+1),this.hash=h.hash||h.curve.hash}return ec=on,on.prototype.keyPair=function(v){return new l(this,v)},on.prototype.keyFromPrivate=function(v,In){return l.fromPrivate(this,v,In)},on.prototype.keyFromPublic=function(v,In){return l.fromPublic(this,v,In)},on.prototype.genKeyPair=function(v){v||(v={});for(var In=new n({hash:this.hash,pers:v.pers,persEnc:v.persEnc||"utf8",entropy:v.entropy||u(this.hash.hmacStrength),entropyEnc:v.entropy&&v.entropyEnc||"utf8",nonce:this.n.toArray()}),Rn=this.n.byteLength(),Mn=this.n.sub(new r(2));;){var jn=new r(In.generate(Rn));if(!(jn.cmp(Mn)>0))return jn.iaddn(1),this.keyFromPrivate(jn)}},on.prototype._truncateToN=function(v,In,Rn){var Mn;if(r.isBN(v)||typeof v=="number")v=new r(v,16),Mn=v.byteLength();else if(typeof v=="object")Mn=v.length,v=new r(v,16);else{var jn=v.toString();Mn=jn.length+1>>>1,v=new r(jn,16)}typeof Rn!="number"&&(Rn=Mn*8);var Hn=Rn-this.n.bitLength();return Hn>0&&(v=v.ushrn(Hn)),!In&&v.cmp(this.n)>=0?v.sub(this.n):v},on.prototype.sign=function(v,In,Rn,Mn){if(typeof Rn=="object"&&(Mn=Rn,Rn=null),Mn||(Mn={}),typeof v!="string"&&typeof v!="number"&&!r.isBN(v)){s(typeof v=="object"&&v&&typeof v.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),s(v.length>>>0===v.length);for(var jn=0;jn<v.length;jn++)s((v[jn]&255)===v[jn])}In=this.keyFromPrivate(In,Rn),v=this._truncateToN(v,!1,Mn.msgBitLength),s(!v.isNeg(),"Can not sign a negative message");var Hn=this.n.byteLength(),hi=In.getPrivate().toArray("be",Hn),yi=v.toArray("be",Hn);s(new r(yi).eq(v),"Can not sign message");for(var bi=new n({hash:this.hash,entropy:hi,nonce:yi,pers:Mn.pers,persEnc:Mn.persEnc||"utf8"}),Ti=this.n.sub(new r(1)),Si=0;;Si++){var Ii=Mn.k?Mn.k(Si):new r(bi.generate(this.n.byteLength()));if(Ii=this._truncateToN(Ii,!0),!(Ii.cmpn(1)<=0||Ii.cmp(Ti)>=0)){var Ni=this.g.mul(Ii);if(!Ni.isInfinity()){var Oi=Ni.getX(),Fi=Oi.umod(this.n);if(Fi.cmpn(0)!==0){var Mi=Ii.invm(this.n).mul(Fi.mul(In.getPrivate()).iadd(v));if(Mi=Mi.umod(this.n),Mi.cmpn(0)!==0){var ki=(Ni.getY().isOdd()?1:0)|(Oi.cmp(Fi)!==0?2:0);return Mn.canonical&&Mi.cmp(this.nh)>0&&(Mi=this.n.sub(Mi),ki^=1),new D({r:Fi,s:Mi,recoveryParam:ki})}}}}}},on.prototype.verify=function(v,In,Rn,Mn,jn){jn||(jn={}),v=this._truncateToN(v,!1,jn.msgBitLength),Rn=this.keyFromPublic(Rn,Mn),In=new D(In,"hex");var Hn=In.r,hi=In.s;if(Hn.cmpn(1)<0||Hn.cmp(this.n)>=0||hi.cmpn(1)<0||hi.cmp(this.n)>=0)return!1;var yi=hi.invm(this.n),bi=yi.mul(v).umod(this.n),Ti=yi.mul(Hn).umod(this.n),Si;return this.curve._maxwellTrick?(Si=this.g.jmulAdd(bi,Rn.getPublic(),Ti),Si.isInfinity()?!1:Si.eqXToP(Hn)):(Si=this.g.mulAdd(bi,Rn.getPublic(),Ti),Si.isInfinity()?!1:Si.getX().umod(this.n).cmp(Hn)===0)},on.prototype.recoverPubKey=function(h,v,In,Rn){s((3&In)===In,"The recovery param is more than two bits"),v=new D(v,Rn);var Mn=this.n,jn=new r(h),Hn=v.r,hi=v.s,yi=In&1,bi=In>>1;if(Hn.cmp(this.curve.p.umod(this.curve.n))>=0&&bi)throw new Error("Unable to find sencond key candinate");bi?Hn=this.curve.pointFromX(Hn.add(this.curve.n),yi):Hn=this.curve.pointFromX(Hn,yi);var Ti=v.r.invm(Mn),Si=Mn.sub(jn).mul(Ti).umod(Mn),Ii=hi.mul(Ti).umod(Mn);return this.g.mulAdd(Si,Hn,Ii)},on.prototype.getKeyRecoveryParam=function(h,v,In,Rn){if(v=new D(v,Rn),v.recoveryParam!==null)return v.recoveryParam;for(var Mn=0;Mn<4;Mn++){var jn;try{jn=this.recoverPubKey(h,v,Mn)}catch{continue}if(jn.eq(In))return Mn}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var r=requireUtils$1(),n=r.assert,i=r.parseBytes,a=r.cachedProperty;function u(s,l){this.eddsa=s,this._secret=i(l.secret),s.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=i(l.pub)}return u.fromPublic=function(l,D){return D instanceof u?D:new u(l,{pub:D})},u.fromSecret=function(l,D){return D instanceof u?D:new u(l,{secret:D})},u.prototype.secret=function(){return this._secret},a(u,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(u,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(u,"privBytes",function(){var l=this.eddsa,D=this.hash(),on=l.encodingLength-1,h=D.slice(0,l.encodingLength);return h[0]&=248,h[on]&=127,h[on]|=64,h}),a(u,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(u,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(u,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),u.prototype.sign=function(l){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(l,this)},u.prototype.verify=function(l,D){return this.eddsa.verify(l,D,this)},u.prototype.getSecret=function(l){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),l)},u.prototype.getPublic=function(l){return r.encode(this.pubBytes(),l)},key=u,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var r=requireBn$2(),n=requireUtils$1(),i=n.assert,a=n.cachedProperty,u=n.parseBytes;function s(l,D){this.eddsa=l,typeof D!="object"&&(D=u(D)),Array.isArray(D)&&(i(D.length===l.encodingLength*2,"Signature has invalid size"),D={R:D.slice(0,l.encodingLength),S:D.slice(l.encodingLength)}),i(D.R&&D.S,"Signature without R or S"),l.isPoint(D.R)&&(this._R=D.R),D.S instanceof r&&(this._S=D.S),this._Rencoded=Array.isArray(D.R)?D.R:D.Rencoded,this._Sencoded=Array.isArray(D.S)?D.S:D.Sencoded}return a(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},signature=s,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var r=requireHash(),n=requireCurves(),i=requireUtils$1(),a=i.assert,u=i.parseBytes,s=requireKey(),l=requireSignature();function D(on){if(a(on==="ed25519","only tested with ed25519 so far"),!(this instanceof D))return new D(on);on=n[on].curve,this.curve=on,this.g=on.g,this.g.precompute(on.n.bitLength()+1),this.pointClass=on.point().constructor,this.encodingLength=Math.ceil(on.n.bitLength()/8),this.hash=r.sha512}return eddsa=D,D.prototype.sign=function(h,v){h=u(h);var In=this.keyFromSecret(v),Rn=this.hashInt(In.messagePrefix(),h),Mn=this.g.mul(Rn),jn=this.encodePoint(Mn),Hn=this.hashInt(jn,In.pubBytes(),h).mul(In.priv()),hi=Rn.add(Hn).umod(this.curve.n);return this.makeSignature({R:Mn,S:hi,Rencoded:jn})},D.prototype.verify=function(h,v,In){if(h=u(h),v=this.makeSignature(v),v.S().gte(v.eddsa.curve.n)||v.S().isNeg())return!1;var Rn=this.keyFromPublic(In),Mn=this.hashInt(v.Rencoded(),Rn.pubBytes(),h),jn=this.g.mul(v.S()),Hn=v.R().add(Rn.pub().mul(Mn));return Hn.eq(jn)},D.prototype.hashInt=function(){for(var h=this.hash(),v=0;v<arguments.length;v++)h.update(arguments[v]);return i.intFromLE(h.digest()).umod(this.curve.n)},D.prototype.keyFromPublic=function(h){return s.fromPublic(this,h)},D.prototype.keyFromSecret=function(h){return s.fromSecret(this,h)},D.prototype.makeSignature=function(h){return h instanceof l?h:new l(this,h)},D.prototype.encodePoint=function(h){var v=h.getY().toArray("le",this.encodingLength);return v[this.encodingLength-1]|=h.getX().isOdd()?128:0,v},D.prototype.decodePoint=function(h){h=i.parseBytes(h);var v=h.length-1,In=h.slice(0,v).concat(h[v]&-129),Rn=(h[v]&128)!==0,Mn=i.intFromLE(In);return this.curve.pointFromY(Mn,Rn)},D.prototype.encodeInt=function(h){return h.toArray("le",this.encodingLength)},D.prototype.decodeInt=function(h){return i.intFromLE(h)},D.prototype.isPoint=function(h){return h instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,function(r){var n=r;n.version=require$$0$1.version,n.utils=requireUtils$1(),n.rand=requireBrorand(),n.curve=requireCurve(),n.curves=requireCurves(),n.ec=requireEc(),n.eddsa=requireEddsa()}(elliptic)),elliptic}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,function(r){(function(n,i){function a(vi,Ln){if(!vi)throw new Error(Ln||"Assertion failed")}function u(vi,Ln){vi.super_=Ln;var Yn=function(){};Yn.prototype=Ln.prototype,vi.prototype=new Yn,vi.prototype.constructor=vi}function s(vi,Ln,Yn){if(s.isBN(vi))return vi;this.negative=0,this.words=null,this.length=0,this.red=null,vi!==null&&((Ln==="le"||Ln==="be")&&(Yn=Ln,Ln=10),this._init(vi||0,Ln||10,Yn||"be"))}typeof n=="object"?n.exports=s:i.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(Ln){return Ln instanceof s?!0:Ln!==null&&typeof Ln=="object"&&Ln.constructor.wordSize===s.wordSize&&Array.isArray(Ln.words)},s.max=function(Ln,Yn){return Ln.cmp(Yn)>0?Ln:Yn},s.min=function(Ln,Yn){return Ln.cmp(Yn)<0?Ln:Yn},s.prototype._init=function(Ln,Yn,mi){if(typeof Ln=="number")return this._initNumber(Ln,Yn,mi);if(typeof Ln=="object")return this._initArray(Ln,Yn,mi);Yn==="hex"&&(Yn=16),a(Yn===(Yn|0)&&Yn>=2&&Yn<=36),Ln=Ln.toString().replace(/\s+/g,"");var gi=0;Ln[0]==="-"&&(gi++,this.negative=1),gi<Ln.length&&(Yn===16?this._parseHex(Ln,gi,mi):(this._parseBase(Ln,Yn,gi),mi==="le"&&this._initArray(this.toArray(),Yn,mi)))},s.prototype._initNumber=function(Ln,Yn,mi){Ln<0&&(this.negative=1,Ln=-Ln),Ln<67108864?(this.words=[Ln&67108863],this.length=1):Ln<4503599627370496?(this.words=[Ln&67108863,Ln/67108864&67108863],this.length=2):(a(Ln<9007199254740992),this.words=[Ln&67108863,Ln/67108864&67108863,1],this.length=3),mi==="le"&&this._initArray(this.toArray(),Yn,mi)},s.prototype._initArray=function(Ln,Yn,mi){if(a(typeof Ln.length=="number"),Ln.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Ln.length/3),this.words=new Array(this.length);for(var gi=0;gi<this.length;gi++)this.words[gi]=0;var _i,Ai,xi=0;if(mi==="be")for(gi=Ln.length-1,_i=0;gi>=0;gi-=3)Ai=Ln[gi]|Ln[gi-1]<<8|Ln[gi-2]<<16,this.words[_i]|=Ai<<xi&67108863,this.words[_i+1]=Ai>>>26-xi&67108863,xi+=24,xi>=26&&(xi-=26,_i++);else if(mi==="le")for(gi=0,_i=0;gi<Ln.length;gi+=3)Ai=Ln[gi]|Ln[gi+1]<<8|Ln[gi+2]<<16,this.words[_i]|=Ai<<xi&67108863,this.words[_i+1]=Ai>>>26-xi&67108863,xi+=24,xi>=26&&(xi-=26,_i++);return this._strip()};function D(vi,Ln){var Yn=vi.charCodeAt(Ln);if(Yn>=48&&Yn<=57)return Yn-48;if(Yn>=65&&Yn<=70)return Yn-55;if(Yn>=97&&Yn<=102)return Yn-87;a(!1,"Invalid character in "+vi)}function on(vi,Ln,Yn){var mi=D(vi,Yn);return Yn-1>=Ln&&(mi|=D(vi,Yn-1)<<4),mi}s.prototype._parseHex=function(Ln,Yn,mi){this.length=Math.ceil((Ln.length-Yn)/6),this.words=new Array(this.length);for(var gi=0;gi<this.length;gi++)this.words[gi]=0;var _i=0,Ai=0,xi;if(mi==="be")for(gi=Ln.length-1;gi>=Yn;gi-=2)xi=on(Ln,Yn,gi)<<_i,this.words[Ai]|=xi&67108863,_i>=18?(_i-=18,Ai+=1,this.words[Ai]|=xi>>>26):_i+=8;else{var Ri=Ln.length-Yn;for(gi=Ri%2===0?Yn+1:Yn;gi<Ln.length;gi+=2)xi=on(Ln,Yn,gi)<<_i,this.words[Ai]|=xi&67108863,_i>=18?(_i-=18,Ai+=1,this.words[Ai]|=xi>>>26):_i+=8}this._strip()};function h(vi,Ln,Yn,mi){for(var gi=0,_i=0,Ai=Math.min(vi.length,Yn),xi=Ln;xi<Ai;xi++){var Ri=vi.charCodeAt(xi)-48;gi*=mi,Ri>=49?_i=Ri-49+10:Ri>=17?_i=Ri-17+10:_i=Ri,a(Ri>=0&&_i<mi,"Invalid character"),gi+=_i}return gi}s.prototype._parseBase=function(Ln,Yn,mi){this.words=[0],this.length=1;for(var gi=0,_i=1;_i<=67108863;_i*=Yn)gi++;gi--,_i=_i/Yn|0;for(var Ai=Ln.length-mi,xi=Ai%gi,Ri=Math.min(Ai,Ai-xi)+mi,Wn=0,wi=mi;wi<Ri;wi+=gi)Wn=h(Ln,wi,wi+gi,Yn),this.imuln(_i),this.words[0]+Wn<67108864?this.words[0]+=Wn:this._iaddn(Wn);if(xi!==0){var qi=1;for(Wn=h(Ln,wi,Ln.length,Yn),wi=0;wi<xi;wi++)qi*=Yn;this.imuln(qi),this.words[0]+Wn<67108864?this.words[0]+=Wn:this._iaddn(Wn)}this._strip()},s.prototype.copy=function(Ln){Ln.words=new Array(this.length);for(var Yn=0;Yn<this.length;Yn++)Ln.words[Yn]=this.words[Yn];Ln.length=this.length,Ln.negative=this.negative,Ln.red=this.red};function v(vi,Ln){vi.words=Ln.words,vi.length=Ln.length,vi.negative=Ln.negative,vi.red=Ln.red}if(s.prototype._move=function(Ln){v(Ln,this)},s.prototype.clone=function(){var Ln=new s(null);return this.copy(Ln),Ln},s.prototype._expand=function(Ln){for(;this.length<Ln;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=In}catch{s.prototype.inspect=In}else s.prototype.inspect=In;function In(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var Rn=["","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"],Mn=[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],jn=[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];s.prototype.toString=function(Ln,Yn){Ln=Ln||10,Yn=Yn|0||1;var mi;if(Ln===16||Ln==="hex"){mi="";for(var gi=0,_i=0,Ai=0;Ai<this.length;Ai++){var xi=this.words[Ai],Ri=((xi<<gi|_i)&16777215).toString(16);_i=xi>>>24-gi&16777215,gi+=2,gi>=26&&(gi-=26,Ai--),_i!==0||Ai!==this.length-1?mi=Rn[6-Ri.length]+Ri+mi:mi=Ri+mi}for(_i!==0&&(mi=_i.toString(16)+mi);mi.length%Yn!==0;)mi="0"+mi;return this.negative!==0&&(mi="-"+mi),mi}if(Ln===(Ln|0)&&Ln>=2&&Ln<=36){var Wn=Mn[Ln],wi=jn[Ln];mi="";var qi=this.clone();for(qi.negative=0;!qi.isZero();){var Gi=qi.modrn(wi).toString(Ln);qi=qi.idivn(wi),qi.isZero()?mi=Gi+mi:mi=Rn[Wn-Gi.length]+Gi+mi}for(this.isZero()&&(mi="0"+mi);mi.length%Yn!==0;)mi="0"+mi;return this.negative!==0&&(mi="-"+mi),mi}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var Ln=this.words[0];return this.length===2?Ln+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Ln+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Ln:Ln},s.prototype.toJSON=function(){return this.toString(16,2)},l&&(s.prototype.toBuffer=function(Ln,Yn){return this.toArrayLike(l,Ln,Yn)}),s.prototype.toArray=function(Ln,Yn){return this.toArrayLike(Array,Ln,Yn)};var Hn=function(Ln,Yn){return Ln.allocUnsafe?Ln.allocUnsafe(Yn):new Ln(Yn)};s.prototype.toArrayLike=function(Ln,Yn,mi){this._strip();var gi=this.byteLength(),_i=mi||Math.max(1,gi);a(gi<=_i,"byte array longer than desired length"),a(_i>0,"Requested array length <= 0");var Ai=Hn(Ln,_i),xi=Yn==="le"?"LE":"BE";return this["_toArrayLike"+xi](Ai,gi),Ai},s.prototype._toArrayLikeLE=function(Ln,Yn){for(var mi=0,gi=0,_i=0,Ai=0;_i<this.length;_i++){var xi=this.words[_i]<<Ai|gi;Ln[mi++]=xi&255,mi<Ln.length&&(Ln[mi++]=xi>>8&255),mi<Ln.length&&(Ln[mi++]=xi>>16&255),Ai===6?(mi<Ln.length&&(Ln[mi++]=xi>>24&255),gi=0,Ai=0):(gi=xi>>>24,Ai+=2)}if(mi<Ln.length)for(Ln[mi++]=gi;mi<Ln.length;)Ln[mi++]=0},s.prototype._toArrayLikeBE=function(Ln,Yn){for(var mi=Ln.length-1,gi=0,_i=0,Ai=0;_i<this.length;_i++){var xi=this.words[_i]<<Ai|gi;Ln[mi--]=xi&255,mi>=0&&(Ln[mi--]=xi>>8&255),mi>=0&&(Ln[mi--]=xi>>16&255),Ai===6?(mi>=0&&(Ln[mi--]=xi>>24&255),gi=0,Ai=0):(gi=xi>>>24,Ai+=2)}if(mi>=0)for(Ln[mi--]=gi;mi>=0;)Ln[mi--]=0},Math.clz32?s.prototype._countBits=function(Ln){return 32-Math.clz32(Ln)}:s.prototype._countBits=function(Ln){var Yn=Ln,mi=0;return Yn>=4096&&(mi+=13,Yn>>>=13),Yn>=64&&(mi+=7,Yn>>>=7),Yn>=8&&(mi+=4,Yn>>>=4),Yn>=2&&(mi+=2,Yn>>>=2),mi+Yn},s.prototype._zeroBits=function(Ln){if(Ln===0)return 26;var Yn=Ln,mi=0;return(Yn&8191)===0&&(mi+=13,Yn>>>=13),(Yn&127)===0&&(mi+=7,Yn>>>=7),(Yn&15)===0&&(mi+=4,Yn>>>=4),(Yn&3)===0&&(mi+=2,Yn>>>=2),(Yn&1)===0&&mi++,mi},s.prototype.bitLength=function(){var Ln=this.words[this.length-1],Yn=this._countBits(Ln);return(this.length-1)*26+Yn};function hi(vi){for(var Ln=new Array(vi.bitLength()),Yn=0;Yn<Ln.length;Yn++){var mi=Yn/26|0,gi=Yn%26;Ln[Yn]=vi.words[mi]>>>gi&1}return Ln}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Ln=0,Yn=0;Yn<this.length;Yn++){var mi=this._zeroBits(this.words[Yn]);if(Ln+=mi,mi!==26)break}return Ln},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(Ln){return this.negative!==0?this.abs().inotn(Ln).iaddn(1):this.clone()},s.prototype.fromTwos=function(Ln){return this.testn(Ln-1)?this.notn(Ln).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(Ln){for(;this.length<Ln.length;)this.words[this.length++]=0;for(var Yn=0;Yn<Ln.length;Yn++)this.words[Yn]=this.words[Yn]|Ln.words[Yn];return this._strip()},s.prototype.ior=function(Ln){return a((this.negative|Ln.negative)===0),this.iuor(Ln)},s.prototype.or=function(Ln){return this.length>Ln.length?this.clone().ior(Ln):Ln.clone().ior(this)},s.prototype.uor=function(Ln){return this.length>Ln.length?this.clone().iuor(Ln):Ln.clone().iuor(this)},s.prototype.iuand=function(Ln){var Yn;this.length>Ln.length?Yn=Ln:Yn=this;for(var mi=0;mi<Yn.length;mi++)this.words[mi]=this.words[mi]&Ln.words[mi];return this.length=Yn.length,this._strip()},s.prototype.iand=function(Ln){return a((this.negative|Ln.negative)===0),this.iuand(Ln)},s.prototype.and=function(Ln){return this.length>Ln.length?this.clone().iand(Ln):Ln.clone().iand(this)},s.prototype.uand=function(Ln){return this.length>Ln.length?this.clone().iuand(Ln):Ln.clone().iuand(this)},s.prototype.iuxor=function(Ln){var Yn,mi;this.length>Ln.length?(Yn=this,mi=Ln):(Yn=Ln,mi=this);for(var gi=0;gi<mi.length;gi++)this.words[gi]=Yn.words[gi]^mi.words[gi];if(this!==Yn)for(;gi<Yn.length;gi++)this.words[gi]=Yn.words[gi];return this.length=Yn.length,this._strip()},s.prototype.ixor=function(Ln){return a((this.negative|Ln.negative)===0),this.iuxor(Ln)},s.prototype.xor=function(Ln){return this.length>Ln.length?this.clone().ixor(Ln):Ln.clone().ixor(this)},s.prototype.uxor=function(Ln){return this.length>Ln.length?this.clone().iuxor(Ln):Ln.clone().iuxor(this)},s.prototype.inotn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Math.ceil(Ln/26)|0,mi=Ln%26;this._expand(Yn),mi>0&&Yn--;for(var gi=0;gi<Yn;gi++)this.words[gi]=~this.words[gi]&67108863;return mi>0&&(this.words[gi]=~this.words[gi]&67108863>>26-mi),this._strip()},s.prototype.notn=function(Ln){return this.clone().inotn(Ln)},s.prototype.setn=function(Ln,Yn){a(typeof Ln=="number"&&Ln>=0);var mi=Ln/26|0,gi=Ln%26;return this._expand(mi+1),Yn?this.words[mi]=this.words[mi]|1<<gi:this.words[mi]=this.words[mi]&~(1<<gi),this._strip()},s.prototype.iadd=function(Ln){var Yn;if(this.negative!==0&&Ln.negative===0)return this.negative=0,Yn=this.isub(Ln),this.negative^=1,this._normSign();if(this.negative===0&&Ln.negative!==0)return Ln.negative=0,Yn=this.isub(Ln),Ln.negative=1,Yn._normSign();var mi,gi;this.length>Ln.length?(mi=this,gi=Ln):(mi=Ln,gi=this);for(var _i=0,Ai=0;Ai<gi.length;Ai++)Yn=(mi.words[Ai]|0)+(gi.words[Ai]|0)+_i,this.words[Ai]=Yn&67108863,_i=Yn>>>26;for(;_i!==0&&Ai<mi.length;Ai++)Yn=(mi.words[Ai]|0)+_i,this.words[Ai]=Yn&67108863,_i=Yn>>>26;if(this.length=mi.length,_i!==0)this.words[this.length]=_i,this.length++;else if(mi!==this)for(;Ai<mi.length;Ai++)this.words[Ai]=mi.words[Ai];return this},s.prototype.add=function(Ln){var Yn;return Ln.negative!==0&&this.negative===0?(Ln.negative=0,Yn=this.sub(Ln),Ln.negative^=1,Yn):Ln.negative===0&&this.negative!==0?(this.negative=0,Yn=Ln.sub(this),this.negative=1,Yn):this.length>Ln.length?this.clone().iadd(Ln):Ln.clone().iadd(this)},s.prototype.isub=function(Ln){if(Ln.negative!==0){Ln.negative=0;var Yn=this.iadd(Ln);return Ln.negative=1,Yn._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Ln),this.negative=1,this._normSign();var mi=this.cmp(Ln);if(mi===0)return this.negative=0,this.length=1,this.words[0]=0,this;var gi,_i;mi>0?(gi=this,_i=Ln):(gi=Ln,_i=this);for(var Ai=0,xi=0;xi<_i.length;xi++)Yn=(gi.words[xi]|0)-(_i.words[xi]|0)+Ai,Ai=Yn>>26,this.words[xi]=Yn&67108863;for(;Ai!==0&&xi<gi.length;xi++)Yn=(gi.words[xi]|0)+Ai,Ai=Yn>>26,this.words[xi]=Yn&67108863;if(Ai===0&&xi<gi.length&&gi!==this)for(;xi<gi.length;xi++)this.words[xi]=gi.words[xi];return this.length=Math.max(this.length,xi),gi!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(Ln){return this.clone().isub(Ln)};function yi(vi,Ln,Yn){Yn.negative=Ln.negative^vi.negative;var mi=vi.length+Ln.length|0;Yn.length=mi,mi=mi-1|0;var gi=vi.words[0]|0,_i=Ln.words[0]|0,Ai=gi*_i,xi=Ai&67108863,Ri=Ai/67108864|0;Yn.words[0]=xi;for(var Wn=1;Wn<mi;Wn++){for(var wi=Ri>>>26,qi=Ri&67108863,Gi=Math.min(Wn,Ln.length-1),ji=Math.max(0,Wn-vi.length+1);ji<=Gi;ji++){var Li=Wn-ji|0;gi=vi.words[Li]|0,_i=Ln.words[ji]|0,Ai=gi*_i+qi,wi+=Ai/67108864|0,qi=Ai&67108863}Yn.words[Wn]=qi|0,Ri=wi|0}return Ri!==0?Yn.words[Wn]=Ri|0:Yn.length--,Yn._strip()}var bi=function(Ln,Yn,mi){var gi=Ln.words,_i=Yn.words,Ai=mi.words,xi=0,Ri,Wn,wi,qi=gi[0]|0,Gi=qi&8191,ji=qi>>>13,Li=gi[1]|0,$i=Li&8191,zi=Li>>>13,Qi=gi[2]|0,Vi=Qi&8191,Bi=Qi>>>13,Hi=gi[3]|0,Yi=Hi&8191,Ji=Hi>>>13,ra=gi[4]|0,aa=ra&8191,ea=ra>>>13,Zi=gi[5]|0,ca=Zi&8191,Xi=Zi>>>13,ia=gi[6]|0,na=ia&8191,oa=ia>>>13,la=gi[7]|0,da=la&8191,fa=la>>>13,ba=gi[8]|0,pa=ba&8191,ha=ba>>>13,Ia=gi[9]|0,Da=Ia&8191,ya=Ia>>>13,Fa=_i[0]|0,Sa=Fa&8191,ga=Fa>>>13,Pa=_i[1]|0,wa=Pa&8191,ma=Pa>>>13,$a=_i[2]|0,Na=$a&8191,_a=$a>>>13,Ba=_i[3]|0,Ca=Ba&8191,Ra=Ba>>>13,ka=_i[4]|0,Ma=ka&8191,Ki=ka>>>13,Pi=_i[5]|0,Ui=Pi&8191,Wi=Pi>>>13,ta=_i[6]|0,sa=ta&8191,ua=ta>>>13,Ta=_i[7]|0,xa=Ta&8191,va=Ta>>>13,Oa=_i[8]|0,Ea=Oa&8191,Aa=Oa>>>13,Ua=_i[9]|0,qa=Ua&8191,La=Ua>>>13;mi.negative=Ln.negative^Yn.negative,mi.length=19,Ri=Math.imul(Gi,Sa),Wn=Math.imul(Gi,ga),Wn=Wn+Math.imul(ji,Sa)|0,wi=Math.imul(ji,ga);var ja=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ja>>>26)|0,ja&=67108863,Ri=Math.imul($i,Sa),Wn=Math.imul($i,ga),Wn=Wn+Math.imul(zi,Sa)|0,wi=Math.imul(zi,ga),Ri=Ri+Math.imul(Gi,wa)|0,Wn=Wn+Math.imul(Gi,ma)|0,Wn=Wn+Math.imul(ji,wa)|0,wi=wi+Math.imul(ji,ma)|0;var Va=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Va>>>26)|0,Va&=67108863,Ri=Math.imul(Vi,Sa),Wn=Math.imul(Vi,ga),Wn=Wn+Math.imul(Bi,Sa)|0,wi=Math.imul(Bi,ga),Ri=Ri+Math.imul($i,wa)|0,Wn=Wn+Math.imul($i,ma)|0,Wn=Wn+Math.imul(zi,wa)|0,wi=wi+Math.imul(zi,ma)|0,Ri=Ri+Math.imul(Gi,Na)|0,Wn=Wn+Math.imul(Gi,_a)|0,Wn=Wn+Math.imul(ji,Na)|0,wi=wi+Math.imul(ji,_a)|0;var Ga=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,Ri=Math.imul(Yi,Sa),Wn=Math.imul(Yi,ga),Wn=Wn+Math.imul(Ji,Sa)|0,wi=Math.imul(Ji,ga),Ri=Ri+Math.imul(Vi,wa)|0,Wn=Wn+Math.imul(Vi,ma)|0,Wn=Wn+Math.imul(Bi,wa)|0,wi=wi+Math.imul(Bi,ma)|0,Ri=Ri+Math.imul($i,Na)|0,Wn=Wn+Math.imul($i,_a)|0,Wn=Wn+Math.imul(zi,Na)|0,wi=wi+Math.imul(zi,_a)|0,Ri=Ri+Math.imul(Gi,Ca)|0,Wn=Wn+Math.imul(Gi,Ra)|0,Wn=Wn+Math.imul(ji,Ca)|0,wi=wi+Math.imul(ji,Ra)|0;var Ka=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,Ri=Math.imul(aa,Sa),Wn=Math.imul(aa,ga),Wn=Wn+Math.imul(ea,Sa)|0,wi=Math.imul(ea,ga),Ri=Ri+Math.imul(Yi,wa)|0,Wn=Wn+Math.imul(Yi,ma)|0,Wn=Wn+Math.imul(Ji,wa)|0,wi=wi+Math.imul(Ji,ma)|0,Ri=Ri+Math.imul(Vi,Na)|0,Wn=Wn+Math.imul(Vi,_a)|0,Wn=Wn+Math.imul(Bi,Na)|0,wi=wi+Math.imul(Bi,_a)|0,Ri=Ri+Math.imul($i,Ca)|0,Wn=Wn+Math.imul($i,Ra)|0,Wn=Wn+Math.imul(zi,Ca)|0,wi=wi+Math.imul(zi,Ra)|0,Ri=Ri+Math.imul(Gi,Ma)|0,Wn=Wn+Math.imul(Gi,Ki)|0,Wn=Wn+Math.imul(ji,Ma)|0,wi=wi+Math.imul(ji,Ki)|0;var Ha=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ha>>>26)|0,Ha&=67108863,Ri=Math.imul(ca,Sa),Wn=Math.imul(ca,ga),Wn=Wn+Math.imul(Xi,Sa)|0,wi=Math.imul(Xi,ga),Ri=Ri+Math.imul(aa,wa)|0,Wn=Wn+Math.imul(aa,ma)|0,Wn=Wn+Math.imul(ea,wa)|0,wi=wi+Math.imul(ea,ma)|0,Ri=Ri+Math.imul(Yi,Na)|0,Wn=Wn+Math.imul(Yi,_a)|0,Wn=Wn+Math.imul(Ji,Na)|0,wi=wi+Math.imul(Ji,_a)|0,Ri=Ri+Math.imul(Vi,Ca)|0,Wn=Wn+Math.imul(Vi,Ra)|0,Wn=Wn+Math.imul(Bi,Ca)|0,wi=wi+Math.imul(Bi,Ra)|0,Ri=Ri+Math.imul($i,Ma)|0,Wn=Wn+Math.imul($i,Ki)|0,Wn=Wn+Math.imul(zi,Ma)|0,wi=wi+Math.imul(zi,Ki)|0,Ri=Ri+Math.imul(Gi,Ui)|0,Wn=Wn+Math.imul(Gi,Wi)|0,Wn=Wn+Math.imul(ji,Ui)|0,wi=wi+Math.imul(ji,Wi)|0;var Qa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,Ri=Math.imul(na,Sa),Wn=Math.imul(na,ga),Wn=Wn+Math.imul(oa,Sa)|0,wi=Math.imul(oa,ga),Ri=Ri+Math.imul(ca,wa)|0,Wn=Wn+Math.imul(ca,ma)|0,Wn=Wn+Math.imul(Xi,wa)|0,wi=wi+Math.imul(Xi,ma)|0,Ri=Ri+Math.imul(aa,Na)|0,Wn=Wn+Math.imul(aa,_a)|0,Wn=Wn+Math.imul(ea,Na)|0,wi=wi+Math.imul(ea,_a)|0,Ri=Ri+Math.imul(Yi,Ca)|0,Wn=Wn+Math.imul(Yi,Ra)|0,Wn=Wn+Math.imul(Ji,Ca)|0,wi=wi+Math.imul(Ji,Ra)|0,Ri=Ri+Math.imul(Vi,Ma)|0,Wn=Wn+Math.imul(Vi,Ki)|0,Wn=Wn+Math.imul(Bi,Ma)|0,wi=wi+Math.imul(Bi,Ki)|0,Ri=Ri+Math.imul($i,Ui)|0,Wn=Wn+Math.imul($i,Wi)|0,Wn=Wn+Math.imul(zi,Ui)|0,wi=wi+Math.imul(zi,Wi)|0,Ri=Ri+Math.imul(Gi,sa)|0,Wn=Wn+Math.imul(Gi,ua)|0,Wn=Wn+Math.imul(ji,sa)|0,wi=wi+Math.imul(ji,ua)|0;var Ya=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ya>>>26)|0,Ya&=67108863,Ri=Math.imul(da,Sa),Wn=Math.imul(da,ga),Wn=Wn+Math.imul(fa,Sa)|0,wi=Math.imul(fa,ga),Ri=Ri+Math.imul(na,wa)|0,Wn=Wn+Math.imul(na,ma)|0,Wn=Wn+Math.imul(oa,wa)|0,wi=wi+Math.imul(oa,ma)|0,Ri=Ri+Math.imul(ca,Na)|0,Wn=Wn+Math.imul(ca,_a)|0,Wn=Wn+Math.imul(Xi,Na)|0,wi=wi+Math.imul(Xi,_a)|0,Ri=Ri+Math.imul(aa,Ca)|0,Wn=Wn+Math.imul(aa,Ra)|0,Wn=Wn+Math.imul(ea,Ca)|0,wi=wi+Math.imul(ea,Ra)|0,Ri=Ri+Math.imul(Yi,Ma)|0,Wn=Wn+Math.imul(Yi,Ki)|0,Wn=Wn+Math.imul(Ji,Ma)|0,wi=wi+Math.imul(Ji,Ki)|0,Ri=Ri+Math.imul(Vi,Ui)|0,Wn=Wn+Math.imul(Vi,Wi)|0,Wn=Wn+Math.imul(Bi,Ui)|0,wi=wi+Math.imul(Bi,Wi)|0,Ri=Ri+Math.imul($i,sa)|0,Wn=Wn+Math.imul($i,ua)|0,Wn=Wn+Math.imul(zi,sa)|0,wi=wi+Math.imul(zi,ua)|0,Ri=Ri+Math.imul(Gi,xa)|0,Wn=Wn+Math.imul(Gi,va)|0,Wn=Wn+Math.imul(ji,xa)|0,wi=wi+Math.imul(ji,va)|0;var za=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(za>>>26)|0,za&=67108863,Ri=Math.imul(pa,Sa),Wn=Math.imul(pa,ga),Wn=Wn+Math.imul(ha,Sa)|0,wi=Math.imul(ha,ga),Ri=Ri+Math.imul(da,wa)|0,Wn=Wn+Math.imul(da,ma)|0,Wn=Wn+Math.imul(fa,wa)|0,wi=wi+Math.imul(fa,ma)|0,Ri=Ri+Math.imul(na,Na)|0,Wn=Wn+Math.imul(na,_a)|0,Wn=Wn+Math.imul(oa,Na)|0,wi=wi+Math.imul(oa,_a)|0,Ri=Ri+Math.imul(ca,Ca)|0,Wn=Wn+Math.imul(ca,Ra)|0,Wn=Wn+Math.imul(Xi,Ca)|0,wi=wi+Math.imul(Xi,Ra)|0,Ri=Ri+Math.imul(aa,Ma)|0,Wn=Wn+Math.imul(aa,Ki)|0,Wn=Wn+Math.imul(ea,Ma)|0,wi=wi+Math.imul(ea,Ki)|0,Ri=Ri+Math.imul(Yi,Ui)|0,Wn=Wn+Math.imul(Yi,Wi)|0,Wn=Wn+Math.imul(Ji,Ui)|0,wi=wi+Math.imul(Ji,Wi)|0,Ri=Ri+Math.imul(Vi,sa)|0,Wn=Wn+Math.imul(Vi,ua)|0,Wn=Wn+Math.imul(Bi,sa)|0,wi=wi+Math.imul(Bi,ua)|0,Ri=Ri+Math.imul($i,xa)|0,Wn=Wn+Math.imul($i,va)|0,Wn=Wn+Math.imul(zi,xa)|0,wi=wi+Math.imul(zi,va)|0,Ri=Ri+Math.imul(Gi,Ea)|0,Wn=Wn+Math.imul(Gi,Aa)|0,Wn=Wn+Math.imul(ji,Ea)|0,wi=wi+Math.imul(ji,Aa)|0;var Wa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,Ri=Math.imul(Da,Sa),Wn=Math.imul(Da,ga),Wn=Wn+Math.imul(ya,Sa)|0,wi=Math.imul(ya,ga),Ri=Ri+Math.imul(pa,wa)|0,Wn=Wn+Math.imul(pa,ma)|0,Wn=Wn+Math.imul(ha,wa)|0,wi=wi+Math.imul(ha,ma)|0,Ri=Ri+Math.imul(da,Na)|0,Wn=Wn+Math.imul(da,_a)|0,Wn=Wn+Math.imul(fa,Na)|0,wi=wi+Math.imul(fa,_a)|0,Ri=Ri+Math.imul(na,Ca)|0,Wn=Wn+Math.imul(na,Ra)|0,Wn=Wn+Math.imul(oa,Ca)|0,wi=wi+Math.imul(oa,Ra)|0,Ri=Ri+Math.imul(ca,Ma)|0,Wn=Wn+Math.imul(ca,Ki)|0,Wn=Wn+Math.imul(Xi,Ma)|0,wi=wi+Math.imul(Xi,Ki)|0,Ri=Ri+Math.imul(aa,Ui)|0,Wn=Wn+Math.imul(aa,Wi)|0,Wn=Wn+Math.imul(ea,Ui)|0,wi=wi+Math.imul(ea,Wi)|0,Ri=Ri+Math.imul(Yi,sa)|0,Wn=Wn+Math.imul(Yi,ua)|0,Wn=Wn+Math.imul(Ji,sa)|0,wi=wi+Math.imul(Ji,ua)|0,Ri=Ri+Math.imul(Vi,xa)|0,Wn=Wn+Math.imul(Vi,va)|0,Wn=Wn+Math.imul(Bi,xa)|0,wi=wi+Math.imul(Bi,va)|0,Ri=Ri+Math.imul($i,Ea)|0,Wn=Wn+Math.imul($i,Aa)|0,Wn=Wn+Math.imul(zi,Ea)|0,wi=wi+Math.imul(zi,Aa)|0,Ri=Ri+Math.imul(Gi,qa)|0,Wn=Wn+Math.imul(Gi,La)|0,Wn=Wn+Math.imul(ji,qa)|0,wi=wi+Math.imul(ji,La)|0;var Ja=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,Ri=Math.imul(Da,wa),Wn=Math.imul(Da,ma),Wn=Wn+Math.imul(ya,wa)|0,wi=Math.imul(ya,ma),Ri=Ri+Math.imul(pa,Na)|0,Wn=Wn+Math.imul(pa,_a)|0,Wn=Wn+Math.imul(ha,Na)|0,wi=wi+Math.imul(ha,_a)|0,Ri=Ri+Math.imul(da,Ca)|0,Wn=Wn+Math.imul(da,Ra)|0,Wn=Wn+Math.imul(fa,Ca)|0,wi=wi+Math.imul(fa,Ra)|0,Ri=Ri+Math.imul(na,Ma)|0,Wn=Wn+Math.imul(na,Ki)|0,Wn=Wn+Math.imul(oa,Ma)|0,wi=wi+Math.imul(oa,Ki)|0,Ri=Ri+Math.imul(ca,Ui)|0,Wn=Wn+Math.imul(ca,Wi)|0,Wn=Wn+Math.imul(Xi,Ui)|0,wi=wi+Math.imul(Xi,Wi)|0,Ri=Ri+Math.imul(aa,sa)|0,Wn=Wn+Math.imul(aa,ua)|0,Wn=Wn+Math.imul(ea,sa)|0,wi=wi+Math.imul(ea,ua)|0,Ri=Ri+Math.imul(Yi,xa)|0,Wn=Wn+Math.imul(Yi,va)|0,Wn=Wn+Math.imul(Ji,xa)|0,wi=wi+Math.imul(Ji,va)|0,Ri=Ri+Math.imul(Vi,Ea)|0,Wn=Wn+Math.imul(Vi,Aa)|0,Wn=Wn+Math.imul(Bi,Ea)|0,wi=wi+Math.imul(Bi,Aa)|0,Ri=Ri+Math.imul($i,qa)|0,Wn=Wn+Math.imul($i,La)|0,Wn=Wn+Math.imul(zi,qa)|0,wi=wi+Math.imul(zi,La)|0;var Xa=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,Ri=Math.imul(Da,Na),Wn=Math.imul(Da,_a),Wn=Wn+Math.imul(ya,Na)|0,wi=Math.imul(ya,_a),Ri=Ri+Math.imul(pa,Ca)|0,Wn=Wn+Math.imul(pa,Ra)|0,Wn=Wn+Math.imul(ha,Ca)|0,wi=wi+Math.imul(ha,Ra)|0,Ri=Ri+Math.imul(da,Ma)|0,Wn=Wn+Math.imul(da,Ki)|0,Wn=Wn+Math.imul(fa,Ma)|0,wi=wi+Math.imul(fa,Ki)|0,Ri=Ri+Math.imul(na,Ui)|0,Wn=Wn+Math.imul(na,Wi)|0,Wn=Wn+Math.imul(oa,Ui)|0,wi=wi+Math.imul(oa,Wi)|0,Ri=Ri+Math.imul(ca,sa)|0,Wn=Wn+Math.imul(ca,ua)|0,Wn=Wn+Math.imul(Xi,sa)|0,wi=wi+Math.imul(Xi,ua)|0,Ri=Ri+Math.imul(aa,xa)|0,Wn=Wn+Math.imul(aa,va)|0,Wn=Wn+Math.imul(ea,xa)|0,wi=wi+Math.imul(ea,va)|0,Ri=Ri+Math.imul(Yi,Ea)|0,Wn=Wn+Math.imul(Yi,Aa)|0,Wn=Wn+Math.imul(Ji,Ea)|0,wi=wi+Math.imul(Ji,Aa)|0,Ri=Ri+Math.imul(Vi,qa)|0,Wn=Wn+Math.imul(Vi,La)|0,Wn=Wn+Math.imul(Bi,qa)|0,wi=wi+Math.imul(Bi,La)|0;var Za=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(Za>>>26)|0,Za&=67108863,Ri=Math.imul(Da,Ca),Wn=Math.imul(Da,Ra),Wn=Wn+Math.imul(ya,Ca)|0,wi=Math.imul(ya,Ra),Ri=Ri+Math.imul(pa,Ma)|0,Wn=Wn+Math.imul(pa,Ki)|0,Wn=Wn+Math.imul(ha,Ma)|0,wi=wi+Math.imul(ha,Ki)|0,Ri=Ri+Math.imul(da,Ui)|0,Wn=Wn+Math.imul(da,Wi)|0,Wn=Wn+Math.imul(fa,Ui)|0,wi=wi+Math.imul(fa,Wi)|0,Ri=Ri+Math.imul(na,sa)|0,Wn=Wn+Math.imul(na,ua)|0,Wn=Wn+Math.imul(oa,sa)|0,wi=wi+Math.imul(oa,ua)|0,Ri=Ri+Math.imul(ca,xa)|0,Wn=Wn+Math.imul(ca,va)|0,Wn=Wn+Math.imul(Xi,xa)|0,wi=wi+Math.imul(Xi,va)|0,Ri=Ri+Math.imul(aa,Ea)|0,Wn=Wn+Math.imul(aa,Aa)|0,Wn=Wn+Math.imul(ea,Ea)|0,wi=wi+Math.imul(ea,Aa)|0,Ri=Ri+Math.imul(Yi,qa)|0,Wn=Wn+Math.imul(Yi,La)|0,Wn=Wn+Math.imul(Ji,qa)|0,wi=wi+Math.imul(Ji,La)|0;var es=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(es>>>26)|0,es&=67108863,Ri=Math.imul(Da,Ma),Wn=Math.imul(Da,Ki),Wn=Wn+Math.imul(ya,Ma)|0,wi=Math.imul(ya,Ki),Ri=Ri+Math.imul(pa,Ui)|0,Wn=Wn+Math.imul(pa,Wi)|0,Wn=Wn+Math.imul(ha,Ui)|0,wi=wi+Math.imul(ha,Wi)|0,Ri=Ri+Math.imul(da,sa)|0,Wn=Wn+Math.imul(da,ua)|0,Wn=Wn+Math.imul(fa,sa)|0,wi=wi+Math.imul(fa,ua)|0,Ri=Ri+Math.imul(na,xa)|0,Wn=Wn+Math.imul(na,va)|0,Wn=Wn+Math.imul(oa,xa)|0,wi=wi+Math.imul(oa,va)|0,Ri=Ri+Math.imul(ca,Ea)|0,Wn=Wn+Math.imul(ca,Aa)|0,Wn=Wn+Math.imul(Xi,Ea)|0,wi=wi+Math.imul(Xi,Aa)|0,Ri=Ri+Math.imul(aa,qa)|0,Wn=Wn+Math.imul(aa,La)|0,Wn=Wn+Math.imul(ea,qa)|0,wi=wi+Math.imul(ea,La)|0;var rs=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(rs>>>26)|0,rs&=67108863,Ri=Math.imul(Da,Ui),Wn=Math.imul(Da,Wi),Wn=Wn+Math.imul(ya,Ui)|0,wi=Math.imul(ya,Wi),Ri=Ri+Math.imul(pa,sa)|0,Wn=Wn+Math.imul(pa,ua)|0,Wn=Wn+Math.imul(ha,sa)|0,wi=wi+Math.imul(ha,ua)|0,Ri=Ri+Math.imul(da,xa)|0,Wn=Wn+Math.imul(da,va)|0,Wn=Wn+Math.imul(fa,xa)|0,wi=wi+Math.imul(fa,va)|0,Ri=Ri+Math.imul(na,Ea)|0,Wn=Wn+Math.imul(na,Aa)|0,Wn=Wn+Math.imul(oa,Ea)|0,wi=wi+Math.imul(oa,Aa)|0,Ri=Ri+Math.imul(ca,qa)|0,Wn=Wn+Math.imul(ca,La)|0,Wn=Wn+Math.imul(Xi,qa)|0,wi=wi+Math.imul(Xi,La)|0;var ts=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ts>>>26)|0,ts&=67108863,Ri=Math.imul(Da,sa),Wn=Math.imul(Da,ua),Wn=Wn+Math.imul(ya,sa)|0,wi=Math.imul(ya,ua),Ri=Ri+Math.imul(pa,xa)|0,Wn=Wn+Math.imul(pa,va)|0,Wn=Wn+Math.imul(ha,xa)|0,wi=wi+Math.imul(ha,va)|0,Ri=Ri+Math.imul(da,Ea)|0,Wn=Wn+Math.imul(da,Aa)|0,Wn=Wn+Math.imul(fa,Ea)|0,wi=wi+Math.imul(fa,Aa)|0,Ri=Ri+Math.imul(na,qa)|0,Wn=Wn+Math.imul(na,La)|0,Wn=Wn+Math.imul(oa,qa)|0,wi=wi+Math.imul(oa,La)|0;var ns=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(ns>>>26)|0,ns&=67108863,Ri=Math.imul(Da,xa),Wn=Math.imul(Da,va),Wn=Wn+Math.imul(ya,xa)|0,wi=Math.imul(ya,va),Ri=Ri+Math.imul(pa,Ea)|0,Wn=Wn+Math.imul(pa,Aa)|0,Wn=Wn+Math.imul(ha,Ea)|0,wi=wi+Math.imul(ha,Aa)|0,Ri=Ri+Math.imul(da,qa)|0,Wn=Wn+Math.imul(da,La)|0,Wn=Wn+Math.imul(fa,qa)|0,wi=wi+Math.imul(fa,La)|0;var is=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(is>>>26)|0,is&=67108863,Ri=Math.imul(Da,Ea),Wn=Math.imul(Da,Aa),Wn=Wn+Math.imul(ya,Ea)|0,wi=Math.imul(ya,Aa),Ri=Ri+Math.imul(pa,qa)|0,Wn=Wn+Math.imul(pa,La)|0,Wn=Wn+Math.imul(ha,qa)|0,wi=wi+Math.imul(ha,La)|0;var as=(xi+Ri|0)+((Wn&8191)<<13)|0;xi=(wi+(Wn>>>13)|0)+(as>>>26)|0,as&=67108863,Ri=Math.imul(Da,qa),Wn=Math.imul(Da,La),Wn=Wn+Math.imul(ya,qa)|0,wi=Math.imul(ya,La);var ss=(xi+Ri|0)+((Wn&8191)<<13)|0;return xi=(wi+(Wn>>>13)|0)+(ss>>>26)|0,ss&=67108863,Ai[0]=ja,Ai[1]=Va,Ai[2]=Ga,Ai[3]=Ka,Ai[4]=Ha,Ai[5]=Qa,Ai[6]=Ya,Ai[7]=za,Ai[8]=Wa,Ai[9]=Ja,Ai[10]=Xa,Ai[11]=Za,Ai[12]=es,Ai[13]=rs,Ai[14]=ts,Ai[15]=ns,Ai[16]=is,Ai[17]=as,Ai[18]=ss,xi!==0&&(Ai[19]=xi,mi.length++),mi};Math.imul||(bi=yi);function Ti(vi,Ln,Yn){Yn.negative=Ln.negative^vi.negative,Yn.length=vi.length+Ln.length;for(var mi=0,gi=0,_i=0;_i<Yn.length-1;_i++){var Ai=gi;gi=0;for(var xi=mi&67108863,Ri=Math.min(_i,Ln.length-1),Wn=Math.max(0,_i-vi.length+1);Wn<=Ri;Wn++){var wi=_i-Wn,qi=vi.words[wi]|0,Gi=Ln.words[Wn]|0,ji=qi*Gi,Li=ji&67108863;Ai=Ai+(ji/67108864|0)|0,Li=Li+xi|0,xi=Li&67108863,Ai=Ai+(Li>>>26)|0,gi+=Ai>>>26,Ai&=67108863}Yn.words[_i]=xi,mi=Ai,Ai=gi}return mi!==0?Yn.words[_i]=mi:Yn.length--,Yn._strip()}function Si(vi,Ln,Yn){return Ti(vi,Ln,Yn)}s.prototype.mulTo=function(Ln,Yn){var mi,gi=this.length+Ln.length;return this.length===10&&Ln.length===10?mi=bi(this,Ln,Yn):gi<63?mi=yi(this,Ln,Yn):gi<1024?mi=Ti(this,Ln,Yn):mi=Si(this,Ln,Yn),mi},s.prototype.mul=function(Ln){var Yn=new s(null);return Yn.words=new Array(this.length+Ln.length),this.mulTo(Ln,Yn)},s.prototype.mulf=function(Ln){var Yn=new s(null);return Yn.words=new Array(this.length+Ln.length),Si(this,Ln,Yn)},s.prototype.imul=function(Ln){return this.clone().mulTo(Ln,this)},s.prototype.imuln=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(typeof Ln=="number"),a(Ln<67108864);for(var mi=0,gi=0;gi<this.length;gi++){var _i=(this.words[gi]|0)*Ln,Ai=(_i&67108863)+(mi&67108863);mi>>=26,mi+=_i/67108864|0,mi+=Ai>>>26,this.words[gi]=Ai&67108863}return mi!==0&&(this.words[gi]=mi,this.length++),this.length=Ln===0?1:this.length,Yn?this.ineg():this},s.prototype.muln=function(Ln){return this.clone().imuln(Ln)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(Ln){var Yn=hi(Ln);if(Yn.length===0)return new s(1);for(var mi=this,gi=0;gi<Yn.length&&Yn[gi]===0;gi++,mi=mi.sqr());if(++gi<Yn.length)for(var _i=mi.sqr();gi<Yn.length;gi++,_i=_i.sqr())Yn[gi]!==0&&(mi=mi.mul(_i));return mi},s.prototype.iushln=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26,gi=67108863>>>26-Yn<<26-Yn,_i;if(Yn!==0){var Ai=0;for(_i=0;_i<this.length;_i++){var xi=this.words[_i]&gi,Ri=(this.words[_i]|0)-xi<<Yn;this.words[_i]=Ri|Ai,Ai=xi>>>26-Yn}Ai&&(this.words[_i]=Ai,this.length++)}if(mi!==0){for(_i=this.length-1;_i>=0;_i--)this.words[_i+mi]=this.words[_i];for(_i=0;_i<mi;_i++)this.words[_i]=0;this.length+=mi}return this._strip()},s.prototype.ishln=function(Ln){return a(this.negative===0),this.iushln(Ln)},s.prototype.iushrn=function(Ln,Yn,mi){a(typeof Ln=="number"&&Ln>=0);var gi;Yn?gi=(Yn-Yn%26)/26:gi=0;var _i=Ln%26,Ai=Math.min((Ln-_i)/26,this.length),xi=67108863^67108863>>>_i<<_i,Ri=mi;if(gi-=Ai,gi=Math.max(0,gi),Ri){for(var Wn=0;Wn<Ai;Wn++)Ri.words[Wn]=this.words[Wn];Ri.length=Ai}if(Ai!==0)if(this.length>Ai)for(this.length-=Ai,Wn=0;Wn<this.length;Wn++)this.words[Wn]=this.words[Wn+Ai];else this.words[0]=0,this.length=1;var wi=0;for(Wn=this.length-1;Wn>=0&&(wi!==0||Wn>=gi);Wn--){var qi=this.words[Wn]|0;this.words[Wn]=wi<<26-_i|qi>>>_i,wi=qi&xi}return Ri&&wi!==0&&(Ri.words[Ri.length++]=wi),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(Ln,Yn,mi){return a(this.negative===0),this.iushrn(Ln,Yn,mi)},s.prototype.shln=function(Ln){return this.clone().ishln(Ln)},s.prototype.ushln=function(Ln){return this.clone().iushln(Ln)},s.prototype.shrn=function(Ln){return this.clone().ishrn(Ln)},s.prototype.ushrn=function(Ln){return this.clone().iushrn(Ln)},s.prototype.testn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26,gi=1<<Yn;if(this.length<=mi)return!1;var _i=this.words[mi];return!!(_i&gi)},s.prototype.imaskn=function(Ln){a(typeof Ln=="number"&&Ln>=0);var Yn=Ln%26,mi=(Ln-Yn)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=mi)return this;if(Yn!==0&&mi++,this.length=Math.min(mi,this.length),Yn!==0){var gi=67108863^67108863>>>Yn<<Yn;this.words[this.length-1]&=gi}return this._strip()},s.prototype.maskn=function(Ln){return this.clone().imaskn(Ln)},s.prototype.iaddn=function(Ln){return a(typeof Ln=="number"),a(Ln<67108864),Ln<0?this.isubn(-Ln):this.negative!==0?this.length===1&&(this.words[0]|0)<=Ln?(this.words[0]=Ln-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Ln),this.negative=1,this):this._iaddn(Ln)},s.prototype._iaddn=function(Ln){this.words[0]+=Ln;for(var Yn=0;Yn<this.length&&this.words[Yn]>=67108864;Yn++)this.words[Yn]-=67108864,Yn===this.length-1?this.words[Yn+1]=1:this.words[Yn+1]++;return this.length=Math.max(this.length,Yn+1),this},s.prototype.isubn=function(Ln){if(a(typeof Ln=="number"),a(Ln<67108864),Ln<0)return this.iaddn(-Ln);if(this.negative!==0)return this.negative=0,this.iaddn(Ln),this.negative=1,this;if(this.words[0]-=Ln,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Yn=0;Yn<this.length&&this.words[Yn]<0;Yn++)this.words[Yn]+=67108864,this.words[Yn+1]-=1;return this._strip()},s.prototype.addn=function(Ln){return this.clone().iaddn(Ln)},s.prototype.subn=function(Ln){return this.clone().isubn(Ln)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(Ln,Yn,mi){var gi=Ln.length+mi,_i;this._expand(gi);var Ai,xi=0;for(_i=0;_i<Ln.length;_i++){Ai=(this.words[_i+mi]|0)+xi;var Ri=(Ln.words[_i]|0)*Yn;Ai-=Ri&67108863,xi=(Ai>>26)-(Ri/67108864|0),this.words[_i+mi]=Ai&67108863}for(;_i<this.length-mi;_i++)Ai=(this.words[_i+mi]|0)+xi,xi=Ai>>26,this.words[_i+mi]=Ai&67108863;if(xi===0)return this._strip();for(a(xi===-1),xi=0,_i=0;_i<this.length;_i++)Ai=-(this.words[_i]|0)+xi,xi=Ai>>26,this.words[_i]=Ai&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(Ln,Yn){var mi=this.length-Ln.length,gi=this.clone(),_i=Ln,Ai=_i.words[_i.length-1]|0,xi=this._countBits(Ai);mi=26-xi,mi!==0&&(_i=_i.ushln(mi),gi.iushln(mi),Ai=_i.words[_i.length-1]|0);var Ri=gi.length-_i.length,Wn;if(Yn!=="mod"){Wn=new s(null),Wn.length=Ri+1,Wn.words=new Array(Wn.length);for(var wi=0;wi<Wn.length;wi++)Wn.words[wi]=0}var qi=gi.clone()._ishlnsubmul(_i,1,Ri);qi.negative===0&&(gi=qi,Wn&&(Wn.words[Ri]=1));for(var Gi=Ri-1;Gi>=0;Gi--){var ji=(gi.words[_i.length+Gi]|0)*67108864+(gi.words[_i.length+Gi-1]|0);for(ji=Math.min(ji/Ai|0,67108863),gi._ishlnsubmul(_i,ji,Gi);gi.negative!==0;)ji--,gi.negative=0,gi._ishlnsubmul(_i,1,Gi),gi.isZero()||(gi.negative^=1);Wn&&(Wn.words[Gi]=ji)}return Wn&&Wn._strip(),gi._strip(),Yn!=="div"&&mi!==0&&gi.iushrn(mi),{div:Wn||null,mod:gi}},s.prototype.divmod=function(Ln,Yn,mi){if(a(!Ln.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var gi,_i,Ai;return this.negative!==0&&Ln.negative===0?(Ai=this.neg().divmod(Ln,Yn),Yn!=="mod"&&(gi=Ai.div.neg()),Yn!=="div"&&(_i=Ai.mod.neg(),mi&&_i.negative!==0&&_i.iadd(Ln)),{div:gi,mod:_i}):this.negative===0&&Ln.negative!==0?(Ai=this.divmod(Ln.neg(),Yn),Yn!=="mod"&&(gi=Ai.div.neg()),{div:gi,mod:Ai.mod}):(this.negative&Ln.negative)!==0?(Ai=this.neg().divmod(Ln.neg(),Yn),Yn!=="div"&&(_i=Ai.mod.neg(),mi&&_i.negative!==0&&_i.isub(Ln)),{div:Ai.div,mod:_i}):Ln.length>this.length||this.cmp(Ln)<0?{div:new s(0),mod:this}:Ln.length===1?Yn==="div"?{div:this.divn(Ln.words[0]),mod:null}:Yn==="mod"?{div:null,mod:new s(this.modrn(Ln.words[0]))}:{div:this.divn(Ln.words[0]),mod:new s(this.modrn(Ln.words[0]))}:this._wordDiv(Ln,Yn)},s.prototype.div=function(Ln){return this.divmod(Ln,"div",!1).div},s.prototype.mod=function(Ln){return this.divmod(Ln,"mod",!1).mod},s.prototype.umod=function(Ln){return this.divmod(Ln,"mod",!0).mod},s.prototype.divRound=function(Ln){var Yn=this.divmod(Ln);if(Yn.mod.isZero())return Yn.div;var mi=Yn.div.negative!==0?Yn.mod.isub(Ln):Yn.mod,gi=Ln.ushrn(1),_i=Ln.andln(1),Ai=mi.cmp(gi);return Ai<0||_i===1&&Ai===0?Yn.div:Yn.div.negative!==0?Yn.div.isubn(1):Yn.div.iaddn(1)},s.prototype.modrn=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(Ln<=67108863);for(var mi=(1<<26)%Ln,gi=0,_i=this.length-1;_i>=0;_i--)gi=(mi*gi+(this.words[_i]|0))%Ln;return Yn?-gi:gi},s.prototype.modn=function(Ln){return this.modrn(Ln)},s.prototype.idivn=function(Ln){var Yn=Ln<0;Yn&&(Ln=-Ln),a(Ln<=67108863);for(var mi=0,gi=this.length-1;gi>=0;gi--){var _i=(this.words[gi]|0)+mi*67108864;this.words[gi]=_i/Ln|0,mi=_i%Ln}return this._strip(),Yn?this.ineg():this},s.prototype.divn=function(Ln){return this.clone().idivn(Ln)},s.prototype.egcd=function(Ln){a(Ln.negative===0),a(!Ln.isZero());var Yn=this,mi=Ln.clone();Yn.negative!==0?Yn=Yn.umod(Ln):Yn=Yn.clone();for(var gi=new s(1),_i=new s(0),Ai=new s(0),xi=new s(1),Ri=0;Yn.isEven()&&mi.isEven();)Yn.iushrn(1),mi.iushrn(1),++Ri;for(var Wn=mi.clone(),wi=Yn.clone();!Yn.isZero();){for(var qi=0,Gi=1;(Yn.words[0]&Gi)===0&&qi<26;++qi,Gi<<=1);if(qi>0)for(Yn.iushrn(qi);qi-- >0;)(gi.isOdd()||_i.isOdd())&&(gi.iadd(Wn),_i.isub(wi)),gi.iushrn(1),_i.iushrn(1);for(var ji=0,Li=1;(mi.words[0]&Li)===0&&ji<26;++ji,Li<<=1);if(ji>0)for(mi.iushrn(ji);ji-- >0;)(Ai.isOdd()||xi.isOdd())&&(Ai.iadd(Wn),xi.isub(wi)),Ai.iushrn(1),xi.iushrn(1);Yn.cmp(mi)>=0?(Yn.isub(mi),gi.isub(Ai),_i.isub(xi)):(mi.isub(Yn),Ai.isub(gi),xi.isub(_i))}return{a:Ai,b:xi,gcd:mi.iushln(Ri)}},s.prototype._invmp=function(Ln){a(Ln.negative===0),a(!Ln.isZero());var Yn=this,mi=Ln.clone();Yn.negative!==0?Yn=Yn.umod(Ln):Yn=Yn.clone();for(var gi=new s(1),_i=new s(0),Ai=mi.clone();Yn.cmpn(1)>0&&mi.cmpn(1)>0;){for(var xi=0,Ri=1;(Yn.words[0]&Ri)===0&&xi<26;++xi,Ri<<=1);if(xi>0)for(Yn.iushrn(xi);xi-- >0;)gi.isOdd()&&gi.iadd(Ai),gi.iushrn(1);for(var Wn=0,wi=1;(mi.words[0]&wi)===0&&Wn<26;++Wn,wi<<=1);if(Wn>0)for(mi.iushrn(Wn);Wn-- >0;)_i.isOdd()&&_i.iadd(Ai),_i.iushrn(1);Yn.cmp(mi)>=0?(Yn.isub(mi),gi.isub(_i)):(mi.isub(Yn),_i.isub(gi))}var qi;return Yn.cmpn(1)===0?qi=gi:qi=_i,qi.cmpn(0)<0&&qi.iadd(Ln),qi},s.prototype.gcd=function(Ln){if(this.isZero())return Ln.abs();if(Ln.isZero())return this.abs();var Yn=this.clone(),mi=Ln.clone();Yn.negative=0,mi.negative=0;for(var gi=0;Yn.isEven()&&mi.isEven();gi++)Yn.iushrn(1),mi.iushrn(1);do{for(;Yn.isEven();)Yn.iushrn(1);for(;mi.isEven();)mi.iushrn(1);var _i=Yn.cmp(mi);if(_i<0){var Ai=Yn;Yn=mi,mi=Ai}else if(_i===0||mi.cmpn(1)===0)break;Yn.isub(mi)}while(!0);return mi.iushln(gi)},s.prototype.invm=function(Ln){return this.egcd(Ln).a.umod(Ln)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(Ln){return this.words[0]&Ln},s.prototype.bincn=function(Ln){a(typeof Ln=="number");var Yn=Ln%26,mi=(Ln-Yn)/26,gi=1<<Yn;if(this.length<=mi)return this._expand(mi+1),this.words[mi]|=gi,this;for(var _i=gi,Ai=mi;_i!==0&&Ai<this.length;Ai++){var xi=this.words[Ai]|0;xi+=_i,_i=xi>>>26,xi&=67108863,this.words[Ai]=xi}return _i!==0&&(this.words[Ai]=_i,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(Ln){var Yn=Ln<0;if(this.negative!==0&&!Yn)return-1;if(this.negative===0&&Yn)return 1;this._strip();var mi;if(this.length>1)mi=1;else{Yn&&(Ln=-Ln),a(Ln<=67108863,"Number is too big");var gi=this.words[0]|0;mi=gi===Ln?0:gi<Ln?-1:1}return this.negative!==0?-mi|0:mi},s.prototype.cmp=function(Ln){if(this.negative!==0&&Ln.negative===0)return-1;if(this.negative===0&&Ln.negative!==0)return 1;var Yn=this.ucmp(Ln);return this.negative!==0?-Yn|0:Yn},s.prototype.ucmp=function(Ln){if(this.length>Ln.length)return 1;if(this.length<Ln.length)return-1;for(var Yn=0,mi=this.length-1;mi>=0;mi--){var gi=this.words[mi]|0,_i=Ln.words[mi]|0;if(gi!==_i){gi<_i?Yn=-1:gi>_i&&(Yn=1);break}}return Yn},s.prototype.gtn=function(Ln){return this.cmpn(Ln)===1},s.prototype.gt=function(Ln){return this.cmp(Ln)===1},s.prototype.gten=function(Ln){return this.cmpn(Ln)>=0},s.prototype.gte=function(Ln){return this.cmp(Ln)>=0},s.prototype.ltn=function(Ln){return this.cmpn(Ln)===-1},s.prototype.lt=function(Ln){return this.cmp(Ln)===-1},s.prototype.lten=function(Ln){return this.cmpn(Ln)<=0},s.prototype.lte=function(Ln){return this.cmp(Ln)<=0},s.prototype.eqn=function(Ln){return this.cmpn(Ln)===0},s.prototype.eq=function(Ln){return this.cmp(Ln)===0},s.red=function(Ln){return new Ci(Ln)},s.prototype.toRed=function(Ln){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),Ln.convertTo(this)._forceRed(Ln)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(Ln){return this.red=Ln,this},s.prototype.forceRed=function(Ln){return a(!this.red,"Already a number in reduction context"),this._forceRed(Ln)},s.prototype.redAdd=function(Ln){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,Ln)},s.prototype.redIAdd=function(Ln){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Ln)},s.prototype.redSub=function(Ln){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,Ln)},s.prototype.redISub=function(Ln){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,Ln)},s.prototype.redShl=function(Ln){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,Ln)},s.prototype.redMul=function(Ln){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ln),this.red.mul(this,Ln)},s.prototype.redIMul=function(Ln){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ln),this.red.imul(this,Ln)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(Ln){return a(this.red&&!Ln.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Ln)};var Ii={k256:null,p224:null,p192:null,p25519:null};function Ni(vi,Ln){this.name=vi,this.p=new s(Ln,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Ni.prototype._tmp=function(){var Ln=new s(null);return Ln.words=new Array(Math.ceil(this.n/13)),Ln},Ni.prototype.ireduce=function(Ln){var Yn=Ln,mi;do this.split(Yn,this.tmp),Yn=this.imulK(Yn),Yn=Yn.iadd(this.tmp),mi=Yn.bitLength();while(mi>this.n);var gi=mi<this.n?-1:Yn.ucmp(this.p);return gi===0?(Yn.words[0]=0,Yn.length=1):gi>0?Yn.isub(this.p):Yn.strip!==void 0?Yn.strip():Yn._strip(),Yn},Ni.prototype.split=function(Ln,Yn){Ln.iushrn(this.n,0,Yn)},Ni.prototype.imulK=function(Ln){return Ln.imul(this.k)};function Oi(){Ni.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}u(Oi,Ni),Oi.prototype.split=function(Ln,Yn){for(var mi=4194303,gi=Math.min(Ln.length,9),_i=0;_i<gi;_i++)Yn.words[_i]=Ln.words[_i];if(Yn.length=gi,Ln.length<=9){Ln.words[0]=0,Ln.length=1;return}var Ai=Ln.words[9];for(Yn.words[Yn.length++]=Ai&mi,_i=10;_i<Ln.length;_i++){var xi=Ln.words[_i]|0;Ln.words[_i-10]=(xi&mi)<<4|Ai>>>22,Ai=xi}Ai>>>=22,Ln.words[_i-10]=Ai,Ai===0&&Ln.length>10?Ln.length-=10:Ln.length-=9},Oi.prototype.imulK=function(Ln){Ln.words[Ln.length]=0,Ln.words[Ln.length+1]=0,Ln.length+=2;for(var Yn=0,mi=0;mi<Ln.length;mi++){var gi=Ln.words[mi]|0;Yn+=gi*977,Ln.words[mi]=Yn&67108863,Yn=gi*64+(Yn/67108864|0)}return Ln.words[Ln.length-1]===0&&(Ln.length--,Ln.words[Ln.length-1]===0&&Ln.length--),Ln};function Fi(){Ni.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}u(Fi,Ni);function Mi(){Ni.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}u(Mi,Ni);function ki(){Ni.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}u(ki,Ni),ki.prototype.imulK=function(Ln){for(var Yn=0,mi=0;mi<Ln.length;mi++){var gi=(Ln.words[mi]|0)*19+Yn,_i=gi&67108863;gi>>>=26,Ln.words[mi]=_i,Yn=gi}return Yn!==0&&(Ln.words[Ln.length++]=Yn),Ln},s._prime=function(Ln){if(Ii[Ln])return Ii[Ln];var Yn;if(Ln==="k256")Yn=new Oi;else if(Ln==="p224")Yn=new Fi;else if(Ln==="p192")Yn=new Mi;else if(Ln==="p25519")Yn=new ki;else throw new Error("Unknown prime "+Ln);return Ii[Ln]=Yn,Yn};function Ci(vi){if(typeof vi=="string"){var Ln=s._prime(vi);this.m=Ln.p,this.prime=Ln}else a(vi.gtn(1),"modulus must be greater than 1"),this.m=vi,this.prime=null}Ci.prototype._verify1=function(Ln){a(Ln.negative===0,"red works only with positives"),a(Ln.red,"red works only with red numbers")},Ci.prototype._verify2=function(Ln,Yn){a((Ln.negative|Yn.negative)===0,"red works only with positives"),a(Ln.red&&Ln.red===Yn.red,"red works only with red numbers")},Ci.prototype.imod=function(Ln){return this.prime?this.prime.ireduce(Ln)._forceRed(this):(v(Ln,Ln.umod(this.m)._forceRed(this)),Ln)},Ci.prototype.neg=function(Ln){return Ln.isZero()?Ln.clone():this.m.sub(Ln)._forceRed(this)},Ci.prototype.add=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.add(Yn);return mi.cmp(this.m)>=0&&mi.isub(this.m),mi._forceRed(this)},Ci.prototype.iadd=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.iadd(Yn);return mi.cmp(this.m)>=0&&mi.isub(this.m),mi},Ci.prototype.sub=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.sub(Yn);return mi.cmpn(0)<0&&mi.iadd(this.m),mi._forceRed(this)},Ci.prototype.isub=function(Ln,Yn){this._verify2(Ln,Yn);var mi=Ln.isub(Yn);return mi.cmpn(0)<0&&mi.iadd(this.m),mi},Ci.prototype.shl=function(Ln,Yn){return this._verify1(Ln),this.imod(Ln.ushln(Yn))},Ci.prototype.imul=function(Ln,Yn){return this._verify2(Ln,Yn),this.imod(Ln.imul(Yn))},Ci.prototype.mul=function(Ln,Yn){return this._verify2(Ln,Yn),this.imod(Ln.mul(Yn))},Ci.prototype.isqr=function(Ln){return this.imul(Ln,Ln.clone())},Ci.prototype.sqr=function(Ln){return this.mul(Ln,Ln)},Ci.prototype.sqrt=function(Ln){if(Ln.isZero())return Ln.clone();var Yn=this.m.andln(3);if(a(Yn%2===1),Yn===3){var mi=this.m.add(new s(1)).iushrn(2);return this.pow(Ln,mi)}for(var gi=this.m.subn(1),_i=0;!gi.isZero()&&gi.andln(1)===0;)_i++,gi.iushrn(1);a(!gi.isZero());var Ai=new s(1).toRed(this),xi=Ai.redNeg(),Ri=this.m.subn(1).iushrn(1),Wn=this.m.bitLength();for(Wn=new s(2*Wn*Wn).toRed(this);this.pow(Wn,Ri).cmp(xi)!==0;)Wn.redIAdd(xi);for(var wi=this.pow(Wn,gi),qi=this.pow(Ln,gi.addn(1).iushrn(1)),Gi=this.pow(Ln,gi),ji=_i;Gi.cmp(Ai)!==0;){for(var Li=Gi,$i=0;Li.cmp(Ai)!==0;$i++)Li=Li.redSqr();a($i<ji);var zi=this.pow(wi,new s(1).iushln(ji-$i-1));qi=qi.redMul(zi),wi=zi.redSqr(),Gi=Gi.redMul(wi),ji=$i}return qi},Ci.prototype.invm=function(Ln){var Yn=Ln._invmp(this.m);return Yn.negative!==0?(Yn.negative=0,this.imod(Yn).redNeg()):this.imod(Yn)},Ci.prototype.pow=function(Ln,Yn){if(Yn.isZero())return new s(1).toRed(this);if(Yn.cmpn(1)===0)return Ln.clone();var mi=4,gi=new Array(1<<mi);gi[0]=new s(1).toRed(this),gi[1]=Ln;for(var _i=2;_i<gi.length;_i++)gi[_i]=this.mul(gi[_i-1],Ln);var Ai=gi[0],xi=0,Ri=0,Wn=Yn.bitLength()%26;for(Wn===0&&(Wn=26),_i=Yn.length-1;_i>=0;_i--){for(var wi=Yn.words[_i],qi=Wn-1;qi>=0;qi--){var Gi=wi>>qi&1;if(Ai!==gi[0]&&(Ai=this.sqr(Ai)),Gi===0&&xi===0){Ri=0;continue}xi<<=1,xi|=Gi,Ri++,!(Ri!==mi&&(_i!==0||qi!==0))&&(Ai=this.mul(Ai,gi[xi]),Ri=0,xi=0)}Wn=26}return Ai},Ci.prototype.convertTo=function(Ln){var Yn=Ln.umod(this.m);return Yn===Ln?Yn.clone():Yn},Ci.prototype.convertFrom=function(Ln){var Yn=Ln.clone();return Yn.red=null,Yn},s.mont=function(Ln){return new Ei(Ln)};function Ei(vi){Ci.call(this,vi),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}u(Ei,Ci),Ei.prototype.convertTo=function(Ln){return this.imod(Ln.ushln(this.shift))},Ei.prototype.convertFrom=function(Ln){var Yn=this.imod(Ln.mul(this.rinv));return Yn.red=null,Yn},Ei.prototype.imul=function(Ln,Yn){if(Ln.isZero()||Yn.isZero())return Ln.words[0]=0,Ln.length=1,Ln;var mi=Ln.imul(Yn),gi=mi.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_i=mi.isub(gi).iushrn(this.shift),Ai=_i;return _i.cmp(this.m)>=0?Ai=_i.isub(this.m):_i.cmpn(0)<0&&(Ai=_i.iadd(this.m)),Ai._forceRed(this)},Ei.prototype.mul=function(Ln,Yn){if(Ln.isZero()||Yn.isZero())return new s(0)._forceRed(this);var mi=Ln.mul(Yn),gi=mi.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_i=mi.isub(gi).iushrn(this.shift),Ai=_i;return _i.cmp(this.m)>=0?Ai=_i.isub(this.m):_i.cmpn(0)<0&&(Ai=_i.iadd(this.m)),Ai._forceRed(this)},Ei.prototype.invm=function(Ln){var Yn=this.imod(Ln._invmp(this.m).mul(this.r2));return Yn._forceRed(this)}})(r,bn)}(bn$1)),bn$1.exports}var asn1$1={},asn1={},api$1={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,function(exports){var indexOf=function(r,n){if(r.indexOf)return r.indexOf(n);for(var i=0;i<r.length;i++)if(r[i]===n)return i;return-1},Object_keys=function(r){if(Object.keys)return Object.keys(r);var n=[];for(var i in r)n.push(i);return n},forEach=function(r,n){if(r.forEach)return r.forEach(n);for(var i=0;i<r.length;i++)n(r[i],i,r)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(r,n,i){Object.defineProperty(r,n,{writable:!0,enumerable:!1,configurable:!0,value:i})}}catch{return function(n,i,a){n[i]=a}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(n){if(!(this instanceof Script))return new Script(n);this.code=n};Script.prototype.runInContext=function(r){if(!(r instanceof Context))throw new TypeError("needs a 'context' argument.");var n=document.createElement("iframe");n.style||(n.style={}),n.style.display="none",document.body.appendChild(n);var i=n.contentWindow,a=i.eval,u=i.execScript;!a&&u&&(u.call(i,"null"),a=i.eval),forEach(Object_keys(r),function(D){i[D]=r[D]}),forEach(globals,function(D){r[D]&&(i[D]=r[D])});var s=Object_keys(i),l=a.call(i,this.code);return forEach(Object_keys(i),function(D){(D in r||indexOf(s,D)===-1)&&(r[D]=i[D])}),forEach(globals,function(D){D in r||defineProp(r,D,i[D])}),document.body.removeChild(n),l},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(r){var n=Script.createContext(r),i=this.runInContext(n);return r&&forEach(Object_keys(n),function(a){r[a]=n[a]}),i},forEach(Object_keys(Script.prototype),function(r){exports[r]=Script[r]=function(n){var i=Script(n);return i[r].apply(i,[].slice.call(arguments,1))}}),exports.isContext=function(r){return r instanceof Context},exports.createScript=function(r){return exports.Script(r)},exports.createContext=Script.createContext=function(r){var n=new Context;return typeof r=="object"&&forEach(Object_keys(r),function(i){n[i]=r[i]}),n}}(vmBrowserify)),vmBrowserify}var hasRequiredApi$1;function requireApi$1(){return hasRequiredApi$1||(hasRequiredApi$1=1,function(r){var n=requireAsn1$1(),i=requireInherits_browser(),a=r;a.define=function(l,D){return new u(l,D)};function u(s,l){this.name=s,this.body=l,this.decoders={},this.encoders={}}u.prototype._createNamed=function(l){var D;try{D=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
99
99
  this._initNamed(entity);
100
100
  })`)}catch{D=function(h){this._initNamed(h)}}return i(D,l),D.prototype._initNamed=function(h){l.call(this,h)},new D(this)},u.prototype._getDecoder=function(l){return l=l||"der",this.decoders.hasOwnProperty(l)||(this.decoders[l]=this._createNamed(n.decoders[l])),this.decoders[l]},u.prototype.decode=function(l,D,on){return this._getDecoder(D).decode(l,on)},u.prototype._getEncoder=function(l){return l=l||"der",this.encoders.hasOwnProperty(l)||(this.encoders[l]=this._createNamed(n.encoders[l])),this.encoders[l]},u.prototype.encode=function(l,D,on){return this._getEncoder(D).encode(l,on)}}(api$1)),api$1}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var r=requireInherits_browser();function n(a){this._reporterState={obj:null,path:[],options:a||{},errors:[]}}reporter.Reporter=n,n.prototype.isError=function(u){return u instanceof i},n.prototype.save=function(){var u=this._reporterState;return{obj:u.obj,pathLen:u.path.length}},n.prototype.restore=function(u){var s=this._reporterState;s.obj=u.obj,s.path=s.path.slice(0,u.pathLen)},n.prototype.enterKey=function(u){return this._reporterState.path.push(u)},n.prototype.exitKey=function(u){var s=this._reporterState;s.path=s.path.slice(0,u-1)},n.prototype.leaveKey=function(u,s,l){var D=this._reporterState;this.exitKey(u),D.obj!==null&&(D.obj[s]=l)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var u=this._reporterState,s=u.obj;return u.obj={},s},n.prototype.leaveObject=function(u){var s=this._reporterState,l=s.obj;return s.obj=u,l},n.prototype.error=function(u){var s,l=this._reporterState,D=u instanceof i;if(D?s=u:s=new i(l.path.map(function(on){return"["+JSON.stringify(on)+"]"}).join(""),u.message||u,u.stack),!l.options.partial)throw s;return D||l.errors.push(s),s},n.prototype.wrapResult=function(u){var s=this._reporterState;return s.options.partial?{result:this.isError(u)?null:u,errors:s.errors}:u};function i(a,u){this.path=a,this.rethrow(u)}return r(i,Error),i.prototype.rethrow=function(u){if(this.message=u+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(s){this.stack=s.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var r=requireInherits_browser(),n=requireBase().Reporter,i=requireDist().Buffer;function a(s,l){if(n.call(this,l),!i.isBuffer(s)){this.error("Input not Buffer");return}this.base=s,this.offset=0,this.length=s.length}r(a,n),buffer.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},a.prototype.restore=function(l){var D=new a(this.base);return D.offset=l.offset,D.length=this.offset,this.offset=l.offset,n.prototype.restore.call(this,l.reporter),D},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},a.prototype.skip=function(l,D){if(!(this.offset+l<=this.length))return this.error(D||"DecoderBuffer overrun");var on=new a(this.base);return on._reporterState=this._reporterState,on.offset=this.offset,on.length=this.offset+l,this.offset+=l,on},a.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)};function u(s,l){if(Array.isArray(s))this.length=0,this.value=s.map(function(D){return D instanceof u||(D=new u(D,l)),this.length+=D.length,D},this);else if(typeof s=="number"){if(!(0<=s&&s<=255))return l.error("non-byte EncoderBuffer value");this.value=s,this.length=1}else if(typeof s=="string")this.value=s,this.length=i.byteLength(s);else if(i.isBuffer(s))this.value=s,this.length=s.length;else return l.error("Unsupported type: "+typeof s)}return buffer.EncoderBuffer=u,u.prototype.join=function(l,D){return l||(l=new i(this.length)),D||(D=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(on){on.join(l,D),D+=on.length}):(typeof this.value=="number"?l[D]=this.value:typeof this.value=="string"?l.write(this.value,D):i.isBuffer(this.value)&&this.value.copy(l,D),D+=this.length)),l},buffer}var node$1,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node$1;hasRequiredNode=1;var r=requireBase().Reporter,n=requireBase().EncoderBuffer,i=requireBase().DecoderBuffer,a=requireMinimalisticAssert(),u=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u),l=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function D(h,v){var In={};this._baseState=In,In.enc=h,In.parent=v||null,In.children=null,In.tag=null,In.args=null,In.reverseArgs=null,In.choice=null,In.optional=!1,In.any=!1,In.obj=!1,In.use=null,In.useDecoder=null,In.key=null,In.default=null,In.explicit=null,In.implicit=null,In.contains=null,In.parent||(In.children=[],this._wrap())}node$1=D;var on=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return D.prototype.clone=function(){var v=this._baseState,In={};on.forEach(function(Mn){In[Mn]=v[Mn]});var Rn=new this.constructor(In.parent);return Rn._baseState=In,Rn},D.prototype._wrap=function(){var v=this._baseState;s.forEach(function(In){this[In]=function(){var Mn=new this.constructor(this);return v.children.push(Mn),Mn[In].apply(Mn,arguments)}},this)},D.prototype._init=function(v){var In=this._baseState;a(In.parent===null),v.call(this),In.children=In.children.filter(function(Rn){return Rn._baseState.parent===this},this),a.equal(In.children.length,1,"Root node can have only one child")},D.prototype._useArgs=function(v){var In=this._baseState,Rn=v.filter(function(Mn){return Mn instanceof this.constructor},this);v=v.filter(function(Mn){return!(Mn instanceof this.constructor)},this),Rn.length!==0&&(a(In.children===null),In.children=Rn,Rn.forEach(function(Mn){Mn._baseState.parent=this},this)),v.length!==0&&(a(In.args===null),In.args=v,In.reverseArgs=v.map(function(Mn){if(typeof Mn!="object"||Mn.constructor!==Object)return Mn;var jn={};return Object.keys(Mn).forEach(function(Hn){Hn==(Hn|0)&&(Hn|=0);var hi=Mn[Hn];jn[hi]=Hn}),jn}))},l.forEach(function(h){D.prototype[h]=function(){var In=this._baseState;throw new Error(h+" not implemented for encoding: "+In.enc)}}),u.forEach(function(h){D.prototype[h]=function(){var In=this._baseState,Rn=Array.prototype.slice.call(arguments);return a(In.tag===null),In.tag=h,this._useArgs(Rn),this}}),D.prototype.use=function(v){a(v);var In=this._baseState;return a(In.use===null),In.use=v,this},D.prototype.optional=function(){var v=this._baseState;return v.optional=!0,this},D.prototype.def=function(v){var In=this._baseState;return a(In.default===null),In.default=v,In.optional=!0,this},D.prototype.explicit=function(v){var In=this._baseState;return a(In.explicit===null&&In.implicit===null),In.explicit=v,this},D.prototype.implicit=function(v){var In=this._baseState;return a(In.explicit===null&&In.implicit===null),In.implicit=v,this},D.prototype.obj=function(){var v=this._baseState,In=Array.prototype.slice.call(arguments);return v.obj=!0,In.length!==0&&this._useArgs(In),this},D.prototype.key=function(v){var In=this._baseState;return a(In.key===null),In.key=v,this},D.prototype.any=function(){var v=this._baseState;return v.any=!0,this},D.prototype.choice=function(v){var In=this._baseState;return a(In.choice===null),In.choice=v,this._useArgs(Object.keys(v).map(function(Rn){return v[Rn]})),this},D.prototype.contains=function(v){var In=this._baseState;return a(In.use===null),In.contains=v,this},D.prototype._decode=function(v,In){var Rn=this._baseState;if(Rn.parent===null)return v.wrapResult(Rn.children[0]._decode(v,In));var Mn=Rn.default,jn=!0,Hn=null;if(Rn.key!==null&&(Hn=v.enterKey(Rn.key)),Rn.optional){var hi=null;if(Rn.explicit!==null?hi=Rn.explicit:Rn.implicit!==null?hi=Rn.implicit:Rn.tag!==null&&(hi=Rn.tag),hi===null&&!Rn.any){var yi=v.save();try{Rn.choice===null?this._decodeGeneric(Rn.tag,v,In):this._decodeChoice(v,In),jn=!0}catch{jn=!1}v.restore(yi)}else if(jn=this._peekTag(v,hi,Rn.any),v.isError(jn))return jn}var bi;if(Rn.obj&&jn&&(bi=v.enterObject()),jn){if(Rn.explicit!==null){var Ti=this._decodeTag(v,Rn.explicit);if(v.isError(Ti))return Ti;v=Ti}var Si=v.offset;if(Rn.use===null&&Rn.choice===null){if(Rn.any)var yi=v.save();var Ii=this._decodeTag(v,Rn.implicit!==null?Rn.implicit:Rn.tag,Rn.any);if(v.isError(Ii))return Ii;Rn.any?Mn=v.raw(yi):v=Ii}if(In&&In.track&&Rn.tag!==null&&In.track(v.path(),Si,v.length,"tagged"),In&&In.track&&Rn.tag!==null&&In.track(v.path(),v.offset,v.length,"content"),Rn.any?Mn=Mn:Rn.choice===null?Mn=this._decodeGeneric(Rn.tag,v,In):Mn=this._decodeChoice(v,In),v.isError(Mn))return Mn;if(!Rn.any&&Rn.choice===null&&Rn.children!==null&&Rn.children.forEach(function(Fi){Fi._decode(v,In)}),Rn.contains&&(Rn.tag==="octstr"||Rn.tag==="bitstr")){var Ni=new i(Mn);Mn=this._getUse(Rn.contains,v._reporterState.obj)._decode(Ni,In)}}return Rn.obj&&jn&&(Mn=v.leaveObject(bi)),Rn.key!==null&&(Mn!==null||jn===!0)?v.leaveKey(Hn,Rn.key,Mn):Hn!==null&&v.exitKey(Hn),Mn},D.prototype._decodeGeneric=function(v,In,Rn){var Mn=this._baseState;return v==="seq"||v==="set"?null:v==="seqof"||v==="setof"?this._decodeList(In,v,Mn.args[0],Rn):/str$/.test(v)?this._decodeStr(In,v,Rn):v==="objid"&&Mn.args?this._decodeObjid(In,Mn.args[0],Mn.args[1],Rn):v==="objid"?this._decodeObjid(In,null,null,Rn):v==="gentime"||v==="utctime"?this._decodeTime(In,v,Rn):v==="null_"?this._decodeNull(In,Rn):v==="bool"?this._decodeBool(In,Rn):v==="objDesc"?this._decodeStr(In,v,Rn):v==="int"||v==="enum"?this._decodeInt(In,Mn.args&&Mn.args[0],Rn):Mn.use!==null?this._getUse(Mn.use,In._reporterState.obj)._decode(In,Rn):In.error("unknown tag: "+v)},D.prototype._getUse=function(v,In){var Rn=this._baseState;return Rn.useDecoder=this._use(v,In),a(Rn.useDecoder._baseState.parent===null),Rn.useDecoder=Rn.useDecoder._baseState.children[0],Rn.implicit!==Rn.useDecoder._baseState.implicit&&(Rn.useDecoder=Rn.useDecoder.clone(),Rn.useDecoder._baseState.implicit=Rn.implicit),Rn.useDecoder},D.prototype._decodeChoice=function(v,In){var Rn=this._baseState,Mn=null,jn=!1;return Object.keys(Rn.choice).some(function(Hn){var hi=v.save(),yi=Rn.choice[Hn];try{var bi=yi._decode(v,In);if(v.isError(bi))return!1;Mn={type:Hn,value:bi},jn=!0}catch{return v.restore(hi),!1}return!0},this),jn?Mn:v.error("Choice not matched")},D.prototype._createEncoderBuffer=function(v){return new n(v,this.reporter)},D.prototype._encode=function(v,In,Rn){var Mn=this._baseState;if(!(Mn.default!==null&&Mn.default===v)){var jn=this._encodeValue(v,In,Rn);if(jn!==void 0&&!this._skipDefault(jn,In,Rn))return jn}},D.prototype._encodeValue=function(v,In,Rn){var Mn=this._baseState;if(Mn.parent===null)return Mn.children[0]._encode(v,In||new r);var yi=null;if(this.reporter=In,Mn.optional&&v===void 0)if(Mn.default!==null)v=Mn.default;else return;var jn=null,Hn=!1;if(Mn.any)yi=this._createEncoderBuffer(v);else if(Mn.choice)yi=this._encodeChoice(v,In);else if(Mn.contains)jn=this._getUse(Mn.contains,Rn)._encode(v,In),Hn=!0;else if(Mn.children)jn=Mn.children.map(function(Si){if(Si._baseState.tag==="null_")return Si._encode(null,In,v);if(Si._baseState.key===null)return In.error("Child should have a key");var Ii=In.enterKey(Si._baseState.key);if(typeof v!="object")return In.error("Child expected, but input is not object");var Ni=Si._encode(v[Si._baseState.key],In,v);return In.leaveKey(Ii),Ni},this).filter(function(Si){return Si}),jn=this._createEncoderBuffer(jn);else if(Mn.tag==="seqof"||Mn.tag==="setof"){if(!(Mn.args&&Mn.args.length===1))return In.error("Too many args for : "+Mn.tag);if(!Array.isArray(v))return In.error("seqof/setof, but data is not Array");var hi=this.clone();hi._baseState.implicit=null,jn=this._createEncoderBuffer(v.map(function(Si){var Ii=this._baseState;return this._getUse(Ii.args[0],v)._encode(Si,In)},hi))}else Mn.use!==null?yi=this._getUse(Mn.use,Rn)._encode(v,In):(jn=this._encodePrimitive(Mn.tag,v),Hn=!0);var yi;if(!Mn.any&&Mn.choice===null){var bi=Mn.implicit!==null?Mn.implicit:Mn.tag,Ti=Mn.implicit===null?"universal":"context";bi===null?Mn.use===null&&In.error("Tag could be omitted only for .use()"):Mn.use===null&&(yi=this._encodeComposite(bi,Hn,Ti,jn))}return Mn.explicit!==null&&(yi=this._encodeComposite(Mn.explicit,!1,"context",yi)),yi},D.prototype._encodeChoice=function(v,In){var Rn=this._baseState,Mn=Rn.choice[v.type];return Mn||a(!1,v.type+" not found in "+JSON.stringify(Object.keys(Rn.choice))),Mn._encode(v.value,In)},D.prototype._encodePrimitive=function(v,In){var Rn=this._baseState;if(/str$/.test(v))return this._encodeStr(In,v);if(v==="objid"&&Rn.args)return this._encodeObjid(In,Rn.reverseArgs[0],Rn.args[1]);if(v==="objid")return this._encodeObjid(In,null,null);if(v==="gentime"||v==="utctime")return this._encodeTime(In,v);if(v==="null_")return this._encodeNull();if(v==="int"||v==="enum")return this._encodeInt(In,Rn.args&&Rn.reverseArgs[0]);if(v==="bool")return this._encodeBool(In);if(v==="objDesc")return this._encodeStr(In,v);throw new Error("Unsupported tag: "+v)},D.prototype._isNumstr=function(v){return/^[0-9 ]*$/.test(v)},D.prototype._isPrintstr=function(v){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(v)},node$1}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,function(r){var n=r;n.Reporter=requireReporter().Reporter,n.DecoderBuffer=requireBuffer().DecoderBuffer,n.EncoderBuffer=requireBuffer().EncoderBuffer,n.Node=requireNode()}(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,function(r){var n=requireConstants();r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.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"},r.tagByName=n._reverse(r.tag)}(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,function(r){var n=r;n._reverse=function(a){var u={};return Object.keys(a).forEach(function(s){(s|0)==s&&(s=s|0);var l=a[s];u[l]=s}),u},n.der=requireDer$2()}(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var r=requireInherits_browser(),n=requireAsn1$1(),i=n.base,a=n.bignum,u=n.constants.der;function s(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new l,this.tree._init(h.body)}der_1$1=s,s.prototype.decode=function(v,In){return v instanceof i.DecoderBuffer||(v=new i.DecoderBuffer(v,In)),this.tree._decode(v,In)};function l(h){i.Node.call(this,"der",h)}r(l,i.Node),l.prototype._peekTag=function(v,In,Rn){if(v.isEmpty())return!1;var Mn=v.save(),jn=D(v,'Failed to peek tag: "'+In+'"');return v.isError(jn)?jn:(v.restore(Mn),jn.tag===In||jn.tagStr===In||jn.tagStr+"of"===In||Rn)},l.prototype._decodeTag=function(v,In,Rn){var Mn=D(v,'Failed to decode tag of "'+In+'"');if(v.isError(Mn))return Mn;var jn=on(v,Mn.primitive,'Failed to get length of "'+In+'"');if(v.isError(jn))return jn;if(!Rn&&Mn.tag!==In&&Mn.tagStr!==In&&Mn.tagStr+"of"!==In)return v.error('Failed to match tag: "'+In+'"');if(Mn.primitive||jn!==null)return v.skip(jn,'Failed to match body of: "'+In+'"');var Hn=v.save(),hi=this._skipUntilEnd(v,'Failed to skip indefinite length body: "'+this.tag+'"');return v.isError(hi)?hi:(jn=v.offset-Hn.offset,v.restore(Hn),v.skip(jn,'Failed to match body of: "'+In+'"'))},l.prototype._skipUntilEnd=function(v,In){for(;;){var Rn=D(v,In);if(v.isError(Rn))return Rn;var Mn=on(v,Rn.primitive,In);if(v.isError(Mn))return Mn;var jn;if(Rn.primitive||Mn!==null?jn=v.skip(Mn):jn=this._skipUntilEnd(v,In),v.isError(jn))return jn;if(Rn.tagStr==="end")break}},l.prototype._decodeList=function(v,In,Rn,Mn){for(var jn=[];!v.isEmpty();){var Hn=this._peekTag(v,"end");if(v.isError(Hn))return Hn;var hi=Rn.decode(v,"der",Mn);if(v.isError(hi)&&Hn)break;jn.push(hi)}return jn},l.prototype._decodeStr=function(v,In){if(In==="bitstr"){var Rn=v.readUInt8();return v.isError(Rn)?Rn:{unused:Rn,data:v.raw()}}else if(In==="bmpstr"){var Mn=v.raw();if(Mn.length%2===1)return v.error("Decoding of string type: bmpstr length mismatch");for(var jn="",Hn=0;Hn<Mn.length/2;Hn++)jn+=String.fromCharCode(Mn.readUInt16BE(Hn*2));return jn}else if(In==="numstr"){var hi=v.raw().toString("ascii");return this._isNumstr(hi)?hi:v.error("Decoding of string type: numstr unsupported characters")}else{if(In==="octstr")return v.raw();if(In==="objDesc")return v.raw();if(In==="printstr"){var yi=v.raw().toString("ascii");return this._isPrintstr(yi)?yi:v.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(In)?v.raw().toString():v.error("Decoding of string type: "+In+" unsupported")}},l.prototype._decodeObjid=function(v,In,Rn){for(var Mn,jn=[],Hn=0;!v.isEmpty();){var hi=v.readUInt8();Hn<<=7,Hn|=hi&127,(hi&128)===0&&(jn.push(Hn),Hn=0)}hi&128&&jn.push(Hn);var yi=jn[0]/40|0,bi=jn[0]%40;if(Rn?Mn=jn:Mn=[yi,bi].concat(jn.slice(1)),In){var Ti=In[Mn.join(" ")];Ti===void 0&&(Ti=In[Mn.join(".")]),Ti!==void 0&&(Mn=Ti)}return Mn},l.prototype._decodeTime=function(v,In){var Rn=v.raw().toString();if(In==="gentime")var Mn=Rn.slice(0,4)|0,jn=Rn.slice(4,6)|0,Hn=Rn.slice(6,8)|0,hi=Rn.slice(8,10)|0,yi=Rn.slice(10,12)|0,bi=Rn.slice(12,14)|0;else if(In==="utctime"){var Mn=Rn.slice(0,2)|0,jn=Rn.slice(2,4)|0,Hn=Rn.slice(4,6)|0,hi=Rn.slice(6,8)|0,yi=Rn.slice(8,10)|0,bi=Rn.slice(10,12)|0;Mn<70?Mn=2e3+Mn:Mn=1900+Mn}else return v.error("Decoding "+In+" time is not supported yet");return Date.UTC(Mn,jn-1,Hn,hi,yi,bi,0)},l.prototype._decodeNull=function(v){return null},l.prototype._decodeBool=function(v){var In=v.readUInt8();return v.isError(In)?In:In!==0},l.prototype._decodeInt=function(v,In){var Rn=v.raw(),Mn=new a(Rn);return In&&(Mn=In[Mn.toString(10)]||Mn),Mn},l.prototype._use=function(v,In){return typeof v=="function"&&(v=v(In)),v._getDecoder("der").tree};function D(h,v){var In=h.readUInt8(v);if(h.isError(In))return In;var Rn=u.tagClass[In>>6],Mn=(In&32)===0;if((In&31)===31){var jn=In;for(In=0;(jn&128)===128;){if(jn=h.readUInt8(v),h.isError(jn))return jn;In<<=7,In|=jn&127}}else In&=31;var Hn=u.tag[In];return{cls:Rn,primitive:Mn,tag:In,tagStr:Hn}}function on(h,v,In){var Rn=h.readUInt8(In);if(h.isError(Rn))return Rn;if(!v&&Rn===128)return null;if((Rn&128)===0)return Rn;var Mn=Rn&127;if(Mn>4)return h.error("length octect is too long");Rn=0;for(var jn=0;jn<Mn;jn++){Rn<<=8;var Hn=h.readUInt8(In);if(h.isError(Hn))return Hn;Rn|=Hn}return Rn}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var r=requireInherits_browser(),n=requireDist().Buffer,i=requireDer$1();function a(u){i.call(this,u),this.enc="pem"}return r(a,i),pem$1=a,a.prototype.decode=function(s,l){for(var D=s.toString().split(/[\r\n]+/g),on=l.label.toUpperCase(),h=/^-----(BEGIN|END) ([^-]+)-----$/,v=-1,In=-1,Rn=0;Rn<D.length;Rn++){var Mn=D[Rn].match(h);if(Mn!==null&&Mn[2]===on)if(v===-1){if(Mn[1]!=="BEGIN")break;v=Rn}else{if(Mn[1]!=="END")break;In=Rn;break}}if(v===-1||In===-1)throw new Error("PEM section not found for: "+on);var jn=D.slice(v+1,In).join("");jn.replace(/[^a-z0-9\+\/=]+/gi,"");var Hn=new n(jn,"base64");return i.prototype.decode.call(this,Hn,l)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,function(r){var n=r;n.der=requireDer$1(),n.pem=requirePem$1()}(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var r=requireInherits_browser(),n=requireDist().Buffer,i=requireAsn1$1(),a=i.base,u=i.constants.der;function s(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new l,this.tree._init(h.body)}der_1=s,s.prototype.encode=function(v,In){return this.tree._encode(v,In).join()};function l(h){a.Node.call(this,"der",h)}r(l,a.Node),l.prototype._encodeComposite=function(v,In,Rn,Mn){var jn=on(v,In,Rn,this.reporter);if(Mn.length<128){var yi=new n(2);return yi[0]=jn,yi[1]=Mn.length,this._createEncoderBuffer([yi,Mn])}for(var Hn=1,hi=Mn.length;hi>=256;hi>>=8)Hn++;var yi=new n(2+Hn);yi[0]=jn,yi[1]=128|Hn;for(var hi=1+Hn,bi=Mn.length;bi>0;hi--,bi>>=8)yi[hi]=bi&255;return this._createEncoderBuffer([yi,Mn])},l.prototype._encodeStr=function(v,In){if(In==="bitstr")return this._createEncoderBuffer([v.unused|0,v.data]);if(In==="bmpstr"){for(var Rn=new n(v.length*2),Mn=0;Mn<v.length;Mn++)Rn.writeUInt16BE(v.charCodeAt(Mn),Mn*2);return this._createEncoderBuffer(Rn)}else return In==="numstr"?this._isNumstr(v)?this._createEncoderBuffer(v):this.reporter.error("Encoding of string type: numstr supports only digits and space"):In==="printstr"?this._isPrintstr(v)?this._createEncoderBuffer(v):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(In)?this._createEncoderBuffer(v):In==="objDesc"?this._createEncoderBuffer(v):this.reporter.error("Encoding of string type: "+In+" unsupported")},l.prototype._encodeObjid=function(v,In,Rn){if(typeof v=="string"){if(!In)return this.reporter.error("string objid given, but no values map found");if(!In.hasOwnProperty(v))return this.reporter.error("objid not found in values map");v=In[v].split(/[\s\.]+/g);for(var Mn=0;Mn<v.length;Mn++)v[Mn]|=0}else if(Array.isArray(v)){v=v.slice();for(var Mn=0;Mn<v.length;Mn++)v[Mn]|=0}if(!Array.isArray(v))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(v));if(!Rn){if(v[1]>=40)return this.reporter.error("Second objid identifier OOB");v.splice(0,2,v[0]*40+v[1])}for(var jn=0,Mn=0;Mn<v.length;Mn++){var Hn=v[Mn];for(jn++;Hn>=128;Hn>>=7)jn++}for(var hi=new n(jn),yi=hi.length-1,Mn=v.length-1;Mn>=0;Mn--){var Hn=v[Mn];for(hi[yi--]=Hn&127;(Hn>>=7)>0;)hi[yi--]=128|Hn&127}return this._createEncoderBuffer(hi)};function D(h){return h<10?"0"+h:h}l.prototype._encodeTime=function(v,In){var Rn,Mn=new Date(v);return In==="gentime"?Rn=[D(Mn.getFullYear()),D(Mn.getUTCMonth()+1),D(Mn.getUTCDate()),D(Mn.getUTCHours()),D(Mn.getUTCMinutes()),D(Mn.getUTCSeconds()),"Z"].join(""):In==="utctime"?Rn=[D(Mn.getFullYear()%100),D(Mn.getUTCMonth()+1),D(Mn.getUTCDate()),D(Mn.getUTCHours()),D(Mn.getUTCMinutes()),D(Mn.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+In+" time is not supported yet"),this._encodeStr(Rn,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(v,In){if(typeof v=="string"){if(!In)return this.reporter.error("String int or enum given, but no values map");if(!In.hasOwnProperty(v))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(v));v=In[v]}if(typeof v!="number"&&!n.isBuffer(v)){var Rn=v.toArray();!v.sign&&Rn[0]&128&&Rn.unshift(0),v=new n(Rn)}if(n.isBuffer(v)){var Mn=v.length;v.length===0&&Mn++;var Hn=new n(Mn);return v.copy(Hn),v.length===0&&(Hn[0]=0),this._createEncoderBuffer(Hn)}if(v<128)return this._createEncoderBuffer(v);if(v<256)return this._createEncoderBuffer([0,v]);for(var Mn=1,jn=v;jn>=256;jn>>=8)Mn++;for(var Hn=new Array(Mn),jn=Hn.length-1;jn>=0;jn--)Hn[jn]=v&255,v>>=8;return Hn[0]&128&&Hn.unshift(0),this._createEncoderBuffer(new n(Hn))},l.prototype._encodeBool=function(v){return this._createEncoderBuffer(v?255:0)},l.prototype._use=function(v,In){return typeof v=="function"&&(v=v(In)),v._getEncoder("der").tree},l.prototype._skipDefault=function(v,In,Rn){var Mn=this._baseState,jn;if(Mn.default===null)return!1;var Hn=v.join();if(Mn.defaultBuffer===void 0&&(Mn.defaultBuffer=this._encodeValue(Mn.default,In,Rn).join()),Hn.length!==Mn.defaultBuffer.length)return!1;for(jn=0;jn<Hn.length;jn++)if(Hn[jn]!==Mn.defaultBuffer[jn])return!1;return!0};function on(h,v,In,Rn){var Mn;if(h==="seqof"?h="seq":h==="setof"&&(h="set"),u.tagByName.hasOwnProperty(h))Mn=u.tagByName[h];else if(typeof h=="number"&&(h|0)===h)Mn=h;else return Rn.error("Unknown tag: "+h);return Mn>=31?Rn.error("Multi-octet tag encoding unsupported"):(v||(Mn|=32),Mn|=u.tagClassByName[In||"universal"]<<6,Mn)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var r=requireInherits_browser(),n=requireDer();function i(a){n.call(this,a),this.enc="pem"}return r(i,n),pem=i,i.prototype.encode=function(u,s){for(var l=n.prototype.encode.call(this,u),D=l.toString("base64"),on=["-----BEGIN "+s.label+"-----"],h=0;h<D.length;h+=64)on.push(D.slice(h,h+64));return on.push("-----END "+s.label+"-----"),on.join(`
@@ -114,7 +114,7 @@ https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={D
114
114
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
115
115
  * derived from CryptoJS.mode.CTR
116
116
  * Jan Hruby jhruby.web@gmail.com
117
- */return i.mode.CTRGladman=function(){var a=i.lib.BlockCipherMode.extend();function u(D){if((D>>24&255)===255){var on=D>>16&255,h=D>>8&255,v=D&255;on===255?(on=0,h===255?(h=0,v===255?v=0:++v):++h):++on,D=0,D+=on<<16,D+=h<<8,D+=v}else D+=1<<24;return D}function s(D){return(D[0]=u(D[0]))===0&&(D[1]=u(D[1])),D}var l=a.Encryptor=a.extend({processBlock:function(D,on){var h=this._cipher,v=h.blockSize,In=this._iv,Rn=this._counter;In&&(Rn=this._counter=In.slice(0),this._iv=void 0),s(Rn);var Mn=Rn.slice(0);h.encryptBlock(Mn,0);for(var jn=0;jn<v;jn++)D[on+jn]^=Mn[jn]}});return a.Decryptor=l,a}(),i.mode.CTRGladman})}(modeCtrGladman$1)),modeCtrGladman$1.exports}var modeOfb$1={exports:{}},modeOfb=modeOfb$1.exports,hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(modeOfb,function(i){return i.mode.OFB=function(){var a=i.lib.BlockCipherMode.extend(),u=a.Encryptor=a.extend({processBlock:function(s,l){var D=this._cipher,on=D.blockSize,h=this._iv,v=this._keystream;h&&(v=this._keystream=h.slice(0),this._iv=void 0),D.encryptBlock(v,0);for(var In=0;In<on;In++)s[l+In]^=v[In]}});return a.Decryptor=u,a}(),i.mode.OFB})}(modeOfb$1)),modeOfb$1.exports}var modeEcb$1={exports:{}},modeEcb=modeEcb$1.exports,hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(modeEcb,function(i){return i.mode.ECB=function(){var a=i.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(u,s){this._cipher.encryptBlock(u,s)}}),a.Decryptor=a.extend({processBlock:function(u,s){this._cipher.decryptBlock(u,s)}}),a}(),i.mode.ECB})}(modeEcb$1)),modeEcb$1.exports}var padAnsix923$1={exports:{}},padAnsix923=padAnsix923$1.exports,hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padAnsix923,function(i){return i.pad.AnsiX923={pad:function(a,u){var s=a.sigBytes,l=u*4,D=l-s%l,on=s+D-1;a.clamp(),a.words[on>>>2]|=D<<24-on%4*8,a.sigBytes+=D},unpad:function(a){var u=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=u}},i.pad.Ansix923})}(padAnsix923$1)),padAnsix923$1.exports}var padIso10126$1={exports:{}},padIso10126=padIso10126$1.exports,hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padIso10126,function(i){return i.pad.Iso10126={pad:function(a,u){var s=u*4,l=s-a.sigBytes%s;a.concat(i.lib.WordArray.random(l-1)).concat(i.lib.WordArray.create([l<<24],1))},unpad:function(a){var u=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=u}},i.pad.Iso10126})}(padIso10126$1)),padIso10126$1.exports}var padIso97971$1={exports:{}},padIso97971=padIso97971$1.exports,hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padIso97971,function(i){return i.pad.Iso97971={pad:function(a,u){a.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(a,u)},unpad:function(a){i.pad.ZeroPadding.unpad(a),a.sigBytes--}},i.pad.Iso97971})}(padIso97971$1)),padIso97971$1.exports}var padZeropadding$1={exports:{}},padZeropadding=padZeropadding$1.exports,hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padZeropadding,function(i){return i.pad.ZeroPadding={pad:function(a,u){var s=u*4;a.clamp(),a.sigBytes+=s-(a.sigBytes%s||s)},unpad:function(a){for(var u=a.words,s=a.sigBytes-1,s=a.sigBytes-1;s>=0;s--)if(u[s>>>2]>>>24-s%4*8&255){a.sigBytes=s+1;break}}},i.pad.ZeroPadding})}(padZeropadding$1)),padZeropadding$1.exports}var padNopadding$1={exports:{}},padNopadding=padNopadding$1.exports,hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padNopadding,function(i){return i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding})}(padNopadding$1)),padNopadding$1.exports}var formatHex$1={exports:{}},formatHex=formatHex$1.exports,hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(formatHex,function(i){return function(a){var u=i,s=u.lib,l=s.CipherParams,D=u.enc,on=D.Hex,h=u.format;h.Hex={stringify:function(v){return v.ciphertext.toString(on)},parse:function(v){var In=on.parse(v);return l.create({ciphertext:In})}}}(),i.format.Hex})}(formatHex$1)),formatHex$1.exports}var aes$1={exports:{}},aes=aes$1.exports,hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(aes,function(i){return function(){var a=i,u=a.lib,s=u.BlockCipher,l=a.algo,D=[],on=[],h=[],v=[],In=[],Rn=[],Mn=[],jn=[],Hn=[],hi=[];(function(){for(var Ti=[],Si=0;Si<256;Si++)Si<128?Ti[Si]=Si<<1:Ti[Si]=Si<<1^283;for(var Ii=0,Ni=0,Si=0;Si<256;Si++){var Oi=Ni^Ni<<1^Ni<<2^Ni<<3^Ni<<4;Oi=Oi>>>8^Oi&255^99,D[Ii]=Oi,on[Oi]=Ii;var Fi=Ti[Ii],Mi=Ti[Fi],ki=Ti[Mi],Ci=Ti[Oi]*257^Oi*16843008;h[Ii]=Ci<<24|Ci>>>8,v[Ii]=Ci<<16|Ci>>>16,In[Ii]=Ci<<8|Ci>>>24,Rn[Ii]=Ci;var Ci=ki*16843009^Mi*65537^Fi*257^Ii*16843008;Mn[Oi]=Ci<<24|Ci>>>8,jn[Oi]=Ci<<16|Ci>>>16,Hn[Oi]=Ci<<8|Ci>>>24,hi[Oi]=Ci,Ii?(Ii=Fi^Ti[Ti[Ti[ki^Fi]]],Ni^=Ti[Ti[Ni]]):Ii=Ni=1}})();var yi=[0,1,2,4,8,16,32,64,128,27,54],bi=l.AES=s.extend({_doReset:function(){var Ti;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Si=this._keyPriorReset=this._key,Ii=Si.words,Ni=Si.sigBytes/4,Oi=this._nRounds=Ni+6,Fi=(Oi+1)*4,Mi=this._keySchedule=[],ki=0;ki<Fi;ki++)ki<Ni?Mi[ki]=Ii[ki]:(Ti=Mi[ki-1],ki%Ni?Ni>6&&ki%Ni==4&&(Ti=D[Ti>>>24]<<24|D[Ti>>>16&255]<<16|D[Ti>>>8&255]<<8|D[Ti&255]):(Ti=Ti<<8|Ti>>>24,Ti=D[Ti>>>24]<<24|D[Ti>>>16&255]<<16|D[Ti>>>8&255]<<8|D[Ti&255],Ti^=yi[ki/Ni|0]<<24),Mi[ki]=Mi[ki-Ni]^Ti);for(var Ci=this._invKeySchedule=[],Ei=0;Ei<Fi;Ei++){var ki=Fi-Ei;if(Ei%4)var Ti=Mi[ki];else var Ti=Mi[ki-4];Ei<4||ki<=4?Ci[Ei]=Ti:Ci[Ei]=Mn[D[Ti>>>24]]^jn[D[Ti>>>16&255]]^Hn[D[Ti>>>8&255]]^hi[D[Ti&255]]}}},encryptBlock:function(Ti,Si){this._doCryptBlock(Ti,Si,this._keySchedule,h,v,In,Rn,D)},decryptBlock:function(Ti,Si){var Ii=Ti[Si+1];Ti[Si+1]=Ti[Si+3],Ti[Si+3]=Ii,this._doCryptBlock(Ti,Si,this._invKeySchedule,Mn,jn,Hn,hi,on);var Ii=Ti[Si+1];Ti[Si+1]=Ti[Si+3],Ti[Si+3]=Ii},_doCryptBlock:function(Ti,Si,Ii,Ni,Oi,Fi,Mi,ki){for(var Ci=this._nRounds,Ei=Ti[Si]^Ii[0],vi=Ti[Si+1]^Ii[1],Ln=Ti[Si+2]^Ii[2],Yn=Ti[Si+3]^Ii[3],mi=4,gi=1;gi<Ci;gi++){var _i=Ni[Ei>>>24]^Oi[vi>>>16&255]^Fi[Ln>>>8&255]^Mi[Yn&255]^Ii[mi++],Ai=Ni[vi>>>24]^Oi[Ln>>>16&255]^Fi[Yn>>>8&255]^Mi[Ei&255]^Ii[mi++],xi=Ni[Ln>>>24]^Oi[Yn>>>16&255]^Fi[Ei>>>8&255]^Mi[vi&255]^Ii[mi++],Ri=Ni[Yn>>>24]^Oi[Ei>>>16&255]^Fi[vi>>>8&255]^Mi[Ln&255]^Ii[mi++];Ei=_i,vi=Ai,Ln=xi,Yn=Ri}var _i=(ki[Ei>>>24]<<24|ki[vi>>>16&255]<<16|ki[Ln>>>8&255]<<8|ki[Yn&255])^Ii[mi++],Ai=(ki[vi>>>24]<<24|ki[Ln>>>16&255]<<16|ki[Yn>>>8&255]<<8|ki[Ei&255])^Ii[mi++],xi=(ki[Ln>>>24]<<24|ki[Yn>>>16&255]<<16|ki[Ei>>>8&255]<<8|ki[vi&255])^Ii[mi++],Ri=(ki[Yn>>>24]<<24|ki[Ei>>>16&255]<<16|ki[vi>>>8&255]<<8|ki[Ln&255])^Ii[mi++];Ti[Si]=_i,Ti[Si+1]=Ai,Ti[Si+2]=xi,Ti[Si+3]=Ri},keySize:256/32});a.AES=s._createHelper(bi)}(),i.AES})}(aes$1)),aes$1.exports}var tripledes$1={exports:{}},tripledes=tripledes$1.exports,hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(tripledes,function(i){return function(){var a=i,u=a.lib,s=u.WordArray,l=u.BlockCipher,D=a.algo,on=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],In=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Rn=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Mn=D.DES=l.extend({_doReset:function(){for(var yi=this._key,bi=yi.words,Ti=[],Si=0;Si<56;Si++){var Ii=on[Si]-1;Ti[Si]=bi[Ii>>>5]>>>31-Ii%32&1}for(var Ni=this._subKeys=[],Oi=0;Oi<16;Oi++){for(var Fi=Ni[Oi]=[],Mi=v[Oi],Si=0;Si<24;Si++)Fi[Si/6|0]|=Ti[(h[Si]-1+Mi)%28]<<31-Si%6,Fi[4+(Si/6|0)]|=Ti[28+(h[Si+24]-1+Mi)%28]<<31-Si%6;Fi[0]=Fi[0]<<1|Fi[0]>>>31;for(var Si=1;Si<7;Si++)Fi[Si]=Fi[Si]>>>(Si-1)*4+3;Fi[7]=Fi[7]<<5|Fi[7]>>>27}for(var ki=this._invSubKeys=[],Si=0;Si<16;Si++)ki[Si]=Ni[15-Si]},encryptBlock:function(yi,bi){this._doCryptBlock(yi,bi,this._subKeys)},decryptBlock:function(yi,bi){this._doCryptBlock(yi,bi,this._invSubKeys)},_doCryptBlock:function(yi,bi,Ti){this._lBlock=yi[bi],this._rBlock=yi[bi+1],jn.call(this,4,252645135),jn.call(this,16,65535),Hn.call(this,2,858993459),Hn.call(this,8,16711935),jn.call(this,1,1431655765);for(var Si=0;Si<16;Si++){for(var Ii=Ti[Si],Ni=this._lBlock,Oi=this._rBlock,Fi=0,Mi=0;Mi<8;Mi++)Fi|=In[Mi][((Oi^Ii[Mi])&Rn[Mi])>>>0];this._lBlock=Oi,this._rBlock=Ni^Fi}var ki=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ki,jn.call(this,1,1431655765),Hn.call(this,8,16711935),Hn.call(this,2,858993459),jn.call(this,16,65535),jn.call(this,4,252645135),yi[bi]=this._lBlock,yi[bi+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function jn(yi,bi){var Ti=(this._lBlock>>>yi^this._rBlock)&bi;this._rBlock^=Ti,this._lBlock^=Ti<<yi}function Hn(yi,bi){var Ti=(this._rBlock>>>yi^this._lBlock)&bi;this._lBlock^=Ti,this._rBlock^=Ti<<yi}a.DES=l._createHelper(Mn);var hi=D.TripleDES=l.extend({_doReset:function(){var yi=this._key,bi=yi.words;if(bi.length!==2&&bi.length!==4&&bi.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var Ti=bi.slice(0,2),Si=bi.length<4?bi.slice(0,2):bi.slice(2,4),Ii=bi.length<6?bi.slice(0,2):bi.slice(4,6);this._des1=Mn.createEncryptor(s.create(Ti)),this._des2=Mn.createEncryptor(s.create(Si)),this._des3=Mn.createEncryptor(s.create(Ii))},encryptBlock:function(yi,bi){this._des1.encryptBlock(yi,bi),this._des2.decryptBlock(yi,bi),this._des3.encryptBlock(yi,bi)},decryptBlock:function(yi,bi){this._des3.decryptBlock(yi,bi),this._des2.encryptBlock(yi,bi),this._des1.decryptBlock(yi,bi)},keySize:192/32,ivSize:64/32,blockSize:64/32});a.TripleDES=l._createHelper(hi)}(),i.TripleDES})}(tripledes$1)),tripledes$1.exports}var rc4$1={exports:{}},rc4=rc4$1.exports,hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rc4,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=l.RC4=s.extend({_doReset:function(){for(var v=this._key,In=v.words,Rn=v.sigBytes,Mn=this._S=[],jn=0;jn<256;jn++)Mn[jn]=jn;for(var jn=0,Hn=0;jn<256;jn++){var hi=jn%Rn,yi=In[hi>>>2]>>>24-hi%4*8&255;Hn=(Hn+Mn[jn]+yi)%256;var bi=Mn[jn];Mn[jn]=Mn[Hn],Mn[Hn]=bi}this._i=this._j=0},_doProcessBlock:function(v,In){v[In]^=on.call(this)},keySize:256/32,ivSize:0});function on(){for(var v=this._S,In=this._i,Rn=this._j,Mn=0,jn=0;jn<4;jn++){In=(In+1)%256,Rn=(Rn+v[In])%256;var Hn=v[In];v[In]=v[Rn],v[Rn]=Hn,Mn|=v[(v[In]+v[Rn])%256]<<24-jn*8}return this._i=In,this._j=Rn,Mn}a.RC4=s._createHelper(D);var h=l.RC4Drop=D.extend({cfg:D.cfg.extend({drop:192}),_doReset:function(){D._doReset.call(this);for(var v=this.cfg.drop;v>0;v--)on.call(this)}});a.RC4Drop=s._createHelper(h)}(),i.RC4})}(rc4$1)),rc4$1.exports}var rabbit$1={exports:{}},rabbit=rabbit$1.exports,hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbit,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=[],on=[],h=[],v=l.Rabbit=s.extend({_doReset:function(){for(var Rn=this._key.words,Mn=this.cfg.iv,jn=0;jn<4;jn++)Rn[jn]=(Rn[jn]<<8|Rn[jn]>>>24)&16711935|(Rn[jn]<<24|Rn[jn]>>>8)&4278255360;var Hn=this._X=[Rn[0],Rn[3]<<16|Rn[2]>>>16,Rn[1],Rn[0]<<16|Rn[3]>>>16,Rn[2],Rn[1]<<16|Rn[0]>>>16,Rn[3],Rn[2]<<16|Rn[1]>>>16],hi=this._C=[Rn[2]<<16|Rn[2]>>>16,Rn[0]&4294901760|Rn[1]&65535,Rn[3]<<16|Rn[3]>>>16,Rn[1]&4294901760|Rn[2]&65535,Rn[0]<<16|Rn[0]>>>16,Rn[2]&4294901760|Rn[3]&65535,Rn[1]<<16|Rn[1]>>>16,Rn[3]&4294901760|Rn[0]&65535];this._b=0;for(var jn=0;jn<4;jn++)In.call(this);for(var jn=0;jn<8;jn++)hi[jn]^=Hn[jn+4&7];if(Mn){var yi=Mn.words,bi=yi[0],Ti=yi[1],Si=(bi<<8|bi>>>24)&16711935|(bi<<24|bi>>>8)&4278255360,Ii=(Ti<<8|Ti>>>24)&16711935|(Ti<<24|Ti>>>8)&4278255360,Ni=Si>>>16|Ii&4294901760,Oi=Ii<<16|Si&65535;hi[0]^=Si,hi[1]^=Ni,hi[2]^=Ii,hi[3]^=Oi,hi[4]^=Si,hi[5]^=Ni,hi[6]^=Ii,hi[7]^=Oi;for(var jn=0;jn<4;jn++)In.call(this)}},_doProcessBlock:function(Rn,Mn){var jn=this._X;In.call(this),D[0]=jn[0]^jn[5]>>>16^jn[3]<<16,D[1]=jn[2]^jn[7]>>>16^jn[5]<<16,D[2]=jn[4]^jn[1]>>>16^jn[7]<<16,D[3]=jn[6]^jn[3]>>>16^jn[1]<<16;for(var Hn=0;Hn<4;Hn++)D[Hn]=(D[Hn]<<8|D[Hn]>>>24)&16711935|(D[Hn]<<24|D[Hn]>>>8)&4278255360,Rn[Mn+Hn]^=D[Hn]},blockSize:128/32,ivSize:64/32});function In(){for(var Rn=this._X,Mn=this._C,jn=0;jn<8;jn++)on[jn]=Mn[jn];Mn[0]=Mn[0]+1295307597+this._b|0,Mn[1]=Mn[1]+3545052371+(Mn[0]>>>0<on[0]>>>0?1:0)|0,Mn[2]=Mn[2]+886263092+(Mn[1]>>>0<on[1]>>>0?1:0)|0,Mn[3]=Mn[3]+1295307597+(Mn[2]>>>0<on[2]>>>0?1:0)|0,Mn[4]=Mn[4]+3545052371+(Mn[3]>>>0<on[3]>>>0?1:0)|0,Mn[5]=Mn[5]+886263092+(Mn[4]>>>0<on[4]>>>0?1:0)|0,Mn[6]=Mn[6]+1295307597+(Mn[5]>>>0<on[5]>>>0?1:0)|0,Mn[7]=Mn[7]+3545052371+(Mn[6]>>>0<on[6]>>>0?1:0)|0,this._b=Mn[7]>>>0<on[7]>>>0?1:0;for(var jn=0;jn<8;jn++){var Hn=Rn[jn]+Mn[jn],hi=Hn&65535,yi=Hn>>>16,bi=((hi*hi>>>17)+hi*yi>>>15)+yi*yi,Ti=((Hn&4294901760)*Hn|0)+((Hn&65535)*Hn|0);h[jn]=bi^Ti}Rn[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,Rn[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,Rn[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,Rn[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,Rn[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,Rn[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,Rn[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,Rn[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}a.Rabbit=s._createHelper(v)}(),i.Rabbit})}(rabbit$1)),rabbit$1.exports}var rabbitLegacy$1={exports:{}},rabbitLegacy=rabbitLegacy$1.exports,hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbitLegacy,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=[],on=[],h=[],v=l.RabbitLegacy=s.extend({_doReset:function(){var Rn=this._key.words,Mn=this.cfg.iv,jn=this._X=[Rn[0],Rn[3]<<16|Rn[2]>>>16,Rn[1],Rn[0]<<16|Rn[3]>>>16,Rn[2],Rn[1]<<16|Rn[0]>>>16,Rn[3],Rn[2]<<16|Rn[1]>>>16],Hn=this._C=[Rn[2]<<16|Rn[2]>>>16,Rn[0]&4294901760|Rn[1]&65535,Rn[3]<<16|Rn[3]>>>16,Rn[1]&4294901760|Rn[2]&65535,Rn[0]<<16|Rn[0]>>>16,Rn[2]&4294901760|Rn[3]&65535,Rn[1]<<16|Rn[1]>>>16,Rn[3]&4294901760|Rn[0]&65535];this._b=0;for(var hi=0;hi<4;hi++)In.call(this);for(var hi=0;hi<8;hi++)Hn[hi]^=jn[hi+4&7];if(Mn){var yi=Mn.words,bi=yi[0],Ti=yi[1],Si=(bi<<8|bi>>>24)&16711935|(bi<<24|bi>>>8)&4278255360,Ii=(Ti<<8|Ti>>>24)&16711935|(Ti<<24|Ti>>>8)&4278255360,Ni=Si>>>16|Ii&4294901760,Oi=Ii<<16|Si&65535;Hn[0]^=Si,Hn[1]^=Ni,Hn[2]^=Ii,Hn[3]^=Oi,Hn[4]^=Si,Hn[5]^=Ni,Hn[6]^=Ii,Hn[7]^=Oi;for(var hi=0;hi<4;hi++)In.call(this)}},_doProcessBlock:function(Rn,Mn){var jn=this._X;In.call(this),D[0]=jn[0]^jn[5]>>>16^jn[3]<<16,D[1]=jn[2]^jn[7]>>>16^jn[5]<<16,D[2]=jn[4]^jn[1]>>>16^jn[7]<<16,D[3]=jn[6]^jn[3]>>>16^jn[1]<<16;for(var Hn=0;Hn<4;Hn++)D[Hn]=(D[Hn]<<8|D[Hn]>>>24)&16711935|(D[Hn]<<24|D[Hn]>>>8)&4278255360,Rn[Mn+Hn]^=D[Hn]},blockSize:128/32,ivSize:64/32});function In(){for(var Rn=this._X,Mn=this._C,jn=0;jn<8;jn++)on[jn]=Mn[jn];Mn[0]=Mn[0]+1295307597+this._b|0,Mn[1]=Mn[1]+3545052371+(Mn[0]>>>0<on[0]>>>0?1:0)|0,Mn[2]=Mn[2]+886263092+(Mn[1]>>>0<on[1]>>>0?1:0)|0,Mn[3]=Mn[3]+1295307597+(Mn[2]>>>0<on[2]>>>0?1:0)|0,Mn[4]=Mn[4]+3545052371+(Mn[3]>>>0<on[3]>>>0?1:0)|0,Mn[5]=Mn[5]+886263092+(Mn[4]>>>0<on[4]>>>0?1:0)|0,Mn[6]=Mn[6]+1295307597+(Mn[5]>>>0<on[5]>>>0?1:0)|0,Mn[7]=Mn[7]+3545052371+(Mn[6]>>>0<on[6]>>>0?1:0)|0,this._b=Mn[7]>>>0<on[7]>>>0?1:0;for(var jn=0;jn<8;jn++){var Hn=Rn[jn]+Mn[jn],hi=Hn&65535,yi=Hn>>>16,bi=((hi*hi>>>17)+hi*yi>>>15)+yi*yi,Ti=((Hn&4294901760)*Hn|0)+((Hn&65535)*Hn|0);h[jn]=bi^Ti}Rn[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,Rn[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,Rn[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,Rn[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,Rn[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,Rn[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,Rn[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,Rn[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}a.RabbitLegacy=s._createHelper(v)}(),i.RabbitLegacy})}(rabbitLegacy$1)),rabbitLegacy$1.exports}var blowfish$1={exports:{}},blowfish=blowfish$1.exports,hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(blowfish,function(i){return function(){var a=i,u=a.lib,s=u.BlockCipher,l=a.algo;const D=16,on=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],h=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var v={pbox:[],sbox:[]};function In(hi,yi){let bi=yi>>24&255,Ti=yi>>16&255,Si=yi>>8&255,Ii=yi&255,Ni=hi.sbox[0][bi]+hi.sbox[1][Ti];return Ni=Ni^hi.sbox[2][Si],Ni=Ni+hi.sbox[3][Ii],Ni}function Rn(hi,yi,bi){let Ti=yi,Si=bi,Ii;for(let Ni=0;Ni<D;++Ni)Ti=Ti^hi.pbox[Ni],Si=In(hi,Ti)^Si,Ii=Ti,Ti=Si,Si=Ii;return Ii=Ti,Ti=Si,Si=Ii,Si=Si^hi.pbox[D],Ti=Ti^hi.pbox[D+1],{left:Ti,right:Si}}function Mn(hi,yi,bi){let Ti=yi,Si=bi,Ii;for(let Ni=D+1;Ni>1;--Ni)Ti=Ti^hi.pbox[Ni],Si=In(hi,Ti)^Si,Ii=Ti,Ti=Si,Si=Ii;return Ii=Ti,Ti=Si,Si=Ii,Si=Si^hi.pbox[1],Ti=Ti^hi.pbox[0],{left:Ti,right:Si}}function jn(hi,yi,bi){for(let Oi=0;Oi<4;Oi++){hi.sbox[Oi]=[];for(let Fi=0;Fi<256;Fi++)hi.sbox[Oi][Fi]=h[Oi][Fi]}let Ti=0;for(let Oi=0;Oi<D+2;Oi++)hi.pbox[Oi]=on[Oi]^yi[Ti],Ti++,Ti>=bi&&(Ti=0);let Si=0,Ii=0,Ni=0;for(let Oi=0;Oi<D+2;Oi+=2)Ni=Rn(hi,Si,Ii),Si=Ni.left,Ii=Ni.right,hi.pbox[Oi]=Si,hi.pbox[Oi+1]=Ii;for(let Oi=0;Oi<4;Oi++)for(let Fi=0;Fi<256;Fi+=2)Ni=Rn(hi,Si,Ii),Si=Ni.left,Ii=Ni.right,hi.sbox[Oi][Fi]=Si,hi.sbox[Oi][Fi+1]=Ii;return!0}var Hn=l.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var hi=this._keyPriorReset=this._key,yi=hi.words,bi=hi.sigBytes/4;jn(v,yi,bi)}},encryptBlock:function(hi,yi){var bi=Rn(v,hi[yi],hi[yi+1]);hi[yi]=bi.left,hi[yi+1]=bi.right},decryptBlock:function(hi,yi){var bi=Mn(v,hi[yi],hi[yi+1]);hi[yi]=bi.left,hi[yi+1]=bi.right},blockSize:64/32,keySize:128/32,ivSize:64/32});a.Blowfish=s._createHelper(Hn)}(),i.Blowfish})}(blowfish$1)),blowfish$1.exports}var cryptoJs=cryptoJs$1.exports,hasRequiredCryptoJs;function requireCryptoJs(){return hasRequiredCryptoJs||(hasRequiredCryptoJs=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy(),requireBlowfish())})(cryptoJs,function(i){return i})}(cryptoJs$1)),cryptoJs$1.exports}requireCryptoJs();requireBrowser$b();const APOLLO_SUBSCRIPTION_PROTOCOL="graphql-ws",AUTO_SUBSCRIPTION_PROTOCOL="auto",DEFAULT_SUBSCRIPTION_PROTOCOL=AUTO_SUBSCRIPTION_PROTOCOL,GRAPHQL_WS_SUBSCRIPTION_PROTOCOL="graphql-transport-ws",GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL="graphql-sse",ATTACHMENT_KIND_CONNECTION_SETTINGS="connection-settings",ATTACHMENT_KIND_DOCUMENT_CONTENT="document-content",ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT="origin-document-content",ATTACHMENT_KIND_VARIABLE_COLLECTION="variable-collection",ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION="origin-variable-collection",ATTACHMENT_KIND_FILE_CONTENT="file-content",ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA="variable-json-schema",ITEM_KIND_API="api",ITEM_KIND_NEW_API="new-api",ITEM_KIND_API_DOCUMENT="api-document",ITEM_KIND_BASIC_DOCUMENT="document",ITEM_KIND_HISTORICAL_DOCUMENT="historical-document",ITEM_KIND_NEW_DOCUMENT="new-document",ITEM_KIND_FILE="file";function isApiItem(r){return r?.kind===ITEM_KIND_API}function isNewApiItem(r){return r?.kind===ITEM_KIND_NEW_API}function isDocumentItem(r){return isApiDocumentItem(r)||isBasicDocumentItem(r)||isHistoricalDocumentItem(r)||isNewDocumentItem(r)}function isApiDocumentItem(r){return r?.kind===ITEM_KIND_API_DOCUMENT}function isBasicDocumentItem(r){return r?.kind===ITEM_KIND_BASIC_DOCUMENT}function isHistoricalDocumentItem(r){return r?.kind===ITEM_KIND_HISTORICAL_DOCUMENT}function isNewDocumentItem(r){return r?.kind===ITEM_KIND_NEW_DOCUMENT}function isFileItem(r){return r?.kind===ITEM_KIND_FILE}function isConnectionSettingsAttachment(r){return r?.kind===ATTACHMENT_KIND_CONNECTION_SETTINGS}function isDocumentContentAttachment(r){return r?.kind===ATTACHMENT_KIND_DOCUMENT_CONTENT||r?.kind===ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT}function isVariableCollectionAttachment(r){return r?.kind===ATTACHMENT_KIND_VARIABLE_COLLECTION||r?.kind===ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION}function mergeDocumentItemAndContent(r,n){const{body:i,hash:a,variables:u}=n;return{...r,body:i,hash:a,variables:u}}function calculateVariableJsonSchemaHash(r){const n=createHash(JSON.stringify(r.schema));return{...r,hash:n}}function interpolateHttpConnectionSettings(r,n){const i=r?.http;return i?{...i,authentication:interpolateAuthentication(i.authentication,n),endpoint:interpolateValue(i.endpoint,n),sdlEndpoint:i.sdlEndpoint?interpolateValue(i.sdlEndpoint,n):i.sdlEndpoint,sseSubscriptionEndpoint:i.sseSubscriptionEndpoint?interpolateValue(i.sseSubscriptionEndpoint,n):i.sseSubscriptionEndpoint,subscriptionEndpoint:i.subscriptionEndpoint?interpolateValue(i.subscriptionEndpoint,n):i.subscriptionEndpoint,headers:i.headers?i.headers.map(a=>({...a,name:interpolateValue(a.name,n),value:interpolateValue(a.value,n)})):i.headers}:null}function interpolateAuthentication(r,n){if(r)return r?{...r,basicOptions:r.basicOptions?{password:interpolateValue(r.basicOptions.password,n),username:interpolateValue(r.basicOptions.username,n)}:void 0,bearerOptions:r.bearerOptions?{prefix:r.bearerOptions.prefix?interpolateValue(r.bearerOptions.token,n):void 0,token:interpolateValue(r.bearerOptions.token,n)}:void 0,oAuth2Options:interpolateOAuth2Authentication(r.oAuth2Options,n),headerValue:r.headerValue?interpolateValue(r.headerValue,n):void 0}:void 0}function interpolateOAuth2Authentication(r,n){return r?{...r,accessTokenUrl:interpolateValue(r.accessTokenUrl,n),audience:interpolateValue(r.audience,n),authorizationUrl:interpolateValue(r.authorizationUrl,n),clientId:interpolateValue(r.clientId,n),clientSecret:interpolateValue(r.clientSecret,n),origin:interpolateValue(r.origin,n),password:interpolateValue(r.password,n),prefix:interpolateValue(r.prefix,n),redirectUrl:interpolateValue(r.redirectUrl,n),resource:interpolateValue(r.resource,n),scope:interpolateValue(r.scope,n),state:interpolateValue(r.state,n),username:interpolateValue(r.username,n),sessionId:r.sessionId?interpolateValue(r.sessionId,n):void 0}:void 0}function interpolateValue(r,n){let i=r;const a=r.matchAll(INTERPOLATION_VARIABLE_NAME_PATTERN);for(const u of a)i=i.replace(u[0],n.get(u[1])??u[0]);return i}function resolveVariables(r){const n=new Map;for(const{name:i,value:a,currentValue:u,enabled:s}of r)s&&n.set(i,u||a);return n}async function getConnectionSettings(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async i=>{const a=await i.store.item.get(r);return isApiItem(a)||isNewApiItem(a)||isDocumentItem(a)?getConnectionSettingsTransactional(i,a):i.abort("Item does not exist or is not of type API nor Document.")},n)}async function getInterpolatedHttpConnection(r,n,i){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async a=>{const u=await a.store.item.get(r);if(!(isApiItem(u)||isNewApiItem(u)||isDocumentItem(u)))return a.abort("Item does not exist or is not of type API nor Document.");if(!n)return(await getConnectionSettingsTransactional(a,u))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(a,u),getVariableCollectionByIdTransactional(a,n)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},i)}async function getInterpolatedHttpConnectionForActiveEnvironment(r,n){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async i=>{const a=await i.store.item.get(r);if(!(isApiItem(a)||isNewApiItem(a)||isDocumentItem(a)))return i.abort("Item does not exist or is not of type API nor Document.");let u=null;if(a.workspaceId&&(u=(await i.store.workspace.get(a.workspaceId))?.appState?.activeEnvironmentId??null),!u)return(await getConnectionSettingsTransactional(i,a))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(i,a),getVariableCollectionByIdTransactional(i,u)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},n)}async function getConnectionSettingsTransactional(r,n){const i=await r.store.attachment.get([isApiDocumentItem(n)?n.apiId:n.id,ATTACHMENT_KIND_CONNECTION_SETTINGS]);if(isConnectionSettingsAttachment(i))return i}async function getVariableCollection(r){return openDatabaseScope(async n=>{const i=await n.get("attachment",[r,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(i))return i})}async function getVariableCollectionByIdTransactional(r,n){const i=await r.store.attachment.get([n,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(i))return i}async function getFileContents(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",i=>Promise.all(r.map(async a=>{const u=await i.store.item.get(a);return isFileItem(u)?await i.store.attachment.get([a,ATTACHMENT_KIND_FILE_CONTENT]):i.abort("Item does not exist or is not of type API nor Document.")})),n)}async function getResolvedVariables(r){return resolveVariables(r?(await getVariableCollection(r))?.variables??[]:[])}function getDocumentItemAndContent(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async i=>{const[a,u]=await Promise.all([i.store.item.get(r),i.store.attachment.get([r,ATTACHMENT_KIND_DOCUMENT_CONTENT])]);if(isDocumentItem(a)&&isDocumentContentAttachment(u))return mergeDocumentItemAndContent(a,u)},n)}function getAllFileItemInfos(r){return openDatabaseWithTransactionScope(["item"],"readonly",n=>getFileInfosTransactional(n,r))}function getFileItemInfosByNames(r,...n){return openDatabaseWithTransactionScope(["item"],"readonly",i=>getFileInfosTransactional(i,r,a=>n.includes(a)))}async function getFileInfosTransactional(r,n,i){const a=[],u={};for await(const s of r.index.item.kind.iterate([n,ITEM_KIND_FILE])){const l=s.value;if(isFileItem(l)){l.parentId&&!u[l.parentId]&&(u[l.parentId]=await getItemNamePathTransactional(r,l.path).then(on=>on?.join("/")??""));const D=`${l.parentId&&u[l.parentId]?.length?`${u[l.parentId]}/`:""}${l.name}`;(i?.(D)??!0)&&a.push({id:l.id,workspaceId:l.workspaceId,name:D,size:l.size})}}return a}async function getItemNamePathTransactional(r,n){return Promise.all(n.slice(0,-1).map(async i=>{const a=await r.store.item.get(i);if(!a)throw new Error("Parent does not exist");return a.name}))}async function setVariableJsonSchema(r,n,i){return openDatabaseWithTransactionScope(["attachment","item"],"readwrite",async a=>{let u=await a.store.item.get(r);if(!isDocumentItem(u))return a.abort("Item does not exist or is not of type Document.");const s=calculateVariableJsonSchemaHash({itemId:r,workspaceId:u.workspaceId,kind:ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA,schema:n});return await a.store.attachment.put(s),s},i)}function tryAcquireLock(r,n,i){return openDatabaseWithTransactionScope(["mutex"],"readwrite",async a=>{const u=await a.store.mutex.get(r),s=()=>a.store.mutex.put({resource:r,owner:n,expiresAt:now()+i});return u?u.owner===n||u.expiresAt<now()?(await s(),!0):!1:(await s(),!0)})}function releaseLock(r){return openDatabaseScope(n=>n.delete("mutex",r))}var GraphQLSchemaAttachmentKind=(r=>(r.SDL_SCHEMA="sdl-schema",r.STATISTICS="statistics",r.ITEMS="items",r))(GraphQLSchemaAttachmentKind||{}),GraphQLSchemaKind=(r=>(r.SDL_FETCH="sdl-fetch",r.SDL_PROBE="sdl-probe",r.INTROSPECTION="introspection",r))(GraphQLSchemaKind||{});function isGraphQLSchemaItemsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.ITEMS}function isGraphQLSchemaStatisticsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.STATISTICS}function setGraphQLSchemaEntity(r,n,i,a){return openDatabaseWithTransactionScope(["schema","schema-attachment"],"readwrite",async u=>{const s={endpoint:r,updatedAt:now(),hash:calculateGraphQLSchemaEntityHash(r,i),indexed:!1,hasUploadType:!!n.getType("Upload"),queryTypeName:n.getQueryType()?.name??null,mutationTypeName:n.getMutationType()?.name??null,subscriptionTypeName:n.getSubscriptionType()?.name??null,schemaKind:a};return await Promise.all([u.store.schema.put(s),u.store.schemaAttachment.put({endpoint:r,kind:GraphQLSchemaAttachmentKind.SDL_SCHEMA,value:i}),u.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.ITEMS]),u.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.STATISTICS]),u.done]),s})}function getGraphQLSchemaEntity(r){const n=harmonizeSchemaUrl(r);return getEntityByKey("schema",n)}async function getGraphQLSchemaItems(r){const n=harmonizeSchemaUrl(r),i=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.ITEMS]);return isGraphQLSchemaItemsAttachmentEntity(i)?i.value:void 0}async function getGraphQLSchemaStatistics(r){const n=harmonizeSchemaUrl(r),i=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.STATISTICS]);return isGraphQLSchemaStatisticsAttachmentEntity(i)?i.value:void 0}function calculateGraphQLSchemaEntityHash(r,n){return createHash(JSON.stringify(["graphql-schema-entity",r,n]))}RelativeDateTimeRange.last30Minutes;RelativeDateTimeRange.last30Minutes;function requireLock(r,n,i){const a=FIVE_SECONDS,u=createId("mutex");return acquireLock(r,u,a).then(async()=>{const s=new TimeoutAbortController(a);try{const[l]=await Promise.all([n(s.signal.toAbortSignal()).then(D=>(s.cancel(),D)),s.signal.toPromise()]);return l}catch(l){throw isTimeoutAbortError(l)?new LockExpiredError(r):l}finally{s.cancel(),await releaseLock(r)}})}async function acquireLock(r,n,i){for(;!await tryAcquireLock(r,n,i);)await delay(FIFTY_MILLISECONDS)}class LockExpiredError extends Error{constructor(n){super(`Lock for resource "${n}" has been expired`)}}async function tryGetUserSessionAndRefresh(r){const n=await getCurrentTenant();if(!n)return null;let i=await getUserSession(n);if(!i)return null;if(isSessionExpired(i)&&(i=await refreshSession(i),isSessionExpired(i)))throw new UserSessionExpiredError;return i}async function refreshSession(r,n){return requireLock("refresh-session",i);async function i(a){const u=a;let s=await getUserSession(r)||r;if(!isSessionExpired(s)&&s.requiresSignIn)return s;const l=new Headers,D=new URLSearchParams;l.append(HEADER_CONTENT_TYPE,"application/x-www-form-urlencoded"),D.append("client_id","3c9f56bd-0e2c-4358-9bf5-ff3a0efa9bf5"),D.append("grant_type","refresh_token"),D.append("refresh_token",s.refreshToken);try{const on=await fetch(`${s.issuer}/connect/token`,{method:"POST",headers:l,body:D,signal:u});if(on.ok){const h=await on.json();if(isToken(h))return replaceUserSession({...s,requiresSignIn:!1,idToken:h.id_token,accessToken:h.access_token,refreshToken:h.refresh_token,expiresAt:now()+h.expires_in*ONE_SECOND})}else if(on.status===400&&(s=await getUserSession(r)||r,isSessionExpired(s)))return replaceUserSession({...s,requiresSignIn:!0,lastTriedToRefresh:now()});return s}catch(on){console.error(on)}return s=await getUserSession(r)||r,isSessionExpired(s)?replaceUserSession({...s,lastTriedToRefresh:now()}):s}}function isToken(r){return isDictionary(r)&&"access_token"in r}class UserSessionExpiredError extends Error{constructor(){super("User session has been expired")}}async function getHttpOptions(r){const n=await tryGetUserSessionAndRefresh(),i=isURL(r)?r:new URL(r,n?.apiUrl??"https://api.chillicream.com").href,a=getHeaders(n?.accessToken);return{uri:i,headers:a}}function getHeaders(r){const n=new Headers;if(n.set("CCC-Agent",APP_AGENT),n.set("GraphQL-Agent",APP_AGENT),n.set("GraphQL-Client-Id",APP_GRAPHQL_CLIENT_ID),n.set("GraphQL-Client-Version",APP_VERSION),n.set("GraphQL-Defer-RFC","v2"),r)n.set("Authorization",`Bearer ${r}`);else throw new UserSessionExpiredError;return n}var RelayFeatureFlags_1,hasRequiredRelayFeatureFlags;function requireRelayFeatureFlags(){if(hasRequiredRelayFeatureFlags)return RelayFeatureFlags_1;hasRequiredRelayFeatureFlags=1;var r={ENABLE_CLIENT_EDGES:!1,ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_LOAD_QUERY_REQUEST_DEDUPING:!0,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,ENABLE_FIELD_ERROR_HANDLING:!1,ENABLE_FIELD_ERROR_HANDLING_THROW_BY_DEFAULT:!1,ENABLE_FIELD_ERROR_HANDLING_CATCH_DIRECTIVE:!1,ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES:!0,ENABLE_STRICT_EQUAL_SELECTORS:!1};return RelayFeatureFlags_1=r,RelayFeatureFlags_1}var StringInterner,hasRequiredStringInterner;function requireStringInterner(){if(hasRequiredStringInterner)return StringInterner;hasRequiredStringInterner=1;var r=new Map,n=1,i=s(),a=" ",u="\v";function s(){for(var on=new Set,h=0;h<10;++h)on.add(h.toString());return on}function l(on){return on[0]===a&&i.has(on[1])||on[0]===u?u+on:on}function D(on,h){if(h==null||on.length<h)return l(on);var v=r.get(on);return v!=null||(v=a+n++,r.set(on,v)),v}return StringInterner={intern:D},StringInterner}var ClientID,hasRequiredClientID;function requireClientID(){if(hasRequiredClientID)return ClientID;hasRequiredClientID=1;var r=requireRelayFeatureFlags(),n=requireStringInterner(),i=n.intern,a="client:";function u(h,v,In){var Rn=r.STRING_INTERN_LEVEL<=0?h:i(h,r.MAX_DATA_ID_LENGTH),Mn=Rn+":"+v;return In!=null&&(Mn+=":"+In),Mn.indexOf(a)!==0&&(Mn=a+Mn),Mn}function s(h){return h.indexOf(a)===0}var l=0;function D(){return"".concat(a,"local:").concat(l++)}function on(h,v,In){var Rn="".concat(a).concat(h,":").concat(v);return In!=null&&(Rn+=":"+In),Rn}return ClientID={generateClientID:u,generateClientObjectClientID:on,generateUniqueClientID:D,isClientID:s},ClientID}var interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,function(r){function n(i){return i&&i.__esModule?i:{default:i}}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(interopRequireDefault)),interopRequireDefault.exports}var toConsumableArray={exports:{}},arrayWithoutHoles={exports:{}},arrayLikeToArray={exports:{}},hasRequiredArrayLikeToArray;function requireArrayLikeToArray(){return hasRequiredArrayLikeToArray||(hasRequiredArrayLikeToArray=1,function(r){function n(i,a){(a==null||a>i.length)&&(a=i.length);for(var u=0,s=new Array(a);u<a;u++)s[u]=i[u];return s}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayLikeToArray)),arrayLikeToArray.exports}var hasRequiredArrayWithoutHoles;function requireArrayWithoutHoles(){return hasRequiredArrayWithoutHoles||(hasRequiredArrayWithoutHoles=1,function(r){var n=requireArrayLikeToArray();function i(a){if(Array.isArray(a))return n(a)}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayWithoutHoles)),arrayWithoutHoles.exports}var iterableToArray={exports:{}},hasRequiredIterableToArray;function requireIterableToArray(){return hasRequiredIterableToArray||(hasRequiredIterableToArray=1,function(r){function n(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(iterableToArray)),iterableToArray.exports}var unsupportedIterableToArray={exports:{}},hasRequiredUnsupportedIterableToArray;function requireUnsupportedIterableToArray(){return hasRequiredUnsupportedIterableToArray||(hasRequiredUnsupportedIterableToArray=1,function(r){var n=requireArrayLikeToArray();function i(a,u){if(a){if(typeof a=="string")return n(a,u);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(a,u)}}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(unsupportedIterableToArray)),unsupportedIterableToArray.exports}var nonIterableSpread={exports:{}},hasRequiredNonIterableSpread;function requireNonIterableSpread(){return hasRequiredNonIterableSpread||(hasRequiredNonIterableSpread=1,function(r){function n(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
117
+ */return i.mode.CTRGladman=function(){var a=i.lib.BlockCipherMode.extend();function u(D){if((D>>24&255)===255){var on=D>>16&255,h=D>>8&255,v=D&255;on===255?(on=0,h===255?(h=0,v===255?v=0:++v):++h):++on,D=0,D+=on<<16,D+=h<<8,D+=v}else D+=1<<24;return D}function s(D){return(D[0]=u(D[0]))===0&&(D[1]=u(D[1])),D}var l=a.Encryptor=a.extend({processBlock:function(D,on){var h=this._cipher,v=h.blockSize,In=this._iv,Rn=this._counter;In&&(Rn=this._counter=In.slice(0),this._iv=void 0),s(Rn);var Mn=Rn.slice(0);h.encryptBlock(Mn,0);for(var jn=0;jn<v;jn++)D[on+jn]^=Mn[jn]}});return a.Decryptor=l,a}(),i.mode.CTRGladman})}(modeCtrGladman$1)),modeCtrGladman$1.exports}var modeOfb$1={exports:{}},modeOfb=modeOfb$1.exports,hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(modeOfb,function(i){return i.mode.OFB=function(){var a=i.lib.BlockCipherMode.extend(),u=a.Encryptor=a.extend({processBlock:function(s,l){var D=this._cipher,on=D.blockSize,h=this._iv,v=this._keystream;h&&(v=this._keystream=h.slice(0),this._iv=void 0),D.encryptBlock(v,0);for(var In=0;In<on;In++)s[l+In]^=v[In]}});return a.Decryptor=u,a}(),i.mode.OFB})}(modeOfb$1)),modeOfb$1.exports}var modeEcb$1={exports:{}},modeEcb=modeEcb$1.exports,hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(modeEcb,function(i){return i.mode.ECB=function(){var a=i.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(u,s){this._cipher.encryptBlock(u,s)}}),a.Decryptor=a.extend({processBlock:function(u,s){this._cipher.decryptBlock(u,s)}}),a}(),i.mode.ECB})}(modeEcb$1)),modeEcb$1.exports}var padAnsix923$1={exports:{}},padAnsix923=padAnsix923$1.exports,hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padAnsix923,function(i){return i.pad.AnsiX923={pad:function(a,u){var s=a.sigBytes,l=u*4,D=l-s%l,on=s+D-1;a.clamp(),a.words[on>>>2]|=D<<24-on%4*8,a.sigBytes+=D},unpad:function(a){var u=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=u}},i.pad.Ansix923})}(padAnsix923$1)),padAnsix923$1.exports}var padIso10126$1={exports:{}},padIso10126=padIso10126$1.exports,hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padIso10126,function(i){return i.pad.Iso10126={pad:function(a,u){var s=u*4,l=s-a.sigBytes%s;a.concat(i.lib.WordArray.random(l-1)).concat(i.lib.WordArray.create([l<<24],1))},unpad:function(a){var u=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=u}},i.pad.Iso10126})}(padIso10126$1)),padIso10126$1.exports}var padIso97971$1={exports:{}},padIso97971=padIso97971$1.exports,hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padIso97971,function(i){return i.pad.Iso97971={pad:function(a,u){a.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(a,u)},unpad:function(a){i.pad.ZeroPadding.unpad(a),a.sigBytes--}},i.pad.Iso97971})}(padIso97971$1)),padIso97971$1.exports}var padZeropadding$1={exports:{}},padZeropadding=padZeropadding$1.exports,hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padZeropadding,function(i){return i.pad.ZeroPadding={pad:function(a,u){var s=u*4;a.clamp(),a.sigBytes+=s-(a.sigBytes%s||s)},unpad:function(a){for(var u=a.words,s=a.sigBytes-1,s=a.sigBytes-1;s>=0;s--)if(u[s>>>2]>>>24-s%4*8&255){a.sigBytes=s+1;break}}},i.pad.ZeroPadding})}(padZeropadding$1)),padZeropadding$1.exports}var padNopadding$1={exports:{}},padNopadding=padNopadding$1.exports,hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(padNopadding,function(i){return i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding})}(padNopadding$1)),padNopadding$1.exports}var formatHex$1={exports:{}},formatHex=formatHex$1.exports,hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireCipherCore())})(formatHex,function(i){return function(a){var u=i,s=u.lib,l=s.CipherParams,D=u.enc,on=D.Hex,h=u.format;h.Hex={stringify:function(v){return v.ciphertext.toString(on)},parse:function(v){var In=on.parse(v);return l.create({ciphertext:In})}}}(),i.format.Hex})}(formatHex$1)),formatHex$1.exports}var aes$1={exports:{}},aes=aes$1.exports,hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(aes,function(i){return function(){var a=i,u=a.lib,s=u.BlockCipher,l=a.algo,D=[],on=[],h=[],v=[],In=[],Rn=[],Mn=[],jn=[],Hn=[],hi=[];(function(){for(var Ti=[],Si=0;Si<256;Si++)Si<128?Ti[Si]=Si<<1:Ti[Si]=Si<<1^283;for(var Ii=0,Ni=0,Si=0;Si<256;Si++){var Oi=Ni^Ni<<1^Ni<<2^Ni<<3^Ni<<4;Oi=Oi>>>8^Oi&255^99,D[Ii]=Oi,on[Oi]=Ii;var Fi=Ti[Ii],Mi=Ti[Fi],ki=Ti[Mi],Ci=Ti[Oi]*257^Oi*16843008;h[Ii]=Ci<<24|Ci>>>8,v[Ii]=Ci<<16|Ci>>>16,In[Ii]=Ci<<8|Ci>>>24,Rn[Ii]=Ci;var Ci=ki*16843009^Mi*65537^Fi*257^Ii*16843008;Mn[Oi]=Ci<<24|Ci>>>8,jn[Oi]=Ci<<16|Ci>>>16,Hn[Oi]=Ci<<8|Ci>>>24,hi[Oi]=Ci,Ii?(Ii=Fi^Ti[Ti[Ti[ki^Fi]]],Ni^=Ti[Ti[Ni]]):Ii=Ni=1}})();var yi=[0,1,2,4,8,16,32,64,128,27,54],bi=l.AES=s.extend({_doReset:function(){var Ti;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Si=this._keyPriorReset=this._key,Ii=Si.words,Ni=Si.sigBytes/4,Oi=this._nRounds=Ni+6,Fi=(Oi+1)*4,Mi=this._keySchedule=[],ki=0;ki<Fi;ki++)ki<Ni?Mi[ki]=Ii[ki]:(Ti=Mi[ki-1],ki%Ni?Ni>6&&ki%Ni==4&&(Ti=D[Ti>>>24]<<24|D[Ti>>>16&255]<<16|D[Ti>>>8&255]<<8|D[Ti&255]):(Ti=Ti<<8|Ti>>>24,Ti=D[Ti>>>24]<<24|D[Ti>>>16&255]<<16|D[Ti>>>8&255]<<8|D[Ti&255],Ti^=yi[ki/Ni|0]<<24),Mi[ki]=Mi[ki-Ni]^Ti);for(var Ci=this._invKeySchedule=[],Ei=0;Ei<Fi;Ei++){var ki=Fi-Ei;if(Ei%4)var Ti=Mi[ki];else var Ti=Mi[ki-4];Ei<4||ki<=4?Ci[Ei]=Ti:Ci[Ei]=Mn[D[Ti>>>24]]^jn[D[Ti>>>16&255]]^Hn[D[Ti>>>8&255]]^hi[D[Ti&255]]}}},encryptBlock:function(Ti,Si){this._doCryptBlock(Ti,Si,this._keySchedule,h,v,In,Rn,D)},decryptBlock:function(Ti,Si){var Ii=Ti[Si+1];Ti[Si+1]=Ti[Si+3],Ti[Si+3]=Ii,this._doCryptBlock(Ti,Si,this._invKeySchedule,Mn,jn,Hn,hi,on);var Ii=Ti[Si+1];Ti[Si+1]=Ti[Si+3],Ti[Si+3]=Ii},_doCryptBlock:function(Ti,Si,Ii,Ni,Oi,Fi,Mi,ki){for(var Ci=this._nRounds,Ei=Ti[Si]^Ii[0],vi=Ti[Si+1]^Ii[1],Ln=Ti[Si+2]^Ii[2],Yn=Ti[Si+3]^Ii[3],mi=4,gi=1;gi<Ci;gi++){var _i=Ni[Ei>>>24]^Oi[vi>>>16&255]^Fi[Ln>>>8&255]^Mi[Yn&255]^Ii[mi++],Ai=Ni[vi>>>24]^Oi[Ln>>>16&255]^Fi[Yn>>>8&255]^Mi[Ei&255]^Ii[mi++],xi=Ni[Ln>>>24]^Oi[Yn>>>16&255]^Fi[Ei>>>8&255]^Mi[vi&255]^Ii[mi++],Ri=Ni[Yn>>>24]^Oi[Ei>>>16&255]^Fi[vi>>>8&255]^Mi[Ln&255]^Ii[mi++];Ei=_i,vi=Ai,Ln=xi,Yn=Ri}var _i=(ki[Ei>>>24]<<24|ki[vi>>>16&255]<<16|ki[Ln>>>8&255]<<8|ki[Yn&255])^Ii[mi++],Ai=(ki[vi>>>24]<<24|ki[Ln>>>16&255]<<16|ki[Yn>>>8&255]<<8|ki[Ei&255])^Ii[mi++],xi=(ki[Ln>>>24]<<24|ki[Yn>>>16&255]<<16|ki[Ei>>>8&255]<<8|ki[vi&255])^Ii[mi++],Ri=(ki[Yn>>>24]<<24|ki[Ei>>>16&255]<<16|ki[vi>>>8&255]<<8|ki[Ln&255])^Ii[mi++];Ti[Si]=_i,Ti[Si+1]=Ai,Ti[Si+2]=xi,Ti[Si+3]=Ri},keySize:256/32});a.AES=s._createHelper(bi)}(),i.AES})}(aes$1)),aes$1.exports}var tripledes$1={exports:{}},tripledes=tripledes$1.exports,hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(tripledes,function(i){return function(){var a=i,u=a.lib,s=u.WordArray,l=u.BlockCipher,D=a.algo,on=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],In=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Rn=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Mn=D.DES=l.extend({_doReset:function(){for(var yi=this._key,bi=yi.words,Ti=[],Si=0;Si<56;Si++){var Ii=on[Si]-1;Ti[Si]=bi[Ii>>>5]>>>31-Ii%32&1}for(var Ni=this._subKeys=[],Oi=0;Oi<16;Oi++){for(var Fi=Ni[Oi]=[],Mi=v[Oi],Si=0;Si<24;Si++)Fi[Si/6|0]|=Ti[(h[Si]-1+Mi)%28]<<31-Si%6,Fi[4+(Si/6|0)]|=Ti[28+(h[Si+24]-1+Mi)%28]<<31-Si%6;Fi[0]=Fi[0]<<1|Fi[0]>>>31;for(var Si=1;Si<7;Si++)Fi[Si]=Fi[Si]>>>(Si-1)*4+3;Fi[7]=Fi[7]<<5|Fi[7]>>>27}for(var ki=this._invSubKeys=[],Si=0;Si<16;Si++)ki[Si]=Ni[15-Si]},encryptBlock:function(yi,bi){this._doCryptBlock(yi,bi,this._subKeys)},decryptBlock:function(yi,bi){this._doCryptBlock(yi,bi,this._invSubKeys)},_doCryptBlock:function(yi,bi,Ti){this._lBlock=yi[bi],this._rBlock=yi[bi+1],jn.call(this,4,252645135),jn.call(this,16,65535),Hn.call(this,2,858993459),Hn.call(this,8,16711935),jn.call(this,1,1431655765);for(var Si=0;Si<16;Si++){for(var Ii=Ti[Si],Ni=this._lBlock,Oi=this._rBlock,Fi=0,Mi=0;Mi<8;Mi++)Fi|=In[Mi][((Oi^Ii[Mi])&Rn[Mi])>>>0];this._lBlock=Oi,this._rBlock=Ni^Fi}var ki=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ki,jn.call(this,1,1431655765),Hn.call(this,8,16711935),Hn.call(this,2,858993459),jn.call(this,16,65535),jn.call(this,4,252645135),yi[bi]=this._lBlock,yi[bi+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function jn(yi,bi){var Ti=(this._lBlock>>>yi^this._rBlock)&bi;this._rBlock^=Ti,this._lBlock^=Ti<<yi}function Hn(yi,bi){var Ti=(this._rBlock>>>yi^this._lBlock)&bi;this._lBlock^=Ti,this._rBlock^=Ti<<yi}a.DES=l._createHelper(Mn);var hi=D.TripleDES=l.extend({_doReset:function(){var yi=this._key,bi=yi.words;if(bi.length!==2&&bi.length!==4&&bi.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var Ti=bi.slice(0,2),Si=bi.length<4?bi.slice(0,2):bi.slice(2,4),Ii=bi.length<6?bi.slice(0,2):bi.slice(4,6);this._des1=Mn.createEncryptor(s.create(Ti)),this._des2=Mn.createEncryptor(s.create(Si)),this._des3=Mn.createEncryptor(s.create(Ii))},encryptBlock:function(yi,bi){this._des1.encryptBlock(yi,bi),this._des2.decryptBlock(yi,bi),this._des3.encryptBlock(yi,bi)},decryptBlock:function(yi,bi){this._des3.decryptBlock(yi,bi),this._des2.encryptBlock(yi,bi),this._des1.decryptBlock(yi,bi)},keySize:192/32,ivSize:64/32,blockSize:64/32});a.TripleDES=l._createHelper(hi)}(),i.TripleDES})}(tripledes$1)),tripledes$1.exports}var rc4$1={exports:{}},rc4=rc4$1.exports,hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rc4,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=l.RC4=s.extend({_doReset:function(){for(var v=this._key,In=v.words,Rn=v.sigBytes,Mn=this._S=[],jn=0;jn<256;jn++)Mn[jn]=jn;for(var jn=0,Hn=0;jn<256;jn++){var hi=jn%Rn,yi=In[hi>>>2]>>>24-hi%4*8&255;Hn=(Hn+Mn[jn]+yi)%256;var bi=Mn[jn];Mn[jn]=Mn[Hn],Mn[Hn]=bi}this._i=this._j=0},_doProcessBlock:function(v,In){v[In]^=on.call(this)},keySize:256/32,ivSize:0});function on(){for(var v=this._S,In=this._i,Rn=this._j,Mn=0,jn=0;jn<4;jn++){In=(In+1)%256,Rn=(Rn+v[In])%256;var Hn=v[In];v[In]=v[Rn],v[Rn]=Hn,Mn|=v[(v[In]+v[Rn])%256]<<24-jn*8}return this._i=In,this._j=Rn,Mn}a.RC4=s._createHelper(D);var h=l.RC4Drop=D.extend({cfg:D.cfg.extend({drop:192}),_doReset:function(){D._doReset.call(this);for(var v=this.cfg.drop;v>0;v--)on.call(this)}});a.RC4Drop=s._createHelper(h)}(),i.RC4})}(rc4$1)),rc4$1.exports}var rabbit$1={exports:{}},rabbit=rabbit$1.exports,hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbit,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=[],on=[],h=[],v=l.Rabbit=s.extend({_doReset:function(){for(var Rn=this._key.words,Mn=this.cfg.iv,jn=0;jn<4;jn++)Rn[jn]=(Rn[jn]<<8|Rn[jn]>>>24)&16711935|(Rn[jn]<<24|Rn[jn]>>>8)&4278255360;var Hn=this._X=[Rn[0],Rn[3]<<16|Rn[2]>>>16,Rn[1],Rn[0]<<16|Rn[3]>>>16,Rn[2],Rn[1]<<16|Rn[0]>>>16,Rn[3],Rn[2]<<16|Rn[1]>>>16],hi=this._C=[Rn[2]<<16|Rn[2]>>>16,Rn[0]&4294901760|Rn[1]&65535,Rn[3]<<16|Rn[3]>>>16,Rn[1]&4294901760|Rn[2]&65535,Rn[0]<<16|Rn[0]>>>16,Rn[2]&4294901760|Rn[3]&65535,Rn[1]<<16|Rn[1]>>>16,Rn[3]&4294901760|Rn[0]&65535];this._b=0;for(var jn=0;jn<4;jn++)In.call(this);for(var jn=0;jn<8;jn++)hi[jn]^=Hn[jn+4&7];if(Mn){var yi=Mn.words,bi=yi[0],Ti=yi[1],Si=(bi<<8|bi>>>24)&16711935|(bi<<24|bi>>>8)&4278255360,Ii=(Ti<<8|Ti>>>24)&16711935|(Ti<<24|Ti>>>8)&4278255360,Ni=Si>>>16|Ii&4294901760,Oi=Ii<<16|Si&65535;hi[0]^=Si,hi[1]^=Ni,hi[2]^=Ii,hi[3]^=Oi,hi[4]^=Si,hi[5]^=Ni,hi[6]^=Ii,hi[7]^=Oi;for(var jn=0;jn<4;jn++)In.call(this)}},_doProcessBlock:function(Rn,Mn){var jn=this._X;In.call(this),D[0]=jn[0]^jn[5]>>>16^jn[3]<<16,D[1]=jn[2]^jn[7]>>>16^jn[5]<<16,D[2]=jn[4]^jn[1]>>>16^jn[7]<<16,D[3]=jn[6]^jn[3]>>>16^jn[1]<<16;for(var Hn=0;Hn<4;Hn++)D[Hn]=(D[Hn]<<8|D[Hn]>>>24)&16711935|(D[Hn]<<24|D[Hn]>>>8)&4278255360,Rn[Mn+Hn]^=D[Hn]},blockSize:128/32,ivSize:64/32});function In(){for(var Rn=this._X,Mn=this._C,jn=0;jn<8;jn++)on[jn]=Mn[jn];Mn[0]=Mn[0]+1295307597+this._b|0,Mn[1]=Mn[1]+3545052371+(Mn[0]>>>0<on[0]>>>0?1:0)|0,Mn[2]=Mn[2]+886263092+(Mn[1]>>>0<on[1]>>>0?1:0)|0,Mn[3]=Mn[3]+1295307597+(Mn[2]>>>0<on[2]>>>0?1:0)|0,Mn[4]=Mn[4]+3545052371+(Mn[3]>>>0<on[3]>>>0?1:0)|0,Mn[5]=Mn[5]+886263092+(Mn[4]>>>0<on[4]>>>0?1:0)|0,Mn[6]=Mn[6]+1295307597+(Mn[5]>>>0<on[5]>>>0?1:0)|0,Mn[7]=Mn[7]+3545052371+(Mn[6]>>>0<on[6]>>>0?1:0)|0,this._b=Mn[7]>>>0<on[7]>>>0?1:0;for(var jn=0;jn<8;jn++){var Hn=Rn[jn]+Mn[jn],hi=Hn&65535,yi=Hn>>>16,bi=((hi*hi>>>17)+hi*yi>>>15)+yi*yi,Ti=((Hn&4294901760)*Hn|0)+((Hn&65535)*Hn|0);h[jn]=bi^Ti}Rn[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,Rn[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,Rn[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,Rn[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,Rn[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,Rn[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,Rn[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,Rn[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}a.Rabbit=s._createHelper(v)}(),i.Rabbit})}(rabbit$1)),rabbit$1.exports}var rabbitLegacy$1={exports:{}},rabbitLegacy=rabbitLegacy$1.exports,hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbitLegacy,function(i){return function(){var a=i,u=a.lib,s=u.StreamCipher,l=a.algo,D=[],on=[],h=[],v=l.RabbitLegacy=s.extend({_doReset:function(){var Rn=this._key.words,Mn=this.cfg.iv,jn=this._X=[Rn[0],Rn[3]<<16|Rn[2]>>>16,Rn[1],Rn[0]<<16|Rn[3]>>>16,Rn[2],Rn[1]<<16|Rn[0]>>>16,Rn[3],Rn[2]<<16|Rn[1]>>>16],Hn=this._C=[Rn[2]<<16|Rn[2]>>>16,Rn[0]&4294901760|Rn[1]&65535,Rn[3]<<16|Rn[3]>>>16,Rn[1]&4294901760|Rn[2]&65535,Rn[0]<<16|Rn[0]>>>16,Rn[2]&4294901760|Rn[3]&65535,Rn[1]<<16|Rn[1]>>>16,Rn[3]&4294901760|Rn[0]&65535];this._b=0;for(var hi=0;hi<4;hi++)In.call(this);for(var hi=0;hi<8;hi++)Hn[hi]^=jn[hi+4&7];if(Mn){var yi=Mn.words,bi=yi[0],Ti=yi[1],Si=(bi<<8|bi>>>24)&16711935|(bi<<24|bi>>>8)&4278255360,Ii=(Ti<<8|Ti>>>24)&16711935|(Ti<<24|Ti>>>8)&4278255360,Ni=Si>>>16|Ii&4294901760,Oi=Ii<<16|Si&65535;Hn[0]^=Si,Hn[1]^=Ni,Hn[2]^=Ii,Hn[3]^=Oi,Hn[4]^=Si,Hn[5]^=Ni,Hn[6]^=Ii,Hn[7]^=Oi;for(var hi=0;hi<4;hi++)In.call(this)}},_doProcessBlock:function(Rn,Mn){var jn=this._X;In.call(this),D[0]=jn[0]^jn[5]>>>16^jn[3]<<16,D[1]=jn[2]^jn[7]>>>16^jn[5]<<16,D[2]=jn[4]^jn[1]>>>16^jn[7]<<16,D[3]=jn[6]^jn[3]>>>16^jn[1]<<16;for(var Hn=0;Hn<4;Hn++)D[Hn]=(D[Hn]<<8|D[Hn]>>>24)&16711935|(D[Hn]<<24|D[Hn]>>>8)&4278255360,Rn[Mn+Hn]^=D[Hn]},blockSize:128/32,ivSize:64/32});function In(){for(var Rn=this._X,Mn=this._C,jn=0;jn<8;jn++)on[jn]=Mn[jn];Mn[0]=Mn[0]+1295307597+this._b|0,Mn[1]=Mn[1]+3545052371+(Mn[0]>>>0<on[0]>>>0?1:0)|0,Mn[2]=Mn[2]+886263092+(Mn[1]>>>0<on[1]>>>0?1:0)|0,Mn[3]=Mn[3]+1295307597+(Mn[2]>>>0<on[2]>>>0?1:0)|0,Mn[4]=Mn[4]+3545052371+(Mn[3]>>>0<on[3]>>>0?1:0)|0,Mn[5]=Mn[5]+886263092+(Mn[4]>>>0<on[4]>>>0?1:0)|0,Mn[6]=Mn[6]+1295307597+(Mn[5]>>>0<on[5]>>>0?1:0)|0,Mn[7]=Mn[7]+3545052371+(Mn[6]>>>0<on[6]>>>0?1:0)|0,this._b=Mn[7]>>>0<on[7]>>>0?1:0;for(var jn=0;jn<8;jn++){var Hn=Rn[jn]+Mn[jn],hi=Hn&65535,yi=Hn>>>16,bi=((hi*hi>>>17)+hi*yi>>>15)+yi*yi,Ti=((Hn&4294901760)*Hn|0)+((Hn&65535)*Hn|0);h[jn]=bi^Ti}Rn[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,Rn[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,Rn[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,Rn[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,Rn[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,Rn[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,Rn[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,Rn[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}a.RabbitLegacy=s._createHelper(v)}(),i.RabbitLegacy})}(rabbitLegacy$1)),rabbitLegacy$1.exports}var blowfish$1={exports:{}},blowfish=blowfish$1.exports,hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(blowfish,function(i){return function(){var a=i,u=a.lib,s=u.BlockCipher,l=a.algo;const D=16,on=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],h=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var v={pbox:[],sbox:[]};function In(hi,yi){let bi=yi>>24&255,Ti=yi>>16&255,Si=yi>>8&255,Ii=yi&255,Ni=hi.sbox[0][bi]+hi.sbox[1][Ti];return Ni=Ni^hi.sbox[2][Si],Ni=Ni+hi.sbox[3][Ii],Ni}function Rn(hi,yi,bi){let Ti=yi,Si=bi,Ii;for(let Ni=0;Ni<D;++Ni)Ti=Ti^hi.pbox[Ni],Si=In(hi,Ti)^Si,Ii=Ti,Ti=Si,Si=Ii;return Ii=Ti,Ti=Si,Si=Ii,Si=Si^hi.pbox[D],Ti=Ti^hi.pbox[D+1],{left:Ti,right:Si}}function Mn(hi,yi,bi){let Ti=yi,Si=bi,Ii;for(let Ni=D+1;Ni>1;--Ni)Ti=Ti^hi.pbox[Ni],Si=In(hi,Ti)^Si,Ii=Ti,Ti=Si,Si=Ii;return Ii=Ti,Ti=Si,Si=Ii,Si=Si^hi.pbox[1],Ti=Ti^hi.pbox[0],{left:Ti,right:Si}}function jn(hi,yi,bi){for(let Oi=0;Oi<4;Oi++){hi.sbox[Oi]=[];for(let Fi=0;Fi<256;Fi++)hi.sbox[Oi][Fi]=h[Oi][Fi]}let Ti=0;for(let Oi=0;Oi<D+2;Oi++)hi.pbox[Oi]=on[Oi]^yi[Ti],Ti++,Ti>=bi&&(Ti=0);let Si=0,Ii=0,Ni=0;for(let Oi=0;Oi<D+2;Oi+=2)Ni=Rn(hi,Si,Ii),Si=Ni.left,Ii=Ni.right,hi.pbox[Oi]=Si,hi.pbox[Oi+1]=Ii;for(let Oi=0;Oi<4;Oi++)for(let Fi=0;Fi<256;Fi+=2)Ni=Rn(hi,Si,Ii),Si=Ni.left,Ii=Ni.right,hi.sbox[Oi][Fi]=Si,hi.sbox[Oi][Fi+1]=Ii;return!0}var Hn=l.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var hi=this._keyPriorReset=this._key,yi=hi.words,bi=hi.sigBytes/4;jn(v,yi,bi)}},encryptBlock:function(hi,yi){var bi=Rn(v,hi[yi],hi[yi+1]);hi[yi]=bi.left,hi[yi+1]=bi.right},decryptBlock:function(hi,yi){var bi=Mn(v,hi[yi],hi[yi+1]);hi[yi]=bi.left,hi[yi+1]=bi.right},blockSize:64/32,keySize:128/32,ivSize:64/32});a.Blowfish=s._createHelper(Hn)}(),i.Blowfish})}(blowfish$1)),blowfish$1.exports}var cryptoJs=cryptoJs$1.exports,hasRequiredCryptoJs;function requireCryptoJs(){return hasRequiredCryptoJs||(hasRequiredCryptoJs=1,function(r,n){(function(i,a,u){r.exports=a(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy(),requireBlowfish())})(cryptoJs,function(i){return i})}(cryptoJs$1)),cryptoJs$1.exports}requireCryptoJs();requireBrowser$b();const APOLLO_SUBSCRIPTION_PROTOCOL="graphql-ws",AUTO_SUBSCRIPTION_PROTOCOL="auto",DEFAULT_SUBSCRIPTION_PROTOCOL=AUTO_SUBSCRIPTION_PROTOCOL,GRAPHQL_WS_SUBSCRIPTION_PROTOCOL="graphql-transport-ws",GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL="graphql-sse",ATTACHMENT_KIND_CONNECTION_SETTINGS="connection-settings",ATTACHMENT_KIND_DOCUMENT_CONTENT="document-content",ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT="origin-document-content",ATTACHMENT_KIND_VARIABLE_COLLECTION="variable-collection",ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION="origin-variable-collection",ATTACHMENT_KIND_FILE_CONTENT="file-content",ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA="variable-json-schema",ITEM_KIND_API="api",ITEM_KIND_NEW_API="new-api",ITEM_KIND_API_DOCUMENT="api-document",ITEM_KIND_BASIC_DOCUMENT="document",ITEM_KIND_HISTORICAL_DOCUMENT="historical-document",ITEM_KIND_NEW_DOCUMENT="new-document",ITEM_KIND_FILE="file";function isApiItem(r){return r?.kind===ITEM_KIND_API}function isNewApiItem(r){return r?.kind===ITEM_KIND_NEW_API}function isDocumentItem(r){return isApiDocumentItem(r)||isBasicDocumentItem(r)||isHistoricalDocumentItem(r)||isNewDocumentItem(r)}function isApiDocumentItem(r){return r?.kind===ITEM_KIND_API_DOCUMENT}function isBasicDocumentItem(r){return r?.kind===ITEM_KIND_BASIC_DOCUMENT}function isHistoricalDocumentItem(r){return r?.kind===ITEM_KIND_HISTORICAL_DOCUMENT}function isNewDocumentItem(r){return r?.kind===ITEM_KIND_NEW_DOCUMENT}function isFileItem(r){return r?.kind===ITEM_KIND_FILE}function isConnectionSettingsAttachment(r){return r?.kind===ATTACHMENT_KIND_CONNECTION_SETTINGS}function isDocumentContentAttachment(r){return r?.kind===ATTACHMENT_KIND_DOCUMENT_CONTENT||r?.kind===ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT}function isVariableCollectionAttachment(r){return r?.kind===ATTACHMENT_KIND_VARIABLE_COLLECTION||r?.kind===ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION}function mergeDocumentItemAndContent(r,n){const{body:i,hash:a,variables:u}=n;return{...r,body:i,hash:a,variables:u}}function calculateVariableJsonSchemaHash(r){const n=createHash(JSON.stringify(r.schema));return{...r,hash:n}}function interpolateHttpConnectionSettings(r,n){const i=r?.http;return i?{...i,authentication:interpolateAuthentication(i.authentication,n),endpoint:interpolateValue(i.endpoint,n),sdlEndpoint:i.sdlEndpoint?interpolateValue(i.sdlEndpoint,n):i.sdlEndpoint,sseSubscriptionEndpoint:i.sseSubscriptionEndpoint?interpolateValue(i.sseSubscriptionEndpoint,n):i.sseSubscriptionEndpoint,subscriptionEndpoint:i.subscriptionEndpoint?interpolateValue(i.subscriptionEndpoint,n):i.subscriptionEndpoint,headers:i.headers?i.headers.map(a=>({...a,name:interpolateValue(a.name,n),value:interpolateValue(a.value,n)})):i.headers}:null}function interpolateAuthentication(r,n){if(r)return r?{...r,basicOptions:r.basicOptions?{password:interpolateValue(r.basicOptions.password,n),username:interpolateValue(r.basicOptions.username,n)}:void 0,bearerOptions:r.bearerOptions?{prefix:r.bearerOptions.prefix?interpolateValue(r.bearerOptions.token,n):void 0,token:interpolateValue(r.bearerOptions.token,n)}:void 0,oAuth2Options:interpolateOAuth2Authentication(r.oAuth2Options,n),headerValue:r.headerValue?interpolateValue(r.headerValue,n):void 0}:void 0}function interpolateOAuth2Authentication(r,n){return r?{...r,accessTokenUrl:interpolateValue(r.accessTokenUrl,n),audience:interpolateValue(r.audience,n),authorizationUrl:interpolateValue(r.authorizationUrl,n),clientId:interpolateValue(r.clientId,n),clientSecret:interpolateValue(r.clientSecret,n),origin:interpolateValue(r.origin,n),password:interpolateValue(r.password,n),prefix:interpolateValue(r.prefix,n),redirectUrl:interpolateValue(r.redirectUrl,n),resource:interpolateValue(r.resource,n),scope:interpolateValue(r.scope,n),state:interpolateValue(r.state,n),username:interpolateValue(r.username,n),sessionId:r.sessionId?interpolateValue(r.sessionId,n):void 0}:void 0}function interpolateValue(r,n){let i=r;const a=r.matchAll(INTERPOLATION_VARIABLE_NAME_PATTERN);for(const u of a)i=i.replace(u[0],n.get(u[1])??u[0]);return i}function resolveVariables(r){const n=new Map;for(const{name:i,value:a,currentValue:u,enabled:s}of r)s&&n.set(i,u||a);return n}async function getConnectionSettings(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async i=>{const a=await i.store.item.get(r);return isApiItem(a)||isNewApiItem(a)||isDocumentItem(a)?getConnectionSettingsTransactional(i,a):i.abort("Item does not exist or is not of type API nor Document.")},n)}async function getInterpolatedHttpConnection(r,n,i){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async a=>{const u=await a.store.item.get(r);if(!(isApiItem(u)||isNewApiItem(u)||isDocumentItem(u)))return a.abort("Item does not exist or is not of type API nor Document.");if(!n)return(await getConnectionSettingsTransactional(a,u))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(a,u),getVariableCollectionByIdTransactional(a,n)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},i)}async function getInterpolatedHttpConnectionForActiveEnvironment(r,n){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async i=>{const a=await i.store.item.get(r);if(!(isApiItem(a)||isNewApiItem(a)||isDocumentItem(a)))return i.abort("Item does not exist or is not of type API nor Document.");let u=null;if(a.workspaceId&&(u=(await i.store.workspace.get(a.workspaceId))?.appState?.activeEnvironmentId??null),!u)return(await getConnectionSettingsTransactional(i,a))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(i,a),getVariableCollectionByIdTransactional(i,u)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},n)}async function getConnectionSettingsTransactional(r,n){const i=await r.store.attachment.get([isApiDocumentItem(n)?n.apiId:n.id,ATTACHMENT_KIND_CONNECTION_SETTINGS]);if(isConnectionSettingsAttachment(i))return i}async function getVariableCollection(r){return openDatabaseScope(async n=>{const i=await n.get("attachment",[r,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(i))return i})}async function getVariableCollectionByIdTransactional(r,n){const i=await r.store.attachment.get([n,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(i))return i}async function getFileContents(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",i=>Promise.all(r.map(async a=>{const u=await i.store.item.get(a);return isFileItem(u)?await i.store.attachment.get([a,ATTACHMENT_KIND_FILE_CONTENT]):i.abort("Item does not exist or is not of type API nor Document.")})),n)}async function getResolvedVariables(r){return resolveVariables(r?(await getVariableCollection(r))?.variables??[]:[])}function getDocumentItemAndContent(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async i=>{const[a,u]=await Promise.all([i.store.item.get(r),i.store.attachment.get([r,ATTACHMENT_KIND_DOCUMENT_CONTENT])]);if(isDocumentItem(a)&&isDocumentContentAttachment(u))return mergeDocumentItemAndContent(a,u)},n)}function getAllFileItemInfos(r){return openDatabaseWithTransactionScope(["item"],"readonly",n=>getFileInfosTransactional(n,r))}function getFileItemInfosByNames(r,...n){return openDatabaseWithTransactionScope(["item"],"readonly",i=>getFileInfosTransactional(i,r,a=>n.includes(a)))}async function getFileInfosTransactional(r,n,i){const a=[],u={};for await(const s of r.index.item.kind.iterate([n,ITEM_KIND_FILE])){const l=s.value;if(isFileItem(l)){l.parentId&&!u[l.parentId]&&(u[l.parentId]=await getItemNamePathTransactional(r,l.path).then(on=>on?.join("/")??""));const D=`${l.parentId&&u[l.parentId]?.length?`${u[l.parentId]}/`:""}${l.name}`;(i?.(D)??!0)&&a.push({id:l.id,workspaceId:l.workspaceId,name:D,size:l.size})}}return a}async function getItemNamePathTransactional(r,n){return Promise.all(n.slice(0,-1).map(async i=>{const a=await r.store.item.get(i);if(!a)throw new Error("Parent does not exist");return a.name}))}async function setVariableJsonSchema(r,n,i){return openDatabaseWithTransactionScope(["attachment","item"],"readwrite",async a=>{let u=await a.store.item.get(r);if(!isDocumentItem(u))return a.abort("Item does not exist or is not of type Document.");const s=calculateVariableJsonSchemaHash({itemId:r,workspaceId:u.workspaceId,kind:ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA,schema:n});return await a.store.attachment.put(s),s},i)}function tryAcquireLock(r,n,i){return openDatabaseWithTransactionScope(["mutex"],"readwrite",async a=>{const u=await a.store.mutex.get(r),s=()=>a.store.mutex.put({resource:r,owner:n,expiresAt:now()+i});return u?u.owner===n||u.expiresAt<now()?(await s(),!0):!1:(await s(),!0)})}function releaseLock(r){return openDatabaseScope(n=>n.delete("mutex",r))}var GraphQLSchemaAttachmentKind=(r=>(r.SDL_SCHEMA="sdl-schema",r.STATISTICS="statistics",r.ITEMS="items",r))(GraphQLSchemaAttachmentKind||{}),GraphQLSchemaKind=(r=>(r.SDL_FETCH="sdl-fetch",r.SDL_PROBE="sdl-probe",r.INTROSPECTION="introspection",r))(GraphQLSchemaKind||{});function isGraphQLSchemaItemsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.ITEMS}function isGraphQLSchemaStatisticsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.STATISTICS}function setGraphQLSchemaEntity(r,n,i,a){return openDatabaseWithTransactionScope(["schema","schema-attachment"],"readwrite",async u=>{const s={endpoint:r,updatedAt:now(),hash:calculateGraphQLSchemaEntityHash(r,i),indexed:!1,hasUploadType:!!n.getType("Upload"),queryTypeName:n.getQueryType()?.name??null,mutationTypeName:n.getMutationType()?.name??null,subscriptionTypeName:n.getSubscriptionType()?.name??null,schemaKind:a};return await Promise.all([u.store.schema.put(s),u.store.schemaAttachment.put({endpoint:r,kind:GraphQLSchemaAttachmentKind.SDL_SCHEMA,value:i}),u.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.ITEMS]),u.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.STATISTICS]),u.done]),s})}function getGraphQLSchemaEntity(r){const n=harmonizeSchemaUrl(r);return getEntityByKey("schema",n)}async function getGraphQLSchemaItems(r){const n=harmonizeSchemaUrl(r),i=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.ITEMS]);return isGraphQLSchemaItemsAttachmentEntity(i)?i.value:void 0}async function getGraphQLSchemaStatistics(r){const n=harmonizeSchemaUrl(r),i=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.STATISTICS]);return isGraphQLSchemaStatisticsAttachmentEntity(i)?i.value:void 0}function calculateGraphQLSchemaEntityHash(r,n){return createHash(JSON.stringify(["graphql-schema-entity",r,n]))}RelativeDateTimeRange.last30Minutes;RelativeDateTimeRange.last30Minutes;function requireLock(r,n,i){const a=FIVE_SECONDS,u=createId("mutex");return acquireLock(r,u,a).then(async()=>{const s=new TimeoutAbortController(a);try{const[l]=await Promise.all([n(s.signal.toAbortSignal()).then(D=>(s.cancel(),D)),s.signal.toPromise()]);return l}catch(l){throw isTimeoutAbortError(l)?new LockExpiredError(r):l}finally{s.cancel(),await releaseLock(r)}})}async function acquireLock(r,n,i){for(;!await tryAcquireLock(r,n,i);)await delay(FIFTY_MILLISECONDS)}class LockExpiredError extends Error{constructor(n){super(`Lock for resource "${n}" has been expired`)}}async function tryGetUserSessionAndRefresh(r){const n=await getCurrentTenant();if(!n)return null;let i=await getUserSession(n);if(!i)return null;if(isSessionExpired(i)&&(i=await refreshSession(i),isSessionExpired(i)))throw new UserSessionExpiredError;return i}async function refreshSession(r,n){return requireLock("refresh-session",i);async function i(a){const u=a;let s=await getUserSession(r)||r;if(!isSessionExpired(s)&&s.requiresSignIn)return s;const l=new Headers,D=new URLSearchParams;l.append(HEADER_CONTENT_TYPE,"application/x-www-form-urlencoded"),D.append("client_id","d8b1d8dd-c26d-4b54-8cde-5f3c8eb054ba"),D.append("grant_type","refresh_token"),D.append("refresh_token",s.refreshToken);try{const on=await fetch(`${s.issuer}/connect/token`,{method:"POST",headers:l,body:D,signal:u});if(on.ok){const h=await on.json();if(isToken(h))return replaceUserSession({...s,requiresSignIn:!1,idToken:h.id_token,accessToken:h.access_token,refreshToken:h.refresh_token,expiresAt:now()+h.expires_in*ONE_SECOND})}else if(on.status===400&&(s=await getUserSession(r)||r,isSessionExpired(s)))return replaceUserSession({...s,requiresSignIn:!0,lastTriedToRefresh:now()});return s}catch(on){console.error(on)}return s=await getUserSession(r)||r,isSessionExpired(s)?replaceUserSession({...s,lastTriedToRefresh:now()}):s}}function isToken(r){return isDictionary(r)&&"access_token"in r}class UserSessionExpiredError extends Error{constructor(){super("User session has been expired")}}async function getHttpOptions(r){const n=await tryGetUserSessionAndRefresh(),i=isURL(r)?r:new URL(r,n?.apiUrl??"https://api.chillicream.com").href,a=getHeaders(n?.accessToken);return{uri:i,headers:a}}function getHeaders(r){const n=new Headers;if(n.set("CCC-Agent",APP_AGENT),n.set("GraphQL-Agent",APP_AGENT),n.set("GraphQL-Client-Id",APP_GRAPHQL_CLIENT_ID),n.set("GraphQL-Client-Version",APP_VERSION),n.set("GraphQL-Defer-RFC","v2"),r)n.set("Authorization",`Bearer ${r}`);else throw new UserSessionExpiredError;return n}var RelayFeatureFlags_1,hasRequiredRelayFeatureFlags;function requireRelayFeatureFlags(){if(hasRequiredRelayFeatureFlags)return RelayFeatureFlags_1;hasRequiredRelayFeatureFlags=1;var r={ENABLE_CLIENT_EDGES:!1,ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_LOAD_QUERY_REQUEST_DEDUPING:!0,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,ENABLE_FIELD_ERROR_HANDLING:!1,ENABLE_FIELD_ERROR_HANDLING_THROW_BY_DEFAULT:!1,ENABLE_FIELD_ERROR_HANDLING_CATCH_DIRECTIVE:!1,ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES:!0,ENABLE_STRICT_EQUAL_SELECTORS:!1};return RelayFeatureFlags_1=r,RelayFeatureFlags_1}var StringInterner,hasRequiredStringInterner;function requireStringInterner(){if(hasRequiredStringInterner)return StringInterner;hasRequiredStringInterner=1;var r=new Map,n=1,i=s(),a=" ",u="\v";function s(){for(var on=new Set,h=0;h<10;++h)on.add(h.toString());return on}function l(on){return on[0]===a&&i.has(on[1])||on[0]===u?u+on:on}function D(on,h){if(h==null||on.length<h)return l(on);var v=r.get(on);return v!=null||(v=a+n++,r.set(on,v)),v}return StringInterner={intern:D},StringInterner}var ClientID,hasRequiredClientID;function requireClientID(){if(hasRequiredClientID)return ClientID;hasRequiredClientID=1;var r=requireRelayFeatureFlags(),n=requireStringInterner(),i=n.intern,a="client:";function u(h,v,In){var Rn=r.STRING_INTERN_LEVEL<=0?h:i(h,r.MAX_DATA_ID_LENGTH),Mn=Rn+":"+v;return In!=null&&(Mn+=":"+In),Mn.indexOf(a)!==0&&(Mn=a+Mn),Mn}function s(h){return h.indexOf(a)===0}var l=0;function D(){return"".concat(a,"local:").concat(l++)}function on(h,v,In){var Rn="".concat(a).concat(h,":").concat(v);return In!=null&&(Rn+=":"+In),Rn}return ClientID={generateClientID:u,generateClientObjectClientID:on,generateUniqueClientID:D,isClientID:s},ClientID}var interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,function(r){function n(i){return i&&i.__esModule?i:{default:i}}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(interopRequireDefault)),interopRequireDefault.exports}var toConsumableArray={exports:{}},arrayWithoutHoles={exports:{}},arrayLikeToArray={exports:{}},hasRequiredArrayLikeToArray;function requireArrayLikeToArray(){return hasRequiredArrayLikeToArray||(hasRequiredArrayLikeToArray=1,function(r){function n(i,a){(a==null||a>i.length)&&(a=i.length);for(var u=0,s=new Array(a);u<a;u++)s[u]=i[u];return s}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayLikeToArray)),arrayLikeToArray.exports}var hasRequiredArrayWithoutHoles;function requireArrayWithoutHoles(){return hasRequiredArrayWithoutHoles||(hasRequiredArrayWithoutHoles=1,function(r){var n=requireArrayLikeToArray();function i(a){if(Array.isArray(a))return n(a)}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayWithoutHoles)),arrayWithoutHoles.exports}var iterableToArray={exports:{}},hasRequiredIterableToArray;function requireIterableToArray(){return hasRequiredIterableToArray||(hasRequiredIterableToArray=1,function(r){function n(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(iterableToArray)),iterableToArray.exports}var unsupportedIterableToArray={exports:{}},hasRequiredUnsupportedIterableToArray;function requireUnsupportedIterableToArray(){return hasRequiredUnsupportedIterableToArray||(hasRequiredUnsupportedIterableToArray=1,function(r){var n=requireArrayLikeToArray();function i(a,u){if(a){if(typeof a=="string")return n(a,u);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(a,u)}}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(unsupportedIterableToArray)),unsupportedIterableToArray.exports}var nonIterableSpread={exports:{}},hasRequiredNonIterableSpread;function requireNonIterableSpread(){return hasRequiredNonIterableSpread||(hasRequiredNonIterableSpread=1,function(r){function n(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
118
118
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(nonIterableSpread)),nonIterableSpread.exports}var hasRequiredToConsumableArray;function requireToConsumableArray(){return hasRequiredToConsumableArray||(hasRequiredToConsumableArray=1,function(r){var n=requireArrayWithoutHoles(),i=requireIterableToArray(),a=requireUnsupportedIterableToArray(),u=requireNonIterableSpread();function s(l){return n(l)||i(l)||a(l)||u()}r.exports=s,r.exports.__esModule=!0,r.exports.default=r.exports}(toConsumableArray)),toConsumableArray.exports}var RelayDefaultHandleKey,hasRequiredRelayDefaultHandleKey;function requireRelayDefaultHandleKey(){return hasRequiredRelayDefaultHandleKey||(hasRequiredRelayDefaultHandleKey=1,RelayDefaultHandleKey={DEFAULT_HANDLE_KEY:""}),RelayDefaultHandleKey}var browser,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;var r=function(n,i,a,u,s,l,D,on){if(!n){var h;if(i===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var v=[a,u,s,l,D,on],In=0;h=new Error(i.replace(/%s/g,function(){return v[In++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return browser=r,browser}var getRelayHandleKey_1,hasRequiredGetRelayHandleKey;function requireGetRelayHandleKey(){if(hasRequiredGetRelayHandleKey)return getRelayHandleKey_1;hasRequiredGetRelayHandleKey=1;var r=requireRelayDefaultHandleKey(),n=r.DEFAULT_HANDLE_KEY,i=requireBrowser();function a(u,s,l){return s&&s!==n?"__".concat(s,"_").concat(u):(l==null&&i(!1),"__".concat(l,"_").concat(u))}return getRelayHandleKey_1=a,getRelayHandleKey_1}var RelayConcreteNode_1,hasRequiredRelayConcreteNode;function requireRelayConcreteNode(){if(hasRequiredRelayConcreteNode)return RelayConcreteNode_1;hasRequiredRelayConcreteNode=1;var r={ACTOR_CHANGE:"ActorChange",CONDITION:"Condition",CLIENT_COMPONENT:"ClientComponent",CLIENT_EDGE_TO_SERVER_OBJECT:"ClientEdgeToServerObject",CLIENT_EDGE_TO_CLIENT_OBJECT:"ClientEdgeToClientObject",CLIENT_EXTENSION:"ClientExtension",DEFER:"Defer",CONNECTION:"Connection",FRAGMENT:"Fragment",FRAGMENT_SPREAD:"FragmentSpread",INLINE_DATA_FRAGMENT_SPREAD:"InlineDataFragmentSpread",INLINE_DATA_FRAGMENT:"InlineDataFragment",INLINE_FRAGMENT:"InlineFragment",LINKED_FIELD:"LinkedField",LINKED_HANDLE:"LinkedHandle",LITERAL:"Literal",LIST_VALUE:"ListValue",LOCAL_ARGUMENT:"LocalArgument",MODULE_IMPORT:"ModuleImport",ALIASED_FRAGMENT_SPREAD:"AliasedFragmentSpread",ALIASED_INLINE_FRAGMENT_SPREAD:"AliasedInlineFragmentSpread",RELAY_RESOLVER:"RelayResolver",RELAY_LIVE_RESOLVER:"RelayLiveResolver",REQUIRED_FIELD:"RequiredField",OBJECT_VALUE:"ObjectValue",OPERATION:"Operation",REQUEST:"Request",ROOT_ARGUMENT:"RootArgument",SCALAR_FIELD:"ScalarField",SCALAR_HANDLE:"ScalarHandle",SPLIT_OPERATION:"SplitOperation",STREAM:"Stream",TYPE_DISCRIMINATOR:"TypeDiscriminator",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"};return RelayConcreteNode_1=r,RelayConcreteNode_1}var stableCopy_1,hasRequiredStableCopy;function requireStableCopy(){if(hasRequiredStableCopy)return stableCopy_1;hasRequiredStableCopy=1;function r(n){if(!n||typeof n!="object")return n;if(Array.isArray(n))return n.map(r);for(var i=Object.keys(n).sort(),a={},u=0;u<i.length;u++)a[i[u]]=r(n[i[u]]);return a}return stableCopy_1=r,stableCopy_1}var RelayStoreUtils_1,hasRequiredRelayStoreUtils;function requireRelayStoreUtils(){if(hasRequiredRelayStoreUtils)return RelayStoreUtils_1;hasRequiredRelayStoreUtils=1;var r=requireInteropRequireDefault().default,n=r(requireToConsumableArray()),i=requireGetRelayHandleKey(),a=requireRelayConcreteNode(),u=requireStableCopy(),s=requireBrowser(),l=a.VARIABLE,D=a.LITERAL,on=a.OBJECT_VALUE,h=a.LIST_VALUE,v="__errors",In="__module_component_",Rn="__module_operation_";function Mn(Fi,Mi){if(Fi.kind===l)return Si(Fi.variableName,Mi);if(Fi.kind===D)return Fi.value;if(Fi.kind===on){var ki={};return Fi.fields.forEach(function(Ei){ki[Ei.name]=Mn(Ei,Mi)}),ki}else if(Fi.kind===h){var Ci=[];return Fi.items.forEach(function(Ei){Ei!=null&&Ci.push(Mn(Ei,Mi))}),Ci}}function jn(Fi,Mi,ki){var Ci={};return ki&&(Ci[Oi.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),Fi&&Fi.forEach(function(Ei){Ci[Ei.name]=Mn(Ei,Mi)}),Ci}function Hn(Fi,Mi){var ki=Fi.dynamicKey,Ci=Fi.handle,Ei=Fi.key,vi=Fi.name,Ln=Fi.args,Yn=Fi.filters,mi=i(Ci,Ei,vi),gi=null;return Ln&&Yn&&Ln.length!==0&&Yn.length!==0&&(gi=Ln.filter(function(_i){return Yn.indexOf(_i.name)>-1})),ki&&(gi=gi!=null?[ki].concat((0,n.default)(gi)):[ki]),gi===null?mi:Ti(mi,jn(gi,Mi))}function hi(Fi,Mi){if(Fi.storageKey)return Fi.storageKey;var ki=yi(Fi),Ci=Fi.name;return ki&&ki.length!==0?Ti(Ci,jn(ki,Mi)):Ci}function yi(Fi){if(Fi.kind==="RelayResolver"||Fi.kind==="RelayLiveResolver"){var Mi;if(Fi.args==null){var ki;return(ki=Fi.fragment)===null||ki===void 0?void 0:ki.args}return((Mi=Fi.fragment)===null||Mi===void 0?void 0:Mi.args)==null?Fi.args:Fi.args.concat(Fi.fragment.args)}var Ci=typeof Fi.args>"u"?void 0:Fi.args;return Ci}function bi(Fi,Mi){return Ti(Fi,u(Mi))}function Ti(Fi,Mi){if(!Mi)return Fi;var ki=[];for(var Ci in Mi)if(Mi.hasOwnProperty(Ci)){var Ei=Mi[Ci];if(Ei!=null){var vi;ki.push(Ci+":"+((vi=JSON.stringify(Ei))!==null&&vi!==void 0?vi:"undefined"))}}return ki.length===0?Fi:Fi+"(".concat(ki.join(","),")")}function Si(Fi,Mi){return Mi.hasOwnProperty(Fi)||s(!1),u(Mi[Fi])}function Ii(Fi){return"".concat(In).concat(Fi)}function Ni(Fi){return"".concat(Rn).concat(Fi)}var Oi={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:v,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",formatStorageKey:Ti,getArgumentValue:Mn,getArgumentValues:jn,getHandleStorageKey:Hn,getStorageKey:hi,getStableStorageKey:bi,getModuleComponentKey:Ii,getModuleOperationKey:Ni};return RelayStoreUtils_1=Oi,RelayStoreUtils_1}var ConnectionInterface_1,hasRequiredConnectionInterface;function requireConnectionInterface(){if(hasRequiredConnectionInterface)return ConnectionInterface_1;hasRequiredConnectionInterface=1;var r={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},n={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},i={inject:function(u){n=u},get:function(){return n},isConnectionCall:function(u){return r.hasOwnProperty(u.name)}};return ConnectionInterface_1=i,ConnectionInterface_1}var emptyFunction_1,hasRequiredEmptyFunction;function requireEmptyFunction(){if(hasRequiredEmptyFunction)return emptyFunction_1;hasRequiredEmptyFunction=1;function r(i){return function(){return i}}var n=function(){};return n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(i){return i},emptyFunction_1=n,emptyFunction_1}var warning_1,hasRequiredWarning;function requireWarning(){if(hasRequiredWarning)return warning_1;hasRequiredWarning=1;var r=requireEmptyFunction(),n=r;return warning_1=n,warning_1}var ConnectionHandler,hasRequiredConnectionHandler;function requireConnectionHandler(){if(hasRequiredConnectionHandler)return ConnectionHandler;hasRequiredConnectionHandler=1;var r=requireClientID(),n=r.generateClientID,i=requireRelayStoreUtils(),a=i.getStableStorageKey,u=requireGetRelayHandleKey(),s=requireConnectionInterface(),l=requireBrowser();requireWarning();var D="connection",on="__connection_next_edge_index";function h(bi,Ti){var Si=bi.get(Ti.dataID);if(Si){var Ii=s.get(),Ni=Ii.EDGES,Oi=Ii.END_CURSOR,Fi=Ii.HAS_NEXT_PAGE,Mi=Ii.HAS_PREV_PAGE,ki=Ii.PAGE_INFO,Ci=Ii.PAGE_INFO_TYPE,Ei=Ii.START_CURSOR,vi=Si.getLinkedRecord(Ti.fieldKey),Ln=vi&&vi.getLinkedRecord(ki);if(!vi){Si.setValue(null,Ti.handleKey);return}var Yn=n(Si.getDataID(),Ti.handleKey),mi=Si.getLinkedRecord(Ti.handleKey),gi=mi??bi.get(Yn),_i=gi&&gi.getLinkedRecord(ki);if(gi){mi==null&&Si.setLinkedRecord(gi,Ti.handleKey);var Ri=gi,Wn=vi.getLinkedRecords(Ni);Wn&&(Wn=Wn.map(function(ra){return hi(bi,Ri,ra)}));var wi=Ri.getLinkedRecords(Ni),qi=Ri.getLinkedRecord(ki);Ri.copyFieldsFrom(vi),wi&&Ri.setLinkedRecords(wi,Ni),qi&&Ri.setLinkedRecord(qi,ki);var Gi=[],ji=Ti.args;if(wi&&Wn)if(ji.after!=null){var Li,$i=(Li=_i)===null||Li===void 0?void 0:Li.getValue(Oi),zi=Ln?.getValue(Oi),Qi=_i&&ji.after===$i,Vi=_i&&$i===zi;if(Qi||Vi){var Bi=new Set;yi(wi,Gi,Bi),yi(Wn,Gi,Bi)}else return}else if(ji.before!=null)if(_i&&ji.before===_i.getValue(Ei)){var Hi=new Set;yi(Wn,Gi,Hi),yi(wi,Gi,Hi)}else return;else Gi=Wn;else Wn?Gi=Wn:Gi=wi;if(Gi!=null&&Gi!==wi&&Ri.setLinkedRecords(Gi,Ni),_i&&Ln){if(ji.after==null&&ji.before==null)_i.copyFieldsFrom(Ln);else if(ji.before!=null||ji.after==null&&ji.last){_i.setValue(!!Ln.getValue(Mi),Mi);var Yi=Ln.getValue(Ei);typeof Yi=="string"&&_i.setValue(Yi,Ei)}else if(ji.after!=null||ji.before==null&&ji.first){_i.setValue(!!Ln.getValue(Fi),Fi);var Ji=Ln.getValue(Oi);typeof Ji=="string"&&_i.setValue(Ji,Oi)}}}else{var Ai=bi.create(Yn,vi.getType());Ai.setValue(0,on),Ai.copyFieldsFrom(vi);var xi=vi.getLinkedRecords(Ni);xi&&(xi=xi.map(function(ra){return hi(bi,Ai,ra)}),Ai.setLinkedRecords(xi,Ni)),Si.setLinkedRecord(Ai,Ti.handleKey),_i=bi.create(n(Ai.getDataID(),ki),Ci),_i.setValue(!1,Fi),_i.setValue(!1,Mi),_i.setValue(null,Oi),_i.setValue(null,Ei),Ln&&_i.copyFieldsFrom(Ln),Ai.setLinkedRecord(_i,ki)}}}function v(bi,Ti,Si){var Ii=u(D,Ti,null);return bi.getLinkedRecord(Ii,Si)}function In(bi,Ti,Si){var Ii=u(D,Ti,null),Ni=a(Ii,Si);return n(bi,Ni)}function Rn(bi,Ti,Si){var Ii=s.get(),Ni=Ii.CURSOR,Oi=Ii.EDGES,Fi=bi.getLinkedRecords(Oi);if(!Fi){bi.setLinkedRecords([Ti],Oi);return}var Mi;if(Si==null)Mi=Fi.concat(Ti);else{Mi=[];for(var ki=!1,Ci=0;Ci<Fi.length;Ci++){var Ei=Fi[Ci];if(Mi.push(Ei),Ei!=null){var vi=Ei.getValue(Ni);Si===vi&&(Mi.push(Ti),ki=!0)}}ki||Mi.push(Ti)}bi.setLinkedRecords(Mi,Oi)}function Mn(bi,Ti,Si,Ii){var Ni=s.get(),Oi=Ni.NODE,Fi=n(Ti.getDataID(),Si.getDataID()),Mi=bi.get(Fi);return Mi||(Mi=bi.create(Fi,Ii)),Mi.setLinkedRecord(Si,Oi),Mi.getValue("cursor")==null&&Mi.setValue(null,"cursor"),Mi}function jn(bi,Ti,Si){var Ii=s.get(),Ni=Ii.CURSOR,Oi=Ii.EDGES,Fi=bi.getLinkedRecords(Oi);if(!Fi){bi.setLinkedRecords([Ti],Oi);return}var Mi;if(Si==null)Mi=[Ti].concat(Fi);else{Mi=[];for(var ki=!1,Ci=0;Ci<Fi.length;Ci++){var Ei=Fi[Ci];if(Ei!=null){var vi=Ei.getValue(Ni);Si===vi&&(Mi.push(Ti),ki=!0)}Mi.push(Ei)}ki||Mi.unshift(Ti)}bi.setLinkedRecords(Mi,Oi)}function Hn(bi,Ti){var Si=s.get(),Ii=Si.EDGES,Ni=Si.NODE,Oi=bi.getLinkedRecords(Ii);if(Oi){for(var Fi,Mi=0;Mi<Oi.length;Mi++){var ki=Oi[Mi],Ci=ki&&ki.getLinkedRecord(Ni);Ci!=null&&Ci.getDataID()===Ti?Fi===void 0&&(Fi=Oi.slice(0,Mi)):Fi!==void 0&&Fi.push(ki)}Fi!==void 0&&bi.setLinkedRecords(Fi,Ii)}}function hi(bi,Ti,Si){if(Si==null)return Si;var Ii=s.get(),Ni=Ii.EDGES,Oi=Ti.getValue(on);typeof Oi!="number"&&l(!1);var Fi=n(Ti.getDataID(),Ni,Oi),Mi=bi.create(Fi,Si.getType());return Mi.copyFieldsFrom(Si),Mi.getValue("cursor")==null&&Mi.setValue(null,"cursor"),Ti.setValue(Oi+1,on),Mi}function yi(bi,Ti,Si){for(var Ii=s.get(),Ni=Ii.NODE,Oi=0;Oi<bi.length;Oi++){var Fi=bi[Oi];if(Fi){var Mi=Fi.getLinkedRecord(Ni),ki=Mi&&Mi.getDataID();if(ki){if(Si.has(ki))continue;Si.add(ki)}Ti.push(Fi)}}}return ConnectionHandler={buildConnectionEdge:hi,createEdge:Mn,deleteNode:Hn,getConnection:v,getConnectionID:In,insertEdgeAfter:Rn,insertEdgeBefore:jn,update:h},ConnectionHandler}var createForOfIteratorHelper={exports:{}},hasRequiredCreateForOfIteratorHelper;function requireCreateForOfIteratorHelper(){return hasRequiredCreateForOfIteratorHelper||(hasRequiredCreateForOfIteratorHelper=1,function(r){var n=requireUnsupportedIterableToArray();function i(a,u){var s=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!s){if(Array.isArray(a)||(s=n(a))||u&&a&&typeof a.length=="number"){s&&(a=s);var l=0,D=function(){};return{s:D,n:function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]}},e:function(Rn){throw Rn},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
119
119
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var on=!0,h=!1,v;return{s:function(){s=s.call(a)},n:function(){var Rn=s.next();return on=Rn.done,Rn},e:function(Rn){h=!0,v=Rn},f:function(){try{!on&&s.return!=null&&s.return()}finally{if(h)throw v}}}}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(createForOfIteratorHelper)),createForOfIteratorHelper.exports}var MutationHandlers,hasRequiredMutationHandlers;function requireMutationHandlers(){if(hasRequiredMutationHandlers)return MutationHandlers;hasRequiredMutationHandlers=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),i=requireConnectionHandler(),a=requireConnectionInterface(),u=requireBrowser(),s=requireWarning(),l={update:function(Hn,hi){var yi=Hn.get(hi.dataID);if(yi!=null){var bi=yi.getValue(hi.fieldKey);typeof bi=="string"?Hn.delete(bi):Array.isArray(bi)&&bi.forEach(function(Ti){typeof Ti=="string"&&Hn.delete(Ti)})}}},D={update:function(Hn,hi){var yi=Hn.get(hi.dataID);if(yi!=null){var bi=hi.handleArgs.connections;bi==null&&u(!1);var Ti=yi.getValue(hi.fieldKey),Si=Array.isArray(Ti)?Ti:[Ti];Si.forEach(function(Ii){if(typeof Ii=="string"){var Ni=(0,n.default)(bi),Oi;try{for(Ni.s();!(Oi=Ni.n()).done;){var Fi=Oi.value,Mi=Hn.get(Fi);Mi!=null&&i.deleteNode(Mi,Ii)}}catch(ki){Ni.e(ki)}finally{Ni.f()}}})}}},on={update:Rn(i.insertEdgeAfter)},h={update:Rn(i.insertEdgeBefore)},v={update:Mn(i.insertEdgeAfter)},In={update:Mn(i.insertEdgeBefore)};function Rn(jn){return function(Hn,hi){var yi,bi=Hn.get(hi.dataID);if(bi!=null){var Ti=hi.handleArgs.connections;Ti==null&&u(!1);var Si,Ii;try{Si=bi.getLinkedRecord(hi.fieldKey)}catch{}if(!Si)try{Ii=bi.getLinkedRecords(hi.fieldKey)}catch{}if(!(Si==null&&Ii==null)){var Ni=a.get(),Oi=Ni.NODE,Fi=Ni.EDGES,Mi=(yi=Ii)!==null&&yi!==void 0?yi:[Si],ki=(0,n.default)(Mi),Ci;try{var Ei=function(){var mi=Ci.value;if(mi==null)return"continue";var gi=mi.getLinkedRecord("node");if(!gi)return"continue";var _i=gi.getDataID(),Ai=(0,n.default)(Ti),xi;try{for(Ai.s();!(xi=Ai.n()).done;){var Ri=xi.value,Wn=Hn.get(Ri);if(Wn!=null){var wi=(vi=Wn.getLinkedRecords(Fi))===null||vi===void 0?void 0:vi.some(function(Gi){var ji;return(Gi==null||(ji=Gi.getLinkedRecord(Oi))===null||ji===void 0?void 0:ji.getDataID())===_i});if(!wi){var qi=i.buildConnectionEdge(Hn,Wn,mi);qi==null&&u(!1),jn(Wn,qi)}}}}catch(Gi){Ai.e(Gi)}finally{Ai.f()}};for(ki.s();!(Ci=ki.n()).done;)var vi,Ln=Ei()}catch(Yn){ki.e(Yn)}finally{ki.f()}}}}}function Mn(jn){return function(Hn,hi){var yi,bi=Hn.get(hi.dataID);if(bi!=null){var Ti=hi.handleArgs,Si=Ti.connections,Ii=Ti.edgeTypeName;Si==null&&u(!1),Ii==null&&u(!1);var Ni,Oi;try{Ni=bi.getLinkedRecord(hi.fieldKey)}catch{}if(!Ni)try{Oi=bi.getLinkedRecords(hi.fieldKey)}catch{}if(!(Ni==null&&Oi==null)){var Fi=a.get(),Mi=Fi.NODE,ki=Fi.EDGES,Ci=(yi=Oi)!==null&&yi!==void 0?yi:[Ni],Ei=(0,n.default)(Ci),vi;try{var Ln=function(){var _i=vi.value;if(_i==null)return"continue";var Ai=_i.getDataID(),xi=(0,n.default)(Si),Ri;try{for(xi.s();!(Ri=xi.n()).done;){var Wn=Ri.value,wi=Hn.get(Wn);if(wi!=null){var qi=(Yn=wi.getLinkedRecords(ki))===null||Yn===void 0?void 0:Yn.some(function(ji){var Li;return(ji==null||(Li=ji.getLinkedRecord(Mi))===null||Li===void 0?void 0:Li.getDataID())===Ai});if(!qi){var Gi=i.createEdge(Hn,wi,_i,Ii);Gi==null&&u(!1),jn(wi,Gi)}}}}catch(ji){xi.e(ji)}finally{xi.f()}};for(Ei.s();!(vi=Ei.n()).done;)var Yn,mi=Ln()}catch(gi){Ei.e(gi)}finally{Ei.f()}}}}}return MutationHandlers={AppendEdgeHandler:on,DeleteRecordHandler:l,PrependEdgeHandler:h,AppendNodeHandler:v,PrependNodeHandler:In,DeleteEdgeHandler:D},MutationHandlers}var RelayDefaultHandlerProvider_1,hasRequiredRelayDefaultHandlerProvider;function requireRelayDefaultHandlerProvider(){if(hasRequiredRelayDefaultHandlerProvider)return RelayDefaultHandlerProvider_1;hasRequiredRelayDefaultHandlerProvider=1;var r=requireConnectionHandler(),n=requireMutationHandlers(),i=requireBrowser();function a(u){switch(u){case"connection":return r;case"deleteRecord":return n.DeleteRecordHandler;case"deleteEdge":return n.DeleteEdgeHandler;case"appendEdge":return n.AppendEdgeHandler;case"prependEdge":return n.PrependEdgeHandler;case"appendNode":return n.AppendNodeHandler;case"prependNode":return n.PrependNodeHandler}i(!1)}return RelayDefaultHandlerProvider_1=a,RelayDefaultHandlerProvider_1}var GraphQLTag,hasRequiredGraphQLTag;function requireGraphQLTag(){if(hasRequiredGraphQLTag)return GraphQLTag;hasRequiredGraphQLTag=1;var r=requireRelayConcreteNode(),n=requireBrowser();requireWarning();function i(jn){n(!1)}function a(jn){var Hn=jn;return typeof Hn=="function"?Hn=Hn():Hn.default&&(Hn=Hn.default),Hn}function u(jn){var Hn=a(jn);return typeof Hn=="object"&&Hn!==null&&Hn.kind===r.FRAGMENT}function s(jn){var Hn=a(jn);return typeof Hn=="object"&&Hn!==null&&Hn.kind===r.REQUEST}function l(jn){var Hn=a(jn);return typeof Hn=="object"&&Hn!==null&&Hn.kind===r.UPDATABLE_QUERY}function D(jn){var Hn=a(jn);return typeof Hn=="object"&&Hn!==null&&Hn.kind===r.INLINE_DATA_FRAGMENT}function on(jn){var Hn=a(jn);return u(Hn)||n(!1),Hn}function h(jn){var Hn,hi=on(jn),yi=(Hn=hi.metadata)===null||Hn===void 0?void 0:Hn.refetch,bi=yi?.connection;return yi===null||typeof yi!="object"||bi===null||typeof bi!="object"?null:hi}function v(jn){var Hn,hi=on(jn),yi=(Hn=hi.metadata)===null||Hn===void 0?void 0:Hn.refetch;return yi===null||typeof yi!="object"?null:hi}function In(jn){var Hn=a(jn);return s(Hn)||n(!1),Hn}function Rn(jn){var Hn=a(jn);return l(Hn)||n(!1),Hn}function Mn(jn){var Hn=a(jn);return D(Hn)||n(!1),Hn}return GraphQLTag={getFragment:on,getNode:a,getPaginationFragment:h,getRefetchableFragment:v,getRequest:In,getUpdatableQuery:Rn,getInlineDataFragment:Mn,graphql:i,isFragment:u,isRequest:s,isUpdatableQuery:l,isInlineDataFragment:D},GraphQLTag}var isRelayModernEnvironment_1,hasRequiredIsRelayModernEnvironment;function requireIsRelayModernEnvironment(){if(hasRequiredIsRelayModernEnvironment)return isRelayModernEnvironment_1;hasRequiredIsRelayModernEnvironment=1;function r(n){return!!(n&&n["@@RelayModernEnvironment"])}return isRelayModernEnvironment_1=r,isRelayModernEnvironment_1}var deepFreeze_1,hasRequiredDeepFreeze;function requireDeepFreeze(){if(hasRequiredDeepFreeze)return deepFreeze_1;hasRequiredDeepFreeze=1;function r(i){return n(i)&&(Object.freeze(i),Object.getOwnPropertyNames(i).forEach(function(a){var u=i[a];u&&typeof u=="object"&&!Object.isFrozen(u)&&r(u)})),i}function n(i){return i!=null&&(Array.isArray(i)||typeof i=="object"&&i.constructor===Object)}return deepFreeze_1=r,deepFreeze_1}var getRequestIdentifier_1,hasRequiredGetRequestIdentifier;function requireGetRequestIdentifier(){if(hasRequiredGetRequestIdentifier)return getRequestIdentifier_1;hasRequiredGetRequestIdentifier=1;var r=requireStableCopy(),n=requireBrowser();function i(a,u){var s=a.cacheID!=null?a.cacheID:a.id;return s==null&&n(!1),s+JSON.stringify(r(u))}return getRequestIdentifier_1=i,getRequestIdentifier_1}var objectSpread2={exports:{}},defineProperty={exports:{}},toPropertyKey={exports:{}},_typeof={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,function(r){function n(i){"@babel/helpers - typeof";return r.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},r.exports.__esModule=!0,r.exports.default=r.exports,n(i)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(_typeof)),_typeof.exports}var toPrimitive={exports:{}},hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,function(r){var n=require_typeof().default;function i(a,u){if(n(a)!="object"||!a)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var l=s.call(a,u||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(a)}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(toPrimitive)),toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){return hasRequiredToPropertyKey||(hasRequiredToPropertyKey=1,function(r){var n=require_typeof().default,i=requireToPrimitive();function a(u){var s=i(u,"string");return n(s)=="symbol"?s:s+""}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(toPropertyKey)),toPropertyKey.exports}var hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,function(r){var n=requireToPropertyKey();function i(a,u,s){return u=n(u),u in a?Object.defineProperty(a,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[u]=s,a}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(defineProperty)),defineProperty.exports}var hasRequiredObjectSpread2;function requireObjectSpread2(){return hasRequiredObjectSpread2||(hasRequiredObjectSpread2=1,function(r){var n=requireDefineProperty();function i(u,s){var l=Object.keys(u);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(u);s&&(D=D.filter(function(on){return Object.getOwnPropertyDescriptor(u,on).enumerable})),l.push.apply(l,D)}return l}function a(u){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?i(Object(l),!0).forEach(function(D){n(u,D,l[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(D){Object.defineProperty(u,D,Object.getOwnPropertyDescriptor(l,D))})}return u}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(objectSpread2)),objectSpread2.exports}var RelayConcreteVariables,hasRequiredRelayConcreteVariables;function requireRelayConcreteVariables(){if(hasRequiredRelayConcreteVariables)return RelayConcreteVariables;hasRequiredRelayConcreteVariables=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),i=requireRelayStoreUtils(),a=i.getArgumentValues,u=requireBrowser();function s(on,h,v){if(on.argumentDefinitions==null)return v;var In;return on.argumentDefinitions.forEach(function(Rn){if(!v.hasOwnProperty(Rn.name))switch(In=In||(0,n.default)({},v),Rn.kind){case"LocalArgument":In[Rn.name]=Rn.defaultValue;break;case"RootArgument":if(!h.hasOwnProperty(Rn.name)){In[Rn.name]=void 0;break}In[Rn.name]=h[Rn.name];break;default:u(!1)}}),In||v}function l(on,h,v){var In={};return on.argumentDefinitions.forEach(function(Rn){var Mn=Rn.defaultValue;v[Rn.name]!=null&&(Mn=v[Rn.name]),In[Rn.name]=Mn}),h!=null&&Object.keys(h).forEach(function(Rn){In[Rn]=h[Rn].get()}),In}function D(on,h,v){if(h==null)return on;var In=(0,n.default)({},on),Rn=v?a(v,on):{};return h.forEach(function(Mn){var jn,Hn=(jn=Rn[Mn.name])!==null&&jn!==void 0?jn:Mn.defaultValue;In[Mn.name]=Hn}),In}return RelayConcreteVariables={getLocalVariables:D,getFragmentVariables:s,getOperationVariables:l},RelayConcreteVariables}var areEqual_1,hasRequiredAreEqual;function requireAreEqual(){if(hasRequiredAreEqual)return areEqual_1;hasRequiredAreEqual=1;var r=[],n=[];/**
120
120
  * Checks if two values are equal. Values may be primitives, arrays, or objects.