From 1ec7a66346e72a9502646989305339b072d07af4 Mon Sep 17 00:00:00 2001 From: kujtimprenkuSQA Date: Mon, 20 Nov 2023 11:44:12 +0000 Subject: [PATCH] deploy: b8dd1cb5f535e6ef4e3c3b759f3dc9ea8b9ce577 --- 3rdpartylicenses.txt | 27 +++++++++++++++++++++++++++ index.html | 2 +- main.0a48d899b0d491a0.js | 7 ------- main.69be3fc37e145fe9.js | 7 +++++++ 4 files changed, 35 insertions(+), 8 deletions(-) delete mode 100644 main.0a48d899b0d491a0.js create mode 100644 main.69be3fc37e145fe9.js diff --git a/3rdpartylicenses.txt b/3rdpartylicenses.txt index 9a7d0cad0..831daf1a5 100644 --- a/3rdpartylicenses.txt +++ b/3rdpartylicenses.txt @@ -1609,6 +1609,31 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @meteorwallet/sdk +@mintbase-js/wallet +MIT +MIT License + +Copyright (c) 2021, 2022, 2023 Mintbase Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @motionone/animation MIT MIT License @@ -2049,6 +2074,8 @@ DEALINGS IN THE SOFTWARE. @near-wallet-selector/meteor-wallet +@near-wallet-selector/mintbase-wallet + @near-wallet-selector/modal-ui-js @near-wallet-selector/my-near-wallet diff --git a/index.html b/index.html index 7fbb73840..bab233222 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/main.0a48d899b0d491a0.js b/main.0a48d899b0d491a0.js deleted file mode 100644 index 32c97f201..000000000 --- a/main.0a48d899b0d491a0.js +++ /dev/null @@ -1,7 +0,0 @@ -(self.webpackChunkangular=self.webpackChunkangular||[]).push([[179],{65421:(ne,a,y)=>{"use strict";var p={};y.r(p),y.d(p,{identity:()=>OV});var C={};y.r(C),y.d(C,{base2:()=>NV});var w={};y.r(w),y.d(w,{base8:()=>PV});var M={};y.r(M),y.d(M,{base10:()=>RV});var u={};y.r(u),y.d(u,{base16:()=>kV,base16upper:()=>LV});var v={};y.r(v),y.d(v,{base32:()=>FV,base32hex:()=>KV,base32hexpad:()=>HV,base32hexpadupper:()=>zV,base32hexupper:()=>VV,base32pad:()=>jV,base32padupper:()=>UV,base32upper:()=>BV,base32z:()=>WV});var g={};y.r(g),y.d(g,{base36:()=>GV,base36upper:()=>ZV});var b={};y.r(b),y.d(b,{base58btc:()=>YV,base58flickr:()=>JV});var I={};y.r(I),y.d(I,{base64:()=>QV,base64pad:()=>qV,base64url:()=>XV,base64urlpad:()=>$V});var _={};y.r(_),y.d(_,{base256emoji:()=>iH});var A={};y.r(A),y.d(A,{sha256:()=>_H,sha512:()=>MH});var R={};y.r(R),y.d(R,{identity:()=>CH});var D={};y.r(D),y.d(D,{code:()=>DH,decode:()=>OH,encode:()=>TH,name:()=>xH});var T={};function F(t){return"function"==typeof t}function L(t){const n=t(o=>{Error.call(o),o.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}y.r(T),y.d(T,{code:()=>kH,decode:()=>FH,encode:()=>LH,name:()=>RH});const V=L(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((o,l)=>`${l+1}) ${o.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function j(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class Z{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const m of n)m.remove(this);else n.remove(this);const{initialTeardown:o}=this;if(F(o))try{o()}catch(m){e=m instanceof V?m.errors:[m]}const{_finalizers:l}=this;if(l){this._finalizers=null;for(const m of l)try{q(m)}catch(N){e=e??[],N instanceof V?e=[...e,...N.errors]:e.push(N)}}if(e)throw new V(e)}}add(e){var n;if(e&&e!==this)if(this.closed)q(e);else{if(e instanceof Z){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}_hasParent(e){const{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){const{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&j(n,e)}remove(e){const{_finalizers:n}=this;n&&j(n,e),e instanceof Z&&e._removeParent(this)}}Z.EMPTY=(()=>{const t=new Z;return t.closed=!0,t})();const Y=Z.EMPTY;function G(t){return t instanceof Z||t&&"closed"in t&&F(t.remove)&&F(t.add)&&F(t.unsubscribe)}function q(t){F(t)?t():t.unsubscribe()}const X={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Q={setTimeout(t,e,...n){const{delegate:o}=Q;return o?.setTimeout?o.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Q;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function z(t){Q.setTimeout(()=>{const{onUnhandledError:e}=X;if(!e)throw t;e(t)})}function $(){}const S=d("C",void 0,void 0);function d(t,e,n){return{kind:t,value:e,error:n}}let h=null;function E(t){if(X.useDeprecatedSynchronousErrorHandling){const e=!h;if(e&&(h={errorThrown:!1,error:null}),t(),e){const{errorThrown:n,error:o}=h;if(h=null,n)throw o}}else t()}class B extends Z{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,G(e)&&e.add(this)):this.destination=Ce}static create(e,n,o){return new se(e,n,o)}next(e){this.isStopped?de(function s(t){return d("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?de(function r(t){return d("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?de(S,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const x=Function.prototype.bind;function f(t,e){return x.call(t,e)}class P{constructor(e){this.partialObserver=e}next(e){const{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(o){te(o)}}error(e){const{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(o){te(o)}else te(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){te(n)}}}class se extends B{constructor(e,n,o){let l;if(super(),F(e)||!e)l={next:e??void 0,error:n??void 0,complete:o??void 0};else{let m;this&&X.useDeprecatedNextContext?(m=Object.create(e),m.unsubscribe=()=>this.unsubscribe(),l={next:e.next&&f(e.next,m),error:e.error&&f(e.error,m),complete:e.complete&&f(e.complete,m)}):l=e}this.destination=new P(l)}}function te(t){X.useDeprecatedSynchronousErrorHandling?function k(t){X.useDeprecatedSynchronousErrorHandling&&h&&(h.errorThrown=!0,h.error=t)}(t):z(t)}function de(t,e){const{onStoppedNotification:n}=X;n&&Q.setTimeout(()=>n(t,e))}const Ce={closed:!0,next:$,error:function ie(t){throw t},complete:$},ye="function"==typeof Symbol&&Symbol.observable||"@@observable";function ve(t){return t}function fe(t){return 0===t.length?ve:1===t.length?t[0]:function(n){return t.reduce((o,l)=>l(o),n)}}class pe{constructor(e){e&&(this._subscribe=e)}lift(e){const n=new pe;return n.source=this,n.operator=e,n}subscribe(e,n,o){const l=function be(t){return t&&t instanceof B||function ce(t){return t&&F(t.next)&&F(t.error)&&F(t.complete)}(t)&&G(t)}(e)?e:new se(e,n,o);return E(()=>{const{operator:m,source:N}=this;l.add(m?m.call(l,N):N?this._subscribe(l):this._trySubscribe(l))}),l}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return new(n=Ee(n))((o,l)=>{const m=new se({next:N=>{try{e(N)}catch(J){l(J),m.unsubscribe()}},error:l,complete:o});this.subscribe(m)})}_subscribe(e){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(e)}[ye](){return this}pipe(...e){return fe(e)(this)}toPromise(e){return new(e=Ee(e))((n,o)=>{let l;this.subscribe(m=>l=m,m=>o(m),()=>n(l))})}}function Ee(t){var e;return null!==(e=t??X.Promise)&&void 0!==e?e:Promise}pe.create=t=>new pe(t);const Ne=L(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class Fe extends pe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new ct(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new Ne}next(e){E(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){E(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){E(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:n,isStopped:o,observers:l}=this;return n||o?Y:(this.currentObservers=null,l.push(e),new Z(()=>{this.currentObservers=null,j(l,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:o,isStopped:l}=this;n?e.error(o):l&&e.complete()}asObservable(){const e=new pe;return e.source=this,e}}Fe.create=(t,e)=>new ct(t,e);class ct extends Fe{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,o;null===(o=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===o||o.call(n,e)}error(e){var n,o;null===(o=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===o||o.call(n,e)}complete(){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===n||n.call(e)}_subscribe(e){var n,o;return null!==(o=null===(n=this.source)||void 0===n?void 0:n.subscribe(e))&&void 0!==o?o:Y}}function Ve(t){return e=>{if(function Ze(t){return F(t?.lift)}(e))return e.lift(function(n){try{return t(n,this)}catch(o){this.error(o)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ut(t,e,n,o,l){return new $e(t,e,n,o,l)}class $e extends B{constructor(e,n,o,l,m,N){super(e),this.onFinalize=m,this.shouldUnsubscribe=N,this._next=n?function(J){try{n(J)}catch(ee){e.error(ee)}}:super._next,this._error=l?function(J){try{l(J)}catch(ee){e.error(ee)}finally{this.unsubscribe()}}:super._error,this._complete=o?function(){try{o()}catch(J){e.error(J)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function tt(t,e){return Ve((n,o)=>{let l=0;n.subscribe(Ut(o,m=>{o.next(t.call(e,m,l++))}))})}function ut(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})}Object.create;function mn(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gt(t){return this instanceof gt?(this.v=t,this):new gt(t)}function on(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,o=n.apply(t,e||[]),m=[];return l={},N("next"),N("throw"),N("return"),l[Symbol.asyncIterator]=function(){return this},l;function N(Ie){o[Ie]&&(l[Ie]=function(Re){return new Promise(function(Te,ke){m.push([Ie,Re,Te,ke])>1||J(Ie,Re)})})}function J(Ie,Re){try{!function ee(Ie){Ie.value instanceof gt?Promise.resolve(Ie.value.v).then(oe,ue):ge(m[0][2],Ie)}(o[Ie](Re))}catch(Te){ge(m[0][3],Te)}}function oe(Ie){J("next",Ie)}function ue(Ie){J("throw",Ie)}function ge(Ie,Re){Ie(Re),m.shift(),m.length&&J(m[0][0],m[0][1])}}function pt(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=mn(t),n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n);function o(m){n[m]=t[m]&&function(N){return new Promise(function(J,ee){(function l(m,N,J,ee){Promise.resolve(ee).then(function(oe){m({value:oe,done:J})},N)})(J,ee,(N=t[m](N)).done,N.value)})}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const Ke=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function it(t){return F(t?.then)}function Je(t){return F(t[ye])}function qe(t){return Symbol.asyncIterator&&F(t?.[Symbol.asyncIterator])}function Ht(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Lt=function Ct(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Tt(t){return F(t?.[Lt])}function Pt(t){return on(this,arguments,function*(){const n=t.getReader();try{for(;;){const{value:o,done:l}=yield gt(n.read());if(l)return yield gt(void 0);yield yield gt(o)}}finally{n.releaseLock()}})}function Bt(t){return F(t?.getReader)}function Zt(t){if(t instanceof pe)return t;if(null!=t){if(Je(t))return function qt(t){return new pe(e=>{const n=t[ye]();if(F(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Ke(t))return function fn(t){return new pe(e=>{for(let n=0;n{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,z)})}(t);if(qe(t))return Rt(t);if(Tt(t))return function Kt(t){return new pe(e=>{for(const n of t)if(e.next(n),e.closed)return;e.complete()})}(t);if(Bt(t))return function Yt(t){return Rt(Pt(t))}(t)}throw Ht(t)}function Rt(t){return new pe(e=>{(function zt(t,e){var n,o,l,m;return ut(this,void 0,void 0,function*(){try{for(n=pt(t);!(o=yield n.next()).done;){const N=o.value;if(e.next(N),e.closed)return}}catch(N){l={error:N}}finally{try{o&&!o.done&&(m=n.return)&&(yield m.call(n))}finally{if(l)throw l.error}}e.complete()})})(t,e).catch(n=>e.error(n))})}function Vt(t,e,n,o=0,l=!1){const m=e.schedule(function(){n(),l?t.add(this.schedule(null,o)):this.unsubscribe()},o);if(t.add(m),!l)return m}function Gt(t,e,n=1/0){return F(e)?Gt((o,l)=>tt((m,N)=>e(o,m,l,N))(Zt(t(o,l))),n):("number"==typeof e&&(n=e),Ve((o,l)=>function nn(t,e,n,o,l,m,N,J){const ee=[];let oe=0,ue=0,ge=!1;const Ie=()=>{ge&&!ee.length&&!oe&&e.complete()},Re=ke=>oe{m&&e.next(ke),oe++;let Ue=!1;Zt(n(ke,ue++)).subscribe(Ut(e,Ge=>{l?.(Ge),m?Re(Ge):e.next(Ge)},()=>{Ue=!0},void 0,()=>{if(Ue)try{for(oe--;ee.length&&oeTe(Ge)):Te(Ge)}Ie()}catch(Ge){e.error(Ge)}}))};return t.subscribe(Ut(e,Re,()=>{ge=!0,Ie()})),()=>{J?.()}}(o,l,t,n)))}const _t=new pe(t=>t.complete());function sn(t){return t[t.length-1]}function Kn(t){return function Wt(t){return t&&F(t.schedule)}(sn(t))?t.pop():void 0}function Hn(t,e=0){return Ve((n,o)=>{n.subscribe(Ut(o,l=>Vt(o,t,()=>o.next(l),e),()=>Vt(o,t,()=>o.complete(),e),l=>Vt(o,t,()=>o.error(l),e)))})}function at(t,e=0){return Ve((n,o)=>{o.add(t.schedule(()=>n.subscribe(o),e))})}function qn(t,e){if(!t)throw new Error("Iterable cannot be null");return new pe(n=>{Vt(n,e,()=>{const o=t[Symbol.asyncIterator]();Vt(n,e,()=>{o.next().then(l=>{l.done?n.complete():n.next(l.value)})},0,!0)})})}function Lr(t,e){if(null!=t){if(Je(t))return function er(t,e){return Zt(t).pipe(at(e),Hn(e))}(t,e);if(Ke(t))return function tr(t,e){return new pe(n=>{let o=0;return e.schedule(function(){o===t.length?n.complete():(n.next(t[o++]),n.closed||this.schedule())})})}(t,e);if(it(t))return function ur(t,e){return Zt(t).pipe(at(e),Hn(e))}(t,e);if(qe(t))return qn(t,e);if(Tt(t))return function Jn(t,e){return new pe(n=>{let o;return Vt(n,e,()=>{o=t[Lt](),Vt(n,e,()=>{let l,m;try{({value:l,done:m}=o.next())}catch(N){return void n.error(N)}m?n.complete():n.next(l)},0,!0)}),()=>F(o?.return)&&o.return()})}(t,e);if(Bt(t))return function rr(t,e){return qn(Pt(t),e)}(t,e)}throw Ht(t)}function cr(t,e){return e?Lr(t,e):Zt(t)}function Pn(...t){const e=Kn(t),n=function Bn(t,e){return"number"==typeof sn(t)?t.pop():e}(t,1/0),o=t;return o.length?1===o.length?Zt(o[0]):function Mt(t=1/0){return Gt(ve,t)}(n)(cr(o,e)):_t}function vr(t,e,...n){if(!0===e)return void t();if(!1===e)return;const o=new se({next:()=>{o.unsubscribe(),t()}});return Zt(e(...n)).subscribe(o)}function Un(t){for(let e in t)if(t[e]===Un)return e;throw Error("Could not find renamed property on target object.")}function jr(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function Xn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Xn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function Ur(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Vs=Un({__forward_ref__:Un});function br(t){return t.__forward_ref__=br,t.toString=function(){return Xn(this())},t}function kn(t){return Uo(t)?t():t}function Uo(t){return"function"==typeof t&&t.hasOwnProperty(Vs)&&t.__forward_ref__===br}function eo(t){return t&&!!t.\u0275providers}const ss="https://g.co/ng/security#xss";class dn extends Error{constructor(e,n){super(to(e,n)),this.code=e}}function to(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function Yn(t){return"string"==typeof t?t:null==t?"":String(t)}function Er(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Yn(t)}function pc(t,e){throw new dn(-201,!1)}function wn(t,e,n){t!=e&&sr(n,t,e,"==")}function Nr(t,e){null==t&&sr(e,t,null,"!=")}function sr(t,e,n,o){throw new Error(`ASSERTION ERROR: ${t}`+(null==o?"":` [Expected=> ${n} ${o} ${e} <=Actual]`))}function Tn(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ri(t){return{providers:t.providers||[],imports:t.imports||[]}}function as(t){return Dh(t,gc)||Dh(t,Cm)}function Dh(t,e){return t.hasOwnProperty(e)?t[e]:null}function Sl(t){return t&&(t.hasOwnProperty(Th)||t.hasOwnProperty(Fb))?t[Th]:null}const gc=Un({\u0275prov:Un}),Th=Un({\u0275inj:Un}),Cm=Un({ngInjectableDef:Un}),Fb=Un({ngInjectorDef:Un});var Mr,t;let jf;function Cs(t){const e=jf;return jf=t,e}function xm(t,e,n){const o=as(t);return o&&"root"==o.providedIn?void 0===o.value?o.value=o.factory():o.value:n&Mr.Optional?null:void 0!==e?e:void pc(Xn(t))}(t=Mr||(Mr={}))[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional";const oi=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Su={},Vp="__NG_DI_FLAG__",_l="ngTempTokenPath",Ub="ngTokenPath",Kb=/\n/gm,Vb="\u0275",Hp="__source";let Uf;function Ml(t){const e=Uf;return Uf=t,e}function Hb(t,e=Mr.Default){if(void 0===Uf)throw new dn(-203,!1);return null===Uf?xm(t,void 0,e):Uf.get(t,e&Mr.Optional?null:void 0,e)}function Gn(t,e=Mr.Default){return(function Bb(){return jf}()||Hb)(kn(t),e)}function Dm(t){throw new dn(202,!1)}function ki(t,e=Mr.Default){return Gn(t,Oh(e))}function Oh(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Kf(t){const e=[];for(let n=0;n ");else if("object"==typeof e){let m=[];for(let N in e)if(e.hasOwnProperty(N)){let J=e[N];m.push(N+":"+("string"==typeof J?JSON.stringify(J):Xn(J)))}l=`{${m.join(", ")}}`}return`${n}${o?"("+o+")":""}[${l}]: ${t.replace(Kb,"\n ")}`}("\n"+t.message,l,n,o),t[Ub]=l,t[_l]=null,t}function ca(t){return{toString:t}.toString()}var yc,la;!function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(yc||(yc={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(la||(la={}));const Vo={},Fr=[],Nh=Un({\u0275cmp:Un}),zp=Un({\u0275dir:Un}),Ph=Un({\u0275pipe:Un}),Wp=Un({\u0275mod:Un}),us=Un({\u0275fac:Un}),Va=Un({__NG_ELEMENT_ID__:Un});let Wb=0;function xs(t){return ca(()=>{const e=Il(t),n={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===yc.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||la.Emulated,id:"c"+Wb++,styles:t.styles||Fr,_:null,schemas:t.schemas||null,tView:null};Yp(n);const o=t.dependencies;return n.directiveDefs=Hf(o,!1),n.pipeDefs=Hf(o,!0),n})}function Gb(t,e,n){const o=t.\u0275cmp;o.directiveDefs=Hf(e,!1),o.pipeDefs=Hf(n,!0)}function Nm(t){return Kr(t)||fo(t)}function Gp(t){return null!==t}function cs(t){return ca(()=>({type:t.type,bootstrap:t.bootstrap||Fr,declarations:t.declarations||Fr,imports:t.imports||Fr,exports:t.exports||Fr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Pm(t,e){return ca(()=>{const n=pi(t,!0);n.declarations=e.declarations||Fr,n.imports=e.imports||Fr,n.exports=e.exports||Fr})}function Zp(t,e){if(null==t)return Vo;const n={};for(const o in t)if(t.hasOwnProperty(o)){let l=t[o],m=l;Array.isArray(l)&&(m=l[1],l=l[0]),n[l]=o,e&&(e[l]=m)}return n}function nr(t){return ca(()=>{const e=Il(t);return Yp(e),e})}function Ho(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Kr(t){return t[Nh]||null}function fo(t){return t[zp]||null}function zo(t){return t[Ph]||null}function Vf(t){const e=Kr(t)||fo(t)||zo(t);return null!==e&&e.standalone}function pi(t,e){const n=t[Wp]||null;if(!n&&!0===e)throw new Error(`Type ${Xn(t)} does not have '\u0275mod' property.`);return n}function Il(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||Fr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Zp(t.inputs,e),outputs:Zp(t.outputs)}}function Yp(t){t.features?.forEach(e=>e(t))}function Hf(t,e){if(!t)return null;const n=e?zo:Nm;return()=>("function"==typeof t?t():t).map(o=>n(o)).filter(Gp)}const fa=0,In=1,lr=2,Ai=3,zs=4,Ds=5,Vi=6,da=7,gi=8,zf=9,mc=10,ir=11,Wf=12,Cl=13,Gf=14,vc=15,no=16,xl=17,bc=18,Ws=19,Dl=20,Ha=21,Zr=22,Jp=1,km=2,_u=7,Rh=8,wc=9,ho=10;function Mo(t){return Array.isArray(t)&&"object"==typeof t[Jp]}function Wo(t){return Array.isArray(t)&&!0===t[Jp]}function Ac(t){return 0!=(4&t.flags)}function Tl(t){return t.componentOffset>-1}function Ol(t){return 1==(1&t.flags)}function Io(t){return!!t.template}function kh(t){return 0!=(256&t[lr])}function Gs(t,e){return t.hasOwnProperty(us)?t[us]:null}class Ga{constructor(e,n,o){this.previousValue=e,this.currentValue=n,this.firstChange=o}isFirstChange(){return this.firstChange}}function Ts(){return Km}function Km(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ec),qb}function qb(){const t=Sc(this),e=t?.current;if(e){const n=t.previous;if(n===Vo)t.previous=e;else for(let o in e)n[o]=e[o];t.current=null,this.ngOnChanges(e)}}function Ec(t,e,n,o){const l=this.declaredInputs[n],m=Sc(t)||function Fh(t,e){return t[Nl]=e}(t,{previous:Vo,current:null}),N=m.current||(m.current={}),J=m.previous,ee=J[l];N[l]=new Ga(ee&&ee.currentValue,e,J===Vo),t[o]=e}Ts.ngInherit=!0;const Nl="__ngSimpleChanges__";function Sc(t){return t[Nl]||null}let Jf=null;const Li=function(t,e,n){Jf?.(t,e,n)},ei="svg",Yr="math";function ci(t){for(;Array.isArray(t);)t=t[fa];return t}function ro(t,e){return ci(e[t])}function Fi(t,e){return ci(e[t.index])}function Co(t,e){return t.data[e]}function Za(t,e){return t[e]}function xo(t,e){const n=e[t];return Mo(n)?n:n[fa]}function _c(t){return 64==(64&t[lr])}function go(t,e){return null==e?null:t[e]}function Qf(t){t[bc]=0}function qf(t,e){t[Ds]+=e;let n=t,o=t[Ai];for(;null!==o&&(1===e&&1===n[Ds]||-1===e&&0===n[Ds]);)o[Ds]+=e,n=o,o=o[Ai]}const or={lFrame:ls(null),bindingsEnabled:!0};function Xf(){return or.bindingsEnabled}function Os(){or.bindingsEnabled=!0}function Ns(){or.bindingsEnabled=!1}function tn(){return or.lFrame.lView}function hr(){return or.lFrame.tView}function io(t){return or.lFrame.contextLView=t,t[gi]}function Do(t){return or.lFrame.contextLView=null,t}function Hi(){let t=jh();for(;null!==t&&64===t.type;)t=t.parent;return t}function jh(){return or.lFrame.currentTNode}function Ic(){const t=or.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Ei(t,e){const n=or.lFrame;n.currentTNode=t,n.isParent=e}function To(){return or.lFrame.isParent}function ti(){or.lFrame.isParent=!1}function oo(){const t=or.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Ys(){return or.lFrame.bindingIndex}function $p(t){return or.lFrame.bindingIndex=t}function Ya(){return or.lFrame.bindingIndex++}function ha(t){const e=or.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function Uh(t){or.lFrame.inI18n=t}function $b(t,e){const n=or.lFrame;n.bindingIndex=n.bindingRootIndex=t,Bl(e)}function Bl(t){or.lFrame.currentDirectiveIndex=t}function jl(t){const e=or.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Cc(){return or.lFrame.currentQueryIndex}function $f(t){or.lFrame.currentQueryIndex=t}function eg(t){const e=t[In];return 2===e.type?e.declTNode:1===e.type?t[Vi]:null}function Kh(t,e,n){if(n&Mr.SkipSelf){let l=e,m=t;for(;(l=l.parent,null===l&&!(n&Mr.Host))&&(l=eg(m),!(null===l||(m=m[vc],10&l.type))););if(null===l)return!1;e=l,t=m}const o=or.lFrame=xc();return o.currentTNode=e,o.lView=t,!0}function ed(t){const e=xc(),n=t[In];or.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function xc(){const t=or.lFrame,e=null===t?null:t.child;return null===e?ls(t):e}function ls(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Mu(){const t=or.lFrame;return or.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Vh=Mu;function Hh(){const t=Mu();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Ja(t){return(or.lFrame.contextLView=function Iu(t,e){for(;t>0;)e=e[vc],t--;return e}(t,or.lFrame.contextLView))[gi]}function so(){return or.lFrame.selectedIndex}function Cu(t){or.lFrame.selectedIndex=t}function Br(){const t=or.lFrame;return Co(t.tView,t.selectedIndex)}function xu(){or.lFrame.currentNamespace=ei}function zh(){or.lFrame.currentNamespace=Yr}function Wm(){!function Wh(){or.lFrame.currentNamespace=null}()}function Ul(t,e){for(let n=e.directiveStart,o=e.directiveEnd;n=o)break}else e[ee]<0&&(t[bc]+=65536),(J>11>16&&(3&t[lr])===e){t[lr]+=2048,Li(4,J,m);try{m.call(J)}finally{Li(5,J,m)}}}else{Li(4,J,m);try{m.call(J)}finally{Li(5,J,m)}}}const pa=-1;class Du{constructor(e,n,o){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=o}}function Qa(t,e,n){let o=0;for(;oe){N=m-1;break}}}for(;m>16}(t),o=e;for(;n>0;)o=o[vc],n--;return o}let Hl=!0;function zl(t){const e=Hl;return Hl=t,e}const fi=255,Di=5;let zi=0;const fs={};function Ou(t,e){const n=ao(t,e);if(-1!==n)return n;const o=e[In];o.firstCreatePass&&(t.injectorIndex=e.length,ig(o.data,t),ig(e,null),ig(o.blueprint,null));const l=id(t,e),m=t.injectorIndex;if(li(l)){const N=Oc(l),J=Vl(l,e),ee=J[In].data;for(let oe=0;oe<8;oe++)e[m+oe]=J[N+oe]|ee[N+oe]}return e[m+8]=l,m}function ig(t,e){t.push(0,0,0,0,0,0,0,0,e)}function ao(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function id(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,o=null,l=e;for(;null!==l;){if(o=ad(l),null===o)return pa;if(n++,l=l[vc],-1!==o.injectorIndex)return o.injectorIndex|n<<16}return pa}function od(t,e,n){!function rd(t,e,n){let o;"string"==typeof n?o=n.charCodeAt(0)||0:n.hasOwnProperty(Va)&&(o=n[Va]),null==o&&(o=n[Va]=zi++);const l=o&fi,m=1<>Di)]|=m}(t,e,n)}function Qs(t,e,n){if(n&Mr.Optional||void 0!==t)return t;pc()}function ds(t,e,n,o){if(n&Mr.Optional&&void 0===o&&(o=null),!(n&(Mr.Self|Mr.Host))){const l=t[zf],m=Cs(void 0);try{return l?l.get(e,o,n&Mr.Optional):xm(e,o,n&Mr.Optional)}finally{Cs(m)}}return Qs(o,0,n)}function Gl(t,e,n,o=Mr.Default,l){if(null!==t){if(1024&e[lr]){const N=function qm(t,e,n,o,l){let m=t,N=e;for(;null!==m&&null!==N&&1024&N[lr]&&!(256&N[lr]);){const J=qh(m,N,n,o|Mr.Self,fs);if(J!==fs)return J;let ee=m.parent;if(!ee){const oe=N[Ha];if(oe){const ue=oe.get(n,fs,o);if(ue!==fs)return ue}ee=ad(N),N=N[vc]}m=ee}return l}(t,e,n,o,fs);if(N!==fs)return N}const m=qh(t,e,n,o,fs);if(m!==fs)return m}return ds(e,n,o,l)}function qh(t,e,n,o,l){const m=function Jm(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Va)?t[Va]:void 0;return"number"==typeof e?e>=0?e&fi:Qm:e}(n);if("function"==typeof m){if(!Kh(e,t,o))return o&Mr.Host?Qs(l,0,o):ds(e,n,o,l);try{const N=m(o);if(null!=N||o&Mr.Optional)return N;pc()}finally{Vh()}}else if("number"==typeof m){let N=null,J=ao(t,e),ee=pa,oe=o&Mr.Host?e[no][Vi]:null;for((-1===J||o&Mr.SkipSelf)&&(ee=-1===J?id(t,e):e[J+8],ee!==pa&&ug(o,!1)?(N=e[In],J=Oc(ee),e=Vl(ee,e)):J=-1);-1!==J;){const ue=e[In];if(ag(m,J,ue.data)){const ge=sg(J,e,n,N,o,oe);if(ge!==fs)return ge}ee=e[J+8],ee!==pa&&ug(o,e[In].data[J+8]===oe)&&ag(m,J,e)?(N=ue,J=Oc(ee),e=Vl(ee,e)):J=-1}}return l}function sg(t,e,n,o,l,m){const N=e[In],J=N.data[t+8],ue=sd(J,N,n,null==o?Tl(J)&&Hl:o!=N&&0!=(3&J.type),l&Mr.Host&&m===J);return null!==ue?Nu(e,N,ue,J):fs}function sd(t,e,n,o,l){const m=t.providerIndexes,N=e.data,J=1048575&m,ee=t.directiveStart,oe=t.directiveEnd,ue=m>>20,Ie=l?J+ue:oe;for(let Re=o?J:J+ue;Re=ee&&Te.type===n)return Re}if(l){const Re=N[ee];if(Re&&Io(Re)&&Re.type===n)return ee}return null}function Nu(t,e,n,o){let l=t[n];const m=e.data;if(function Ym(t){return t instanceof Du}(l)){const N=l;N.resolving&&function Au(t,e){const n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new dn(-200,`Circular dependency in DI detected for ${t}${n}`)}(Er(m[n]));const J=zl(N.canSeeViewProviders);N.resolving=!0;const ee=N.injectImpl?Cs(N.injectImpl):null;Kh(t,o,Mr.Default);try{l=t[n]=N.factory(void 0,m,t,o),e.firstCreatePass&&n>=o.directiveStart&&function Zm(t,e,n){const{ngOnChanges:o,ngOnInit:l,ngDoCheck:m}=e.type.prototype;if(o){const N=Km(e);(n.preOrderHooks??(n.preOrderHooks=[])).push(t,N),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,N)}l&&(n.preOrderHooks??(n.preOrderHooks=[])).push(0-t,l),m&&((n.preOrderHooks??(n.preOrderHooks=[])).push(t,m),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,m))}(n,m[n],e)}finally{null!==ee&&Cs(ee),zl(J),N.resolving=!1,Vh()}}return l}function ag(t,e,n){const o=1<>Di)]&o)}function ug(t,e){return!(t&Mr.Self||t&Mr.Host&&e)}class Nc{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,o){return Gl(this._tNode,this._lView,e,Oh(o),n)}}function Qm(){return new Nc(Hi(),tn())}function Wi(t){return ca(()=>{const e=t.prototype.constructor,n=e[us]||Pc(e),o=Object.prototype;let l=Object.getPrototypeOf(t.prototype).constructor;for(;l&&l!==o;){const m=l[us]||Pc(l);if(m&&m!==n)return m;l=Object.getPrototypeOf(l)}return m=>new m})}function Pc(t){return Uo(t)?()=>{const e=Pc(kn(t));return e&&e()}:Gs(t)}function ad(t){const e=t[In],n=e.type;return 2===n?e.declTNode:1===n?t[Vi]:null}function Zl(t){return function og(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const n=t.attrs;if(n){const o=n.length;let l=0;for(;l{const m=Xh(e);function N(...J){if(this instanceof N)return m.call(this,...J),this;const ee=new N(...J);return function(ue){return l&&l(ue,...J),(ue.hasOwnProperty(Rc)?ue[Rc]:Object.defineProperty(ue,Rc,{value:[]})[Rc]).push(ee),o&&o(ue),ue}}return n&&(N.prototype=Object.create(n.prototype)),N.prototype.ngMetadataName=t,N.annotationCls=N,N})}function Xh(t){return function(...n){if(t){const o=t(...n);for(const l in o)this[l]=o[l]}}}function Lc(t,e,n){return ca(()=>{const o=Xh(e);function l(...m){if(this instanceof l)return o.apply(this,m),this;const N=new l(...m);return J.annotation=N,J;function J(ee,oe,ue){const ge=ee.hasOwnProperty(Pu)?ee[Pu]:Object.defineProperty(ee,Pu,{value:[]})[Pu];for(;ge.length<=ue;)ge.push(null);return(ge[ue]=ge[ue]||[]).push(N),ee}}return n&&(l.prototype=Object.create(n.prototype)),l.prototype.ngMetadataName=t,l.annotationCls=l,l})}function ya(t,e,n,o){return ca(()=>{const l=Xh(e);function m(...N){if(this instanceof m)return l.apply(this,N),this;const J=new m(...N);return function ee(oe,ue){const ge=oe.constructor,Ie=ge.hasOwnProperty(kc)?ge[kc]:Object.defineProperty(ge,kc,{value:{}})[kc];Ie[ue]=Ie.hasOwnProperty(ue)&&Ie[ue]||[],Ie[ue].unshift(J),o&&o(oe,ue,...N)}}return n&&(m.prototype=Object.create(n.prototype)),m.prototype.ngMetadataName=t,m.annotationCls=m,m})}const Xm=Lc("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>Zl(t)}));class $n{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=Tn({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new $n("AnalyzeForEntryComponents");class ud{}ya("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),ud),ya("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),ud),ya("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),ud),ya("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),ud);var Ru,cd,ev;function Bi(t){const e=oi.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(Ru||(Ru={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}(cd||(cd={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(ev||(ev={}));const cg=Function;function ma(t){return"function"==typeof t}function Go(t){return t.flat(Number.POSITIVE_INFINITY)}function Fc(t,e){t.forEach(n=>Array.isArray(n)?Fc(n,e):e(n))}function fg(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function ld(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Jl(t,e){const n=[];for(let o=0;o=0?t[1|o]=n:(o=~o,function sw(t,e,n,o){let l=t.length;if(l==e)t.push(n,o);else if(1===l)t.push(o,t[0]),t[0]=n;else{for(l--,t.push(t[l-1],t[l]);l>e;){const m=l-2;t[l]=t[m],l--}t[e]=n,t[e+1]=o}}(t,o,e,n)),o}function $h(t,e){const n=Bc(t,e);if(n>=0)return t[1|n]}function Bc(t,e){return dg(t,e,1)}function dg(t,e,n){let o=0,l=t.length>>n;for(;l!==o;){const m=o+(l-o>>1),N=t[m<e?l=m:o=m+1}return~(l<new e(...n)}_zipTypesAndAnnotations(e,n){let o;o=Jl(typeof e>"u"?n.length:e.length);for(let l=0;l"u"?o[l]=[]:e[l]&&e[l]!=Object?o[l]=[e[l]]:o[l]=[],n&&null!=n[l]&&(o[l]=o[l].concat(n[l]));return o}_ownParameters(e,n){if(function iv(t){return nv.test(t)||pg.test(t)||hg.test(t)&&!rv.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==n.parameters)return e.parameters;const l=e.ctorParameters;if(l&&l!==n.ctorParameters){const J="function"==typeof l?l():l,ee=J.map(ue=>ue&&ue.type),oe=J.map(ue=>ue&&fd(ue.decorators));return this._zipTypesAndAnnotations(ee,oe)}const m=e.hasOwnProperty(Pu)&&e[Pu],N=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return N||m?this._zipTypesAndAnnotations(N,m):Jl(e.length)}parameters(e){if(!ma(e))return[];const n=Ql(e);let o=this._ownParameters(e,n);return!o&&n!==Object&&(o=this.parameters(n)),o||[]}_ownAnnotations(e,n){if(e.annotations&&e.annotations!==n.annotations){let o=e.annotations;return"function"==typeof o&&o.annotations&&(o=o.annotations),o}return e.decorators&&e.decorators!==n.decorators?fd(e.decorators):e.hasOwnProperty(Rc)?e[Rc]:null}annotations(e){if(!ma(e))return[];const n=Ql(e),o=this._ownAnnotations(e,n)||[];return(n!==Object?this.annotations(n):[]).concat(o)}_ownPropMetadata(e,n){if(e.propMetadata&&e.propMetadata!==n.propMetadata){let o=e.propMetadata;return"function"==typeof o&&o.propMetadata&&(o=o.propMetadata),o}if(e.propDecorators&&e.propDecorators!==n.propDecorators){const o=e.propDecorators,l={};return Object.keys(o).forEach(m=>{l[m]=fd(o[m])}),l}return e.hasOwnProperty(kc)?e[kc]:null}propMetadata(e){if(!ma(e))return{};const n=Ql(e),o={};if(n!==Object){const m=this.propMetadata(n);Object.keys(m).forEach(N=>{o[N]=m[N]})}const l=this._ownPropMetadata(e,n);return l&&Object.keys(l).forEach(m=>{const N=[];o.hasOwnProperty(m)&&N.push(...o[m]),N.push(...l[m]),o[m]=N}),o}ownPropMetadata(e){return ma(e)&&this._ownPropMetadata(e,Ql(e))||{}}hasLifecycleHook(e,n){return e instanceof cg&&n in e.prototype}}function fd(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function Ql(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const e0=Ka(Lc("Inject",t=>({token:t})),-1),jc=Ka(Lc("Optional"),8),ql=Ka(Lc("Self"),2),dd=Ka(Lc("SkipSelf"),4),sv=Ka(Lc("Host"),1);let t0=null;function Xl(){return t0=t0||new ov}function Uc(t){return va(Xl().parameters(t))}function va(t){return t.map(e=>function uw(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let n=0;n|^->||--!>|)/,o0="\u200b$1\u200b";function s0(t){return t.replace(dv,e=>e.replace(pw,o0))}const Zo=new Map;let xr=0;const nf="__ngContext__";function Yi(t,e){Mo(e)?(t[nf]=e[Dl],function Ti(t){Zo.set(t[Dl],t)}(e)):t[nf]=e}let zc;function gd(t,e){return zc(t,e)}function ju(t){const e=t[Ai];return Wo(e)?e[Ai]:e}function gs(t){return Eg(t[Cl])}function vo(t){return Eg(t[zs])}function Eg(t){for(;null!==t&&!Wo(t);)t=t[zs];return t}function Ku(t,e,n,o,l){if(null!=o){let m,N=!1;Wo(o)?m=o:Mo(o)&&(N=!0,o=o[fa]);const J=ci(o);0===t&&null!==n?null==l?Ig(e,n,J):Rs(e,n,J,l||null,!0):1===t&&null!==n?Rs(e,n,J,l||null,!0):2===t?sf(e,J,N):3===t&&e.destroyNode(J),null!=m&&function bw(t,e,n,o,l){const m=n[_u],N=ci(n);m!==N&&Ku(e,t,o,m,l);for(let J=ho;J0&&(n[l-1][zs]=e),o0&&(t[n-1][zs]=o[zs]);const m=ld(t,ho+e);!function Sg(t,e){Zc(t,e,e[ir],2,null,null),e[fa]=null,e[Vi]=null}(o[In],o);const N=m[Ws];null!==N&&N.detachView(m[In]),o[Ai]=null,o[zs]=null,o[lr]&=-65}return o}function yv(t,e){if(!(128&e[lr])){const n=e[ir];n.destroyNode&&Zc(t,e,n,3,null,null),function Gc(t){let e=t[Cl];if(!e)return Mg(t[In],t);for(;e;){let n=null;if(Mo(e))n=e[Cl];else{const o=e[ho];o&&(n=o)}if(!n){for(;e&&!e[zs]&&e!==t;)Mo(e)&&Mg(e[In],e),e=e[Ai];null===e&&(e=t),Mo(e)&&Mg(e[In],e),n=e&&e[zs]}e=n}}(e)}}function Mg(t,e){if(!(128&e[lr])){e[lr]&=-65,e[lr]|=128,function vv(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let o=0;o=0?o[l=N]():o[l=-N].unsubscribe(),m+=2}else{const N=o[l=n[m+1]];n[m].call(N)}if(null!==o){for(let m=l+1;m-1){const{encapsulation:m}=t.data[o.directiveStart+l];if(m===la.None||m===la.Emulated)return null}return Fi(o,n)}}function Rs(t,e,n,o,l){t.insertBefore(e,n,o,l)}function Ig(t,e,n){t.appendChild(e,n)}function yi(t,e,n,o,l){null!==o?Rs(t,e,n,o,l):Ig(t,e,n)}function p0(t,e){return t.parentNode(e)}function Cg(t,e,n){return wv(t,e,n)}function xg(t,e,n){return 40&t.type?Fi(t,n):null}let Yo,Ad,uf,Yc,wv=xg;function g0(t,e){wv=t,Yo=e}function y0(t,e,n,o){const l=Hu(t,o,e),m=e[ir],J=Cg(o.parent||e[Vi],o,e);if(null!=l)if(Array.isArray(n))for(let ee=0;eet,createScript:t=>t,createScriptURL:t=>t})}catch{}return Ad}function af(t){return Ed()?.createHTML(t)||t}function Og(t,e,n){const o=tn(),l=Br(),m=Fi(l,o);if(2===l.type&&"iframe"===e.toLowerCase()){const N=m;N.src="",N.srcdoc=af(""),sf(o[ir],N);throw new dn(-910,!1)}return t}function Mv(){return void 0!==uf?uf:typeof document<"u"?document:void 0}function Ng(){if(void 0===Yc&&(Yc=null,oi.trustedTypes))try{Yc=oi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Yc}function cf(t){return Ng()?.createHTML(t)||t}function Iv(t){return Ng()?.createScript(t)||t}function Sd(t){return Ng()?.createScriptURL(t)||t}class O{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ss})`}}class H extends O{getTypeName(){return"HTML"}}class re extends O{getTypeName(){return"Style"}}class le extends O{getTypeName(){return"Script"}}class Me extends O{getTypeName(){return"URL"}}class Oe extends O{getTypeName(){return"ResourceURL"}}function He(t){return t instanceof O?t.changingThisBreaksApplicationSecurity:t}function rt(t,e){const n=function bt(t){return t instanceof O&&t.getTypeName()||null}(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${ss})`)}return n===e}function On(t){const e=new Ci(t);return function Dt(){try{return!!(new window.DOMParser).parseFromString(af(""),"text/html")}catch{return!1}}()?new Ln(e):e}class Ln{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const n=(new window.DOMParser).parseFromString(af(e),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(e):(n.removeChild(n.firstChild),n)}catch{return null}}}class Ci{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const n=this.inertDocument.createElement("template");return n.innerHTML=af(e),n}}const Et=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Nt(t){return(t=String(t)).match(Et)?t:"unsafe:"+t}function hn(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Rn(...t){const e={};for(const n of t)for(const o in n)n.hasOwnProperty(o)&&(e[o]=!0);return e}const zn=hn("area,br,col,hr,img,wbr"),Wn=hn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Qn=hn("rp,rt"),Ji=Rn(Qn,Wn),Rr=Rn(Wn,hn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),zu=Rn(Qn,hn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Pg=Rn(zn,Rr,zu,Ji),ww=hn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),PD=hn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),RD=hn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),nS=Rn(ww,PD,RD),kD=hn("script,style,template");class LD{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let n=e.firstChild,o=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?o=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,o&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let l=this.checkClobberedElement(n,n.nextSibling);if(l){n=l;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(e){const n=e.nodeName.toLowerCase();if(!Pg.hasOwnProperty(n))return this.sanitizedSomething=!0,!kD.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const o=e.attributes;for(let l=0;l"),!0}endElement(e){const n=e.nodeName.toLowerCase();Pg.hasOwnProperty(n)&&!zn.hasOwnProperty(n)&&(this.buf.push(""))}chars(e){this.buf.push(rS(e))}checkClobberedElement(e,n){if(n&&(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return n}}const FD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BD=/([^\#-~ |!])/g;function rS(t){return t.replace(/&/g,"&").replace(FD,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(BD,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let Cv;function iS(t,e){let n=null;try{Cv=Cv||On(t);let o=e?String(e):"";n=Cv.getInertBodyElement(o);let l=5,m=o;do{if(0===l)throw new Error("Failed to sanitize html because the input is unstable");l--,o=m,m=n.innerHTML,n=Cv.getInertBodyElement(o)}while(o!==m);return af((new LD).sanitizeChildren(Aw(n)||n))}finally{if(n){const o=Aw(n)||n;for(;o.firstChild;)o.removeChild(o.firstChild)}}}function Aw(t){return"content"in t&&function jD(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var $s;function UD(t){const e=Rg();return e?cf(e.sanitize($s.HTML,t)||""):rt(t,"HTML")?cf(He(t)):iS(Mv(),Yn(t))}function KD(t){const e=Rg();return e?e.sanitize($s.STYLE,t)||"":rt(t,"Style")?He(t):Yn(t)}function oS(t){const e=Rg();return e?e.sanitize($s.URL,t)||"":rt(t,"URL")?He(t):Nt(Yn(t))}function sS(t){const e=Rg();if(e)return Sd(e.sanitize($s.RESOURCE_URL,t)||"");if(rt(t,"ResourceURL"))return Sd(He(t));throw new dn(904,!1)}function VD(t){const e=Rg();if(e)return Iv(e.sanitize($s.SCRIPT,t)||"");if(rt(t,"Script"))return Iv(He(t));throw new dn(905,!1)}function HD(t){return af(t[0])}function zD(t){return function Dg(t){return Ed()?.createScriptURL(t)||t}(t[0])}function GD(t,e,n){return function WD(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?sS:oS}(e,n)(t)}function Rg(){const t=tn();return t&&t[Wf]}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}($s||($s={}));const aS=new $n("ENVIRONMENT_INITIALIZER"),uS=new $n("INJECTOR",-1),cS=new $n("INJECTOR_DEF_TYPES");class lS{get(e,n=Su){if(n===Su){const o=new Error(`NullInjectorError: No provider for ${Xn(e)}!`);throw o.name="NullInjectorError",o}return n}}function ZD(...t){return{\u0275providers:fS(!0,t),\u0275fromNgModule:!0}}function fS(t,...e){const n=[],o=new Set;let l;return Fc(e,m=>{const N=m;Ew(N,n,[],o)&&(l||(l=[]),l.push(N))}),void 0!==l&&dS(l,n),n}function dS(t,e){for(let n=0;n{e.push(m)})}}function Ew(t,e,n,o){if(!(t=kn(t)))return!1;let l=null,m=Sl(t);const N=!m&&Kr(t);if(m||N){if(N&&!N.standalone)return!1;l=t}else{const ee=t.ngModule;if(m=Sl(ee),!m)return!1;l=ee}const J=o.has(l);if(N){if(J)return!1;if(o.add(l),N.dependencies){const ee="function"==typeof N.dependencies?N.dependencies():N.dependencies;for(const oe of ee)Ew(oe,e,n,o)}}else{if(!m)return!1;{if(null!=m.imports&&!J){let oe;o.add(l);try{Fc(m.imports,ue=>{Ew(ue,e,n,o)&&(oe||(oe=[]),oe.push(ue))})}finally{}void 0!==oe&&dS(oe,e)}if(!J){const oe=Gs(l)||(()=>new l);e.push({provide:l,useFactory:oe,deps:Fr},{provide:cS,useValue:l,multi:!0},{provide:aS,useValue:()=>Gn(l),multi:!0})}const ee=m.providers;if(null!=ee&&!J){Sw(ee,ue=>{e.push(ue)})}}}return l!==t&&void 0!==t.providers}function Sw(t,e){for(let n of t)eo(n)&&(n=n.\u0275providers),Array.isArray(n)?Sw(n,e):e(n)}const YD=Un({provide:String,useValue:Un});function _w(t){return null!==t&&"object"==typeof t&&YD in t}function hS(t){return!(!t||!t.useExisting)}function pS(t){return!(!t||!t.useFactory)}function _d(t){return"function"==typeof t}const Mw=new $n("Set Injector scope."),xv={},QD={};let Iw;function Dv(){return void 0===Iw&&(Iw=new lS),Iw}class v0{}class gS extends v0{get destroyed(){return this._destroyed}constructor(e,n,o,l){super(),this.parent=n,this.source=o,this.scopes=l,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,xw(e,N=>this.processProvider(N)),this.records.set(uS,b0(void 0,this)),l.has("environment")&&this.records.set(v0,b0(void 0,this));const m=this.records.get(Mw);null!=m&&"string"==typeof m.value&&this.scopes.add(m.value),this.injectorDefTypes=new Set(this.get(cS.multi,Fr,Mr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const n=Ml(this),o=Cs(void 0);try{return e()}finally{Ml(n),Cs(o)}}get(e,n=Su,o=Mr.Default){this.assertNotDestroyed(),o=Oh(o);const l=Ml(this),m=Cs(void 0);try{if(!(o&Mr.SkipSelf)){let J=this.records.get(e);if(void 0===J){const ee=function tT(t){return"function"==typeof t||"object"==typeof t&&t instanceof $n}(e)&&as(e);J=ee&&this.injectableDefInScope(ee)?b0(Cw(e),xv):null,this.records.set(e,J)}if(null!=J)return this.hydrate(e,J)}const N=o&Mr.Self?Dv():this.parent;return n=o&Mr.Optional&&n===Su?null:n,N.get(e,n)}catch(N){if("NullInjectorError"===N.name){if((N[_l]=N[_l]||[]).unshift(Xn(e)),l)throw N;return Tm(N,e,"R3InjectorError",this.source)}throw N}finally{Cs(m),Ml(l)}}resolveInjectorInitializers(){const e=Ml(this),n=Cs(void 0);try{const o=this.get(aS.multi,Fr,Mr.Self);for(const l of o)l()}finally{Ml(e),Cs(n)}}toString(){const e=[],n=this.records;for(const o of n.keys())e.push(Xn(o));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new dn(205,!1)}processProvider(e){let n=_d(e=kn(e))?e:kn(e&&e.provide);const o=function XD(t){if(_w(t))return b0(void 0,t.useValue);return b0(yS(t),xv)}(e);if(_d(e)||!0!==e.multi){this.records.get(n)}else{let l=this.records.get(n);l||(l=b0(void 0,xv,!0),l.factory=()=>Kf(l.multi),this.records.set(n,l)),n=e,l.multi.push(e)}this.records.set(n,o)}hydrate(e,n){return n.value===xv&&(n.value=QD,n.value=n.factory()),"object"==typeof n.value&&n.value&&function eT(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=kn(e.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}}function Cw(t){const e=as(t),n=null!==e?e.factory:Gs(t);if(null!==n)return n;if(t instanceof $n)throw new dn(204,!1);if(t instanceof Function)return function qD(t){const e=t.length;if(e>0){Jl(e,"?");throw new dn(204,!1)}const n=function Kp(t){return t&&(t[gc]||t[Cm])||null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new dn(204,!1)}function yS(t,e,n){let o;if(_d(t)){const l=kn(t);return Gs(l)||Cw(l)}if(_w(t))o=()=>kn(t.useValue);else if(pS(t))o=()=>t.useFactory(...Kf(t.deps||[]));else if(hS(t))o=()=>Gn(kn(t.useExisting));else{const l=kn(t&&(t.useClass||t.provide));if(!function $D(t){return!!t.deps}(t))return Gs(l)||Cw(l);o=()=>new l(...Kf(t.deps))}return o}function b0(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function xw(t,e){for(const n of t)Array.isArray(n)?xw(n,e):n&&eo(n)?xw(n.\u0275providers,e):e(n)}class nT{}class mS{}const vS="ngComponent";class iT{resolveComponentFactory(e){throw function rT(t){const e=Error(`No component factory found for ${Xn(t)}. Did you add it to @NgModule.entryComponents?`);return e[vS]=t,e}(e)}}class kg{}function w0(t,e){return new ea(Fi(t,e))}kg.NULL=new iT;class ea{constructor(e){this.nativeElement=e}}function sT(t){return t instanceof ea?t.nativeElement:t}ea.__NG_ELEMENT_ID__=function oT(){return w0(Hi(),tn())};class bS{}class Jc{}Jc.__NG_ELEMENT_ID__=()=>function aT(){const t=tn(),n=xo(Hi().index,t);return(Mo(n)?n:t)[ir]}();class Dw{}Dw.\u0275prov=Tn({token:Dw,providedIn:"root",factory:()=>null});class Tv{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const uT=new Tv("15.2.9"),Tw={},Ow="ngOriginalError";function Nw(t){return t[Ow]}class A0{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e);this._console.error("ERROR",e),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(e){let n=e&&Nw(e);for(;n&&Nw(n);)n=Nw(n);return n||null}}function pT(t){return t.ownerDocument.defaultView}function gT(t){return t.ownerDocument}function yT(t){return t.ownerDocument.body}function Qc(t){return t instanceof Function?t():t}function AS(t,e,n){let o=t.length;for(;;){const l=t.indexOf(e,n);if(-1===l)return l;if(0===l||t.charCodeAt(l-1)<=32){const m=e.length;if(l+m===o||t.charCodeAt(l+m)<=32)return l}n=l+1}}const ES="ng-template";function bT(t,e,n){let o=0,l=!0;for(;om?"":l[ge+1].toLowerCase();const Re=8&o?Ie:null;if(Re&&-1!==AS(Re,oe,0)||2&o&&oe!==Ie){if($a(o))return!1;N=!0}}}}else{if(!N&&!$a(o)&&!$a(ee))return!1;if(N&&$a(ee))continue;N=!1,o=ee|1&o}}return $a(o)||N}function $a(t){return 0==(1&t)}function ET(t,e,n,o){if(null===e)return-1;let l=0;if(o||!n){let m=!1;for(;l-1)for(n++;n0?'="'+J+'"':"")+"]"}else 8&o?l+="."+N:4&o&&(l+=" "+N);else""!==l&&!$a(N)&&(e+=MS(m,l),l=""),o=N,m=m||!$a(o);n++}return""!==l&&(e+=MS(m,l)),e}const pr={};function Jo(t){IS(hr(),tn(),so()+t,!1)}function IS(t,e,n,o){if(!o)if(3==(3&e[lr])){const m=t.preOrderCheckHooks;null!==m&&Dc(e,m,n)}else{const m=t.preOrderHooks;null!==m&&td(e,m,0,n)}Cu(n)}const CS={\u0275\u0275defineInjectable:Tn,\u0275\u0275defineInjector:Ri,\u0275\u0275inject:Gn,\u0275\u0275invalidFactoryDep:Dm,resolveForwardRef:kn};function TT(t,e){let n=null,o=null;t.hasOwnProperty(gc)||Object.defineProperty(t,gc,{get:()=>(null===n&&(n=Bi().compileInjectable(CS,`ng:///${t.name}/\u0275prov.js`,function RT(t,e){const n=e||{providedIn:null},o={name:t.name,type:t,typeArgumentCount:0,providedIn:n.providedIn};return(xS(n)||DS(n))&&void 0!==n.deps&&(o.deps=va(n.deps)),xS(n)?o.useClass=n.useClass:function NT(t){return OT in t}(n)?o.useValue=n.useValue:DS(n)?o.useFactory=n.useFactory:function PT(t){return void 0!==t.useExisting}(n)&&(o.useExisting=n.useExisting),o}(t,e))),n)}),t.hasOwnProperty(us)||Object.defineProperty(t,us,{get:()=>{if(null===o){const l=Bi();o=l.compileFactory(CS,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Uc(t),target:l.FactoryTarget.Injectable})}return o},configurable:!0})}const OT=Un({provide:String,useValue:Un});function xS(t){return void 0!==t.useClass}function DS(t){return void 0!==t.useFactory}Yl("Injectable",void 0,void 0,void 0,(t,e)=>TT(t,e));function TS(t,e=null,n=null,o){const l=OS(t,e,n,o);return l.resolveInjectorInitializers(),l}function OS(t,e=null,n=null,o,l=new Set){const m=[n||Fr,ZD(t)];return o=o||("object"==typeof t?void 0:Xn(t)),new gS(m,e||Dv(),o||null,l)}class Qo{static create(e,n){if(Array.isArray(e))return TS({name:""},n,e,"");{const o=e.name??"";return TS({name:o},e.parent,e.providers,o)}}}function Pw(t){return t.length>1?" ("+function kT(t){const e=[];for(let n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(o=>Xn(o.token)).join(" -> ")+")":""}function Rw(t,e,n,o){const l=[e],m=n(l),N=o?function cT(t,e){const n=`${t} caused by: ${e instanceof Error?e.message:e}`,o=Error(n);return o[Ow]=e,o}(m,o):Error(m);return N.addKey=LT,N.keys=l,N.injectors=[t],N.constructResolvingMessage=n,N[Ow]=o,N}function LT(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function NS(t,e){const n=[];for(let o=0,l=e.length;oGn(uS)}),Qo.__NG_ELEMENT_ID__=-1;class lf{constructor(e,n){if(this.token=e,this.id=n,!e)throw new dn(208,!1);this.displayName=Xn(this.token)}static get(e){return PS.get(kn(e))}static get numberOfKeys(){return PS.numberOfKeys}}const PS=new class HT{constructor(){this._allKeys=new Map}get(e){if(e instanceof lf)return e;if(this._allKeys.has(e))return this._allKeys.get(e);const n=new lf(e,lf.numberOfKeys);return this._allKeys.set(e,n),n}get numberOfKeys(){return this._allKeys.size}};class Ov{constructor(e,n,o){this.key=e,this.optional=n,this.visibility=o}static fromKey(e){return new Ov(e,!1,null)}}const zT=[];class RS{constructor(e,n,o){this.key=e,this.resolvedFactories=n,this.multiProvider=o,this.resolvedFactory=this.resolvedFactories[0]}}class WT{constructor(e,n){this.factory=e,this.dependencies=n}}function GT(t){let e,n;if(t.useClass){const o=kn(t.useClass);e=Xl().factory(o),n=LS(o)}else t.useExisting?(e=o=>o,n=[Ov.fromKey(lf.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function QT(t,e){if(e){const n=e.map(o=>[o]);return e.map(o=>FS(t,o,n))}return LS(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,n=zT);return new WT(e,n)}function ZT(t){return new RS(lf.get(t.provide),[GT(t)],t.multi||!1)}function YT(t){const o=function JT(t,e){for(let n=0;n{if(n instanceof cg)e.push({provide:n,useClass:n});else if(n&&"object"==typeof n&&void 0!==n.provide)e.push(n);else{if(!Array.isArray(n))throw function UT(t){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`)}(n);kS(n,e)}}),e}function LS(t){const e=Xl().parameters(t);if(!e)return[];if(e.some(n=>null==n))throw NS(t,e);return e.map(n=>FS(t,n,e))}function FS(t,e,n){let o=null,l=!1;if(!Array.isArray(e))return kw(e instanceof e0?e.token:e,l,null);let m=null;for(let N=0;N=this._providers.length)throw function KT(t){return Error(`Index ${t} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function BT(t,e){return Rw(t,e,function(n){return`Cannot instantiate cyclic dependency!${Pw(n)}`})}(this,e.key);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const n=[];for(let o=0;othis._getByReflectiveDependency(N))}catch(N){throw N.addKey&&N.addKey(this,e.key),N}try{m=o(...l)}catch(N){throw function jT(t,e,n,o){return Rw(t,o,function(l){const m=Xn(l[0].token);return`${e.message}: Error during instantiation of ${m}!${Pw(l)}.`},e)}(this,N,N.stack,e.key)}return m}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:Su)}_getByKey(e,n,o){return e===S0.INJECTOR_KEY?this:n instanceof ql?this._getByKeySelf(e,o):this._getByKeyDefault(e,o,n)}_getObjByKeyId(e){for(let n=0;n' "'+n.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function bn(t,e=Mr.Default){const n=tn();if(null===n)return Gn(t,e);return Gl(Hi(),n,kn(t),e)}function XT(){throw new Error("invalid")}function BS(t,e){const n=t.contentQueries;if(null!==n)for(let o=0;oZr&&IS(t,e,Zr,!1),Li(N?2:0,l),n(o,l)}finally{Cu(m),Li(N?3:1,l)}}function Bw(t,e,n){if(Ac(e)){const o=e.directiveStart,l=e.directiveEnd;for(let m=o;m0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(N)!=J&&N.push(J),N.push(n,o,m)}}(t,e,o,Bg(t,n,l.hostVars,pr),l)}function Wu(t,e,n,o,l,m){const N=Fi(t,e);zw(e[ir],N,m,t.value,n,o,l)}function zw(t,e,n,o,l,m,N){if(null==m)t.removeAttribute(e,l,n);else{const J=null==N?Yn(m):N(m,o||"",l);t.setAttribute(e,l,J,n)}}function b9(t,e,n,o,l,m){const N=m[e];if(null!==N){const J=o.setInput;for(let ee=0;ee0&&Ww(n)}}function Ww(t){for(let o=gs(t);null!==o;o=vo(o))for(let l=ho;l0&&Ww(m)}const n=t[In].components;if(null!==n)for(let o=0;o0&&Ww(l)}}function _9(t,e){const n=xo(e,t),o=n[In];(function M9(t,e){for(let n=e.length;n-1&&(of(e,o),ld(n,o))}this._attachedToViewContainer=!1}yv(this._lView[In],this._lView)}onDestroy(e){KS(this._lView[In],this._lView,null,e)}markForCheck(){kv(this._cdRefInjectingView||this._lView)}detach(){this._lView[lr]&=-65}reattach(){this._lView[lr]|=64}detectChanges(){Lv(this._lView[In],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new dn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function _g(t,e){Zc(t,e,e[ir],2,null,null)}(this._lView[In],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new dn(902,!1);this._appRef=e}}class I9 extends jg{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;Lv(e[In],e,e[gi],!1)}checkNoChanges(){}get context(){return null}}class qS extends kg{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=Kr(e);return new Ug(n,this.ngModule)}}function XS(t){const e=[];for(let n in t)if(t.hasOwnProperty(n)){const o=t[n];e.push({propName:o,templateName:n})}return e}class x9{constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,o){o=Oh(o);const l=this.injector.get(e,Tw,o);return l!==Tw||n===Tw?l:this.parentInjector.get(e,n,o)}}class Ug extends mS{get inputs(){return XS(this.componentDef.inputs)}get outputs(){return XS(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function xT(t){return t.map(CT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}create(e,n,o,l){let m=(l=l||this.ngModule)instanceof v0?l:l?.injector;m&&null!==this.componentDef.getStandaloneInjector&&(m=this.componentDef.getStandaloneInjector(m)||m);const N=m?new x9(e,m):e,J=N.get(bS,null);if(null===J)throw new dn(407,!1);const ee=N.get(Dw,null),oe=J.createRenderer(null,this.componentDef),ue=this.componentDef.selectors[0][0]||"div",ge=o?function r9(t,e,n){const o=n===la.ShadowDom;return t.selectRootElement(e,o)}(oe,o,this.componentDef.encapsulation):d0(oe,ue,function C9(t){const e=t.toLowerCase();return"svg"===e?ei:"math"===e?Yr:null}(ue)),Ie=this.componentDef.onPush?288:272,Re=Kw(0,null,null,1,0,null,null,null,null,null),Te=Nv(null,Re,null,Ie,null,null,J,oe,ee,N,null);let ke,Ue;ed(Te);try{const Ge=this.componentDef;let nt,Xe=null;Ge.findHostDirectiveDefs?(nt=[],Xe=new Map,Ge.findHostDirectiveDefs(Ge,nt,Xe),nt.push(Ge)):nt=[Ge];const St=function T9(t,e){const n=t[In],o=Zr;return t[o]=e,_0(n,o,2,"#host",null)}(Te,ge),kt=function O9(t,e,n,o,l,m,N,J){const ee=l[In];!function N9(t,e,n,o){for(const l of t)e.mergedAttrs=Kl(e.mergedAttrs,l.hostAttrs);null!==e.mergedAttrs&&(Fv(e,e.mergedAttrs,!0),null!==n&&wd(o,n,e))}(o,t,e,N);const oe=m.createRenderer(e,n),ue=Nv(l,US(n),null,n.onPush?32:16,l[t.index],t,m,oe,J||null,null,null);return ee.firstCreatePass&&Hw(ee,t,o.length-1),Rv(l,ue),l[t.index]=ue}(St,ge,Ge,nt,Te,J,oe);Ue=Co(Re,Zr),ge&&function R9(t,e,n,o){if(o)Qa(t,n,["ng-version",uT.full]);else{const{attrs:l,classes:m}=function DT(t){const e=[],n=[];let o=1,l=2;for(;o0&&bd(t,n,m.join(" "))}}(oe,Ge,ge,o),void 0!==n&&function k9(t,e,n){const o=t.projection=[];for(let l=0;l=0;o--){const l=t[o];l.hostVars=e+=l.hostVars,l.hostAttrs=Kl(l.hostAttrs,n=Kl(n,l.hostAttrs))}}(o)}function Yw(t){return t===Vo?{}:t===Fr?[]:t}function B9(t,e){const n=t.viewQuery;t.viewQuery=n?(o,l)=>{e(o,l),n(o,l)}:e}function j9(t,e){const n=t.contentQueries;t.contentQueries=n?(o,l,m)=>{e(o,l,m),n(o,l,m)}:e}function U9(t,e){const n=t.hostBindings;t.hostBindings=n?(o,l)=>{e(o,l),n(o,l)}:e}const K9=["providersResolver"],V9=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function H9(t){let n,e=$S(t.type);n=Io(t)?e.\u0275cmp:e.\u0275dir;const o=t;for(const l of K9)o[l]=n[l];if(Io(n))for(const l of V9)o[l]=n[l]}function z9(t){return e=>{e.findHostDirectiveDefs=e6,e.hostDirectives=(Array.isArray(t)?t:t()).map(n=>"function"==typeof n?{directive:kn(n),inputs:Vo,outputs:Vo}:{directive:kn(n.directive),inputs:t6(n.inputs),outputs:t6(n.outputs)})}}function e6(t,e,n){if(null!==t.hostDirectives)for(const o of t.hostDirectives){const l=fo(o.directive);W9(l.declaredInputs,o.inputs),e6(l,e,n),n.set(l,o),e.push(l)}}function t6(t){if(void 0===t||0===t.length)return Vo;const e={};for(let n=0;nN(ci(St[o.index])):o.index;let Xe=null;if(!N&&J&&(Xe=function tO(t,e,n,o){const l=t.cleanup;if(null!=l)for(let m=0;mee?J[ee]:null}"string"==typeof N&&(m+=2)}return null}(t,e,l,o.index)),null!==Xe){(Xe.__ngLastListenerFn__||Xe).__ngNextListenerFn__=m,Xe.__ngLastListenerFn__=m,Ie=!1}else{m=v6(o,e,ue,m,!1);const St=n.listen(Ue,l,m);ge.push(m,St),oe&&oe.push(l,nt,Ge,Ge+1)}}else m=v6(o,e,ue,m,!1);const Re=o.outputs;let Te;if(Ie&&null!==Re&&(Te=Re[l])){const ke=Te.length;if(ke)for(let Ue=0;Ue-1?xo(t.index,e):e);let ee=m6(e,n,o,N),oe=m.__ngNextListenerFn__;for(;oe;)ee=m6(e,n,oe,N)&&ee,oe=oe.__ngNextListenerFn__;return l&&!1===ee&&(N.preventDefault(),N.returnValue=!1),ee}}function _a(t=1){return Ja(t)}function nO(t,e){let n=null;const o=function ST(t){const e=t.attrs;if(null!=e){const n=e.indexOf(5);if(!(1&n))return e[n+1]}return null}(t);for(let l=0;l>17&32767}function $w(t){return 2|t}function Id(t){return(131068&t)>>2}function eA(t,e){return-131069&t|e<<2}function tA(t){return 1|t}function uO(t,e,n,o,l,m){let N=m?e.classBindings:e.styleBindings,J=ff(N),ee=Id(N);t[o]=n;let ue,oe=!1;if(Array.isArray(n)){const ge=n;ue=ge[1],(null===ue||Bc(ge,ue)>0)&&(oe=!0)}else ue=n;if(l)if(0!==ee){const Ie=ff(t[J+1]);t[o+1]=Vv(Ie,J),0!==Ie&&(t[Ie+1]=eA(t[Ie+1],o)),t[J+1]=function sO(t,e){return 131071&t|e<<17}(t[J+1],o)}else t[o+1]=Vv(J,0),0!==J&&(t[J+1]=eA(t[J+1],o)),J=o;else t[o+1]=Vv(ee,0),0===J?J=o:t[ee+1]=eA(t[ee+1],o),ee=o;oe&&(t[o+1]=$w(t[o+1])),C6(t,ue,o,!0,m),C6(t,ue,o,!1,m),function cO(t,e,n,o,l){const m=l?t.residualClasses:t.residualStyles;null!=m&&"string"==typeof e&&Bc(m,e)>=0&&(n[o+1]=tA(n[o+1]))}(e,ue,t,o,m),N=Vv(J,ee),m?e.classBindings=N:e.styleBindings=N}function C6(t,e,n,o,l){const m=t[n+1],N=null===e;let J=o?ff(m):Id(m),ee=!1;for(;0!==J&&(!1===ee||N);){const oe=t[J],ue=t[J+1];lO(oe,e)&&(ee=!0,t[J+1]=o?tA(ue):$w(ue)),J=o?ff(ue):Id(ue)}ee&&(t[n+1]=o?$w(m):tA(m))}function lO(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Bc(t,e)>=0}const co={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function x6(t){return t.substring(co.key,co.keyEnd)}function fO(t){return t.substring(co.value,co.valueEnd)}function D6(t,e){const n=co.textEnd;return n===e?-1:(e=co.keyEnd=function pO(t,e,n){for(;e32;)e++;return e}(t,co.key=e,n),R0(t,e,n))}function T6(t,e){const n=co.textEnd;let o=co.key=R0(t,e,n);return n===o?-1:(o=co.keyEnd=function gO(t,e,n){let o;for(;e=65&&(-33&o)<=90||o>=48&&o<=57);)e++;return e}(t,o,n),o=N6(t,o,n,58),o=co.value=R0(t,o,n),o=co.valueEnd=function yO(t,e,n){let o=-1,l=-1,m=-1,N=e,J=N;for(;N32&&(J=N),m=l,l=o,o=-33&ee}return J}(t,o,n),N6(t,o,n,59))}function O6(t){co.key=0,co.keyEnd=0,co.value=0,co.valueEnd=0,co.textEnd=t.length}function R0(t,e,n){for(;e=0;n=T6(e,n))L6(t,x6(e),fO(e))}function vO(t){tu(_O,Yu,t,!0)}function Yu(t,e){for(let n=function dO(t){return O6(t),D6(t,R0(t,0,co.textEnd))}(e);n>=0;n=D6(e,n))Jr(t,x6(e),!0)}function eu(t,e,n,o){const l=tn(),m=hr(),N=ha(2);if(m.firstUpdatePass&&k6(m,t,N,o),e!==pr&&qo(l,N,e)){F6(m,m.data[so()],l,l[ir],t,l[N+1]=function IO(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=Xn(He(t)))),t}(e,n),o,N)}}function tu(t,e,n,o){const l=hr(),m=ha(2);l.firstUpdatePass&&k6(l,null,m,o);const N=tn();if(n!==pr&&qo(N,m,n)){const J=l.data[so()];if(j6(J,o)&&!R6(l,m)){let ee=o?J.classesWithoutHost:J.stylesWithoutHost;null!==ee&&(n=Ur(ee,n||"")),Qw(l,J,N,n,o)}else!function MO(t,e,n,o,l,m,N,J){l===pr&&(l=Fr);let ee=0,oe=0,ue=0=t.expandoStartIndex}function k6(t,e,n,o){const l=t.data;if(null===l[n+1]){const m=l[so()],N=R6(t,n);j6(m,o)&&null===e&&!N&&(e=!1),e=function bO(t,e,n,o){const l=jl(t);let m=o?e.residualClasses:e.residualStyles;if(null===l)0===(o?e.classBindings:e.styleBindings)&&(n=rA(null,t,e,n,o),n=Wg(n,e.attrs,o),m=null);else{const N=e.directiveStylingLast;if(-1===N||t[N]!==l)if(n=rA(l,t,e,n,o),null===m){let ee=function wO(t,e,n){const o=n?e.classBindings:e.styleBindings;if(0!==Id(o))return t[ff(o)]}(t,e,o);void 0!==ee&&Array.isArray(ee)&&(ee=rA(null,t,e,ee[1],o),ee=Wg(ee,e.attrs,o),function AO(t,e,n,o){const l=n?e.classBindings:e.styleBindings;t[ff(l)]=o}(t,e,o,ee))}else m=function EO(t,e,n){let o;const l=e.directiveEnd;for(let m=1+e.directiveStylingLast;m0;){const ee=t[l],oe=Array.isArray(ee),ue=oe?ee[1]:ee,ge=null===ue;let Ie=n[l+1];Ie===pr&&(Ie=ge?Fr:void 0);let Re=ge?$h(Ie,o):ue===o?Ie:void 0;if(oe&&!zv(Re)&&(Re=$h(ee,o)),zv(Re)&&(J=Re,N))return J;const Te=t[l+1];l=N?ff(Te):Id(Te)}if(null!==e){let ee=m?e.residualClasses:e.residualStyles;null!=ee&&(J=$h(ee,o))}return J}function zv(t){return void 0!==t}function j6(t,e){return 0!=(t.flags&(e?8:16))}function Si(t,e=""){const n=tn(),o=hr(),l=t+Zr,m=o.firstCreatePass?_0(o,l,1,e,null):o.data[l],N=n[l]=yd(n[ir],e);y0(o,n,N,m),Ei(m,!1)}function Wv(t){return k0("",t,""),Wv}function k0(t,e,n){const o=tn(),l=I0(o,t,e,n);return l!==pr&&qc(o,so(),l),k0}function U6(t,e,n,o,l){const m=tn(),N=C0(m,t,e,n,o,l);return N!==pr&&qc(m,so(),N),U6}function K6(t,e,n,o,l,m,N){const J=tn(),ee=x0(J,t,e,n,o,l,m,N);return ee!==pr&&qc(J,so(),ee),K6}function V6(t,e,n,o,l,m,N,J,ee){const oe=tn(),ue=D0(oe,t,e,n,o,l,m,N,J,ee);return ue!==pr&&qc(oe,so(),ue),V6}function H6(t,e,n,o,l,m,N,J,ee,oe,ue){const ge=tn(),Ie=T0(ge,t,e,n,o,l,m,N,J,ee,oe,ue);return Ie!==pr&&qc(ge,so(),Ie),H6}function z6(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie){const Re=tn(),Te=O0(Re,t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie);return Te!==pr&&qc(Re,so(),Te),z6}function W6(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te){const ke=tn(),Ue=N0(ke,t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te);return Ue!==pr&&qc(ke,so(),Ue),W6}function G6(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue){const Ge=tn(),nt=P0(Ge,t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue);return nt!==pr&&qc(Ge,so(),nt),G6}function Z6(t){const e=tn(),n=M0(e,t);return n!==pr&&qc(e,so(),n),Z6}function CO(t,e,n){tu(Jr,Yu,I0(tn(),t,e,n),!0)}function xO(t,e,n,o,l){tu(Jr,Yu,C0(tn(),t,e,n,o,l),!0)}function DO(t,e,n,o,l,m,N){tu(Jr,Yu,x0(tn(),t,e,n,o,l,m,N),!0)}function TO(t,e,n,o,l,m,N,J,ee){tu(Jr,Yu,D0(tn(),t,e,n,o,l,m,N,J,ee),!0)}function OO(t,e,n,o,l,m,N,J,ee,oe,ue){tu(Jr,Yu,T0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue),!0)}function NO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie){tu(Jr,Yu,O0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie),!0)}function PO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te){tu(Jr,Yu,N0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te),!0)}function RO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue){tu(Jr,Yu,P0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue),!0)}function kO(t){tu(Jr,Yu,M0(tn(),t),!0)}function LO(t,e,n){Zu(I0(tn(),t,e,n))}function FO(t,e,n,o,l){Zu(C0(tn(),t,e,n,o,l))}function BO(t,e,n,o,l,m,N){Zu(x0(tn(),t,e,n,o,l,m,N))}function jO(t,e,n,o,l,m,N,J,ee){Zu(D0(tn(),t,e,n,o,l,m,N,J,ee))}function UO(t,e,n,o,l,m,N,J,ee,oe,ue){Zu(T0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue))}function KO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie){Zu(O0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie))}function VO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te){Zu(N0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te))}function HO(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue){Zu(P0(tn(),t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue))}function zO(t){Zu(M0(tn(),t))}function Y6(t,e,n,o,l){return eu(t,I0(tn(),e,n,o),l,!1),Y6}function J6(t,e,n,o,l,m,N){return eu(t,C0(tn(),e,n,o,l,m),N,!1),J6}function Q6(t,e,n,o,l,m,N,J,ee){return eu(t,x0(tn(),e,n,o,l,m,N,J),ee,!1),Q6}function q6(t,e,n,o,l,m,N,J,ee,oe,ue){return eu(t,D0(tn(),e,n,o,l,m,N,J,ee,oe),ue,!1),q6}function X6(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie){return eu(t,T0(tn(),e,n,o,l,m,N,J,ee,oe,ue,ge),Ie,!1),X6}function $6(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te){return eu(t,O0(tn(),e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re),Te,!1),$6}function e_(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue){return eu(t,N0(tn(),e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke),Ue,!1),e_}function t_(t,e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue,Ge,nt){return eu(t,P0(tn(),e,n,o,l,m,N,J,ee,oe,ue,ge,Ie,Re,Te,ke,Ue,Ge),nt,!1),t_}function n_(t,e,n){return eu(t,M0(tn(),e),n,!1),n_}function r_(t,e,n){const o=tn();if(qo(o,Ya(),e)){ta(hr(),Br(),o,t,e,o[ir],n,!0)}return r_}function i_(t,e,n){const o=tn();if(qo(o,Ya(),e)){const m=hr(),N=Br();ta(m,N,o,t,e,JS(jl(m.data),N,o),n,!0)}return i_}const Cd=void 0;var GO=["en",[["a","p"],["AM","PM"],Cd],[["AM","PM"],Cd,Cd],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Cd,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Cd,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Cd,"{1} 'at' {0}",Cd],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function WO(t){const n=Math.floor(Math.abs(t)),o=t.toString().replace(/^[^.]*\.?/,"").length;return 1===n&&0===o?1:5}];let L0={};function ys(t){const e=function ZO(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=s_(e);if(n)return n;const o=e.split("-")[0];if(n=s_(o),n)return n;if("en"===o)return GO;throw new dn(701,!1)}function o_(t){return ys(t)[ai.PluralCase]}function s_(t){return t in L0||(L0[t]=oi.ng&&oi.ng.common&&oi.ng.common.locales&&oi.ng.common.locales[t]),L0[t]}var ai;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(ai||(ai={}));const YO=["zero","one","two","few","many"];const F0="en-US",Gv={marker:"element"},Zv={marker:"ICU"};var ms;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(ms||(ms={}));let a_=F0;function u_(t){Nr(t,"Expected localeId to be defined"),"string"==typeof t&&(a_=t.toLowerCase().replace(/_/g,"-"))}function c_(t,e,n){const o=e.insertBeforeIndex,l=Array.isArray(o)?o[0]:o;return null===l?xg(t,0,n):ci(n[l])}function l_(t,e,n,o,l){const m=e.insertBeforeIndex;if(Array.isArray(m)){let N=o,J=null;if(3&e.type||(J=N,N=l),null!==N&&-1===e.componentOffset)for(let ee=1;ee1)for(let n=t.length-2;n>=0;n--){const o=t[n];d_(o)||XO(o,e)&&null===$O(o)&&e7(o,e.index)}}function d_(t){return!(64&t.type)}function XO(t,e){return d_(e)||t.index>e.index}function $O(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function e7(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(g0(c_,l_),t.insertBeforeIndex=e)}function Gg(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function r7(t,e,n){const o=Lw(t,n,64,null,null);return f_(e,o),o}function Yv(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}function h_(t){return t>>>17}function p_(t){return(131070&t)>>>1}let Zg=0,Yg=0;function y_(t,e,n,o){const l=n[ir];let N,m=null;for(let J=0;J>>1,Re=e[++J],Te=e[++J];zw(l,ro(Ie,n),null,null,Re,Te,null)}else switch(ee){case Zv:const oe=e[++J],ue=e[++J];if(null===n[ue]){Yi(n[ue]=Vu(l,oe),n)}break;case Gv:const ge=e[++J],Ie=e[++J];if(null===n[Ie]){Yi(n[Ie]=d0(l,ge,null),n)}}}}function m_(t,e,n,o,l){for(let m=0;m>>2;switch(3&ue){case 1:const Ie=n[++oe],Re=n[++oe],Te=t.data[ge];"string"==typeof Te?zw(e[ir],e[ge],null,Te,Ie,ee,Re):ta(t,Te,e,Ie,ee,e[ir],Re,!1);break;case 0:const ke=e[ge];null!==ke&&hv(e[ir],ke,ee);break;case 2:u7(t,Gg(t,ge),e,ee);break;case 3:v_(t,Gg(t,ge),o,e)}}}}else{const ee=n[m+1];if(ee>0&&3==(3&ee)){const ue=Gg(t,ee>>>2);e[ue.currentCaseLViewIndex]<0&&v_(t,ue,o,e)}}m+=J}}function v_(t,e,n,o){let l=o[e.currentCaseLViewIndex];if(null!==l){let m=Zg;l<0&&(l=o[e.currentCaseLViewIndex]=~l,m=-1),m_(t,o,e.update[l],n,m)}}function u7(t,e,n,o){const l=function c7(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const o=function JO(t,e){const n=o_(e)(parseInt(t,10)),o=YO[n];return void 0!==o?o:"other"}(e,function qO(){return a_}());n=t.cases.indexOf(o),-1===n&&"other"!==o&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,o);if(Yv(e,n)!==l&&(b_(t,e,n),n[e.currentCaseLViewIndex]=null===l?null:~l,null!==l)){const N=n[e.anchorIdx];N&&y_(t,e.create[l],n,N)}}function b_(t,e,n){let o=Yv(e,n);if(null!==o){const l=e.remove[o];for(let m=0;m0){const J=ro(N,n);null!==J&&sf(n[ir],J)}else b_(t,Gg(t,~N),n)}}}function l7(){const t=[];let n,o,e=-1;function m(J,ee){e=0;const oe=Yv(J,ee);o=null!==oe?J.remove[oe]:Fr}function N(){if(e0)return n[J];{t.push(e,o);const ee=~J;return m(n[In].data[ee],n),N()}}return 0===t.length?null:(o=t.pop(),e=t.pop(),N())}return function l(J,ee){for(n=ee;t.length;)t.pop();return m(J.value,ee),N}}const Jv=/\ufffd(\d+):?\d*\ufffd/gi,f7=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,d7=/\ufffd(\d+)\ufffd/,A_=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Jg="\ufffd",h7=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,p7=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,g7=/\uE500/g;function m7(t,e,n,o,l,m){const N=Ic(),J=[],ee=[],oe=[[]];l=function E7(t,e){if(function A7(t){return-1===t}(e))return __(t);{const n=t.indexOf(`:${e}${Jg}`)+2+e.toString().length,o=t.search(new RegExp(`${Jg}\\/\\*\\d+:${e}${Jg}`));return __(t.substring(n,o))}}(l,m);const ue=function y7(t){return t.replace(g7," ")}(l).split(p7);for(let ge=0;gen.length&&n.push(ee)}return{type:o,mainBinding:l,cases:e,values:n}}function iA(t){if(!t)return[];let e=0;const n=[],o=[],l=/[{}]/g;let m;for(l.lastIndex=0;m=l.exec(t);){const J=m.index;if("}"==m[0]){if(n.pop(),0==n.length){const ee=t.substring(e,J);A_.test(ee)?o.push(S7(ee)):o.push(ee),e=J+1}}else{if(0==n.length){const ee=t.substring(e,J);o.push(ee),e=J+1}n.push("{")}}const N=t.substring(e);return o.push(N),o}function _7(t,e,n,o,l,m,N,J){const ee=[],oe=[],ue=[];e.cases.push(m),e.create.push(ee),e.remove.push(oe),e.update.push(ue);const Ie=On(Mv()).getInertBodyElement(N),Re=Aw(Ie)||Ie;return Re?I_(t,e,n,o,ee,oe,ue,Re,l,J,0):0}function I_(t,e,n,o,l,m,N,J,ee,oe,ue){let ge=0,Ie=J.firstChild;for(;Ie;){const Re=Bg(t,n,1,null);switch(Ie.nodeType){case Node.ELEMENT_NODE:const Te=Ie,ke=Te.tagName.toLowerCase();if(Pg.hasOwnProperty(ke)){oA(l,Gv,ke,ee,Re),t.data[Re]=ke;const Xe=Te.attributes;for(let St=0;St>>ms.SHIFT;let ge=t[ue];null===ge&&(ge=t[ue]=ee?l.createComment(J):yd(l,J)),oe&&null!==n&&Rs(l,n,ge,o,!1)}})(l,ee.create,ue,ge),Uh(!0)}function T_(){Uh(!1)}function F7(t,e,n){D_(t,e,n),T_()}function B7(t,e){const n=hr(),o=go(n.consts,e);!function b7(t,e,n){const l=Hi().index,m=[];if(t.firstCreatePass&&null===t.data[e]){for(let N=0;N0){const o=t.data[n];m_(t,e,Array.isArray(o)?o:o.update,Ys()-Yg-1,Zg)}Zg=0,Yg=0}(hr(),tn(),t+Zr)}function U7(t,e={}){return function L7(t,e={}){let n=t;if(D7.test(t)){const o={},l=[x_];n=n.replace(T7,(m,N,J)=>{const ee=N||J,oe=o[ee]||[];if(oe.length||(ee.split("|").forEach(ke=>{const Ue=ke.match(k7),Ge=Ue?parseInt(Ue[1],10):x_,nt=R7.test(ke);oe.push([Ge,nt,ke])}),o[ee]=oe),!oe.length)throw new Error(`i18n postprocess: unmatched placeholder - ${ee}`);const ue=l[l.length-1];let ge=0;for(let ke=0;kee.hasOwnProperty(m)?`${l}${e[m]}${ee}`:o),n=n.replace(N7,(o,l)=>e.hasOwnProperty(l)?e[l]:o),n=n.replace(P7,(o,l)=>{if(e.hasOwnProperty(l)){const m=e[l];if(!m.length)throw new Error(`i18n postprocess: unmatched ICU - ${o} with key: ${l}`);return m.shift()}return o})),n}(t,e)}function sA(t,e,n,o,l){if(t=kn(t),Array.isArray(t))for(let m=0;m>20;if(_d(t)||!t.multi){const Re=new Du(ee,l,bn),Te=uA(J,e,l?ue:ue+Ie,ge);-1===Te?(od(Ou(oe,N),m,J),aA(m,t,e.length),e.push(J),oe.directiveStart++,oe.directiveEnd++,l&&(oe.providerIndexes+=1048576),n.push(Re),N.push(Re)):(n[Te]=Re,N[Te]=Re)}else{const Re=uA(J,e,ue+Ie,ge),Te=uA(J,e,ue,ue+Ie),ke=Re>=0&&n[Re],Ue=Te>=0&&n[Te];if(l&&!Ue||!l&&!ke){od(Ou(oe,N),m,J);const Ge=function z7(t,e,n,o,l){const m=new Du(t,n,bn);return m.multi=[],m.index=e,m.componentProviders=0,N_(m,l,o&&!n),m}(l?H7:V7,n.length,l,o,ee);!l&&Ue&&(n[Te].providerFactory=Ge),aA(m,t,e.length,0),e.push(J),oe.directiveStart++,oe.directiveEnd++,l&&(oe.providerIndexes+=1048576),n.push(Ge),N.push(Ge)}else{aA(m,t,Re>-1?Re:Te,N_(n[l?Te:Re],ee,!l&&o))}!l&&o&&Ue&&n[Te].componentProviders++}}}function aA(t,e,n,o){const l=_d(e),m=function JD(t){return!!t.useClass}(e);if(l||m){const ee=(m?kn(e.useClass):e).prototype.ngOnDestroy;if(ee){const oe=t.destroyHooks||(t.destroyHooks=[]);if(!l&&e.multi){const ue=oe.indexOf(n);-1===ue?oe.push(n,[o,ee]):oe[ue+1].push(o,ee)}else oe.push(n,ee)}}}function N_(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function uA(t,e,n,o){for(let l=n;l{n.providersResolver=(o,l)=>function K7(t,e,n){const o=hr();if(o.firstCreatePass){const l=Io(t);sA(n,o.data,o.blueprint,l,!0),sA(e,o.data,o.blueprint,l,!1)}}(o,l?l(t):t,e)}}class B0{}class W7{}class P_ extends B0{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new qS(this);const o=pi(e);this._bootstrapComponents=Qc(o.bootstrap),this._r3Injector=OS(e,n,[{provide:B0,useValue:this},{provide:kg,useValue:this.componentFactoryResolver}],Xn(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class lA extends W7{constructor(e){super(),this.moduleType=e}create(e){return new P_(this.moduleType,e)}}class Z7 extends B0{constructor(e,n,o){super(),this.componentFactoryResolver=new qS(this),this.instance=null;const l=new gS([...e,{provide:B0,useValue:this},{provide:kg,useValue:this.componentFactoryResolver}],n||Dv(),o,new Set(["environment"]));this.injector=l,l.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function R_(t,e,n=null){return new Z7(t,e,n).injector}class Qv{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const n=fS(0,e.type),o=n.length>0?R_([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,o)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}function Y7(t){t.getStandaloneInjector=e=>e.get(Qv).getOrCreateStandaloneInjector(t)}function rN(t,e,n){const o=oo()+t,l=tn();return l[o]===pr?Gu(l,o,n?e.call(n):e()):Kg(l,o)}function K_(t,e,n,o){return V_(tn(),oo(),t,e,n,o)}function iN(t,e,n,o,l){return H_(tn(),oo(),t,e,n,o,l)}function oN(t,e,n,o,l,m){return z_(tn(),oo(),t,e,n,o,l,m)}function sN(t,e,n,o,l,m,N){return W_(tn(),oo(),t,e,n,o,l,m,N)}function aN(t,e,n,o,l,m,N,J){const ee=oo()+t,oe=tn(),ue=Ea(oe,ee,n,o,l,m);return qo(oe,ee+4,N)||ue?Gu(oe,ee+5,J?e.call(J,n,o,l,m,N):e(n,o,l,m,N)):Kg(oe,ee+5)}function uN(t,e,n,o,l,m,N,J,ee){const oe=oo()+t,ue=tn(),ge=Ea(ue,oe,n,o,l,m);return Md(ue,oe+4,N,J)||ge?Gu(ue,oe+6,ee?e.call(ee,n,o,l,m,N,J):e(n,o,l,m,N,J)):Kg(ue,oe+6)}function cN(t,e,n,o,l,m,N,J,ee,oe){const ue=oo()+t,ge=tn();let Ie=Ea(ge,ue,n,o,l,m);return Uv(ge,ue+4,N,J,ee)||Ie?Gu(ge,ue+7,oe?e.call(oe,n,o,l,m,N,J,ee):e(n,o,l,m,N,J,ee)):Kg(ge,ue+7)}function lN(t,e,n,o,l,m,N,J,ee,oe,ue){const ge=oo()+t,Ie=tn(),Re=Ea(Ie,ge,n,o,l,m);return Ea(Ie,ge+4,N,J,ee,oe)||Re?Gu(Ie,ge+8,ue?e.call(ue,n,o,l,m,N,J,ee,oe):e(n,o,l,m,N,J,ee,oe)):Kg(Ie,ge+8)}function fN(t,e,n,o){return G_(tn(),oo(),t,e,n,o)}function qg(t,e){const n=t[e];return n===pr?void 0:n}function V_(t,e,n,o,l,m){const N=e+n;return qo(t,N,l)?Gu(t,N+1,m?o.call(m,l):o(l)):qg(t,N+1)}function H_(t,e,n,o,l,m,N){const J=e+n;return Md(t,J,l,m)?Gu(t,J+2,N?o.call(N,l,m):o(l,m)):qg(t,J+2)}function z_(t,e,n,o,l,m,N,J){const ee=e+n;return Uv(t,ee,l,m,N)?Gu(t,ee+3,J?o.call(J,l,m,N):o(l,m,N)):qg(t,ee+3)}function W_(t,e,n,o,l,m,N,J,ee){const oe=e+n;return Ea(t,oe,l,m,N,J)?Gu(t,oe+4,ee?o.call(ee,l,m,N,J):o(l,m,N,J)):qg(t,oe+4)}function G_(t,e,n,o,l,m){let N=e+n,J=!1;for(let ee=0;ee=0;n--){const o=e[n];if(t===o.name)return o}}(e,n.pipeRegistry),n.data[l]=o,o.onDestroy&&(n.destroyHooks??(n.destroyHooks=[])).push(l,o.onDestroy)):o=n.data[l];const m=o.factory||(o.factory=Gs(o.type)),N=Cs(bn);try{const J=zl(!1),ee=m();return zl(J),function q9(t,e,n,o){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=o}(n,tn(),l,ee),ee}finally{Cs(N)}}function pN(t,e,n){const o=t+Zr,l=tn(),m=Za(l,o);return Xg(l,o)?V_(l,oo(),e,m.transform,n,m):m.transform(n)}function gN(t,e,n,o){const l=t+Zr,m=tn(),N=Za(m,l);return Xg(m,l)?H_(m,oo(),e,N.transform,n,o,N):N.transform(n,o)}function yN(t,e,n,o,l){const m=t+Zr,N=tn(),J=Za(N,m);return Xg(N,m)?z_(N,oo(),e,J.transform,n,o,l,J):J.transform(n,o,l)}function mN(t,e,n,o,l,m){const N=t+Zr,J=tn(),ee=Za(J,N);return Xg(J,N)?W_(J,oo(),e,ee.transform,n,o,l,m,ee):ee.transform(n,o,l,m)}function vN(t,e,n){const o=t+Zr,l=tn(),m=Za(l,o);return Xg(l,o)?G_(l,oo(),e,m.transform,n,m):m.transform.apply(m,n)}function Xg(t,e){return t[In].data[e].pure}Qv.\u0275prov=Tn({token:Qv,providedIn:"environment",factory:()=>new Qv(Gn(v0))});function dA(t){return e=>{setTimeout(t,void 0,e)}}const wo=class bN extends Fe{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,o){let l=e,m=n||(()=>null),N=o;if(e&&"object"==typeof e){const ee=e;l=ee.next?.bind(ee),m=ee.error?.bind(ee),N=ee.complete?.bind(ee)}this.__isAsync&&(m=dA(m),l&&(l=dA(l)),N&&(N=dA(N)));const J=super.subscribe({next:l,error:m,complete:N});return e instanceof Z&&e.add(J),J}};function wN(){return this._results[Symbol.iterator]()}class hA{get changes(){return this._changes||(this._changes=new wo)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=hA.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=wN)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){const o=this;o.dirty=!1;const l=Go(e);(this._changesDetected=!function lg(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o0;)this.remove(this.length-1)}get(e){const n=Y_(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-ho}createEmbeddedView(e,n,o){let l,m;"number"==typeof o?l=o:null!=o&&(l=o.index,m=o.injector);const N=e.createEmbeddedView(n||{},m);return this.insert(N,l),N}createComponent(e,n,o,l,m){const N=e&&!ma(e);let J;if(N)J=n;else{const ge=n||{};J=ge.index,o=ge.injector,l=ge.projectableNodes,m=ge.environmentInjector||ge.ngModuleRef}const ee=N?e:new Ug(Kr(e)),oe=o||this.parentInjector;if(!m&&null==ee.ngModule){const Ie=(N?oe:this.parentInjector).get(v0,null);Ie&&(m=Ie)}const ue=ee.create(oe,l,void 0,m);return this.insert(ue.hostView,J),ue}insert(e,n){const o=e._lView,l=o[In];if(function Hm(t){return Wo(t[Ai])}(o)){const ue=this.indexOf(e);if(-1!==ue)this.detach(ue);else{const ge=o[Ai],Ie=new Z_(ge,ge[Vi],ge[Ai]);Ie.detach(Ie.indexOf(e))}}const m=this._adjustIndex(n),N=this._lContainer;pv(l,o,N,m);const J=Xa(m,N),ee=o[ir],oe=p0(ee,N[_u]);return null!==oe&&function Wc(t,e,n,o,l,m){o[fa]=l,o[Vi]=e,Zc(t,o,n,1,l,m)}(l,N[Vi],ee,o,oe,J),e.attachToViewContainerRef(),fg(pA(N),m,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=Y_(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),o=of(this._lContainer,n);o&&(ld(pA(this._lContainer),n),yv(o[In],o))}detach(e){const n=this._adjustIndex(e,-1),o=of(this._lContainer,n);return o&&null!=ld(pA(this._lContainer),n)?new jg(o):null}_adjustIndex(e,n=0){return e??this.length+n}};function Y_(t){return t[Rh]}function pA(t){return t[Rh]||(t[Rh]=[])}function J_(t,e){let n;const o=e[t.index];if(Wo(o))n=o;else{let l;if(8&t.type)l=ci(o);else{const m=e[ir];l=m.createComment("");const N=Fi(t,e);Rs(m,p0(m,N),l,function mw(t,e){return t.nextSibling(e)}(m,N),!1)}e[t.index]=n=GS(o,e,l,t),Rv(e,n)}return new Z_(n,t,e)}class gA{constructor(e){this.queryList=e,this.matches=null}clone(){return new gA(this.queryList)}setDirty(){this.queryList.setDirty()}}class yA{constructor(e=[]){this.queries=e}createEmbeddedView(e){const n=e.queries;if(null!==n){const o=null!==e.contentQueries?e.contentQueries[0]:n.length,l=[];for(let m=0;m0)o.push(N[J/2]);else{const oe=m[J+1],ue=e[-ee];for(let ge=ho;ge(null===l&&(l=Bi().compileNgModule(vs,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:Go(e.bootstrap||Fr).map(kn),declarations:o.map(kn),imports:Go(e.imports||Fr).map(kn).map(uM),exports:Go(e.exports||Fr).map(kn).map(uM),schemas:e.schemas?Go(e.schemas):null,id:e.id||null}),l.schemas||(l.schemas=[])),l)});let m=null;Object.defineProperty(t,us,{get:()=>{if(null===m){const J=Bi();m=J.compileFactory(vs,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:Uc(t),target:J.FactoryTarget.NgModule,typeArgumentCount:0})}return m},configurable:!1});let N=null;Object.defineProperty(t,Th,{get:()=>{if(null===N){const J={name:t.name,type:t,providers:e.providers||Fr,imports:[(e.imports||Fr).map(kn),(e.exports||Fr).map(kn)]};N=Bi().compileInjector(vs,`ng:///${t.name}/\u0275inj.js`,J)}return N},configurable:!1})})(t,e),void 0!==e.id&&yg(t,e.id),function UN(t,e){$g.push({moduleType:t,ngModule:e})}(t,e)}function WN(t,e){const n=Go(e.declarations||Fr),o=U0(t);n.forEach(l=>{if((l=kn(l)).hasOwnProperty(Nh)){aM(Kr(l),o)}else!l.hasOwnProperty(zp)&&!l.hasOwnProperty(Ph)&&(l.ngSelectorScope=t)})}function aM(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(n=>n.hasOwnProperty(Nh)?Kr(n):fo(n)).filter(n=>!!n),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(n=>zo(n)),t.schemas=e.schemas,t.tView=null}function U0(t){if(nM(t))return function GN(t){const e=pi(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const n={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return Qc(e.imports).forEach(o=>{const l=U0(o);l.exported.directives.forEach(m=>n.compilation.directives.add(m)),l.exported.pipes.forEach(m=>n.compilation.pipes.add(m))}),Qc(e.declarations).forEach(o=>{zo(o)?n.compilation.pipes.add(o):n.compilation.directives.add(o)}),Qc(e.exports).forEach(o=>{const l=o;if(nM(l)){const m=U0(l);m.exported.directives.forEach(N=>{n.compilation.directives.add(N),n.exported.directives.add(N)}),m.exported.pipes.forEach(N=>{n.compilation.pipes.add(N),n.exported.pipes.add(N)})}else zo(l)?n.exported.pipes.add(l):n.exported.directives.add(l)}),e.transitiveCompileScopes=n,n}(t);if(Vf(t)){if(null!==(Kr(t)||fo(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==zo(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function uM(t){return tM(t)?t.ngModule:t}let SA=0;function ZN(t,e){let n=null;(function uv(t,e){uo(e)&&(ku.set(t,e),$l.add(t))})(t,e),fM(t,e),Object.defineProperty(t,Nh,{get:()=>{if(null===n){const o=Bi();if(uo(e)){const oe=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&oe.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&oe.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),oe.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(oe.join("\n"))}const l=function jN(){return j0}();let m=e.preserveWhitespaces;void 0===m&&(m=null!==l&&void 0!==l.preserveWhitespaces&&l.preserveWhitespaces);let N=e.encapsulation;void 0===N&&(N=null!==l&&void 0!==l.defaultEncapsulation?l.defaultEncapsulation:la.Emulated);const J=e.templateUrl||`ng:///${t.name}/template.html`,ee={...dM(t,e),typeSourceSpan:o.createParseSourceSpan("Component",t.name,J),template:e.template||"",preserveWhitespaces:m,styles:e.styles||Fr,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:N,interpolation:e.interpolation,viewProviders:e.viewProviders||null};SA++;try{if(ee.usesInheritance&&hM(t),n=o.compileComponent(vs,J,ee),e.standalone){const oe=Go(e.imports||Fr),{directiveDefs:ue,pipeDefs:ge}=function JN(t,e){let n=null,o=null;return{directiveDefs:()=>{if(null===n){n=[Kr(t)];const N=new Set;for(const J of e){const ee=kn(J);if(!N.has(ee))if(N.add(ee),pi(ee)){const oe=U0(ee);for(const ue of oe.exported.directives){const ge=Kr(ue)||fo(ue);ge&&!N.has(ue)&&(N.add(ue),n.push(ge))}}else{const oe=Kr(ee)||fo(ee);oe&&n.push(oe)}}}return n},pipeDefs:()=>{if(null===o){o=[];const N=new Set;for(const J of e){const ee=kn(J);if(!N.has(ee))if(N.add(ee),pi(ee)){const oe=U0(ee);for(const ue of oe.exported.pipes){const ge=zo(ue);ge&&!N.has(ue)&&(N.add(ue),o.push(ge))}}else{const oe=zo(ee);oe&&o.push(oe)}}}return o}}}(t,oe);n.directiveDefs=ue,n.pipeDefs=ge,n.dependencies=()=>oe.map(kn)}}finally{SA--}if(0===SA&&function KN(){if(!wA){wA=!0;try{for(let t=$g.length-1;t>=0;t--){const{moduleType:e,ngModule:n}=$g[t];n.declarations&&n.declarations.every(rM)&&($g.splice(t,1),WN(e,n))}}finally{wA=!1}}}(),function QN(t){return void 0!==t.ngSelectorScope}(t)){const oe=U0(t.ngSelectorScope);aM(n,oe)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${Er(t)} but is only valid on a component that is standalone.`);n.schemas=e.schemas}else e.standalone&&(n.schemas=[])}return n},configurable:!1})}function cM(t,e){let n=null;fM(t,e||{}),Object.defineProperty(t,zp,{get:()=>{if(null===n){const o=lM(t,e||{});n=Bi().compileDirective(vs,o.sourceMapUrl,o.metadata)}return n},configurable:!1})}function lM(t,e){const n=t&&t.name,o=`ng:///${n}/\u0275dir.js`,l=Bi(),m=dM(t,e);return m.typeSourceSpan=l.createParseSourceSpan("Directive",n,o),m.usesInheritance&&hM(t),{metadata:m,sourceMapUrl:o}}function fM(t,e){let n=null;Object.defineProperty(t,us,{get:()=>{if(null===n){const o=lM(t,e),l=Bi();n=l.compileFactory(vs,`ng:///${t.name}/\u0275fac.js`,{name:o.metadata.name,type:o.metadata.type,typeArgumentCount:0,deps:Uc(t),target:l.FactoryTarget.Directive})}return n},configurable:!1})}function qN(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function dM(t,e){const n=Xl(),o=n.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||Vo,propMetadata:o,inputs:e.inputs||Fr,outputs:e.outputs||Fr,queries:pM(t,o,gM),lifecycle:{usesOnChanges:n.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!qN(t),exportAs:eP(e.exportAs),providers:e.providers||null,viewQueries:pM(t,o,yM),isStandalone:!!e.standalone,hostDirectives:e.hostDirectives?.map(l=>"function"==typeof l?{directive:l}:l)||null}}function hM(t){const e=Object.prototype;let n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==e;)!fo(n)&&!Kr(n)&&nP(n)&&cM(n,null),n=Object.getPrototypeOf(n)}function XN(t){return"string"==typeof t?vM(t):kn(t)}function $N(t,e){return{propertyName:t,predicate:XN(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly}}function pM(t,e,n){const o=[];for(const l in e)if(e.hasOwnProperty(l)){const m=e[l];m.forEach(N=>{if(n(N)){if(!N.selector)throw new Error(`Can't construct a query for the property "${l}" of "${Er(t)}" since the query selector wasn't defined.`);if(m.some(mM))throw new Error("Cannot combine @Input decorators with query decorators");o.push($N(l,N))}})}return o}function eP(t){return void 0===t?null:vM(t)}function gM(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function yM(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function mM(t){return"Input"===t.ngMetadataName}function vM(t){return t.split(",").map(e=>e.trim())}const tP=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function nP(t){const e=Xl();if(tP.some(o=>e.hasLifecycleHook(t,o)))return!0;const n=e.propMetadata(t);for(const o in n){const l=n[o];for(let m=0;mt,void 0,void 0,(t,e)=>cM(t,e));Yl("Component",(t={})=>({changeDetection:yc.Default,...t}),iP,void 0,(t,e)=>ZN(t,e)),Yl("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function rP(t,e){let n=null,o=null;Object.defineProperty(t,us,{get:()=>{if(null===o){const l=bM(t,e),m=Bi(l.type);o=m.compileFactory(vs,`ng:///${l.name}/\u0275fac.js`,{name:l.name,type:l.type,typeArgumentCount:0,deps:Uc(t),target:m.FactoryTarget.Pipe})}return o},configurable:!1}),Object.defineProperty(t,Ph,{get:()=>{if(null===n){const l=bM(t,e);n=Bi(l.type).compilePipe(vs,`ng:///${l.name}/\u0275pipe.js`,l)}return n},configurable:!1})}(t,e)),ya("Input",t=>({bindingPropertyName:t})),ya("Output",t=>({bindingPropertyName:t})),ya("HostBinding",t=>({hostPropertyName:t})),ya("HostListener",(t,e)=>({eventName:t,args:e})),Yl("NgModule",t=>t,void 0,void 0,(t,e)=>VN(t,e));function $v(...t){}const wM=new $n("Application Initializer");class $c{constructor(e){this.appInits=e,this.resolve=$v,this.reject=$v,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,o)=>{this.resolve=n,this.reject=o})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let o=0;o{l.subscribe({complete:N,error:J})});e.push(m)}}Promise.all(e).then(()=>{n()}).catch(o=>{this.reject(o)}),0===e.length&&n(),this.initialized=!0}}$c.\u0275fac=function(e){return new(e||$c)(Gn(wM,8))},$c.\u0275prov=Tn({token:$c,factory:$c.\u0275fac,providedIn:"root"});const K0=new $n("AppId",{providedIn:"root",factory:AM});function AM(){return`${_A()}${_A()}${_A()}`}function _A(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const EM=new $n("Platform Initializer"),MA=new $n("Platform ID",{providedIn:"platform",factory:()=>"unknown"});new $n("Application Packages Root URL"),new $n("AnimationModuleType");class xd{log(e){console.log(e)}warn(e){console.warn(e)}}xd.\u0275fac=function(e){return new(e||xd)},xd.\u0275prov=Tn({token:xd,factory:xd.\u0275fac,providedIn:"platform"});const el=new $n("LocaleId",{providedIn:"root",factory:()=>ki(el,Mr.Optional|Mr.SkipSelf)||function oP(){return typeof $localize<"u"&&$localize.locale||F0}()}),sP=new $n("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new $n("Translations"),new $n("TranslationsFormat");var SM;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(SM||(SM={}));class aP{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}class ey{compileModuleSync(e){return new lA(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),l=Qc(pi(e).declarations).reduce((m,N)=>{const J=Kr(N);return J&&m.push(new Ug(J)),m},[]);return new aP(n,l)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}ey.\u0275fac=function(e){return new(e||ey)},ey.\u0275prov=Tn({token:ey,factory:ey.\u0275fac,providedIn:"root"});new $n("compilerOptions");const lP=Promise.resolve(0);function IA(t){typeof Zone>"u"?lP.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Xo{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:o=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new wo(!1),this.onMicrotaskEmpty=new wo(!1),this.onStable=new wo(!1),this.onError=new wo(!1),typeof Zone>"u")throw new dn(908,!1);Zone.assertZonePatched();const l=this;l._nesting=0,l._outer=l._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(l._inner=l._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(l._inner=l._inner.fork(Zone.longStackTraceZoneSpec)),l.shouldCoalesceEventChangeDetection=!o&&n,l.shouldCoalesceRunChangeDetection=o,l.lastRequestAnimationFrameId=-1,l.nativeRequestAnimationFrame=function fP(){let t=oi.requestAnimationFrame,e=oi.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const o=e[Zone.__symbol__("OriginalDelegate")];o&&(e=o)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function pP(t){const e=()=>{!function hP(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(oi,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,xA(t),t.isCheckStableRunning=!0,CA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),xA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,o,l,m,N,J)=>{try{return IM(t),n.invokeTask(l,m,N,J)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===m.type||t.shouldCoalesceRunChangeDetection)&&e(),CM(t)}},onInvoke:(n,o,l,m,N,J,ee)=>{try{return IM(t),n.invoke(l,m,N,J,ee)}finally{t.shouldCoalesceRunChangeDetection&&e(),CM(t)}},onHasTask:(n,o,l,m)=>{n.hasTask(l,m),o===l&&("microTask"==m.change?(t._hasPendingMicrotasks=m.microTask,xA(t),CA(t)):"macroTask"==m.change&&(t.hasPendingMacrotasks=m.macroTask))},onHandleError:(n,o,l,m)=>(n.handleError(l,m),t.runOutsideAngular(()=>t.onError.emit(m)),!1)})}(l)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Xo.isInAngularZone())throw new dn(909,!1)}static assertNotInAngularZone(){if(Xo.isInAngularZone())throw new dn(909,!1)}run(e,n,o){return this._inner.run(e,n,o)}runTask(e,n,o,l){const m=this._inner,N=m.scheduleEventTask("NgZoneEvent: "+l,e,dP,$v,$v);try{return m.runTask(N,n,o)}finally{m.cancelTask(N)}}runGuarded(e,n,o){return this._inner.runGuarded(e,n,o)}runOutsideAngular(e){return this._outer.run(e)}}const dP={};function CA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function xA(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function IM(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function CM(t){t._nesting--,CA(t)}class gP{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new wo,this.onMicrotaskEmpty=new wo,this.onStable=new wo,this.onError=new wo}run(e,n,o){return e.apply(n,o)}runGuarded(e,n,o){return e.apply(n,o)}runOutsideAngular(e){return e()}runTask(e,n,o,l){return e.apply(n,o)}}const xM=new $n(""),e1=new $n("");class df{constructor(e,n,o){this._ngZone=e,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,DA||(function yP(t){DA=t}(o),o.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Xo.assertNotInAngularZone(),IA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())IA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,o){let l=-1;n&&n>0&&(l=setTimeout(()=>{this._callbacks=this._callbacks.filter(m=>m.timeoutId!==l),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:l,updateCb:o})}whenStable(e,n,o){if(o&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,o),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,o){return[]}}df.\u0275fac=function(e){return new(e||df)(Gn(Xo),Gn(hf),Gn(e1))},df.\u0275prov=Tn({token:df,factory:df.\u0275fac});class hf{constructor(){this._applications=new Map}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return DA?.findTestabilityInTree(this,e,n)??null}}let DA;hf.\u0275fac=function(e){return new(e||hf)},hf.\u0275prov=Tn({token:hf,factory:hf.\u0275fac,providedIn:"platform"});const tl=!1;let pf=null;const DM=new $n("AllowMultipleToken"),TA=new $n("PlatformDestroyListeners"),mP=new $n("appBootstrapListener");function TM(t){const e=t.get(EM,null);e&&e.forEach(n=>n())}function OM(t,e,n=[]){const o=`Platform: ${e}`,l=new $n(o);return(m=[])=>{let N=OA();if(!N||N.injector.get(DM,!1)){const J=[...n,...m,{provide:l,useValue:!0}];t?t(J):function wP(t){if(pf&&!pf.get(DM,!1))throw new dn(400,!1);pf=t;const e=t.get(Dd);return TM(t),e}(NM(J,o))}return function EP(t){const e=OA();if(!e)throw new dn(401,!1);return e}()}}function NM(t=[],e){return Qo.create({name:e,providers:[{provide:Mw,useValue:"platform"},{provide:TA,useValue:new Set([()=>pf=null])},...t]})}function OA(){return pf?.get(Dd)??null}class Dd{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const o=RM(n?.ngZone,PM(n)),l=[{provide:Xo,useValue:o}];return o.run(()=>{const m=Qo.create({providers:l,parent:this.injector,name:e.moduleType.name}),N=e.create(m),J=N.injector.get(A0,null);if(!J)throw new dn(402,!1);return o.runOutsideAngular(()=>{const ee=o.onError.subscribe({next:oe=>{J.handleError(oe)}});N.onDestroy(()=>{t1(this._modules,N),ee.unsubscribe()})}),kM(J,o,()=>{const ee=N.injector.get($c);return ee.runInitializers(),ee.donePromise.then(()=>(u_(N.injector.get(el,F0)||F0),this._moduleDoBootstrap(N),N))})})}bootstrapModule(e,n=[]){const o=LM({},n);return function vP(t,e,n){const o=new lA(n);return Promise.resolve(o)}(this.injector,0,e).then(l=>this.bootstrapModuleFactory(l,o))}_moduleDoBootstrap(e){const n=e.injector.get(gf);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(o=>n.bootstrap(o));else{if(!e.instance.ngDoBootstrap)throw new dn(-403,!1);e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new dn(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(TA,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function PM(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}function RM(t,e){let n;return n="noop"===t?new gP:("zone.js"===t?void 0:t)||new Xo(e),n}function kM(t,e,n){try{const o=n();return Kv(o)?o.catch(l=>{throw e.runOutsideAngular(()=>t.handleError(l)),l}):o}catch(o){throw e.runOutsideAngular(()=>t.handleError(o)),o}}function LM(t,e){return t=Array.isArray(e)?e.reduce(LM,t):{...t,...e}}Dd.\u0275fac=function(e){return new(e||Dd)(Gn(Qo))},Dd.\u0275prov=Tn({token:Dd,factory:Dd.\u0275fac,providedIn:"platform"});class gf{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,n,o){this._zone=e,this._injector=n,this._exceptionHandler=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new pe(N=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{N.next(this._stable),N.complete()})}),m=new pe(N=>{let J;this._zone.runOutsideAngular(()=>{J=this._zone.onStable.subscribe(()=>{Xo.assertNotInAngularZone(),IA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,N.next(!0))})})});const ee=this._zone.onUnstable.subscribe(()=>{Xo.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{N.next(!1)}))});return()=>{J.unsubscribe(),ee.unsubscribe()}});this.isStable=Pn(l,m.pipe(function Ir(t={}){const{connector:e=(()=>new Fe),resetOnError:n=!0,resetOnComplete:o=!0,resetOnRefCountZero:l=!0}=t;return m=>{let N,J,ee,oe=0,ue=!1,ge=!1;const Ie=()=>{J?.unsubscribe(),J=void 0},Re=()=>{Ie(),N=ee=void 0,ue=ge=!1},Te=()=>{const ke=N;Re(),ke?.unsubscribe()};return Ve((ke,Ue)=>{oe++,!ge&&!ue&&Ie();const Ge=ee=ee??e();Ue.add(()=>{oe--,0===oe&&!ge&&!ue&&(J=vr(Te,l))}),Ge.subscribe(Ue),!N&&oe>0&&(N=new se({next:nt=>Ge.next(nt),error:nt=>{ge=!0,Ie(),J=vr(Re,n,nt),Ge.error(nt)},complete:()=>{ue=!0,Ie(),J=vr(Re,o),Ge.complete()}}),Zt(ke).subscribe(N))})(m)}}()))}bootstrap(e,n){tl&&this.warnIfDestroyed();const o=e instanceof mS;if(!this._injector.get($c).done){const Ie="Cannot bootstrap as there are still asynchronous initializers running."+(!o&&Vf(e)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new dn(405,tl&&Ie)}let m;m=o?e:this._injector.get(kg).resolveComponentFactory(e),this.componentTypes.push(m.componentType);const N=function bP(t){return t.isBoundToModule}(m)?void 0:this._injector.get(B0),J=n||m.selector,ee=m.create(Qo.NULL,[],J,N),oe=ee.location.nativeElement,ue=ee.injector.get(xM,null);return ue?.registerApplication(oe),ee.onDestroy(()=>{this.detachView(ee.hostView),t1(this.components,ee),ue?.unregisterApplication(oe)}),this._loadComponent(ee),ee}tick(){if(tl&&this.warnIfDestroyed(),this._runningTick)throw new dn(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){tl&&this.warnIfDestroyed();const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){tl&&this.warnIfDestroyed();const n=e;t1(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(mP,[]);n.push(...this._bootstrapListeners),n.forEach(o=>o(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return tl&&this.warnIfDestroyed(),this._destroyListeners.push(e),()=>t1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new dn(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){tl&&this._destroyed&&console.warn(to(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function t1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}gf.\u0275fac=function(e){return new(e||gf)(Gn(Xo),Gn(v0),Gn(A0))},gf.\u0275prov=Tn({token:gf,factory:gf.\u0275fac,providedIn:"root"});class NA{}NA.__NG_ELEMENT_ID__=function _P(t){return function MP(t,e,n){if(Tl(t)&&!n){const o=xo(t.index,e);return new jg(o,o)}if(47&t.type){const o=e[no];return new jg(o,e)}return null}(Hi(),tn(),16==(16&t))};class KM{constructor(){}supports(e){return jv(e)}create(e){return new OP(e)}}const TP=(t,e)=>e;class OP{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||TP}forEachItem(e){let n;for(n=this._itHead;null!==n;n=n._next)e(n)}forEachOperation(e){let n=this._itHead,o=this._removalsHead,l=0,m=null;for(;n||o;){const N=!o||n&&n.currentIndex{N=this._trackByFn(l,J),null!==n&&Object.is(n.trackById,N)?(o&&(n=this._verifyReinsertion(n,J,N,l)),Object.is(n.item,J)||this._addIdentityChange(n,J)):(n=this._mismatch(n,J,N,l),o=!0),n=n._next,l++}),this.length=l;return this._truncate(n),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,n,o,l){let m;return null===e?m=this._itTail:(m=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(o,null))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._reinsertAfter(e,m,l)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(o,l))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._moveAfter(e,m,l)):e=this._addAfter(new NP(n,o),m,l),e}_verifyReinsertion(e,n,o,l){let m=null===this._unlinkedRecords?null:this._unlinkedRecords.get(o,null);return null!==m?e=this._reinsertAfter(m,e._prev,l):e.currentIndex!=l&&(e.currentIndex=l,this._addToMoves(e,l)),e}_truncate(e){for(;null!==e;){const n=e._next;this._addToRemovals(this._unlink(e)),e=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,n,o){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const l=e._prevRemoved,m=e._nextRemoved;return null===l?this._removalsHead=m:l._nextRemoved=m,null===m?this._removalsTail=l:m._prevRemoved=l,this._insertAfter(e,n,o),this._addToMoves(e,o),e}_moveAfter(e,n,o){return this._unlink(e),this._insertAfter(e,n,o),this._addToMoves(e,o),e}_addAfter(e,n,o){return this._insertAfter(e,n,o),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,n,o){const l=null===n?this._itHead:n._next;return e._next=l,e._prev=n,null===l?this._itTail=e:l._prev=e,null===n?this._itHead=e:n._next=e,null===this._linkedRecords&&(this._linkedRecords=new VM),this._linkedRecords.put(e),e.currentIndex=o,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const n=e._prev,o=e._next;return null===n?this._itHead=o:n._next=o,null===o?this._itTail=n:o._prev=n,e}_addToMoves(e,n){return e.previousIndex===n||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new VM),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,n){return e.item=n,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class NP{constructor(e,n){this.item=e,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class PP{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,n){let o;for(o=this._head;null!==o;o=o._nextDup)if((null===n||n<=o.currentIndex)&&Object.is(o.trackById,e))return o;return null}remove(e){const n=e._prevDup,o=e._nextDup;return null===n?this._head=o:n._nextDup=o,null===o?this._tail=n:o._prevDup=n,null===this._head}}class VM{constructor(){this.map=new Map}put(e){const n=e.trackById;let o=this.map.get(n);o||(o=new PP,this.map.set(n,o)),o.add(e)}get(e,n){const o=e,l=this.map.get(o);return l?l.get(e,n):null}remove(e){const n=e.trackById;return this.map.get(n).remove(e)&&this.map.delete(n),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function HM(t,e,n){const o=t.previousIndex;if(null===o)return o;let l=0;return n&&o{if(n&&n.key===l)this._maybeAddToChanges(n,o),this._appendAfter=n,n=n._next;else{const m=this._getOrCreateRecordForKey(l,o);n=this._insertBeforeOrAppend(n,m)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let o=n;null!==o;o=o._nextRemoved)o===this._mapHead&&(this._mapHead=null),this._records.delete(o.key),o._nextRemoved=o._next,o.previousValue=o.currentValue,o.currentValue=null,o._prev=null,o._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){const o=e._prev;return n._next=e,n._prev=o,e._prev=n,o&&(o._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){const l=this._records.get(e);this._maybeAddToChanges(l,n);const m=l._prev,N=l._next;return m&&(m._next=N),N&&(N._prev=m),l._next=null,l._prev=null,l}const o=new kP(e);return this._records.set(e,o),o.currentValue=n,this._addToAdditions(o),o}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(o=>n(e[o],o))}}class kP{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function WM(){return new iu([new KM])}class iu{constructor(e){this.factories=e}static create(e,n){if(null!=n){const o=n.factories.slice();e=e.concat(o)}return new iu(e)}static extend(e){return{provide:iu,useFactory:n=>iu.create(e,n||WM()),deps:[[iu,new dd,new jc]]}}find(e){const n=this.factories.find(o=>o.supports(e));if(null!=n)return n;throw new dn(901,!1)}}function GM(){return new Ma([new zM])}iu.\u0275prov=Tn({token:iu,providedIn:"root",factory:WM});class Ma{constructor(e){this.factories=e}static create(e,n){if(n){const o=n.factories.slice();e=e.concat(o)}return new Ma(e)}static extend(e){return{provide:Ma,useFactory:n=>Ma.create(e,n||GM()),deps:[[Ma,new dd,new jc]]}}find(e){const n=this.factories.find(o=>o.supports(e));if(n)return n;throw new dn(901,!1)}}Ma.\u0275prov=Tn({token:Ma,providedIn:"root",factory:GM});const LP=[new zM],FP=[new KM],BP=(new iu(FP),new Ma(LP),OM(null,"core",[]));class V0{constructor(e){}}function FA(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}V0.\u0275fac=function(e){return new(e||V0)(Gn(gf))},V0.\u0275mod=cs({type:V0}),V0.\u0275inj=Ri({});let BA=null;function Qu(){return BA}class KP{}const Mi=new $n("DocumentToken");class Od{historyGo(e){throw new Error("Not implemented")}}Od.\u0275fac=function(e){return new(e||Od)},Od.\u0275prov=Tn({token:Od,factory:function(){return function VP(){return Gn(H0)}()},providedIn:"platform"});new $n("Location Initialized");class H0 extends Od{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Qu().getBaseHref(this._doc)}onPopState(e){const n=Qu().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Qu().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,o){ZM()?this._history.pushState(e,n,o):this._location.hash=o}replaceState(e,n,o){ZM()?this._history.replaceState(e,n,o):this._location.hash=o}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}function ZM(){return!!window.history.pushState}function jA(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function YM(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length,o=n-("/"===t[n-1]?1:0);return t.slice(0,o)+t.slice(n)}function nl(t){return t&&"?"!==t[0]?"?"+t:t}H0.\u0275fac=function(e){return new(e||H0)(Gn(Mi))},H0.\u0275prov=Tn({token:H0,factory:function(){return function HP(){return new H0(Gn(Mi))}()},providedIn:"platform"});class yf{historyGo(e){throw new Error("Not implemented")}}yf.\u0275fac=function(e){return new(e||yf)},yf.\u0275prov=Tn({token:yf,factory:function(){return ki(z0)},providedIn:"root"});const JM=new $n("appBaseHref");class z0 extends yf{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??ki(Mi).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return jA(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+nl(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${n}${o}`:n}pushState(e,n,o,l){const m=this.prepareExternalUrl(o+nl(l));this._platformLocation.pushState(e,n,m)}replaceState(e,n,o,l){const m=this.prepareExternalUrl(o+nl(l));this._platformLocation.replaceState(e,n,m)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}z0.\u0275fac=function(e){return new(e||z0)(Gn(Od),Gn(JM,8))},z0.\u0275prov=Tn({token:z0,factory:z0.\u0275fac,providedIn:"root"});class ty extends yf{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=jA(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,o,l){let m=this.prepareExternalUrl(o+nl(l));0==m.length&&(m=this._platformLocation.pathname),this._platformLocation.pushState(e,n,m)}replaceState(e,n,o,l){let m=this.prepareExternalUrl(o+nl(l));0==m.length&&(m=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,m)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}ty.\u0275fac=function(e){return new(e||ty)(Gn(Od),Gn(JM,8))},ty.\u0275prov=Tn({token:ty,factory:ty.\u0275fac});class qu{constructor(e){this._subject=new wo,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function GP(t){if(new RegExp("^(https?:)?//").test(t)){const[,n]=t.split(/\/\/[^\/]+/);return n}return t}(YM(QM(n))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+nl(n))}normalize(e){return qu.stripTrailingSlash(function WP(t,e){if(!t||!e.startsWith(t))return e;const n=e.substring(t.length);return""===n||["/",";","?","#"].includes(n[0])?n:e}(this._basePath,QM(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",o=null){this._locationStrategy.pushState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+nl(n)),o)}replaceState(e,n="",o=null){this._locationStrategy.replaceState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+nl(n)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)})),()=>{const n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(o=>o(e,n))}subscribe(e,n,o){return this._subject.subscribe({next:e,error:n,complete:o})}}function QM(t){return t.replace(/\/index.html$/,"")}qu.normalizeQueryParams=nl,qu.joinWithSlash=jA,qu.stripTrailingSlash=YM,qu.\u0275fac=function(e){return new(e||qu)(Gn(yf))},qu.\u0275prov=Tn({token:qu,factory:function(){return function zP(){return new qu(Gn(yf))}()},providedIn:"root"});const qM={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var ny,Nd,$o,ni,Ls,Oi,XM;function i1(t,e){return Ca(ys(t)[ai.DateFormat],e)}function o1(t,e){return Ca(ys(t)[ai.TimeFormat],e)}function s1(t,e){return Ca(ys(t)[ai.DateTimeFormat],e)}function Ia(t,e){const n=ys(t),o=n[ai.NumberSymbols][e];if(typeof o>"u"){if(e===Oi.CurrencyDecimal)return n[ai.NumberSymbols][Oi.Decimal];if(e===Oi.CurrencyGroup)return n[ai.NumberSymbols][Oi.Group]}return o}function UA(t,e){return ys(t)[ai.NumberFormats][e]}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(ny||(ny={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(Nd||(Nd={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}($o||($o={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(ni||(ni={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(Ls||(Ls={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(Oi||(Oi={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(XM||(XM={}));const $P=o_;function $M(t){if(!t[ai.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ai.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Ca(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function KA(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}function nR(t,e,n="en"){const o=function XP(t){return ys(t)[ai.Currencies]}(n)[t]||qM[t]||[],l=o[1];return"narrow"===e&&"string"==typeof l?l:o[0]||t}const rR=2;const oR=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ry={},sR=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Xu,Vr,Hr;function aR(t,e,n,o){let l=function yR(t){if(n4(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[l,m=1,N=1]=t.split("-").map(J=>+J);return a1(l,m-1,N)}const n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let o;if(o=t.match(oR))return function mR(t){const e=new Date(0);let n=0,o=0;const l=t[8]?e.setUTCFullYear:e.setFullYear,m=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),o=Number(t[9]+t[11])),l.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const N=Number(t[4]||0)-n,J=Number(t[5]||0)-o,ee=Number(t[6]||0),oe=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return m.call(e,N,J,ee,oe),e}(o)}const e=new Date(t);if(!n4(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=rl(n,e)||e;let J,N=[];for(;e;){if(J=sR.exec(e),!J){N.push(e);break}{N=N.concat(J.slice(1));const ue=N.pop();if(!ue)break;e=ue}}let ee=l.getTimezoneOffset();o&&(ee=t4(o,ee),l=function gR(t,e,n){const o=n?-1:1,l=t.getTimezoneOffset(),m=t4(e,l);return function pR(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,o*(m-l))}(l,o,!0));let oe="";return N.forEach(ue=>{const ge=function hR(t){if(HA[t])return HA[t];let e;switch(t){case"G":case"GG":case"GGG":e=di(Hr.Eras,ni.Abbreviated);break;case"GGGG":e=di(Hr.Eras,ni.Wide);break;case"GGGGG":e=di(Hr.Eras,ni.Narrow);break;case"y":e=Qi(Vr.FullYear,1,0,!1,!0);break;case"yy":e=Qi(Vr.FullYear,2,0,!0,!0);break;case"yyy":e=Qi(Vr.FullYear,3,0,!1,!0);break;case"yyyy":e=Qi(Vr.FullYear,4,0,!1,!0);break;case"Y":e=f1(1);break;case"YY":e=f1(2,!0);break;case"YYY":e=f1(3);break;case"YYYY":e=f1(4);break;case"M":case"L":e=Qi(Vr.Month,1,1);break;case"MM":case"LL":e=Qi(Vr.Month,2,1);break;case"MMM":e=di(Hr.Months,ni.Abbreviated);break;case"MMMM":e=di(Hr.Months,ni.Wide);break;case"MMMMM":e=di(Hr.Months,ni.Narrow);break;case"LLL":e=di(Hr.Months,ni.Abbreviated,$o.Standalone);break;case"LLLL":e=di(Hr.Months,ni.Wide,$o.Standalone);break;case"LLLLL":e=di(Hr.Months,ni.Narrow,$o.Standalone);break;case"w":e=VA(1);break;case"ww":e=VA(2);break;case"W":e=VA(1,!0);break;case"d":e=Qi(Vr.Date,1);break;case"dd":e=Qi(Vr.Date,2);break;case"c":case"cc":e=Qi(Vr.Day,1);break;case"ccc":e=di(Hr.Days,ni.Abbreviated,$o.Standalone);break;case"cccc":e=di(Hr.Days,ni.Wide,$o.Standalone);break;case"ccccc":e=di(Hr.Days,ni.Narrow,$o.Standalone);break;case"cccccc":e=di(Hr.Days,ni.Short,$o.Standalone);break;case"E":case"EE":case"EEE":e=di(Hr.Days,ni.Abbreviated);break;case"EEEE":e=di(Hr.Days,ni.Wide);break;case"EEEEE":e=di(Hr.Days,ni.Narrow);break;case"EEEEEE":e=di(Hr.Days,ni.Short);break;case"a":case"aa":case"aaa":e=di(Hr.DayPeriods,ni.Abbreviated);break;case"aaaa":e=di(Hr.DayPeriods,ni.Wide);break;case"aaaaa":e=di(Hr.DayPeriods,ni.Narrow);break;case"b":case"bb":case"bbb":e=di(Hr.DayPeriods,ni.Abbreviated,$o.Standalone,!0);break;case"bbbb":e=di(Hr.DayPeriods,ni.Wide,$o.Standalone,!0);break;case"bbbbb":e=di(Hr.DayPeriods,ni.Narrow,$o.Standalone,!0);break;case"B":case"BB":case"BBB":e=di(Hr.DayPeriods,ni.Abbreviated,$o.Format,!0);break;case"BBBB":e=di(Hr.DayPeriods,ni.Wide,$o.Format,!0);break;case"BBBBB":e=di(Hr.DayPeriods,ni.Narrow,$o.Format,!0);break;case"h":e=Qi(Vr.Hours,1,-12);break;case"hh":e=Qi(Vr.Hours,2,-12);break;case"H":e=Qi(Vr.Hours,1);break;case"HH":e=Qi(Vr.Hours,2);break;case"m":e=Qi(Vr.Minutes,1);break;case"mm":e=Qi(Vr.Minutes,2);break;case"s":e=Qi(Vr.Seconds,1);break;case"ss":e=Qi(Vr.Seconds,2);break;case"S":e=Qi(Vr.FractionalSeconds,1);break;case"SS":e=Qi(Vr.FractionalSeconds,2);break;case"SSS":e=Qi(Vr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=c1(Xu.Short);break;case"ZZZZZ":e=c1(Xu.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=c1(Xu.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=c1(Xu.Long);break;default:return null}return HA[t]=e,e}(ue);oe+=ge?ge(l,n,ee):"''"===ue?"'":ue.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),oe}function a1(t,e,n){const o=new Date(0);return o.setFullYear(t,e,n),o.setHours(0,0,0),o}function rl(t,e){const n=function ZP(t){return ys(t)[ai.LocaleId]}(t);if(ry[n]=ry[n]||{},ry[n][e])return ry[n][e];let o="";switch(e){case"shortDate":o=i1(t,Ls.Short);break;case"mediumDate":o=i1(t,Ls.Medium);break;case"longDate":o=i1(t,Ls.Long);break;case"fullDate":o=i1(t,Ls.Full);break;case"shortTime":o=o1(t,Ls.Short);break;case"mediumTime":o=o1(t,Ls.Medium);break;case"longTime":o=o1(t,Ls.Long);break;case"fullTime":o=o1(t,Ls.Full);break;case"short":const l=rl(t,"shortTime"),m=rl(t,"shortDate");o=u1(s1(t,Ls.Short),[l,m]);break;case"medium":const N=rl(t,"mediumTime"),J=rl(t,"mediumDate");o=u1(s1(t,Ls.Medium),[N,J]);break;case"long":const ee=rl(t,"longTime"),oe=rl(t,"longDate");o=u1(s1(t,Ls.Long),[ee,oe]);break;case"full":const ue=rl(t,"fullTime"),ge=rl(t,"fullDate");o=u1(s1(t,Ls.Full),[ue,ge])}return o&&(ry[n][e]=o),o}function u1(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,o){return null!=e&&o in e?e[o]:n})),t}function ou(t,e,n="-",o,l){let m="";(t<0||l&&t<=0)&&(l?t=1-t:(t=-t,m=n));let N=String(t);for(;N.length0||J>-n)&&(J+=n),t===Vr.Hours)0===J&&-12===n&&(J=12);else if(t===Vr.FractionalSeconds)return function uR(t,e){return ou(t,3).substring(0,e)}(J,e);const ee=Ia(N,Oi.MinusSign);return ou(J,e,ee,o,l)}}function di(t,e,n=$o.Format,o=!1){return function(l,m){return function lR(t,e,n,o,l,m){switch(n){case Hr.Months:return function QP(t,e,n){const o=ys(t),m=Ca([o[ai.MonthsFormat],o[ai.MonthsStandalone]],e);return Ca(m,n)}(e,l,o)[t.getMonth()];case Hr.Days:return function JP(t,e,n){const o=ys(t),m=Ca([o[ai.DaysFormat],o[ai.DaysStandalone]],e);return Ca(m,n)}(e,l,o)[t.getDay()];case Hr.DayPeriods:const N=t.getHours(),J=t.getMinutes();if(m){const oe=function eR(t){const e=ys(t);return $M(e),(e[ai.ExtraData][2]||[]).map(o=>"string"==typeof o?KA(o):[KA(o[0]),KA(o[1])])}(e),ue=function tR(t,e,n){const o=ys(t);$M(o);const m=Ca([o[ai.ExtraData][0],o[ai.ExtraData][1]],e)||[];return Ca(m,n)||[]}(e,l,o),ge=oe.findIndex(Ie=>{if(Array.isArray(Ie)){const[Re,Te]=Ie,ke=N>=Re.hours&&J>=Re.minutes,Ue=N0?Math.floor(l/60):Math.ceil(l/60);switch(t){case Xu.Short:return(l>=0?"+":"")+ou(N,2,m)+ou(Math.abs(l%60),2,m);case Xu.ShortGMT:return"GMT"+(l>=0?"+":"")+ou(N,1,m);case Xu.Long:return"GMT"+(l>=0?"+":"")+ou(N,2,m)+":"+ou(Math.abs(l%60),2,m);case Xu.Extended:return 0===o?"Z":(l>=0?"+":"")+ou(N,2,m)+":"+ou(Math.abs(l%60),2,m);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(Xu||(Xu={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(Vr||(Vr={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(Hr||(Hr={}));const fR=0,l1=4;function e4(t){return a1(t.getFullYear(),t.getMonth(),t.getDate()+(l1-t.getDay()))}function VA(t,e=!1){return function(n,o){let l;if(e){const m=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,N=n.getDate();l=1+Math.floor((N+m)/7)}else{const m=e4(n),N=function dR(t){const e=a1(t,fR,1).getDay();return a1(t,0,1+(e<=l1?l1:l1+7)-e)}(m.getFullYear()),J=m.getTime()-N.getTime();l=1+Math.round(J/6048e5)}return ou(l,t,Ia(o,Oi.MinusSign))}}function f1(t,e=!1){return function(n,o){return ou(e4(n).getFullYear(),t,Ia(o,Oi.MinusSign),e)}}const HA={};function t4(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function n4(t){return t instanceof Date&&!isNaN(t.valueOf())}const vR=/^(\d+)?\.((\d+)(-(\d+))?)?$/,r4=22,d1=".",iy="0",bR=";",wR=",",zA="#",i4="\xa4",AR="%";function WA(t,e,n,o,l,m,N=!1){let J="",ee=!1;if(isFinite(t)){let oe=function IR(t){let o,l,m,N,J,e=Math.abs(t)+"",n=0;for((l=e.indexOf(d1))>-1&&(e=e.replace(d1,"")),(m=e.search(/e/i))>0?(l<0&&(l=m),l+=+e.slice(m+1),e=e.substring(0,m)):l<0&&(l=e.length),m=0;e.charAt(m)===iy;m++);if(m===(J=e.length))o=[0],l=1;else{for(J--;e.charAt(J)===iy;)J--;for(l-=m,o=[],N=0;m<=J;m++,N++)o[N]=Number(e.charAt(m))}return l>r4&&(o=o.splice(0,r4-1),n=l-1,l=1),{digits:o,exponent:n,integerLen:l}}(t);N&&(oe=function MR(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(oe));let ue=e.minInt,ge=e.minFrac,Ie=e.maxFrac;if(m){const nt=m.match(vR);if(null===nt)throw new Error(`${m} is not a valid digit info`);const Xe=nt[1],St=nt[3],kt=nt[5];null!=Xe&&(ue=ZA(Xe)),null!=St&&(ge=ZA(St)),null!=kt?Ie=ZA(kt):null!=St&&ge>Ie&&(Ie=ge)}!function CR(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let o=t.digits,l=o.length-t.integerLen;const m=Math.min(Math.max(e,l),n);let N=m+t.integerLen,J=o[N];if(N>0){o.splice(Math.max(t.integerLen,N));for(let ge=N;ge=5)if(N-1<0){for(let ge=0;ge>N;ge--)o.unshift(0),t.integerLen++;o.unshift(1),t.integerLen++}else o[N-1]++;for(;l=oe?Te.pop():ee=!1),Ie>=10?1:0},0);ue&&(o.unshift(ue),t.integerLen++)}(oe,ge,Ie);let Re=oe.digits,Te=oe.integerLen;const ke=oe.exponent;let Ue=[];for(ee=Re.every(nt=>!nt);Te0?Ue=Re.splice(Te,Re.length):(Ue=Re,Re=[0]);const Ge=[];for(Re.length>=e.lgSize&&Ge.unshift(Re.splice(-e.lgSize,Re.length).join(""));Re.length>e.gSize;)Ge.unshift(Re.splice(-e.gSize,Re.length).join(""));Re.length&&Ge.unshift(Re.join("")),J=Ge.join(Ia(n,o)),Ue.length&&(J+=Ia(n,l)+Ue.join("")),ke&&(J+=Ia(n,Oi.Exponential)+"+"+ke)}else J=Ia(n,Oi.Infinity);return J=t<0&&!ee?e.negPre+J+e.negSuf:e.posPre+J+e.posSuf,J}function ER(t,e,n,o,l){const N=GA(UA(e,ny.Currency),Ia(e,Oi.MinusSign));return N.minFrac=function iR(t){let e;const n=qM[t];return n&&(e=n[2]),"number"==typeof e?e:rR}(o),N.maxFrac=N.minFrac,WA(t,N,e,Oi.CurrencyGroup,Oi.CurrencyDecimal,l).replace(i4,n).replace(i4,"").trim()}function GA(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},o=t.split(bR),l=o[0],m=o[1],N=-1!==l.indexOf(d1)?l.split(d1):[l.substring(0,l.lastIndexOf(iy)+1),l.substring(l.lastIndexOf(iy)+1)],J=N[0],ee=N[1]||"";n.posPre=J.substring(0,J.indexOf(zA));for(let ue=0;ue-1||(l=n.getPluralCategory(t,o),e.indexOf(l)>-1))return l;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}Pd.\u0275fac=function(e){return new(e||Pd)},Pd.\u0275prov=Tn({token:Pd,factory:function(e){let n=null;return e?n=new e:(o=Gn(el),n=new W0(o)),n;var o},providedIn:"root"});class W0 extends Pd{constructor(e){super(),this.locale=e}getPluralCategory(e,n){switch($P(n||this.locale)(e)){case Nd.Zero:return"zero";case Nd.One:return"one";case Nd.Two:return"two";case Nd.Few:return"few";case Nd.Many:return"many";default:return"other"}}}W0.\u0275fac=function(e){return new(e||W0)(Gn(el))},W0.\u0275prov=Tn({token:W0,factory:W0.\u0275fac});const YA=/\s+/,s4=[];class G0{constructor(e,n,o,l){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=o,this._renderer=l,this.initialClasses=s4,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(YA):s4}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(YA):e}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const n of e)this._updateState(n,!0);else if(null!=e)for(const n of Object.keys(e))this._updateState(n,Boolean(e[n]));this._applyStateDiff()}_updateState(e,n){const o=this.stateMap.get(e);void 0!==o?(o.enabled!==n&&(o.changed=!0,o.enabled=n),o.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const n=e[0],o=e[1];o.changed?(this._toggleClass(n,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),o.touched=!1}}_toggleClass(e,n){(e=e.trim()).length>0&&e.split(YA).forEach(o=>{n?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}}G0.\u0275fac=function(e){return new(e||G0)(bn(iu),bn(Ma),bn(ea),bn(Jc))},G0.\u0275dir=nr({type:G0,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class oy{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null}ngOnChanges(e){const{_viewContainerRef:n,ngComponentOutletNgModule:o,ngComponentOutletNgModuleFactory:l}=this;if(n.clear(),this._componentRef=void 0,this.ngComponentOutlet){const m=this.ngComponentOutletInjector||n.parentInjector;(e.ngComponentOutletNgModule||e.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=o?function G7(t,e){return new P_(t,e??null)}(o,a4(m)):l?l.create(a4(m)):void 0),this._componentRef=n.createComponent(this.ngComponentOutlet,{index:n.length,injector:m,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function a4(t){return t.get(B0).injector}oy.\u0275fac=function(e){return new(e||oy)(bn(nu))},oy.\u0275dir=nr({type:oy,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[Ts]});class DR{constructor(e,n,o,l){this.$implicit=e,this.ngForOf=n,this.index=o,this.count=l}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class Z0{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,o){this._viewContainer=e,this._template=n,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((o,l,m)=>{if(null==o.previousIndex)n.createEmbeddedView(this._template,new DR(o.item,this._ngForOf,-1,-1),null===m?void 0:m);else if(null==m)n.remove(null===l?void 0:l);else if(null!==l){const N=n.get(l);n.move(N,m),c4(N,o)}});for(let o=0,l=n.length;o{c4(n.get(o.currentIndex),o)})}static ngTemplateContextGuard(e,n){return!0}}function c4(t,e){t.context.$implicit=e.item}Z0.\u0275fac=function(e){return new(e||Z0)(bn(nu),bn(Ju),bn(iu))},Z0.\u0275dir=nr({type:Z0,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class il{constructor(e,n){this._viewContainer=e,this._context=new OR,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){l4("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){l4("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}il.\u0275fac=function(e){return new(e||il)(bn(nu),bn(Ju))},il.\u0275dir=nr({type:il,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class OR{constructor(){this.$implicit=null,this.ngIf=null}}function l4(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Xn(e)}'.`)}class JA{constructor(e,n){this._viewContainerRef=e,this._templateRef=n,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class Rd{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const n of this._defaultViews)n.enforceState(e)}}}Rd.\u0275fac=function(e){return new(e||Rd)},Rd.\u0275dir=nr({type:Rd,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class sy{constructor(e,n,o){this.ngSwitch=o,o._addCase(),this._view=new JA(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}sy.\u0275fac=function(e){return new(e||sy)(bn(nu),bn(Ju),bn(Rd,9))},sy.\u0275dir=nr({type:sy,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class ay{constructor(e,n,o){o._addDefault(new JA(e,n))}}ay.\u0275fac=function(e){return new(e||ay)(bn(nu),bn(Ju),bn(Rd,9))},ay.\u0275dir=nr({type:ay,selectors:[["","ngSwitchDefault",""]],standalone:!0});class Y0{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,n){this._caseViews[e]=n}_updateView(e){this._clearViews();const o=o4(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[o])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}}Y0.\u0275fac=function(e){return new(e||Y0)(bn(Pd))},Y0.\u0275dir=nr({type:Y0,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class uy{constructor(e,n,o,l){this.value=e;const m=!isNaN(Number(e));l.addCase(m?`=${e}`:e,new JA(o,n))}}uy.\u0275fac=function(e){return new(e||uy)(Zl("ngPluralCase"),bn(Ju),bn(nu),bn(Y0,1))},uy.\u0275dir=nr({type:uy,selectors:[["","ngPluralCase",""]],standalone:!0});class cy{constructor(e,n,o){this._ngEl=e,this._differs=n,this._renderer=o,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[o,l]=e.split("."),m=-1===o.indexOf("-")?void 0:wa.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,o,l?`${n}${l}`:n,m):this._renderer.removeStyle(this._ngEl.nativeElement,o,m)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}cy.\u0275fac=function(e){return new(e||cy)(bn(ea),bn(Ma),bn(Jc))},cy.\u0275dir=nr({type:cy,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class ly{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:o,ngTemplateOutletContext:l,ngTemplateOutletInjector:m}=this;this._viewRef=n.createEmbeddedView(o,l,m?{injector:m}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}ly.\u0275fac=function(e){return new(e||ly)(bn(nu))},ly.\u0275dir=nr({type:ly,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Ts]});function su(t,e){return new dn(2100,!1)}const RR=new class PR{createSubscription(e,n){return e.then(n,o=>{throw o})}dispose(e){}},kR=new class NR{createSubscription(e,n){return e.subscribe({next:n,error:o=>{throw o}})}dispose(e){e.unsubscribe()}};class kd{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(Kv(e))return RR;if(h6(e))return kR;throw su()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}kd.\u0275fac=function(e){return new(e||kd)(bn(NA,16))},kd.\u0275pipe=Ho({name:"async",type:kd,pure:!1,standalone:!0});class Ld{transform(e){if(null==e)return null;if("string"!=typeof e)throw su();return e.toLowerCase()}}Ld.\u0275fac=function(e){return new(e||Ld)},Ld.\u0275pipe=Ho({name:"lowercase",type:Ld,pure:!0,standalone:!0});const LR=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3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uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Fd{transform(e){if(null==e)return null;if("string"!=typeof e)throw su();return e.replace(LR,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}}Fd.\u0275fac=function(e){return new(e||Fd)},Fd.\u0275pipe=Ho({name:"titlecase",type:Fd,pure:!0,standalone:!0});class Bd{transform(e){if(null==e)return null;if("string"!=typeof e)throw su();return e.toUpperCase()}}Bd.\u0275fac=function(e){return new(e||Bd)},Bd.\u0275pipe=Ho({name:"uppercase",type:Bd,pure:!0,standalone:!0});const BR=new $n("DATE_PIPE_DEFAULT_TIMEZONE"),jR=new $n("DATE_PIPE_DEFAULT_OPTIONS");class jd{constructor(e,n,o){this.locale=e,this.defaultTimezone=n,this.defaultOptions=o}transform(e,n,o,l){if(null==e||""===e||e!=e)return null;try{const m=n??this.defaultOptions?.dateFormat??"mediumDate",N=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return aR(e,m,l||this.locale,N)}catch(m){throw su(0,m.message)}}}jd.\u0275fac=function(e){return new(e||jd)(bn(el,16),bn(BR,24),bn(jR,24))},jd.\u0275pipe=Ho({name:"date",type:jd,pure:!0,standalone:!0});const UR=/#/g;class Ud{constructor(e){this._localization=e}transform(e,n,o){if(null==e)return"";if("object"!=typeof n||null===n)throw su();return n[o4(e,Object.keys(n),this._localization,o)].replace(UR,e.toString())}}Ud.\u0275fac=function(e){return new(e||Ud)(bn(Pd,16))},Ud.\u0275pipe=Ho({name:"i18nPlural",type:Ud,pure:!0,standalone:!0});class Kd{transform(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw su();return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}Kd.\u0275fac=function(e){return new(e||Kd)},Kd.\u0275pipe=Ho({name:"i18nSelect",type:Kd,pure:!0,standalone:!0});class fy{transform(e){return JSON.stringify(e,null,2)}}fy.\u0275fac=function(e){return new(e||fy)},fy.\u0275pipe=Ho({name:"json",type:fy,pure:!1,standalone:!0});class dy{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=f4}transform(e,n=f4){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const o=this.differ.diff(e),l=n!==this.compareFn;return o&&(this.keyValues=[],o.forEachItem(m=>{this.keyValues.push(function KR(t,e){return{key:t,value:e}}(m.key,m.currentValue))})),(o||l)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}}function f4(t,e){const n=t.key,o=e.key;if(n===o)return 0;if(void 0===n)return 1;if(void 0===o)return-1;if(null===n)return 1;if(null===o)return-1;if("string"==typeof n&&"string"==typeof o)return nnew GR(Gn(Mi),window)});class GR{constructor(e,n){this.document=e,this.window=n,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const n=function ZR(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const o=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let l=o.currentNode;for(;l;){const m=l.shadowRoot;if(m){const N=m.getElementById(e)||m.querySelector(`[name="${e}"]`);if(N)return N}l=o.nextNode()}}return null}(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const n=this.window.history;n&&n.scrollRestoration&&(n.scrollRestoration=e)}}scrollToElement(e){const n=e.getBoundingClientRect(),o=n.left+this.window.pageXOffset,l=n.top+this.window.pageYOffset,m=this.offset();this.window.scrollTo(o-m[0],l-m[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=p4(this.window.history)||p4(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function p4(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}function h1(t,e){return XA(t)?new URL(t):new URL(t,e.location.href)}function XA(t){return/^https?:\/\//.test(t)}function g4(t){return XA(t)?new URL(t).hostname:t}function qR(t){return t.startsWith("/")?t.slice(1):t}const hy=t=>t.src,y4=new $n("ImageLoader",{providedIn:"root",factory:()=>hy});function p1(t,e){return function(o){return function JR(t){if("string"!=typeof t||""===t.trim())return!1;try{return new URL(t),!0}catch{return!1}}(o)||function XR(t,e){throw new dn(2959,!1)}(),o=function QR(t){return t.endsWith("/")?t.slice(0,-1):t}(o),[{provide:y4,useValue:N=>(XA(N.src)&&function $R(t,e){throw new dn(2959,!1)}(0,N.src),t(o,{...N,src:qR(N.src)}))}]}}p1(function ek(t,e){let n="format=auto";return e.width&&(n+=`,width=${e.width}`),`${t}/cdn-cgi/image/${n}/${e.src}`});p1(function ik(t,e){let n="f_auto,q_auto";return e.width&&(n+=`,w_${e.width}`),`${t}/image/upload/${n}/${e.src}`});p1(function uk(t,e){const{src:n,width:o}=e;let l;if(o){l=[t,`tr:w-${o}`,n]}else l=[t,n];return l.join("/")});p1(function dk(t,e){const n=new URL(`${t}/${e.src}`);return n.searchParams.set("auto","format"),e.width&&n.searchParams.set("w",e.width.toString()),n.href});function Ni(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function m4(t){throw new dn(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class py{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,m4("LCP checker");const e=ki(Mi).defaultView;typeof e<"u"&&typeof PerformanceObserver<"u"&&(this.window=e,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(n=>{const o=n.getEntries();if(0===o.length)return;const m=o[o.length-1].element?.src??"";m.startsWith("data:")||m.startsWith("blob:")||this.images.get(m)&&!this.alreadyWarned.has(m)&&(this.alreadyWarned.add(m),function hk(t){const e=Ni(t);console.warn(to(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(m))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,n){this.observer&&this.images.set(h1(e,this.window).href,n)}unregisterImage(e){this.observer&&this.images.delete(h1(e,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}py.\u0275fac=function(e){return new(e||py)},py.\u0275prov=Tn({token:py,factory:py.\u0275fac,providedIn:"root"});const pk=new Set(["localhost","127.0.0.1","0.0.0.0"]),gk=new $n("PRECONNECT_CHECK_BLOCKLIST");class gy{constructor(){this.document=ki(Mi),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(pk),m4("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const n=ki(gk,{optional:!0});n&&this.populateBlocklist(n)}populateBlocklist(e){Array.isArray(e)?v4(e,n=>{this.blocklist.add(g4(n))}):this.blocklist.add(g4(e))}assertPreconnect(e,n){if(!this.window)return;const o=h1(e,this.window);this.blocklist.has(o.hostname)||this.alreadySeen.has(o.origin)||(this.alreadySeen.add(o.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(o.origin)||console.warn(to(2956,`${Ni(n)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,o=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let l of o){const m=h1(l.href,this.window);e.add(m.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function v4(t,e){for(let n of t)Array.isArray(n)?v4(n,e):e(n)}gy.\u0275fac=function(e){return new(e||gy)},gy.\u0275prov=Tn({token:gy,factory:gy.\u0275fac,providedIn:"root"});const yk=new $n("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class Q0{constructor(){this.preloadedImages=ki(yk),this.document=ki(Mi)}createPreloadLinkTag(e,n,o,l){if(this.preloadedImages.has(n))return;this.preloadedImages.add(n);const m=e.createElement("link");e.setAttribute(m,"as","image"),e.setAttribute(m,"href",n),e.setAttribute(m,"rel","preload"),e.setAttribute(m,"fetchpriority","high"),l&&e.setAttribute(m,"imageSizes",l),o&&e.setAttribute(m,"imageSrcset",o),e.appendChild(this.document.head,m)}}Q0.\u0275fac=function(e){return new(e||Q0)},Q0.\u0275prov=Tn({token:Q0,factory:Q0.\u0275fac,providedIn:"root"});const w4=/^((\s*\d+w\s*(,|$)){1,})$/,vk=[1,2],S4={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},Sk=new $n("ImageConfig",{providedIn:"root",factory:()=>S4});class g1{constructor(){this.imageLoader=ki(y4),this.config=function _k(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((n,o)=>n-o)),Object.assign({},S4,t,e)}(ki(Sk)),this.renderer=ki(Jc),this.imgElement=ki(ea).nativeElement,this.injector=ki(Qo),this.isServer=function WR(t){return t===VR}(ki(MA)),this.preloadLinkChecker=ki(Q0),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(e){this._width=_4(e)}get width(){return this._width}set height(e){this._height=_4(e)}get height(){return this._height}set priority(e){this._priority=e2(e)}get priority(){return this._priority}set disableOptimizedSrcset(e){this._disableOptimizedSrcset=e2(e)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(e){this._fill=e2(e)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.getRewrittenSrc();let n;this.setHostAttribute("src",e),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?n=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(n=this.getAutomaticSrcset()),n&&this.setHostAttribute("srcset",n),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,e,n,this.sizes)}ngOnChanges(e){}callImageLoader(e){let n=e;return this.loaderParams&&(n.loaderParams=this.loaderParams),this.imageLoader(n)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=w4.test(this.ngSrcset);return this.ngSrcset.split(",").filter(o=>""!==o).map(o=>{o=o.trim();const l=e?parseFloat(o):parseFloat(o)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:l})} ${o}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let n=e;return"100vw"===this.sizes?.trim()&&(n=e.filter(l=>l>=640)),n.map(l=>`${this.callImageLoader({src:this.ngSrc,width:l})} ${l}w`).join(", ")}getFixedSrcset(){return vk.map(n=>`${this.callImageLoader({src:this.ngSrc,width:this.width*n})} ${n}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==hy&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(e,n){this.renderer.setAttribute(this.imgElement,e,n)}}function _4(t){return"string"==typeof t?parseInt(t,10):t}function e2(t){return null!=t&&"false"!=`${t}`}g1.\u0275fac=function(e){return new(e||g1)},g1.\u0275dir=nr({type:g1,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(e,n){2&e&&nA("position",n.fill?"absolute":null)("width",n.fill?"100%":null)("height",n.fill?"100%":null)("inset",n.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[Ts]});class xk extends KP{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class t2 extends xk{static makeCurrent(){!function UP(t){BA||(BA=t)}(new t2)}onAndCancel(e,n,o){return e.addEventListener(n,o,!1),()=>{e.removeEventListener(n,o,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=function Dk(){return my=my||document.querySelector("base"),my?my.getAttribute("href"):null}();return null==n?null:function Tk(t){y1=y1||document.createElement("a"),y1.setAttribute("href",t);const e=y1.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){my=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function xR(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const o=n.indexOf("="),[l,m]=-1==o?[n,""]:[n.slice(0,o),n.slice(o+1)];if(l.trim()===e)return decodeURIComponent(m)}return null}(document.cookie,e)}}let y1,my=null;const M4=new $n("TRANSITION_ID");const Nk=[{provide:wM,useFactory:function Ok(t,e,n){return()=>{n.get($c).donePromise.then(()=>{const o=Qu(),l=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let m=0;m{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,o){return this._findPluginFor(n).addEventListener(e,n,o)}addGlobalEventListener(e,n,o){return this._findPluginFor(n).addGlobalEventListener(e,n,o)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const o=this._plugins;for(let l=0;l0?o.set(e,l):o.delete(e),l}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}Gd.\u0275fac=function(e){return new(e||Gd)},Gd.\u0275prov=Tn({token:Gd,factory:Gd.\u0275fac});class $u extends Gd{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const n of this.hostNodes)this.addStyleToHost(n,e)}onStyleRemoved(e){const n=this.styleRef;n.get(e)?.forEach(l=>l.remove()),n.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const n of this.getAllStyles())this.addStyleToHost(e,n)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,n){const o=this.doc.createElement("style");o.textContent=n,e.appendChild(o);const l=this.styleRef.get(n);l?l.push(o):this.styleRef.set(n,[o])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}$u.\u0275fac=function(e){return new(e||$u)(Gn(Mi))},$u.\u0275prov=Tn({token:$u,factory:$u.\u0275fac});const r2={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},i2=/%COMP%/g,Rk="_nghost-%COMP%",kk="_ngcontent-%COMP%",x4=new $n("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function D4(t,e){return e.flat(100).map(n=>n.replace(i2,t))}function T4(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class mf{constructor(e,n,o,l){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestory=l,this.rendererByCompId=new Map,this.defaultRenderer=new o2(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const o=this.getOrCreateRenderer(e,n);return o instanceof P4?o.applyToHost(e):o instanceof s2&&o.applyStyles(),o}getOrCreateRenderer(e,n){const o=this.rendererByCompId;let l=o.get(n.id);if(!l){const m=this.eventManager,N=this.sharedStylesHost,J=this.removeStylesOnCompDestory;switch(n.encapsulation){case la.Emulated:l=new P4(m,N,n,this.appId,J);break;case la.ShadowDom:return new Uk(m,N,e,n);default:l=new s2(m,N,n,J)}l.onDestroy=()=>o.delete(n.id),o.set(n.id,l)}return l}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}mf.\u0275fac=function(e){return new(e||mf)(Gn(ol),Gn($u),Gn(K0),Gn(x4))},mf.\u0275prov=Tn({token:mf,factory:mf.\u0275fac});class o2{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(r2[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){(N4(e)?e.content:e).appendChild(n)}insertBefore(e,n,o){e&&(N4(e)?e.content:e).insertBefore(n,o)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let o="string"==typeof e?document.querySelector(e):e;if(!o)throw new Error(`The selector "${e}" did not match any elements`);return n||(o.textContent=""),o}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,o,l){if(l){n=l+":"+n;const m=r2[l];m?e.setAttributeNS(m,n,o):e.setAttribute(n,o)}else e.setAttribute(n,o)}removeAttribute(e,n,o){if(o){const l=r2[o];l?e.removeAttributeNS(l,n):e.removeAttribute(`${o}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,o,l){l&(wa.DashCase|wa.Important)?e.style.setProperty(n,o,l&wa.Important?"important":""):e.style[n]=o}removeStyle(e,n,o){o&wa.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,o){e[n]=o}setValue(e,n){e.nodeValue=n}listen(e,n,o){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,T4(o)):this.eventManager.addEventListener(e,n,T4(o))}}"@".charCodeAt(0);function N4(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class Uk extends o2{constructor(e,n,o,l){super(e),this.sharedStylesHost=n,this.hostEl=o,this.shadowRoot=o.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const m=D4(l.id,l.styles);for(const N of m){const J=document.createElement("style");J.textContent=N,this.shadowRoot.appendChild(J)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,o){return super.insertBefore(this.nodeOrShadowRoot(e),n,o)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class s2 extends o2{constructor(e,n,o,l,m=o.id){super(e),this.sharedStylesHost=n,this.removeStylesOnCompDestory=l,this.rendererUsageCount=0,this.styles=D4(m,o.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class P4 extends s2{constructor(e,n,o,l,m){const N=l+"-"+o.id;super(e,n,o,m,N),this.contentAttr=function Fk(t){return kk.replace(i2,t)}(N),this.hostAttr=function Bk(t){return Rk.replace(i2,t)}(N)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){const o=super.createElement(e,n);return super.setAttribute(o,this.contentAttr,""),o}}class X0 extends n2{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o){return e.addEventListener(n,o,!1),()=>this.removeEventListener(e,n,o)}removeEventListener(e,n,o){return e.removeEventListener(n,o)}}X0.\u0275fac=function(e){return new(e||X0)(Gn(Mi))},X0.\u0275prov=Tn({token:X0,factory:X0.\u0275fac});const R4=["alt","control","meta","shift"],Kk={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Vk={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class xa extends n2{constructor(e){super(e)}supports(e){return null!=xa.parseEventName(e)}addEventListener(e,n,o){const l=xa.parseEventName(n),m=xa.eventCallback(l.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Qu().onAndCancel(e,l.domEventName,m))}static parseEventName(e){const n=e.toLowerCase().split("."),o=n.shift();if(0===n.length||"keydown"!==o&&"keyup"!==o)return null;const l=xa._normalizeKey(n.pop());let m="",N=n.indexOf("code");if(N>-1&&(n.splice(N,1),m="code."),R4.forEach(ee=>{const oe=n.indexOf(ee);oe>-1&&(n.splice(oe,1),m+=ee+".")}),m+=l,0!=n.length||0===l.length)return null;const J={};return J.domEventName=o,J.fullKey=m,J}static matchEventFullKeyCode(e,n){let o=Kk[e.key]||e.key,l="";return n.indexOf("code.")>-1&&(o=e.code,l="code."),!(null==o||!o)&&(o=o.toLowerCase()," "===o?o="space":"."===o&&(o="dot"),R4.forEach(m=>{if(m!==o){(0,Vk[m])(e)&&(l+=m+".")}}),l+=o,l===n)}static eventCallback(e,n,o){return l=>{xa.matchEventFullKeyCode(l,e)&&o.runGuarded(()=>n(l))}}static _normalizeKey(e){return"esc"===e?"escape":e}}xa.\u0275fac=function(e){return new(e||xa)(Gn(Mi))},xa.\u0275prov=Tn({token:xa,factory:xa.\u0275fac});const L4=[{provide:MA,useValue:d4},{provide:EM,useValue:function Hk(){t2.makeCurrent()},multi:!0},{provide:Mi,useFactory:function Wk(){return function _v(t){uf=t}(document),document},deps:[]}],Gk=OM(BP,"browser",L4),F4=new $n(""),B4=[{provide:e1,useClass:class Pk{addToWindow(e){oi.getAngularTestability=(o,l=!0)=>{const m=e.findTestabilityInTree(o,l);if(null==m)throw new Error("Could not find testability for element.");return m},oi.getAllAngularTestabilities=()=>e.getAllTestabilities(),oi.getAllAngularRootElements=()=>e.getAllRootElements();oi.frameworkStabilizers||(oi.frameworkStabilizers=[]),oi.frameworkStabilizers.push(o=>{const l=oi.getAllAngularTestabilities();let m=l.length,N=!1;const J=function(ee){N=N||ee,m--,0==m&&o(N)};l.forEach(function(ee){ee.whenStable(J)})})}findTestabilityInTree(e,n,o){if(null==n)return null;return e.getTestability(n)??(o?Qu().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},deps:[]},{provide:xM,useClass:df,deps:[Xo,hf,e1]},{provide:df,useClass:df,deps:[Xo,hf,e1]}],j4=[{provide:Mw,useValue:"root"},{provide:A0,useFactory:function zk(){return new A0},deps:[]},{provide:vy,useClass:X0,multi:!0,deps:[Mi,Xo,MA]},{provide:vy,useClass:xa,multi:!0,deps:[Mi]},{provide:mf,useClass:mf,deps:[ol,$u,K0,x4]},{provide:bS,useExisting:mf},{provide:Gd,useExisting:$u},{provide:$u,useClass:$u,deps:[Mi]},{provide:ol,useClass:ol,deps:[vy,Xo]},{provide:class YR{},useClass:q0,deps:[]},[]];class vf{constructor(e){false}static withServerTransition(e){return{ngModule:vf,providers:[{provide:K0,useValue:e.appId},{provide:M4,useExisting:K0},Nk]}}}vf.\u0275fac=function(e){return new(e||vf)(Gn(F4,12))},vf.\u0275mod=cs({type:vf}),vf.\u0275inj=Ri({providers:[...j4,...B4],imports:[J0,V0]});class by{constructor(e){this._doc=e,this._dom=Qu()}addTag(e,n=!1){return e?this._getOrCreateElement(e,n):null}addTags(e,n=!1){return e?e.reduce((o,l)=>(l&&o.push(this._getOrCreateElement(l,n)),o),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const n=this._doc.querySelectorAll(`meta[${e}]`);return n?[].slice.call(n):[]}updateTag(e,n){if(!e)return null;n=n||this._parseSelector(e);const o=this.getTag(n);return o?this._setMetaElementAttributes(e,o):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,n=!1){if(!n){const m=this._parseSelector(e),N=this.getTags(m).filter(J=>this._containsAttributes(e,J))[0];if(void 0!==N)return N}const o=this._dom.createElement("meta");return this._setMetaElementAttributes(e,o),this._doc.getElementsByTagName("head")[0].appendChild(o),o}_setMetaElementAttributes(e,n){return Object.keys(e).forEach(o=>n.setAttribute(this._getMetaKeyMap(o),e[o])),n}_parseSelector(e){const n=e.name?"name":"property";return`${n}="${e[n]}"`}_containsAttributes(e,n){return Object.keys(e).every(o=>n.getAttribute(this._getMetaKeyMap(o))===e[o])}_getMetaKeyMap(e){return Yk[e]||e}}by.\u0275fac=function(e){return new(e||by)(Gn(Mi))},by.\u0275prov=Tn({token:by,factory:function(e){let n=null;return n=e?new e:function Zk(){return new by(Gn(Mi))}(),n},providedIn:"root"});const Yk={httpEquiv:"http-equiv"};class wy{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}wy.\u0275fac=function(e){return new(e||wy)(Gn(Mi))},wy.\u0275prov=Tn({token:wy,factory:function(e){let n=null;return n=e?new e:function Jk(){return new wy(Gn(Mi))}(),n},providedIn:"root"});typeof window<"u"&&window;class Ay{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function $k(t,e){const n=t.getElementById(e+"-state");let o={};if(n&&n.textContent)try{o=JSON.parse(function Xk(t){const e={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return t.replace(/&[^;]+;/g,n=>e[n])}(n.textContent))}catch(l){console.warn("Exception while restoring TransferState for app "+e,l)}return o}(ki(Mi),ki(K0))}get(e,n){return void 0!==this.store[e]?this.store[e]:n}set(e,n){this.store[e]=n}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,n){this.onSerializeCallbacks[e]=n}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store)}}Ay.\u0275fac=function(e){return new(e||Ay)},Ay.\u0275prov=Tn({token:Ay,factory:Ay.\u0275fac,providedIn:"root"});class Ey{}Ey.\u0275fac=function(e){return new(e||Ey)},Ey.\u0275mod=cs({type:Ey}),Ey.\u0275inj=Ri({});const tL={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},c2=new $n("HammerGestureConfig"),V4=new $n("HammerLoader");class $0{constructor(){this.events=[],this.overrides={}}buildHammer(e){const n=new Hammer(e,this.options);n.get("pinch").set({enable:!0}),n.get("rotate").set({enable:!0});for(const o in this.overrides)n.get(o).set(this.overrides[o]);return n}}$0.\u0275fac=function(e){return new(e||$0)},$0.\u0275prov=Tn({token:$0,factory:$0.\u0275fac});class ep extends n2{constructor(e,n,o,l){super(e),this._config=n,this.console=o,this.loader=l,this._loaderPromise=null}supports(e){return!(!tL.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,n,o){const l=this.manager.getZone();if(n=n.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||l.runOutsideAngular(()=>this.loader());let m=!1,N=()=>{m=!0};return l.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?m||(N=this.addEventListener(e,n,o)):N=()=>{}}).catch(()=>{N=()=>{}})),()=>{N()}}return l.runOutsideAngular(()=>{const m=this._config.buildHammer(e),N=function(J){l.runGuarded(function(){o(J)})};return m.on(n,N),()=>{m.off(n,N),"function"==typeof m.destroy&&m.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}ep.\u0275fac=function(e){return new(e||ep)(Gn(Mi),Gn(c2),Gn(xd),Gn(V4,8))},ep.\u0275prov=Tn({token:ep,factory:ep.\u0275fac});class Sy{}Sy.\u0275fac=function(e){return new(e||Sy)},Sy.\u0275mod=cs({type:Sy}),Sy.\u0275inj=Ri({providers:[{provide:vy,useClass:ep,multi:!0,deps:[Mi,c2,xd,[new jc,V4]]},{provide:c2,useClass:$0,deps:[]}]});class tp{}tp.\u0275fac=function(e){return new(e||tp)},tp.\u0275prov=Tn({token:tp,factory:function(e){let n=null;return n=e?new(e||tp):Gn(np),n},providedIn:"root"});class np extends tp{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case $s.NONE:return n;case $s.HTML:return rt(n,"HTML")?He(n):iS(this._doc,String(n)).toString();case $s.STYLE:return rt(n,"Style")?He(n):n;case $s.SCRIPT:if(rt(n,"Script"))return He(n);throw new Error("unsafe value used in a script context");case $s.URL:return rt(n,"URL")?He(n):Nt(String(n));case $s.RESOURCE_URL:if(rt(n,"ResourceURL"))return He(n);throw new Error(`unsafe value used in a resource URL context (see ${ss})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${ss})`)}}bypassSecurityTrustHtml(e){return function Ft(t){return new H(t)}(e)}bypassSecurityTrustStyle(e){return function cn(t){return new re(t)}(e)}bypassSecurityTrustScript(e){return function gn(t){return new le(t)}(e)}bypassSecurityTrustUrl(e){return function an(t){return new Me(t)}(e)}bypassSecurityTrustResourceUrl(e){return function Mn(t){return new Oe(t)}(e)}}np.\u0275fac=function(e){return new(e||np)(Gn(Mi))},np.\u0275prov=Tn({token:np,factory:function(e){let n=null;return n=e?new e:function nL(t){return new np(t.get(Mi))}(Gn(Qo)),n},providedIn:"root"});new Tv("15.2.9");const{isArray:rL}=Array,{getPrototypeOf:iL,prototype:oL,keys:sL}=Object;function aL(t){if(1===t.length){const e=t[0];if(rL(e))return{args:e,keys:null};if(function uL(t){return t&&"object"==typeof t&&iL(t)===oL}(e)){const n=sL(e);return{args:n.map(o=>e[o]),keys:n}}}return{args:t,keys:null}}const{isArray:cL}=Array;function fL(t){return tt(e=>function lL(t,e){return cL(e)?t(...e):t(e)}(t,e))}function dL(t,e){return t.reduce((n,o,l)=>(n[o]=e[l],n),{})}function hL(...t){const e=function Dn(t){return F(sn(t))?t.pop():void 0}(t),{args:n,keys:o}=aL(t),l=new pe(m=>{const{length:N}=n;if(!N)return void m.complete();const J=new Array(N);let ee=N,oe=N;for(let ue=0;ue{ge||(ge=!0,oe--),J[ue]=Ie},()=>ee--,void 0,()=>{(!ee||!ge)&&(oe||m.next(o?dL(o,J):J),m.complete())}))}});return e?l.pipe(fL(e)):l}class rp{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}rp.\u0275fac=function(e){return new(e||rp)(bn(Jc),bn(ea))},rp.\u0275dir=nr({type:rp});class Da extends rp{}Da.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Da)))(n||Da)}}(),Da.\u0275dir=nr({type:Da,features:[Qr]});const ec=new $n("NgValueAccessor"),pL={provide:ec,useExisting:br(()=>Zd),multi:!0};class Zd extends Da{writeValue(e){this.setProperty("checked",e)}}Zd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Zd)))(n||Zd)}}(),Zd.\u0275dir=nr({type:Zd,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,n){1&e&&ji("change",function(l){return n.onChange(l.target.checked)})("blur",function(){return n.onTouched()})},features:[_i([pL]),Qr]});const gL={provide:ec,useExisting:br(()=>Yd),multi:!0};const mL=new $n("CompositionEventMode");class Yd extends rp{constructor(e,n,o){super(e,n),this._compositionMode=o,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function yL(){const t=Qu()?Qu().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}Yd.\u0275fac=function(e){return new(e||Yd)(bn(Jc),bn(ea),bn(mL,8))},Yd.\u0275dir=nr({type:Yd,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&ji("input",function(l){return n._handleInput(l.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(l){return n._compositionEnd(l.target.value)})},features:[_i([gL]),Qr]});const vL=!1;function wf(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function H4(t){return null!=t&&"number"==typeof t.length}const es=new $n("NgValidators"),Af=new $n("NgAsyncValidators"),bL=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function z4(t){return e=>{if(wf(e.value)||wf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(wf(e.value)||wf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function G4(t){return wf(t.value)?{required:!0}:null}function Z4(t){return!0===t.value?null:{required:!0}}function Y4(t){return wf(t.value)||bL.test(t.value)?null:{email:!0}}function J4(t){return e=>wf(e.value)||!H4(e.value)?null:e.value.lengthH4(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function q4(t){if(!t)return m1;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),o=>{if(wf(o.value))return null;const l=o.value;return e.test(l)?null:{pattern:{requiredPattern:n,actualValue:l}}}}function m1(t){return null}function X4(t){return null!=t}function $4(t){const e=Kv(t)?cr(t):t;if(vL&&!p6(e)){let n="Expected async validator to return Promise or Observable.";throw"object"==typeof t&&(n+=" Are you using a synchronous validator where an async validator is expected?"),new dn(-1101,n)}return e}function e5(t){let e={};return t.forEach(n=>{e=null!=n?{...e,...n}:e}),0===Object.keys(e).length?null:e}function t5(t,e){return e.map(n=>n(t))}function n5(t){return t.map(e=>function wL(t){return!t.validate}(e)?e:n=>e.validate(n))}function r5(t){if(!t)return null;const e=t.filter(X4);return 0==e.length?null:function(n){return e5(t5(n,e))}}function l2(t){return null!=t?r5(n5(t)):null}function i5(t){if(!t)return null;const e=t.filter(X4);return 0==e.length?null:function(n){return hL(t5(n,e).map($4)).pipe(tt(e5))}}function f2(t){return null!=t?i5(n5(t)):null}function o5(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function s5(t){return t._rawValidators}function a5(t){return t._rawAsyncValidators}function d2(t){return t?Array.isArray(t)?t:[t]:[]}function v1(t,e){return Array.isArray(t)?t.includes(e):t===e}function u5(t,e){const n=d2(e);return d2(t).forEach(l=>{v1(n,l)||n.push(l)}),n}function c5(t,e){return d2(e).filter(n=>!v1(t,n))}class l5{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=l2(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=f2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,n){return!!this.control&&this.control.hasError(e,n)}getError(e,n){return this.control?this.control.getError(e,n):null}}class bs extends l5{get formDirective(){return null}get path(){return null}}class Ef extends l5{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class f5{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class _y extends f5{constructor(e){super(e)}}_y.\u0275fac=function(e){return new(e||_y)(bn(Ef,2))},_y.\u0275dir=nr({type:_y,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&Hv("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},features:[Qr]});class ip extends f5{constructor(e){super(e)}}ip.\u0275fac=function(e){return new(e||ip)(bn(bs,10))},ip.\u0275dir=nr({type:ip,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&Hv("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},features:[Qr]});function d5(t,e){return t?`with name: '${e}'`:`at index: ${e}`}const g2=!1,My="VALID",w1="INVALID",op="PENDING",Iy="DISABLED";function y2(t){return(A1(t)?t.validators:t)||null}function m2(t,e){return(A1(e)?e.asyncValidators:t)||null}function A1(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function h5(t,e,n){const o=t.controls;if(!(e?Object.keys(o):o).length)throw new dn(1e3,g2?function _L(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!o[n])throw new dn(1001,g2?function ML(t,e){return`Cannot find form control ${d5(t,e)}`}(e,n):"")}function p5(t,e,n){t._forEachChild((o,l)=>{if(void 0===n[l])throw new dn(1002,g2?function IL(t,e){return`Must supply a value for form control ${d5(t,e)}`}(e,l):"")})}class E1{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===My}get invalid(){return this.status===w1}get pending(){return this.status==op}get disabled(){return this.status===Iy}get enabled(){return this.status!==Iy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(u5(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(u5(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(c5(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(c5(e,this._rawAsyncValidators))}hasValidator(e){return v1(this._rawValidators,e)}hasAsyncValidator(e){return v1(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=op,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Iy,this.errors=null,this._forEachChild(o=>{o.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(o=>o(!0))}enable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=My,this._forEachChild(o=>{o.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(o=>o(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===My||this.status===op)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Iy:My}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=op,this._hasOwnPendingAsyncValidator=!0;const n=$4(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(o,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(!1!==n.emitEvent)}get(e){let n=e;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((o,l)=>o&&o._find(l),this)}getError(e,n){const o=n?this.get(n):this;return o&&o.errors?o.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new wo,this.statusChanges=new wo}_calculateStatus(){return this._allControlsDisabled()?Iy:this.errors?w1:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(op)?op:this._anyControlsHaveStatus(w1)?w1:My}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){A1(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function CL(t){return Array.isArray(t)?l2(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function xL(t){return Array.isArray(t)?f2(t):t||null}(this._rawAsyncValidators)}}class Cy extends E1{constructor(e,n,o){super(y2(n),m2(o,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,o={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:o.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,o={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:o.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){p5(this,!0,e),Object.keys(e).forEach(o=>{h5(this,!0,o),this.controls[o].setValue(e[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(Object.keys(e).forEach(o=>{const l=this.controls[o];l&&l.patchValue(e[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((o,l)=>{o.reset(e[l],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,o)=>(e[o]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,o)=>!!o._syncPendingControls()||n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{const o=this.controls[n];o&&e(o,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[n,o]of Object.entries(this.controls))if(this.contains(n)&&e(o))return!0;return!1}_reduceValue(){return this._reduceChildren({},(n,o,l)=>((o.enabled||this.disabled)&&(n[l]=o.value),n))}_reduceChildren(e,n){let o=e;return this._forEachChild((l,m)=>{o=n(o,l,m)}),o}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class g5 extends Cy{}const Jd=new $n("CallSetDisabledState",{providedIn:"root",factory:()=>xy}),xy="always";function S1(t,e){return[...e.path,t]}function Dy(t,e,n=xy){v2(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===n)&&e.valueAccessor.setDisabledState?.(t.disabled),function TL(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&y5(t,e)})}(t,e),function NL(t,e){const n=(o,l)=>{e.valueAccessor.writeValue(o),l&&e.viewToModelUpdate(o)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function OL(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&y5(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function DL(t,e){if(e.valueAccessor.setDisabledState){const n=o=>{e.valueAccessor.setDisabledState(o)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function _1(t,e,n=!0){const o=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(o),e.valueAccessor.registerOnTouched(o)),I1(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function M1(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function v2(t,e){const n=s5(t);null!==e.validator?t.setValidators(o5(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const o=a5(t);null!==e.asyncValidator?t.setAsyncValidators(o5(o,e.asyncValidator)):"function"==typeof o&&t.setAsyncValidators([o]);const l=()=>t.updateValueAndValidity();M1(e._rawValidators,l),M1(e._rawAsyncValidators,l)}function I1(t,e){let n=!1;if(null!==t){if(null!==e.validator){const l=s5(t);if(Array.isArray(l)&&l.length>0){const m=l.filter(N=>N!==e.validator);m.length!==l.length&&(n=!0,t.setValidators(m))}}if(null!==e.asyncValidator){const l=a5(t);if(Array.isArray(l)&&l.length>0){const m=l.filter(N=>N!==e.asyncValidator);m.length!==l.length&&(n=!0,t.setAsyncValidators(m))}}}const o=()=>{};return M1(e._rawValidators,o),M1(e._rawAsyncValidators,o),n}function y5(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function m5(t,e){v2(t,e)}function w2(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}function v5(t,e){t._syncPendingControls(),e.forEach(n=>{const o=n.control;"submit"===o.updateOn&&o._pendingChange&&(n.viewToModelUpdate(o._pendingValue),o._pendingChange=!1)})}function A2(t,e){if(!e)return null;let n,o,l;return Array.isArray(e),e.forEach(m=>{m.constructor===Yd?n=m:function kL(t){return Object.getPrototypeOf(t.constructor)===Da}(m)?o=m:l=m}),l||o||n||null}const FL={provide:bs,useExisting:br(()=>Sf)},Ty=Promise.resolve();class Sf extends bs{constructor(e,n,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._directives=new Set,this.ngSubmit=new wo,this.form=new Cy({},l2(e),f2(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Ty.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Dy(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Ty.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Ty.then(()=>{const n=this._findContainer(e.path),o=new Cy({});m5(o,e),n.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Ty.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){Ty.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,v5(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}function b5(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function w5(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}Sf.\u0275fac=function(e){return new(e||Sf)(bn(es,10),bn(Af,10),bn(Jd,8))},Sf.\u0275dir=nr({type:Sf,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&ji("submit",function(l){return n.onSubmit(l)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_i([FL]),Qr]});const Oy=class extends E1{constructor(e=null,n,o){super(y2(n),m2(o,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),A1(n)&&(n.nonNullable||n.initialValueIsDefault)&&(w5(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(o=>o(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){b5(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){b5(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){w5(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class Qd extends bs{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return S1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}Qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Qd)))(n||Qd)}}(),Qd.\u0275dir=nr({type:Qd,features:[Qr]});const jL={provide:bs,useExisting:br(()=>_f)};class _f extends Qd{constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){!(this._parent instanceof _f)&&this._parent}}_f.\u0275fac=function(e){return new(e||_f)(bn(bs,5),bn(es,10),bn(Af,10))},_f.\u0275dir=nr({type:_f,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[_i([jL]),Qr]});const UL={provide:Ef,useExisting:br(()=>sp)},A5=Promise.resolve();class sp extends Ef{constructor(e,n,o,l,m,N){super(),this._changeDetectorRef=m,this.callSetDisabledState=N,this.control=new Oy,this._registered=!1,this.update=new wo,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=A2(0,l)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),w2(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Dy(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){A5.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,o=0!==n&&FA(n);A5.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?S1(e,this._parent):[e]}}sp.\u0275fac=function(e){return new(e||sp)(bn(bs,9),bn(es,10),bn(Af,10),bn(ec,10),bn(NA,8),bn(Jd,8))},sp.\u0275dir=nr({type:sp,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[_i([UL]),Qr,Ts]});class ap{}ap.\u0275fac=function(e){return new(e||ap)},ap.\u0275dir=nr({type:ap,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const KL={provide:ec,useExisting:br(()=>qd),multi:!0};class qd extends Da{writeValue(e){const n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(qd)))(n||qd)}}(),qd.\u0275dir=nr({type:qd,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&ji("input",function(l){return n.onChange(l.target.value)})("blur",function(){return n.onTouched()})},features:[_i([KL]),Qr]});const VL={provide:ec,useExisting:br(()=>cp),multi:!0};class Xd{}Xd.\u0275fac=function(e){return new(e||Xd)},Xd.\u0275mod=cs({type:Xd}),Xd.\u0275inj=Ri({});class up{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e)return void this._accessors.splice(n,1)}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return!!e[0].control&&(e[0]._parent===n._control._parent&&e[1].name===n.name)}}up.\u0275fac=function(e){return new(e||up)},up.\u0275prov=Tn({token:up,factory:up.\u0275fac,providedIn:Xd});class cp extends Da{constructor(e,n,o,l){super(e,n),this._registry=o,this._injector=l,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=ki(Jd,{optional:!0})??xy}ngOnInit(){this._control=this._injector.get(Ef),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}cp.\u0275fac=function(e){return new(e||cp)(bn(Jc),bn(ea),bn(up),bn(Qo))},cp.\u0275dir=nr({type:cp,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,n){1&e&&ji("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[_i([VL]),Qr]});const HL={provide:ec,useExisting:br(()=>$d),multi:!0};class $d extends Da{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}$d.\u0275fac=function(){let t;return function(n){return(t||(t=Wi($d)))(n||$d)}}(),$d.\u0275dir=nr({type:$d,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,n){1&e&&ji("change",function(l){return n.onChange(l.target.value)})("input",function(l){return n.onChange(l.target.value)})("blur",function(){return n.onTouched()})},features:[_i([HL]),Qr]});const E2=new $n("NgModelWithFormControlWarning"),zL={provide:Ef,useExisting:br(()=>eh)};class eh extends Ef{set isDisabled(e){}constructor(e,n,o,l,m){super(),this._ngModelWarningConfig=l,this.callSetDisabledState=m,this.update=new wo,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=A2(0,o)}ngOnChanges(e){if(this._isControlChanged(e)){const n=e.form.previousValue;n&&_1(n,this,!1),Dy(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}w2(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&_1(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}eh._ngModelWarningSentOnce=!1,eh.\u0275fac=function(e){return new(e||eh)(bn(es,10),bn(Af,10),bn(ec,10),bn(E2,8),bn(Jd,8))},eh.\u0275dir=nr({type:eh,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[_i([zL]),Qr,Ts]});const WL={provide:bs,useExisting:br(()=>th)};class th extends bs{constructor(e,n,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new wo,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(I1(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const n=this.form.get(e.path);return Dy(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){_1(e.control||null,e,!1),function LL(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this.submitted=!0,v5(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const n=e.control,o=this.form.get(e.path);n!==o&&(_1(n||null,e),(t=>t instanceof Oy)(o)&&(Dy(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);m5(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function PL(t,e){return I1(t,e)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){v2(this.form,this),this._oldForm&&I1(this._oldForm,this)}_checkFormPresent(){this.form}}th.\u0275fac=function(e){return new(e||th)(bn(es,10),bn(Af,10),bn(Jd,8))},th.\u0275dir=nr({type:th,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&ji("submit",function(l){return n.onSubmit(l)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_i([WL]),Qr,Ts]});const GL={provide:bs,useExisting:br(()=>nh)};class nh extends Qd{constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){E5(this._parent)}}nh.\u0275fac=function(e){return new(e||nh)(bn(bs,13),bn(es,10),bn(Af,10))},nh.\u0275dir=nr({type:nh,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[_i([GL]),Qr]});const ZL={provide:bs,useExisting:br(()=>rh)};class rh extends bs{constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return S1(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){E5(this._parent)}}function E5(t){return!(t instanceof nh||t instanceof th||t instanceof rh)}rh.\u0275fac=function(e){return new(e||rh)(bn(bs,13),bn(es,10),bn(Af,10))},rh.\u0275dir=nr({type:rh,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[_i([ZL]),Qr]});const YL={provide:Ef,useExisting:br(()=>ih)};class ih extends Ef{set isDisabled(e){}constructor(e,n,o,l,m){super(),this._ngModelWarningConfig=m,this._added=!1,this.update=new wo,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=A2(0,l)}ngOnChanges(e){this._added||this._setUpControl(),w2(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return S1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}ih._ngModelWarningSentOnce=!1,ih.\u0275fac=function(e){return new(e||ih)(bn(bs,13),bn(es,10),bn(Af,10),bn(ec,10),bn(E2,8))},ih.\u0275dir=nr({type:ih,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[_i([YL]),Qr,Ts]});const JL={provide:ec,useExisting:br(()=>Mf),multi:!0};function S5(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Mf extends Da{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const o=S5(this._getOptionId(e),e);this.setProperty("value",o)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const n of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){const n=function QL(t){return t.split(":")[0]}(e);return this._optionMap.has(n)?this._optionMap.get(n):e}}Mf.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Mf)))(n||Mf)}}(),Mf.\u0275dir=nr({type:Mf,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,n){1&e&&ji("change",function(l){return n.onChange(l.target.value)})("blur",function(){return n.onTouched()})},inputs:{compareWith:"compareWith"},features:[_i([JL]),Qr]});class Ny{constructor(e,n,o){this._element=e,this._renderer=n,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(S5(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}Ny.\u0275fac=function(e){return new(e||Ny)(bn(ea),bn(Jc),bn(Mf,9))},Ny.\u0275dir=nr({type:Ny,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const qL={provide:ec,useExisting:br(()=>If),multi:!0};function _5(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class If extends Da{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let n;if(this.value=e,Array.isArray(e)){const o=e.map(l=>this._getOptionId(l));n=(l,m)=>{l._setSelected(o.indexOf(m.toString())>-1)}}else n=(o,l)=>{o._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{const o=[],l=n.selectedOptions;if(void 0!==l){const m=l;for(let N=0;Noh),multi:!0};class oh extends au{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>I5(e),this.createValidator=e=>W4(e)}}oh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(oh)))(n||oh)}}(),oh.\u0275dir=nr({type:oh,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[_i([$L]),Qr]});const eF={provide:es,useExisting:br(()=>sh),multi:!0};class sh extends au{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>I5(e),this.createValidator=e=>z4(e)}}sh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(sh)))(n||sh)}}(),sh.\u0275dir=nr({type:sh,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[_i([eF]),Qr]});const tF={provide:es,useExisting:br(()=>Cf),multi:!0},nF={provide:es,useExisting:br(()=>ah),multi:!0};class Cf extends au{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=FA,this.createValidator=e=>G4}enabled(e){return e}}Cf.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Cf)))(n||Cf)}}(),Cf.\u0275dir=nr({type:Cf,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("required",n._enabled?"":null)},inputs:{required:"required"},features:[_i([tF]),Qr]});class ah extends Cf{constructor(){super(...arguments),this.createValidator=e=>Z4}}ah.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(ah)))(n||ah)}}(),ah.\u0275dir=nr({type:ah,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("required",n._enabled?"":null)},features:[_i([nF]),Qr]});const rF={provide:es,useExisting:br(()=>uh),multi:!0};class uh extends au{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=FA,this.createValidator=e=>Y4}enabled(e){return e}}uh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(uh)))(n||uh)}}(),uh.\u0275dir=nr({type:uh,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[_i([rF]),Qr]});const iF={provide:es,useExisting:br(()=>ch),multi:!0};class ch extends au{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>M5(e),this.createValidator=e=>J4(e)}}ch.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(ch)))(n||ch)}}(),ch.\u0275dir=nr({type:ch,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[_i([iF]),Qr]});const oF={provide:es,useExisting:br(()=>lh),multi:!0};class lh extends au{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>M5(e),this.createValidator=e=>Q4(e)}}lh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(lh)))(n||lh)}}(),lh.\u0275dir=nr({type:lh,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[_i([oF]),Qr]});const sF={provide:es,useExisting:br(()=>fh),multi:!0};class fh extends au{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>q4(e)}}fh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(fh)))(n||fh)}}(),fh.\u0275dir=nr({type:fh,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&Xc("pattern",n._enabled?n.pattern:null)},inputs:{pattern:"pattern"},features:[_i([sF]),Qr]});class dh{}dh.\u0275fac=function(e){return new(e||dh)},dh.\u0275mod=cs({type:dh}),dh.\u0275inj=Ri({imports:[Xd]});class C5 extends E1{constructor(e,n,o){super(y2(n),m2(o,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,o={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:o.emitEvent})}removeAt(e,n={}){let o=this._adjustIndex(e);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,o={}){let l=this._adjustIndex(e);l<0&&(l=0),this.controls[l]&&this.controls[l]._registerOnCollectionChange(()=>{}),this.controls.splice(l,1),n&&(this.controls.splice(l,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:o.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){p5(this,!1,e),e.forEach((o,l)=>{h5(this,!1,l),this.at(l).setValue(o,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(e.forEach((o,l)=>{this.at(l)&&this.at(l).patchValue(o,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((o,l)=>{o.reset(e[l],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((n,o)=>!!o._syncPendingControls()||n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((n,o)=>{e(n,o)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function x5(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class sl{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new sl;return e.useNonNullable=!0,e}group(e,n=null){const o=this._reduceControls(e);let l={};return x5(n)?l=n:null!==n&&(l.validators=n.validator,l.asyncValidators=n.asyncValidator),new Cy(o,l)}record(e,n=null){const o=this._reduceControls(e);return new g5(o,n)}control(e,n,o){let l={};return this.useNonNullable?(x5(n)?l=n:(l.validators=n,l.asyncValidators=o),new Oy(e,{...l,nonNullable:!0})):new Oy(e,n,o)}array(e,n,o){const l=e.map(m=>this._createControl(m));return new C5(l,n,o)}_reduceControls(e){const n={};return Object.keys(e).forEach(o=>{n[o]=this._createControl(e[o])}),n}_createControl(e){if(e instanceof Oy)return e;if(e instanceof E1)return e;if(Array.isArray(e)){const n=e[0],o=e.length>1?e[1]:null,l=e.length>2?e[2]:null;return this.control(n,o,l)}return this.control(e)}}sl.\u0275fac=function(e){return new(e||sl)},sl.\u0275prov=Tn({token:sl,factory:sl.\u0275fac,providedIn:"root"});class C1{}C1.\u0275fac=function(e){return new(e||C1)},C1.\u0275prov=Tn({token:C1,factory:function(){return ki(sl).nonNullable},providedIn:"root"});class lp extends sl{group(e,n=null){return super.group(e,n)}control(e,n,o){return super.control(e,n,o)}array(e,n,o){return super.array(e,n,o)}}lp.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(lp)))(n||lp)}}(),lp.\u0275prov=Tn({token:lp,factory:lp.\u0275fac,providedIn:"root"});new Tv("15.2.9");class xf{static withConfig(e){return{ngModule:xf,providers:[{provide:Jd,useValue:e.callSetDisabledState??xy}]}}}xf.\u0275fac=function(e){return new(e||xf)},xf.\u0275mod=cs({type:xf}),xf.\u0275inj=Ri({imports:[dh]});class hh{static withConfig(e){return{ngModule:hh,providers:[{provide:E2,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Jd,useValue:e.callSetDisabledState??xy}]}}}hh.\u0275fac=function(e){return new(e||hh)},hh.\u0275mod=cs({type:hh}),hh.\u0275inj=Ri({imports:[dh]});var Le=y(49671),Zn=y(71836);class aF{constructor(e){this.provider=new Zn.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:n}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:n})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class Ry{constructor(e,n){this.storage=e,this.namespace=Array.isArray(n)?n.join(":"):n}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(n=>"string"==typeof n?JSON.parse(n):null)}setItem(e,n){return this.storage.setItem(this.resolveKey(e),JSON.stringify(n))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}class uF{getItem(e){return new Promise(n=>{n(localStorage.getItem(e))})}setItem(e,n){return new Promise(o=>{localStorage.setItem(e,n),o()})}removeItem(e){return new Promise(n=>{localStorage.removeItem(e),n()})}}class fp{constructor(e){this.namespace=e}emit(e,...n){if(fp.debug){if(this.namespace&&"error"!==e)return void console[e](this.namespace,...n);console[e](...n)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}fp.debug=!1;const tc=new fp;var uu=y(59069),S2=y.n(uu);class _2{constructor(){this.emitter=new uu.EventEmitter}on(e,n){return this.emitter.on(e,n),{remove:()=>this.emitter.off(e,n)}}off(e,n){this.emitter.off(e,n)}emit(e,n){this.emitter.emit(e,n)}}const ky="near-wallet-selector",Ly="recentlySignedInWallets",T5="contract",M2="contract:pending",O5="selectedWalletId",I2="selectedWalletId:pending";class cF{constructor({factories:e,storage:n,options:o,store:l,emitter:m,provider:N}){this.factories=e,this.storage=n,this.options=o,this.store=l,this.emitter=m,this.provider=N,this.modules=[],this.instances={}}validateWallet(e){var n=this;return(0,Le.Z)(function*(){let o=[];const l=yield n.getWallet(e);return l&&(o=yield l.getAccounts().catch(m=>(tc.log(`Failed to validate ${l.id} during setup`),tc.error(m),[]))),o})()}resolveStorageState(){var e=this;return(0,Le.Z)(function*(){const n=new Ry(e.storage,ky),o=yield n.getItem(I2),l=yield n.getItem(M2);if(o&&l){const oe=yield e.validateWallet(o);if(yield n.removeItem(I2),yield n.removeItem(M2),oe.length){const{selectedWalletId:ue}=e.store.getState(),ge=yield e.getWallet(ue);ge&&o!==ue&&(yield ge.signOut().catch(Re=>{tc.log("Failed to sign out existing wallet"),tc.error(Re)}));return{accounts:oe,contract:l,selectedWalletId:o,recentlySignedInWallets:yield e.setWalletAsRecentlySignedIn(o)}}}const{contract:m,selectedWalletId:N}=e.store.getState(),J=yield e.validateWallet(N),ee=yield n.getItem(Ly);return J.length?{accounts:J,contract:m,selectedWalletId:N,recentlySignedInWallets:ee||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:ee||[]}})()}setWalletAsRecentlySignedIn(e){var n=this;return(0,Le.Z)(function*(){const o=new Ry(n.storage,ky);let l=yield o.getItem(Ly);return l||(l=[]),l.includes(e)||(l.unshift(e),l=l.slice(0,5),yield o.setItem(Ly,l)),l})()}signOutWallet(e){var n=this;return(0,Le.Z)(function*(){const o=yield n.getWallet(e);yield o.signOut().catch(l=>{tc.log(`Failed to sign out ${o.id}`),tc.error(l),n.onWalletSignedOut(o.id)})})()}onWalletSignedIn(e,{accounts:n,contractId:o,methodNames:l}){var m=this;return(0,Le.Z)(function*(){const{selectedWalletId:N}=m.store.getState(),J=new Ry(m.storage,ky),ee={contractId:o,methodNames:l};if(!n.length)return void("browser"===m.getModule(e).type&&(yield J.setItem(I2,e),yield J.setItem(M2,ee)));N&&N!==e&&(yield m.signOutWallet(N));const oe=yield m.setWalletAsRecentlySignedIn(e);m.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:ee,accounts:n,recentlySignedInWallets:oe}}),m.emitter.emit("signedIn",{walletId:e,contractId:o,methodNames:l,accounts:n})})()}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){var n=this;const o=new _2;return o.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),o.on("signedIn",l=>{this.onWalletSignedIn(e.id,l)}),o.on("accountsChanged",function(){var l=(0,Le.Z)(function*({accounts:m}){if(n.emitter.emit("accountsChanged",{walletId:e.id,accounts:m}),!m.length)return n.signOutWallet(e.id);n.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:m}})});return function(m){return l.apply(this,arguments)}}()),o.on("networkChanged",({networkId:l})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:l})}),o.on("uriChanged",({uri:l})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:l})}),o}validateSignMessageParams({message:e,nonce:n,recipient:o}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(n)||32!==n.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!o||""===o.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){var n=this;const o=e.signIn,l=e.signOut,m=e.signMessage;return e.signIn=function(){var N=(0,Le.Z)(function*(J){const ee=yield o(J),{contractId:oe,methodNames:ue=[]}=J;return yield n.onWalletSignedIn(e.id,{accounts:ee,contractId:oe,methodNames:ue}),ee});return function(J){return N.apply(this,arguments)}}(),e.signOut=(0,Le.Z)(function*(){yield l(),n.onWalletSignedOut(e.id)}),e.signMessage=function(){var N=(0,Le.Z)(function*(J){if(void 0===m)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return n.validateSignMessageParams(J),yield m(J)});return function(J){return N.apply(this,arguments)}}(),e}setupInstance(e){var n=this;return(0,Le.Z)(function*(){if(!e.metadata.available){const l="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${l}`)}const o={id:e.id,type:e.type,metadata:e.metadata,...yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:n.options,store:n.store.toReadOnly(),provider:n.provider,emitter:n.setupWalletEmitter(e),logger:new fp(e.id),storage:new Ry(n.storage,[ky,e.id])})};return n.decorateWallet(o)})()}getModule(e){return this.modules.find(n=>n.id===e)}getWallet(e){var n=this;return(0,Le.Z)(function*(){const o=n.getModule(e);if(!o)return null;const{selectedWalletId:l}=n.store.getState();return!o.metadata.available&&l?(n.onWalletSignedOut(l),null):yield o.wallet()})()}setup(){var e=this;return(0,Le.Z)(function*(){const n=[];for(let J=0;J(tc.log("Failed to setup module"),tc.error(oe),null));ee&&(n.some(oe=>oe.id===ee.id)||n.push({id:ee.id,type:ee.type,metadata:ee.metadata,wallet:function(){var oe=(0,Le.Z)(function*(){let ue=e.instances[ee.id];return ue||(ue=yield e.setupInstance(ee),e.instances[ee.id]=ue,ue)});return function(){return oe.apply(this,arguments)}}()}))}e.modules=n;const{accounts:o,contract:l,selectedWalletId:m,recentlySignedInWallets:N}=yield e.resolveStorageState();e.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:n,accounts:o,contract:l,selectedWalletId:m,recentlySignedInWallets:N}});for(let J=0;J"string"==typeof t?(t=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:t,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${t}'`)}})(t):t;class hF extends Fe{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){const{hasError:e,thrownError:n,_value:o}=this;if(e)throw n;return this._throwIfClosed(),o}next(e){super.next(this._value=e)}}function gF(t,e){return Ve(function pF(t,e,n,o,l){return(m,N)=>{let J=n,ee=e,oe=0;m.subscribe(Ut(N,ue=>{const ge=oe++;ee=J?t(ee,ue,ge):(J=!0,ue),o&&N.next(ee)},l&&(()=>{J&&N.next(ee),N.complete()})))}}(t,e,arguments.length>=2,!0))}const yF=(t,e)=>{switch(tc.log("Store Action",e),e.type){case"SETUP_WALLET_MODULES":{const{modules:n,accounts:o,contract:l,selectedWalletId:m,recentlySignedInWallets:N}=e.payload,J=o.map((ee,oe)=>({...ee,active:0===oe}));return{...t,modules:n,accounts:J,contract:l,selectedWalletId:m,recentlySignedInWallets:N}}case"WALLET_CONNECTED":{const{walletId:n,contract:o,accounts:l,recentlySignedInWallets:m}=e.payload;if(!l.length)return t;const N=t.accounts.findIndex(ee=>ee.active),J=l.map((ee,oe)=>({...ee,active:oe===(N>-1?N:0)}));return{...t,contract:o,accounts:J,selectedWalletId:n,recentlySignedInWallets:m}}case"WALLET_DISCONNECTED":{const{walletId:n}=e.payload;return n!==t.selectedWalletId?t:{...t,contract:null,accounts:[],selectedWalletId:null}}case"ACCOUNTS_CHANGED":{const{walletId:n,accounts:o}=e.payload;if(n!==t.selectedWalletId)return t;const l=t.accounts.find(J=>J.active),m=!o.some(J=>J.accountId===l?.accountId),N=o.map((J,ee)=>({...J,active:m?0===ee:J.accountId===l?.accountId}));return{...t,accounts:N}}case"SET_ACTIVE_ACCOUNT":{const{accountId:n}=e.payload,o=t.accounts.map(l=>({...l,active:l.accountId===n}));return{...t,accounts:o}}default:return t}},mF=function(){var t=(0,Le.Z)(function*(e){const n=new Ry(e,ky),o={modules:[],accounts:[],contract:yield n.getItem(T5),selectedWalletId:yield n.getItem(O5),recentlySignedInWallets:(yield n.getItem(Ly))||[]},l=new hF(o),m=new Fe;m.pipe(gF(yF,o)).subscribe(l);const N=function(){var ee=(0,Le.Z)(function*(oe,ue,ge,Ie){if(ue[Ie]!==oe[Ie]){if(ue[Ie])return void(yield n.setItem(ge,ue[Ie]));yield n.removeItem(ge)}});return function(ue,ge,Ie,Re){return ee.apply(this,arguments)}}();let J=l.getValue();return l.subscribe(ee=>{N(J,ee,O5,"selectedWalletId"),N(J,ee,T5,"contract"),N(J,ee,Ly,"recentlySignedInWallets"),J=ee}),{observable:l,getState:()=>l.getValue(),dispatch:ee=>m.next(ee),toReadOnly:()=>({getState:()=>l.getValue(),observable:l.asObservable()})}});return function(n){return t.apply(this,arguments)}}();let C2=null;const N5=(t,e,n,o)=>{return{options:t,store:e.toReadOnly(),wallet:(l=(0,Le.Z)(function*(m){const{selectedWalletId:N}=e.getState(),J=yield n.getWallet(m||N);if(!J)throw m?new Error("Invalid wallet id"):new Error("No wallet selected");return J}),function(N){return l.apply(this,arguments)}),setActiveAccount:l=>{const{accounts:m}=e.getState();if(!m.some(N=>N.accountId===l))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:l}})},isSignedIn(){const{accounts:l}=e.getState();return Boolean(l.length)},on:(l,m)=>o.on(l,m),off:(l,m)=>{o.off(l,m)}};var l},P5=function(){var t=(0,Le.Z)(function*(e){const{options:n,storage:o}=(t=>({options:{languageCode:t.languageCode||void 0,network:fF(t.network),debug:t.debug||!1,optimizeWalletOrder:!1!==t.optimizeWalletOrder,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0},storage:t.storage||new uF}))(e);fp.debug=n.debug;const l=new _2,m=yield mF(o),N=new cF({factories:e.modules,storage:o,options:n,store:m,emitter:l,provider:new aF(n.network.nodeUrl)});return yield N.setup(),e.allowMultipleSelectors?N5(n,m,N,l):(C2||(C2=N5(n,m,N,l)),C2)});return function(n){return t.apply(this,arguments)}}(),R5=t=>new Promise(e=>setTimeout(e,t)),k5=function(){var t=(0,Le.Z)(function*(e,n,o){const l=e();if(l)return l;if(!o)throw new Error("Exceeded timeout");return R5(n).then(()=>k5(e,n,o-1))});return function(n,o,l){return t.apply(this,arguments)}}(),nc=function(){var t=(0,Le.Z)(function*(e,n={}){const{timeout:o=100,interval:l=50}=n;return Promise.race([R5(o).then(()=>{throw new Error("Exceeded timeout")}),k5(e,l,Math.floor(o/l))])});return function(n){return t.apply(this,arguments)}}(),Df=t=>t.accounts.find(e=>e.active)||null,vF=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],wF=t=>{if(typeof navigator>"u")return!1;const e=(t=>""!==t&&vF.reduce((e,[n,o])=>{if(e)return e;const l=o.exec(t);return!!l&&[n,l]},!1))(navigator.userAgent);if(!e)return!1;const[n]=e;return"searchbot"!==n&&!!t.find(o=>o===n)};var L5=y(21531),AF=y(1520);class x2{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}}const F5=new Map([[x2,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),_F=function(){var t=(0,Le.Z)(function*({accountId:e,network:n,publicKey:o}){return yield new Zn.providers.JsonRpcProvider({url:n.nodeUrl}).query({request_type:"view_access_key",account_id:e,finality:"final",public_key:o})});return function(n){return t.apply(this,arguments)}}(),MF=function(){var t=(0,Le.Z)(function*({publicKey:e,accountId:n,network:o}){const{permission:l}=yield _F({accountId:n,network:o,publicKey:e});return"FullAccess"===l});return function(n){return t.apply(this,arguments)}}(),B5=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Connect Your Wallet","whatIsAWallet":"What is a Wallet?","secureAndManage":"Secure & Manage Your Digital Assets","safelyStore":"Safely store and transfer your crypto and NFTs.","logInToAny":"Log In to Any NEAR App","noNeedToCreate":"No need to create new accounts or credentials. Connect your wallet and you are good to go!","getAWallet":"Get a Wallet","useAWallet":"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.","connectionFailed":"Connection Failed","connectionSuccessful":"Connection Successful","connected":"Connected","connectingTo":"Connecting to","connectingMessage":{"injected":"Confirm the connection in the extension window","browser":"Confirm the connection in the wallet after redirect","hardware":"Confirm the connection in the ledger device","bridge":"Confirm the connection in the wallet"}},"ledger":{"connectWithLedger":"Connect with Ledger","makeSureYourLedger":"Make sure your Ledger is connected securely, and that the NEAR app is open on your device","continue":"Continue","specifyHDPath":"Specify HD Path","enterYourPreferredHDPath":"Enter your preferred HD path, then scan for any active accounts.","scan":"Scan","retry":"Retry","ledgerIsNotAvailable":"Ledger is not available","accessDeniedToUseLedgerDevice":"Access denied to use Ledger device","noAccountsFound":"No Accounts Found","selectYourAccounts":"Select Your Accounts","connecting1Account":"Connecting 1 Account","cantFindAnyAccount":"Can\'t find any account associated with this Ledger. Please create a new NEAR account on","orConnectAnAnotherLedger":"or connect an another Ledger.","connecting":"Connecting","ofAccounts":"of Accounts","failedToAutomatically":"Failed to automatically find account id. Provide it manually:","overviewTheListOfAuthorized":"Overview the list of authorized account(s), complete sign in by clicking the button below.","finish":"Finish"},"install":{"youllNeedToInstall":"You\'ll need to install","toContinueAfterInstalling":"to continue. After installing","refreshThePage":"refresh the page.","open":"Open"},"qr":{"copiedToClipboard":"Copied to clipboard","failedToCopy":"Failed to copy to clipboard","scanWithYourMobile":"Scan with Your Mobile Device","copyToClipboard":" Copy to clipboard","preferTheOfficial":"Prefer the official dialogue of","open":"Open"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Choose a Wallet","transferYourAccounts":"Transfer Your Accounts","selectAWallet":"Select a wallet that fits your needs and supports your connected accounts.","selectYourAccounts":"Select Your Accounts","afterDecide":"After you decide on a wallet, you can select which accounts you want to transfer.","disclaimer":"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.","warning":"does not support account export at this time. Please select another wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Select Accounts to Transfer","button":"Continue","deselectAll":"Deselect All","selectAll":"Select All","unavailable":"Transfer Unavailable","error":"Account does not exist","warningLedger":"Ledger support required","noBalance":"Account not funded"},"getPassphrase":{"title":"Copy Temporary Password","desc":"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.","button":"Continue","transferButton":"Transfer Accounts","label":"Click to Copy","checkLabel":"I copied or wrote down the password"},"complete":{"title":"Complete the Transfer","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Once import part of process is completed from selected wallet, press button to complete the transfer process.","startOverButton":"Start Over","button":"Complete"}}},"component":{"clickToCopy":{"label":"Copied","tooltip":"Click to copy"}}}'),IF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Conecta Tu Billetera","whatIsAWallet":"\xbfQue es una Billetera?","secureAndManage":"Resguarda y Administrar Tus Activos Digitales","safelyStore":"Almacena de forma segura y transfiere tus cryptos y NFT\'s","logInToAny":"Inicie sesi\xf3n en Cualquier Aplicacion NEAR","noNeedToCreate":"No es necesario crear nuevas cuentas o credenciales, \xa1Conecta tu billetera y listo!","getAWallet":"Obten una Billetera","useAWallet":"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xf3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xf1as","connectionFailed":"Conexi\xf3n Fallida","connectionSuccessful":"Conexi\xf3n Existosa","connected":"Conectado","connectingTo":"Conectando a ","connectingMessage":{"injected":"Confirme la conexi\xf3n en la ventana de extensi\xf3n","browser":"Confirme la conexi\xf3n en la billetera despu\xe9s de la redirecci\xf3n","hardware":"Confirme la conexi\xf3n en el dispositivo de libro mayor","bridge":"Confirmar la conexi\xf3n en la billetera"}},"ledger":{"connectWithLedger":"Conectar con Ledger","makeSureYourLedger":"Aseg\xfarese de que su ledger est\xe1 conectada de forma segura y que la aplicacion NEAR est\xe9 abierta en su dispositivo","continue":"Continuar","specifyHDPath":"Especifique la ruta HD","enterYourPreferredHDPath":"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.","scan":"Escanear","retry":"Reintentar","ledgerIsNotAvailable":"El Ledger no est\xe1 disponible","accessDeniedToUseLedgerDevice":"Acceso denegado para usar el dispositivo ledger","noAccountsFound":"No se encontraron cuentas","selectYourAccounts":"Selecciona tus cuentas","connecting1Account":"Conectando a 1 cuenta","cantFindAnyAccount":"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR","orConnectAnAnotherLedger":"o conecta otro ledger","connecting":"Conectando","ofAccounts":"de Cuentas","failedToAutomatically":"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:","overviewTheListOfAuthorized":"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xf3n haciedo click a countinuacion.","finish":"Finalizar"},"install":{"youllNeedToInstall":"Tendr\xe1s que instalar","toContinueAfterInstalling":"Para continuar, Despues de instalar","refreshThePage":"Recarga la pagina","open":"Abrir"},"qr":{"copiedToClipboard":"Copiado al Portapapeles","failedToCopy":"Fall\xf3 la copia al Portapapeles","scanWithYourMobile":"Busca con tu dispositivo movil","copyToClipboard":" Copiar al Portapapeles","preferTheOfficial":"\xbfPrefires el di\xe1logo oficial de","open":"Abrir"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),CF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u8fde\u63a5\u4f60\u7684\u94b1\u5305","whatIsAWallet":"\u4ec0\u4e48\u662f\u94b1\u5305\uff1f","secureAndManage":"\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684\u6570\u5b57\u8d44\u4ea7","safelyStore":"\u5b89\u5168\u5b58\u50a8\u548c\u8f6c\u79fb\u4f60\u7684\u52a0\u5bc6\u8d27\u5e01\u548cNFT","logInToAny":"\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","noNeedToCreate":"\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u8d26\u6237\u6216\u5bc6\u7801\u3002\u8fde\u63a5\u4f60\u7684\u94b1\u5305\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff01","getAWallet":"\u83b7\u53d6\u65b0\u8d26\u6237","useAWallet":"\u4f7f\u7528\u94b1\u5305\u6765\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684 NEAR \u8d44\u4ea7\uff0c\u65e0\u9700\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","connectionFailed":"\u8fde\u63a5\u5931\u8d25","connectionSuccessful":"\u8fde\u63a5\u6210\u529f","connected":"\u5df2\u8fde\u63a5","connectingTo":"\u6b63\u5728\u8fde\u63a5"},"ledger":{"connectWithLedger":"\u8fde\u63a5 Ledger","makeSureYourLedger":"\u786e\u4fdd\u4f60\u7684 Ledger \u5df2\u7ecf\u5b89\u5168\u8fde\u63a5\uff0c\u5e76\u4e14 NEAR \u5e94\u7528\u5df2\u7ecf\u5728\u4f60\u8bbe\u5907\u4e0a\u6253\u5f00","continue":"\u7ee7\u7eed","specifyHDPath":"\u6307\u5b9a HD \u8def\u5f84","enterYourPreferredHDPath":"\u8f93\u5165\u4f60\u504f\u597d\u7684 HD \u8def\u5f84\uff0c\u7136\u540e\u4e3a\u4efb\u610f\u6d3b\u8dc3\u8d26\u6237\u626b\u7801","scan":"\u626b\u7801","retry":"\u91cd\u8bd5","ledgerIsNotAvailable":"Ledger \u4e0d\u53ef\u7528","accessDeniedToUseLedgerDevice":"\u8bbf\u95ee Ledger \u8bbe\u5907\u88ab\u62d2\u7edd","noAccountsFound":"\u6ca1\u6709\u627e\u5230\u8d26\u6237","selectYourAccounts":"\u9009\u62e9\u4f60\u7684\u8d26\u6237","connecting1Account":"\u6b63\u5728\u8fde\u63a51\u4e2a\u8d26\u6237","cantFindAnyAccount":"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u4e0e\u8fd9\u4e2a Ledger \u76f8\u5173\u8054\u7684\u8d26\u6237\u3002\u8bf7\u521b\u5efa\u65b0\u8d26\u6237\u4e8e","orConnectAnAnotherLedger.":"\u6216\u8fde\u63a5\u53e6\u4e00\u4e2a Ledger","connecting":"\u6b63\u5728\u8fde\u63a5","ofAccounts":"\u4e2a\u8d26\u6237","failedToAutomatically":"\u65e0\u6cd5\u81ea\u52a8\u627e\u5230\u8d26\u6237ID\uff0c\u8bf7\u4e3b\u52a8\u63d0\u4f9b\uff1a","overviewTheListOfAuthorized":"\u8bf7\u67e5\u770b\u5df2\u6388\u6743\u7684\u8d26\u6237\u5217\u8868\uff0c\u70b9\u51fb\u4ee5\u4e0b\u6309\u94ae\u5b8c\u6210\u767b\u5f55","finish":"\u5b8c\u6210"},"install":{"youllNeedToInstall":"\u4f60\u5c06\u9700\u8981\u5b89\u88c5","toContinueAfterInstalling":"\u4ee5\u7ee7\u7eed\u3002\u5b89\u88c5\u5b8c","refreshThePage":"\u8bf7\u5237\u65b0\u9875\u9762","open":"\u6253\u5f00"},"qr":{"copiedToClipboard":"\u590d\u5236\u5230\u4e86\u526a\u8d34\u677f","failedToCopy":"\u590d\u5236\u5230\u526a\u8d34\u677f\u5931\u8d25","scanWithYourMobile":"\u7528\u4f60\u7684\u79fb\u52a8\u8bbe\u5907\u626b\u7801","copyToClipboard":" \u590d\u5236\u5230\u526a\u8d34\u677f","preferTheOfficial":"\u5e0c\u671b\u4f7f\u7528\u5b98\u65b9\u5bf9\u8bdd\u6846\u4e8e","open":"\u6253\u5f00"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),xF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044f \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","whatIsAWallet":"\u041a\u0430\u043a\u0432\u043e \u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b?","secureAndManage":"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438\u0442\u0435 \u0441\u0438 \u0430\u043a\u0442\u0438\u0432\u0438","safelyStore":"\u0421\u044a\u0445\u0440\u0430\u043d\u044f\u0432\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0435\u0445\u0432\u044a\u0440\u043b\u044f\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR","noNeedToCreate":"\u041d\u044f\u043c\u0430 \u043d\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438. \u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u0438!","getAWallet":"\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","useAWallet":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043d\u0430 NEAR \u043a\u0430\u043a\u0442\u043e \u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u0430 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0438 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.","connectionFailed":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e","connectionSuccessful":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e","connected":"\u0421\u0432\u044a\u0440\u0437\u0430\u043d","connectingTo":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043a\u044a\u043c","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430 \u043d\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u0442\u043e","browser":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u043b\u0435\u0434 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435\u0442\u043e","hardware":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","bridge":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430"}},"ledger":{"connectWithLedger":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 Ledger \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0438 \u0447\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e NEAR \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043da \u043d\u0435\u0433\u043e.","continue":"\u041f\u0440\u043e\u0434\u044a\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041f\u043e\u0441\u043e\u0447\u0435\u0442\u0435 HD \u043f\u044a\u0442","enterYourPreferredHDPath":"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d\u0438\u044f HD \u043f\u044a\u0442, \u0441\u043b\u0435\u0434 \u043a\u043e\u0435\u0442\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u043a\u0430\u0443\u043d\u0442\u0438.","scan":"\u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435","retry":"\u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e","accessDeniedToUseLedgerDevice":"\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 Ledger \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d","noAccountsFound":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","connecting1Account":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 1 \u043f\u0440\u043e\u0444\u0438\u043b","cantFindAnyAccount":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0441\u044a\u0432\u0440\u0437\u0430\u043d\u0438 \u0441 \u0442\u043e\u0437\u0438 Ledger. \u041c\u043e\u043b\u044f, \u0441\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432 NEAR \u043f\u0440\u043e\u0444\u0438\u043b \u043d\u0430","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u0441\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.","connecting":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435","ofAccounts":"\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","failedToAutomatically":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0442\u043e \u043d\u0430\u043c\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430 \u043d\u0435 \u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043e \u0440\u044a\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u0443\u043f\u044a\u043b\u043d\u043e\u043c\u043e\u0449\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0437\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435 \u0432\u043b\u0438\u0437\u0430\u043d\u0435\u0442\u043e, \u043a\u0430\u0442\u043e \u0449\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u0431\u0443\u0442\u043e\u043d\u0430 \u043f\u043e-\u0434\u043e\u043b\u0443..","finish":"\u0417\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435. \u0421\u043b\u0435\u0434 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435","refreshThePage":"\u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u043d\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","scanWithYourMobile":" \u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0442\u043e \u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","preferTheOfficial":"\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d \u0435\u0437\u0438\u043a \u0437\u0430 \u043a\u043e\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0446\u0438\u044f","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),DF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\uc9c0\uac11 \uc5f0\uacb0\ud558\uae30","whatIsAWallet":"\uc9c0\uac11\uc740 \ubb34\uc2a8 \uc5ed\ud560\uc744 \ud558\ub098\uc694?","secureAndManage":"\ub2f9\uc2e0\uc758 \ub514\uc9c0\ud138 \uc790\uc0b0\uc744 \ubcf4\ud638\ud558\uace0 \uad00\ub9ac\ud569\ub2c8\ub2e4.","safelyStore":"\uc554\ud638\ud654\ud3d0\uc640 NFT\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uace0 \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","logInToAny":"NEAR App\uc5d0 \ub85c\uadf8\uc778\ud569\ub2c8\ub2e4.","noNeedToCreate":"\uc0c8\ub85c\uc6b4 \uacc4\uc815\uc774\ub098 \ube44\ubc00\ubc88\ud638\ub97c \ub9cc\ub4e4 \ud544\uc694 \uc5c6\uc774 \uc9c0\uac11\uc744 \uc5f0\uacb0\ud55c \ud6c4 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","getAWallet":"\uc9c0\uac11 \uac00\uc838\uc624\uae30","useAWallet":"\uc9c0\uac11\uc744 \uc0ac\uc6a9\ud558\uc5ec NEAR \uc790\uc0b0\uc744 \ubcf4\ud638\xb7\uad00\ub9ac\ud558\uace0, \uc544\uc774\ub514\uc640 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 NEAR \uc571\uc5d0 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","connectionFailed":"\uc5f0\uacb0 \uc2e4\ud328","connectionSuccessful":"\uc5f0\uacb0 \uc131\uacf5","connected":"Connected","connectingTo":"\uc5f0\uacb0 \uc911: ","connectingMessage":{"injected":"\uc775\uc2a4\ud150\uc158 \ucc3d\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","browser":"\ub9ac\ub2e4\uc774\ub809\ud2b8 \ub41c \uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","hardware":"Ledger \uae30\uae30\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","bridge":"\uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0 \ud655\uc778"}},"ledger":{"connectWithLedger":"Ledger \uc5f0\uacb0\ud558\uae30","makeSureYourLedger":"Ledger\uac00 \uc548\uc804\ud558\uac8c \uc5f0\uacb0\ub418\uc5b4 \uc788\uace0, NEAR \uc571\uc774 \uc5f4\ub824 \uc788\ub294 \uc9c0 \ud655\uc778\ud558\uc138\uc694","continue":"\uacc4\uc18d\ud558\uae30","specifyHDPath":"HD Path \uc9c0\uc815\ud558\uae30","enterYourPreferredHDPath":"\uc6d0\ud558\ub294 HD Path\ub97c \uc120\ud0dd\ud558\uace0, \ud65c\uc131\ud654\ub41c \uacc4\uc815\uc774 \uc788\ub294 \uc9c0 \uac80\uc0c9\ud558\uc138\uc694","scan":"\uac80\uc0c9","retry":"\ub2e4\uc2dc \uc2dc\ub3c4","ledgerIsNotAvailable":"Ledger\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","accessDeniedToUseLedgerDevice":"Ledger \uae30\uae30 \uc811\uadfc \uad8c\ud55c\uc774 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4","noAccountsFound":"\uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","selectYourAccounts":"\uacc4\uc815 \uc120\ud0dd\ud558\uae30","connecting1Account":"\ud558\ub098\uc758 \uacc4\uc815\uc5d0 \uc5f0\uacb0","cantFindAnyAccount":"Ledger\uc640 \uc5f0\uacb0\ub41c \uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uac70\ub098 ","orConnectAnAnotherLedger":"\ub2e4\ub978 Ledger\ub97c \uc5f0\uacb0\ud558\uc138\uc694","connecting":"\uacc4\uc815 \uc5f0\uacb0\ud558\uae30: ","ofAccounts":"\uac1c \uacc4\uc815\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4","failedToAutomatically":"\uacc4\uc815 ID\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc218\ub3d9\uc73c\ub85c \uc785\ub825\ud574\uc8fc\uc138\uc694.","overviewTheListOfAuthorized":"\uc778\uc99d\ub41c \uacc4\uc815 \ubaa9\ub85d\uc744 \ud655\uc778\ud55c \ud6c4 \uc544\ub798 \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uc5ec \ub85c\uadf8\uc778\uc744 \uc644\ub8cc\ud558\uc138\uc694","finish":"\uc644\ub8cc"},"walletTypes":{"hardware":"\ud558\ub4dc\uc6e8\uc5b4 \uc9c0\uac11","browser":"\ube0c\ub77c\uc6b0\uc800 \uc9c0\uac11","injected":"\uc9c0\uac11 \ud655\uc7a5","bridge":"\ube0c\ub9ac\uc9c0 \uc9c0\uac11","mobile":"\ubaa8\ubc14\uc77c \uc9c0\uac11","instant-link":"\uc778\uc2a4\ud134\ud2b8 \uc9c0\uac11"},"install":{"youllNeedToInstall":"\ub2e4\uc74c \ud655\uc7a5 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uce58\ud574\uc8fc\uc138\uc694:","toContinueAfterInstalling":". \uc124\uce58 \uc644\ub8cc \ud6c4 \ud398\uc774\uc9c0 \uc0c8\ub85c \uace0\uce68\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. ","refreshThePage":"\uc0c8\ub85c \uace0\uce68","open":"Open"},"qr":{"copiedToClipboard":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc644\ub8cc","failedToCopy":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc2e4\ud328","scanWithYourMobile":"\ubaa8\ubc14\uc77c \uc7a5\uce58\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\uce94\ud574\uc8fc\uc138\uc694","copyToClipboard":" \ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ud558\uae30","preferTheOfficial":"\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uacf5\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc120\ud638\ud558\uc2ed\ub2c8\uae4c: ","open":"Open"}}}'),TF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n","whatIsAWallet":"V\xed l\xe0 g\xec?","secureAndManage":"B\u1ea3o m\u1eadt & Qu\u1ea3n l\xfd t\xe0i s\u1ea3n s\u1ed1 c\u1ee7a b\u1ea1n","safelyStore":"L\u01b0u tr\u1eef v\xe0 chuy\u1ec3n ti\u1ec1n \u0111i\u1ec7n t\u1eed v\xe0 NFT c\u1ee7a b\u1ea1n m\u1ed9t c\xe1ch an to\xe0n.","logInToAny":"\u0110\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng tr\xean NEAR","noNeedToCreate":"Kh\xf4ng c\u1ea7n t\u1ea1o t\xe0i kho\u1ea3n ho\u1eb7c th\xf4ng tin \u0111\u0103ng nh\u1eadp m\u1edbi. K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n v\xe0 b\u1eaft \u0111\u1ea7u!","getAWallet":"T\u1ea1o V\xed","useAWallet":"S\u1eed d\u1ee5ng v\xed \u0111\u1ec3 b\u1ea3o m\u1eadt v\xe0 qu\u1ea3n l\xfd t\xe0i s\u1ea3n tr\xean NEAR c\u1ee7a b\u1ea1n v\xe0 \u0111\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng NEAR n\xe0o, kh\xf4ng c\u1ea7n t\xean ng\u01b0\u1eddi d\xf9ng v\xe0 m\u1eadt kh\u1ea9u.","connectionFailed":"K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i","connectionSuccessful":"K\u1ebft n\u1ed1i th\xe0nh c\xf4ng","connected":"\u0110\xe3 k\u1ebft n\u1ed1i","connectingTo":"\u0110ang k\u1ebft n\u1ed1i t\u1edbi","connectingMessage":{"injected":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong c\u1eeda s\u1ed5 ti\u1ec7n \xedch m\u1edf r\u1ed9ng","browser":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed sau khi \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng","hardware":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i v\u1edbi v\xed l\u1ea1nh","bridge":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed"}},"ledger":{"connectWithLedger":"K\u1ebft n\u1ed1i v\xed Ledger","makeSureYourLedger":"\u0110\u1ea3m b\u1ea3o Ledger c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i an to\xe0n v\xe0 \u1ee9ng d\u1ee5ng NEAR \u0111ang m\u1edf s\u1eb5n tr\xean thi\u1ebft b\u1ecb","continue":"Ti\u1ebfp t\u1ee5c","specifyHDPath":"Ch\u1ec9 \u0111\u1ecbnh HD Path","enterYourPreferredHDPath":"Nh\u1eadp HD Path c\u1ee7a b\u1ea1n, sau \u0111\xf3 qu\xe9t t\xecm c\xe1c t\xe0i kho\u1ea3n ho\u1ea1t \u0111\u1ed9ng","scan":"Qu\xe9t","retry":"Th\u1eed l\u1ea1i","ledgerIsNotAvailable":"Ledger kh\xf4ng kh\u1ea3 d\u1ee5ng","accessDeniedToUseLedgerDevice":"Truy c\u1eadp Ledger b\u1ecb t\u1eeb ch\u1ed1i","noAccountsFound":"Kh\xf4ng t\xecm th\u1ea5y t\xe0i kho\u1ea3n","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n c\u1ee7a b\u1ea1n","connecting1Account":"\u0110ang k\u1ebft n\u1ed1i 1 t\xe0i kho\u1ea3n","cantFindAnyAccount":"Kh\xf4ng th\u1ec3 t\xecm th\u1ea5y b\u1ea5t k\u1ef3 t\xe0i kho\u1ea3n n\xe0o \u0111\u01b0\u1ee3c li\xean k\u1ebft v\u1edbi Ledger n\xe0y. Vui l\xf2ng t\u1ea1o m\u1ed9t t\xe0i kho\u1ea3n NEAR m\u1edbi","orConnectAnAnotherLedger":"ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi v\xed Ledger kh\xe1c.","connecting":"\u0110ang k\u1ebft n\u1ed1i","ofAccounts":"c\u1ee7a t\xe0i kho\u1ea3n","failedToAutomatically":"Kh\xf4ng th\u1ec3 t\u1ef1 \u0111\u1ed9ng t\xecm id t\xe0i kho\u1ea3n. Nh\u1eadp th\u1ee7 c\xf4ng:","overviewTheListOfAuthorized":"T\u1ed5ng quan danh s\xe1ch c\xe1c t\xe0i kho\u1ea3n \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n, ho\xe0n t\u1ea5t \u0111\u0103ng nh\u1eadp b\u1eb1ng c\xe1ch b\u1ea5m v\xe0o n\xfat b\xean d\u01b0\u1edbi.","finish":"Ho\xe0n th\xe0nh"},"install":{"youllNeedToInstall":"B\u1ea1n s\u1ebd c\u1ea7n c\xe0i \u0111\u1eb7t","toContinueAfterInstalling":"\u0111\u1ec3 b\u1eaft \u0111\u1ea7u. Sau khi c\xe0i \u0111\u1eb7t xong","refreshThePage":"T\u1ea3i l\u1ea1i trang.","open":"M\u1edf"},"qr":{"copiedToClipboard":"\u0110\xe3 sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","failedToCopy":"Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m th\u1ea5t b\u1ea1i","scanWithYourMobile":"Qu\xe9t v\u1edbi \u0111i\u1ec7n tho\u1ea1i c\u1ee7a b\u1ea1n","copyToClipboard":" Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","preferTheOfficial":"Dialogue ch\xednh th\u1ee9c c\u1ee7a","open":"M\u1edf"},"walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile","instant-link":"V\xed t\u1ee9c th\xec"},"exportAccounts":{"chooseAWallet":"Ch\u1ecdn v\xed","transferYourAccounts":"Chuy\u1ec3n t\xe0i kho\u1ea3n","selectAWallet":"Ch\u1ecdn v\xed ph\xf9 h\u1ee3p v\u1edbi nhu c\u1ea7u c\u1ee7a b\u1ea1n, v\xed \u0111\u01b0\u1ee3c ch\u1ecdn c\u1ea7n h\u1ed7 tr\u1ee3 c\xe1c t\xe0i kho\u1ea3n \u0111ang s\u1eed d\u1ee5ng.","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n","afterDecide":"Sau khi ch\u1ecdn \u0111\u01b0\u1ee3c t\xe0i kho\u1ea3n b\u1ea1n c\xf3 chuy\u1ec3n.","disclaimer":"B\u1ea1n kh\xf4ng th\u1ec3 chuy\u1ec3n t\xe0i kho\u1ea3n n\u1ebfu t\xe0i kho\u1ea3n \u0111\xf3 ch\u01b0a \u0111\u01b0\u1ee3c nh\u1eadn ti\u1ec1n ho\u1eb7c ch\u01b0a ph\xe1t sinh giao d\u1ecbch tr\xean NEAR.","warning":"kh\xf4ng h\u1ed7 tr\u1ee3 xu\u1ea5t t\xe0i kho\u1ea3n. Vui l\xf2ng ch\u1ecdn v\xed kh\xe1c.","walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile"},"selectAccounts":{"title":"Ch\u1ecdn t\xe0i kho\u1ea3n \u0111\u1ec3 chuy\u1ec3n","button":"L\u1ea5y c\u1ee5m m\u1eadt kh\u1ea9u","deselectAll":"B\u1ecf ch\u1ecdn t\u1ea5t c\u1ea3","selectAll":"Ch\u1ecdn t\u1ea5t c\u1ea3","unavailable":"Chuy\u1ec3n kh\xf4ng kh\u1ea3 d\u1ee5ng","error":"T\xe0i kho\u1ea3n kh\xf4ng t\u1ed3n t\u1ea1i","warningLedger":"Y\xeau c\u1ea7u h\u1ed7 tr\u1ee3 Ledger","noBalance":"T\xe0i kho\u1ea3n tr\u1ed1ng"},"getPassphrase":{"title":"Sao ch\xe9p m\u1eadt kh\u1ea9u t\u1ea1m th\u1eddi","desc":"B\u1ea1n s\u1ebd c\u1ea7n nh\u1eadp m\u1eadt kh\u1ea9u khi b\u1eaft \u0111\u1ea7u xu\u1ea5t c\xe1c kho\u1ea3n t\u1edbi v\xed kh\xe1c.","button":"Ti\u1ebfp t\u1ee5c","label":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p","checkLabel":"T\xf4i \u0111\xe3 ch\xe9p ho\u1eb7c ghi l\u1ea1i m\u1eadt kh\u1ea9u"},"complete":{"title":"Ho\xe0n th\xe0nh chuy\u1ec3n","descOne":"B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng t\u1edbi t\xe0i kho\u1ea3n \u0111\xe3 ch\u1ecdn \u0111\u1ec3 ho\xe0n t\u1ea5t qu\xe1 tr\xecnh.","descTwo":"Sau khi nh\u1eadp, nh\u1ea5n n\xfat \u0111\u1ec3 ho\xe0n t\u1ea5t quy tr\xecnh chuy\u1ec3n.","button":"Ho\xe0n th\xe0nh"}}},"component":{"clickToCopy":{"label":"\u0110\xe3 sao ch\xe9p","tooltip":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p"}}}'),OF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f (Wallet) \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","whatIsAWallet":"\u0935\u0949\u0932\u0947\u091f \u0915\u094d\u092f\u093e \u0939\u0948?","secureAndManage":"\u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0947\u0902\u0964","safelyStore":"\u0905\u092a\u0928\u0940 \u0915\u094d\u0930\u093f\u092a\u094d\u091f\u094b\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090f\u0928\u090f\u092b\u091f\u0940 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u094d\u091f\u094b\u0930 \u0914\u0930 \u091f\u094d\u0930\u093e\u0902\u0938\u092b\u0930 \u0915\u0930\u0947\u0902\u0964","logInToAny":"NEAR \u092a\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0910\u092a \u092e\u0947\u0902 \u0938\u093e\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964","noNeedToCreate":"\u0928\u090f \u0916\u093e\u0924\u0947 \u092f\u093e \u0932\u0949\u0917\u093f\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f(NEAR Wallet)\u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092d \u0915\u0930\u0947\u0902\u0964","getAWallet":"\u090f\u0915 \u0935\u0949\u0932\u0947\u091f \u092c\u0928\u093e\u090f\u0901\u0964","useAWallet":"\u0905\u092a\u0928\u0940 NEAR \u0938\u0902\u092a\u0924\u094d\u0924\u093f\u092f\u094b\u0902 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0935\u0949\u0932\u0947\u091f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 NEAR \u0910\u092a (app) \u092e\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093f\u0938\u0940 \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e (user) \u0928\u093e\u092e \u0914\u0930 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964","connectionFailed":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0935\u093f\u092b\u0932|","connectionSuccessful":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0938\u092b\u0932|","connected":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0917\u092f\u093e|","connectingTo":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","connectingMessage":{"injected":"\u090f\u0915\u094d\u0938\u091f\u0947\u0902\u0936\u0928 \u0935\u093f\u0902\u0921\u094b \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","browser":"\u0930\u0940\u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u0939\u094b\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0935\u0949\u0932\u0947\u091f \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","hardware":"\u0915\u094b\u0932\u094d\u0921 \u0935\u0949\u0932\u0947\u091f \u0915\u0947 \u0938\u093e\u0925 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|"}},"ledger":{"connectWithLedger":"\u0932\u0947\u091c\u0930(Ledger)\u0935\u0949\u0932\u0947\u091f \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902|","makeSureYourLedger":"\u0938\u0941\u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0915\u0930\u0947\u0902 \u0915\u093f \u0906\u092a\u0915\u093e \u0932\u0947\u091c\u0930 \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092a \u0906\u092a\u0915\u0947 \u0921\u093f\u0935\u093e\u0907\u0938 (Device)\u092a\u0930 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093e \u0939\u0948|","continue":"\u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","specifyHDPath":"\u0939\u093e\u0930\u094d\u0921 \u0921\u093f\u0938\u094d\u0915(Hard Disk)\u092a\u0925(Path)\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0915\u0930\u0947|","enterYourPreferredHDPath":"\u0905\u092a\u0928\u093e \u090f\u091a\u0921\u0940 \u092a\u0925 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 \u0938\u0915\u094d\u0930\u093f\u092f \u0916\u093e\u0924\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","scan":"\u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947|","retry":"\u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947|","ledgerIsNotAvailable":"\u0932\u0947\u091c\u0930 \u0909\u092a\u0932\u092c\u094d\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|","accessDeniedToUseLedgerDevice":"\u0932\u0947\u091c\u0930 \u0921\u093f\u0935\u093e\u0907\u0938 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092a\u094d\u0930\u0935\u0947\u0936 \u0928\u093f\u0937\u0947\u0927|","noAccountsFound":"\u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e|","selectYourAccounts":"\u0905\u092a\u0928\u0947 \u0916\u093e\u0924\u0947 \u091a\u0941\u0928\u0947\u0902|","connecting1Account":"\u090f\u0915 \u0916\u093e\u0924\u093e \u0915\u0928\u0947\u0915\u094d\u091f \u0939\u094b \u0930\u0939\u093e \u0939\u0948|","cantFindAnyAccount":"\u0907\u0938 \u0932\u0947\u091c\u0930 \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0915\u094b\u0908 \u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e\u0964 \u0915\u0943\u092a\u092f\u093e \u090f\u0915 \u0928\u092f\u093e NEAR \u0916\u093e\u0924\u093e \u092c\u0928\u093e\u090f\u0901|","orConnectAnAnotherLedger":"\u0905\u0925\u0935\u093e \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091c\u0930 \u0935\u0949\u0932\u0947\u091f \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","connecting":"\u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","ofAccounts":"\u0916\u093e\u0924\u093e \u0905\u092c \u091c\u0941\u095c\u093e \u0928\u0939\u0940\u0902 \u0939\u0947|","failedToAutomatically":"\u0916\u093e\u0924\u093e \u0906\u0908\u0921\u0940 \u0938\u094d\u0935\u091a\u093e\u0932\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0916\u094b\u091c\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092a \u0938\u0947 \u0915\u094b\u0936\u093f\u0936 \u0915\u0930\u0947\u0902|","overviewTheListOfAuthorized":"\u0905\u0935\u0932\u094b\u0915\u0928 \u0905\u0927\u093f\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091a\u0940, \u0928\u0940\u091a\u0947 \u0926\u093f\u090f \u0917\u090f \u092c\u091f\u0928 \u092a\u0930 \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093f\u0928 \u092a\u0942\u0930\u093e \u0915\u0930\u0947\u0902\u0964","finish":"\u0938\u092e\u093e\u092a\u094d\u0924|"},"install":{"youllNeedToInstall":"\u0906\u092a\u0915\u094b \u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e|","toContinueAfterInstalling":"\u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","refreshThePage":"\u092a\u0941\u0928: \u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964","open":"\u0916\u094b\u0932\u0947|"},"qr":{"copiedToClipboard":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921(Clipboard)\u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u093f\u092f\u093e \u0917\u092f\u093e|","failedToCopy":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0928\u093e \u0935\u093f\u092b\u0932 \u0930\u0939\u093e|","scanWithYourMobile":"\u0905\u092a\u0928\u0947 \u092b\u094b\u0928 (Mobile)\u0938\u0947 \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","copyToClipboard":" \u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0947\u0902|","preferTheOfficial":"\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 \u0938\u0902\u0935\u093e\u0926 \u0915\u094b \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e \u0926\u0947\u0902|","open":"\u0916\u094b\u0932\u0947|"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),NF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0635\u0644 \u0645\u062d\u0641\u0638\u062a\u0643","whatIsAWallet":"\u0645\u0627 \u0647\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629\u061f","secureAndManage":"\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062a\u0644\u0643\u0627\u062a \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643","safelyStore":"\u0642\u0645 \u0628\u062a\u062e\u0632\u064a\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062a\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0628\u0623\u0645\u0627\u0646","logInToAny":"\u0633\u062c\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0625\u0644\u0649 \u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631","noNeedToCreate":".\u0644\u0627 \u062f\u0627\u0639\u064a \u0644\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062a\u0648\u0635\u064a\u0644 \u0645\u062d\u0641\u0638\u062a\u0643 \u0648\u0627\u0646\u0637\u0644\u0642","getAWallet":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0645\u062d\u0641\u0638\u0629","useAWallet":"\u0627\u0633\u062a\u062e\u062f\u0645 \u0645\u062d\u0641\u0638\u0629 \u0644\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064a\u0631 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643\u060c \u0648\u0627\u062f\u062e\u0644 \u0644\u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631 \u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631","connectionFailed":"\u0627\u062a\u0635\u0627\u0644 \u0641\u0627\u0634\u0644","connectionSuccessful":"\u0627\u062a\u0635\u0627\u0644 \u0646\u0627\u062c\u062d","connected":"\u0645\u062a\u0635\u0644","connectingTo":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628","connectingMessage":{"injected":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629","browser":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629 \u0628\u0639\u062f \u0625\u0639\u0627\u062f\u0629 \u062a\u0648\u062c\u064a\u0647","hardware":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631","bridge":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629"}},"ledger":{"connectWithLedger":"\u0627\u062a\u0635\u0644 \u0645\u0639 \u0644\u064a\u062f\u062c\u0631","makeSureYourLedger":"\u062a\u0623\u0643\u062f \u0623\u0646 \u0644\u064a\u062f\u062c\u0631 \u0645\u062a\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062a\u0637\u0628\u064a\u0642 \u0646\u064a\u0631 \u0645\u0641\u062a\u0648\u062d \u0641\u064a \u062c\u0647\u0627\u0632\u0643","continue":"\u062a\u0627\u0628\u0639","specifyHDPath":"\u062d\u062f\u062f \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628","enterYourPreferredHDPath":"\u0623\u062f\u062e\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060c \u062b\u0645 \u0627\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0646\u0634\u0637\u0629","scan":"\u0645\u0633\u062d","retry":"\u0623\u0639\u062f \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629","ledgerIsNotAvailable":"\u0644\u064a\u062f\u062c\u0631 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631","accessDeniedToUseLedgerDevice":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0644\u064a\u062f\u062c\u0631","noAccountsFound":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628\u0627\u062a","selectYourAccounts":"\u062d\u062f\u062f \u062d\u0633\u0627\u0628\u0627\u062a\u0643","connecting1Account":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062d\u0633\u0627\u0628 \u0648\u0627\u062d\u062f","cantFindAnyAccount":"\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628 \u0645\u0631\u062a\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064a\u062f\u062c\u0631 \u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u0646\u064a\u0631 \u062c\u062f\u064a\u062f \u0639\u0644\u0649","orConnectAnAnotherLedger":"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631 \u0622\u062e\u0631","connecting":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644","ofAccounts":"\u0645\u0646 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a","failedToAutomatically":"\u0641\u0634\u0644 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u062a\u0644\u0642\u0627\u0626\u064a\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u064a\u062f\u0648\u064a\u0627","overviewTheListOfAuthorized":"\u0644\u0627\u0626\u062d\u0629 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0645\u0635\u0631\u062d \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062f\u0646\u0627\u0647","finish":"\u0625\u0646\u0647\u0627\u0621"},"install":{"youllNeedToInstall":"\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u062b\u0628\u064a\u062a","toContinueAfterInstalling":"\u0644\u0644\u0627\u0633\u062a\u0643\u0645\u0627\u0644. \u0628\u0639\u062f \u0627\u0644\u062a\u062b\u0628\u064a\u062a","refreshThePage":"\u0642\u0645 \u0628\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u062d\u0629","open":"\u0627\u0641\u062a\u062d"},"qr":{"copiedToClipboard":"\u062a\u0645 \u0627\u0644\u0646\u0633\u062e","failedToCopy":"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062e","scanWithYourMobile":"\u0627\u0645\u0633\u062d \u0628\u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062d\u0645\u0648\u0644","copyToClipboard":"\u0646\u0633\u062e","preferTheOfficial":"\u062a\u0641\u0636\u0644 \u0627\u0644\u062d\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064a \u0644","open":"\u0641\u062a\u062d"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),PF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Spojite crypto nov\u010danik!","whatIsAWallet":"\u0160to je to crypto nov\u010danik?","secureAndManage":"Osigurajte i upravljajte svojom digitalnom imovinom.","safelyStore":"Sigurno pohranite i prebacite svoj crypto i NFT-eve.","logInToAny":" Prijavite se u bilo koju NEAR aplikaciju","noNeedToCreate":"Nema potrebe za stvaranjem novih naloga ili korisni\u010dkih podataka. Spojite svoj crypto nov\u010danik i spremni ste!","getAWallet":"Otvorite crypto nov\u010danik","useAWallet":"Koristite crypto nov\u010danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010dkog imena i lozinke.","connectionFailed":"Neuspje\u0161no povezivanje.","connectionSuccessful":"Uspje\u0161no povezivanje.","connected":"Povezano.","connectingTo":"Povezivanje u tijeku","connectingMessage":{"injected":"Potvrdite vezu u eksternom prozoru","browser":"Nakon redirekcije, potvrdite vezu u nov\u010daniku","hardware":"Potvrdite vezu sa nov\u010danikom","bridge":"Potvrdite vezu u nov\u010daniku"}},"ledger":{"connectWithLedger":"Pove\u017eite se hardverskim nov\u010danikom","makeSureYourLedger":"Osigurajte sigurnu vezu s hardverskim nov\u010danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju","continue":"Nastavite","specifyHDPath":"Specificirajte HD putanju","enterYourPreferredHDPath":"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge","scan":"Skenirajte","retry":"Poku\u0161ajte ponovno","ledgerIsNotAvailable":"Hardverski nov\u010danik nije dostupan.","accessDeniedToUseLedgerDevice":"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010danika","noAccountsFound":"Nalozi nisu prona\u0111eni","selectYourAccounts":"Odaberite svoje naloge","connecting1Account":"Povezivanje 1 naloga","cantFindAnyAccount":"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010danikom. Molimo vas, kreirajte novi NEAR nalog","orConnectAnAnotherLedger":"Ili pove\u017eite drugi hardverski nov\u010danik.","connecting":"Povezivanje","ofAccounts":"naloga","failedToAutomatically":"Neuspje\u0161no automatsko pronala\u017eenje ID naloga. Unesite ru\u010dno:","overviewTheListOfAuthorized":"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017ee prikazani gumb.","finish":"Zavr\u0161ite"},"install":{"youllNeedToInstall":" Potrebno je instalirati modal","toContinueAfterInstalling":"za nastavak. Nakon instalacije","refreshThePage":"osvje\u017eite stranicu.","open":"Otvorite QR modal"},"qr":{"copiedToClipboard":"Kopirano u me\u0111uspremnik","failedToCopy":"Neupsje\u0161no kopiranje u me\u0111uspremnik","scanWithYourMobile":"Skenirajte svojim mobilnim ure\u0111ajem","copyToClipboard":" Kopirajte u me\u0111uspremnik","preferTheOfficial":"Odaberite slu\u017ebeni dijalog","open":"Otvorite"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Odaberi Wallet","transferYourAccounts":"Prenesi svoje naloge","selectAWallet":"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017eava va\u0161e povezane naloge.","selectYourAccounts":"Odaberi svoje naloge","afterDecide":"Nakon \u0161to odlu\u010dite koji wallet koristite, mo\u017eete odabrati koje ra\u010dune \u017eelite prebaciti.","disclaimer":"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.","warning":"ne podr\u017eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Odaberi naloge za prijenos","button":"Generiraj lozinku","deselectAll":"Makni odabir sa svih","selectAll":"Odaberi sve","unavailable":"Prijenos nije dostupan","error":"Nalog ne postoji","warningLedger":"Potrebna ledger podr\u0161ka","noBalance":"Nalog nema sredstava"},"getPassphrase":{"title":"Kopiraj privremenu lozinku","desc":"Bit \u0107e potrebno unijeti ovu lozinku na po\u010detku izvoza naloga na drugi wallet.","button":"Nastavi","label":"Klikni za kopiju","checkLabel":"Kopirao sam ili zapisao lozinku"},"complete":{"title":"Zavr\u0161i prijenos","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.","button":"Zavr\u0161i"}}}}'),RF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u043e \u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0438 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u041d\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0438\u043d\u0433\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0438 \u0441\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0432\u0435\u043d\u0438!","getAWallet":"\u041d\u0430\u043f\u0440\u0430\u0432\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u043e\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0438\u043c\u0438\u045a\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0438.","connectionFailed":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043d\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.","connectionSuccessful":"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435.","connected":"\u041f\u043e\u0432\u0440\u0437\u0430\u043d\u043e.","connectingTo":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u0441\u043e","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0432\u043e \u0435\u043a\u0441\u0442\u0435\u0440\u043d\u0438\u043e\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","browser":"\u041f\u043e \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0443\u0432\u0430\u045a\u0435\u0442\u043e, \u043f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043e\u0434 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043e\u043a\u0442","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0441\u043e \u043b\u0430\u0434\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043a\u0430\u0442\u0430 \u0432\u043e \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u0442"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043e \u041b\u0435\u045f\u0435\u0440","makeSureYourLedger":"\u041e\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043a\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u041b\u0435\u045f\u0435\u0440 \u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e, \u0438 \u0434\u0435\u043a\u0430 NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u0443\u0440\u0435\u0434","continue":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430","enterYourPreferredHDPath":"\u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0430 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430, \u0430 \u043f\u043e\u0442\u043e\u0430 \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043d\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041e\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e","ledgerIsNotAvailable":"\u041b\u0435\u045f\u0435\u0440\u043e\u0442 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0430\u043f\u043e\u0442 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u045a\u0435 \u043d\u0430 \u041b\u0435\u045f\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043e\u0434\u0431\u0438\u0435\u043d","noAccountsFound":"\u041d\u0435\u043c\u0430 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438","connecting1Account":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u0435\u0434\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","cantFindAnyAccount":"\u041d\u0435 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u0441\u043e \u043e\u0432\u043e\u0458 \u041b\u0435\u045f\u0435\u0440. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u043a\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u043e\u0432\u0430 NEAR \u0441\u043c\u0435\u0442\u043a\u0430 ","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041b\u0435\u045f\u0435\u0440.","connecting":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0438","failedToAutomatically":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u0431\u0430\u0440\u0430\u045a\u0435 \u043d\u0430 \u0418\u0414 \u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430. \u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0433\u043e \u0440\u0430\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043b\u0438\u0441\u0442\u0430\u0442\u0430 \u043d\u0430 \u043e\u0432\u043b\u0430\u0441\u0442\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u043f\u043e\u0434\u043e\u043b\u0443.","finish":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435. \u041f\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0435\u0442\u043e","refreshThePage":"\u041e\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043d\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u043e\u0442","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0441\u043a\u0438 \u0443\u0440\u0435\u0434","copyToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0458\u0430\u043b\u0435\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u041e\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u0444\u0440\u043b\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectAWallet":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458 \u0433\u0438 \u0437\u0430\u0434\u043e\u0432\u043e\u043b\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043d\u045a\u0430 \u0438 \u0433\u0438 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438.","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","afterDecide":"\u041e\u0434\u043a\u0430\u043a\u043e \u045c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0441\u0430\u043a\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","disclaimer":"\u041d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u0444\u0440\u043b\u0430\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0438\u043a\u043e\u0433\u0430\u0448 \u043d\u0435 \u0431\u0438\u043b\u0435 \u043d\u0430\u0434\u043e\u043f\u043e\u043b\u043d\u0430\u0442\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u043d\u0435 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0432\u043e \u043e\u0432\u043e\u0458 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","deselectAll":"\u041e\u0442\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435","selectAll":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043e\u0442 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d","error":"\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0430\u0442\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u0435 \u043f\u043e\u0434\u0434\u0440\u0448\u043a\u0430 \u043e\u0434 \u041b\u0435\u045f\u0435\u0440","noBalance":"\u0421\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0430"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0430\u0442\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","desc":"\u040c\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0430\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430 \u043a\u043e\u0433\u0430 \u045c\u0435 \u0437\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0442\u0435","checkLabel":"\u0408\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0448\u0430\u0432 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u0442\u0430"},"complete":{"title":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043e \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442","descOne":"\u0421\u0435\u0433\u0430 \u045c\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","descTwo":"\u041e\u0442\u043a\u0430\u043a\u043e \u045c\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043e\u0437\u043e\u0442 \u043e\u0434 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0433\u043e \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u0437\u0430 \u0434\u0430 \u0433\u043e \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","button":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}}}'),kF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Pove\u017eite svojo denarnico!","whatIsAWallet":"Kaj je denarnica?","secureAndManage":"Zavarujte in upravljajte svoja digitalna sredstva.","safelyStore":"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.","logInToAny":"Prijavite se v katero koli aplikacijo na NEAR","noNeedToCreate":"Ni vam treba ustvarjati novih ra\u010dunov. Pove\u017eite svojo denarnico in za\u010dnite!","getAWallet":"Ustvarite denarnico","useAWallet":"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR","connectionFailed":"Povezava ni bila uspe\u0161na.","connectionSuccessful":"Povezava je bila uspe\u0161na.","connected":"Va\u0161a denarnica je povezana.","connectingTo":"Povezovanje z","connectingMessage":{"injected":"Potrdite povezavo v oknu raz\u0161iritve","browser":"Po preusmeritvi potrdite povezavo v denarnici","hardware":"Potrdite povezavo s hladno denarnico","bridge":"Potrdite povezavo v denarnici"}},"ledger":{"connectWithLedger":"Pove\u017eite se z Ledger","makeSureYourLedger":"Prepri\u010dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi","continue":"Nadaljuj","specifyHDPath":"Dolo\u010dite HD pot","enterYourPreferredHDPath":"Vnesite \u017eeleno HD pot, nato poi\u0161\u010dite vse aktivne ra\u010dune.","scan":"Skenirajte","retry":"Poskusite znova","ledgerIsNotAvailable":"Ledger ni na voljo","accessDeniedToUseLedgerDevice":"Dostop za uporabo naprave Ledger zavrnjen","noAccountsFound":"Ni najdenih ra\u010dunov","selectYourAccounts":"Izberite Va\u0161i ra\u010duni","connecting1Account":"Povezovanje enega ra\u010duna","cantFindAnyAccount":"Ni mogo\u010de najti nobenega ra\u010duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010dun ","orConnectAnAnotherLedger":"ali pove\u017eite drug Ledger..","connecting":"Povezovanje","ofAccounts":"ra\u010dunov","failedToAutomatically":"ID-ja ra\u010duna ni bilo mogo\u010de samodejno najti. Zagotovite ga ro\u010dno:","overviewTheListOfAuthorized":"Oglejte si seznam poobla\u0161\u010denih ra\u010dunov, dokon\u010dajte prijavo s klikom na spodnji gumb.","finish":"Kon\u010dajte"},"install":{"youllNeedToInstall":"Morali ga boste namestiti","toContinueAfterInstalling":"nadaljevati. Po namestitvi","refreshThePage":"Osve\u017eite stran.","open":"Odprite"},"qr":{"copiedToClipboard":"Kopirano v podlo\u017eni mapi","failedToCopy":"Kopiranje v podlo\u017eni mapi ni uspelo","scanWithYourMobile":"Skenirajte s svojo mobilno napravo","copyToClipboard":" Kopirajte v podlo\u017eni mapi","preferTheOfficial":"Preferirajte uradno pogovorno okno","open":"Odprite"},"walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},"exportAccounts":{"chooseAWallet":"Izberite denarnico","transferYourAccounts":"Prenesite svoje ra\u010dune","selectAWallet":"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010dune.","selectYourAccounts":"Izberite va\u0161i ra\u010duni","afterDecide":"Ko se odlo\u010dite za denarnico, lahko izberete, katere ra\u010dune \u017eelite prenesti.","disclaimer":"Ne boste mogli prenesti Ra\u010dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.","warning":"trenutno ne podpira izvoza ra\u010duna. Izberite drugo denarnico","walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica"},"selectAccounts":{"title":"Izberite ra\u010duni za prenos.","button":"Pridobite geslo","deselectAll":"Prekli\u010di izbiro vseh","selectAll":"Izberi vse","unavailable":"Prenos ni na voljo","error":"Ra\u010dun ne obstaja","warningLedger":"Potrebna je podpora za Ledger","noBalance":"Ra\u010dun ni financiran"},"getPassphrase":{"title":"Kopiraj za\u010dasno geslo","desc":"To geslo boste morali vnesti, ko boste za\u010deli izva\u017eati svoje ra\u010dune v drugo denarnico.","button":"Nadaljujte","label":"Kliknite za kopiranje","checkLabel":"Geslo sem kopiral ali zapisal"},"complete":{"title":"Dokon\u010dajte prenos","descOne":"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010danje prenosa.","descTwo":"Ko je uvozni del postopka kon\u010dan iz izbrane denarnice, pritisnite gumb za dokon\u010danje postopka prenosa.","button":"Kon\u010dajte"}}}}'),LF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0458 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u0430 \u0458\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u041e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043e\u0458\u043e\u043c \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u043e\u043c \u0438\u043c\u043e\u0432\u0438\u043d\u043e\u043c.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043f\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u0443\u0442\u0435 \u0438 NFT.","logInToAny":"\u041f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0438\u043b\u0438 \u0430\u043a\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0438 \u0441\u043f\u0440\u0435\u043c\u043d\u0438 \u0441\u0442e!","getAWallet":"\u041d\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0434\u0430 \u043e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043e\u0458\u0438\u043c NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043c\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u043c\u0430.","connectionFailed":"\u0412\u0435\u0437\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u043e\u0441\u0442\u0430\u0432\u0459\u0435\u043d\u0430.","connectionSuccessful":"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u0430.","connected":"\u041f\u043e\u0432\u0435\u0437\u0430\u043d.","connectingTo":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u043d\u0430","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043f\u043e\u0459\u043d\u043e\u043c \u043f\u0440\u043e\u0437\u043e\u0440\u0443","browser":"\u041d\u0430\u043a\u043e\u043d \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0430\u0432\u0430\u045a\u0430, \u043f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0443","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043b\u0430\u0434\u043d\u0438\u043c \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 NEAR \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0440\u0435\u0452\u0430\u0458\u0443","continue":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443","enterYourPreferredHDPath":"\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043d\u0443 \u0436\u0435\u0459\u0435\u043d\u0443 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443, \u0430 \u0437\u0430\u0442\u0438\u043c \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041f\u043e\u043a\u0443\u0448\u0430\u0458 \u043f\u043e\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0443\u043f \u0458\u0435 \u043e\u0434\u0431\u0438\u0458\u0435\u043d \u0437\u0430 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u045a\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430","noAccountsFound":"\u041d\u0430l\u043e\u0437\u0438 \u043d\u0438\u0441\u0443 \u043f\u0440\u043e\u043d\u0430\u0452\u0435\u043d\u0438","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043d\u0430l\u043e\u0433","connecting1Account":"\u041f\u043e\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043d\u0430l\u043e\u0433","cantFindAnyAccount":"\u041d\u0438\u0458\u0435 \u043c\u043e\u0433\u0443\u045b\u0435 \u043f\u0440\u043e\u043d\u0430\u045b\u0438 \u043d\u0438\u0458\u0435\u0434\u0430\u043d \u043d\u0430l\u043e\u0433 \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0441\u0430 \u043e\u0432\u0438\u043c Ledger-\u043e\u043c. \u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0438 NEAR \u043d\u0430l\u043e\u0433","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.","connecting":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430l\u043e\u0433\u0430","failedToAutomatically":"\u0410\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u043f\u0440\u043e\u043d\u0430\u043b\u0430\u0436\u0435\u045a\u0435 ID-a \u043d\u0430l\u043e\u0433\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e. \u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0458\u0442\u0435 \u043b\u0438\u0441\u0442\u0443 \u043e\u0432\u043b\u0430\u0448\u045b\u0435\u043d\u0438\u0445 \u0440\u0430\u0447\u0443\u043d\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0443 \u043a\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u0434\u0443\u0433\u043c\u0435 \u0438\u0441\u043f\u043e\u0434.","finish":"\u0417\u0430\u0432\u0440\u0448\u0438"},"install":{"youllNeedToInstall":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u0430\u043a. \u041d\u0430\u043a\u043e\u043d \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0430","refreshThePage":"\u043f\u043e\u043d\u043e\u0432\u043e \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","failedToCopy":"\u041a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u043f\u043e\u043c\u043e\u045b\u0443 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043d\u0438\u0447\u043d\u0438 \u0434\u0438\u0458\u0430\u043b\u043e\u0433 \u043e\u0434","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","selectAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u043e\u0434\u0433\u043e\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0430\u043c\u0430 \u0438 \u043a\u043e\u0458\u0438 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0437\u0430\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","afterDecide":"\u041d\u0430\u043a\u043e\u043d \u0448\u0442\u043e \u0441\u0435 \u043e\u0434\u043b\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435.","disclaimer":"\u041d\u0435\u045b\u0435\u0442\u0435 \u043c\u043e\u045b\u0438 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0458\u0438 \u043d\u0438\u043a\u0430\u0434\u0430 \u043d\u0438\u0441\u0443 \u0431\u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u0442\u0440\u0435\u043d\u0443\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043e\u0437 \u043d\u0430\u043b\u043e\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0437\u0430 \u043f\u0440\u0435\u043d\u043e\u0441.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043d\u0443 \u0444\u0440\u0430\u0437\u0443","deselectAll":"\u041f\u043e\u043d\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043e\u0440","selectAll":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d","error":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u043f\u043e\u0434\u0440\u0448\u043a\u0430 \u0437\u0430 Ledger","noBalance":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0438\u0458\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443","desc":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0443\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443 \u043a\u0430\u0434\u0430 \u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043e\u0437\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u0430\u043b\u0438","checkLabel":"\u041a\u043e\u043f\u0438\u0440\u0430\u043e \u0441\u0430\u043c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043e \u043b\u043e\u0437\u0438\u043d\u043a\u0443"},"complete":{"title":"\u0414\u043e\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440","descOne":"\u0421\u0430\u0434\u0430 \u045b\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0435\u043d\u0438 \u043d\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440.","descTwo":"\u041a\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u0443\u0432\u043e\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u0434\u0443\u0433\u043c\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u0440\u0435\u043d\u043e\u0441\u0430.","button":"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}}}');let j5;const U5=(t,e)=>{if(!t)return"";const n=e.indexOf(".");if(n>-1){const o=e.substring(0,n),l=e.substring(n+1);return U5(t[o],l)}return t[e]},Sn=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;const n=(t=>-1!==t.indexOf("-")?t.split("-")[0]:t.split("_")[0])(j5||e),o=(t=>{switch(t){case"en":default:return B5;case"es":return IF;case"zh":return CF;case"bg":return xF;case"ko":return DF;case"vi":return TF;case"hi":return OF;case"ar":return NF;case"hr":return PF;case"mk":return RF;case"sl":return kF;case"sr":return LF}})(n),l=U5(o,t);return l&&"string"==typeof l?l:t},dp='\n\n \n \n',Ta='\n\n \n \n \n';function D2(t,e){return T2.apply(this,arguments)}function T2(){return T2=(0,Le.Z)(function*(t,e){if(An){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Sn("modal.ledger.selectYourAccounts")}

\n \n
\n
\n
\n \n
\n `;for(let n=0;n
\n `);document.getElementById("change-derivation-path-button")?.addEventListener("click",()=>{H5(t)}),document.getElementById("connect-button")?.addEventListener("click",n=>{n.preventDefault();const o=Array.from(document.querySelectorAll("input[name='account']")).map(m=>m.checked),l=e.filter((m,N)=>o[N]);l.length<1||N2(t,e,l)})}}),T2.apply(this,arguments)}const UF='\n\n \n \n \n';function x1(t,e){return O2.apply(this,arguments)}function O2(){return O2=(0,Le.Z)(function*(t,e){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
${t.metadata.name}
\n

${t.metadata.name}

\n
\n
\n
\n
\n ${UF}\n ${Sn("modal.wallet.connectionFailed")}\n
\n

${e&&e.message?e.message:""}

\n ${!t?.metadata.deprecated&&t?.metadata.available?``:""}\n
\n
\n
\n
\n
\n
\n `,document.getElementById("retry-button")?.addEventListener("click",()=>{Fy(t,!1)})}),O2.apply(this,arguments)}function N2(t,e,n){return P2.apply(this,arguments)}function P2(){return P2=(0,Le.Z)(function*(t,e,n){document.querySelector(".modal-right").innerHTML=`\n
\n
\n \n
\n

\n ${Sn("modal.ledger.connecting")} ${n.length} ${Sn("modal.ledger.ofAccounts")}\n

\n \n
\n
\n
\n
\n

\n ${Sn("modal.ledger.overviewTheListOfAuthorized")}\n

\n
\n
\n \n
\n
\n
\n
\n `;for(let o=0;o\n \n \n `);document.getElementById("back-button")?.addEventListener("click",()=>{D2(t,e)}),document.getElementById("finish-button")?.addEventListener("click",(0,Le.Z)(function*(){try{if(!An)return;(yield t.wallet()).signIn({contractId:An.options.contractId,methodNames:An.options.methodNames,accounts:n}),An.container.children[0].classList.remove("open"),An.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(o){yield x1(t,o)}}))}),P2.apply(this,arguments)}function K5(t){return R2.apply(this,arguments)}function R2(){return R2=(0,Le.Z)(function*(t){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Sn("modal.ledger.noAccountsFound")}\n

\n \n
\n
\n
\n
\n

\n ${Sn("modal.ledger.cantFindAnyAccount")}\n MyNearWallet\n ${Sn("modal.ledger.orConnectAnAnotherLedger")}\n

\n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{L2(t)})}),R2.apply(this,arguments)}function V5(){return k2.apply(this,arguments)}function k2(){return k2=(0,Le.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n
\n \n ${Sn("modal.wallet.connectingTo")} ${t?.metadata.name}...\n \n
\n
\n \n ${Sn("modal.wallet.connectingMessage."+t?.type)}\n \n
\n
\n
\n
\n `}),k2.apply(this,arguments)}const KF='\n\n \n',VF='\n\n \n';function H5(t){if(!An)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Sn("modal.ledger.specifyHDPath")}\n

\n \n
\n
\n
\n
\n
\n
44'/397'/0'/0'/
\n
\n
\n
\n \n \n
\n
\n
\n

\n ${Sn("modal.ledger.enterYourPreferredHDPath")}\n

\n \n
\n \n
\n
\n
\n
\n `;const e=document.getElementById("derivation-path-index");e.innerText=An.derivationPath.slice(-2,-1),document.getElementById("increase-index-button")?.addEventListener("click",()=>{if(!An)return;const n=parseInt(e.innerText)+1;An.derivationPath=An.derivationPath.slice(0,-2)+n.toString()+"'",e.innerText=n.toString()}),document.getElementById("decrease-index-button")?.addEventListener("click",()=>{if(!An)return;const n=parseInt(e.innerText)-1;An.derivationPath=An.derivationPath.slice(0,-2)+n.toString()+"'",n>=0&&(e.innerText=n.toString())}),document.getElementById("back-button")?.addEventListener("click",()=>{L2(t)}),document.getElementById("scan-button")?.addEventListener("click",(0,Le.Z)(function*(){try{const n=yield t.wallet();V5(t);const o=yield Y5(n);if(!o||o.length<1)return K5(t);1===o.length&&N2(t,o,o),D2(t,o)}catch(n){yield x1(t,n)}}))}const HF='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';function L2(t){An&&(An.derivationPath=q5,document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Sn("modal.ledger.connectWithLedger")}\n

\n \n
\n
\n
\n
\n
\n ${HF}\n
\n
\n

${Sn("modal.ledger.makeSureYourLedger")}

\n

${Sn("modal.ledger.specifyHDPath")}

\n
\n
\n
\n
\n
\n `,document.getElementById("continue-button")?.addEventListener("click",()=>{Fy(t,!1)}),document.getElementById("specify-derivation-path-button")?.addEventListener("click",()=>{H5(t)}))}const zF='\n\n \n \n \n \n \n \n \n',WF='\n\n \n \n \n';function z5(t){if(!An)return;let e="";return"injected"===t.type&&(e=t.metadata.downloadUrl),"browser"===t.type&&(e=t.metadata.walletUrl),e}function W5(){return F2.apply(this,arguments)}function F2(){return(F2=(0,Le.Z)(function*(){if(!An)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n \n
\n

${Sn("modal.wallet.getAWallet")}

\n \n
\n
\n
\n\n
\n
\n
\n `;const e=An.modules.filter(n=>"bridge"!==n.type&&"hardware"!==n.type&&"instant-link"!==n.type);for(let n=0;n\n
\n ${o&&m?`${zF}`:!o&&m?`${WF}`:""}\n\n
\n
\n
\n
\n
${e[n].metadata.name}
\n
${Sn(`modal.walletTypes.${l||e[n].type}`)}
\n
\n \n`)}Array.from(document.querySelectorAll(".single-wallet-get")).forEach(n=>{n.addEventListener("click",()=>{if(!An)return;const o=An.modules.find(m=>m.id===n.id);if(!o)return;const l=z5(o);l&&window.open(l,"_blank")})}),document.getElementById("back-button")?.addEventListener("click",()=>{B2()})})).apply(this,arguments)}const GF='\n\n \n',ZF='\n\n \n \n \n';function B2(){return j2.apply(this,arguments)}function j2(){return(j2=(0,Le.Z)(function*(){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n
\n

${Sn("modal.wallet.whatIsAWallet")}

\n \n
\n
\n\n
\n
\n
\n ${GF}\n
\n
\n

${Sn("modal.wallet.secureAndManage")}

\n

${Sn("modal.wallet.safelyStore")}

\n
\n
\n\n
\n
\n ${ZF}\n
\n
\n

${Sn("modal.wallet.logInToAny")}

\n

${Sn("modal.wallet.noNeedToCreate")}

\n
\n
\n\n
\n \n
\n\n
\n

\n ${Sn("modal.wallet.useAWallet")}\n

\n \n
\n\n
\n \n
\n\n
\n
\n `,document.getElementById("get-a-wallet-button")?.addEventListener("click",()=>{W5()}),document.getElementById("get-a-wallet-button-mobile")?.addEventListener("click",()=>{W5()})})).apply(this,arguments)}const JF='\n\n \n \n';function G5(){return U2.apply(this,arguments)}function U2(){return U2=(0,Le.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n ${JF}\n \n ${Sn("modal.wallet.connectionSuccessful")}\n \n
\n
\n
\n
\n `}),U2.apply(this,arguments)}var QF=y(89093),qF=y.n(QF),XF=y(3259);const $F='\n\n \n \n';function K2(){return K2=(0,Le.Z)(function*(t,e){function o(){return(o=(0,Le.Z)(function*(oe){return yield XF.toString(oe,{margin:0,type:"svg"})})).apply(this,arguments)}const l=yield function n(oe){return o.apply(this,arguments)}(e.uri);document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Sn("modal.qr.scanWithYourMobile")}

\n \n
\n
\n
\n ${l}\n
\n
\n
\n ${$F}\n ${Sn("modal.qr.copyToClipboard")}\n
\n
\n
\n

${Sn("modal.qr.preferTheOfficial")} ${t.metadata.name}?

\n \n
\n
\n
\n`,document.getElementById("continue-button")?.addEventListener("click",()=>{Fy(t,!1)});const m=document.getElementById("copy-uri-to-clipboard"),N=document.getElementById("uri-copy-notification"),J=oe=>{N&&m&&(N.innerHTML=oe,N.style.display="block",m.style.display="none")},ee=()=>{N&&m&&(m.style.display="flex",N.style.display="none")};document.getElementById("copy-uri-to-clipboard")?.addEventListener("click",()=>{e.uri&&(qF()(e.uri)?(J(Sn("modal.qr.copiedToClipboard")),setTimeout(()=>ee(),1200)):(J(Sn("modal.qr.failedToCopy")),setTimeout(()=>ee(),1200)))}),document.getElementById("default-modal-trigger")?.addEventListener("click",()=>{e.handleOpenDefaultModal()})}),K2.apply(this,arguments)}const tB='\n\n \n \n \n ';let Z5=!0;const nB=function(){var t=(0,Le.Z)(function*(e){if(!An)return[];const n=yield fetch(`${An.selector.options.network.indexerUrl}/publicKey/ed25519:${e}/accounts`);if(!n.ok)throw new Error("Failed to get account id from public key");const o=yield n.json();return Array.isArray(o)&&o.length?o:[]});return function(n){return t.apply(this,arguments)}}(),Y5=function(){var t=(0,Le.Z)(function*(e){if(!An)return[];const n=yield e.getPublicKey(An.derivationPath);try{return(yield nB(n)).map((l,m)=>({derivationPath:An.derivationPath,publicKey:n,accountId:l,selected:0===m}))}catch{return null}});return function(n){return t.apply(this,arguments)}}();function Fy(t){return V2.apply(this,arguments)}function V2(){return V2=(0,Le.Z)(function*(t,e=!1){if(!An)return;const{selectedWalletId:n}=An.selector.store.getState();if(n!==t.id)try{if("injected"===t.type&&!t.metadata.available)return function YF(t){An&&(document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n

\n ${t.metadata.name}\n

\n
\n

\n ${Sn("modal.install.youllNeedToInstall")} ${t.metadata.name}\n ${Sn("modal.install.toContinueAfterInstalling")}\n  \n ${Sn("modal.install.refreshThePage")}\n \n

\n
\n \n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{B2()}),document.getElementById("refresh-page-lint")?.addEventListener("click",()=>{window.location.reload()}),document.getElementById("download-button")?.addEventListener("click",()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")}))}(t);if(t.metadata.deprecated)return x1(t,new Error("Wallet is deprecated"));const o=yield t.wallet();if(yield V5(t),"hardware"===o.type){const l=yield Y5(o);return!l||l.length<1?K5(t):1===l.length?N2(t,l,l):D2(t,l)}if("bridge"===o.type){const l=An.selector.on("uriChanged",({uri:m})=>{!function eB(t,e){return K2.apply(this,arguments)}(t,{uri:m,handleOpenDefaultModal:()=>{Fy(t,!0)}})});return yield o.signIn({contractId:An.options.contractId,methodNames:An.options.methodNames,qrCodeModal:e}),l.remove(),An.container.children[0].classList.remove("open"),void An.emitter.emit("onHide",{hideReason:"wallet-navigation"})}if("browser"===o.type)return yield o.signIn({contractId:An.options.contractId,methodNames:An.options.methodNames,successUrl:o.metadata.successUrl,failureUrl:o.metadata.failureUrl}),An.container.children[0].classList.remove("open"),void An.emitter.emit("onHide",{hideReason:"wallet-navigation"});yield o.signIn({contractId:An.options.contractId,methodNames:An.options.methodNames}),An.container.children[0].classList.remove("open"),An.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(o){const{name:l}=t.metadata,m=o instanceof Error?o.message:"Something went wrong";yield x1(t,new Error(`Failed to sign in with ${l}: ${m}`))}else G5(t)}),V2.apply(this,arguments)}function D1(t,e){if(An)for(let n=0;n\n
${l}
\n
\n
${l}
\n
${m}
\n
\n ${o.metadata.deprecated?`\n
\n ${tB}\n
\n `:""}\n \n `),document.getElementById("module-"+o.id)?.addEventListener("click",()=>{if(document.querySelectorAll(".selected-wallet").forEach(J=>{J.classList.remove("selected-wallet")}),document.getElementById("module-"+o.id)?.classList.add("selected-wallet"),"hardware"===o.type)return L2(o);Fy(o,!1)})}}function J5(){if(!An)return;An.container.innerHTML=`\n
\n
\n
\n \n \n
\n
\n `;const t=[],e=[];An.modules.forEach(n=>{An?.selector.store.getState().recentlySignedInWallets.includes(n.id)?e.push(n):t.push(n)}),An.selector.options.optimizeWalletOrder&&e.length>0?(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
Recent
\n
\n
\n '),document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
More
\n
\n
\n '),D1(".recent-options-list-content",e),An.selector.options.randomizeWalletOrder?D1(".more-options-list-content",t.sort(()=>Math.random()-.5)):D1(".more-options-list-content",t)):(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'
'),D1(".options-list",An.modules)),document.querySelector(".nws-modal-overlay")?.addEventListener("click",()=>{An&&(An.container.children[0].classList.remove("open"),An.emitter.emit("onHide",{hideReason:"user-triggered"}))}),Z5&&(document.addEventListener("click",n=>{if(!An)return;const o=n.target;o&&"close-button"===o.className&&(An.container.children[0].classList.remove("open"),An.emitter.emit("onHide",{hideReason:"user-triggered"}))}),Z5=!1)}const Q5="near-wallet-selector-modal",q5="44'/397'/0'/0'/1'";let H2=null,An=null;if(typeof window<"u"){const t=document.createElement("div");t.id=Q5,document.body.appendChild(t)}const rB=(t,e)=>{const n=new _2;An={container:document.getElementById(Q5),selector:t,options:e,route:{name:"WalletOptions"},modules:[],derivationPath:q5,emitter:n},An.selector.store.observable.subscribe(l=>{An&&(t.options.optimizeWalletOrder&&(l.modules.sort((m,N)=>m.metadata.deprecated===N.metadata.deprecated?0:m.metadata.deprecated?1:-1),l.modules.sort((m,N)=>N.metadata.available===m.metadata.available?0:N.metadata.available?1:-1)),An.modules=l.modules)});return window.addEventListener("keydown",l=>{if("Escape"===l.key){if(!An)return;An.container.children[0].classList.remove("open"),An.emitter.emit("onHide",{hideReason:"user-triggered"})}}),J5(),H2||(H2={show:()=>{if(!An)return;(t=>{j5=t})(An.selector.options.languageCode),J5();const l=An.selector.store.getState().selectedWalletId;if(l){G5(An.modules.find(N=>N.id===l))}else B2();An.container.children[0].classList.add("open")},hide:()=>{An&&An.container.children[0].classList.remove("open")},on:(l,m)=>An.emitter.on(l,m),off:(l,m)=>{An.emitter.off(l,m)}}),H2};var hp=y(98538),fr=y.n(hp);const{transactions:rc,utils:z2}=Zn,al=t=>{switch(t.type){case"CreateAccount":return rc.createAccount();case"DeployContract":{const{code:e}=t.params;return rc.deployContract(e)}case"FunctionCall":{const{methodName:e,args:n,gas:o,deposit:l}=t.params;return rc.functionCall(e,n,new hp.BN(o),new hp.BN(l))}case"Transfer":{const{deposit:e}=t.params;return rc.transfer(new hp.BN(e))}case"Stake":{const{stake:e,publicKey:n}=t.params;return rc.stake(new hp.BN(e),z2.PublicKey.from(n))}case"AddKey":{const{publicKey:e,accessKey:n}=t.params;return rc.addKey(z2.PublicKey.from(e),(t=>{if("FullAccess"===t)return rc.fullAccessKey();const{receiverId:e,methodNames:n=[]}=t,o=t.allowance?new hp.BN(t.allowance):void 0;return rc.functionCallAccessKey(e,n,o)})(n.permission))}case"DeleteKey":{const{publicKey:e}=t.params;return rc.deleteKey(z2.PublicKey.from(e))}case"DeleteAccount":{const{beneficiaryId:e}=t.params;return rc.deleteAccount(e)}default:throw new Error("Invalid action type")}},ic=function(){var t=(0,Le.Z)(function*(e,n,o){const l=new Zn.providers.JsonRpcProvider({url:o.nodeUrl}),m=[];for(let N=0;Nal(Re)),ge=Zn.transactions.createTransaction(e[N].signerId,Zn.utils.PublicKey.from(J.toString()),e[N].receiverId,oe.nonce+N+1,ue,Zn.utils.serialize.base_decode(ee.header.hash)),Ie=yield Zn.transactions.signTransaction(ge,n,e[N].signerId,o.networkId);m.push(Ie[1])}return m});return function(n,o,l){return t.apply(this,arguments)}}(),oB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAD8UExURUdwTGx5rpLO8YOYx1Og0ly29X5ezR4mT0tiji4eWJ953KGn1Jxs7qB9xvfD/Us0gduu8yeh4HOq74dD647R91256eSz+j82cbvg/dSj/LuL79Wp6zCf24KN9xANGRANF59d/0W+/taa/8iN/3HL9uOn/z638Bil7l3G84TP+FHB8o5A/0i9/ZjU+47S+vq8/4Qy/S6w8O+x/5Rp/wyg7G2T/s+T/vO2/+qt/1qp/qDV/HyD/ki4+4R7/qnY/tyh/1Gx/ptU/76E/2bJ9Ld8/4t0/pxe+XvN9iOq7rB0/0i88aRk/6ps/z++/naL/mab/mGh/pVM/wub5mGd+fAEOhEAAAAgdFJOUwBEyWKA47EKJhnFluGA6l3H67Du6crdNOXs5q/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Q8lNVp/Ae3lvUUiavz/+u9d+qzOvsKEpvN3jmq2ferN7nk1XW1WGDq2SRMpsN6ukDt5zq7cMww6g+bbMd4PegaDzLfPpMu4dbdU+vPPoMnvyGxbAzecNGYKVvdNV6uB9CYq0wLPFNh00ZIM/EfCoDddlb1/C5d6VpP7B+XnqjgeKK1AuvVnLh2DSrd5a8xAx69rw8GRFy9JquRuuKIvp5viphz1ddzzqt/8YAVN2dPaavTz/WUzeVtuyARfhFmeSAU3Zw6xoxBNymlNtLqm0Il8NpZX9b93M9r/trOe815+GCHVZzdbTr8DKwJWL0otWgdRd9galxGiJVAJ4EgYpEPa3yVjzvNfZWctWePa/j/+8ZvOXL3oWIPSluTTXo1oRs5KTQ8otDVXdKmEf8deeTdf6rrCWLv31c7b5KlqZX9j84321DPfAPKd6NatGTqsvATydhFDWapwKxEf4Zvbv0b5JdzbbrL+QVki6cjq5v+azBK5AMrIIkiXq8aEycE1e1xv9rF+nky+Hypw1Ci4U/PHWsExrVjzDd3CJZf4EqEwlLLJskmWJW31fVoyGXTJK30WsWXUqKiXMWj4Nqv/LA9oVtF57L5s3hHEYmRtquPQlHrvwoKklalV/Stb/ZqjMyaivptalbKRbCHGpgyDxn2hxCRrkNFLCkGrxt0NlqvFjqvGSOpZx8QxCy2+V+mtiUI3KqgOCLSA1yb4DUgSvrbYSNbpsWCYyeCCU8lOaW8Cpt+k3QsrhpW9AA2CWXLWguXJtL7IKW4MA1E5xavHdoPKGRhFspRADWkkMV+0WQ+D8g5vA6l97n35XoJCjmb7rS/Y5YMYaRGCTvpY/zb45UKQmgWQ7hRl5dj8wXaPZQr/PQeGTLfQLHn5A+Xl+np/n53nC8x/tAMljWkeBnAAAAABJRU5ErkJggg==",X5=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},sB=function(){var t=(0,Le.Z)(function*(e,n){const o=new Zn.keyStores.BrowserLocalStorageKeyStore,l=yield Zn.connect({keyStore:o,walletUrl:e.walletUrl,...n,headers:{}});return{wallet:new Zn.WalletConnection(l,"near_app"),keyStore:o}});return function(n,o){return t.apply(this,arguments)}}(),aB=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:o,params:l,logger:m,id:N}){const J=yield sB(l,n.network),ee=function(){var ue=(0,Le.Z)(function*(){const ge=J.wallet.getAccountId(),Ie=J.wallet.account();if(!ge||!Ie)return[];const Re=yield Ie.connection.signer.getPublicKey(Ie.accountId,n.network.networkId);return[{accountId:ge,publicKey:Re?Re.toString():""}]});return function(){return ue.apply(this,arguments)}}(),oe=function(){var ue=(0,Le.Z)(function*(ge){const Ie=J.wallet.account(),{networkId:Re,signer:Te,provider:ke}=Ie.connection,Ue=yield Te.getPublicKey(Ie.accountId,Re);return Promise.all(ge.map(function(){var Ge=(0,Le.Z)(function*(nt,Xe){const St=nt.actions.map(Nn=>al(Nn)),kt=yield Ie.accessKeyForTransaction(nt.receiverId,St,Ue);if(!kt)throw new Error(`Failed to find matching key for transaction sent to ${nt.receiverId}`);const un=yield ke.block({finality:"final"});return Zn.transactions.createTransaction(Ie.accountId,Zn.utils.PublicKey.from(kt.public_key),nt.receiverId,kt.access_key.nonce+Xe+1,St,Zn.utils.serialize.base_decode(un.header.hash))});return function(nt,Xe){return Ge.apply(this,arguments)}}()))});return function(Ie){return ue.apply(this,arguments)}}();return{signIn:({contractId:ue,methodNames:ge,successUrl:Ie,failureUrl:Re})=>(0,Le.Z)(function*(){const Te=yield ee();return Te.length?Te:(yield J.wallet.requestSignIn({contractId:ue,methodNames:ge,successUrl:Ie,failureUrl:Re}),ee())})(),signOut:()=>(0,Le.Z)(function*(){J.wallet.isSignedIn()&&J.wallet.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return ee()})(),verifyOwner:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:ue,nonce:ge,recipient:Ie,callbackUrl:Re,state:Te})=>(0,Le.Z)(function*(){if(m.log("sign message",{message:ue}),"my-near-wallet"!==N)throw Error(`The signMessage method is not supported by ${e.name}`);const ke=typeof window<"u"?window.location.href:"",Ue=Re||ke;if(!Ue)throw new Error(`The callbackUrl is missing for ${e.name}`);const Ge=new URL(l.walletUrl);Ge.pathname="sign-message",Ge.searchParams.append("message",ue),Ge.searchParams.append("nonce",ge.toString()),Ge.searchParams.append("recipient",Ie),Ge.searchParams.append("callbackUrl",Ue),Te&&Ge.searchParams.append("state",Te),window.location.replace(Ge.toString())})(),signAndSendTransaction:({signerId:ue,receiverId:ge,actions:Ie,callbackUrl:Re})=>(0,Le.Z)(function*(){m.log("signAndSendTransaction",{signerId:ue,receiverId:ge,actions:Ie,callbackUrl:Re});const{contract:Te}=o.getState();if(!J.wallet.isSignedIn()||!Te)throw new Error("Wallet not signed in");return J.wallet.account().signAndSendTransaction({receiverId:ge||Te.contractId,actions:Ie.map(Ue=>al(Ue)),walletCallbackUrl:Re})})(),signAndSendTransactions:({transactions:ue,callbackUrl:ge})=>(0,Le.Z)(function*(){if(m.log("signAndSendTransactions",{transactions:ue,callbackUrl:ge}),!J.wallet.isSignedIn())throw new Error("Wallet not signed in");return J.wallet.requestSignTransactions({transactions:yield oe(ue),callbackUrl:ge})})(),buildImportAccountsUrl:()=>`${l.walletUrl}/batch-import`}});return function(n){return t.apply(this,arguments)}}();function T1({walletUrl:t,iconUrl:e=oB,deprecated:n=!1,successUrl:o="",failureUrl:l=""}={}){return function(){var m=(0,Le.Z)(function*(N){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:e,deprecated:n,available:!0,successUrl:o,failureUrl:l,walletUrl:X5(N.options.network,t)},init:J=>aB({...J,params:{walletUrl:X5(J.options.network,t)}})}});return function(N){return m.apply(this,arguments)}}()}const uB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAQAAADTdEb+AAAABGdBTUEAALGPC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Hu8Iy2ofnaKHk0R/Chx1n0s37TYPCM1ZLCirAvr/dLB8FKoyxsH6AAUMIUW7xQPDJawVklURY2K/Q6nBRIekVcAT4SscUa5mg4isJlIjnnCqM9qBqYcDDA5lJc5V/OCwrPIZHf82mCr0YrdR99u4h0rarRxILuQrB2W1m15Wp46uM7i5aCGXa7dvgDmd6Q7Na33LdXYCasaL5CbsPJvMsq8lQ8SpTnfWGxZVLi/Zfy1XhU58nsCjfAEf0jG8BbqCc3jF2KueIj6nc6JvT+rSja9szG4d4lNup5Z2e4b8TGWu5HX2JiiqAr6im6mDHerSlVkWqvZuYQY3hKJyIVVpx0RW2Xzm2sEsusYnqqR4/giAKrSgA+05h4ZUL/cAzSIOsIWlzGcBazms3YYhUWnERVzB+ZxOLSrH/OtictnKMj7jU1ZTEJ+L+IVVQmUa0oJWnEUT6pFOVSCfHHawnlV8zxq2uXJnbsjx1KUpLWlJU06mNmnHPAsXk08OO9nAKpazmq3WNjb/PwtMam6w6l9KAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTIyVDE3OjM1OjQ4KzAwOjAwUOMNpQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0yMlQxNzozNTo0OCswMDowMCG+tRkAAAAASUVORK5CYII=",cB=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://wallet.near.org";case"testnet":return"https://wallet.testnet.near.org";default:throw new Error("Invalid wallet url")}};function $5({walletUrl:t,iconUrl:e=uB,deprecated:n=!1,successUrl:o="",failureUrl:l=""}={}){return function(){var m=(0,Le.Z)(function*(N){const J=yield T1({walletUrl:cB(N.options.network,t),iconUrl:e,successUrl:o,failureUrl:l})(N);return J?{...J,id:"near-wallet",metadata:{...J.metadata,name:"NEAR Wallet",description:"Web wallet for NEAR Protocol",iconUrl:e,deprecated:n,available:!0}}:null});return function(N){return m.apply(this,arguments)}}()}var na=y(48214),e8=y.n(na);const lB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA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NfJsBIZ+kdOkzgpft6gst2rRx7RDqNUifi6RFHoHLIu4GC80uDwSB60Jp8/abmiV3ScZQ6FU8XB5C/0AWDqmcMmVs2JqqekA6iVG95vDjMDDj1BgfjJRA1JsNV30acrHQcpfrC08XB4JkOHG9kQbSmOzzkzo74iAPSYZTqDwd+ropjZuyFkQX0vCSd443ol4Tg3LbEmOekkyh1Ojw74sjZzCTjlNuijK1saG57S+RX0lGUKgbPFkfA2AksP6D6Gxm6M/hy1Zr136ScdBilisWzxcFEE+Tui1IBhG8jm29qWz7RYZdLSp0+zxYHmMYIfaPyBxBuTbZEnpE+BUqVineLg/jsMvdGFwh1yZbqB6UPXalS825xMM4u0+scYcKyUDi8ZH18dLf0YStVDt4tDmBkaf96YgKtNblC3YYV49PSB6tUOXm5OEq5VOBGNmZOsnnc76UPUikJXi6OyhL8nS8zsKg9HLlPp4krP/NycRRvxzZGDmTuMWF7x8Z49avSB6aUNM8WBwPBIk3/+o21NHfT0qpnpY9JKafwbHEQkAMQPo2/YBsKPC+5ZPzPpY9FKadxytMcxUf9m+LNwAEQ1eVD3dO1NJQ6Ps+OOMDcpy0EGLAG+E4+j8YtyyJ7pOMr5WSeLQ4GDhBwZi9//EnLdk5764S/SOdWyg08WxwE7Acw7hQ/9jwbqm9vrvqBbtasVO95tjgA2neih9wY6CGiFchWJtqXjzosnVQpt/FwcfCJdj37KeVofnJ5pFM6oVJu5dniIJg049jJndxOZOa0tUQel86mlNt5tjiYOQ0CGNhHTLclt0e+gbVUkM6llBd4tjgIpsPCftX2HL5988pp+6XzKOUl/w9vbeT/L2dfMwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNi0yM1QxMjoxMzo0MiswMDowMIbbr3kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDYtMjNUMTI6MTM6NDIrMDA6MDD3hhfFAAAAAElFTkSuQmCC",fB=()=>nc(()=>!!window.near?.isSender).catch(()=>!1),hB=function(){var t=(0,Le.Z)(function*({options:e,metadata:n,store:o,provider:l,emitter:m,logger:N}){const J={wallet:window.near},oe=function(){var ke=(0,Le.Z)(function*(){if(!J.wallet.isSignedIn())return;(()=>{for(const ke in J.wallet.callbacks)J.wallet.remove(ke)})();const Ue=yield J.wallet.signOut();if(!0===Ue)return;const Ge=new Error("string"==typeof Ue.error?Ue.error:Ue.error.type);if("User reject"===Ge.message)throw Ge;N.log("Failed to sign out"),N.error(Ge)});return function(){return ke.apply(this,arguments)}}(),ue=()=>{J.wallet.on("accountChanged",function(){var ke=(0,Le.Z)(function*(Ue){N.log("onAccountChange",Ue),m.emit("signedOut",null)});return function(Ue){return ke.apply(this,arguments)}}()),J.wallet.on("rpcChanged",function(){var ke=(0,Le.Z)(function*(Ue){N.log("onNetworkChange",Ue),e.network.networkId!==Ue.networkId&&(yield oe(),m.emit("signedOut",null),m.emit("networkChanged",{networkId:Ue.networkId}))});return function(Ue){return ke.apply(this,arguments)}}())},ge=function(){var ke=(0,Le.Z)(function*(){const{selectedWalletId:Ue}=o.getState();Ue&&(yield nc(()=>!!J.wallet?.isSignedIn(),{timeout:1e3}).catch());const Ge=J.wallet.getAccountId();if(!Ge)return[];yield nc(()=>!!J.wallet.account(),{timeout:100});const nt=J.wallet.account();if(!nt.connection.signer.getPublicKey)return[{accountId:Ge,publicKey:void 0}];const Xe=yield nt.connection.signer.getPublicKey(nt.accountId,e.network.networkId);return[{accountId:Ge,publicKey:Xe?Xe.toString():void 0}]});return function(){return ke.apply(this,arguments)}}(),Re=ke=>{if(!(ke=>ke.every(Ue=>"FunctionCall"===Ue.type))(ke))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return ke.map(Ge=>Ge.params)},Te=ke=>ke.map(Ue=>({receiverId:Ue.receiverId,actions:Re(Ue.actions)}));return J.wallet&&J.wallet.isSignedIn()&&ue(),{signIn:({contractId:ke,methodNames:Ue})=>(0,Le.Z)(function*(){const Ge=yield ge();if(Ge.length)return Ge;const{accessKey:nt,error:Xe}=yield J.wallet.requestSignIn({contractId:ke,methodNames:Ue});if(!nt||Xe)throw yield oe(),new Error(("string"==typeof Xe?Xe:Xe.type)||"Failed to sign in");return ue(),yield ge()})(),signOut:oe,getAccounts:()=>(0,Le.Z)(function*(){return ge()})(),verifyOwner:({message:ke})=>(0,Le.Z)(function*(){N.log("Sender:verifyOwner",{message:ke});const Ue=J.wallet.account();if(!Ue)throw new Error("Wallet not signed in");if(!Ue.connection.signer.signMessage)throw new Error("Wallet is locked");const Ge=e.network.networkId,nt=Ue.accountId,Xe=yield Ue.connection.signer.getPublicKey(nt,Ge),St=yield l.block({finality:"final"}),kt={accountId:nt,message:ke,blockId:St.header.hash,publicKey:Buffer.from(Xe.data).toString("base64"),keyType:Xe.keyType},un=JSON.stringify(kt),Nn=yield Ue.connection.signer.signMessage(new Uint8Array(Buffer.from(un)),nt,Ge);return{...kt,signature:Buffer.from(Nn.signature).toString("base64"),keyType:Nn.publicKey.keyType}})(),signAndSendTransaction:({signerId:ke,receiverId:Ue,actions:Ge})=>(0,Le.Z)(function*(){N.log("signAndSendTransaction",{signerId:ke,receiverId:Ue,actions:Ge});const{contract:nt}=o.getState();if(!J.wallet.isSignedIn()||!nt)throw new Error("Wallet not signed in");return J.wallet.signAndSendTransaction({receiverId:Ue||nt.contractId,actions:Re(Ge)}).then(Xe=>{if(Xe.error)throw new Error(Xe.error);if(Xe.response&&"error"in Xe.response)throw new Error(Xe.response.error.message);if(!Xe.response?.length)throw new Error("Invalid response");return Xe.response[0]})})(),signAndSendTransactions:({transactions:ke})=>(0,Le.Z)(function*(){if(N.log("signAndSendTransactions",{transactions:ke}),!J.wallet.isSignedIn())throw new Error("Wallet not signed in");return J.wallet.requestSignTransactions({transactions:Te(ke)}).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(Ue.response&&"error"in Ue.response)throw new Error(Ue.response.error.message);if(!Ue.response?.length)throw new Error("Invalid response");return Ue.response})})(),importAccountsInSecureContext:({accounts:ke})=>(0,Le.Z)(function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:ke,network:e.network.networkId}))})()}});return function(n){return t.apply(this,arguments)}}();function t8({iconUrl:t=lB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,na.isMobile)())return null;const o=yield fB();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:e,available:o},init:hB}})}const pB="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iYXV0byIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTQuMjYyNyAxMy40MDEzQzEyLjQyMjcgMTQuNTMwNyA5Ljk1OTg3IDE1LjExMjQgNy40NjU1OCAxNC45ODgxQzUuMzY4NDQgMTQuODg2NSAzLjY0ODQ0IDE0LjE0MTEgMi42MDg0NCAxMi45MTU3QzEuNjk0MTYgMTEuODIwMSAxLjMzOTg3IDEwLjM3NDUgMS41Nzk4NyA4LjcxMTQzQzEuNjYxMjEgOC4xNTg3NCAxLjgyNzkxIDcuNjIxNjYgMi4wNzQxNSA3LjExODk2TDIuMTA4NDQgNy4wNDgzN0MyLjk3MTcgNS40MDU5NSA0LjI1MjgyIDQuMDEzOTcgNS44MjU3MyAzLjAwOTQyQzcuMzk4NjQgMi4wMDQ4NiA5LjIwOTEzIDEuNDIyMzYgMTEuMDc5IDEuMzE5MjRDMTIuOTQ4OSAxLjIxNjExIDE0LjgxMzcgMS41OTU5MiAxNi40OSAyLjQyMTI4QzE4LjE2NjIgMy4yNDY2NSAxOS41OTYxIDQuNDg5MTIgMjAuNjM4OSA2LjAyNjQxQzIxLjY4MTcgNy41NjM3MSAyMi4zMDE1IDkuMzQyODUgMjIuNDM3MyAxMS4xODg3QzIyLjU3MzEgMTMuMDM0NiAyMi4y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4IDE4LjEwMzQgMTEuMjkyMyAxOC42ODU2IDExLjI5MjNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+Cjwvc3ZnPgo=",gB=function(){var t=(0,Le.Z)(function*(e,n){const{selectedWalletId:o}=e.getState(),l=window.xfi.near;return"xdefi"===o&&(yield l.connect(n.networkId).catch(()=>null)),{wallet:l,network:n}});return function(n,o){return t.apply(this,arguments)}}(),yB=()=>nc(()=>!!window.xfi?.near).catch(()=>!1),mB=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,logger:o,options:l}){const m=yield gB(n,l.network),N=()=>m.wallet.accounts?m.wallet.accounts:[],J=ee=>{const oe=N(),{contract:ue}=n.getState();if(!oe.length||!ue)throw new Error("Wallet not signed in");return ee.map(ge=>({signerId:ge.signerId||oe[0].accountId,receiverId:ge.receiverId||ue.contractId,actions:ge.actions}))};return{signIn:()=>(0,Le.Z)(function*(){const ee=N().map(oe=>({accountId:oe.accountId,publicKey:oe.publicKey.toString()}));return ee.length?ee:(yield m.wallet.connect(m.network.networkId),N().map(oe=>({accountId:oe.accountId,publicKey:oe.publicKey.toString()})))})(),signOut:()=>(0,Le.Z)(function*(){yield m.wallet.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return N().map(ee=>({accountId:ee.accountId,publicKey:ee.publicKey.toString()}))})(),verifyOwner:({message:ee})=>(0,Le.Z)(function*(){throw o.log("XDEFI:verifyOwner",{message:ee}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:ee=>(0,Le.Z)(function*(){o.log("signAndSendTransaction",ee);const{contract:oe}=n.getState();if(!N().length||!oe)throw new Error("Wallet not signed in");return yield m.wallet.signAndSendTransaction(J([ee])[0])})(),signAndSendTransactions:({transactions:ee})=>(0,Le.Z)(function*(){return o.log("signAndSendTransactions",{transactions:ee}),yield m.wallet.signAndSendTransactions(J(ee))})()}});return function(n){return t.apply(this,arguments)}}();function n8({iconUrl:t=pB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,na.isMobile)())return null;const o=yield yB();return{id:"xdefi",type:"injected",metadata:{name:"XDEFI Wallet",description:"One wallet for all your Crypto",iconUrl:t,downloadUrl:"https://www.xdefi.io",deprecated:e,available:o},init:mB}})}const AB=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:o,provider:l,logger:m}){const N={wallet:window.nearWalletApi},J=function(){var oe=(0,Le.Z)(function*(){const ue=N.wallet.signer.account;return ue?[{accountId:ue.accountId,publicKey:ue.publicKey}]:[]});return function(){return oe.apply(this,arguments)}}(),ee=oe=>{const{contract:ue}=o.getState();if(!ue)throw new Error("Wallet not signed in");const ge=Df(o.getState());if(!ge)throw new Error("No active account");return oe.map(Ie=>({signerId:Ie.signerId||ge.accountId,receiverId:Ie.receiverId||ue.contractId,actions:Ie.actions}))};return{signIn:({contractId:oe})=>(0,Le.Z)(function*(){const ue=yield J();return ue.length?ue:(yield N.wallet.login({contractId:oe}),J())})(),signOut:()=>(0,Le.Z)(function*(){yield N.wallet.logout()})(),getAccounts:()=>(0,Le.Z)(function*(){return J()})(),verifyOwner:({message:oe})=>(0,Le.Z)(function*(){m.log("MathWallet:verifyOwner",{message:oe});const ue=Df(o.getState());if(!ue)throw new Error("No active account");const ge=ue.accountId,Ie=yield N.wallet.signer.getPublicKey(ge),Re=yield l.block({finality:"final"}),Te={accountId:ge,message:oe,blockId:Re.header.hash,publicKey:Buffer.from(Ie.data).toString("base64"),keyType:Ie.keyType};JSON.stringify(Te);throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:oe,receiverId:ue,actions:ge})=>(0,Le.Z)(function*(){m.log("signAndSendTransaction",{signerId:oe,receiverId:ue,actions:ge});const Ie=yield ic(ee([{signerId:oe,receiverId:ue,actions:ge}]),N.wallet.signer,n.network);return l.sendTransaction(Ie[0])})(),signAndSendTransactions:({transactions:oe})=>(0,Le.Z)(function*(){m.log("signAndSendTransactions",{transactions:oe});const ue=yield ic(ee(oe),N.wallet.signer,n.network);m.log("signAndSendTransactions:signedTransactions",ue);const ge=[];for(let Ie=0;Ie(0,Le.Z)(function*(){if((0,na.isMobile)())return null;const o=yield!!window.nearWalletApi;return{id:"math-wallet",type:"injected",metadata:{name:"Math Wallet",description:"World's First Insured Crypto Wallet.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc",deprecated:e,available:o},init:AB}}),EB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAACklpQ0NQc1JHQiBJRUM2MTk2Ni0yLjEAAEiJnVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AAC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Qq1aQAWAtPREUgfVzYB89BffVIW1ZIda7UZbda8FtiV3KYklIPAN7HZqhcLyRYAP8uBicDVwIYkt8VJPkJPi8cBS5PcFmDgCICf59Ari9eS5C/DZjajHWonoT2pkhjNEEiipoHRsrzrZz5wCTrIoSCpLYqeRuBP6Lm84/P5WEmUIShe0tHrCtegzaIDVXABVqOF90WS7CMRCQP5Qfakle5eoRi4GPgEMAs4PYntAq28bkSnX38NHZE7aBgsPUBfTEGbms9BTysnAx6H6jLRitz76Be+ruv3Qctg6QH6YlvXz2+6/i5AzygmAROAUqAQyAKygRQgDeidBM6H9q/rQDteNKEtclVAOdoDZwd6CnfS8P9uV4QPHOBjVAAAAABJRU5ErkJggg==",SB=function(){var t=(0,Le.Z)(function*(e,n){const{selectedWalletId:o}=e.getState(),l=window.nightly.near;return"nightly"===o&&(yield l.connect(m=>{m?n.emit("accountsChanged",{accounts:[{accountId:m.accountId,publicKey:l.account.publicKey.toString()}]}):n.emit("signedOut",null)},!0).catch(()=>null)),{wallet:l}});return function(n,o){return t.apply(this,arguments)}}(),_B=()=>nc(()=>!!window.nightly?.near).catch(()=>!1),MB=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:o,logger:l,provider:m,emitter:N}){const J=yield SB(o,N),ee=()=>{const{accountId:ge,publicKey:Ie}=J.wallet.account;return ge?[{accountId:ge,publicKey:Ie.toString()}]:[]},oe=ge=>{const Ie=ee(),{contract:Re}=o.getState();if(!Ie.length||!Re)throw new Error("Wallet not signed in");return ge.map(Te=>({signerId:Te.signerId||Ie[0].accountId,receiverId:Te.receiverId||Re.contractId,actions:Te.actions}))},ue={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(ge=(0,Le.Z)(function*(Ie){const Te=ee().find(ke=>ke.accountId===Ie);if(!Te)throw new Error("Failed to find public key for account");return Zn.utils.PublicKey.from(Te.publicKey)}),function(Re){return ge.apply(this,arguments)}),signMessage:function(){var ge=(0,Le.Z)(function*(Ie,Re){if(!ee().find(Ue=>Ue.accountId===Re))throw new Error("Failed to find account for signing");try{const Ue=Zn.transactions.Transaction.decode(Buffer.from(Ie));return{signature:(yield J.wallet.signTransaction(Ue)).signature.data,publicKey:Ue.publicKey}}catch(Ue){throw l.log("Failed to sign message"),l.error(Ue),Error("Invalid message. Only transactions can be signed")}});return function(Re,Te){return ge.apply(this,arguments)}}()};var ge;return{signIn:()=>(0,Le.Z)(function*(){const ge=ee();return ge.length?ge:(yield J.wallet.connect(Ie=>{Ie?N.emit("accountsChanged",{accounts:[{accountId:Ie.accountId,publicKey:J.wallet.account.publicKey.toString()}]}):N.emit("signedOut",null)}),ee())})(),signOut:()=>(0,Le.Z)(function*(){yield J.wallet.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return ee()})(),verifyOwner:({message:ge})=>(0,Le.Z)(function*(){throw l.log("Nightly:verifyOwner",{message:ge}),new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:ge,nonce:Ie,recipient:Re,state:Te})=>(0,Le.Z)(function*(){return l.log("Nightly:signMessage",{message:ge,nonce:Ie,recipient:Re,state:Te}),J.wallet.isConnected||(yield J.wallet.connect()),yield J.wallet.signMessage({message:ge,nonce:Ie,recipient:Re,state:Te})})(),signAndSendTransaction:({signerId:ge,receiverId:Ie,actions:Re})=>(0,Le.Z)(function*(){l.log("signAndSendTransaction",{signerId:ge,receiverId:Ie,actions:Re});const{contract:Te}=o.getState();if(!ee().length||!Te)throw new Error("Wallet not signed in");const[Ue]=yield ic(oe([{signerId:ge,receiverId:Ie,actions:Re}]),ue,n.network);return m.sendTransaction(Ue)})(),signAndSendTransactions:({transactions:ge})=>(0,Le.Z)(function*(){l.log("signAndSendTransactions",{transactions:ge});const Ie=yield ic(oe(ge),ue,n.network),Re=[];for(let Te=0;Te(0,Le.Z)(function*(){J.wallet.importWalletsNear(ge.accounts)})()}});return function(n){return t.apply(this,arguments)}}();function i8({iconUrl:t=EB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,na.isMobile)())return null;const o=yield _B();return{id:"nightly",type:"injected",metadata:{name:"Nightly",description:"Multichain crypto wallet.",iconUrl:t,downloadUrl:"https://wallet.nightly.app/download",deprecated:e,available:o},init:MB}})}var W2=y(72235);const IB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAGbCAMAAAAlRs3KAAAC/VBMVEUAAAB1gdddWs6cq+JsadRdXalLTJhFRXtTU415iNhOTo5+pe41NXxjYM8qKmscHGuRn+MSGZl0ovJ3eL6EqPEXF19QUcFdnfNlctZZmvNvc9prbdaMsPA1NoYkJHFdXdFSg+08ReFMO9VVTdg3k/Vdk/BHSL1bXac+mPVDlvQcIqFKcupJlfQvL3lRculLS404ivJLRNw9P7dHkPIoKHQ/lPQpLapPm/RGRohmlvF0oPCBg7pFPt4UFFBOQ9AkKag0OK9Ie+04PLJYT9ZeYLtJRsc4OH9LXOE/TuIrL64kJG9dZ+EVHJxDZudFgu5AXuZHk/NHjfE9PMA2OLVQfOtLd+tQjfBrbLZ7fbFGdOs8d+1Dj/JCK9hPT49Jk/JqnvJaVc4jI3EXHptRTclVUcxOS8dUQdhNQ91SO9pZUdBLRt5WR9UgIGlLScVYU80YGFJXTNJGRcMbG1tDfO1BXOVDeexSPttJR8RVRNZDV+MUFEVTUMohIW5BaOhCcuqkoe9Eh+9DgO5CQcBCdetAX+VHT+FCbelBZedPQdxBaulITeBJS99GUeFFU+JAYeZYTtEdHWBKSd8XF04WFkseHmNCWeQTE0JEVeISEj94a+49Pr1WStRQP9xAQL5FivBCb+lFj/IfH2YZGVVBY+YaGlhGlvNEhO4VFUk5O7tGkvNFjPEPDzoRET0tMLDCv/02OLgwM7IqLa00NrZaVM8cIqAcHF4kKagyNbQhJqVCWuQODjVGmvQnK6tEQsIKCi0dHW1MR8tQSsuAcfUYGGmrqPNiXd97bfFKSN9hXNFNS9CvrPQGBiMFDJMTE2ZIRMhfWtsVG6NFRc0/QMfIxf9AlvQICFxQTtUoJ3lpZNU5OcCbmOw0NJrRzv8ZHopoYON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3u6u0LspcJoHzSdzc6G52dnQDynM3Nj4eHK8VyUrwExFzCrKztbnX20Y3PPAfNPD84eP56sVg3ZFoOGiOTeli6vbOxs7//4oS7tTcHb96+WV0tXsgYIISFZqXK6dLdmy/2nz7dwY8xZ87rt73eW/w4WFm5d6VcTso8FglzifNmvVKsoCMsnWc/h+j1egc99PPyzp3bxeJy3UqcFy3RoxtGBqlfR6544N/1DHLR0OXAnykaYljJZNI0zVQqhZ/4tzWnaeJFEARBEARBEARBEARBEARBEARBEASBMr8ADJvUZ0bGgJQAAAAASUVORK5CYII=",CB=function(){var t=(0,Le.Z)(function*(e,n){const o=new Zn.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),l=yield Zn.connect({keyStore:o,...n,headers:{}});return{wallet:new W2.MeteorWallet({near:l,appKeyPrefix:"near_app"}),keyStore:o}});return function(n,o){return t.apply(this,arguments)}}(),xB=function(){var t=(0,Le.Z)(function*({options:e,logger:n,store:o,params:l}){const m=yield CB(l,e.network),N=function(){var ee=(0,Le.Z)(function*(){const oe=m.wallet.getAccountId(),ue=m.wallet.account();if(!oe||!ue)return[];const ge=yield ue.connection.signer.getPublicKey(ue.accountId,e.network.networkId);return[{accountId:oe,publicKey:ge?ge.toString():""}]});return function(){return ee.apply(this,arguments)}}(),J=function(){var ee=(0,Le.Z)(function*(oe){const ue=m.wallet.account(),{networkId:ge,signer:Ie,provider:Re}=ue.connection,Te=yield Ie.getPublicKey(ue.accountId,ge);return Promise.all(oe.map(function(){var ke=(0,Le.Z)(function*(Ue,Ge){const nt=Ue.actions.map(kt=>al(kt)),Xe=yield ue.accessKeyForTransaction(Ue.receiverId,nt,Te);if(!Xe)throw new Error(`Failed to find matching key for transaction sent to ${Ue.receiverId}`);const St=yield Re.block({finality:"final"});return Zn.transactions.createTransaction(ue.accountId,Zn.utils.PublicKey.from(Xe.public_key),Ue.receiverId,Xe.access_key.nonce+Ge+1,nt,Zn.utils.serialize.base_decode(St.header.hash))});return function(Ue,Ge){return ke.apply(this,arguments)}}()))});return function(ue){return ee.apply(this,arguments)}}();return{signIn:({contractId:ee,methodNames:oe=[]})=>(0,Le.Z)(function*(){return n.log("MeteorWallet:signIn",{contractId:ee,methodNames:oe}),oe.length?yield m.wallet.requestSignIn({methods:oe,type:W2.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:ee}):yield m.wallet.requestSignIn({type:W2.EMeteorWalletSignInType.ALL_METHODS,contract_id:ee}),N()})(),signOut:()=>(0,Le.Z)(function*(){m.wallet.isSignedIn()&&(yield m.wallet.signOut())})(),isSignedIn:()=>(0,Le.Z)(function*(){return!!m.wallet&&m.wallet.isSignedIn()})(),getAccounts:()=>(0,Le.Z)(function*(){return N()})(),verifyOwner:({message:ee})=>(0,Le.Z)(function*(){n.log("MeteorWallet:verifyOwner",{message:ee});const oe=yield m.wallet.verifyOwner({message:ee});if(oe.success)return oe.payload;throw new Error(`Couldn't verify owner: ${oe.message}`)})(),signMessage:({message:ee,nonce:oe,recipient:ue,state:ge})=>(0,Le.Z)(function*(){n.log("MeteorWallet:signMessage",{message:ee,nonce:oe,recipient:ue,state:ge});const Ie=m.wallet.getAccountId(),Re=yield m.wallet.signMessage({message:ee,nonce:oe,recipient:ue,accountId:Ie,state:ge});if(Re.success)return Re.payload;throw new Error(`Couldn't sign message owner: ${Re.message}`)})(),signAndSendTransaction:({signerId:ee,receiverId:oe,actions:ue})=>(0,Le.Z)(function*(){n.log("MeteorWallet:signAndSendTransaction",{signerId:ee,receiverId:oe,actions:ue});const{contract:ge}=o.getState();if(!m.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!oe&&!ge)throw new Error("No receiver found to send the transaction to");return m.wallet.account().signAndSendTransaction_direct({receiverId:oe??ge.contractId,actions:ue.map(Re=>al(Re))})})(),signAndSendTransactions:({transactions:ee})=>(0,Le.Z)(function*(){if(n.log("MeteorWallet:signAndSendTransactions",{transactions:ee}),!m.wallet.isSignedIn())throw new Error("Wallet not signed in");return m.wallet.requestSignTransactions({transactions:yield J(ee)})})(),buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${m.wallet._networkId}`}});return function(n){return t.apply(this,arguments)}}();function o8({iconUrl:t=IB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:n=>xB({...n,params:{iconUrl:t}})}})}const pp_SIGN_IN="sign-in",pp_IS_SIGNED_IN="is-signed-in",pp_GET_ACCOUNT_ID="get-account-id",pp_SIGN_AND_SEND_TRANSACTION="sign-and-send-transaction",pp_SIGN_AND_SEND_TRANSACTIONS="sign-and-send-transactions";let G2=0;const O1=[],gp=(t,e=!1,n)=>new Promise((l,m)=>{let N;G2++,e&&(N=setTimeout(()=>m(Error("timeout")),2e3)),O1.push({id_wallet_selector:G2,code:t,resolve:l,reject:m,timeout:N}),window.postMessage({id:G2,src:"ws",type:"nw",code:t,dest:"ext",params:n})}),TB=function(){var t=(0,Le.Z)(function*(){return nc(()=>!!window.narwallets).catch(()=>!1)});return function(){return t.apply(this,arguments)}}(),s8=()=>gp(pp_IS_SIGNED_IN,!0),LB=()=>{window.addEventListener("message",t=>{if(t.source!==window)return;const{data:e}=t;if(e&&"page"===e.dest&&e.id&&"nw"===e.type){const n=(t=>O1.filter(e=>e.id_wallet_selector===t)[0])(e.id);n&&((t=>{const e=O1.indexOf(t);e>-1&&O1.splice(e,1)})(n),n.timeout&&clearTimeout(n.timeout),e.result?e.result.err?n.reject(e.result.err):n.resolve(e.result.data):n.reject("result is empty"))}})},FB=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,logger:o}){return{signIn:()=>(0,Le.Z)(function*(){let N;return N=(yield s8())?pp_GET_ACCOUNT_ID:pp_SIGN_IN,[{accountId:yield gp(N)}]})(),signOut:function(){var m=(0,Le.Z)(function*(){if(!(yield s8()))return;const N=yield gp("sign-out");if(!0===N)return;const J=N,ee=new Error("string"==typeof J.error?J.error:J.error.type);if("User reject"===ee.message)throw ee;o.log("Failed to sign out"),o.error(ee)});return function(){return m.apply(this,arguments)}}(),getAccounts:()=>(0,Le.Z)(function*(){return[{accountId:yield gp(pp_GET_ACCOUNT_ID,!1)}]})(),verifyOwner:({message:m})=>(0,Le.Z)(function*(){throw o.log("Narwallets:verifyOwner",{message:m}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:m,receiverId:N,actions:J})=>(0,Le.Z)(function*(){o.log("signAndSendTransaction",{signerId:m,receiverId:N,actions:J});const{contract:ee,accounts:oe}=n.getState();if(!oe||0===oe.length||!ee)throw new Error("Wallet not signed in");return(t=>gp(pp_SIGN_AND_SEND_TRANSACTION,!1,t))({signerId:m,receiverId:N||ee.contractId,actions:J})})(),signAndSendTransactions:({transactions:m})=>(0,Le.Z)(function*(){o.log("signAndSendTransactions",{transactions:m});const{contract:N,accounts:J}=n.getState();if(!J||0===J.length||!N)throw new Error("Wallet not signed in");return(t=>gp(pp_SIGN_AND_SEND_TRANSACTIONS,!1,t))(m)})()}});return function(n){return t.apply(this,arguments)}}(),a8=({iconUrl:t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAXFAAAFxQFJPlfkAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQ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cjFC+TFBtUVfD6v+pgTA5UGXrK5I2QshegGtr/OQ9iLECqS+Ilmruq6k4FQlAK4ijY5eV68KpjCQYTi2jdvi6ircK6N0HAGbrUAciPXlkZVTCYByNyI3NAF5B0I2BdHEaT/UBQKdf/xwFMiqWhiMATuQg2MPPwXkGRBJII6CfhSp7CuvLJyKRP8/AIZkfQXsT/DhAAAAAElFTkSuQmCC",deprecated:e=!1}={})=>(0,Le.Z)(function*(){if((0,na.isMobile)())return null;LB();const o=yield TB();return{id:"narwallets",type:"injected",metadata:{name:"Narwallets",description:null,iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/narwallets-v4/lkpeokpdkmcdaiadpmnnpimlgmdobkdj",deprecated:e,available:o},init:FB}}),BB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAETCAYAAAAVqeK4AAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAAEsAAAAAQAAASwAAAABd3d3Lmlua3NjYXBlLm9yZwAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAROgAwAEAAAAAQAAARMAAAAAwzPlUAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAi9pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi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sD5Yq/ujCQ7PxGT/vv6TcmyTOwRsdhP6G2d7d7GN3/1Rvu7Gx7s2rLx5qfu//yT/bvoXo7nHvvbDRLV5bvMm7Lo0nm1TeNW1Q+asKR59NxRBv5b9Kz4eqHYT8UymRCT4rr9Ccm2SmxNcdmD5drW2bbl3Vd+8Vb7xlfXbe388Oqn77vEqFXHg0UTT+7nH/26Xh2qecP2P7q+ZcTCcxpapq1sGDRhfDwtFl2rLlp0jdi3xXSwlQSBogjoCaN3QHoas2aLQmd0Jh1s79mnxWzruMhXxZqMjgznjCVQKZ7pZWzPkw0xMba7inYsiJi0S606ZWBY0bWTEQI+BAbLfh0EzQsKYuIDyqLdxYiJDsbfLDbSorgSddXae2+JUurd2Lvy9USxtt67+eYogY0Slz7ZO05Mx82cmwYvMZFSJqArYukaKFyZpNwRETRf6Mpkg9S7WmxgBPVTBQT6JaADcIhJv5iMz5AXE/3joGNiOhWAO53Gd5tbDpZLOH/sVkiZjOYKiVpnq07LZPQEDQEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAgQQJ/D/LxtSxjmI1fwAAAABJRU5ErkJggg==",Z2="account",jB=()=>nc(()=>!!window.dapp).catch(()=>!1);function Y2(){return Y2=(0,Le.Z)(function*(t){const e=yield t.getItem(Z2);return window.dapp?{wallet:window.dapp,account:e||void 0}:{}}),Y2.apply(this,arguments)}const KB=function(){var t=(0,Le.Z)(function*({options:e,store:n,emitter:o,logger:l,storage:m,provider:N}){const J=yield function UB(t){return Y2.apply(this,arguments)}(m),ee=function(){var Ue=(0,Le.Z)(function*(){if(J.wallet){const Ge=yield J.wallet.request("near",{method:"dapp:accounts"});return Ge.near?[Ge.near.address,Ge.near.pubKey]:[]}return[]});return function(){return Ue.apply(this,arguments)}}(),oe=function(){var Ue=(0,Le.Z)(function*({accountId:Ge,publicKey:nt}){if(l.log("validateAccessKey",{accountId:Ge,publicKey:nt}),!J.wallet)throw new Error("Wallet is not installed");const Xe=yield J.wallet.request("near",{method:"query",params:{request_type:"view_access_key",finality:"final",account_id:Ge,public_key:nt}});if(l.log("validateAccessKey:accessKey",{accessKey:Xe}),"FullAccess"!==Xe.permission)throw new Error("Public key requires 'FullAccess' permission");return Xe});return function(nt){return Ue.apply(this,arguments)}}(),ge=()=>J.account?[{accountId:J.account.accountId,publicKey:J.account.publicKey}]:[],Ie=function(){var Ue=(0,Le.Z)(function*(){J.account&&(m.removeItem(Z2),delete J.account),o.emit("signedOut",null)});return function(){return Ue.apply(this,arguments)}}(),Re=()=>{J.wallet&&(J.wallet.on("dapp:accountsChanged",function(){var Ue=(0,Le.Z)(function*(Ge){l.log("onAccountChange",Ge),yield Ie()});return function(Ge){return Ue.apply(this,arguments)}}()),J.wallet.on("dapp:chainChanged",function(){var Ue=(0,Le.Z)(function*(Ge){l.log("onNetworkChange",Ge);const nt="near"===Ge.split(":")[1]?"mainnet":"testnet";e.network.networkId!==nt&&(yield Ie(),o.emit("networkChanged",{networkId:nt}))});return function(Ge){return Ue.apply(this,arguments)}}()))},Te={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Ue=(0,Le.Z)(function*(Ge){const Xe=ge().find(St=>St.accountId===Ge);if(!Xe)throw new Error("Failed to find public key for account");return Zn.utils.PublicKey.from(Xe.publicKey)}),function(nt){return Ue.apply(this,arguments)}),signMessage:function(){var Ue=(0,Le.Z)(function*(Ge,nt){if(!J.wallet)throw new Error("Wallet is not installed");if(!ge().find(kt=>kt.accountId===nt))throw new Error("Failed to find account for signing");try{const kt=Zn.transactions.Transaction.decode(Buffer.from(Ge)),un=Buffer.from(kt.encode()).toString("hex"),Nn=yield J.wallet.request("near",{method:"dapp:signTransaction",params:["0x"+un]});return{signature:Buffer.from(Nn[0].signature.substr(2),"hex"),publicKey:Zn.utils.PublicKey.from(Nn[0].publicKey)}}catch{const un=yield J.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Buffer.from(Ge).toString("hex")]});return{signature:Buffer.from(un[0].signature.substr(2),"hex"),publicKey:Zn.utils.PublicKey.from(un[0].publicKey)}}});return function(nt,Xe){return Ue.apply(this,arguments)}}()},ke=Ue=>{const Ge=ge(),{contract:nt}=n.getState();if(!Ge.length||!nt)throw new Error("Wallet not signed in");return Ue.map(Xe=>({signerId:Xe.signerId||Ge[0].accountId,receiverId:Xe.receiverId||nt.contractId,actions:Xe.actions}))};var Ue;return{signIn:()=>(0,Le.Z)(function*(){const Ue=ge();if(Ue.length)return Ue;J.account&&(yield Ie());const Ge=yield ee();if(!(yield oe({accountId:Ge[0],publicKey:Ge[1]})))throw Ie(),new Error(`Public key (${Ge[1]}) is not registered with the account '${Ge[0]}'.`);return yield m.setItem(Z2,{accountId:Ge[0],publicKey:Ge[1]}),J.account={accountId:Ge[0],publicKey:Ge[1]},Re(),ge()})(),getAccounts:()=>(0,Le.Z)(function*(){return ge()})(),signOut:Ie,verifyOwner:({message:Ue})=>(0,Le.Z)(function*(){if(l.log("verifyOwner",{message:Ue}),!J.wallet)throw new Error("Wallet is not installed");const Ge=J.account;if(!Ge)throw new Error("Wallet not signed in");const nt=Ge.accountId,Xe=Zn.utils.PublicKey.fromString(Ge.publicKey),St=yield N.block({finality:"final"}),kt={accountId:nt,message:Ue,blockId:St.header.hash,publicKey:Buffer.from(Xe.data).toString("base64"),keyType:Xe.keyType},un=JSON.stringify(kt),Nn=yield Te.signMessage(new Uint8Array(Buffer.from(un)),nt);return{...kt,signature:Buffer.from(Nn.signature).toString("base64")}})(),signMessage:Ue=>(0,Le.Z)(function*(){if(!J.wallet)throw new Error("Wallet is not installed");const nt=(yield ee())[0];if(!nt)throw new Error("Failed to find account for signing");const Xe=(t=>{const e=new x2({...t});return Buffer.from((0,L5.serialize)(F5,e))})(Ue),St=yield J.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Xe.toString("hex")]}),kt={accountId:nt,publicKey:St[0].publicKey,signature:Buffer.from(St[0].signature.substr(2),"hex").toString("base64")};return Ue.state?{...kt,state:Ue.state}:kt})(),signAndSendTransaction:({signerId:Ue,receiverId:Ge,actions:nt})=>(0,Le.Z)(function*(){l.log("signAndSendTransaction",{signerId:Ue,receiverId:Ge,actions:nt});const{contract:Xe}=n.getState();if(!ge().length||!Xe)throw new Error("Wallet not signed in");const[kt]=yield ic(ke([{signerId:Ue,receiverId:Ge,actions:nt}]),Te,e.network);return N.sendTransaction(kt)})(),signAndSendTransactions:({transactions:Ue})=>(0,Le.Z)(function*(){l.log("signAndSendTransactions",{transactions:Ue});const Ge=yield ic(ke(Ue),Te,e.network),nt=[];for(let Xe=0;Xe(0,Le.Z)(function*(){if(!J.wallet)throw new Error("Wallet is not installed");const Ge=[];Ue.forEach(({privateKey:Xe})=>{"ed25519:"===Xe.slice(0,8)?Ge.push(Xe.slice(8)):Ge.push(Xe)});const nt={privateKey:Ge,network:e.network.networkId};yield J.wallet.request("near",{method:"experimental:near:importPrivatekey",params:[nt]})})()}});return function(n){return t.apply(this,arguments)}}();function u8({iconUrl:t=BB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=e8()(),o=wF(["chrome","edge-chromium","opera"]);if(n||!o)return null;const l=yield jB();return{id:"welldone-wallet",type:"injected",metadata:{name:"WELLDONE Wallet",description:"WELLDONE Wallet for Multichains",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf",deprecated:e,available:l},init:KB}})}var VB=y(84960);const HB=function(){var t=(0,Le.Z)(function*(e){const{store:n,logger:o,emitter:l,options:m,defaultProvider:N,defaultStrategy:J}=e,ee=new VB.HereWallet({networkId:m.network.networkId,nodeUrl:m.network.nodeUrl,defaultProvider:N,defaultStrategy:J});function oe(){return ue.apply(this,arguments)}function ue(){return(ue=(0,Le.Z)(function*(){o.log("HereWallet:getAccounts");const ge=yield ee.getAccounts(),Ie=[];for(let Re=0;Re`https://my.herewallet.app/import?network=${m.network.networkId}`,account:ge=>(0,Le.Z)(function*(){return o.log("HereWallet:account"),yield ee.account(ge)})(),switchAccount:ge=>(0,Le.Z)(function*(){o.log("HereWallet:switchAccount"),yield ee.switchAccount(ge)})(),getAccountId:()=>(0,Le.Z)(function*(){return o.log("HereWallet:getAccountId"),yield ee.getAccountId()})(),isSignedIn:()=>(0,Le.Z)(function*(){return o.log("HereWallet:isSignedIn"),yield ee.isSignedIn()})(),signIn:ge=>(0,Le.Z)(function*(){o.log("HereWallet:signIn");const Ie=""!==ge.contractId?ge.contractId:void 0;return yield ee.signIn({...ge,contractId:Ie}),l.emit("signedIn",{contractId:ge.contractId,methodNames:ge.methodNames??[],accounts:yield oe()}),yield oe()})(),getHereBalance:()=>(0,Le.Z)(function*(){return o.log("HereWallet:getHereBalance"),yield ee.getHereBalance()})(),getAvailableBalance:()=>(0,Le.Z)(function*(){return o.log("HereWallet:getAvailableBalance"),yield ee.getAvailableBalance()})(),signOut:()=>(0,Le.Z)(function*(){o.log("HereWallet:signOut"),yield ee.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return oe()})(),signAndSendTransaction:ge=>(0,Le.Z)(function*(){o.log("HereWallet:signAndSendTransaction",ge);const{contract:Ie}=n.getState();if(!ee.isSignedIn||!Ie)throw new Error("Wallet not signed in");return yield ee.signAndSendTransaction({receiverId:Ie.contractId,...ge})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:ge=>(0,Le.Z)(function*(){return o.log("HereWallet:signMessage",ge),yield ee.signMessage(ge)})(),signAndSendTransactions:ge=>(0,Le.Z)(function*(){return o.log("HereWallet:signAndSendTransactions",ge),yield ee.signAndSendTransactions(ge)})()}});return function(n){return t.apply(this,arguments)}}(),zB="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function c8({deprecated:t=!1,iconUrl:e=zB,defaultStrategy:n,defaultProvider:o}={}){return(0,Le.Z)(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",iconUrl:e,deprecated:t,available:!0},init:l=>HB({...l,defaultStrategy:n,defaultProvider:o})}})}const YB=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:o,provider:l,logger:m}){const N={wallet:window.coin98},J=function(){var oe=(0,Le.Z)(function*(){const ue=N.wallet.near.account;if(!ue)return[];const ge=yield N.wallet.near.signer.getPublicKey(ue,n.network.networkId);return[{accountId:ue,publicKey:ge?ge.toString():void 0}]});return function(){return oe.apply(this,arguments)}}(),ee=oe=>{const{contract:ue}=o.getState();if(!ue)throw new Error("Wallet not signed in");const ge=Df(o.getState());if(!ge)throw new Error("No active account");return oe.map(Ie=>({signerId:Ie.signerId||ge.accountId,receiverId:Ie.receiverId||ue.contractId,actions:Ie.actions}))};return{signIn:({contractId:oe})=>(0,Le.Z)(function*(){const ue=yield J();return ue.length?ue:(yield N.wallet.near.connect({prefix:"near_selector",contractId:oe}),J())})(),signOut:()=>(0,Le.Z)(function*(){yield N.wallet.near.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return J()})(),verifyOwner:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:oe,receiverId:ue,actions:ge})=>(0,Le.Z)(function*(){m.log("signAndSendTransaction",{signerId:oe,receiverId:ue,actions:ge});const Ie=yield ic(ee([{signerId:oe,receiverId:ue,actions:ge}]),N.wallet.near.signer,n.network);return l.sendTransaction(Ie[0])})(),signAndSendTransactions:({transactions:oe})=>(0,Le.Z)(function*(){m.log("signAndSendTransactions",{transactions:oe});const ue=yield ic(ee(oe),N.wallet.near.signer,n.network);m.log("signAndSendTransactions:signedTransactions",ue);const ge=[];for(let Ie=0;Ie(0,Le.Z)(function*(){if((0,na.isMobile)())return null;const o=!!window.coin98;return{id:"coin98-wallet",type:"injected",metadata:{name:"Coin98 Wallet",description:"Using a Decentralized Wallet With Experiences of a Centralized One",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",deprecated:e,available:o},init:YB}}),JB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAIddJREFUeNrs3et/HFd5B/DRLu/6otsCIQFCxoQ4vltyILGNE48olNBCLcWOkzgXrwq5mJul9g/Q+A9opbzo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6z8MgbwTY2LWAFsBAI+V8oj7xhUHqnVfMwEVgBLARCfrje5FN8gmPIgBXAQiAkf9H85E2LUleCbWzSiBU/5mDhKAKRJ7hMyml65fOOp2aqsMKOowhEXuF6yyg8+hb3tvxtbIAVwEIgZH8xPfrWoj9MXARWAAuBSANaFuUcuTBBOBjACmAhEPK/sB57q1V4zFp6WjWwAlgIhLxwWXXKYBmEBawAFgKRBrh0f/1WVQqsHAXbyyAQiBVebCcti7L3tGpRWKGHhUAghoPrtwalt43NkvVbSWKFhaMIBGJ4uGh4GN7GBlgBLARC5hfg47+1KHUChOGqAyuAhUCkAK7fmZTTZMmA06qBFcBCIGR8Qf70dwZldxsbYAWwEIgUwFVV3Nt8nMXYsMKyBgQCESFaVuGnb/ecVp1nrAAWApGGF2nzbZNycsxbv2XmFSuAhUCkKMaabxuUGwgc6nU5Vt6wAlgIRBrhar0dbGNTXR9WWDiKQCASQet/LErvtGqe38oBVgALgUg/XC3K0DY2a8LKTN3/F085ApGdcHb+nk5vjlOWVsNq7Of/twE9LAQCIa4H8rP/1f1hYnUFrHhfruk0/v/+X4ABAA6s0eytIzCSAAAAAElFTkSuQmCC",QB=()=>nc(()=>!!window.nearFiWallet?.isNearFi,{timeout:200}).catch(()=>!1),XB=function(){var t=(0,Le.Z)(function*({options:e,metadata:n,store:o,emitter:l,logger:m}){const N={wallet:window.nearFiWallet},J=function(){var Re=(0,Le.Z)(function*(){if(!N.wallet.isSignedIn())return;const Te=yield N.wallet.signOut();if(!0===Te)return;const ke=new Error("string"==typeof Te.error?Te.error:Te.error.type);if("User reject"===ke.message)throw ke;m.log("Failed to sign out"),m.error(ke)});return function(){return Re.apply(this,arguments)}}(),ee=()=>{N.wallet.on("accountChanged",function(){var Re=(0,Le.Z)(function*(Te){m.log("onAccountChange",Te),l.emit("signedOut",null)});return function(Te){return Re.apply(this,arguments)}}()),N.wallet.on("rpcChanged",function(){var Re=(0,Le.Z)(function*(Te){m.log("onNetworkChange",Te),e.network.networkId!==Te.networkId&&(yield J(),l.emit("signedOut",null),l.emit("networkChanged",{networkId:Te.networkId}))});return function(Te){return Re.apply(this,arguments)}}())},oe=function(){var Re=(0,Le.Z)(function*(){let Te=N.wallet.getAccountId();return Te||(yield N.wallet.resolveSignInState(),Te=N.wallet.getAccountId(),Te)?[{accountId:Te}]:[]});return function(){return Re.apply(this,arguments)}}(),ge=Re=>{if(!(Re=>Re.every(Te=>"FunctionCall"===Te.type))(Re))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return Re.map(ke=>ke.params)},Ie=Re=>Re.map(Te=>({receiverId:Te.receiverId,actions:ge(Te.actions)}));return N.wallet&&N.wallet.isSignedIn()&&ee(),{signIn:({contractId:Re,methodNames:Te})=>(0,Le.Z)(function*(){const ke=yield oe();if(ke.length)return ke;const{accessKey:Ue,error:Ge}=yield N.wallet.requestSignIn({contractId:Re,methodNames:Te});if(!Ue||Ge)throw yield J(),new Error(("string"==typeof Ge?Ge:Ge.type)||"Failed to sign in");return ee(),yield oe()})(),signOut:J,getAccounts:()=>(0,Le.Z)(function*(){return yield oe()})(),verifyOwner:({message:Re})=>(0,Le.Z)(function*(){throw m.log("NearFi:verifyOwner",{message:Re}),new Error(`Method not supported by ${n.name}`)})(),signAndSendTransaction:({signerId:Re,receiverId:Te,actions:ke})=>(0,Le.Z)(function*(){m.log("signAndSendTransaction",{signerId:Re,receiverId:Te,actions:ke});const{contract:Ue}=o.getState();if(!N.wallet.isSignedIn()||!Ue)throw new Error("Wallet not signed in");return N.wallet.signAndSendTransaction({receiverId:Te||Ue.contractId,actions:ge(ke)}).then(Ge=>{if(Ge.error)throw new Error(Ge.error);if(!Ge.response?.length)throw new Error("Invalid response");return Ge.response[0]})})(),signAndSendTransactions:({transactions:Re})=>(0,Le.Z)(function*(){if(m.log("signAndSendTransactions",{transactions:Re}),!N.wallet.isSignedIn())throw new Error("Wallet not signed in");return N.wallet.requestSignTransactions({transactions:Ie(Re)}).then(Te=>{if(Te.error)throw new Error(Te.error);if(!Te.response?.length)throw new Error("Invalid response");return Te.response})})()}});return function(n){return t.apply(this,arguments)}}();function f8({iconUrl:t=JB,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=(0,na.isMobile)(),o=yield QB();return n&&o?{id:"nearfi",type:"injected",metadata:{name:"NearFi",description:"Your NEAR DeFi experience On The Go",iconUrl:t,downloadUrl:"https://nearfi.finance",deprecated:e,available:o},init:XB}:null})}var J2=y(72487);const Q2=new J2.NearSnap,$B=function(){var t=(0,Le.Z)(function*(e){const{store:n,logger:o,options:l}=e,m=l.network.networkId;let N=yield J2.NearSnapAccount.restore({network:m,snap:Q2});return{isSignedIn:()=>(0,Le.Z)(function*(){return o.log("NearSnap:isSignedIn"),null!=N})(),signIn:({contractId:J,methodNames:ee})=>(0,Le.Z)(function*(){return o.log("NearSnap:signIn"),N=yield J2.NearSnapAccount.connect({contractId:""===J?void 0:J,methods:ee,network:m,snap:Q2}),[{accountId:N.accountId}]})(),signOut:()=>(0,Le.Z)(function*(){o.log("NearSnap:signOut"),yield N?.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return N?[{accountId:N.accountId}]:[]})(),signAndSendTransaction:J=>(0,Le.Z)(function*(){if(o.log("NearSnap:signAndSendTransaction",J),null==N)throw new Error("Wallet not signed in");const{contract:ee}=n.getState(),oe=J.receiverId??ee?.contractId;if(null==oe)throw new Error("ReceiverId is not defined");return yield N.executeTransaction({receiverId:oe,...J})})(),signMessage:({message:J,nonce:ee,recipient:oe})=>(0,Le.Z)(function*(){if(null==N)throw new Error("Wallet not signed in");return yield N.signMessage({message:J,nonce:ee,recipient:oe})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("NearSnap:verifyOwner is not released yet")})(),signAndSendTransactions:({transactions:J})=>(0,Le.Z)(function*(){if(o.log("NearSnap:signAndSendTransactions",{transactions:J}),null==N)throw new Error("Wallet not signed in");return yield N.executeTransactions(J)})()}});return function(n){return t.apply(this,arguments)}}(),ej="data:image/svg+xml;base64,P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EuMWgtNjcuNWwxNSA0MS4xIDMuNSA1Ny43IDEuMiAxOC4yLjEgNDQuOGgyNy43bC4yLTQ0Ljh6IiBjbGFzcz0ic3Q2Ii8+Cjwvc3ZnPg==";function tj({deprecated:t=!1,iconUrl:e=ej}={}){return(0,Le.Z)(function*(){return(0,na.isMobile)()?null:{id:"near-snap",type:"injected",init:$B,metadata:{name:"Near Snap",description:"Metamask Snap for NEAR Protocol",downloadUrl:"https://near-snap.surge.sh",available:yield Q2.provider.isSnapsAvailable(),deprecated:t,iconUrl:e}}})}var nj=y(35469),q2=y.n(nj);const rj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABiCAYAAACmu3ZJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEqVJREFUeJztnHtUVXWbx797n/uBIxcvwNG4CGqCikZKpIFKr5TayItm5qsD1Vuu0bIsXSOrSJmVjk6OC8fpNisTWWW6alLGZLQy31ReFRIjSxAvIAYCcr+c+9nP/MFIL3I4Z1/O4eb7WWv/wTl7P8+zn+/ev9/zuxwYIiLcQ1VVFT799FMcPXoU169fR21tLex2O2QyGQICAhAaGor58+dj2bJlCA8Pv/fyIU1paSlycnLw/fff4+rVq2hpacGoUaMwduxYLFiwAMuXL0dISIh4B/Q3mM1mSk9PJ41GQwBcHnK5nNatW0etra001Kmvr6fU1FRiWdZpTpRKJa1bt446OjpE+ekSpKGhgeLj43kJce8xbdo0qq+vd9vNDzRKSkooLCxMUE5iYmKoqqpKsC8QEVksFkpISBAlxt0jOjqaWlpa3J6M/qa6uprGjBkjKidTp06l9vZ2Qf5ARJSRkSFJjLvH/PnzyWazeSQx/QHHcZSUlCQpJ6tWrRLkE9XV1eTl5eUWQQDQunXrPJSevueDDz6QnA+5XE6XL1/m7RPvvvuu28S4e3z44YceTFPfUF5eTjqdzi352LBhA2+/mDNnjtsFUSgUdPLkSc9ly8PY7XaaPXu22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ex8f3XeCAJ0zux9/1YaiEnHtvxiGebFY9fQwPBjmfOX0vhQE6OyoT5w34r+/6xA11SGEyLFK/DlFBx8e5fd9K8hd6pvtOPC/HbhY6v63xVfHYuk8b8T20l844r4X5C7lVTYcPWVAcZlZ0KKSI0b4yZD0qAaPPaTu8SMfV/xdkHtoaeNw/pIZxWVmXL9lg9XGLz2j/GWIDFcidrIK44IVon4QCvxdEKdYrITfam1dy7NmC8FsJbAMA7WK6dw6NEKG0aPk8Bvmnlnu/wNWcf8As19BPQAAAABJRU5ErkJggg==";let d8=!1,h8=!1;const N1={debug:1,default:2,info:2,warning:3,error:4,off:5};let p8=N1.default,X2=null;const g8=function oj(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var $2,cu;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}($2||($2={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(cu||(cu={}));const y8="0123456789abcdef";class Jt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,n){const o=e.toLowerCase();null==N1[o]&&this.throwArgumentError("invalid log level name","logLevel",e),!(p8>N1[o])&&console.log.apply(console,n)}debug(...e){this._log(Jt.levels.DEBUG,e)}info(...e){this._log(Jt.levels.INFO,e)}warn(...e){this._log(Jt.levels.WARNING,e)}makeError(e,n,o){if(h8)return this.makeError("censored error",n,{});n||(n=Jt.errors.UNKNOWN_ERROR),o||(o={});const l=[];Object.keys(o).forEach(ee=>{const oe=o[ee];try{if(oe instanceof Uint8Array){let ue="";for(let ge=0;ge>4],ue+=y8[15&oe[ge]];l.push(ee+"=Uint8Array(0x"+ue+")")}else l.push(ee+"="+JSON.stringify(oe))}catch{l.push(ee+"="+JSON.stringify(o[ee].toString()))}}),l.push(`code=${n}`),l.push(`version=${this.version}`);const m=e;let N="";switch(n){case cu.NUMERIC_FAULT:{N="NUMERIC_FAULT";const ee=e;switch(ee){case"overflow":case"underflow":case"division-by-zero":N+="-"+ee;break;case"negative-power":case"negative-width":N+="-unsupported";break;case"unbound-bitwise-result":N+="-unbound-result"}break}case cu.CALL_EXCEPTION:case cu.INSUFFICIENT_FUNDS:case cu.MISSING_NEW:case cu.NONCE_EXPIRED:case cu.REPLACEMENT_UNDERPRICED:case cu.TRANSACTION_REPLACED:case cu.UNPREDICTABLE_GAS_LIMIT:N=n}N&&(e+=" [ See: https://links.ethers.org/v5-errors-"+N+" ]"),l.length&&(e+=" ("+l.join(", ")+")");const J=new Error(e);return J.reason=m,J.code=n,Object.keys(o).forEach(function(ee){J[ee]=o[ee]}),J}throwError(e,n,o){throw this.makeError(e,n,o)}throwArgumentError(e,n,o){return this.throwError(e,Jt.errors.INVALID_ARGUMENT,{argument:n,value:o})}assert(e,n,o,l){e||this.throwError(n,o,l)}assertArgument(e,n,o,l){e||this.throwArgumentError(n,o,l)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),g8&&this.throwError("platform missing String.prototype.normalize",Jt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:g8})}checkSafeUint53(e,n){"number"==typeof e&&(null==n&&(n="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(n,Jt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(n,Jt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,n,o){o=o?": "+o:"",en&&this.throwError("too many arguments"+o,Jt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})}checkNew(e,n){(e===Object||null==e)&&this.throwError("missing new",Jt.errors.MISSING_NEW,{name:n.name})}checkAbstract(e,n){e===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",Jt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",Jt.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return X2||(X2=new Jt("logger/5.7.0")),X2}static setCensorship(e,n){if(!e&&n&&this.globalLogger().throwError("cannot permanently disable censorship",Jt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),d8){if(!e)return;this.globalLogger().throwError("error censorship permanent",Jt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}h8=!!e,d8=!!n}static setLogLevel(e){const n=N1[e.toLowerCase()];null!=n?p8=n:Jt.globalLogger().warn("invalid log level - "+e)}static from(e){return new Jt(e)}}Jt.errors=cu,Jt.levels=$2;const Pi=new Jt("bytes/5.7.0");function m8(t){return!!t.toHexString}function yp(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return yp(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function eE(t){return hi(t)&&!(t.length%2)||P1(t)}function v8(t){return"number"==typeof t&&t==t&&t%1==0}function P1(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!v8(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Sr(t,e){if(e||(e={}),"number"==typeof t){Pi.checkSafeUint53(t,"invalid arrayify value");const n=[];for(;t;)n.unshift(255&t),t=parseInt(String(t/256));return 0===n.length&&n.push(0),yp(new Uint8Array(n))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),m8(t)&&(t=t.toHexString()),hi(t)){let n=t.substring(2);n.length%2&&("left"===e.hexPad?n="0"+n:"right"===e.hexPad?n+="0":Pi.throwArgumentError("hex data is odd-length","value",t));const o=[];for(let l=0;lSr(l)),n=e.reduce((l,m)=>l+m.length,0),o=new Uint8Array(n);return e.reduce((l,m)=>(o.set(m,l),l+m.length),0),yp(o)}function mp(t){let e=Sr(t);if(0===e.length)return e;let n=0;for(;n>4]+tE[15&l]}return n}return Pi.throwArgumentError("invalid hexlify value","value",t)}function ph(t){if("string"!=typeof t)t=gr(t);else if(!hi(t)||t.length%2)return null;return(t.length-2)/2}function ws(t,e,n){return"string"!=typeof t?t=gr(t):(!hi(t)||t.length%2)&&Pi.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=n?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)}function ra(t){let e="0x";return t.forEach(n=>{e+=gr(n).substring(2)}),e}function nE(t){const e=function uj(t){"string"!=typeof t&&(t=gr(t)),hi(t)||Pi.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Pi.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function By(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(eE(t)){let n=Sr(t);64===n.length?(e.v=27+(n[32]>>7),n[32]&=127,e.r=gr(n.slice(0,32)),e.s=gr(n.slice(32,64))):65===n.length?(e.r=gr(n.slice(0,32)),e.s=gr(n.slice(32,64)),e.v=n[64]):Pi.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:Pi.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(n[32]|=128),e._vs=gr(n.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const l=function aj(t,e){(t=Sr(t)).length>e&&Pi.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(e);return n.set(t,e-t.length),yp(n)}(Sr(e._vs),32);e._vs=gr(l);const m=l[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=m:e.recoveryParam!==m&&Pi.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),l[0]&=127;const N=gr(l);null==e.s?e.s=N:e.s!==N&&Pi.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?Pi.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const l=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==l&&Pi.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&hi(e.r)?e.r=qi(e.r,32):Pi.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&hi(e.s)?e.s=qi(e.s,32):Pi.throwArgumentError("signature missing or invalid s","signature",t);const n=Sr(e.s);n[0]>=128&&Pi.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(n[0]|=128);const o=gr(n);e._vs&&(hi(e._vs)||Pi.throwArgumentError("signature invalid _vs","signature",t),e._vs=qi(e._vs,32)),null==e._vs?e._vs=o:e._vs!==o&&Pi.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}var cj=y(54237),lj=y.n(cj);function Po(t){return"0x"+lj().keccak_256(Sr(t))}const b8=new Jt("strings/5.7.0");var jy,ia;function w8(t,e,n,o,l){if(t===ia.BAD_PREFIX||t===ia.UNEXPECTED_CONTINUE){let m=0;for(let N=e+1;N>6==2;N++)m++;return m}return t===ia.OVERRUN?n.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(jy||(jy={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(ia||(ia={}));const pj=Object.freeze({error:function dj(t,e,n,o,l){return b8.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",n)},ignore:w8,replace:function hj(t,e,n,o,l){return t===ia.OVERLONG?(o.push(l),0):(o.push(65533),w8(t,e,n))}});function rE(t,e){null==e&&(e=pj.error),t=Sr(t);const n=[];let o=0;for(;o>7)){n.push(l);continue}let m=null,N=null;if(192==(224&l))m=1,N=127;else if(224==(240&l))m=2,N=2047;else{if(240!=(248&l)){o+=e(128==(192&l)?ia.UNEXPECTED_CONTINUE:ia.BAD_PREFIX,o-1,t,n);continue}m=3,N=65535}if(o-1+m>=t.length){o+=e(ia.OVERRUN,o-1,t,n);continue}let J=l&(1<<8-m-1)-1;for(let ee=0;ee1114111){o+=e(ia.OUT_OF_RANGE,o-1-m,t,n,J);continue}if(J>=55296&&J<=57343){o+=e(ia.UTF16_SURROGATE,o-1-m,t,n,J);continue}if(J<=N){o+=e(ia.OVERLONG,o-1-m,t,n,J);continue}n.push(J)}}return n}function ul(t,e=jy.current){e!=jy.current&&(b8.checkNormalize(),t=t.normalize(e));let n=[];for(let o=0;o>6|192),n.push(63&l|128);else if(55296==(64512&l)){o++;const m=t.charCodeAt(o);if(o>=t.length||56320!=(64512&m))throw new Error("invalid utf-8 string");const N=65536+((1023&l)<<10)+(1023&m);n.push(N>>18|240),n.push(N>>12&63|128),n.push(N>>6&63|128),n.push(63&N|128)}else n.push(l>>12|224),n.push(l>>6&63|128),n.push(63&l|128)}return Sr(n)}function R1(t,e){return function gj(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}(rE(t,e))}function oE(t){return Po(ul(t))}var vj=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const k1=new Jt("properties/5.7.0");function Dr(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}function Uy(t,e){for(let n=0;n<32;n++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ro(t){return vj(this,void 0,void 0,function*(){const e=Object.keys(t).map(o=>{const l=t[o];return Promise.resolve(l).then(m=>({key:o,value:m}))});return(yield Promise.all(e)).reduce((o,l)=>(o[l.key]=l.value,o),{})})}function Fs(t){const e={};for(const n in t)e[n]=t[n];return e}const wj={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function A8(t){if(null==t||wj[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let n=0;ngh(e)));if("object"==typeof t){const e={};for(const n in t){const o=t[n];void 0!==o&&Dr(e,n,gh(o))}return e}return k1.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function gh(t){return Aj(t)}class Ej{constructor(e){for(const n in e)this[n]=gh(e[n])}}const L1="providers/5.7.2";var lu=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const Oa=new Jt("abstract-signer/5.7.0"),_j=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Mj=[Jt.errors.INSUFFICIENT_FUNDS,Jt.errors.NONCE_EXPIRED,Jt.errors.REPLACEMENT_UNDERPRICED];class sE{constructor(){Oa.checkAbstract(new.target,sE),Dr(this,"_isSigner",!0)}getBalance(e){return lu(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return lu(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return lu(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const n=yield Ro(this.checkTransaction(e));return yield this.provider.estimateGas(n)})}call(e,n){return lu(this,void 0,void 0,function*(){this._checkProvider("call");const o=yield Ro(this.checkTransaction(e));return yield this.provider.call(o,n)})}sendTransaction(e){return lu(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const n=yield this.populateTransaction(e),o=yield this.signTransaction(n);return yield this.provider.sendTransaction(o)})}getChainId(){return lu(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return lu(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return lu(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return lu(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const o in e)-1===_j.indexOf(o)&&Oa.throwArgumentError("invalid transaction key: "+o,"transaction",e);const n=Fs(e);return null==n.from?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(o=>(o[0].toLowerCase()!==o[1].toLowerCase()&&Oa.throwArgumentError("from address mismatch","transaction",e),o[0])),n}populateTransaction(e){return lu(this,void 0,void 0,function*(){const n=yield Ro(this.checkTransaction(e));null!=n.to&&(n.to=Promise.resolve(n.to).then(l=>lu(this,void 0,void 0,function*(){if(null==l)return null;const m=yield this.resolveName(l);return null==m&&Oa.throwArgumentError("provided ENS name resolves to null","tx.to",l),m})),n.to.catch(l=>{}));const o=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!o?(0===n.type||1===n.type)&&o&&Oa.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Oa.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type)null==n.gasPrice&&(n.gasPrice=this.getGasPrice());else{const l=yield this.getFeeData();if(null==n.type)if(null!=l.maxFeePerGas&&null!=l.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const m=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=m,n.maxPriorityFeePerGas=m}else null==n.maxFeePerGas&&(n.maxFeePerGas=l.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=l.maxPriorityFeePerGas);else null!=l.gasPrice?(o&&Oa.throwError("network does not support EIP-1559",Jt.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=l.gasPrice),n.type=0):Oa.throwError("failed to get consistent fee data",Jt.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===n.type&&(null==n.maxFeePerGas&&(n.maxFeePerGas=l.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=l.maxPriorityFeePerGas))}else n.type=2;return null==n.nonce&&(n.nonce=this.getTransactionCount("pending")),null==n.gasLimit&&(n.gasLimit=this.estimateGas(n).catch(l=>{if(Mj.indexOf(l.code)>=0)throw l;return Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Jt.errors.UNPREDICTABLE_GAS_LIMIT,{error:l,tx:n})})),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then(l=>(0!==l[1]&&l[0]!==l[1]&&Oa.throwArgumentError("chainId address mismatch","transaction",e),l[0])),yield Ro(n)})}_checkProvider(e){this.provider||Oa.throwError("missing provider",Jt.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var Ky=fr().BN;const cl=new Jt("bignumber/5.7.0"),aE={},S8=9007199254740991;let _8=!1;class jn{constructor(e,n){e!==aE&&cl.throwError("cannot call constructor directly; use BigNumber.from",Jt.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Bs(Cr(this).fromTwos(e))}toTwos(e){return Bs(Cr(this).toTwos(e))}abs(){return"-"===this._hex[0]?jn.from(this._hex.substring(1)):this}add(e){return Bs(Cr(this).add(Cr(e)))}sub(e){return Bs(Cr(this).sub(Cr(e)))}div(e){return jn.from(e).isZero()&&Na("division-by-zero","div"),Bs(Cr(this).div(Cr(e)))}mul(e){return Bs(Cr(this).mul(Cr(e)))}mod(e){const n=Cr(e);return n.isNeg()&&Na("division-by-zero","mod"),Bs(Cr(this).umod(n))}pow(e){const n=Cr(e);return n.isNeg()&&Na("negative-power","pow"),Bs(Cr(this).pow(n))}and(e){const n=Cr(e);return(this.isNegative()||n.isNeg())&&Na("unbound-bitwise-result","and"),Bs(Cr(this).and(n))}or(e){const n=Cr(e);return(this.isNegative()||n.isNeg())&&Na("unbound-bitwise-result","or"),Bs(Cr(this).or(n))}xor(e){const n=Cr(e);return(this.isNegative()||n.isNeg())&&Na("unbound-bitwise-result","xor"),Bs(Cr(this).xor(n))}mask(e){return(this.isNegative()||e<0)&&Na("negative-width","mask"),Bs(Cr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Na("negative-width","shl"),Bs(Cr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Na("negative-width","shr"),Bs(Cr(this).shrn(e))}eq(e){return Cr(this).eq(Cr(e))}lt(e){return Cr(this).lt(Cr(e))}lte(e){return Cr(this).lte(Cr(e))}gt(e){return Cr(this).gt(Cr(e))}gte(e){return Cr(this).gte(Cr(e))}isNegative(){return"-"===this._hex[0]}isZero(){return Cr(this).isZero()}toNumber(){try{return Cr(this).toNumber()}catch{Na("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return cl.throwError("this platform does not support BigInt",Jt.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?_8||(_8=!0,cl.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?cl.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Jt.errors.UNEXPECTED_ARGUMENT,{}):cl.throwError("BigNumber.toString does not accept parameters",Jt.errors.UNEXPECTED_ARGUMENT,{})),Cr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof jn)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new jn(aE,Vy(e)):e.match(/^-?[0-9]+$/)?new jn(aE,Vy(new Ky(e))):cl.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Na("underflow","BigNumber.from",e),(e>=S8||e<=-S8)&&Na("overflow","BigNumber.from",e),jn.from(String(e));const n=e;if("bigint"==typeof n)return jn.from(n.toString());if(P1(n))return jn.from(gr(n));if(n)if(n.toHexString){const o=n.toHexString();if("string"==typeof o)return jn.from(o)}else{let o=n._hex;if(null==o&&"BigNumber"===n.type&&(o=n.hex),"string"==typeof o&&(hi(o)||"-"===o[0]&&hi(o.substring(1))))return jn.from(o)}return cl.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function Vy(t){if("string"!=typeof t)return Vy(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&cl.throwArgumentError("invalid hex","value",t),"0x00"===(t=Vy(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Bs(t){return jn.from(Vy(t))}function Cr(t){const e=jn.from(t).toHexString();return"-"===e[0]?new Ky("-"+e.substring(3),16):new Ky(e.substring(2),16)}function Na(t,e,n){const o={fault:t,operation:e};return null!=n&&(o.value=n),cl.throwError(t,Jt.errors.NUMERIC_FAULT,o)}const oc=new Jt("rlp/5.7.0");function M8(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function I8(t,e,n){let o=0;for(let l=0;le+1+o&&oc.throwError("child data too short",Jt.errors.BUFFER_OVERRUN,{})}return{consumed:1+o,result:l}}function D8(t,e){if(0===t.length&&oc.throwError("data too short",Jt.errors.BUFFER_OVERRUN,{}),t[e]>=248){const n=t[e]-247;e+1+n>t.length&&oc.throwError("data short segment too short",Jt.errors.BUFFER_OVERRUN,{});const o=I8(t,e+1,n);return e+1+n+o>t.length&&oc.throwError("data long segment too short",Jt.errors.BUFFER_OVERRUN,{}),x8(t,e,e+1+n,n+o)}if(t[e]>=192){const n=t[e]-192;return e+1+n>t.length&&oc.throwError("data array too short",Jt.errors.BUFFER_OVERRUN,{}),x8(t,e,e+1,n)}if(t[e]>=184){const n=t[e]-183;e+1+n>t.length&&oc.throwError("data array too short",Jt.errors.BUFFER_OVERRUN,{});const o=I8(t,e+1,n);e+1+n+o>t.length&&oc.throwError("data array too short",Jt.errors.BUFFER_OVERRUN,{});return{consumed:1+n+o,result:gr(t.slice(e+1+n,e+1+n+o))}}if(t[e]>=128){const n=t[e]-128;e+1+n>t.length&&oc.throwError("data too short",Jt.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:gr(t.slice(e+1,e+1+n))}}return{consumed:1,result:gr(t[e])}}function uE(t){const e=Sr(t),n=D8(e,0);return n.consumed!==e.length&&oc.throwArgumentError("invalid rlp data","data",t),n.result}const Of=new Jt("address/5.7.0");function T8(t){hi(t,20)||Of.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let l=0;l<40;l++)n[l]=e[l].charCodeAt(0);const o=Sr(Po(n));for(let l=0;l<40;l+=2)o[l>>1]>>4>=8&&(e[l]=e[l].toUpperCase()),(15&o[l>>1])>=8&&(e[l+1]=e[l+1].toUpperCase());return"0x"+e.join("")}const cE={};for(let t=0;t<10;t++)cE[String(t)]=String(t);for(let t=0;t<26;t++)cE[String.fromCharCode(65+t)]=String(10+t);const O8=Math.floor(function Oj(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function N8(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(o=>cE[o]).join("");for(;e.length>=O8;){let o=e.substring(0,O8);e=parseInt(o,10)%97+e.substring(o.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}function As(t){let e=null;if("string"!=typeof t&&Of.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=T8(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Of.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==N8(t)&&Of.throwArgumentError("bad icap checksum","address",t),e=function Cj(t){return new Ky(t,36).toString(16)}(t.substring(4));e.length<40;)e="0"+e;e=T8("0x"+e)}else Of.throwArgumentError("invalid address","address",t);return e}const P8="hash/5.7.0";var Pj=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const xi=new Jt(P8),R8=new Uint8Array(32);R8.fill(0);const Rj=jn.from(-1),k8=jn.from(0),L8=jn.from(1),kj=jn.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Fj=qi(L8.toHexString(),32),Bj=qi(k8.toHexString(),32),F8={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},lE=["name","version","chainId","verifyingContract","salt"];function B8(t){return function(e){return"string"!=typeof e&&xi.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const jj={name:B8("name"),version:B8("version"),chainId:function(t){try{return jn.from(t).toString()}catch{}return xi.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return As(t).toLowerCase()}catch{}return xi.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Sr(t);if(32!==e.length)throw new Error("bad length");return gr(e)}catch{}return xi.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function fE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=""===e[1],o=parseInt(e[2]||"256");(o%8!=0||o>256||e[2]&&e[2]!==String(o))&&xi.throwArgumentError("invalid numeric width","type",t);const l=kj.mask(n?o-1:o),m=n?l.add(L8).mul(Rj):k8;return function(N){const J=jn.from(N);return(J.lt(m)||J.gt(l))&&xi.throwArgumentError(`value out-of-bounds for ${t}`,"value",N),qi(J.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return(0===n||n>32||e[1]!==String(n))&&xi.throwArgumentError("invalid bytes width","type",t),function(o){return Sr(o).length!==n&&xi.throwArgumentError(`invalid length for ${t}`,"value",o),function Lj(t){const e=Sr(t),n=e.length%32;return n?ra([e,R8.slice(n)]):gr(e)}(o)}}}switch(t){case"address":return function(e){return qi(As(e),32)};case"bool":return function(e){return e?Fj:Bj};case"bytes":return function(e){return Po(e)};case"string":return function(e){return oE(e)}}return null}function j8(t,e){return`${t}(${e.map(({name:n,type:o})=>o+" "+n).join(",")})`}class oa{constructor(e){Dr(this,"types",Object.freeze(gh(e))),Dr(this,"_encoderCache",{}),Dr(this,"_types",{});const n={},o={},l={};Object.keys(e).forEach(J=>{n[J]={},o[J]=[],l[J]={}});for(const J in e){const ee={};e[J].forEach(oe=>{ee[oe.name]&&xi.throwArgumentError(`duplicate variable name ${JSON.stringify(oe.name)} in ${JSON.stringify(J)}`,"types",e),ee[oe.name]=!0;const ue=oe.type.match(/^([^\x5b]*)(\x5b|$)/)[1];ue===J&&xi.throwArgumentError(`circular type reference to ${JSON.stringify(ue)}`,"types",e),!fE(ue)&&(o[ue]||xi.throwArgumentError(`unknown type ${JSON.stringify(ue)}`,"types",e),o[ue].push(J),n[J][ue]=!0)})}const m=Object.keys(o).filter(J=>0===o[J].length);0===m.length?xi.throwArgumentError("missing primary type","types",e):m.length>1&&xi.throwArgumentError(`ambiguous primary types or unused types: ${m.map(J=>JSON.stringify(J)).join(", ")}`,"types",e),Dr(this,"primaryType",m[0]),function N(J,ee){ee[J]&&xi.throwArgumentError(`circular type reference to ${JSON.stringify(J)}`,"types",e),ee[J]=!0,Object.keys(n[J]).forEach(oe=>{o[oe]&&(N(oe,ee),Object.keys(ee).forEach(ue=>{l[ue][oe]=!0}))}),delete ee[J]}(this.primaryType,{});for(const J in l){const ee=Object.keys(l[J]);ee.sort(),this._types[J]=j8(J,e[J])+ee.map(oe=>j8(oe,e[oe])).join("")}}getEncoder(e){let n=this._encoderCache[e];return n||(n=this._encoderCache[e]=this._getEncoder(e)),n}_getEncoder(e){{const l=fE(e);if(l)return l}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const l=n[1],m=this.getEncoder(l),N=parseInt(n[3]);return J=>{N>=0&&J.length!==N&&xi.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",J);let ee=J.map(m);return this._types[l]&&(ee=ee.map(Po)),Po(ra(ee))}}const o=this.types[e];if(o){const l=oE(this._types[e]);return m=>{const N=o.map(({name:J,type:ee})=>{const oe=this.getEncoder(ee)(m[J]);return this._types[ee]?Po(oe):oe});return N.unshift(l),ra(N)}}return xi.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const n=this._types[e];return n||xi.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Po(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,o){if(fE(e))return o(e,n);const l=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(l){const N=l[1],J=parseInt(l[3]);return J>=0&&n.length!==J&&xi.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n),n.map(ee=>this._visit(N,ee,o))}const m=this.types[e];return m?m.reduce((N,{name:J,type:ee})=>(N[J]=this._visit(ee,n[J],o),N),{}):xi.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new oa(e)}static getPrimaryType(e){return oa.from(e).primaryType}static hashStruct(e,n,o){return oa.from(n).hashStruct(e,o)}static hashDomain(e){const n=[];for(const o in e){const l=F8[o];l||xi.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(o)}`,"domain",e),n.push({name:o,type:l})}return n.sort((o,l)=>lE.indexOf(o.name)-lE.indexOf(l.name)),oa.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,o){return ra(["0x1901",oa.hashDomain(e),oa.from(n).hash(o)])}static hash(e,n,o){return Po(oa.encode(e,n,o))}static resolveNames(e,n,o,l){return Pj(this,void 0,void 0,function*(){e=Fs(e);const m={};e.verifyingContract&&!hi(e.verifyingContract,20)&&(m[e.verifyingContract]="0x");const N=oa.from(n);N.visit(o,(J,ee)=>("address"===J&&!hi(ee,20)&&(m[ee]="0x"),ee));for(const J in m)m[J]=yield l(J);return e.verifyingContract&&m[e.verifyingContract]&&(e.verifyingContract=m[e.verifyingContract]),o=N.visit(o,(J,ee)=>"address"===J&&m[ee]?m[ee]:ee),{domain:e,value:o}})}static getPayload(e,n,o){oa.hashDomain(e);const l={},m=[];lE.forEach(ee=>{const oe=e[ee];null!=oe&&(l[ee]=jj[ee](oe),m.push({name:ee,type:F8[ee]}))});const N=oa.from(n),J=Fs(n);return J.EIP712Domain?xi.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):J.EIP712Domain=m,N.encode(o),{types:J,domain:l,primaryType:N.primaryType,message:N.visit(o,(ee,oe)=>{if(ee.match(/^bytes(\d*)/))return gr(Sr(oe));if(ee.match(/^u?int/))return jn.from(oe).toString();switch(ee){case"address":return oe.toLowerCase();case"bool":return!!oe;case"string":return"string"!=typeof oe&&xi.throwArgumentError("invalid string","value",oe),oe}return xi.throwArgumentError("unsupported type","type",ee)})}}}const Uj=jn.from(0);var Kj=y(37084),sc=y.n(Kj);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function vp(t,e,n){return t(n={path:e,exports:{},require:function(o,l){return function Vj(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(l??n.path)}},n.exports),n.exports}var dE=U8;function U8(t,e){if(!t)throw new Error(e||"Assertion failed")}U8.equal=function(e,n,o){if(e!=n)throw new Error(o||"Assertion failed: "+e+" != "+n)};var fu=vp(function(t,e){var n=e;function l(N){return 1===N.length?"0"+N:N}function m(N){for(var J="",ee=0;ee>8,Ie=255&ue;ge?ee.push(ge,Ie):ee.push(Ie)}return ee},n.zero2=l,n.toHex=m,n.encode=function(J,ee){return"hex"===ee?m(J):J}}),sa=vp(function(t,e){var n=e;n.assert=dE,n.toArray=fu.toArray,n.zero2=fu.zero2,n.toHex=fu.toHex,n.encode=fu.encode,n.getNAF=function o(ee,oe,ue){var ge=new Array(Math.max(ee.bitLength(),ue)+1);ge.fill(0);for(var Ie=1<(Ie>>1)-1?(Ie>>1)-Ue:Ue,Re.isubn(ke)):ke=0,ge[Te]=ke,Re.iushrn(1)}return ge},n.getJSF=function l(ee,oe){var ue=[[],[]];ee=ee.clone(),oe=oe.clone();for(var Re,ge=0,Ie=0;ee.cmpn(-ge)>0||oe.cmpn(-Ie)>0;){var Ue,Ge,Te=ee.andln(3)+ge&3,ke=oe.andln(3)+Ie&3;3===Te&&(Te=-1),3===ke&&(ke=-1),1&Te?Ue=3!==(Re=ee.andln(7)+ge&7)&&5!==Re||2!==ke?Te:-Te:Ue=0,ue[0].push(Ue),1&ke?Ge=3!==(Re=oe.andln(7)+Ie&7)&&5!==Re||2!==Te?ke:-ke:Ge=0,ue[1].push(Ge),2*ge===Ue+1&&(ge=1-ge),2*Ie===Ge+1&&(Ie=1-Ie),ee.iushrn(1),oe.iushrn(1)}return ue},n.cachedProperty=function m(ee,oe,ue){var ge="_"+oe;ee.prototype[oe]=function(){return void 0!==this[ge]?this[ge]:this[ge]=ue.call(this)}},n.parseBytes=function N(ee){return"string"==typeof ee?n.toArray(ee,"hex"):ee},n.intFromLE=function J(ee){return new(fr())(ee,"hex","le")}}),B1=sa.getNAF,Hj=sa.getJSF,j1=sa.assert;function Nf(t,e){this.type=t,this.p=new(fr())(e.p,16),this.red=e.prime?fr().red(e.prime):fr().mont(this.p),this.zero=new(fr())(0).toRed(this.red),this.one=new(fr())(1).toRed(this.red),this.two=new(fr())(2).toRed(this.red),this.n=e.n&&new(fr())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var yh=Nf;function Pa(t,e){this.curve=t,this.type=e,this.precomputed=null}Nf.prototype.point=function(){throw new Error("Not implemented")},Nf.prototype.validate=function(){throw new Error("Not implemented")},Nf.prototype._fixedNafMul=function(e,n){j1(e.precomputed);var o=e._getDoubles(),l=B1(n,1,this._bitLength),m=(1<=J;oe--)ee=(ee<<1)+l[oe];N.push(ee)}for(var ue=this.jpoint(null,null,null),ge=this.jpoint(null,null,null),Ie=m;Ie>0;Ie--){for(J=0;J=0;ee--){for(var oe=0;ee>=0&&0===N[ee];ee--)oe++;if(ee>=0&&oe++,J=J.dblp(oe),ee<0)break;var ue=N[ee];j1(0!==ue),J="affine"===e.type?ue>0?J.mixedAdd(m[ue-1>>1]):J.mixedAdd(m[-ue-1>>1].neg()):ue>0?J.add(m[ue-1>>1]):J.add(m[-ue-1>>1].neg())}return"affine"===e.type?J.toP():J},Nf.prototype._wnafMulAdd=function(e,n,o,l,m){var ue,ge,Ie,N=this._wnafT1,J=this._wnafT2,ee=this._wnafT3,oe=0;for(ue=0;ue=1;ue-=2){var Te=ue-1,ke=ue;if(1===N[Te]&&1===N[ke]){var Ue=[n[Te],null,null,n[ke]];0===n[Te].y.cmp(n[ke].y)?(Ue[1]=n[Te].add(n[ke]),Ue[2]=n[Te].toJ().mixedAdd(n[ke].neg())):0===n[Te].y.cmp(n[ke].y.redNeg())?(Ue[1]=n[Te].toJ().mixedAdd(n[ke]),Ue[2]=n[Te].add(n[ke].neg())):(Ue[1]=n[Te].toJ().mixedAdd(n[ke]),Ue[2]=n[Te].toJ().mixedAdd(n[ke].neg()));var Ge=[-3,-1,-5,-7,0,7,5,1,3],nt=Hj(o[Te],o[ke]);for(oe=Math.max(nt[0].length,oe),ee[Te]=new Array(oe),ee[ke]=new Array(oe),ge=0;ge=0;ue--){for(var Nn=0;ue>=0;){var vn=!0;for(ge=0;ge=0&&Nn++,kt=kt.dblp(Nn),ue<0)break;for(ge=0;ge0?Ie=J[ge][pn-1>>1]:pn<0&&(Ie=J[ge][-pn-1>>1].neg()),kt="affine"===Ie.type?kt.mixedAdd(Ie):kt.add(Ie))}}for(ue=0;ue=Math.ceil((e.bitLength()+1)/n.step)},Pa.prototype._getDoubles=function(e,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var o=[this],l=this,m=0;m=0&&(Re=oe,Te=ue),ge.negative&&(ge=ge.neg(),Ie=Ie.neg()),Re.negative&&(Re=Re.neg(),Te=Te.neg()),[{a:ge,b:Ie},{a:Re,b:Te}]},Ra.prototype._endoSplit=function(e){var n=this.endo.basis,o=n[0],l=n[1],m=l.b.mul(e).divRound(this.n),N=o.b.neg().mul(e).divRound(this.n),J=m.mul(o.a),ee=N.mul(l.a),oe=m.mul(o.b),ue=N.mul(l.b);return{k1:e.sub(J).sub(ee),k2:oe.add(ue).neg()}},Ra.prototype.pointFromX=function(e,n){(e=new(fr())(e,16)).red||(e=e.toRed(this.red));var o=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),l=o.redSqrt();if(0!==l.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var m=l.fromRed().isOdd();return(n&&!m||!n&&m)&&(l=l.redNeg()),this.point(e,l)},Ra.prototype.validate=function(e){if(e.inf)return!0;var n=e.x,o=e.y,l=this.a.redMul(n),m=n.redSqr().redMul(n).redIAdd(l).redIAdd(this.b);return 0===o.redSqr().redISub(m).cmpn(0)},Ra.prototype._endoWnafMulAdd=function(e,n,o){for(var l=this._endoWnafT1,m=this._endoWnafT2,N=0;N":""},Ao.prototype.isInfinity=function(){return this.inf},Ao.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var n=this.y.redSub(e.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(e.x).redInvm()));var o=n.redSqr().redISub(this.x).redISub(e.x),l=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,l)},Ao.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,o=this.x.redSqr(),l=e.redInvm(),m=o.redAdd(o).redIAdd(o).redIAdd(n).redMul(l),N=m.redSqr().redISub(this.x.redAdd(this.x)),J=m.redMul(this.x.redSub(N)).redISub(this.y);return this.curve.point(N,J)},Ao.prototype.getX=function(){return this.x.fromRed()},Ao.prototype.getY=function(){return this.y.fromRed()},Ao.prototype.mul=function(e){return e=new(fr())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Ao.prototype.mulAdd=function(e,n,o){var l=[this,n],m=[e,o];return this.curve.endo?this.curve._endoWnafMulAdd(l,m):this.curve._wnafMulAdd(1,l,m,2)},Ao.prototype.jmulAdd=function(e,n,o){var l=[this,n],m=[e,o];return this.curve.endo?this.curve._endoWnafMulAdd(l,m,!0):this.curve._wnafMulAdd(1,l,m,2,!0)},Ao.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Ao.prototype.neg=function(e){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var o=this.precomputed,l=function(m){return m.neg()};n.precomputed={naf:o.naf&&{wnd:o.naf.wnd,points:o.naf.points.map(l)},doubles:o.doubles&&{step:o.doubles.step,points:o.doubles.points.map(l)}}}return n},Ao.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},hE(ko,yh.BasePoint),Ra.prototype.jpoint=function(e,n,o){return new ko(this,e,n,o)},ko.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),n=e.redSqr(),o=this.x.redMul(n),l=this.y.redMul(n).redMul(e);return this.curve.point(o,l)},ko.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ko.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var n=e.z.redSqr(),o=this.z.redSqr(),l=this.x.redMul(n),m=e.x.redMul(o),N=this.y.redMul(n.redMul(e.z)),J=e.y.redMul(o.redMul(this.z)),ee=l.redSub(m),oe=N.redSub(J);if(0===ee.cmpn(0))return 0!==oe.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ue=ee.redSqr(),ge=ue.redMul(ee),Ie=l.redMul(ue),Re=oe.redSqr().redIAdd(ge).redISub(Ie).redISub(Ie),Te=oe.redMul(Ie.redISub(Re)).redISub(N.redMul(ge)),ke=this.z.redMul(e.z).redMul(ee);return this.curve.jpoint(Re,Te,ke)},ko.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var n=this.z.redSqr(),o=this.x,l=e.x.redMul(n),m=this.y,N=e.y.redMul(n).redMul(this.z),J=o.redSub(l),ee=m.redSub(N);if(0===J.cmpn(0))return 0!==ee.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var oe=J.redSqr(),ue=oe.redMul(J),ge=o.redMul(oe),Ie=ee.redSqr().redIAdd(ue).redISub(ge).redISub(ge),Re=ee.redMul(ge.redISub(Ie)).redISub(m.redMul(ue)),Te=this.z.redMul(J);return this.curve.jpoint(Ie,Re,Te)},ko.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var o=this;for(n=0;n=0)return!1;if(o.redIAdd(m),0===this.x.cmp(o))return!0}},ko.prototype.inspect=function(){return this.isInfinity()?"":""},ko.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var U1=vp(function(t,e){var n=e;n.base=yh,n.short=Wj,n.mont=null,n.edwards=null}),K1=vp(function(t,e){var N,n=e,o=sa.assert;function l(J){"short"===J.type?this.curve=new U1.short(J):"edwards"===J.type?this.curve=new U1.edwards(J):this.curve=new U1.mont(J),this.g=this.curve.g,this.n=this.curve.n,this.hash=J.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function m(J,ee){Object.defineProperty(n,J,{configurable:!0,enumerable:!0,get:function(){var oe=new l(ee);return Object.defineProperty(n,J,{configurable:!0,enumerable:!0,value:oe}),oe}})}n.PresetCurve=l,m("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:sc().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),m("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:sc().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),m("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:sc().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),m("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:sc().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"]}),m("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:sc().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"]}),m("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:sc().sha256,gRed:!1,g:["9"]}),m("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:sc().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{N=null.crash()}catch{N=void 0}m("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:sc().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",N]})});function Pf(t){if(!(this instanceof Pf))return new Pf(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=fu.toArray(t.entropy,t.entropyEnc||"hex"),n=fu.toArray(t.nonce,t.nonceEnc||"hex"),o=fu.toArray(t.pers,t.persEnc||"hex");dE(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,o)}var K8=Pf;Pf.prototype._init=function(e,n,o){var l=e.concat(n).concat(o);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var m=0;m=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(o||[])),this._reseed=1},Pf.prototype.generate=function(e,n,o,l){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(l=o,o=n,n=null),o&&(o=fu.toArray(o,l||"hex"),this._update(o));for(var m=[];m.length"};var Gj=sa.assert;function V1(t,e){if(t instanceof V1)return t;this._importDER(t,e)||(Gj(t.r&&t.s,"Signature without r or s"),this.r=new(fr())(t.r,16),this.s=new(fr())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var H1=V1;function Zj(){this.place=0}function yE(t,e){var n=t[e.place++];if(!(128&n))return n;var o=15&n;if(0===o||o>4)return!1;for(var l=0,m=0,N=e.place;m>>=0;return!(l<=127)&&(e.place=N,l)}function V8(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}V1.prototype._importDER=function(e,n){e=sa.toArray(e,n);var o=new Zj;if(48!==e[o.place++])return!1;var l=yE(e,o);if(!1===l||l+o.place!==e.length||2!==e[o.place++])return!1;var m=yE(e,o);if(!1===m)return!1;var N=e.slice(o.place,m+o.place);if(o.place+=m,2!==e[o.place++])return!1;var J=yE(e,o);if(!1===J||e.length!==J+o.place)return!1;var ee=e.slice(o.place,J+o.place);if(0===N[0]){if(!(128&N[1]))return!1;N=N.slice(1)}if(0===ee[0]){if(!(128&ee[1]))return!1;ee=ee.slice(1)}return this.r=new(fr())(N),this.s=new(fr())(ee),this.recoveryParam=null,!0},V1.prototype.toDER=function(e){var n=this.r.toArray(),o=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&o[0]&&(o=[0].concat(o)),n=V8(n),o=V8(o);!(o[0]||128&o[1]);)o=o.slice(1);var l=[2];mE(l,n.length),(l=l.concat(n)).push(2),mE(l,o.length);var m=l.concat(o),N=[48];return mE(N,m.length),N=N.concat(m),sa.encode(N,e)};var Yj=function(){throw new Error("unsupported")},H8=sa.assert;function ka(t){if(!(this instanceof ka))return new ka(t);"string"==typeof t&&(H8(Object.prototype.hasOwnProperty.call(K1,t),"Unknown curve "+t),t=K1[t]),t instanceof K1.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Jj=ka;ka.prototype.keyPair=function(e){return new gE(this,e)},ka.prototype.keyFromPrivate=function(e,n){return gE.fromPrivate(this,e,n)},ka.prototype.keyFromPublic=function(e,n){return gE.fromPublic(this,e,n)},ka.prototype.genKeyPair=function(e){e||(e={});for(var n=new K8({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Yj(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),l=this.n.sub(new(fr())(2));;){var m=new(fr())(n.generate(o));if(!(m.cmp(l)>0))return m.iaddn(1),this.keyFromPrivate(m)}},ka.prototype._truncateToN=function(e,n){var o=8*e.byteLength()-this.n.bitLength();return o>0&&(e=e.ushrn(o)),!n&&e.cmp(this.n)>=0?e.sub(this.n):e},ka.prototype.sign=function(e,n,o,l){"object"==typeof o&&(l=o,o=null),l||(l={}),n=this.keyFromPrivate(n,o),e=this._truncateToN(new(fr())(e,16));for(var m=this.n.byteLength(),N=n.getPrivate().toArray("be",m),J=e.toArray("be",m),ee=new K8({hash:this.hash,entropy:N,nonce:J,pers:l.pers,persEnc:l.persEnc||"utf8"}),oe=this.n.sub(new(fr())(1)),ue=0;;ue++){var ge=l.k?l.k(ue):new(fr())(ee.generate(this.n.byteLength()));if(!((ge=this._truncateToN(ge,!0)).cmpn(1)<=0||ge.cmp(oe)>=0)){var Ie=this.g.mul(ge);if(!Ie.isInfinity()){var Re=Ie.getX(),Te=Re.umod(this.n);if(0!==Te.cmpn(0)){var ke=ge.invm(this.n).mul(Te.mul(n.getPrivate()).iadd(e));if(0!==(ke=ke.umod(this.n)).cmpn(0)){var Ue=(Ie.getY().isOdd()?1:0)|(0!==Re.cmp(Te)?2:0);return l.canonical&&ke.cmp(this.nh)>0&&(ke=this.n.sub(ke),Ue^=1),new H1({r:Te,s:ke,recoveryParam:Ue})}}}}}},ka.prototype.verify=function(e,n,o,l){e=this._truncateToN(new(fr())(e,16)),o=this.keyFromPublic(o,l);var m=(n=new H1(n,"hex")).r,N=n.s;if(m.cmpn(1)<0||m.cmp(this.n)>=0||N.cmpn(1)<0||N.cmp(this.n)>=0)return!1;var ue,J=N.invm(this.n),ee=J.mul(e).umod(this.n),oe=J.mul(m).umod(this.n);return this.curve._maxwellTrick?!(ue=this.g.jmulAdd(ee,o.getPublic(),oe)).isInfinity()&&ue.eqXToP(m):!(ue=this.g.mulAdd(ee,o.getPublic(),oe)).isInfinity()&&0===ue.getX().umod(this.n).cmp(m)},ka.prototype.recoverPubKey=function(t,e,n,o){H8((3&n)===n,"The recovery param is more than two bits"),e=new H1(e,o);var l=this.n,m=new(fr())(t),N=e.r,J=e.s,ee=1&n,oe=n>>1;if(N.cmp(this.curve.p.umod(this.curve.n))>=0&&oe)throw new Error("Unable to find sencond key candinate");N=oe?this.curve.pointFromX(N.add(this.curve.n),ee):this.curve.pointFromX(N,ee);var ue=e.r.invm(l),ge=l.sub(m).mul(ue).umod(l),Ie=J.mul(ue).umod(l);return this.g.mulAdd(ge,N,Ie)},ka.prototype.getKeyRecoveryParam=function(t,e,n,o){if(null!==(e=new H1(e,o)).recoveryParam)return e.recoveryParam;for(var l=0;l<4;l++){var m;try{m=this.recoverPubKey(t,e,l)}catch{continue}if(m.eq(n))return l}throw new Error("Unable to find valid recovery factor")};var qj=vp(function(t,e){var n=e;n.version="6.5.4",n.utils=sa,n.rand=function(){throw new Error("unsupported")},n.curve=U1,n.curves=K1,n.ec=Jj,n.eddsa=null}).ec;const vE=new Jt("signing-key/5.7.0");let bE=null;function ac(){return bE||(bE=new qj("secp256k1")),bE}class $j{constructor(e){Dr(this,"curve","secp256k1"),Dr(this,"privateKey",gr(e)),32!==ph(this.privateKey)&&vE.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const n=ac().keyFromPrivate(Sr(this.privateKey));Dr(this,"publicKey","0x"+n.getPublic(!1,"hex")),Dr(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Dr(this,"_isSigningKey",!0)}_addPoint(e){const n=ac().keyFromPublic(Sr(this.publicKey)),o=ac().keyFromPublic(Sr(e));return"0x"+n.pub.add(o.pub).encodeCompressed("hex")}signDigest(e){const n=ac().keyFromPrivate(Sr(this.privateKey)),o=Sr(e);32!==o.length&&vE.throwArgumentError("bad digest length","digest",e);const l=n.sign(o,{canonical:!0});return By({recoveryParam:l.recoveryParam,r:qi("0x"+l.r.toString(16),32),s:qi("0x"+l.s.toString(16),32)})}computeSharedSecret(e){const n=ac().keyFromPrivate(Sr(this.privateKey)),o=ac().keyFromPublic(Sr(z8(e)));return qi("0x"+n.derive(o.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function z8(t,e){const n=Sr(t);if(32===n.length){const o=new $j(n);return e?"0x"+ac().keyFromPrivate(n).getPublic(!0,"hex"):o.publicKey}return 33===n.length?e?gr(n):"0x"+ac().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?e?"0x"+ac().keyFromPublic(n).getPublic(!0,"hex"):gr(n):vE.throwArgumentError("invalid public or private key","key","[REDACTED]")}const ns=new Jt("transactions/5.7.0");var W8;function wE(t){return"0x"===t?null:As(t)}function rs(t){return"0x"===t?Uj:jn.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(W8||(W8={}));function G8(t,e){return function iU(t){return As(ws(Po(ws(z8(t),1)),12))}(function eU(t,e){const n=By(e),o={r:Sr(n.r),s:Sr(n.s)};return"0x"+ac().recoverPubKey(Sr(t),o,n.recoveryParam).encode("hex",!1)}(Sr(t),e))}function aa(t,e){const n=mp(jn.from(t).toHexString());return n.length>32&&ns.throwArgumentError("invalid length for "+e,"transaction:"+e,t),n}function AE(t,e){return{address:As(t),storageKeys:(e||[]).map((n,o)=>(32!==ph(n)&&ns.throwArgumentError("invalid access list storageKey",`accessList[${t}:${o}]`,n),n.toLowerCase()))}}function Hy(t){if(Array.isArray(t))return t.map((n,o)=>Array.isArray(n)?(n.length>2&&ns.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${o}]`,n),AE(n[0],n[1])):AE(n.address,n.storageKeys));const e=Object.keys(t).map(n=>{const o=t[n].reduce((l,m)=>(l[m]=!0,l),{});return AE(n,Object.keys(o).sort())});return e.sort((n,o)=>n.address.localeCompare(o.address)),e}function Z8(t){return Hy(t).map(e=>[e.address,e.storageKeys])}function Y8(t,e){if(null!=t.gasPrice){const o=jn.from(t.gasPrice),l=jn.from(t.maxFeePerGas||0);o.eq(l)||ns.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:o,maxFeePerGas:l})}const n=[aa(t.chainId||0,"chainId"),aa(t.nonce||0,"nonce"),aa(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),aa(t.maxFeePerGas||0,"maxFeePerGas"),aa(t.gasLimit||0,"gasLimit"),null!=t.to?As(t.to):"0x",aa(t.value||0,"value"),t.data||"0x",Z8(t.accessList||[])];if(e){const o=By(e);n.push(aa(o.recoveryParam,"recoveryParam")),n.push(mp(o.r)),n.push(mp(o.s))}return ra(["0x02",F1(n)])}function J8(t,e){const n=[aa(t.chainId||0,"chainId"),aa(t.nonce||0,"nonce"),aa(t.gasPrice||0,"gasPrice"),aa(t.gasLimit||0,"gasLimit"),null!=t.to?As(t.to):"0x",aa(t.value||0,"value"),t.data||"0x",Z8(t.accessList||[])];if(e){const o=By(e);n.push(aa(o.recoveryParam,"recoveryParam")),n.push(mp(o.r)),n.push(mp(o.s))}return ra(["0x01",F1(n)])}function Q8(t,e,n){try{const o=rs(e[0]).toNumber();if(0!==o&&1!==o)throw new Error("bad recid");t.v=o}catch{ns.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=qi(e[1],32),t.s=qi(e[2],32);try{const o=Po(n(t));t.from=G8(o,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function cU(t){const e=Sr(t);if(e[0]>127)return function uU(t){const e=uE(t);9!==e.length&&6!==e.length&&ns.throwArgumentError("invalid raw transaction","rawTransaction",t);const n={nonce:rs(e[0]).toNumber(),gasPrice:rs(e[1]),gasLimit:rs(e[2]),to:wE(e[3]),value:rs(e[4]),data:e[5],chainId:0};if(6===e.length)return n;try{n.v=jn.from(e[6]).toNumber()}catch{return n}if(n.r=qi(e[7],32),n.s=qi(e[8],32),jn.from(n.r).isZero()&&jn.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);let o=n.v-27;const l=e.slice(0,6);0!==n.chainId&&(l.push(gr(n.chainId)),l.push("0x"),l.push("0x"),o-=2*n.chainId+8);const m=Po(F1(l));try{n.from=G8(m,{r:gr(n.r),s:gr(n.s),recoveryParam:o})}catch{}n.hash=Po(t)}return n.type=null,n}(e);switch(e[0]){case 1:return function aU(t){const e=uE(t.slice(1));8!==e.length&&11!==e.length&&ns.throwArgumentError("invalid component count for transaction type: 1","payload",gr(t));const n={type:1,chainId:rs(e[0]).toNumber(),nonce:rs(e[1]).toNumber(),gasPrice:rs(e[2]),gasLimit:rs(e[3]),to:wE(e[4]),value:rs(e[5]),data:e[6],accessList:Hy(e[7])};return 8===e.length||(n.hash=Po(t),Q8(n,e.slice(8),J8)),n}(e);case 2:return function sU(t){const e=uE(t.slice(1));9!==e.length&&12!==e.length&&ns.throwArgumentError("invalid component count for transaction type: 2","payload",gr(t));const n=rs(e[2]),o=rs(e[3]),l={type:2,chainId:rs(e[0]).toNumber(),nonce:rs(e[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:o,gasPrice:null,gasLimit:rs(e[4]),to:wE(e[5]),value:rs(e[6]),data:e[7],accessList:Hy(e[8])};return 9===e.length||(l.hash=Po(t),Q8(l,e.slice(9),Y8)),l}(e)}return ns.throwError(`unsupported transaction type: ${e[0]}`,Jt.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function q8(t){t=atob(t);const e=[];for(let n=0;n{m[J.toLowerCase()]=N}):o.headers.keys().forEach(N=>{m[N.toLowerCase()]=o.headers.get(N)}),{headers:m,statusCode:o.status,statusMessage:o.statusText,body:Sr(new Uint8Array(l))}})}var hU=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const du=new Jt("web/5.7.1");function $8(t){return new Promise(e=>{setTimeout(e,t)})}function Rf(t,e){if(null==t)return null;if("string"==typeof t)return t;if(eE(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return R1(t)}catch{}return gr(t)}return t}function pU(t){return ul(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function EE(t,e,n){let l=null;if(null!=e){l=ul(e);const m="string"==typeof t?{url:t}:Fs(t);m.headers?0!==Object.keys(m.headers).filter(J=>"content-type"===J.toLowerCase()).length||(m.headers=Fs(m.headers),m.headers["content-type"]="application/json"):m.headers={"content-type":"application/json"},t=m}return function gU(t,e,n){const o="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;du.assertArgument(o>0&&o%1==0,"invalid connection throttle limit","connection.throttleLimit",o);const l="object"==typeof t?t.throttleCallback:null,m="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;du.assertArgument(m>0&&m%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",m);const N="object"==typeof t&&!!t.errorPassThrough,J={};let ee=null;const oe={method:"GET"};let ue=!1,ge=12e4;if("string"==typeof t)ee=t;else if("object"==typeof t){if((null==t||null==t.url)&&du.throwArgumentError("missing URL","connection.url",t),ee=t.url,"number"==typeof t.timeout&&t.timeout>0&&(ge=t.timeout),t.headers)for(const Ge in t.headers)J[Ge.toLowerCase()]={key:Ge,value:String(t.headers[Ge])},["if-none-match","if-modified-since"].indexOf(Ge.toLowerCase())>=0&&(ue=!0);if(oe.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==ee.substring(0,6)&&!0!==t.allowInsecureAuthentication&&du.throwError("basic authentication requires a secure https url",Jt.errors.INVALID_ARGUMENT,{argument:"url",url:ee,user:t.user,password:"[REDACTED]"});const Ge=t.user+":"+t.password;J.authorization={key:"Authorization",value:"Basic "+X8(ul(Ge))}}null!=t.skipFetchSetup&&(oe.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(oe.fetchOptions=Fs(t.fetchOptions))}const Ie=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Re=ee?ee.match(Ie):null;if(Re)try{const Ge={statusCode:200,statusMessage:"OK",headers:{"content-type":Re[1]||"text/plain"},body:Re[2]?q8(Re[3]):pU(Re[3])};let nt=Ge.body;return n&&(nt=n(Ge.body,Ge)),Promise.resolve(nt)}catch(Ge){du.throwError("processing response error",Jt.errors.SERVER_ERROR,{body:Rf(Re[1],Re[2]),error:Ge,requestBody:null,requestMethod:"GET",url:ee})}e&&(oe.method="POST",oe.body=e,null==J["content-type"]&&(J["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==J["content-length"]&&(J["content-length"]={key:"Content-Length",value:String(e.length)}));const Te={};Object.keys(J).forEach(Ge=>{const nt=J[Ge];Te[nt.key]=nt.value}),oe.headers=Te;const ke=function(){let Ge=null;return{promise:new Promise(function(St,kt){ge&&(Ge=setTimeout(()=>{null!=Ge&&(Ge=null,kt(du.makeError("timeout",Jt.errors.TIMEOUT,{requestBody:Rf(oe.body,Te["content-type"]),requestMethod:oe.method,timeout:ge,url:ee})))},ge))}),cancel:function(){null!=Ge&&(clearTimeout(Ge),Ge=null)}}}(),Ue=function(){return hU(this,void 0,void 0,function*(){for(let Ge=0;Ge=300)&&(ke.cancel(),du.throwError("bad response",Jt.errors.SERVER_ERROR,{status:nt.statusCode,headers:nt.headers,body:Rf(Xe,nt.headers?nt.headers["content-type"]:null),requestBody:Rf(oe.body,Te["content-type"]),requestMethod:oe.method,url:ee})),n)try{const St=yield n(Xe,nt);return ke.cancel(),St}catch(St){if(St.throttleRetry&&Ge{let J=null;if(null!=m)try{J=JSON.parse(R1(m))}catch(ee){du.throwError("invalid JSON",Jt.errors.SERVER_ERROR,{body:m,error:ee})}return n&&(J=n(J,N)),J})}function zy(t,e){return e||(e={}),null==(e=Fs(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise(function(n,o){let l=null,m=!1;const N=()=>!m&&(m=!0,l&&clearTimeout(l),!0);e.timeout&&(l=setTimeout(()=>{N()&&o(new Error("timeout"))},e.timeout));const J=e.retryLimit;let ee=0;!function oe(){return t().then(function(ue){if(void 0!==ue)N()&&n(ue);else if(e.oncePoll)e.oncePoll.once("poll",oe);else if(e.onceBlock)e.onceBlock.once("block",oe);else if(!m){if(ee++,ee>J)return void(N()&&o(new Error("retry limit reached")));let ge=e.interval*parseInt(String(Math.random()*Math.pow(2,ee)));gee.ceiling&&(ge=e.ceiling),setTimeout(oe,ge)}return null},function(ue){N()&&o(ue)})}()})}var mU=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const Wy=new Jt("abstract-provider/5.7.0");class vU extends Ej{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class SE{constructor(){Wy.checkAbstract(new.target,SE),Dr(this,"_isProvider",!0)}getFeeData(){return mU(this,void 0,void 0,function*(){const{block:e,gasPrice:n}=yield Ro({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(N=>null)});let o=null,l=null,m=null;return e&&e.baseFeePerGas&&(o=e.baseFeePerGas,m=jn.from("1500000000"),l=e.baseFeePerGas.mul(2).add(m)),{lastBaseFeePerGas:o,maxFeePerGas:l,maxPriorityFeePerGas:m,gasPrice:n}})}addListener(e,n){return this.on(e,n)}removeListener(e,n){return this.off(e,n)}static isProvider(e){return!(!e||!e._isProvider)}}class eI{constructor(e){Dr(this,"alphabet",e),Dr(this,"base",e.length),Dr(this,"_alphabetMap",{}),Dr(this,"_leader",e.charAt(0));for(let n=0;n0;)o.push(N%this.base),N=N/this.base|0}let l="";for(let m=0;0===n[m]&&m=0;--m)l+=this.alphabet[o[m]];return l}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let n=[];if(0===e.length)return new Uint8Array(n);n.push(0);for(let o=0;o>=8;for(;m>0;)n.push(255&m),m>>=8}for(let o=0;e[o]===this._leader&&o0&&Array.isArray(J)?l(J,N-1):n.push(J)})};return l(t,e),n}function SU(t){return function EU(t){let e=0;return()=>t[e++]}(function AU(t){let e=0;function n(){return t[e++]<<8|t[e++]}let o=n(),l=1,m=[0,1];for(let kt=1;kt>--ee&1}const Ie=Math.pow(2,31),Re=Ie>>>1,Te=Re>>1,ke=Ie-1;let Ue=0;for(let kt=0;kt<31;kt++)Ue=Ue<<1|ue();let Ge=[],nt=0,Xe=Ie;for(;;){let kt=Math.floor(((Ue-nt+1)*l-1)/Xe),un=0,Nn=o;for(;Nn-un>1;){let xn=un+Nn>>>1;kt>>1|ue(),vn=vn<<1^Re,pn=(pn^Re)<<1|Re|1;nt=vn,Xe=1+pn-vn}let St=o-4;return Ge.map(kt=>{switch(kt-St){case 3:return St+65792+(t[J++]<<16|t[J++]<<8|t[J++]);case 2:return St+256+(t[J++]<<8|t[J++]);case 1:return St+t[J++];default:return kt-1}})}(t))}function _U(t){return 1&t?~t>>1:t>>1}function nI(t,e){let n=Array(t);for(let o=0,l=-1;oe[N]):n}function rI(t,e,n){let o=Array(t).fill(void 0).map(()=>[]);for(let l=0;lo[N].push(m));return o}function DU(t,e){let n=1+e(),o=e(),l=function xU(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(n)}return e}(e);return tI(rI(l.length,1+t,e).map((N,J)=>{const ee=N[0],oe=N.slice(1);return Array(l[J]).fill(void 0).map((ue,ge)=>{let Ie=ge*o;return[ee+ge*n,oe.map(Re=>Re+Ie)]})}))}function TU(t,e){return rI(1+e(),1+t,e).map(l=>[l[0],l.slice(1)])}const W1=function NU(){return SU(q8("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAb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NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}(),PU=new Set(z1(W1)),RU=new Set(z1(W1)),kU=function CU(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(DU(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(TU(n,t))}return function wU(t){const e={};for(let n=0;no-l);return function n(){let o=[];for(;;){let oe=z1(t,e);if(0==oe.length)break;o.push({set:new Set(oe),node:n()})}o.sort((oe,ue)=>ue.set.size-oe.set.size);let l=t(),m=l%3;l=l/3|0;let N=!!(1&l);return l>>=1,{branches:o,valid:m,fe0f:N,save:1==l,check:2==l}}()}(W1),iI=45,oI=95;function sI(t){return function yj(t,e=jy.current){return rE(ul(t,e))}(t)}function FU(t){return t.filter(e=>65039!=e)}function aI(t){for(let e of t.split(".")){let n=sI(e);try{for(let o=n.lastIndexOf(oI)-1;o>=0;o--)if(n[o]!==oI)throw new Error("underscore only allowed at start");if(n.length>=4&&n.every(o=>o<128)&&n[2]===iI&&n[3]===iI)throw new Error("invalid label extension")}catch(o){throw new Error(`Invalid label "${e}": ${o.message}`)}}return t}function BU(t){return aI(function jU(t,e){let n=sI(t).reverse(),o=[];for(;n.length;){let l=KU(n);if(l){o.push(...e(l));continue}let m=n.pop();if(PU.has(m)){o.push(m);continue}if(RU.has(m))continue;let N=kU[m];if(!N)throw new Error(`Disallowed codepoint: 0x${m.toString(16).toUpperCase()}`);o.push(...N)}return aI(function UU(t){return t.normalize("NFC")}(String.fromCodePoint(...o)))}(t,FU))}function KU(t,e){var n;let l,m,o=LU,N=[],J=t.length;for(e&&(e.length=0);J;){let ee=t[--J];if(o=null===(n=o.branches.find(oe=>oe.set.has(ee)))||void 0===n?void 0:n.node,!o)break;if(o.save)m=ee;else if(o.check&&ee===m)break;N.push(ee),o.fe0f&&(N.push(65039),J>0&&65039==t[J-1]&&J--),o.valid&&(l=N.slice(),2==o.valid&&l.splice(1,1),e&&e.push(...t.slice(J).reverse()),t.length=J)}return l}const VU=new Jt(P8),uI=new Uint8Array(32);function cI(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function G1(t){const e=ul(BU(t)),n=[];if(0===t.length)return n;let o=0;for(let l=0;l=e.length)throw new Error("invalid ENS name; empty component");return n.push(cI(e.slice(o))),n}function Z1(t){"string"!=typeof t&&VU.throwArgumentError("invalid ENS name; not a string","name",t);let e=uI;const n=G1(t);for(;n.length;)e=Po(Tf([e,Po(n.pop())]));return gr(e)}function HU(t){return gr(Tf(G1(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}uI.fill(0);const lI=new Jt("networks/5.7.1");function ll(t){const e=function(n,o){null==o&&(o={});const l=[];if(n.InfuraProvider&&"-"!==o.infura)try{l.push(new n.InfuraProvider(t,o.infura))}catch{}if(n.EtherscanProvider&&"-"!==o.etherscan)try{l.push(new n.EtherscanProvider(t,o.etherscan))}catch{}if(n.AlchemyProvider&&"-"!==o.alchemy)try{l.push(new n.AlchemyProvider(t,o.alchemy))}catch{}if(n.PocketProvider&&"-"!==o.pocket){const m=["goerli","ropsten","rinkeby","sepolia"];try{const N=new n.PocketProvider(t,o.pocket);N.network&&-1===m.indexOf(N.network.name)&&l.push(N)}catch{}}if(n.CloudflareProvider&&"-"!==o.cloudflare)try{l.push(new n.CloudflareProvider(t))}catch{}if(n.AnkrProvider&&"-"!==o.ankr)try{const m=["ropsten"],N=new n.AnkrProvider(t,o.ankr);N.network&&-1===m.indexOf(N.network.name)&&l.push(N)}catch{}if(0===l.length)return null;if(n.FallbackProvider){let m=1;return null!=o.quorum?m=o.quorum:"homestead"===t&&(m=2),new n.FallbackProvider(l,m)}return l[0]};return e.renetwork=function(n){return ll(n)},e}function Y1(t,e){const n=function(o,l){return o.JsonRpcProvider?new o.JsonRpcProvider(t,e):null};return n.renetwork=function(o){return Y1(t,o)},n}const fI={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ll("homestead")},dI={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ll("ropsten")},hI={chainId:63,name:"classicMordor",_defaultProvider:Y1("https://www.ethercluster.com/mordor","classicMordor")},J1={unspecified:{chainId:0,name:"unspecified"},homestead:fI,mainnet:fI,morden:{chainId:2,name:"morden"},ropsten:dI,testnet:dI,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ll("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ll("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ll("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ll("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Y1("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:hI,classicTestnet:hI,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Y1("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ll("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ll("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new Jt("sha2/5.7.0");function pI(t){return"0x"+sc().sha256().update(Sr(t)).digest("hex")}var JU=y(70988),gI=y.n(JU);const Gy=new Jt(L1);class Fn{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},n=this.address.bind(this),o=this.bigNumber.bind(this),l=this.blockTag.bind(this),m=this.data.bind(this),N=this.hash.bind(this),J=this.hex.bind(this),ee=this.number.bind(this),oe=this.type.bind(this);return e.transaction={hash:N,type:oe,accessList:Fn.allowNull(this.accessList.bind(this),null),blockHash:Fn.allowNull(N,null),blockNumber:Fn.allowNull(ee,null),transactionIndex:Fn.allowNull(ee,null),confirmations:Fn.allowNull(ee,null),from:n,gasPrice:Fn.allowNull(o),maxPriorityFeePerGas:Fn.allowNull(o),maxFeePerGas:Fn.allowNull(o),gasLimit:o,to:Fn.allowNull(n,null),value:o,nonce:ee,data:m,r:Fn.allowNull(this.uint256),s:Fn.allowNull(this.uint256),v:Fn.allowNull(ee),creates:Fn.allowNull(n,null),raw:Fn.allowNull(m)},e.transactionRequest={from:Fn.allowNull(n),nonce:Fn.allowNull(ee),gasLimit:Fn.allowNull(o),gasPrice:Fn.allowNull(o),maxPriorityFeePerGas:Fn.allowNull(o),maxFeePerGas:Fn.allowNull(o),to:Fn.allowNull(n),value:Fn.allowNull(o),data:Fn.allowNull(ge=>this.data(ge,!0)),type:Fn.allowNull(ee),accessList:Fn.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:ee,blockNumber:ee,transactionHash:N,address:n,topics:Fn.arrayOf(N),data:m,logIndex:ee,blockHash:N},e.receipt={to:Fn.allowNull(this.address,null),from:Fn.allowNull(this.address,null),contractAddress:Fn.allowNull(n,null),transactionIndex:ee,root:Fn.allowNull(J),gasUsed:o,logsBloom:Fn.allowNull(m),blockHash:N,transactionHash:N,logs:Fn.arrayOf(this.receiptLog.bind(this)),blockNumber:ee,confirmations:Fn.allowNull(ee,null),cumulativeGasUsed:o,effectiveGasPrice:Fn.allowNull(o),status:Fn.allowNull(ee),type:oe},e.block={hash:Fn.allowNull(N),parentHash:N,number:ee,timestamp:ee,nonce:Fn.allowNull(J),difficulty:this.difficulty.bind(this),gasLimit:o,gasUsed:o,miner:Fn.allowNull(n),extraData:m,transactions:Fn.allowNull(Fn.arrayOf(N)),baseFeePerGas:Fn.allowNull(o)},e.blockWithTransactions=Fs(e.block),e.blockWithTransactions.transactions=Fn.allowNull(Fn.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Fn.allowNull(l,void 0),toBlock:Fn.allowNull(l,void 0),blockHash:Fn.allowNull(N,void 0),address:Fn.allowNull(n,void 0),topics:Fn.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Fn.allowNull(ee),blockHash:Fn.allowNull(N),transactionIndex:ee,removed:Fn.allowNull(this.boolean.bind(this)),address:n,data:Fn.allowFalsish(m,"0x"),topics:Fn.arrayOf(N),transactionHash:N,logIndex:ee},e}accessList(e){return Hy(e||[])}number(e){return"0x"===e?0:jn.from(e).toNumber()}type(e){return"0x"===e||null==e?0:jn.from(e).toNumber()}bigNumber(e){return jn.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,n){return"string"==typeof e&&(!n&&"0x"!==e.substring(0,2)&&(e="0x"+e),hi(e))?e.toLowerCase():Gy.throwArgumentError("invalid hash","value",e)}data(e,n){const o=this.hex(e,n);if(o.length%2!=0)throw new Error("invalid data; odd-length - "+e);return o}address(e){return As(e)}callAddress(e){if(!hi(e,32))return null;const n=As(ws(e,12));return"0x0000000000000000000000000000000000000000"===n?null:n}contractAddress(e){return function Nj(t){let e=null;try{e=As(t.from)}catch{Of.throwArgumentError("missing from address","transaction",t)}return As(ws(Po(F1([e,mp(Sr(jn.from(t.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||hi(e))return nE(e);throw new Error("invalid blockTag")}hash(e,n){const o=this.hex(e,n);return 32!==ph(o)?Gy.throwArgumentError("invalid hash","value",e):o}difficulty(e){if(null==e)return null;const n=jn.from(e);try{return n.toNumber()}catch{}return null}uint256(e){if(!hi(e))throw new Error("invalid uint256");return qi(e,32)}_block(e,n){null!=e.author&&null==e.miner&&(e.miner=e.author);const o=null!=e._difficulty?e._difficulty:e.difficulty,l=Fn.check(n,e);return l._difficulty=null==o?null:jn.from(o),l}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Fn.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&jn.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const n=Fn.check(this.formats.transaction,e);if(null!=e.chainId){let o=e.chainId;hi(o)&&(o=jn.from(o).toNumber()),n.chainId=o}else{let o=e.networkId;null==o&&null==n.v&&(o=e.chainId),hi(o)&&(o=jn.from(o).toNumber()),"number"!=typeof o&&null!=n.v&&(o=(n.v-35)/2,o<0&&(o=0),o=parseInt(o)),"number"!=typeof o&&(o=0),n.chainId=o}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}transaction(e){return cU(e)}receiptLog(e){return Fn.check(this.formats.receiptLog,e)}receipt(e){const n=Fn.check(this.formats.receipt,e);if(null!=n.root)if(n.root.length<=4){const o=jn.from(n.root).toNumber();0===o||1===o?(null!=n.status&&n.status!==o&&Gy.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=o,delete n.root):Gy.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&Gy.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}topics(e){return Array.isArray(e)?e.map(n=>this.topics(n)):null!=e?this.hash(e,!0):null}filter(e){return Fn.check(this.formats.filter,e)}filterLog(e){return Fn.check(this.formats.filterLog,e)}static check(e,n){const o={};for(const l in e)try{const m=e[l](n[l]);void 0!==m&&(o[l]=m)}catch(m){throw m.checkKey=l,m.checkValue=n[l],m}return o}static allowNull(e,n){return function(o){return null==o?n:e(o)}}static allowFalsish(e,n){return function(o){return o?e(o):n}}static arrayOf(e){return function(n){if(!Array.isArray(n))throw new Error("not an array");const o=[];return n.forEach(function(l){o.push(e(l))}),o}}}var yr=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const _r=new Jt(L1);function mI(t){return null==t?"null":(32!==ph(t)&&_r.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function vI(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(e=>{if(Array.isArray(e)){const n={};e.forEach(l=>{n[mI(l)]=!0});const o=Object.keys(n);return o.sort(),o.join("|")}return mI(e)}).join("&")}function bp(t){if("string"==typeof t){if(32===ph(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+vI(t);if(vU.isForkEvent(t))throw _r.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+vI(t.topics||[])}throw new Error("invalid event - "+t)}function Zy(){return(new Date).getTime()}function bI(t){return new Promise(e=>{setTimeout(e,t)})}const eK=["block","network","pending","poll"];class tK{constructor(e,n,o){Dr(this,"tag",e),Dr(this,"listener",n),Dr(this,"once",o),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const n=e[1],o=function $U(t){return""===t?[]:t.split(/&/g).map(e=>{if(""===e)return[];const n=e.split("|").map(o=>"null"===o?null:o);return 1===n.length?n[0]:n})}(e[2]),l={};return o.length>0&&(l.topics=o),n&&"*"!==n&&(l.address=n),l}pollable(){return this.tag.indexOf(":")>=0||eK.indexOf(this.tag)>=0}}const nK={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ME(t){return qi(jn.from(t).toHexString(),32)}function wI(t){return _E.encode(Tf([t,ws(pI(pI(t)),0,4)]))}const AI=new RegExp("^(ipfs)://(.*)$","i"),EI=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),AI,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Q1(t,e){try{return R1(Yy(t,e))}catch{}return null}function Yy(t,e){if("0x"===t)return null;const n=jn.from(ws(t,e,e+32)).toNumber(),o=jn.from(ws(t,n,n+32)).toNumber();return ws(t,n+32,n+32+o)}function IE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):_r.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function SI(t){const e=Sr(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function rK(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function _I(t){const e=[];let n=0;for(let o=0;ojn.from(e).eq(1)).catch(e=>{if(e.code===Jt.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,n){return yr(this,void 0,void 0,function*(){const o={to:this.address,ccipReadEnabled:!0,data:ra([e,Z1(this.name),n||"0x"])};let l=!1;(yield this.supportsWildcard())&&(l=!0,o.data=ra(["0x9061b923",_I([HU(this.name),o.data])]));try{let m=yield this.provider.call(o);return Sr(m).length%32==4&&_r.throwError("resolver threw error",Jt.errors.CALL_EXCEPTION,{transaction:o,data:m}),l&&(m=Yy(m,0)),m}catch(m){if(m.code===Jt.errors.CALL_EXCEPTION)return null;throw m}})}_fetchBytes(e,n){return yr(this,void 0,void 0,function*(){const o=yield this._fetch(e,n);return null!=o?Yy(o,0):null})}_getAddress(e,n){const o=nK[String(e)];if(null==o&&_r.throwError(`unsupported coin type: ${e}`,Jt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===o.ilk)return this.provider.formatter.address(n);const l=Sr(n);if(null!=o.p2pkh){const m=n.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(m){const N=parseInt(m[1],16);if(m[2].length===2*N&&N>=1&&N<=75)return wI(Tf([[o.p2pkh],"0x"+m[2]]))}}if(null!=o.p2sh){const m=n.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(m){const N=parseInt(m[1],16);if(m[2].length===2*N&&N>=1&&N<=75)return wI(Tf([[o.p2sh],"0x"+m[2]]))}}if(null!=o.prefix){const m=l[1];let N=l[0];if(0===N?20!==m&&32!==m&&(N=-1):N=-1,N>=0&&l.length===2+m&&m>=1&&m<=75){const J=gI().toWords(l.slice(2));return J.unshift(N),gI().encode(o.prefix,J)}}return null}getAddress(e){return yr(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const l=yield this._fetch("0x3b3b57de");return"0x"===l||"0x0000000000000000000000000000000000000000000000000000000000000000"===l?null:this.provider.formatter.callAddress(l)}catch(l){if(l.code===Jt.errors.CALL_EXCEPTION)return null;throw l}const n=yield this._fetchBytes("0xf1cb7e06",ME(e));if(null==n||"0x"===n)return null;const o=this._getAddress(e,n);return null==o&&_r.throwError("invalid or unsupported coin data",Jt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:n}),o})}getAvatar(){return yr(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const n=yield this.getText("avatar");if(null==n)return null;for(let o=0;oN[ee])}return _r.throwError("invalid or unsupported content hash data",Jt.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return yr(this,void 0,void 0,function*(){let n=ul(e);n=Tf([ME(64),ME(n.length),n]),n.length%32!=0&&(n=Tf([n,qi("0x",32-e.length%32)]));const o=yield this._fetchBytes("0x59d1d43c",gr(n));return null==o||"0x"===o?null:R1(o)})}}let CE=null,iK=1;class oK extends SE{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Dr(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(n=>{}),this._ready().catch(n=>{});else{const n=Uy(new.target,"getNetwork")(e);n?(Dr(this,"_network",n),this.emit("network",n,null)):_r.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return yr(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}null==e&&(e=yield this.detectNetwork()),e||_r.throwError("no network detected",Jt.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Dr(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return zy(()=>this._ready().then(e=>e,e=>{if(e.code!==Jt.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==CE&&(CE=new Fn),CE}static getNetwork(e){return function GU(t){if(null==t)return null;if("number"==typeof t){for(const o in J1){const l=J1[o];if(l.chainId===t)return{name:l.name,chainId:l.chainId,ensAddress:l.ensAddress||null,_defaultProvider:l._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const o=J1[t];return null==o?null:{name:o.name,chainId:o.chainId,ensAddress:o.ensAddress,_defaultProvider:o._defaultProvider||null}}const e=J1[t.name];if(!e)return"number"!=typeof t.chainId&&lI.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&lI.throwArgumentError("network chainId mismatch","network",t);let n=t._defaultProvider||null;return null==n&&e._defaultProvider&&(n=function WU(t){return t&&"function"==typeof t.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:n}}(e??"homestead")}ccipReadFetch(e,n,o){return yr(this,void 0,void 0,function*(){if(this.disableCcipRead||0===o.length)return null;const l=e.to.toLowerCase(),m=n.toLowerCase(),N=[];for(let J=0;J=0?null:JSON.stringify({data:m,sender:l}),ge=yield EE({url:oe,errorPassThrough:!0},ue,(Re,Te)=>(Re.status=Te.statusCode,Re));if(ge.data)return ge.data;const Ie=ge.message||"unknown error";if(ge.status>=400&&ge.status<500)return _r.throwError(`response not found during CCIP fetch: ${Ie}`,Jt.errors.SERVER_ERROR,{url:ee,errorMessage:Ie});N.push(Ie)}return _r.throwError(`error encountered during CCIP fetch: ${N.map(J=>JSON.stringify(J)).join(", ")}`,Jt.errors.SERVER_ERROR,{urls:o,errorMessages:N})})}_getInternalBlockNumber(e){return yr(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const l=this._internalBlockNumber;try{const m=yield l;if(Zy()-m.respTime<=e)return m.blockNumber;break}catch{if(this._internalBlockNumber===l)break}}const n=Zy(),o=Ro({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(l=>null,l=>l)}).then(({blockNumber:l,networkError:m})=>{if(m)throw this._internalBlockNumber===o&&(this._internalBlockNumber=null),m;const N=Zy();return(l=jn.from(l).toNumber()){this._internalBlockNumber===o&&(this._internalBlockNumber=null)}),(yield o).blockNumber})}poll(){return yr(this,void 0,void 0,function*(){const e=iK++,n=[];let o=null;try{o=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(l){return void this.emit("error",l)}if(this._setFastBlockNumber(o),this.emit("poll",e,o),o!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=o-1),Math.abs(this._emitted.block-o)>1e3)_r.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${o})`),this.emit("error",_r.makeError("network block skew detected",Jt.errors.NETWORK_ERROR,{blockNumber:o,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",o);else for(let l=this._emitted.block+1;l<=o;l++)this.emit("block",l);this._emitted.block!==o&&(this._emitted.block=o,Object.keys(this._emitted).forEach(l=>{if("block"===l)return;const m=this._emitted[l];"pending"!==m&&o-m>12&&delete this._emitted[l]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=o-1),this._events.forEach(l=>{switch(l.type){case"tx":{const m=l.hash;let N=this.getTransactionReceipt(m).then(J=>(!J||null==J.blockNumber||(this._emitted["t:"+m]=J.blockNumber,this.emit(m,J)),null)).catch(J=>{this.emit("error",J)});n.push(N);break}case"filter":if(!l._inflight){l._inflight=!0,-2===l._lastBlockNumber&&(l._lastBlockNumber=o-1);const m=l.filter;m.fromBlock=l._lastBlockNumber+1,m.toBlock=o;const N=m.toBlock-this._maxFilterBlockRange;N>m.fromBlock&&(m.fromBlock=N),m.fromBlock<0&&(m.fromBlock=0);const J=this.getLogs(m).then(ee=>{l._inflight=!1,0!==ee.length&&ee.forEach(oe=>{oe.blockNumber>l._lastBlockNumber&&(l._lastBlockNumber=oe.blockNumber),this._emitted["b:"+oe.blockHash]=oe.blockNumber,this._emitted["t:"+oe.transactionHash]=oe.blockNumber,this.emit(m,oe)})}).catch(ee=>{this.emit("error",ee),l._inflight=!1});n.push(J)}}}),this._lastBlockNumber=o,Promise.all(n).then(()=>{this.emit("didPoll",e)}).catch(l=>{this.emit("error",l)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return yr(this,void 0,void 0,function*(){return _r.throwError("provider does not support network detection",Jt.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return yr(this,void 0,void 0,function*(){const e=yield this._ready(),n=yield this.detectNetwork();if(e.chainId!==n.chainId){if(this.anyNetwork)return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,e),yield bI(0),this._network;const o=_r.makeError("underlying network changed",Jt.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:n});throw this.emit("error",o),o}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=Zy();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(n=>((null==this._fastBlockNumber||n>this._fastBlockNumber)&&(this._fastBlockNumber=n),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,n,o){return yr(this,void 0,void 0,function*(){return this._waitForTransaction(e,n??1,o||0,null)})}_waitForTransaction(e,n,o,l){return yr(this,void 0,void 0,function*(){const m=yield this.getTransactionReceipt(e);return(m?m.confirmations:0)>=n?m:new Promise((N,J)=>{const ee=[];let oe=!1;const ue=function(){return!!oe||(oe=!0,ee.forEach(Ie=>{Ie()}),!1)},ge=Ie=>{Ie.confirmations{this.removeListener(e,ge)}),l){let Ie=l.startBlock,Re=null;const Te=ke=>yr(this,void 0,void 0,function*(){oe||(yield bI(1e3),this.getTransactionCount(l.from).then(Ue=>yr(this,void 0,void 0,function*(){if(!oe){if(Ue<=l.nonce)Ie=ke;else{{const Ge=yield this.getTransaction(e);if(Ge&&null!=Ge.blockNumber)return}for(null==Re&&(Re=Ie-3,Re{oe||this.once("block",Te)}))});if(oe)return;this.once("block",Te),ee.push(()=>{this.removeListener("block",Te)})}if("number"==typeof o&&o>0){const Ie=setTimeout(()=>{ue()||J(_r.makeError("timeout exceeded",Jt.errors.TIMEOUT,{timeout:o}))},o);Ie.unref&&Ie.unref(),ee.push(()=>{clearTimeout(Ie)})}})})}getBlockNumber(){return yr(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return jn.from(e)}catch(n){return _r.throwError("bad result from backend",Jt.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:n})}})}getBalance(e,n){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const o=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),l=yield this.perform("getBalance",o);try{return jn.from(l)}catch(m){return _r.throwError("bad result from backend",Jt.errors.SERVER_ERROR,{method:"getBalance",params:o,result:l,error:m})}})}getTransactionCount(e,n){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const o=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),l=yield this.perform("getTransactionCount",o);try{return jn.from(l).toNumber()}catch(m){return _r.throwError("bad result from backend",Jt.errors.SERVER_ERROR,{method:"getTransactionCount",params:o,result:l,error:m})}})}getCode(e,n){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const o=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),l=yield this.perform("getCode",o);try{return gr(l)}catch(m){return _r.throwError("bad result from backend",Jt.errors.SERVER_ERROR,{method:"getCode",params:o,result:l,error:m})}})}getStorageAt(e,n,o){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const l=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(o),position:Promise.resolve(n).then(N=>nE(N))}),m=yield this.perform("getStorageAt",l);try{return gr(m)}catch(N){return _r.throwError("bad result from backend",Jt.errors.SERVER_ERROR,{method:"getStorageAt",params:l,result:m,error:N})}})}_wrapTransaction(e,n,o){if(null!=n&&32!==ph(n))throw new Error("invalid response - sendTransaction");const l=e;return null!=n&&e.hash!==n&&_r.throwError("Transaction hash mismatch from Provider.sendTransaction.",Jt.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:n}),l.wait=(m,N)=>yr(this,void 0,void 0,function*(){let J;null==m&&(m=1),null==N&&(N=0),0!==m&&null!=o&&(J={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:o});const ee=yield this._waitForTransaction(e.hash,m,N,J);return null==ee&&0===m?null:(this._emitted["t:"+e.hash]=ee.blockNumber,0===ee.status&&_r.throwError("transaction failed",Jt.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:ee}),ee)}),l}sendTransaction(e){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Promise.resolve(e).then(m=>gr(m)),o=this.formatter.transaction(e);null==o.confirmations&&(o.confirmations=0);const l=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const m=yield this.perform("sendTransaction",{signedTransaction:n});return this._wrapTransaction(o,m,l)}catch(m){throw m.transaction=o,m.transactionHash=o.hash,m}})}_getTransactionRequest(e){return yr(this,void 0,void 0,function*(){const n=yield e,o={};return["from","to"].forEach(l=>{null!=n[l]&&(o[l]=Promise.resolve(n[l]).then(m=>m?this._getAddress(m):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(l=>{null!=n[l]&&(o[l]=Promise.resolve(n[l]).then(m=>m?jn.from(m):null))}),["type"].forEach(l=>{null!=n[l]&&(o[l]=Promise.resolve(n[l]).then(m=>m??null))}),n.accessList&&(o.accessList=this.formatter.accessList(n.accessList)),["data"].forEach(l=>{null!=n[l]&&(o[l]=Promise.resolve(n[l]).then(m=>m?gr(m):null))}),this.formatter.transactionRequest(yield Ro(o))})}_getFilter(e){return yr(this,void 0,void 0,function*(){e=yield e;const n={};return null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach(o=>{null!=e[o]&&(n[o]=e[o])}),["fromBlock","toBlock"].forEach(o=>{null!=e[o]&&(n[o]=this._getBlockTag(e[o]))}),this.formatter.filter(yield Ro(n))})}_call(e,n,o){return yr(this,void 0,void 0,function*(){o>=10&&_r.throwError("CCIP read exceeded maximum redirections",Jt.errors.SERVER_ERROR,{redirects:o,transaction:e});const l=e.to,m=yield this.perform("call",{transaction:e,blockTag:n});if(o>=0&&"latest"===n&&null!=l&&"0x556f1830"===m.substring(0,10)&&ph(m)%32==4)try{const N=ws(m,4),J=ws(N,0,32);jn.from(J).eq(l)||_r.throwError("CCIP Read sender did not match",Jt.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:m});const ee=[],oe=jn.from(ws(N,32,64)).toNumber(),ue=jn.from(ws(N,oe,oe+32)).toNumber(),ge=ws(N,oe+32);for(let Ge=0;Geyr(this,void 0,void 0,function*(){const m=yield this.perform("getBlock",l);if(null==m)return null!=l.blockHash&&null==this._emitted["b:"+l.blockHash]||null!=l.blockTag&&o>this._emitted.block?null:void 0;if(n){let N=null;for(let ee=0;eethis._wrapTransaction(ee)),J}return this.formatter.block(m)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return yr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return zy(()=>yr(this,void 0,void 0,function*(){const o=yield this.perform("getTransaction",n);if(null==o)return null==this._emitted["t:"+e]?null:void 0;const l=this.formatter.transactionResponse(o);if(null==l.blockNumber)l.confirmations=0;else if(null==l.confirmations){let N=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-l.blockNumber+1;N<=0&&(N=1),l.confirmations=N}return this._wrapTransaction(l)}),{oncePoll:this})})}getTransactionReceipt(e){return yr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return zy(()=>yr(this,void 0,void 0,function*(){const o=yield this.perform("getTransactionReceipt",n);if(null==o)return null==this._emitted["t:"+e]?null:void 0;if(null==o.blockHash)return;const l=this.formatter.receipt(o);if(null==l.blockNumber)l.confirmations=0;else if(null==l.confirmations){let N=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-l.blockNumber+1;N<=0&&(N=1),l.confirmations=N}return l}),{oncePoll:this})})}getLogs(e){return yr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ro({filter:this._getFilter(e)}),o=yield this.perform("getLogs",n);return o.forEach(l=>{null==l.removed&&(l.removed=!1)}),Fn.arrayOf(this.formatter.filterLog.bind(this.formatter))(o)})}getEtherPrice(){return yr(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return yr(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&_r.throwArgumentError("invalid BlockTag","blockTag",e);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return n+=e,n<0&&(n=0),this.formatter.blockTag(n)}return this.formatter.blockTag(e)})}getResolver(e){return yr(this,void 0,void 0,function*(){let n=e;for(;;){if(""===n||"."===n||"eth"!==e&&"eth"===n)return null;const o=yield this._getResolver(n,"getResolver");if(null!=o){const l=new MI(this,o,e);return n===e||(yield l.supportsWildcard())?l:null}n=n.split(".").slice(1).join(".")}})}_getResolver(e,n){return yr(this,void 0,void 0,function*(){null==n&&(n="ENS");const o=yield this.getNetwork();o.ensAddress||_r.throwError("network does not support ENS",Jt.errors.UNSUPPORTED_OPERATION,{operation:n,network:o.name});try{const l=yield this.call({to:o.ensAddress,data:"0x0178b8bf"+Z1(e).substring(2)});return this.formatter.callAddress(l)}catch{}return null})}resolveName(e){return yr(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(o){if(hi(e))throw o}"string"!=typeof e&&_r.throwArgumentError("invalid ENS name","name",e);const n=yield this.getResolver(e);return n?yield n.getAddress():null})}lookupAddress(e){return yr(this,void 0,void 0,function*(){e=yield e;const n=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(n,"lookupAddress");if(null==o)return null;const l=Q1(yield this.call({to:o,data:"0x691f3431"+Z1(n).substring(2)}),0);return(yield this.resolveName(l))!=e?null:l})}getAvatar(e){return yr(this,void 0,void 0,function*(){let n=null;if(hi(e)){const m=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",N=yield this._getResolver(m,"getAvatar");if(!N)return null;n=new MI(this,N,m);try{const J=yield n.getAvatar();if(J)return J.url}catch(J){if(J.code!==Jt.errors.CALL_EXCEPTION)throw J}try{const J=Q1(yield this.call({to:N,data:"0x691f3431"+Z1(m).substring(2)}),0);n=yield this.getResolver(J)}catch(J){if(J.code!==Jt.errors.CALL_EXCEPTION)throw J;return null}}else if(n=yield this.getResolver(e),!n)return null;const o=yield n.getAvatar();return null==o?null:o.url})}perform(e,n){return _r.throwError(e+" not implemented",Jt.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_addEventListener(e,n,o){const l=new tK(bp(e),n,o);return this._events.push(l),this._startEvent(l),this}on(e,n){return this._addEventListener(e,n,!1)}once(e,n){return this._addEventListener(e,n,!0)}emit(e,...n){let o=!1,l=[],m=bp(e);return this._events=this._events.filter(N=>N.tag!==m||(setTimeout(()=>{N.listener.apply(this,n)},0),o=!0,!N.once||(l.push(N),!1))),l.forEach(N=>{this._stopEvent(N)}),o}listenerCount(e){if(!e)return this._events.length;let n=bp(e);return this._events.filter(o=>o.tag===n).length}listeners(e){if(null==e)return this._events.map(o=>o.listener);let n=bp(e);return this._events.filter(o=>o.tag===n).map(o=>o.listener)}off(e,n){if(null==n)return this.removeAllListeners(e);const o=[];let l=!1,m=bp(e);return this._events=this._events.filter(N=>!(N.tag===m&&N.listener==n&&!l)||(l=!0,o.push(N),!1)),o.forEach(N=>{this._stopEvent(N)}),this}removeAllListeners(e){let n=[];if(null==e)n=this._events,this._events=[];else{const o=bp(e);this._events=this._events.filter(l=>l.tag!==o||(n.push(l),!1))}return n.forEach(o=>{this._stopEvent(o)}),this}}var fl=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})};const Xi=new Jt(L1),sK=["call","estimateGas"];function Jy(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const n=hi(t.data)?t.data:null;if(!e||n)return{message:t.message,data:n}}if("object"==typeof t){for(const n in t){const o=Jy(t[n],e);if(o)return o}return null}if("string"==typeof t)try{return Jy(JSON.parse(t),e)}catch{}return null}function II(t,e,n){const o=n.transaction||n.signedTransaction;if("call"===t){const m=Jy(e,!0);if(m)return m.data;Xi.throwError("missing revert data in call exception; Transaction reverted without a reason string",Jt.errors.CALL_EXCEPTION,{data:"0x",transaction:o,error:e})}if("estimateGas"===t){let m=Jy(e.body,!1);null==m&&(m=Jy(e,!1)),m&&Xi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Jt.errors.UNPREDICTABLE_GAS_LIMIT,{reason:m.message,method:t,transaction:o,error:e})}let l=e.message;throw e.code===Jt.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?l=e.error.message:"string"==typeof e.body?l=e.body:"string"==typeof e.responseText&&(l=e.responseText),l=(l||"").toLowerCase(),l.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Xi.throwError("insufficient funds for intrinsic transaction cost",Jt.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:o}),l.match(/nonce (is )?too low/i)&&Xi.throwError("nonce has already been used",Jt.errors.NONCE_EXPIRED,{error:e,method:t,transaction:o}),l.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Xi.throwError("replacement fee too low",Jt.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:o}),l.match(/only replay-protected/i)&&Xi.throwError("legacy pre-eip-155 transactions not supported",Jt.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:o}),sK.indexOf(t)>=0&&l.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Xi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Jt.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:o}),e}function CI(t){return new Promise(function(e){setTimeout(e,t)})}function aK(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Qy(t){return t&&t.toLowerCase()}const xE={};class xI extends sE{constructor(e,n,o){if(super(),e!==xE)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Dr(this,"provider",n),null==o&&(o=0),"string"==typeof o?(Dr(this,"_address",this.provider.formatter.address(o)),Dr(this,"_index",null)):"number"==typeof o?(Dr(this,"_index",o),Dr(this,"_address",null)):Xi.throwArgumentError("invalid address or index","addressOrIndex",o)}connect(e){return Xi.throwError("cannot alter JSON-RPC Signer connection",Jt.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new uK(xE,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Xi.throwError("unknown account #"+this._index,Jt.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Fs(e);const n=this.getAddress().then(o=>(o&&(o=o.toLowerCase()),o));if(null==e.gasLimit){const o=Fs(e);o.from=n,e.gasLimit=this.provider.estimateGas(o)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(o=>fl(this,void 0,void 0,function*(){if(null==o)return null;const l=yield this.provider.resolveName(o);return null==l&&Xi.throwArgumentError("provided ENS name resolves to null","tx.to",o),l}))),Ro({tx:Ro(e),sender:n}).then(({tx:o,sender:l})=>{null!=o.from?o.from.toLowerCase()!==l&&Xi.throwArgumentError("from address mismatch","transaction",e):o.from=l;const m=this.provider.constructor.hexlifyTransaction(o,{from:!0});return this.provider.send("eth_sendTransaction",[m]).then(N=>N,N=>("string"==typeof N.message&&N.message.match(/user denied/i)&&Xi.throwError("user rejected transaction",Jt.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:o}),II("sendTransaction",N,m)))})}signTransaction(e){return Xi.throwError("signing transactions is unsupported",Jt.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return fl(this,void 0,void 0,function*(){const n=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),o=yield this.sendUncheckedTransaction(e);try{return yield zy(()=>fl(this,void 0,void 0,function*(){const l=yield this.provider.getTransaction(o);if(null!==l)return this.provider._wrapTransaction(l,o,n)}),{oncePoll:this.provider})}catch(l){throw l.transactionHash=o,l}})}signMessage(e){return fl(this,void 0,void 0,function*(){const n="string"==typeof e?ul(e):e,o=yield this.getAddress();try{return yield this.provider.send("personal_sign",[gr(n),o.toLowerCase()])}catch(l){throw"string"==typeof l.message&&l.message.match(/user denied/i)&&Xi.throwError("user rejected signing",Jt.errors.ACTION_REJECTED,{action:"signMessage",from:o,messageData:e}),l}})}_legacySignMessage(e){return fl(this,void 0,void 0,function*(){const n="string"==typeof e?ul(e):e,o=yield this.getAddress();try{return yield this.provider.send("eth_sign",[o.toLowerCase(),gr(n)])}catch(l){throw"string"==typeof l.message&&l.message.match(/user denied/i)&&Xi.throwError("user rejected signing",Jt.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:o,messageData:e}),l}})}_signTypedData(e,n,o){return fl(this,void 0,void 0,function*(){const l=yield oa.resolveNames(e,n,o,N=>this.provider.resolveName(N)),m=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[m.toLowerCase(),JSON.stringify(oa.getPayload(l.domain,n,l.value))])}catch(N){throw"string"==typeof N.message&&N.message.match(/user denied/i)&&Xi.throwError("user rejected signing",Jt.errors.ACTION_REJECTED,{action:"_signTypedData",from:m,messageData:{domain:l.domain,types:n,value:l.value}}),N}})}unlock(e){return fl(this,void 0,void 0,function*(){const n=this.provider,o=yield this.getAddress();return n.send("personal_unlockAccount",[o.toLowerCase(),e,null])})}}class uK extends xI{sendTransaction(e){return this.sendUncheckedTransaction(e).then(n=>({hash:n,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:o=>this.provider.waitForTransaction(n,o)}))}}const cK={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class lK extends oK{constructor(e,n){let o=n;null==o&&(o=new Promise((l,m)=>{setTimeout(()=>{this.detectNetwork().then(N=>{l(N)},N=>{m(N)})},0)})),super(o),e||(e=Uy(this.constructor,"defaultUrl")()),Dr(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Fs(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return fl(this,void 0,void 0,function*(){yield CI(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(null!=e){const n=Uy(this.constructor,"getNetwork");try{return n(jn.from(e).toNumber())}catch(o){return Xi.throwError("could not detect network",Jt.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:o})}}return Xi.throwError("could not detect network",Jt.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new xI(xE,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(n=>this.formatter.address(n)))}send(e,n){const o={method:e,params:n,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:gh(o),provider:this});const l=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(l&&this._cache[e])return this._cache[e];const m=EE(this.connection,JSON.stringify(o),aK).then(N=>(this.emit("debug",{action:"response",request:o,response:N,provider:this}),N),N=>{throw this.emit("debug",{action:"response",error:N,request:o,provider:this}),N});return l&&(this._cache[e]=m,setTimeout(()=>{this._cache[e]=null},0)),m}prepareRequest(e,n){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Qy(n.address),n.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Qy(n.address),n.blockTag]];case"getCode":return["eth_getCode",[Qy(n.address),n.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Qy(n.address),qi(n.position,32),n.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[n.signedTransaction]];case"getBlock":return n.blockTag?["eth_getBlockByNumber",[n.blockTag,!!n.includeTransactions]]:n.blockHash?["eth_getBlockByHash",[n.blockHash,!!n.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[n.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[n.transactionHash]];case"call":return["eth_call",[Uy(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0}),n.blockTag]];case"estimateGas":return["eth_estimateGas",[Uy(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0})]];case"getLogs":return n.filter&&null!=n.filter.address&&(n.filter.address=Qy(n.filter.address)),["eth_getLogs",[n.filter]]}return null}perform(e,n){return fl(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const l=n.transaction;if(l&&null!=l.type&&jn.from(l.type).isZero()&&null==l.maxFeePerGas&&null==l.maxPriorityFeePerGas){const m=yield this.getFeeData();null==m.maxFeePerGas&&null==m.maxPriorityFeePerGas&&((n=Fs(n)).transaction=Fs(l),delete n.transaction.type)}}const o=this.prepareRequest(e,n);null==o&&Xi.throwError(e+" not implemented",Jt.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(o[0],o[1])}catch(l){return II(e,l,n)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,n=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=n,n.then(function(o){return function l(){e.send("eth_getFilterChanges",[o]).then(function(m){if(e._pendingFilter!=n)return null;let N=Promise.resolve();return m.forEach(function(J){e._emitted["t:"+J.toLowerCase()]="pending",N=N.then(function(){return e.getTransaction(J).then(function(ee){return e.emit("pending",ee),null})})}),N.then(function(){return CI(1e3)})}).then(function(){if(e._pendingFilter==n)return setTimeout(function(){l()},0),null;e.send("eth_uninstallFilter",[o])}).catch(m=>{})}(),o}).catch(o=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,n){const o=Fs(cK);if(n)for(const m in n)n[m]&&(o[m]=!0);!function bj(t,e){(!t||"object"!=typeof t)&&k1.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(n=>{e[n]||k1.throwArgumentError("invalid object key - "+n,"transaction:"+n,t)})}(e,o);const l={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(m){if(null==e[m])return;const N=nE(jn.from(e[m]));"gasLimit"===m&&(m="gas"),l[m]=N}),["from","to","data"].forEach(function(m){null!=e[m]&&(l[m]=gr(e[m]))}),e.accessList&&(l.accessList=Hy(e.accessList)),l}}const DI=new Jt(L1);let fK=1;function TI(t,e){const n="Web3LegacyFetcher";return function(o,l){const m={method:o,params:l,id:fK++,jsonrpc:"2.0"};return new Promise((N,J)=>{this.emit("debug",{action:"request",fetcher:n,request:gh(m),provider:this}),e(m,(ee,oe)=>{if(ee)return this.emit("debug",{action:"response",fetcher:n,error:ee,request:m,provider:this}),J(ee);if(this.emit("debug",{action:"response",fetcher:n,request:m,response:oe,provider:this}),oe.error){const ue=new Error(oe.error.message);return ue.code=oe.error.code,ue.data=oe.error.data,J(ue)}N(oe.result)})})}}class OI extends lK{constructor(e,n){null==e&&DI.throwArgumentError("missing provider","provider",e);let o=null,l=null,m=null;"function"==typeof e?(o="unknown:",l=e):(o=e.host||e.path||"",!o&&e.isMetaMask&&(o="metamask"),m=e,e.request?(""===o&&(o="eip-1193:"),l=function dK(t){return function(e,n){null==n&&(n=[]);const o={method:e,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:gh(o),provider:this}),t.request(o).then(l=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,response:l,provider:this}),l),l=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,error:l,provider:this}),l})}}(e)):e.sendAsync?l=TI(0,e.sendAsync.bind(e)):e.send?l=TI(0,e.send.bind(e)):DI.throwArgumentError("unsupported provider","provider",e),o||(o="unknown:")),super(o,n),Dr(this,"jsonRpcFetchFunc",l),Dr(this,"provider",m)}send(e,n){return this.jsonRpcFetchFunc(e,n)}}var hK=y(21087);const{Near:pK,Account:q1,KeyPair:DE,keyStores:{BrowserLocalStorageKeyStore:gK},transactions:{addKey:Yee,deleteKey:Jee,functionCallAccessKey:Qee},utils:{PublicKey:yK,format:{parseNearAmount:mh}}}=Zn,X1="https://neth.app",vK={testnet:{FUNDING_ACCOUNT_ID:"neth.testnet",MAP_ACCOUNT_ID:"map.neth.testnet",ROOT_ACCOUNT_ID:"testnet"},mainnet:{MAP_ACCOUNT_ID:"nethmap.near",ROOT_ACCOUNT_ID:"near"}},$1="__TX_ARGS_ATTEMPT",qy="__APP_KEY_SECRET",wp="__APP_KEY_ACCOUNT_ID",NI=(mh("0.4"),mh("0.49"),mh("0.5"),mh("0.05"),(t="")=>({getItem:e=>{const n=localStorage.getItem(t+e);if("{"!==n?.charAt(0))return n;try{return JSON.parse(n)}catch{}},setItem:(e,n)=>localStorage.setItem(t+e,"string"==typeof n?n:JSON.stringify(n)),removeItem:e=>localStorage.removeItem(t+e)})),_K=()=>({log:t=>console.log(...t)});let TE,OE,Ap,dl,is,Ep,ua,eb,PI;const NE=t=>gr(yK.fromString(t).data).substring(2),RI=t=>t.some(e=>{const n=e?.access_key?.permission?.FunctionCall;return null!==n.allowance&&"execute"===n.method_names[0]}),IK=function(){var t=(0,Le.Z)(function*(e,n){const{account:o,accountId:l}=yield kI(e,n),m=parseInt(yield o.viewFunction({contractId:l,methodName:"get_nonce"}),16).toString(),{publicKey:N,secretKey:J}=yield nb(e,PE(l,m)),ee=NE(N),oe=[{type:"AddKey",public_key:ee,allowance:mh("1"),receiver_id:l,method_names:"execute"}],ue=yield o.getAccessKeys();if(RI(ue)){const Re=parseInt(yield o.viewFunction({contractId:l,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:Te}=yield nb(e,PE(l,Re)),ke=NE(Te);oe.unshift({type:"DeleteKey",public_key:ke})}const ge=yield tb(e,{nonce:m,receivers:[l],transactions:[{actions:oe}]});return""!==(yield o.functionCall({contractId:l,methodName:"execute",args:ge,gas:OE}))?.status?.SuccessValue?dl.log("App key rotation unsuccessful. Please refresh the page and try again."):(yield is.removeItem(qy),yield is.removeItem(wp),{publicKey:ee,secretKey:J})});return function(n,o){return t.apply(this,arguments)}}(),kI=function(){var t=(0,Le.Z)(function*(e,n,o=!1){let l,m=yield is.getItem("__ATTEMPT_SECRET_KEY");if(m)l=yield is.getItem("__ATTEMPT_ACCOUNT_ID");else{l=yield UI(n);const{secretKey:ue}=yield nb(e,CK(l,o));m=ue}const N=new q1(Ep,l),J=DE.fromString(m),ee=J.getPublicKey().toString();return(yield N.getAccessKeys()).some(({public_key:ue})=>ee===ue)?(Ap.setKey(ua,l,J),{account:N,accountId:l,secretKey:m}):yield kI(e,n,!0)});return function(n,o){return t.apply(this,arguments)}}(),PE=(t,e)=>({WARNING:`Creating key for: ${t}`,nonce:e,description:"ONLY sign this on apps you trust! This key CAN use up to 1 N for transactions."}),CK=(t,e)=>({WARNING:`Creates a key with access to your (new) paired NEAR Account: ${t}`,description:`ONLY sign this message on this website: ${e?"neardefi.github.io/neth":X1}`}),RE={name:"NETH",version:"1",chainId:1313161554},BI=t=>t.map(e=>{const n="string"==typeof e?e:Object.entries(e).map(([l,m])=>`|NETH_${l}:${"string"==typeof m?m:JSON.stringify(m)}_NETH|`).join("");return"NETH"+n.length.toString().padStart(8,"0")+"__"+n}).join(""),tb=function(){var t=(0,Le.Z)(function*(e,n){const l={Transaction:[]};if(Object.entries(n).forEach(([J])=>{l.Transaction.push({type:"string",name:J})}),n.transactions&&(Object.values(n.transactions).forEach((J,ee)=>{J.actions.forEach(oe=>{if(oe.args){if(Buffer.isBuffer(oe.args))return void(oe.args="0x"+oe.args.toString("hex"));Object.entries(oe.args).forEach(([ue,ge])=>{/receiver_id|account_id/g.test(ue)&&(oe.args[ue]="|~-_NETH~-_-~RECEIVER_-~|",n.receivers.splice(ee+1,0,ge))})}})}),n.transactions=BI(n.transactions.map(({actions:J})=>BI(J)))),n.receivers){const J=n.receivers.length.toString();n.receivers="NETH"+n.receivers.join(",").length.toString().padStart(8,"0")+"__"+n.receivers.join(","),n.receivers=n.receivers.substring(0,4)+J.padStart(3,"0")+n.receivers.substring(7)}return{sig:yield e._signTypedData(RE,l,n),msg:n}});return function(n,o){return t.apply(this,arguments)}}(),nb=function(){var t=(0,Le.Z)(function*(e,n){const{sig:o}=yield tb(e,n),l=oE(o);return(0,hK.generateSeedPhrase)(l.substring(2,34))});return function(n,o){return t.apply(this,arguments)}}(),jI=function(){var t=(0,Le.Z)(function*(){if(!(yield q2()()))return alert("Please install/activate MetaMask and try again.");try{yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+RE.chainId.toString(16)}]})}catch(m){if(dl.log(m),4902!==(m?.code||m?.data?.originalError?.code))throw m;try{yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x"+RE.chainId.toString(16),chainName:"Aurora Mainnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},blockExplorerUrls:["https://explorer.mainnet.aurora.dev/"],rpcUrls:["https://mainnet.aurora.dev"]}]})}catch(J){throw alert('Error adding chain. Please click "Choose Ethereum Account" and add the Aurora Network to continue.'),J}}const n=new OI(window.ethereum);0===(yield n.listAccounts()).length&&(yield n.send("eth_requestAccounts",[]));const l=n.getSigner();return{signer:l,ethAddress:yield l.getAddress()}});return function(){return t.apply(this,arguments)}}(),OK=function(){var t=(0,Le.Z)(function*(){yield(yield q2()()).send("wallet_requestPermissions",[{eth_accounts:{}}]);const o=new OI(window.ethereum).getSigner();return{signer:o,ethAddress:yield o.getAddress()}});return function(){return t.apply(this,arguments)}}(),UI=function(){var t=(0,Le.Z)(function*(e){return eb.viewFunction({contractId:vK[ua].MAP_ACCOUNT_ID,methodName:"get_near",args:{eth_address:e}})});return function(n){return t.apply(this,arguments)}}(),Sp=function(){var t=(0,Le.Z)(function*(){const e=yield is.getItem(qy),n=yield is.getItem(wp);if(!e||!n){const m=yield jI();return!!(yield KI(m))&&(yield Sp())}const o=new q1(Ep,n),l=DE.fromString(e);return Ap.setKey(ua,n,l),{account:o,accountId:n,keyPair:l,secretKey:e}});return function(){return t.apply(this,arguments)}}(),NK=Sp,PK=function(){var t=(0,Le.Z)(function*(){const e=yield is.getItem(wp);return e?(yield is.removeItem(qy),yield is.removeItem(wp),{accountId:e}):dl.log("already signed out")});return function(){return t.apply(this,arguments)}}(),RK=function(){var t=(0,Le.Z)(function*({message:e,provider:n,account:o}){let l;if(o)({accountId:l}=o);else{const Ie=yield Sp();Ie&&({account:o,accountId:l}=Ie)}if(!o)throw new Error("Wallet not signed in");const m=yield o.connection.signer.getPublicKey(l,ua),N=Buffer.from(m.data).toString("base64"),oe={accountId:l,message:e,blockId:(yield n.block({finality:"final"})).header.hash,publicKey:N,keyType:m.keyType},ue=JSON.stringify(oe),ge=yield o.connection.signer.signMessage(new Uint8Array(Buffer.from(ue)),l,ua);return{...oe,signature:Buffer.from(ge.signature).toString("base64")}});return function(n){return t.apply(this,arguments)}}(),kK=function(){var t=(0,Le.Z)(function*(){const e=NI("near-wallet-selector:neth:");return!!(yield e.getItem(qy))||!!(yield e.getItem(wp))});return function(){return t.apply(this,arguments)}}(),KI=function(){var t=(0,Le.Z)(function*({signer:e,ethAddress:n}){const o=yield UI(n);if(!o){if(window.confirm(`Ethereum account ${n} is not connected to a NETH account. Would you like to try another Ethereum account?`)){try{const{signer:Ie,ethAddress:Re}=yield OK();return yield KI({signer:Ie,ethAddress:Re})}catch(Ie){dl.log(Ie)}return}const ge=`${X1}/${"testnet"===ua?"?network=testnet":""}`;window.prompt("We couldn't find a NETH account. To set up a NETH account visit",ge)}const l=parseInt(yield eb.viewFunction({contractId:o,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:m,secretKey:N}=yield nb(e,PE(o,l)),J=new q1(Ep,o),ee=yield J.getAccessKeys();RI(ee)||(yield IK(e,n));const oe=DE.fromString(N);return Ap.setKey(ua,o,oe),yield is.setItem(qy,N),yield is.setItem(wp,J.accountId),{publicKey:m,secretKey:N,account:J}});return function(n){return t.apply(this,arguments)}}(),VI=function(){var t=(0,Le.Z)(function*(){const e=yield Sp();if(!e)return void dl.log("NETH: ERROR broadcasting tx. No account found.");const{account:n,accountId:o}=e,l=yield is.getItem($1);if(!l||0===l.length)return;const m=[];for(;l.length>0;){const N=l.shift();dl.log("NETH: broadcasting tx",N);try{const J=yield n.functionCall({contractId:o,methodName:"execute",args:N,gas:OE});yield is.setItem($1,l),m.push(J)}catch(J){dl.log("NETH: ERROR broadcasting tx",J)}}return yield is.removeItem($1),m});return function(){return t.apply(this,arguments)}}(),LK=function(){var t=(0,Le.Z)(function*({transactions:e,bundle:n}){const o=yield jI(),{signer:l}=o,m=yield Sp();if(!m)return void dl.log("NETH: ERROR signing and sending transactions. No account found.");const{account:N,accountId:J}=m,ee=e.map(({receiverId:Re})=>Re),oe=e.map(({receiverId:Re,actions:Te})=>({actions:FK(Te,J,Re)})),ue=parseInt(yield N.viewFunction({contractId:J,methodName:"get_nonce"}),16),ge=[];if(n)ge.push(yield tb(l,{nonce:ue.toString(),receivers:ee,transactions:oe}));else for(let Re=0;Ret.map(o=>{const{enum:l}=o,{gas:m,publicKey:N,methodName:J,args:ee,deposit:oe,accessKey:ue,code:ge}=o[l]||o,Ie={type:l&&l[0].toUpperCase()+l.substr(1)||"FunctionCall",gas:m&&m.toString()||void 0,public_key:N&&NE(N)||void 0,method_name:J,args:ee||void 0,code:ge||void 0,amount:oe&&oe.toString()||void 0,permission:void 0};if(Object.keys(Ie).forEach(Re=>{void 0===Ie[Re]&&delete Ie[Re]}),ue)if(n===e)Ie.allowance=mh("1"),Ie.method_names="execute",Ie.receiver_id=e;else if("functionCall"===ue.permission.enum){const{receiverId:Re,methodNames:Te,allowance:ke}=ue.permission.functionCall;Ie.receiver_id=Re,Ie.allowance=ke&&ke.toString()||mh("0.25"),Ie.method_names=Te.join(",")}return Ie}),BK=function(){var t=(0,Le.Z)(function*(){return yield q2()({timeout:100}),!!window.ethereum});return function(){return t.apply(this,arguments)}}();let zI,HI=!0,kE=!1;const jK=function(){var t=(0,Le.Z)(function*({metadata:e,logger:n,store:o,storage:l,options:m,provider:N}){const J=(({network:t,gas:e="200000000000000",logger:n=_K(),storage:o=NI()})=>{OE=e,dl=n,is=o,Ap=new gK,TE=new pK({...t,keyStore:Ap}),Ep=TE.connection,ua=t.networkId,eb=new q1(Ep,"mainnet"===ua?"near":ua),PI="mainnet"===ua?".near":"."+ua;const l=document.createElement("div");return l.style.display="none",l.style.width="100%",l.style.height="100vh",l.style.zIndex="999999",l.style.position="fixed",l.style.top="0",l.style.background="rgba(0, 0, 0, 0.5)",document.body.appendChild(l),VI(),l})({network:m.network,gas:zI,logger:n,storage:l}),oe=ge=>{if(!(ge=>ge.every(Ie=>"FunctionCall"===Ie.type))(ge))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return ge.map(Re=>Re.params)},ue=function(){var ge=(0,Le.Z)(function*(Ie){n.log("NETH:signAndSendTransactions",{transactions:Ie});const{contract:Re}=o.getState();if(!(yield kK())||!Re)throw new Error("Wallet not signed in");kE&&(J.style.display="block");const Te=Ie.map(({receiverId:Ue,actions:Ge})=>({receiverId:Ue||Re.contractId,actions:oe(Ge)}));let ke;try{ke=yield LK({transactions:Te,bundle:HI})}catch(Ue){throw n.log("NETH:signAndSendTransactions Error",Ue),Ue}return kE&&(J.style.display="none"),ke});return function(Re){return ge.apply(this,arguments)}}();return{signIn:()=>(0,Le.Z)(function*(){let ge;try{if(ge=yield NK(),!ge)return[]}catch(Ie){if(!/not connected/.test(Ie.toString()))throw Ie}return[ge]})(),signOut:()=>(0,Le.Z)(function*(){yield PK()})(),verifyOwner:({message:ge})=>(0,Le.Z)(function*(){return n.log("NETH:verifyOwner",{message:ge}),RK({message:ge,provider:N,account:null})})(),getAccounts:()=>(0,Le.Z)(function*(){const ge=yield Sp();if(!ge)return n.log("NETH:getAccounts"),[];const{account:Ie,accountId:Re}=ge;return[{accountId:Re,publicKey:(yield Ie.connection.signer.getPublicKey(Ie.accountId,m.network.networkId)).toString()}]})(),signAndSendTransaction:(ge=(0,Le.Z)(function*({receiverId:Ie,actions:Re}){return ue([{receiverId:Ie,actions:Re}])}),function(Re){return ge.apply(this,arguments)}),signAndSendTransactions:function(){var ge=(0,Le.Z)(function*({transactions:Ie}){return ue(Ie)});return function(Re){return ge.apply(this,arguments)}}()};var ge});return function(n){return t.apply(this,arguments)}}();function WI({iconUrl:t=rj,gas:e,useModalCover:n=!1,bundle:o=!0,deprecated:l=!1}={}){return(0,Le.Z)(function*(){if(kE=n,zI=e,HI=o,e8()())return null;const N=yield BK();return{id:"neth",type:"injected",metadata:{name:"NETH Account",description:null,iconUrl:t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3M1CAR8QmuIfAAOoWrwrwjNbk64jW4Ed7Bwp/LVIdQDwGyw33EWicqvI3WLj0CHUuxrXIp1x7yWEYBoEAOoD/+bT3P22VHWqkxMouzLvBIAts5BWe0vXBpPD49iIFHt+jcOCftS+RhjMlmoWioK7AkZ+5Akd+5gq4/CdK0AmbwqObhsNwrYS+E6YNtzTwjrArZpSgvVAKZuWAJUjZME+jnQIXf1aN83MgrTuesPoJcA5kVMNztuelt1eORpG+bLfhf6Z11HBPfkUZAAAAAElFTkSuQmCC",UK=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://near-wallet-mainnet.finerwallet.io";case"testnet":return"https://near-wallet-testnet.finerwallet.io";default:throw new Error("Invalid wallet url")}};const VK=()=>nc(()=>!!window.finer?.near?.isFiner).catch(()=>!1),zK=function(){var t=(0,Le.Z)(function*({options:e,metadata:n,store:o,provider:l,emitter:m,logger:N}){const J={wallet:window.finer?.near},ee=function(){var Te=(0,Le.Z)(function*(){if(!J.wallet.isSignedIn())return;const ke=yield J.wallet.signOut();if(!0===ke)return;const Ue=new Error("string"==typeof ke.error?ke.error:ke.error.type);if("User reject"===Ue.message)throw Ue;N.log("Failed to sign out"),N.error(Ue)});return function(){return Te.apply(this,arguments)}}(),oe=()=>{J.wallet.on("accountChanged",function(){var Te=(0,Le.Z)(function*(ke){N.log("onAccountChange",ke),m.emit("signedOut",null)});return function(ke){return Te.apply(this,arguments)}}()),J.wallet.on("rpcChanged",function(){var Te=(0,Le.Z)(function*(ke){N.log("onNetworkChange",ke),e.network.networkId!==ke.networkId&&(yield ee(),m.emit("signedOut",null),m.emit("networkChanged",{networkId:ke.networkId}))});return function(ke){return Te.apply(this,arguments)}}())},ue=()=>{const Te=J.wallet.getAccountId();return Te?[{accountId:Te}]:[]},Ie=Te=>{if(!(Te=>Te.every(ke=>"FunctionCall"===ke.type))(Te))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return Te.map(Ue=>Ue.params)},Re=Te=>Te.map(ke=>({receiverId:ke.receiverId,actions:Ie(ke.actions)}));return J.wallet&&J.wallet.isSignedIn()&&oe(),{signIn:({contractId:Te,methodNames:ke})=>(0,Le.Z)(function*(){const Ue=ue();if(Ue.length)return Ue;const{accessKey:Ge,error:nt}=yield J.wallet.requestSignIn({contractId:Te,methodNames:ke});if(!Ge||nt)throw yield ee(),new Error(("string"==typeof nt?nt:nt.type)||"Failed to sign in");return oe(),ue()})(),signOut:ee,getAccounts:()=>(0,Le.Z)(function*(){return ue()})(),verifyOwner:({message:Te})=>(0,Le.Z)(function*(){N.log("Finer:verifyOwner",{message:Te});const ke=J.wallet.account();if(!ke){const Nn=yield J.wallet.signMessage(Te);if(Nn.error)throw new Error(Nn.error);return Nn.response}if(!ke.connection.signer.signMessage)throw new Error("Wallet is locked");const Ue=e.network.networkId,Ge=ke.accountId,nt=yield ke.connection.signer.getPublicKey(Ge,Ue),Xe=yield l.block({finality:"final"}),St={accountId:Ge,message:Te,blockId:Xe.header.hash,publicKey:Buffer.from(nt.data).toString("base64"),keyType:nt.keyType},kt=JSON.stringify(St),un=yield ke.connection.signer.signMessage(new Uint8Array(Buffer.from(kt)),Ge,Ue);return{...St,signature:Buffer.from(un.signature).toString("base64"),keyType:un.publicKey.keyType}})(),signAndSendTransaction:({signerId:Te,receiverId:ke,actions:Ue})=>(0,Le.Z)(function*(){N.log("signAndSendTransaction",{signerId:Te,receiverId:ke,actions:Ue});const{contract:Ge}=o.getState();if(!J.wallet.isSignedIn()||!Ge)throw new Error("Wallet not signed in");return J.wallet.signAndSendTransaction({receiverId:ke||Ge.contractId,actions:Ie(Ue)}).then(nt=>{if(nt.error)throw new Error(nt.error);if(nt.response&&"error"in nt.response)throw new Error(nt.response.error.message);if(!nt.response?.length)throw new Error("Invalid response");return nt.response[0]})})(),signAndSendTransactions:({transactions:Te})=>(0,Le.Z)(function*(){if(N.log("signAndSendTransactions",{transactions:Te}),!J.wallet.isSignedIn())throw new Error("Wallet not signed in");return J.wallet.requestSignTransactions({transactions:Re(Te)}).then(ke=>{if(ke.error)throw new Error(ke.error);if(ke.response&&"error"in ke.response)throw new Error(ke.response.error.message);if(!ke.response?.length)throw new Error("Invalid response");return ke.response})})()}});return function(n){return t.apply(this,arguments)}}();function GI({walletUrl:t,iconUrl:e=LE,deprecated:n=!0}={}){return function(){var o=(0,Le.Z)(function*(l){return(0,na.isMobile)()?yield function KK({walletUrl:t,iconUrl:e=LE,deprecated:n=!1}={}){return function(){var o=(0,Le.Z)(function*(l){const m=yield T1({walletUrl:UK(l.options.network,t),iconUrl:e})(l);return m?{...m,id:"finer-wallet",metadata:{...m.metadata,name:"FiNER Wallet",description:"FiNER Wallet Mobile",iconUrl:e,deprecated:n,available:!0}}:null});return function(l){return o.apply(this,arguments)}}()}({walletUrl:t,iconUrl:e,deprecated:n})(l):yield function WK({iconUrl:t=LE,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=(0,na.isMobile)(),o=yield VK();return n?null:(o&&(yield nc(()=>!!window.finer?.near?.isSignedIn(),{timeout:200}).catch(()=>!1)),{id:"finer-wallet",type:"injected",metadata:{name:"FiNER Wallet",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/finer-wallet/mbboloafhcopdfokibemggdnhcocggpl",deprecated:e,available:o},init:zK})})}({iconUrl:e,deprecated:n})(l)});return function(l){return o.apply(this,arguments)}}()}var GK=y(49274),Xy=y(72062),zr=y(83767),_p=y(42092);class ZK extends _p.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class YK extends _p.q{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class JK{constructor(e,n){this.logger=e,this.core=n}}class QK extends _p.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class qK extends _p.q{constructor(e){super()}}class XK{constructor(e,n,o,l){this.core=e,this.logger=n,this.name=o}}class $K extends _p.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class eV extends _p.q{constructor(e,n){super(),this.core=e,this.logger=n}}class tV{constructor(e,n){this.projectId=e,this.logger=n}}class nV{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class rV{constructor(e){this.client=e}}const iV=t=>JSON.stringify(t,(e,n)=>"bigint"==typeof n?n.toString()+"n":n),oV=t=>{const n=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(n,(o,l)=>"string"==typeof l&&l.match(/^\d+n$/)?BigInt(l.substring(0,l.length-1)):l)};function ZI(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return oV(t)}catch{return t}}function YI(t){return"string"==typeof t?t:iV(t)||""}var JI=y(65553),sV=y(5784),Vn=y(43961);const aV="EdDSA",uV="JWT",QI=".",qI="base64url",cV="utf8",lV="utf8",fV=":",dV="did",hV="key",XI="base58btc",pV="z",gV="K36",yV=32;var bV=function vV(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),o=0;o>>0,Xe=new Uint8Array(nt);Te[ke];){var St=n[Te.charCodeAt(ke)];if(255===St)return;for(var kt=0,un=nt-1;(0!==St||kt>>0,Xe[un]=St%256>>>0,St=St/256>>>0;if(0!==St)throw new Error("Non-zero carry");Ge=kt,ke++}if(" "!==Te[ke]){for(var Nn=nt-Ge;Nn!==nt&&0===Xe[Nn];)Nn++;for(var vn=new Uint8Array(Ue+(nt-Nn)),pn=Ue;Nn!==nt;)vn[pn++]=Xe[Nn++];return vn}}}return{encode:function ge(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var ke=0,Ue=0,Ge=0,nt=Te.length;Ge!==nt&&0===Te[Ge];)Ge++,ke++;for(var Xe=(nt-Ge)*ue+1>>>0,St=new Uint8Array(Xe);Ge!==nt;){for(var kt=Te[Ge],un=0,Nn=Xe-1;(0!==kt||un>>0,St[Nn]=kt%J>>>0,kt=kt/J>>>0;if(0!==kt)throw new Error("Non-zero carry");Ue=un,Ge++}for(var vn=Xe-Ue;vn!==Xe&&0===St[vn];)vn++;for(var pn=ee.repeat(ke);vn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class MV{constructor(e,n,o){this.name=e,this.prefix=n,this.baseEncode=o}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class IV{constructor(e,n,o){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=o}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return $I(this,e)}}class CV{constructor(e){this.decoders=e}or(e){return $I(this,e)}decode(e){const n=e[0],o=this.decoders[n];if(o)return o.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const $I=(t,e)=>new CV({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class xV{constructor(e,n,o,l){this.name=e,this.prefix=n,this.baseEncode=o,this.baseDecode=l,this.encoder=new MV(e,n,o),this.decoder=new IV(e,n,l)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const ib=({name:t,prefix:e,encode:n,decode:o})=>new xV(t,e,n,o),$y=({prefix:t,name:e,alphabet:n})=>{const{encode:o,decode:l}=AV(n,e);return ib({prefix:t,name:e,encode:o,decode:m=>rb(l(m))})},Lo=({name:t,prefix:e,bitsPerChar:n,alphabet:o})=>ib({prefix:e,name:t,encode:l=>((t,e,n)=>{const o="="===e[e.length-1],l=(1<n;)N-=n,m+=e[l&J>>N];if(N&&(m+=e[l&J<((t,e,n,o)=>{const l={};for(let ue=0;ue=8&&(J-=8,N[oe++]=255&ee>>J)}if(J>=n||255&ee<<8-J)throw new SyntaxError("Unexpected end of data");return N})(l,o,n,t)}),OV=ib({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),NV=Lo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),PV=Lo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),RV=$y({prefix:"9",name:"base10",alphabet:"0123456789"}),kV=Lo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),LV=Lo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),FV=Lo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),BV=Lo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),jV=Lo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),UV=Lo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),KV=Lo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),VV=Lo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),HV=Lo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),zV=Lo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),WV=Lo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),GV=$y({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ZV=$y({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),YV=$y({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),JV=$y({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),QV=Lo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),qV=Lo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),XV=Lo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$V=Lo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),eC=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),eH=eC.reduce((t,e,n)=>(t[n]=e,t),[]),tH=eC.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const iH=ib({prefix:"\u{1f680}",name:"base256emoji",encode:function nH(t){return t.reduce((e,n)=>e+=eH[n],"")},decode:function rH(t){const e=[];for(const n of t){const o=tH[n.codePointAt(0)];if(void 0===o)throw new Error(`Non-base256emoji character: ${n}`);e.push(o)}return new Uint8Array(e)}});var oH=function nC(t,e,n){e=e||[];for(var o=n=n||0;t>=uH;)e[n++]=255&t|tC,t/=128;for(;t&aH;)e[n++]=255&t|tC,t>>>=7;return e[n]=0|t,nC.bytes=n-o+1,e},tC=128,aH=-128,uH=Math.pow(2,31);var cH=function FE(t,o){var N,n=0,l=0,m=o=o||0,J=t.length;do{if(m>=J)throw FE.bytes=0,new RangeError("Could not decode varint");N=t[m++],n+=l<28?(N&rC)<=lH);return FE.bytes=m-o,n},lH=128,rC=127;var fH=Math.pow(2,7),dH=Math.pow(2,14),hH=Math.pow(2,21),pH=Math.pow(2,28),gH=Math.pow(2,35),yH=Math.pow(2,42),mH=Math.pow(2,49),vH=Math.pow(2,56),bH=Math.pow(2,63),AH={encode:oH,decode:cH,encodingLength:function(t){return t(iC.encode(t,e,n),e),sC=t=>iC.encodingLength(t),BE=(t,e)=>{const n=e.byteLength,o=sC(t),l=o+sC(n),m=new Uint8Array(l+n);return oC(t,m,0),oC(n,m,o),m.set(e,l),new aC(t,n,e,m)};class aC{constructor(e,n,o,l){this.code=e,this.size=n,this.digest=o,this.bytes=l}}const uC=({name:t,code:e,encode:n})=>new SH(t,e,n);class SH{constructor(e,n,o){this.name=e,this.code=n,this.encode=o}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?BE(this.code,n):n.then(o=>BE(this.code,o))}throw Error("Unknown type, must be binary type")}}const cC=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),_H=uC({name:"sha2-256",code:18,encode:cC("SHA-256")}),MH=uC({name:"sha2-512",code:19,encode:cC("SHA-512")}),fC=rb,CH={code:0,name:"identity",encode:fC,digest:t=>BE(0,fC(t))},xH="raw",DH=85,TH=t=>rb(t),OH=t=>rb(t),NH=new TextEncoder,PH=new TextDecoder,RH="json",kH=512,LH=t=>NH.encode(JSON.stringify(t)),FH=t=>JSON.parse(PH.decode(t));class Es{constructor(e,n,o,l){this.code=n,this.version=e,this.multihash=o,this.bytes=l,this.byteOffset=l.byteOffset,this.byteLength=l.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:sb,byteLength:sb,code:ob,version:ob,multihash:ob,bytes:ob,_baseCache:sb,asCID:sb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==em)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==KH)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Es.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,o=Digest.create(e,n);return Es.createV1(this.code,o)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:o,_baseCache:l}=this;return 0===o?jH(n,l,e||base58btc.encoder):UH(n,l,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return HH(/^0\.0/,zH),!(!e||!e[hC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Es)return e;if(null!=e&&e.asCID===e){const{version:n,code:o,multihash:l,bytes:m}=e;return new Es(n,o,l,m||dC(n,o,l.bytes))}if(null!=e&&!0===e[hC]){const{version:n,multihash:o,code:l}=e,m=Digest.decode(o);return Es.create(n,l,m)}return null}static create(e,n,o){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==em)throw new Error(`Version 0 CID must use dag-pb (code: ${em}) block encoding`);return new Es(e,n,o,o.bytes);case 1:{const l=dC(e,n,o.bytes);return new Es(e,n,o,l)}default:throw new Error("Invalid version")}}static createV0(e){return Es.create(0,em,e)}static createV1(e,n){return Es.create(1,e,n)}static decode(e){const[n,o]=Es.decodeFirst(e);if(o.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Es.inspectBytes(e),o=n.size-n.multihashSize,l=coerce(e.subarray(o,o+n.multihashSize));if(l.byteLength!==n.multihashSize)throw new Error("Incorrect length");const m=l.subarray(n.multihashSize-n.digestSize),N=new Digest.Digest(n.multihashCode,n.digestSize,m,l);return[0===n.version?Es.createV0(N):Es.createV1(n.codec,N),e.subarray(n.size)]}static inspectBytes(e){let n=0;const o=()=>{const[ge,Ie]=varint.decode(e.subarray(n));return Ie,ge};let l=o(),m=em;if(18===l?(0,0):1===l&&o(),0!==l&&1!==l)throw new RangeError(`Invalid CID version ${l}`);const N=n,J=o(),ee=o(),oe=n+ee;return{version:l,codec:m,multihashCode:J,digestSize:ee,multihashSize:oe-N,size:oe}}static parse(e,n){const[o,l]=BH(e,n),m=Es.decode(l);return m._baseCache.set(o,e),m}}Symbol.for("@ipld/js-cid/CID");const ab={...p,...C,...w,...M,...u,...v,...g,...b,...I,..._};function pC(t,e,n,o){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:o}}}const gC=pC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),jE=pC("ascii","a",t=>{let e="a";for(let n=0;n{t=t.substring(1);const e=new Uint8Array(t.length);for(let n=0;nl+m.length,0));const n=new Uint8Array(e);let o=0;for(const l of t)n.set(l,o),o+=l.length;return n}([e,t]),XI);return[dV,hV,n].join(fV)}function GH(t){return UE(t,qI)}function vC(t=(0,sV.randomBytes)(yV)){return JI._w(t)}function VE(){return VE=(0,Le.Z)(function*(t,e,n,o,l=(0,Vn.fromMiliseconds)(Date.now())){const m={alg:aV,typ:uV},ee={iss:mC(o.publicKey),sub:t,aud:e,iat:l,exp:l+n},oe=function YH(t){return KE([cb(t.header),cb(t.payload)].join(QI),lV)}({header:m,payload:ee});return function JH(t){return[cb(t.header),cb(t.payload),GH(t.signature)].join(QI)}({header:m,payload:ee,signature:JI.Xx(o.secretKey,oe)})}),VE.apply(this,arguments)}y(6375);var bC=y(95876),qH=y(85705),wC=y(10976),zE=y(10893),AC=y(25006);function WE(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function EC(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?WE(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function SC(t,e){e||(e=t.reduce((l,m)=>l+m.length,0));const n=EC(e);let o=0;for(const l of t)n.set(l,o),o+=l.length;return WE(n)}function _C(t,e,n,o){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:o}}}const MC=_C("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),GE=_C("ascii","a",t=>{let e="a";for(let n=0;n{const e=EC((t=t.substring(1)).length);for(let n=0;n"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new nz:typeof navigator<"u"?OC(navigator.userAgent):function uz(){var t=typeof process<"u"&&process.version;return t?new $H(process.version.slice(1)):null}()}function TC(t){return""!==t&&oz.reduce(function(e,n){var o=n[0],l=n[1];if(e)return e;var m=l.exec(t);return!!m&&[o,m]},!1)}function OC(t){var e=TC(t);if(!e)return null;var n=e[0],o=e[1];if("searchbot"===n)return new tz;var l=o[1]&&o[1].split(".").join("_").split("_").slice(0,3);l?l.length"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?hu(t.senderPublicKey,Ss):void 0,o=typeof t.iv<"u"?hu(t.iv,Ss):(0,wC.O6)(qE);return function Cz(t){if(tm(t.type)===vh){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return La(SC([t.type,t.senderPublicKey,t.iv,t.sealed]),JE)}return La(SC([t.type,t.iv,t.sealed]),JE)}({type:e,sealed:new bC.OK(hu(t.symKey,Ss)).seal(o,hu(t.message,QE)),iv:o,senderPublicKey:n})}function pb(t){const e=hu(t,JE),n=e.slice(wz,LC),o=LC;if(tm(n)===vh){const J=o+XE,ee=J+qE,oe=e.slice(o,J),ue=e.slice(J,ee);return{type:n,sealed:e.slice(ee),iv:ue,senderPublicKey:oe}}const l=o+qE,m=e.slice(o,l);return{type:n,sealed:e.slice(l),iv:m}}function FC(t){const e=t?.type||kC;if(e===vh){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function BC(t){return t.type===vh&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var Dz=Object.defineProperty,jC=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Oz=Object.prototype.propertyIsEnumerable,UC=(t,e,n)=>e in t?Dz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KC=(t,e)=>{for(var n in e||(e={}))Tz.call(e,n)&&UC(t,n,e[n]);if(jC)for(var n of jC(e))Oz.call(e,n)&&UC(t,n,e[n]);return t};const Nz="ReactNative",js={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Rz="js";function t3(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function nm(){return!(0,lb.getDocument)()&&!!(0,lb.getNavigator)()&&navigator.product===Nz}function rm(){return!t3()&&!!(0,lb.getNavigator)()}function Ip(){return nm()?js.reactNative:t3()?js.node:rm()?js.browser:js.unknown}function jz(t,e,n){const o=function Fz(){if(Ip()===js.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:n,Version:o}=global.Platform;return[n,o].join("-")}const t=sz();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),l=function Bz(){var t;const e=Ip();return e===js.browser?[e,(null==(t=(0,lb.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[Rz,n].join("-"),o,l].join("/")}function Uz({protocol:t,version:e,relayUrl:n,sdkVersion:o,auth:l,projectId:m,useOnCloseEvent:N}){const J=n.split("?"),oe={auth:l,ua:jz(t,e,o),projectId:m,useOnCloseEvent:N||void 0},ue=function kz(t,e){let n=fb.parse(t);return n=KC(KC({},n),e),fb.stringify(n)}(J[1]||"",oe);return J[0]+"?"+ue}function bh(t,e){return t.filter(n=>e.includes(n)).length===t.length}function HC(t){return Object.fromEntries(t.entries())}function zC(t){return new Map(Object.entries(t))}function Cp(t=Vn.FIVE_MINUTES,e){const n=(0,Vn.toMiliseconds)(t||Vn.FIVE_MINUTES);let o,l,m;return{resolve:N=>{m&&o&&(clearTimeout(m),o(N))},reject:N=>{m&&l&&(clearTimeout(m),l(N))},done:()=>new Promise((N,J)=>{m=setTimeout(()=>{J(new Error(e))},n),o=N,l=J})}}function im(t,e,n){return new Promise(function(){var o=(0,Le.Z)(function*(l,m){const N=setTimeout(()=>m(new Error(n)),e);try{l(yield t)}catch(J){m(J)}clearTimeout(N)});return function(l,m){return o.apply(this,arguments)}}())}function WC(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function GC(t){const[e,n]=t.split(":"),o={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof n)o.topic=n;else{if("id"!==e||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);o.id=Number(n)}return o}function pu(t,e){return(0,Vn.fromMiliseconds)((e||Date.now())+(0,Vn.toMiliseconds)(t))}function kf(t){return Date.now()>=(0,Vn.toMiliseconds)(t)}function $i(t,e){return`${t}${e?`:${e}`:""}`}function n3(){return n3=(0,Le.Z)(function*({id:t,topic:e,wcDeepLink:n}){try{if(!n)return;let l=("string"==typeof n?JSON.parse(n):n)?.href;if("string"!=typeof l)return;l.endsWith("/")&&(l=l.slice(0,-1));const m=`${l}/wc?requestId=${t}&sessionTopic=${e}`,N=Ip();N===js.browser?m.startsWith("https://")?window.open(m,"_blank","noreferrer noopener"):window.open(m,"_self","noreferrer noopener"):N===js.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(m))}catch(o){console.error(o)}}),n3.apply(this,arguments)}const Zz="irn";function r3(t){return t?.relay||{protocol:Zz}}function gb(t){const e=fz[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var Yz=Object.defineProperty,ZC=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,YC=(t,e,n)=>e in t?Yz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qz=(t,e)=>{for(var n in e||(e={}))Jz.call(e,n)&&YC(t,n,e[n]);if(ZC)for(var n of ZC(e))Qz.call(e,n)&&YC(t,n,e[n]);return t};function Xz(t,e="-"){const n={},o="relay"+e;return Object.keys(t).forEach(l=>{if(l.startsWith(o)){const m=l.replace(o,""),N=t[l];n[m]=N}}),n}function eW(t){return t.startsWith("//")?t.substring(2):t}function nW(t){return`${t.protocol}:${t.topic}@${t.version}?`+fb.stringify(qz({symKey:t.symKey},function tW(t,e="-"){const o={};return Object.keys(t).forEach(l=>{const m="relay"+e+l;t[l]&&(o[m]=t[l])}),o}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function xp(t){const e=[];return t.forEach(n=>{const[o,l]=n.split(":");e.push(`${o}:${l}`)}),e}const gW={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},yW={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function _n(t,e){const{message:n,code:o}=yW[t];return{message:e?`${n} ${e}`:n,code:o}}function Eo(t,e){const{message:n,code:o}=gW[t];return{message:e?`${n} ${e}`:n,code:o}}function om(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function Dp(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function _s(t){return typeof t>"u"}function So(t,e){return!(!e||!_s(t))||"string"==typeof t&&!!t.trim().length}function i3(t,e){return!(!e||!_s(t))||"number"==typeof t&&!isNaN(t)}function yb(t){return!(!So(t,!1)||!t.includes(":"))&&2===t.split(":").length}function $C(t){let e=!0;return om(t)?t.length&&(e=t.every(n=>So(n,!1))):e=!1,e}function _W(t,e,n){let o=null;return Object.entries(t).forEach(([l,m])=>{if(o)return;const N=function SW(t,e,n){let o=null;return om(e)&&e.length?e.forEach(l=>{o||yb(l)||(o=Eo("UNSUPPORTED_CHAINS",`${n}, chain ${l} should be a string and conform to "namespace:chainId" format`))}):yb(t)||(o=Eo("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),o}(l,ZE(l,m),`${e} ${n}`);N&&(o=N)}),o}function MW(t,e){let n=null;return om(t)?t.forEach(o=>{n||function vW(t){if(So(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const n=e[0]+":"+e[1];return!!e[2]&&yb(n)}}return!1}(o)||(n=Eo("UNSUPPORTED_ACCOUNTS",`${e}, account ${o} should be a string and conform to "namespace:chainId:address" format`))}):n=Eo("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function ex(t,e){let n=null;return Object.values(t).forEach(o=>{if(n)return;const l=function CW(t,e){let n=null;return $C(t?.methods)?$C(t?.events)||(n=Eo("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=Eo("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}(o,`${e}, namespace`);l&&(n=l)}),n}function mb(t,e){let n=null;if(t&&Dp(t)){const o=ex(t,e);o&&(n=o);const l=function IW(t,e){let n=null;return Object.values(t).forEach(o=>{if(n)return;const l=MW(o?.accounts,`${e} namespace`);l&&(n=l)}),n}(t,e);l&&(n=l)}else n=_n("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function tx(t){return So(t.protocol,!0)}function Us(t){return typeof t<"u"&&null!==typeof t}function nx(t,e){return!(!yb(e)||!function lW(t){const e=[];return Object.values(t).forEach(n=>{e.push(...xp(n.accounts))}),e}(t).includes(e))}function kW(t,e,n){return!!So(n,!1)&&function fW(t,e){const n=[];return Object.values(t).forEach(o=>{xp(o.accounts).includes(e)&&n.push(...o.methods)}),n}(t,e).includes(n)}function LW(t,e,n){return!!So(n,!1)&&function dW(t,e){const n=[];return Object.values(t).forEach(o=>{xp(o.accounts).includes(e)&&n.push(...o.events)}),n}(t,e).includes(n)}function o3(t,e,n){let o=null;const l=function FW(t){const e={};return Object.keys(t).forEach(n=>{var o;n.includes(":")?e[n]=t[n]:null==(o=t[n].chains)||o.forEach(l=>{e[l]={methods:t[n].methods,events:t[n].events}})}),e}(t),m=function BW(t){const e={};return Object.keys(t).forEach(n=>{n.includes(":")?e[n]=t[n]:xp(t[n].accounts)?.forEach(l=>{e[l]={accounts:t[n].accounts.filter(m=>m.includes(`${l}:`)),methods:t[n].methods,events:t[n].events}})}),e}(e),N=Object.keys(l),J=Object.keys(m),ee=rx(Object.keys(t)),oe=rx(Object.keys(e)),ue=ee.filter(ge=>!oe.includes(ge));return ue.length&&(o=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${ue.toString()}\n Received: ${Object.keys(e).toString()}`)),bh(N,J)||(o=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${N.toString()}\n Approved: ${J.toString()}`)),Object.keys(e).forEach(ge=>{if(!ge.includes(":")||o)return;const Ie=xp(e[ge].accounts);Ie.includes(ge)||(o=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${ge}\n Required: ${ge}\n Approved: ${Ie.toString()}`))}),N.forEach(ge=>{o||(bh(l[ge].methods,m[ge].methods)?bh(l[ge].events,m[ge].events)||(o=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${ge}`)):o=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${ge}`))}),o}function rx(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function ix(){const t=Ip();return new Promise(e=>{switch(t){case js.browser:e(function UW(){return rm()&&navigator?.onLine}());break;case js.reactNative:e(function KW(){return s3.apply(this,arguments)}());break;case js.node:default:e(!0)}})}function s3(){return(s3=(0,Le.Z)(function*(){return!(nm()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function HW(t){switch(Ip()){case js.browser:!function zW(t){!nm()&&rm()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}(t);break;case js.reactNative:!function WW(t){nm()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}(t);case js.node:}}const a3={};class vb{static get(e){return a3[e]}static set(e,n){a3[e]=n}static delete(e){delete a3[e]}}const ox="INTERNAL_ERROR",u3="SERVER_ERROR",QW=[-32700,-32600,-32601,-32602,-32603],sm={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[ox]:{code:-32603,message:"Internal error"},[u3]:{code:-32e3,message:"Server error"}},sx=u3;function ax(t){return QW.includes(t)}function ux(t){return Object.keys(sm).includes(t)?sm[t]:sm[sx]}function cx(t){return Object.values(sm).find(n=>n.code===t)||sm[sx]}var $W=y(71948);function c3(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function lx(t=6){return BigInt(c3(t))}function Tp(t,e,n){return{id:n||c3(),jsonrpc:"2.0",method:t,params:e}}function l3(t,e){return{id:t,jsonrpc:"2.0",result:e}}function f3(t,e,n){return{id:t,jsonrpc:"2.0",error:eG(e,n)}}function eG(t,e){return typeof t>"u"?ux(ox):("string"==typeof t&&(t=Object.assign(Object.assign({},ux(u3)),{message:t})),typeof e<"u"&&(t.data=e),ax(t.code)&&(t=cx(t.code)),t)}class tG{}class nG extends tG{constructor(){super()}}class rG extends nG{constructor(e){super()}}const oG="^wss?:";function fx(t,e){const n=function sG(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return!(typeof n>"u")&&new RegExp(e).test(n)}function dx(t){return fx(t,oG)}function aG(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function hx(t){return"object"==typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function d3(t){return hx(t)&&"method"in t}function bb(t){return hx(t)&&(hl(t)||gu(t))}function hl(t){return"result"in t}function gu(t){return"error"in t}class uG extends rG{constructor(e){super(e),this.events=new uu.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var n=this;return(0,Le.Z)(function*(){yield n.open(e)})()}disconnect(){var e=this;return(0,Le.Z)(function*(){yield e.close()})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}request(e,n){var o=this;return(0,Le.Z)(function*(){return o.requestStrict(Tp(e.method,e.params||[],e.id||lx().toString()),n)})()}requestStrict(e,n){var o=this;return(0,Le.Z)(function*(){return new Promise(function(){var l=(0,Le.Z)(function*(m,N){if(!o.connection.connected)try{yield o.open()}catch(J){N(J)}o.events.on(`${e.id}`,J=>{gu(J)?N(J.error):m(J.result)});try{yield o.connection.send(e,n)}catch(J){N(J)}});return function(m,N){return l.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),bb(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var n=this;return(0,Le.Z)(function*(){n.connection===e&&n.connection.connected||(n.connection.connected&&n.close(),"string"==typeof e&&(yield n.connection.open(e),e=n.connection),n.connection=n.setConnection(e),yield n.connection.open(),n.registerEventListeners(),n.events.emit("connect"))})()}close(){var e=this;return(0,Le.Z)(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const px=t=>t.split("?")[0],fG=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:y(25504);const hG=class dG{constructor(e){if(this.url=e,this.events=new uu.EventEmitter,this.registering=!1,!dx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}open(e=this.url){var n=this;return(0,Le.Z)(function*(){yield n.register(e)})()}close(){var e=this;return(0,Le.Z)(function*(){return new Promise((n,o)=>{typeof e.socket>"u"?o(new Error("Connection already closed")):(e.socket.onclose=l=>{e.onClose(l),n()},e.socket.close())})})()}send(e,n){var o=this;return(0,Le.Z)(function*(){typeof o.socket>"u"&&(o.socket=yield o.register());try{o.socket.send(YI(e))}catch(l){o.onError(e.id,l)}})()}register(e=this.url){if(!dx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((o,l)=>{this.events.once("register_error",m=>{this.resetMaxListeners(),l(m)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return l(new Error("WebSocket connection is missing or invalid"));o(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,o)=>{const l=(0,$W.isReactNative)()?void 0:{rejectUnauthorized:!aG(e)},m=new fG(e,[],l);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?m.onerror=N=>{const J=N;o(this.emitError(J.error))}:m.on("error",N=>{o(this.emitError(N))}),m.onopen=()=>{this.onOpen(m),n(m)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const n="string"==typeof e.data?ZI(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const o=this.parseError(n),m=f3(e,o.message||o.toString());this.events.emit("payload",m)}parseError(e,n=this.url){return function XW(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}(e,px(n),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${px(this.url)}`));return this.events.emit("register_error",n),n}};var pG=y(88222),gG=y.n(pG);var mG=function yG(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),o=0;o>>0,Xe=new Uint8Array(nt);Te[ke];){var St=n[Te.charCodeAt(ke)];if(255===St)return;for(var kt=0,un=nt-1;(0!==St||kt>>0,Xe[un]=St%256>>>0,St=St/256>>>0;if(0!==St)throw new Error("Non-zero carry");Ge=kt,ke++}if(" "!==Te[ke]){for(var Nn=nt-Ge;Nn!==nt&&0===Xe[Nn];)Nn++;for(var vn=new Uint8Array(Ue+(nt-Nn)),pn=Ue;Nn!==nt;)vn[pn++]=Xe[Nn++];return vn}}}return{encode:function ge(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var ke=0,Ue=0,Ge=0,nt=Te.length;Ge!==nt&&0===Te[Ge];)Ge++,ke++;for(var Xe=(nt-Ge)*ue+1>>>0,St=new Uint8Array(Xe);Ge!==nt;){for(var kt=Te[Ge],un=0,Nn=Xe-1;(0!==kt||un>>0,St[Nn]=kt%J>>>0,kt=kt/J>>>0;if(0!==kt)throw new Error("Non-zero carry");Ue=un,Ge++}for(var vn=Xe-Ue;vn!==Xe&&0===St[vn];)vn++;for(var pn=ee.repeat(ke);vn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class AG{constructor(e,n,o){this.name=e,this.prefix=n,this.baseEncode=o}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class EG{constructor(e,n,o){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=o}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return mx(this,e)}}class SG{constructor(e){this.decoders=e}or(e){return mx(this,e)}decode(e){const n=e[0],o=this.decoders[n];if(o)return o.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const mx=(t,e)=>new SG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class _G{constructor(e,n,o,l){this.name=e,this.prefix=n,this.baseEncode=o,this.baseDecode=l,this.encoder=new AG(e,n,o),this.decoder=new EG(e,n,l)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const wb=({name:t,prefix:e,encode:n,decode:o})=>new _G(t,e,n,o),am=({prefix:t,name:e,alphabet:n})=>{const{encode:o,decode:l}=vG(n,e);return wb({prefix:t,name:e,encode:o,decode:m=>yx(l(m))})},Fo=({name:t,prefix:e,bitsPerChar:n,alphabet:o})=>wb({prefix:e,name:t,encode:l=>((t,e,n)=>{const o="="===e[e.length-1],l=(1<n;)N-=n,m+=e[l&J>>N];if(N&&(m+=e[l&J<((t,e,n,o)=>{const l={};for(let ue=0;ue=8&&(J-=8,N[oe++]=255&ee>>J)}if(J>=n||255&ee<<8-J)throw new SyntaxError("Unexpected end of data");return N})(l,o,n,t)}),CG=wb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var xG=Object.freeze({__proto__:null,identity:CG});const DG=Fo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var TG=Object.freeze({__proto__:null,base2:DG});const OG=Fo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var NG=Object.freeze({__proto__:null,base8:OG});const PG=am({prefix:"9",name:"base10",alphabet:"0123456789"});var RG=Object.freeze({__proto__:null,base10:PG});const kG=Fo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),LG=Fo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var FG=Object.freeze({__proto__:null,base16:kG,base16upper:LG});const BG=Fo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),jG=Fo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),UG=Fo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),KG=Fo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),VG=Fo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),HG=Fo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),zG=Fo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),WG=Fo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),GG=Fo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var ZG=Object.freeze({__proto__:null,base32:BG,base32upper:jG,base32pad:UG,base32padupper:KG,base32hex:VG,base32hexupper:HG,base32hexpad:zG,base32hexpadupper:WG,base32z:GG});const YG=am({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),JG=am({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var QG=Object.freeze({__proto__:null,base36:YG,base36upper:JG});const qG=am({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),XG=am({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var $G=Object.freeze({__proto__:null,base58btc:qG,base58flickr:XG});const eZ=Fo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),tZ=Fo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),nZ=Fo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),rZ=Fo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var iZ=Object.freeze({__proto__:null,base64:eZ,base64pad:tZ,base64url:nZ,base64urlpad:rZ});const vx=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),oZ=vx.reduce((t,e,n)=>(t[n]=e,t),[]),sZ=vx.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const cZ=wb({prefix:"\u{1f680}",name:"base256emoji",encode:function aZ(t){return t.reduce((e,n)=>e+=oZ[n],"")},decode:function uZ(t){const e=[];for(const n of t){const o=sZ[n.codePointAt(0)];if(void 0===o)throw new Error(`Non-base256emoji character: ${n}`);e.push(o)}return new Uint8Array(e)}});var lZ=Object.freeze({__proto__:null,base256emoji:cZ}),fZ=function wx(t,e,n){e=e||[];for(var o=n=n||0;t>=pZ;)e[n++]=255&t|bx,t/=128;for(;t&hZ;)e[n++]=255&t|bx,t>>>=7;return e[n]=0|t,wx.bytes=n-o+1,e},bx=128,hZ=-128,pZ=Math.pow(2,31);var gZ=function h3(t,o){var N,n=0,l=0,m=o=o||0,J=t.length;do{if(m>=J)throw h3.bytes=0,new RangeError("Could not decode varint");N=t[m++],n+=l<28?(N&Ax)<=yZ);return h3.bytes=m-o,n},yZ=128,Ax=127;var mZ=Math.pow(2,7),vZ=Math.pow(2,14),bZ=Math.pow(2,21),wZ=Math.pow(2,28),AZ=Math.pow(2,35),EZ=Math.pow(2,42),SZ=Math.pow(2,49),_Z=Math.pow(2,56),MZ=Math.pow(2,63),CZ={encode:fZ,decode:gZ,encodingLength:function(t){return t(Ex.encode(t,e,n),e),_x=t=>Ex.encodingLength(t),p3=(t,e)=>{const n=e.byteLength,o=_x(t),l=o+_x(n),m=new Uint8Array(l+n);return Sx(t,m,0),Sx(n,m,o),m.set(e,l),new xZ(t,n,e,m)};class xZ{constructor(e,n,o,l){this.code=e,this.size=n,this.digest=o,this.bytes=l}}const Mx=({name:t,code:e,encode:n})=>new DZ(t,e,n);class DZ{constructor(e,n,o){this.name=e,this.code=n,this.encode=o}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?p3(this.code,n):n.then(o=>p3(this.code,o))}throw Error("Unknown type, must be binary type")}}const Ix=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),TZ=Mx({name:"sha2-256",code:18,encode:Ix("SHA-256")}),OZ=Mx({name:"sha2-512",code:19,encode:Ix("SHA-512")});Object.freeze({__proto__:null,sha256:TZ,sha512:OZ});const xx=yx;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:xx,digest:t=>p3(0,xx(t))}});new TextEncoder,new TextDecoder;const Dx={...xG,...TG,...NG,...RG,...FG,...ZG,...QG,...$G,...iZ,...lZ};function Tx(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Ox(t,e,n,o){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:o}}}const Nx=Ox("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),g3=Ox("ascii","a",t=>{let e="a";for(let n=0;n{const e=function kZ(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Tx(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let n=0;n(this.isInitialized(),this.keychain.has(l)),this.set=function(){var l=(0,Le.Z)(function*(m,N){o.isInitialized(),o.keychain.set(m,N),yield o.persist()});return function(m,N){return l.apply(this,arguments)}}(),this.get=l=>{this.isInitialized();const m=this.keychain.get(l);if(typeof m>"u"){const{message:N}=_n("NO_MATCHING_KEY",`${this.name}: ${l}`);throw new Error(N)}return m},this.del=function(){var l=(0,Le.Z)(function*(m){o.isInitialized(),o.keychain.delete(m),yield o.persist()});return function(m){return l.apply(this,arguments)}}(),this.core=e,this.logger=(0,zr.generateChildLogger)(n,this.name)}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,HC(e))})()}getKeyChain(){var e=this;return(0,Le.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?zC(n):void 0})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class pY{constructor(e,n,o){var l=this;this.core=e,this.logger=n,this.name="crypto",this.initialized=!1,this.init=(0,Le.Z)(function*(){l.initialized||(yield l.keychain.init(),l.initialized=!0)}),this.hasKeys=m=>(this.isInitialized(),this.keychain.has(m)),this.getClientId=(0,Le.Z)(function*(){l.isInitialized();return mC(vC(yield l.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const m=function Az(){const t=AC.Au();return{privateKey:La(t.secretKey,Ss),publicKey:La(t.publicKey,Ss)}}();return this.setPrivateKey(m.publicKey,m.privateKey)},this.signJWT=function(){var m=(0,Le.Z)(function*(N){l.isInitialized();const ee=vC(yield l.getClientSeed()),oe=$E();return yield function QH(t,e,n,o){return VE.apply(this,arguments)}(oe,N,VZ,ee)});return function(N){return m.apply(this,arguments)}}(),this.generateSharedKey=(m,N,J)=>{this.isInitialized();const oe=function Ez(t,e){const n=AC.gi(hu(t,Ss),hu(e,Ss),!0);return La(new qH.t(zE.mE,n).expand(XE),Ss)}(this.getPrivateKey(m),N);return this.setSymKey(oe,J)},this.setSymKey=function(){var m=(0,Le.Z)(function*(N,J){l.isInitialized();const ee=J||function Sz(t){return La((0,zE.vp)(hu(t,Ss)),Ss)}(N);return yield l.keychain.set(ee,N),ee});return function(N,J){return m.apply(this,arguments)}}(),this.deleteKeyPair=function(){var m=(0,Le.Z)(function*(N){l.isInitialized(),yield l.keychain.del(N)});return function(N){return m.apply(this,arguments)}}(),this.deleteSymKey=function(){var m=(0,Le.Z)(function*(N){l.isInitialized(),yield l.keychain.del(N)});return function(N){return m.apply(this,arguments)}}(),this.encode=function(){var m=(0,Le.Z)(function*(N,J,ee){l.isInitialized();const oe=FC(ee),ue=YI(J);if(BC(oe)){const Te=oe.senderPublicKey,ke=oe.receiverPublicKey;N=yield l.generateSharedKey(Te,ke)}const ge=l.getSymKey(N),{type:Ie,senderPublicKey:Re}=oe;return Mz({type:Ie,symKey:ge,message:ue,senderPublicKey:Re})});return function(N,J,ee){return m.apply(this,arguments)}}(),this.decode=function(){var m=(0,Le.Z)(function*(N,J,ee){l.isInitialized();const oe=function xz(t,e){const n=pb(t);return FC({type:tm(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?La(n.senderPublicKey,Ss):void 0,receiverPublicKey:e?.receiverPublicKey})}(J,ee);if(BC(oe)){const ue=oe.receiverPublicKey,ge=oe.senderPublicKey;N=yield l.generateSharedKey(ue,ge)}try{const ge=function Iz(t){const e=new bC.OK(hu(t.symKey,Ss)),{sealed:n,iv:o}=pb(t.encoded),l=e.open(o,n);if(null===l)throw new Error("Failed to decrypt");return La(l,QE)}({symKey:l.getSymKey(N),encoded:J});return ZI(ge)}catch(ue){l.logger.error(`Failed to decode message from topic: '${N}', clientId: '${yield l.getClientId()}'`),l.logger.error(ue)}});return function(N,J,ee){return m.apply(this,arguments)}}(),this.getPayloadType=m=>tm(pb(m).type),this.getPayloadSenderPublicKey=m=>{const N=pb(m);return N.senderPublicKey?La(N.senderPublicKey,Ss):void 0},this.core=e,this.logger=(0,zr.generateChildLogger)(n,this.name),this.keychain=o||new hY(this.core,this.logger)}get context(){return(0,zr.getLoggerContext)(this.logger)}setPrivateKey(e,n){var o=this;return(0,Le.Z)(function*(){return yield o.keychain.set(e,n),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return(0,Le.Z)(function*(){let n="";try{n=e.keychain.get(Rx)}catch{n=$E(),yield e.keychain.set(Rx,n)}return function FZ(t,e="utf8"){const n=LZ[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${t}`):Tx(globalThis.Buffer.from(t,"utf-8"))}(n,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class gY extends JK{constructor(e,n){var o;super(e,n),o=this,this.logger=e,this.core=n,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Lf,this.init=(0,Le.Z)(function*(){if(!o.initialized){o.logger.trace("Initialized");try{const l=yield o.getRelayerMessages();typeof l<"u"&&(o.messages=l),o.logger.debug(`Successfully Restored records for ${o.name}`),o.logger.trace({type:"method",method:"restore",size:o.messages.size})}catch(l){o.logger.debug(`Failed to Restore records for ${o.name}`),o.logger.error(l)}finally{o.initialized=!0}}}),this.set=function(){var l=(0,Le.Z)(function*(m,N){o.isInitialized();const J=Mp(N);let ee=o.messages.get(m);return typeof ee>"u"&&(ee={}),typeof ee[J]<"u"||(ee[J]=N,o.messages.set(m,ee),yield o.persist()),J});return function(m,N){return l.apply(this,arguments)}}(),this.get=l=>{this.isInitialized();let m=this.messages.get(l);return typeof m>"u"&&(m={}),m},this.has=(l,m)=>{this.isInitialized();return typeof this.get(l)[Mp(m)]<"u"},this.del=function(){var l=(0,Le.Z)(function*(m){o.isInitialized(),o.messages.delete(m),yield o.persist()});return function(m){return l.apply(this,arguments)}}(),this.logger=(0,zr.generateChildLogger)(e,this.name),this.core=n}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,HC(e))})()}getRelayerMessages(){var e=this;return(0,Le.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?zC(n):void 0})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class yY extends QK{constructor(e,n){var o;super(e,n),o=this,this.relayer=e,this.logger=n,this.events=new uu.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,Vn.toMiliseconds)(Vn.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var l=(0,Le.Z)(function*(m,N,J){var ee;o.logger.debug("Publishing Payload"),o.logger.trace({type:"method",method:"publish",params:{topic:m,message:N,opts:J}});try{const oe=J?.ttl||ZZ,ue=r3(J),ge=J?.prompt||!1,Ie=J?.tag||0,Re=J?.id||lx().toString(),Te={topic:m,message:N,opts:{ttl:oe,relay:ue,prompt:ge,tag:Ie,id:Re}},ke=setTimeout(()=>o.queue.set(Re,Te),o.publishTimeout);try{yield yield im(o.rpcPublish(m,N,oe,ue,ge,Ie,Re),o.publishTimeout,"Failed to publish payload, please try again."),o.removeRequestFromQueue(Re),o.relayer.events.emit(os_publish,Te)}catch(Ue){if(o.logger.debug("Publishing Payload stalled"),o.needsTransportRestart=!0,null!=(ee=J?.internal)&&ee.throwOnFailedPublish)throw o.removeRequestFromQueue(Re),Ue;return}finally{clearTimeout(ke)}o.logger.debug("Successfully Published Payload"),o.logger.trace({type:"method",method:"publish",params:{topic:m,message:N,opts:J}})}catch(oe){throw o.logger.debug("Failed to Publish Payload"),o.logger.error(oe),oe}});return function(m,N,J){return l.apply(this,arguments)}}(),this.on=(l,m)=>{this.events.on(l,m)},this.once=(l,m)=>{this.events.once(l,m)},this.off=(l,m)=>{this.events.off(l,m)},this.removeListener=(l,m)=>{this.events.removeListener(l,m)},this.relayer=e,this.logger=(0,zr.generateChildLogger)(n,this.name),this.registerEventListeners()}get context(){return(0,zr.getLoggerContext)(this.logger)}rpcPublish(e,n,o,l,m,N,J){var ee,oe,ue,ge;const Ie={method:gb(l.protocol).publish,params:{topic:e,message:n,ttl:o,prompt:m,tag:N},id:J};return _s(null==(ee=Ie.params)?void 0:ee.prompt)&&(null==(oe=Ie.params)||delete oe.prompt),_s(null==(ue=Ie.params)?void 0:ue.tag)&&(null==(ge=Ie.params)||delete ge.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:Ie}),this.relayer.request(Ie)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var n=(0,Le.Z)(function*(o){const{topic:l,message:m,opts:N}=o;yield e.publish(l,m,N)});return function(o){return n.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Xy.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(os_connection_stalled);this.checkQueue()}),this.relayer.on(os_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class mY{constructor(){this.map=new Map,this.set=(e,n)=>{const o=this.get(e);this.exists(e,n)||this.map.set(e,[...o,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u")return void this.map.delete(e);if(!this.map.has(e))return;const o=this.get(e);if(!this.exists(e,n))return;const l=o.filter(m=>m!==n);l.length?this.map.set(e,l):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var vY=Object.defineProperty,bY=Object.defineProperties,wY=Object.getOwnPropertyDescriptors,Bx=Object.getOwnPropertySymbols,AY=Object.prototype.hasOwnProperty,EY=Object.prototype.propertyIsEnumerable,jx=(t,e,n)=>e in t?vY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lm=(t,e)=>{for(var n in e||(e={}))AY.call(e,n)&&jx(t,n,e[n]);if(Bx)for(var n of Bx(e))EY.call(e,n)&&jx(t,n,e[n]);return t},b3=(t,e)=>bY(t,wY(e));class SY extends $K{constructor(e,n){var o;super(e,n),o=this,this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new mY,this.events=new uu.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Lf,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,Le.Z)(function*(){o.initialized||(o.logger.trace("Initialized"),o.registerEventListeners(),o.clientId=yield o.relayer.core.crypto.getClientId())}),this.subscribe=function(){var l=(0,Le.Z)(function*(m,N){yield o.restartToComplete(),o.isInitialized(),o.logger.debug("Subscribing Topic"),o.logger.trace({type:"method",method:"subscribe",params:{topic:m,opts:N}});try{const J=r3(N),ee={topic:m,relay:J};o.pending.set(m,ee);const oe=yield o.rpcSubscribe(m,J);return o.onSubscribe(oe,ee),o.logger.debug("Successfully Subscribed Topic"),o.logger.trace({type:"method",method:"subscribe",params:{topic:m,opts:N}}),oe}catch(J){throw o.logger.debug("Failed to Subscribe Topic"),o.logger.error(J),J}});return function(m,N){return l.apply(this,arguments)}}(),this.unsubscribe=function(){var l=(0,Le.Z)(function*(m,N){yield o.restartToComplete(),o.isInitialized(),typeof N?.id<"u"?yield o.unsubscribeById(m,N.id,N):yield o.unsubscribeByTopic(m,N)});return function(m,N){return l.apply(this,arguments)}}(),this.isSubscribed=function(){var l=(0,Le.Z)(function*(m){return!!o.topics.includes(m)||(yield new Promise((N,J)=>{const ee=new Vn.Watch;ee.start(o.pendingSubscriptionWatchLabel);const oe=setInterval(()=>{!o.pending.has(m)&&o.topics.includes(m)&&(clearInterval(oe),ee.stop(o.pendingSubscriptionWatchLabel),N(!0)),ee.elapsed(o.pendingSubscriptionWatchLabel)>=oY&&(clearInterval(oe),ee.stop(o.pendingSubscriptionWatchLabel),J(new Error("Subscription resolution timeout")))},o.pollingInterval)}).catch(()=>!1))});return function(m){return l.apply(this,arguments)}}(),this.on=(l,m)=>{this.events.on(l,m)},this.once=(l,m)=>{this.events.once(l,m)},this.off=(l,m)=>{this.events.off(l,m)},this.removeListener=(l,m)=>{this.events.removeListener(l,m)},this.restart=(0,Le.Z)(function*(){o.restartInProgress=!0,yield o.restore(),yield o.reset(),o.restartInProgress=!1}),this.relayer=e,this.logger=(0,zr.generateChildLogger)(n,this.name),this.clientId=""}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,n){let o=!1;try{o=this.getSubscription(e).topic===n}catch{}return o}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,n){var o=this;return(0,Le.Z)(function*(){const l=o.topicMap.get(e);yield Promise.all(l.map(function(){var m=(0,Le.Z)(function*(N){return yield o.unsubscribeById(e,N,n)});return function(N){return m.apply(this,arguments)}}()))})()}unsubscribeById(e,n,o){var l=this;return(0,Le.Z)(function*(){l.logger.debug("Unsubscribing Topic"),l.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:o}});try{const m=r3(o);yield l.rpcUnsubscribe(e,n,m);const N=Eo("USER_DISCONNECTED",`${l.name}, ${e}`);yield l.onUnsubscribe(e,n,N),l.logger.debug("Successfully Unsubscribed Topic"),l.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:o}})}catch(m){throw l.logger.debug("Failed to Unsubscribe Topic"),l.logger.error(m),m}})()}rpcSubscribe(e,n){var o=this;return(0,Le.Z)(function*(){const l={method:gb(n.protocol).subscribe,params:{topic:e}};o.logger.debug("Outgoing Relay Payload"),o.logger.trace({type:"payload",direction:"outgoing",request:l});try{yield yield im(o.relayer.request(l),o.subscribeTimeout)}catch{o.logger.debug("Outgoing Relay Subscribe Payload stalled"),o.relayer.events.emit(os_connection_stalled)}return Mp(e+o.clientId)})()}rpcBatchSubscribe(e){var n=this;return(0,Le.Z)(function*(){if(!e.length)return;const l={method:gb(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(m=>m.topic)}};n.logger.debug("Outgoing Relay Payload"),n.logger.trace({type:"payload",direction:"outgoing",request:l});try{return yield yield im(n.relayer.request(l),n.subscribeTimeout)}catch{n.logger.debug("Outgoing Relay Payload stalled"),n.relayer.events.emit(os_connection_stalled)}})()}rpcUnsubscribe(e,n,o){const l={method:gb(o.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:l}),this.relayer.request(l)}onSubscribe(e,n){this.setSubscription(e,b3(lm({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,lm({},n)),this.pending.delete(n.topic)})}onUnsubscribe(e,n,o){var l=this;return(0,Le.Z)(function*(){l.events.removeAllListeners(n),l.hasSubscription(n,e)&&l.deleteSubscription(n,o),yield l.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var n=this;return(0,Le.Z)(function*(){yield n.relayer.core.storage.setItem(n.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return(0,Le.Z)(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,lm({},n)),this.topicMap.set(n.topic,e),this.events.emit(yu_created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:o}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(o)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const o=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(o.topic,e),this.events.emit(yu_deleted,b3(lm({},o),{reason:n}))}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(yu_sync)})()}reset(){var e=this;return(0,Le.Z)(function*(){if(e.cached.length){const n=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let o=0;o"u"||!n.length)return;if(e.subscriptions.size){const{message:o}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(o),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(o)}e.cached=n,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(n){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(n)}})()}batchSubscribe(e){var n=this;return(0,Le.Z)(function*(){if(!e.length)return;const o=yield n.rpcBatchSubscribe(e);om(o)&&n.onBatchSubscribe(o.map((l,m)=>b3(lm({},e[m]),{id:l})))})()}onConnect(){var e=this;return(0,Le.Z)(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return(0,Le.Z)(function*(){if(!e.initialized||e.relayer.transportExplicitlyClosed)return;const n=[];e.pending.forEach(o=>{n.push(o)}),yield e.batchSubscribe(n)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(Xy.HEARTBEAT_EVENTS.pulse,(0,Le.Z)(function*(){yield e.checkPending()})),this.relayer.on(os_connect,(0,Le.Z)(function*(){yield e.onConnect()})),this.relayer.on(os_disconnect,()=>{this.onDisconnect()}),this.events.on(yu_created,function(){var n=(0,Le.Z)(function*(o){const l=yu_created;e.logger.info(`Emitting ${l}`),e.logger.debug({type:"event",event:l,data:o}),yield e.persist()});return function(o){return n.apply(this,arguments)}}()),this.events.on(yu_deleted,function(){var n=(0,Le.Z)(function*(o){const l=yu_deleted;e.logger.info(`Emitting ${l}`),e.logger.debug({type:"event",event:l,data:o}),yield e.persist()});return function(o){return n.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return(0,Le.Z)(function*(){e.restartInProgress&&(yield new Promise(n=>{const o=setInterval(()=>{e.restartInProgress||(clearInterval(o),n())},e.pollingInterval)}))})()}}var _Y=Object.defineProperty,Ux=Object.getOwnPropertySymbols,MY=Object.prototype.hasOwnProperty,IY=Object.prototype.propertyIsEnumerable,Kx=(t,e,n)=>e in t?_Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class xY extends qK{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.events=new uu.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var o=(0,Le.Z)(function*(l){n.logger.debug("Publishing Request Payload");try{return yield n.toEstablishConnection(),yield n.provider.request(l)}catch(m){throw n.logger.debug("Failed to Publish Request"),n.logger.error(m),m}});return function(l){return o.apply(this,arguments)}}(),this.onPayloadHandler=o=>{this.onProviderPayload(o)},this.onConnectHandler=()=>{this.events.emit(os_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=o=>{this.logger.error(o),this.events.emit(os_error,o),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(pl_payload,this.onPayloadHandler),this.provider.on(pl_connect,this.onConnectHandler),this.provider.on(pl_disconnect,this.onDisconnectHandler),this.provider.on(pl_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,zr.generateChildLogger)(e.logger,this.name):(0,zr.pino)((0,zr.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new gY(this.logger,e.core),this.subscriber=new SY(this,this.logger),this.publisher=new yY(this,this.logger),this.relayUrl=e?.relayUrl||Lx,this.projectId=e.projectId,this.provider={}}init(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${Fx}...`),yield e.restartTransport(Fx)}e.initialized=!0,setTimeout((0,Le.Z)(function*(){0===e.subscriber.topics.length&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,zr.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,n,o){var l=this;return(0,Le.Z)(function*(){l.isInitialized(),yield l.publisher.publish(e,n,o),yield l.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})})()}subscribe(e,n){var o=this;return(0,Le.Z)(function*(){var l;o.isInitialized();let N,m=(null==(l=o.subscriber.topicMap.get(e))?void 0:l[0])||"";if(m)return m;const J=ee=>{ee.topic===e&&(o.subscriber.off(yu_created,J),N())};return yield Promise.all([new Promise(ee=>{N=ee,o.subscriber.on(yu_created,J)}),new Promise(function(){var ee=(0,Le.Z)(function*(oe){m=yield o.subscriber.subscribe(e,n),oe()});return function(oe){return ee.apply(this,arguments)}}())]),m})()}unsubscribe(e,n){var o=this;return(0,Le.Z)(function*(){o.isInitialized(),yield o.subscriber.unsubscribe(e,n)})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}transportClose(){var e=this;return(0,Le.Z)(function*(){e.transportExplicitlyClosed=!0,e.hasExperiencedNetworkDisruption&&e.connected?yield im(e.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.connected&&(yield e.provider.disconnect())})()}transportOpen(e){var n=this;return(0,Le.Z)(function*(){if(n.transportExplicitlyClosed=!1,yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress){e&&e!==n.relayUrl&&(n.relayUrl=e,yield n.transportClose(),yield n.createProvider()),n.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(o=>{if(!n.initialized)return o();n.subscriber.once(yu_resubscribed,()=>{o()})}),new Promise(function(){var o=(0,Le.Z)(function*(l,m){try{yield im(n.provider.connect(),1e4,`Socket stalled when trying to connect to ${n.relayUrl}`)}catch(N){return void m(N)}l()});return function(l,m){return o.apply(this,arguments)}}())])}catch(o){n.logger.error(o);const l=o;if(!n.isConnectionStalled(l.message))throw o;n.provider.events.emit(pl_disconnect)}finally{n.connectionAttemptInProgress=!1,n.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(e){var n=this;return(0,Le.Z)(function*(){yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress&&(n.relayUrl=e||n.relayUrl,yield n.transportClose(),yield n.createProvider(),yield n.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,Le.Z)(function*(){if(!(yield ix()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}createProvider(){var e=this;return(0,Le.Z)(function*(){e.provider.connection&&e.unregisterProviderListeners();const n=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new uG(new hG(Uz({sdkVersion:"2.10.4",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:n,useOnCloseEvent:!0}))),e.registerProviderListeners()})()}recordMessageEvent(e){var n=this;return(0,Le.Z)(function*(){const{topic:o,message:l}=e;yield n.messages.set(o,l)})()}shouldIgnoreMessageEvent(e){var n=this;return(0,Le.Z)(function*(){const{topic:o,message:l}=e;if(!l||0===l.length)return n.logger.debug(`Ignoring invalid/empty message: ${l}`),!0;if(!(yield n.subscriber.isSubscribed(o)))return n.logger.debug(`Ignoring message for non-subscribed topic ${o}`),!0;const m=n.messages.has(o,l);return m&&n.logger.debug(`Ignoring duplicate message: ${l}`),m})()}onProviderPayload(e){var n=this;return(0,Le.Z)(function*(){if(n.logger.debug("Incoming Relay Payload"),n.logger.trace({type:"payload",direction:"incoming",payload:e}),d3(e)){if(!e.method.endsWith("_subscription"))return;const o=e.params,{topic:l,message:m,publishedAt:N}=o.data,J={topic:l,message:m,publishedAt:N};n.logger.debug("Emitting Relayer Payload"),n.logger.trace(((t,e)=>{for(var n in e||(e={}))MY.call(e,n)&&Kx(t,n,e[n]);if(Ux)for(var n of Ux(e))IY.call(e,n)&&Kx(t,n,e[n]);return t})({type:"event",event:o.id},J)),n.events.emit(o.id,J),yield n.acknowledgePayload(e),yield n.onMessageEvent(J)}else bb(e)&&n.events.emit(os_message_ack,e)})()}onMessageEvent(e){var n=this;return(0,Le.Z)(function*(){(yield n.shouldIgnoreMessageEvent(e))||(n.events.emit(os_message,e),yield n.recordMessageEvent(e))})()}acknowledgePayload(e){var n=this;return(0,Le.Z)(function*(){const o=l3(e.id,!0);yield n.provider.connection.send(o)})()}unregisterProviderListeners(){this.provider.off(pl_payload,this.onPayloadHandler),this.provider.off(pl_connect,this.onConnectHandler),this.provider.off(pl_disconnect,this.onDisconnectHandler),this.provider.off(pl_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return(0,Le.Z)(function*(){e.events.on(os_connection_stalled,()=>{e.restartTransport().catch(o=>e.logger.error(o))});let n=yield ix();HW(function(){var o=(0,Le.Z)(function*(l){e.initialized&&n!==l&&(n=l,l?yield e.restartTransport().catch(m=>e.logger.error(m)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportClose().catch(m=>e.logger.error(m))))});return function(l){return o.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit(os_disconnect),this.attemptToReconnect()}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,Le.Z)(function*(){yield e.restartTransport().catch(n=>e.logger.error(n))}),(0,Vn.toMiliseconds)(XZ)))}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return(0,Le.Z)(function*(){if(yield e.confirmOnlineStateOrThrow(),!e.connected){if(e.connectionAttemptInProgress)return yield new Promise(n=>{const o=setInterval(()=>{e.connected&&(clearInterval(o),n())},e.connectionStatusPollingInterval)});yield e.restartTransport()}})()}}var DY=Object.defineProperty,Vx=Object.getOwnPropertySymbols,TY=Object.prototype.hasOwnProperty,OY=Object.prototype.propertyIsEnumerable,Hx=(t,e,n)=>e in t?DY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zx=(t,e)=>{for(var n in e||(e={}))TY.call(e,n)&&Hx(t,n,e[n]);if(Vx)for(var n of Vx(e))OY.call(e,n)&&Hx(t,n,e[n]);return t};class Ab extends XK{constructor(e,n,o,l=Lf,m){var N;super(e,n,o,l),N=this,this.core=e,this.logger=n,this.name=o,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lf,this.init=(0,Le.Z)(function*(){N.initialized||(N.logger.trace("Initialized"),yield N.restore(),N.cached.forEach(J=>{N.getKey&&null!==J&&!_s(J)?N.map.set(N.getKey(J),J):function wW(t){var e;return null==(e=t?.proposer)?void 0:e.publicKey}(J)?N.map.set(J.id,J):function AW(t){return t?.topic}(J)&&N.map.set(J.topic,J)}),N.cached=[],N.initialized=!0)}),this.set=function(){var J=(0,Le.Z)(function*(ee,oe){N.isInitialized(),N.map.has(ee)?yield N.update(ee,oe):(N.logger.debug("Setting value"),N.logger.trace({type:"method",method:"set",key:ee,value:oe}),N.map.set(ee,oe),yield N.persist())});return function(ee,oe){return J.apply(this,arguments)}}(),this.get=J=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:J}),this.getData(J)),this.getAll=J=>(this.isInitialized(),J?this.values.filter(ee=>Object.keys(J).every(oe=>gG()(ee[oe],J[oe]))):this.values),this.update=function(){var J=(0,Le.Z)(function*(ee,oe){N.isInitialized(),N.logger.debug("Updating value"),N.logger.trace({type:"method",method:"update",key:ee,update:oe});const ue=zx(zx({},N.getData(ee)),oe);N.map.set(ee,ue),yield N.persist()});return function(ee,oe){return J.apply(this,arguments)}}(),this.delete=function(){var J=(0,Le.Z)(function*(ee,oe){N.isInitialized(),N.map.has(ee)&&(N.logger.debug("Deleting value"),N.logger.trace({type:"method",method:"delete",key:ee,reason:oe}),N.map.delete(ee),yield N.persist())});return function(ee,oe){return J.apply(this,arguments)}}(),this.logger=(0,zr.generateChildLogger)(n,this.name),this.storagePrefix=l,this.getKey=m}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getDataStore(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const n=this.map.get(e);if(!n){const{message:o}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(o),new Error(o)}return n}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getDataStore();if(typeof n>"u"||!n.length)return;if(e.map.size){const{message:o}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(o),new Error(o)}e.cached=n,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(n){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(n)}})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class NY{constructor(e,n){var o=this;this.core=e,this.logger=n,this.name="pairing",this.version="0.3",this.events=new(S2()),this.initialized=!1,this.storagePrefix=Lf,this.ignoredPayloadTypes=[vh],this.registeredMethods=[],this.init=(0,Le.Z)(function*(){o.initialized||(yield o.pairings.init(),yield o.cleanup(),o.registerRelayerEvents(),o.registerExpirerEvents(),o.initialized=!0,o.logger.trace("Initialized"))}),this.register=({methods:l})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...l])]},this.create=(0,Le.Z)(function*(){o.isInitialized();const l=$E(),m=yield o.core.crypto.setSymKey(l),N=pu(Vn.FIVE_MINUTES),J={protocol:"irn"},ee={topic:m,expiry:N,relay:J,active:!1},oe=nW({protocol:o.core.protocol,version:o.core.version,topic:m,symKey:l,relay:J});return yield o.pairings.set(m,ee),yield o.core.relayer.subscribe(m),o.core.expirer.set(m,N),{topic:m,uri:oe}}),this.pair=function(){var l=(0,Le.Z)(function*(m){o.isInitialized(),o.isValidPair(m);const{topic:N,symKey:J,relay:ee}=function $z(t){const e=(t=(t=t.includes("wc://")?t.replace("wc://",""):t).includes("wc:")?t.replace("wc:",""):t).indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,o=t.substring(0,e),l=t.substring(e+1,n).split("@"),m=typeof n<"u"?t.substring(n):"",N=fb.parse(m);return{protocol:o,topic:eW(l[0]),version:parseInt(l[1],10),symKey:N.symKey,relay:Xz(N)}}(m.uri);let oe;if(o.pairings.keys.includes(N)&&(oe=o.pairings.get(N),oe.active))throw new Error(`Pairing already exists: ${N}. Please try again with a new connection URI.`);o.core.crypto.keychain.has(N)||(yield o.core.crypto.setSymKey(J,N),yield o.core.relayer.subscribe(N,{relay:ee}));const ue=pu(Vn.FIVE_MINUTES),ge={topic:N,relay:ee,expiry:ue,active:!1};return yield o.pairings.set(N,ge),o.core.expirer.set(N,ue),m.activatePairing&&(yield o.activate({topic:N})),o.events.emit(cm_create,ge),ge});return function(m){return l.apply(this,arguments)}}(),this.activate=function(){var l=(0,Le.Z)(function*({topic:m}){o.isInitialized();const N=pu(Vn.THIRTY_DAYS);yield o.pairings.update(m,{active:!0,expiry:N}),o.core.expirer.set(m,N)});return function(m){return l.apply(this,arguments)}}(),this.ping=function(){var l=(0,Le.Z)(function*(m){o.isInitialized(),yield o.isValidPing(m);const{topic:N}=m;if(o.pairings.keys.includes(N)){const J=yield o.sendRequest(N,"wc_pairingPing",{}),{done:ee,resolve:oe,reject:ue}=Cp();o.events.once($i("pairing_ping",J),({error:ge})=>{ge?ue(ge):oe()}),yield ee()}});return function(m){return l.apply(this,arguments)}}(),this.updateExpiry=function(){var l=(0,Le.Z)(function*({topic:m,expiry:N}){o.isInitialized(),yield o.pairings.update(m,{expiry:N})});return function(m){return l.apply(this,arguments)}}(),this.updateMetadata=function(){var l=(0,Le.Z)(function*({topic:m,metadata:N}){o.isInitialized(),yield o.pairings.update(m,{peerMetadata:N})});return function(m){return l.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var l=(0,Le.Z)(function*(m){o.isInitialized(),yield o.isValidDisconnect(m);const{topic:N}=m;o.pairings.keys.includes(N)&&(yield o.sendRequest(N,"wc_pairingDelete",Eo("USER_DISCONNECTED")),yield o.deletePairing(N))});return function(m){return l.apply(this,arguments)}}(),this.sendRequest=function(){var l=(0,Le.Z)(function*(m,N,J){const ee=Tp(N,J),oe=yield o.core.crypto.encode(m,ee),ue=um[N].req;return o.core.history.set(m,ee),o.core.relayer.publish(m,oe,ue),ee.id});return function(m,N,J){return l.apply(this,arguments)}}(),this.sendResult=function(){var l=(0,Le.Z)(function*(m,N,J){const ee=l3(m,J),oe=yield o.core.crypto.encode(N,ee),ue=yield o.core.history.get(N,m),ge=um[ue.request.method].res;yield o.core.relayer.publish(N,oe,ge),yield o.core.history.resolve(ee)});return function(m,N,J){return l.apply(this,arguments)}}(),this.sendError=function(){var l=(0,Le.Z)(function*(m,N,J){const ee=f3(m,J),oe=yield o.core.crypto.encode(N,ee),ue=yield o.core.history.get(N,m),ge=um[ue.request.method]?um[ue.request.method].res:um.unregistered_method.res;yield o.core.relayer.publish(N,oe,ge),yield o.core.history.resolve(ee)});return function(m,N,J){return l.apply(this,arguments)}}(),this.deletePairing=function(){var l=(0,Le.Z)(function*(m,N){yield o.core.relayer.unsubscribe(m),yield Promise.all([o.pairings.delete(m,Eo("USER_DISCONNECTED")),o.core.crypto.deleteSymKey(m),N?Promise.resolve():o.core.expirer.del(m)])});return function(m,N){return l.apply(this,arguments)}}(),this.cleanup=(0,Le.Z)(function*(){const l=o.pairings.getAll().filter(m=>kf(m.expiry));yield Promise.all(l.map(m=>o.deletePairing(m.topic)))}),this.onRelayEventRequest=l=>{const{topic:m,payload:N}=l;switch(N.method){case"wc_pairingPing":return this.onPairingPingRequest(m,N);case"wc_pairingDelete":return this.onPairingDeleteRequest(m,N);default:return this.onUnknownRpcMethodRequest(m,N)}},this.onRelayEventResponse=function(){var l=(0,Le.Z)(function*(m){const{topic:N,payload:J}=m,ee=(yield o.core.history.get(N,J.id)).request.method;return"wc_pairingPing"===ee?o.onPairingPingResponse(N,J):o.onUnknownRpcMethodResponse(ee)});return function(m){return l.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var l=(0,Le.Z)(function*(m,N){const{id:J}=N;try{o.isValidPing({topic:m}),yield o.sendResult(J,m,!0),o.events.emit(cm_ping,{id:J,topic:m})}catch(ee){yield o.sendError(J,m,ee),o.logger.error(ee)}});return function(m,N){return l.apply(this,arguments)}}(),this.onPairingPingResponse=(l,m)=>{const{id:N}=m;setTimeout(()=>{hl(m)?this.events.emit($i("pairing_ping",N),{}):gu(m)&&this.events.emit($i("pairing_ping",N),{error:m.error})},500)},this.onPairingDeleteRequest=function(){var l=(0,Le.Z)(function*(m,N){const{id:J}=N;try{o.isValidDisconnect({topic:m}),yield o.deletePairing(m),o.events.emit(cm_delete,{id:J,topic:m})}catch(ee){yield o.sendError(J,m,ee),o.logger.error(ee)}});return function(m,N){return l.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var l=(0,Le.Z)(function*(m,N){const{id:J,method:ee}=N;try{if(o.registeredMethods.includes(ee))return;const oe=Eo("WC_METHOD_UNSUPPORTED",ee);yield o.sendError(J,m,oe),o.logger.error(oe)}catch(oe){yield o.sendError(J,m,oe),o.logger.error(oe)}});return function(m,N){return l.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=l=>{this.registeredMethods.includes(l)||this.logger.error(Eo("WC_METHOD_UNSUPPORTED",l))},this.isValidPair=l=>{if(!Us(l)){const{message:m}=_n("MISSING_OR_INVALID",`pair() params: ${l}`);throw new Error(m)}if(!function bW(t){if(So(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}(l.uri)){const{message:m}=_n("MISSING_OR_INVALID",`pair() uri: ${l.uri}`);throw new Error(m)}},this.isValidPing=function(){var l=(0,Le.Z)(function*(m){if(!Us(m)){const{message:J}=_n("MISSING_OR_INVALID",`ping() params: ${m}`);throw new Error(J)}const{topic:N}=m;yield o.isValidPairingTopic(N)});return function(m){return l.apply(this,arguments)}}(),this.isValidDisconnect=function(){var l=(0,Le.Z)(function*(m){if(!Us(m)){const{message:J}=_n("MISSING_OR_INVALID",`disconnect() params: ${m}`);throw new Error(J)}const{topic:N}=m;yield o.isValidPairingTopic(N)});return function(m){return l.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var l=(0,Le.Z)(function*(m){if(!So(m,!1)){const{message:N}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${m}`);throw new Error(N)}if(!o.pairings.keys.includes(m)){const{message:N}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${m}`);throw new Error(N)}if(kf(o.pairings.get(m).expiry)){yield o.deletePairing(m);const{message:N}=_n("EXPIRED",`pairing topic: ${m}`);throw new Error(N)}});return function(m){return l.apply(this,arguments)}}(),this.core=e,this.logger=(0,zr.generateChildLogger)(n,this.name),this.pairings=new Ab(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,zr.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(os_message,function(){var n=(0,Le.Z)(function*(o){const{topic:l,message:m}=o;if(!e.pairings.keys.includes(l)||e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(m)))return;const N=yield e.core.crypto.decode(l,m);try{d3(N)?(e.core.history.set(l,N),e.onRelayEventRequest({topic:l,payload:N})):bb(N)&&(yield e.core.history.resolve(N),yield e.onRelayEventResponse({topic:l,payload:N}),e.core.history.delete(l,N.id))}catch(J){e.logger.error(J)}});return function(o){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(Fa_expired,function(){var n=(0,Le.Z)(function*(o){const{topic:l}=GC(o.target);l&&e.pairings.keys.includes(l)&&(yield e.deletePairing(l,!0),e.events.emit(cm_expire,{topic:l}))});return function(o){return n.apply(this,arguments)}}())}}class PY extends YK{constructor(e,n){var o;super(e,n),o=this,this.core=e,this.logger=n,this.records=new Map,this.events=new uu.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lf,this.init=(0,Le.Z)(function*(){o.initialized||(o.logger.trace("Initialized"),yield o.restore(),o.cached.forEach(l=>o.records.set(l.id,l)),o.cached=[],o.registerEventListeners(),o.initialized=!0)}),this.set=(l,m,N)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:l,request:m,chainId:N}),this.records.has(m.id))return;const J={id:m.id,topic:l,request:{method:m.method,params:m.params||null},chainId:N,expiry:pu(Vn.THIRTY_DAYS)};this.records.set(J.id,J),this.events.emit(uc_created,J)},this.resolve=function(){var l=(0,Le.Z)(function*(m){if(o.isInitialized(),o.logger.debug("Updating JSON-RPC response history record"),o.logger.trace({type:"method",method:"update",response:m}),!o.records.has(m.id))return;const N=yield o.getRecord(m.id);typeof N.response>"u"&&(N.response=gu(m)?{error:m.error}:{result:m.result},o.records.set(N.id,N),o.events.emit(uc_updated,N))});return function(m){return l.apply(this,arguments)}}(),this.get=function(){var l=(0,Le.Z)(function*(m,N){return o.isInitialized(),o.logger.debug("Getting record"),o.logger.trace({type:"method",method:"get",topic:m,id:N}),yield o.getRecord(N)});return function(m,N){return l.apply(this,arguments)}}(),this.delete=(l,m)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:m}),this.values.forEach(N=>{if(N.topic===l){if(typeof m<"u"&&N.id!==m)return;this.records.delete(N.id),this.events.emit(uc_deleted,N)}})},this.exists=function(){var l=(0,Le.Z)(function*(m,N){return o.isInitialized(),!!o.records.has(N)&&(yield o.getRecord(N)).topic===m});return function(m,N){return l.apply(this,arguments)}}(),this.on=(l,m)=>{this.events.on(l,m)},this.once=(l,m)=>{this.events.once(l,m)},this.off=(l,m)=>{this.events.off(l,m)},this.removeListener=(l,m)=>{this.events.removeListener(l,m)},this.logger=(0,zr.generateChildLogger)(n,this.name)}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(n=>{if(typeof n.response<"u")return;const o={topic:n.topic,request:Tp(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(o)}),e}setJsonRpcRecords(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getJsonRpcRecords(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const n=this.records.get(e);if(!n){const{message:o}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(o)}return n}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(uc_sync)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getJsonRpcRecords();if(typeof n>"u"||!n.length)return;if(e.records.size){const{message:o}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(o),new Error(o)}e.cached=n,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(n){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(n)}})()}registerEventListeners(){this.events.on(uc_created,e=>{const n=uc_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(uc_updated,e=>{const n=uc_updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(uc_deleted,e=>{const n=uc_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.core.heartbeat.on(Xy.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,Vn.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class RY extends eV{constructor(e,n){var o;super(e,n),o=this,this.core=e,this.logger=n,this.expirations=new Map,this.events=new uu.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lf,this.init=(0,Le.Z)(function*(){o.initialized||(o.logger.trace("Initialized"),yield o.restore(),o.cached.forEach(l=>o.expirations.set(l.target,l)),o.cached=[],o.registerEventListeners(),o.initialized=!0)}),this.has=l=>{try{const m=this.formatTarget(l);return typeof this.getExpiration(m)<"u"}catch{return!1}},this.set=(l,m)=>{this.isInitialized();const N=this.formatTarget(l),J={target:N,expiry:m};this.expirations.set(N,J),this.checkExpiry(N,J),this.events.emit(Fa_created,{target:N,expiration:J})},this.get=l=>{this.isInitialized();const m=this.formatTarget(l);return this.getExpiration(m)},this.del=l=>{if(this.isInitialized(),this.has(l)){const m=this.formatTarget(l),N=this.getExpiration(m);this.expirations.delete(m),this.events.emit(Fa_deleted,{target:m,expiration:N})}},this.on=(l,m)=>{this.events.on(l,m)},this.once=(l,m)=>{this.events.once(l,m)},this.off=(l,m)=>{this.events.off(l,m)},this.removeListener=(l,m)=>{this.events.removeListener(l,m)},this.logger=(0,zr.generateChildLogger)(n,this.name)}get context(){return(0,zr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function zz(t){return WC("topic",t)}(e);if("number"==typeof e)return function Wz(t){return WC("id",t)}(e);const{message:n}=_n("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(n)}setExpirations(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getExpirations(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setExpirations(e.values),e.events.emit(Fa_sync)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getExpirations();if(typeof n>"u"||!n.length)return;if(e.expirations.size){const{message:o}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(o),new Error(o)}e.cached=n,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(n){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(n)}})()}getExpiration(e){const n=this.expirations.get(e);if(!n){const{message:o}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(o),new Error(o)}return n}checkExpiry(e,n){const{expiry:o}=n;(0,Vn.toMiliseconds)(o)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(Fa_expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(Xy.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Fa_created,e=>{const n=Fa_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Fa_expired,e=>{const n=Fa_expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Fa_deleted,e=>{const n=Fa_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class kY extends tV{constructor(e,n){var o;super(e,n),o=this,this.projectId=e,this.logger=n,this.name=m3,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var l=(0,Le.Z)(function*(m){if(o.verifyDisabled||nm()||!rm())return;const N=o.getVerifyUrl(m?.verifyUrl);o.verifyUrl!==N&&o.removeIframe(),o.verifyUrl=N;try{yield o.createIframe()}catch(J){o.logger.info(`Verify iframe failed to load: ${o.verifyUrl}`),o.logger.info(J)}if(!o.initialized){o.removeIframe(),o.verifyUrl=v3;try{yield o.createIframe()}catch(J){o.logger.info(`Verify iframe failed to load: ${o.verifyUrl}`),o.logger.info(J),o.verifyDisabled=!0}}});return function(m){return l.apply(this,arguments)}}(),this.register=function(){var l=(0,Le.Z)(function*(m){o.initialized?o.sendPost(m.attestationId):(o.addToQueue(m.attestationId),yield o.init())});return function(m){return l.apply(this,arguments)}}(),this.resolve=function(){var l=(0,Le.Z)(function*(m){if(o.isDevEnv)return"";const N=o.getVerifyUrl(m?.verifyUrl);let J;try{J=yield o.fetchAttestation(m.attestationId,N)}catch(ee){o.logger.info(`failed to resolve attestation: ${m.attestationId} from url: ${N}`),o.logger.info(ee),J=yield o.fetchAttestation(m.attestationId,v3)}return J});return function(m){return l.apply(this,arguments)}}(),this.fetchAttestation=function(){var l=(0,Le.Z)(function*(m,N){o.logger.info(`resolving attestation: ${m} from url: ${N}`);const J=o.startAbortTimer(2*Vn.ONE_SECOND),ee=yield fetch(`${N}/attestation/${m}`,{signal:o.abortController.signal});return clearTimeout(J),200===ee.status?yield ee.json():void 0});return function(m,N){return l.apply(this,arguments)}}(),this.addToQueue=l=>{this.queue.push(l)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(l=>this.sendPost(l)),this.queue=[])},this.sendPost=l=>{var m;try{if(!this.iframe)return;null==(m=this.iframe.contentWindow)||m.postMessage(l,"*"),this.logger.info(`postMessage sent: ${l} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,Le.Z)(function*(){let l;const m=N=>{"verify_ready"===N.data&&(o.initialized=!0,o.processQueue(),window.removeEventListener("message",m),l())};yield Promise.race([new Promise(N=>{if(document.getElementById(m3))return N();window.addEventListener("message",m);const J=document.createElement("iframe");J.id=m3,J.src=`${o.verifyUrl}/${o.projectId}`,J.style.display="none",document.body.append(J),o.iframe=J,l=N}),new Promise((N,J)=>setTimeout(()=>{window.removeEventListener("message",m),J("verify iframe load timeout")},(0,Vn.toMiliseconds)(Vn.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=l=>{let m=l||Op;return dY.includes(m)||(this.logger.info(`verify url: ${m}, not included in trusted list, assigning default: ${Op}`),m=Op),m},this.logger=(0,zr.generateChildLogger)(n,this.name),this.verifyUrl=Op,this.abortController=new AbortController,this.isDevEnv=t3()&&process.env.IS_VITEST}get context(){return(0,zr.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,Vn.toMiliseconds)(e))}}var LY=Object.defineProperty,Wx=Object.getOwnPropertySymbols,FY=Object.prototype.hasOwnProperty,BY=Object.prototype.propertyIsEnumerable,Gx=(t,e,n)=>e in t?LY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zx=(t,e)=>{for(var n in e||(e={}))FY.call(e,n)&&Gx(t,n,e[n]);if(Wx)for(var n of Wx(e))BY.call(e,n)&&Gx(t,n,e[n]);return t};class w3 extends ZK{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=y3,this.events=new uu.EventEmitter,this.initialized=!1,this.on=(o,l)=>this.events.on(o,l),this.once=(o,l)=>this.events.once(o,l),this.off=(o,l)=>this.events.off(o,l),this.removeListener=(o,l)=>this.events.removeListener(o,l),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Lx,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,zr.pino)((0,zr.getDefaultLoggerOptions)({level:e?.logger||jZ_logger}));this.logger=(0,zr.generateChildLogger)(n,this.name),this.heartbeat=new Xy.HeartBeat,this.crypto=new pY(this,this.logger,e?.keychain),this.history=new PY(this,this.logger),this.expirer=new RY(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new GK.ZP(Zx(Zx({},UZ),e?.storageOptions)),this.relayer=new xY({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new NY(this,this.logger),this.verify=new kY(this.projectId||"",this.logger)}static init(e){return(0,Le.Z)(function*(){const n=new w3(e);yield n.initialize();const o=yield n.crypto.getClientId();return yield n.storage.setItem("WALLETCONNECT_CLIENT_ID",o),n})()}get context(){return(0,zr.getLoggerContext)(this.logger)}start(){var e=this;return(0,Le.Z)(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(n){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,n),e.logger.error(n.message),n}})()}}const jY=w3,A3="wc@2:client:",E3_name="client",E3_logger="error",qx="WALLETCONNECT_DEEPLINK_CHOICE",Eb=Vn.SEVEN_DAYS,fm={wc_sessionPropose:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1115}}},S3={min:Vn.FIVE_MINUTES,max:Vn.SEVEN_DAYS},gl_idle="IDLE",gl_active="ACTIVE",WY=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var GY=Object.defineProperty,ZY=Object.defineProperties,YY=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertySymbols,JY=Object.prototype.hasOwnProperty,QY=Object.prototype.propertyIsEnumerable,$x=(t,e,n)=>e in t?GY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ks=(t,e)=>{for(var n in e||(e={}))JY.call(e,n)&&$x(t,n,e[n]);if(Xx)for(var n of Xx(e))QY.call(e,n)&&$x(t,n,e[n]);return t},dm=(t,e)=>ZY(t,YY(e));class qY extends rV{constructor(e){var n;super(e),n=this,this.name="engine",this.events=new(S2()),this.initialized=!1,this.ignoredPayloadTypes=[vh],this.requestQueue={state:gl_idle,queue:[]},this.sessionRequestQueue={state:gl_idle,queue:[]},this.requestQueueDelay=Vn.ONE_SECOND,this.init=(0,Le.Z)(function*(){n.initialized||(yield n.cleanup(),n.registerRelayerEvents(),n.registerExpirerEvents(),n.registerPairingEvents(),n.client.core.pairing.register({methods:Object.keys(fm)}),n.initialized=!0,setTimeout(()=>{n.sessionRequestQueue.queue=n.getPendingSessionRequests(),n.processSessionRequestQueue()},(0,Vn.toMiliseconds)(n.requestQueueDelay)))}),this.connect=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized();const m=dm(Ks({},l),{requiredNamespaces:l.requiredNamespaces||{},optionalNamespaces:l.optionalNamespaces||{}});yield n.isValidConnect(m);const{pairingTopic:N,requiredNamespaces:J,optionalNamespaces:ee,sessionProperties:oe,relays:ue}=m;let Ie,ge=N,Re=!1;if(ge&&(Re=n.client.core.pairing.pairings.get(ge).active),!ge||!Re){const{topic:kt,uri:un}=yield n.client.core.pairing.create();ge=kt,Ie=un}const Te=yield n.client.core.crypto.generateKeyPair(),ke=Ks({requiredNamespaces:J,optionalNamespaces:ee,relays:ue??[{protocol:"irn"}],proposer:{publicKey:Te,metadata:n.client.metadata}},oe&&{sessionProperties:oe}),{reject:Ue,resolve:Ge,done:nt}=Cp(Vn.FIVE_MINUTES,"Proposal expired");if(n.events.once($i("session_connect"),function(){var kt=(0,Le.Z)(function*({error:un,session:Nn}){if(un)Ue(un);else if(Nn){Nn.self.publicKey=Te;const vn=dm(Ks({},Nn),{requiredNamespaces:Nn.requiredNamespaces,optionalNamespaces:Nn.optionalNamespaces});yield n.client.session.set(Nn.topic,vn),yield n.setExpiry(Nn.topic,Nn.expiry),ge&&(yield n.client.core.pairing.updateMetadata({topic:ge,metadata:Nn.peer.metadata})),Ge(vn)}});return function(un){return kt.apply(this,arguments)}}()),!ge){const{message:kt}=_n("NO_MATCHING_KEY",`connect() pairing topic: ${ge}`);throw new Error(kt)}const Xe=yield n.sendRequest({topic:ge,method:"wc_sessionPropose",params:ke}),St=pu(Vn.FIVE_MINUTES);return yield n.setProposal(Xe,Ks({id:Xe,expiry:St},ke)),{uri:Ie,approval:nt}});return function(l){return o.apply(this,arguments)}}(),this.pair=function(){var o=(0,Le.Z)(function*(l){return yield n.isInitialized(),yield n.client.core.pairing.pair(l)});return function(l){return o.apply(this,arguments)}}(),this.approve=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidApprove(l);const{id:m,relayProtocol:N,namespaces:J,sessionProperties:ee}=l,oe=n.client.proposal.get(m);let{pairingTopic:ue,proposer:ge,requiredNamespaces:Ie,optionalNamespaces:Re}=oe;ue=ue||"",Dp(Ie)||(Ie=function hW(t,e){const n=mb(t,e);if(n)throw new Error(n.message);const o={};for(const[l,m]of Object.entries(t))o[l]={methods:m.methods,events:m.events,chains:m.accounts.map(N=>`${N.split(":")[0]}:${N.split(":")[1]}`)};return o}(J,"approve()"));const Te=yield n.client.core.crypto.generateKeyPair(),ke=ge.publicKey,Ue=yield n.client.core.crypto.generateSharedKey(Te,ke);ue&&m&&(yield n.client.core.pairing.updateMetadata({topic:ue,metadata:ge.metadata}),yield n.sendResult({id:m,topic:ue,result:{relay:{protocol:N??"irn"},responderPublicKey:Te}}),yield n.client.proposal.delete(m,Eo("USER_DISCONNECTED")),yield n.client.core.pairing.activate({topic:ue}));const Ge=Ks({relay:{protocol:N??"irn"},namespaces:J,requiredNamespaces:Ie,optionalNamespaces:Re,pairingTopic:ue,controller:{publicKey:Te,metadata:n.client.metadata},expiry:pu(Eb)},ee&&{sessionProperties:ee});yield n.client.core.relayer.subscribe(Ue),yield n.sendRequest({topic:Ue,method:"wc_sessionSettle",params:Ge,throwOnFailedPublish:!0});const nt=dm(Ks({},Ge),{topic:Ue,pairingTopic:ue,acknowledged:!1,self:Ge.controller,peer:{publicKey:ge.publicKey,metadata:ge.metadata},controller:Te});return yield n.client.session.set(Ue,nt),yield n.setExpiry(Ue,pu(Eb)),{topic:Ue,acknowledged:()=>new Promise(Xe=>setTimeout(()=>Xe(n.client.session.get(Ue)),500))}});return function(l){return o.apply(this,arguments)}}(),this.reject=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidReject(l);const{id:m,reason:N}=l,{pairingTopic:J}=n.client.proposal.get(m);J&&(yield n.sendError(m,J,N),yield n.client.proposal.delete(m,Eo("USER_DISCONNECTED")))});return function(l){return o.apply(this,arguments)}}(),this.update=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidUpdate(l);const{topic:m,namespaces:N}=l,J=yield n.sendRequest({topic:m,method:"wc_sessionUpdate",params:{namespaces:N}}),{done:ee,resolve:oe,reject:ue}=Cp();return n.events.once($i("session_update",J),({error:ge})=>{ge?ue(ge):oe()}),yield n.client.session.update(m,{namespaces:N}),{acknowledged:ee}});return function(l){return o.apply(this,arguments)}}(),this.extend=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidExtend(l);const{topic:m}=l,N=yield n.sendRequest({topic:m,method:"wc_sessionExtend",params:{}}),{done:J,resolve:ee,reject:oe}=Cp();return n.events.once($i("session_extend",N),({error:ue})=>{ue?oe(ue):ee()}),yield n.setExpiry(m,pu(Eb)),{acknowledged:J}});return function(l){return o.apply(this,arguments)}}(),this.request=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidRequest(l);const{chainId:m,request:N,topic:J,expiry:ee}=l,oe=c3(),{done:ue,resolve:ge,reject:Ie}=Cp(ee,"Request expired. Please try again.");return n.events.once($i("session_request",oe),({error:Re,result:Te})=>{Re?Ie(Re):ge(Te)}),yield Promise.all([new Promise(function(){var Re=(0,Le.Z)(function*(Te){yield n.sendRequest({clientRpcId:oe,topic:J,method:"wc_sessionRequest",params:{request:N,chainId:m},expiry:ee,throwOnFailedPublish:!0}).catch(ke=>Ie(ke)),n.client.events.emit("session_request_sent",{topic:J,request:N,chainId:m,id:oe}),Te()});return function(Te){return Re.apply(this,arguments)}}()),new Promise(function(){var Re=(0,Le.Z)(function*(Te){const ke=yield n.client.core.storage.getItem(qx);(function Gz(t){return n3.apply(this,arguments)})({id:oe,topic:J,wcDeepLink:ke}),Te()});return function(Te){return Re.apply(this,arguments)}}()),ue()]).then(Re=>Re[2])});return function(l){return o.apply(this,arguments)}}(),this.respond=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidRespond(l);const{topic:m,response:N}=l,{id:J}=N;hl(N)?yield n.sendResult({id:J,topic:m,result:N.result,throwOnFailedPublish:!0}):gu(N)&&(yield n.sendError(J,m,N.error)),n.cleanupAfterResponse(l)});return function(l){return o.apply(this,arguments)}}(),this.ping=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidPing(l);const{topic:m}=l;if(n.client.session.keys.includes(m)){const N=yield n.sendRequest({topic:m,method:"wc_sessionPing",params:{}}),{done:J,resolve:ee,reject:oe}=Cp();n.events.once($i("session_ping",N),({error:ue})=>{ue?oe(ue):ee()}),yield J()}else n.client.core.pairing.pairings.keys.includes(m)&&(yield n.client.core.pairing.ping({topic:m}))});return function(l){return o.apply(this,arguments)}}(),this.emit=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidEmit(l);const{topic:m,event:N,chainId:J}=l;yield n.sendRequest({topic:m,method:"wc_sessionEvent",params:{event:N,chainId:J}})});return function(l){return o.apply(this,arguments)}}(),this.disconnect=function(){var o=(0,Le.Z)(function*(l){yield n.isInitialized(),yield n.isValidDisconnect(l);const{topic:m}=l;n.client.session.keys.includes(m)?(yield n.sendRequest({topic:m,method:"wc_sessionDelete",params:Eo("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield n.deleteSession(m)):yield n.client.core.pairing.disconnect({topic:m})});return function(l){return o.apply(this,arguments)}}(),this.find=o=>(this.isInitialized(),this.client.session.getAll().filter(l=>function mW(t,e){const{requiredNamespaces:n}=e,o=Object.keys(t.namespaces),l=Object.keys(n);let m=!0;return!!bh(l,o)&&(o.forEach(N=>{const{accounts:J,methods:ee,events:oe}=t.namespaces[N],ue=xp(J),ge=n[N];bh(ZE(N,ge),ue)&&bh(ge.methods,ee)&&bh(ge.events,oe)||(m=!1)}),m)}(l,o))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var o=(0,Le.Z)(function*(l){if(l.pairingTopic)try{const m=n.client.core.pairing.pairings.get(l.pairingTopic),N=n.client.core.pairing.pairings.getAll().filter(J=>{var ee,oe;return(null==(ee=J.peerMetadata)?void 0:ee.url)&&(null==(oe=J.peerMetadata)?void 0:oe.url)===l.peer.metadata.url&&J.topic&&J.topic!==m.topic});if(0===N.length)return;n.client.logger.info(`Cleaning up ${N.length} duplicate pairing(s)`),yield Promise.all(N.map(J=>n.client.core.pairing.disconnect({topic:J.topic}))),n.client.logger.info("Duplicate pairings clean up finished")}catch(m){n.client.logger.error(m)}});return function(l){return o.apply(this,arguments)}}(),this.deleteSession=function(){var o=(0,Le.Z)(function*(l,m){const{self:N}=n.client.session.get(l);yield n.client.core.relayer.unsubscribe(l),n.client.session.delete(l,Eo("USER_DISCONNECTED")),n.client.core.crypto.keychain.has(N.publicKey)&&(yield n.client.core.crypto.deleteKeyPair(N.publicKey)),n.client.core.crypto.keychain.has(l)&&(yield n.client.core.crypto.deleteSymKey(l)),m||n.client.core.expirer.del(l),n.client.core.storage.removeItem(qx).catch(J=>n.client.logger.warn(J))});return function(l,m){return o.apply(this,arguments)}}(),this.deleteProposal=function(){var o=(0,Le.Z)(function*(l,m){yield Promise.all([n.client.proposal.delete(l,Eo("USER_DISCONNECTED")),m?Promise.resolve():n.client.core.expirer.del(l)])});return function(l,m){return o.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var o=(0,Le.Z)(function*(l,m,N=!1){yield Promise.all([n.client.pendingRequest.delete(l,m),N?Promise.resolve():n.client.core.expirer.del(l)]),n.sessionRequestQueue.queue=n.sessionRequestQueue.queue.filter(J=>J.id!==l),N&&(n.sessionRequestQueue.state=gl_idle)});return function(l,m){return o.apply(this,arguments)}}(),this.setExpiry=function(){var o=(0,Le.Z)(function*(l,m){n.client.session.keys.includes(l)&&(yield n.client.session.update(l,{expiry:m})),n.client.core.expirer.set(l,m)});return function(l,m){return o.apply(this,arguments)}}(),this.setProposal=function(){var o=(0,Le.Z)(function*(l,m){yield n.client.proposal.set(l,m),n.client.core.expirer.set(l,m.expiry)});return function(l,m){return o.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var o=(0,Le.Z)(function*(l){const m=fm.wc_sessionRequest.req.ttl,{id:N,topic:J,params:ee,verifyContext:oe}=l;yield n.client.pendingRequest.set(N,{id:N,topic:J,params:ee,verifyContext:oe}),m&&n.client.core.expirer.set(N,pu(m))});return function(l){return o.apply(this,arguments)}}(),this.sendRequest=function(){var o=(0,Le.Z)(function*(l){const{topic:m,method:N,params:J,expiry:ee,relayRpcId:oe,clientRpcId:ue,throwOnFailedPublish:ge}=l,Ie=Tp(N,J,ue);if(rm()&&WY.includes(N)){const ke=Mp(JSON.stringify(Ie));n.client.core.verify.register({attestationId:ke})}const Re=yield n.client.core.crypto.encode(m,Ie),Te=fm[N].req;return ee&&(Te.ttl=ee),oe&&(Te.id=oe),n.client.core.history.set(m,Ie),ge?(Te.internal=dm(Ks({},Te.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(m,Re,Te)):n.client.core.relayer.publish(m,Re,Te).catch(ke=>n.client.logger.error(ke)),Ie.id});return function(l){return o.apply(this,arguments)}}(),this.sendResult=function(){var o=(0,Le.Z)(function*(l){const{id:m,topic:N,result:J,throwOnFailedPublish:ee}=l,oe=l3(m,J),ue=yield n.client.core.crypto.encode(N,oe),ge=yield n.client.core.history.get(N,m),Ie=fm[ge.request.method].res;ee?(Ie.internal=dm(Ks({},Ie.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(N,ue,Ie)):n.client.core.relayer.publish(N,ue,Ie).catch(Re=>n.client.logger.error(Re)),yield n.client.core.history.resolve(oe)});return function(l){return o.apply(this,arguments)}}(),this.sendError=function(){var o=(0,Le.Z)(function*(l,m,N){const J=f3(l,N),ee=yield n.client.core.crypto.encode(m,J),oe=yield n.client.core.history.get(m,l),ue=fm[oe.request.method].res;n.client.core.relayer.publish(m,ee,ue),yield n.client.core.history.resolve(J)});return function(l,m,N){return o.apply(this,arguments)}}(),this.cleanup=(0,Le.Z)(function*(){const o=[],l=[];n.client.session.getAll().forEach(m=>{kf(m.expiry)&&o.push(m.topic)}),n.client.proposal.getAll().forEach(m=>{kf(m.expiry)&&l.push(m.id)}),yield Promise.all([...o.map(m=>n.deleteSession(m)),...l.map(m=>n.deleteProposal(m))])}),this.onRelayEventRequest=function(){var o=(0,Le.Z)(function*(l){n.requestQueue.queue.push(l),yield n.processRequestsQueue()});return function(l){return o.apply(this,arguments)}}(),this.processRequestsQueue=(0,Le.Z)(function*(){if(n.requestQueue.state!==gl_active){for(n.client.logger.info(`Request queue starting with ${n.requestQueue.queue.length} requests`);n.requestQueue.queue.length>0;){n.requestQueue.state=gl_active;const o=n.requestQueue.queue.shift();if(o)try{n.processRequest(o),yield new Promise(l=>setTimeout(l,300))}catch(l){n.client.logger.warn(l)}}n.requestQueue.state=gl_idle}else n.client.logger.info("Request queue already active, skipping...")}),this.processRequest=o=>{const{topic:l,payload:m}=o,N=m.method;switch(N){case"wc_sessionPropose":return this.onSessionProposeRequest(l,m);case"wc_sessionSettle":return this.onSessionSettleRequest(l,m);case"wc_sessionUpdate":return this.onSessionUpdateRequest(l,m);case"wc_sessionExtend":return this.onSessionExtendRequest(l,m);case"wc_sessionPing":return this.onSessionPingRequest(l,m);case"wc_sessionDelete":return this.onSessionDeleteRequest(l,m);case"wc_sessionRequest":return this.onSessionRequest(l,m);case"wc_sessionEvent":return this.onSessionEventRequest(l,m);default:return this.client.logger.info(`Unsupported request method ${N}`)}},this.onRelayEventResponse=function(){var o=(0,Le.Z)(function*(l){const{topic:m,payload:N}=l,J=(yield n.client.core.history.get(m,N.id)).request.method;switch(J){case"wc_sessionPropose":return n.onSessionProposeResponse(m,N);case"wc_sessionSettle":return n.onSessionSettleResponse(m,N);case"wc_sessionUpdate":return n.onSessionUpdateResponse(m,N);case"wc_sessionExtend":return n.onSessionExtendResponse(m,N);case"wc_sessionPing":return n.onSessionPingResponse(m,N);case"wc_sessionRequest":return n.onSessionRequestResponse(m,N);default:return n.client.logger.info(`Unsupported response method ${J}`)}});return function(l){return o.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=o=>{const{topic:l}=o,{message:m}=_n("MISSING_OR_INVALID",`Decoded payload on topic ${l} is not identifiable as a JSON-RPC request or a response.`);throw new Error(m)},this.onSessionProposeRequest=function(){var o=(0,Le.Z)(function*(l,m){const{params:N,id:J}=m;try{n.isValidConnect(Ks({},m.params));const ee=pu(Vn.FIVE_MINUTES),oe=Ks({id:J,pairingTopic:l,expiry:ee},N);yield n.setProposal(J,oe);const ue=Mp(JSON.stringify(m)),ge=yield n.getVerifyContext(ue,oe.proposer.metadata);n.client.events.emit("session_proposal",{id:J,params:oe,verifyContext:ge})}catch(ee){yield n.sendError(J,l,ee),n.client.logger.error(ee)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var o=(0,Le.Z)(function*(l,m){const{id:N}=m;if(hl(m)){const{result:J}=m;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:J});const ee=n.client.proposal.get(N);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:ee});const oe=ee.proposer.publicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:oe});const ue=J.responderPublicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:ue});const ge=yield n.client.core.crypto.generateSharedKey(oe,ue);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:ge});const Ie=yield n.client.core.relayer.subscribe(ge);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:Ie}),yield n.client.core.pairing.activate({topic:l})}else gu(m)&&(yield n.client.proposal.delete(N,Eo("USER_DISCONNECTED")),n.events.emit($i("session_connect"),{error:m.error}))});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N,params:J}=m;try{n.isValidSessionSettleRequest(J);const{relay:ee,controller:oe,expiry:ue,namespaces:ge,requiredNamespaces:Ie,optionalNamespaces:Re,sessionProperties:Te,pairingTopic:ke}=m.params,Ue=Ks({topic:l,relay:ee,expiry:ue,namespaces:ge,acknowledged:!0,pairingTopic:ke,requiredNamespaces:Ie,optionalNamespaces:Re,controller:oe.publicKey,self:{publicKey:"",metadata:n.client.metadata},peer:{publicKey:oe.publicKey,metadata:oe.metadata}},Te&&{sessionProperties:Te});yield n.sendResult({id:m.id,topic:l,result:!0}),n.events.emit($i("session_connect"),{session:Ue}),n.cleanupDuplicatePairings(Ue)}catch(ee){yield n.sendError(N,l,ee),n.client.logger.error(ee)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var o=(0,Le.Z)(function*(l,m){const{id:N}=m;hl(m)?(yield n.client.session.update(l,{acknowledged:!0}),n.events.emit($i("session_approve",N),{})):gu(m)&&(yield n.client.session.delete(l,Eo("USER_DISCONNECTED")),n.events.emit($i("session_approve",N),{error:m.error}))});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var o=(0,Le.Z)(function*(l,m){const{params:N,id:J}=m;try{const ee=`${l}_session_update`,oe=vb.get(ee);if(oe&&n.isRequestOutOfSync(oe,J))return void n.client.logger.info(`Discarding out of sync request - ${J}`);n.isValidUpdate(Ks({topic:l},N)),yield n.client.session.update(l,{namespaces:N.namespaces}),yield n.sendResult({id:J,topic:l,result:!0}),n.client.events.emit("session_update",{id:J,topic:l,params:N}),vb.set(ee,J)}catch(ee){yield n.sendError(J,l,ee),n.client.logger.error(ee)}});return function(l,m){return o.apply(this,arguments)}}(),this.isRequestOutOfSync=(o,l)=>parseInt(l.toString().slice(0,-3))<=parseInt(o.toString().slice(0,-3)),this.onSessionUpdateResponse=(o,l)=>{const{id:m}=l;hl(l)?this.events.emit($i("session_update",m),{}):gu(l)&&this.events.emit($i("session_update",m),{error:l.error})},this.onSessionExtendRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N}=m;try{n.isValidExtend({topic:l}),yield n.setExpiry(l,pu(Eb)),yield n.sendResult({id:N,topic:l,result:!0}),n.client.events.emit("session_extend",{id:N,topic:l})}catch(J){yield n.sendError(N,l,J),n.client.logger.error(J)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionExtendResponse=(o,l)=>{const{id:m}=l;hl(l)?this.events.emit($i("session_extend",m),{}):gu(l)&&this.events.emit($i("session_extend",m),{error:l.error})},this.onSessionPingRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N}=m;try{n.isValidPing({topic:l}),yield n.sendResult({id:N,topic:l,result:!0}),n.client.events.emit("session_ping",{id:N,topic:l})}catch(J){yield n.sendError(N,l,J),n.client.logger.error(J)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionPingResponse=(o,l)=>{const{id:m}=l;setTimeout(()=>{hl(l)?this.events.emit($i("session_ping",m),{}):gu(l)&&this.events.emit($i("session_ping",m),{error:l.error})},500)},this.onSessionDeleteRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N}=m;try{n.isValidDisconnect({topic:l,reason:m.params}),yield Promise.all([new Promise(J=>{n.client.core.relayer.once(os_publish,(0,Le.Z)(function*(){J(yield n.deleteSession(l))}))}),n.sendResult({id:N,topic:l,result:!0})]),n.client.events.emit("session_delete",{id:N,topic:l})}catch(J){n.client.logger.error(J)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N,params:J}=m;try{n.isValidRequest(Ks({topic:l},J));const ee=Mp(JSON.stringify(Tp("wc_sessionRequest",J,N))),oe=n.client.session.get(l),ge={id:N,topic:l,params:J,verifyContext:yield n.getVerifyContext(ee,oe.peer.metadata)};yield n.setPendingSessionRequest(ge),n.addSessionRequestToSessionRequestQueue(ge),n.processSessionRequestQueue()}catch(ee){yield n.sendError(N,l,ee),n.client.logger.error(ee)}});return function(l,m){return o.apply(this,arguments)}}(),this.onSessionRequestResponse=(o,l)=>{const{id:m}=l;hl(l)?this.events.emit($i("session_request",m),{result:l.result}):gu(l)&&this.events.emit($i("session_request",m),{error:l.error})},this.onSessionEventRequest=function(){var o=(0,Le.Z)(function*(l,m){const{id:N,params:J}=m;try{const ee=`${l}_session_event_${J.event.name}`,oe=vb.get(ee);if(oe&&n.isRequestOutOfSync(oe,N))return void n.client.logger.info(`Discarding out of sync request - ${N}`);n.isValidEmit(Ks({topic:l},J)),n.client.events.emit("session_event",{id:N,topic:l,params:J}),vb.set(ee,N)}catch(ee){yield n.sendError(N,l,ee),n.client.logger.error(ee)}});return function(l,m){return o.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=o=>{this.sessionRequestQueue.queue.push(o)},this.cleanupAfterResponse=o=>{this.deletePendingSessionRequest(o.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=gl_idle,this.processSessionRequestQueue()},(0,Vn.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===gl_active)return void this.client.logger.info("session request queue is already active.");const o=this.sessionRequestQueue.queue[0];if(o)try{this.sessionRequestQueue.state=gl_active,this.client.events.emit("session_request",o)}catch(l){this.client.logger.error(l)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=o=>{if(o.active)return;const l=this.client.proposal.getAll().find(m=>m.pairingTopic===o.topic);l&&this.onSessionProposeRequest(o.topic,Tp("wc_sessionPropose",{requiredNamespaces:l.requiredNamespaces,optionalNamespaces:l.optionalNamespaces,relays:l.relays,proposer:l.proposer},l.id))},this.isValidConnect=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(l)}`);throw new Error(ue)}const{pairingTopic:m,requiredNamespaces:N,optionalNamespaces:J,sessionProperties:ee,relays:oe}=l;if(_s(m)||(yield n.isValidPairingTopic(m)),!function DW(t,e){let n=!1;return e&&!t?n=!0:t&&om(t)&&t.length&&t.forEach(o=>{n=tx(o)}),n}(oe,!0)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() relays: ${oe}`);throw new Error(ue)}!_s(N)&&0!==Dp(N)&&n.validateNamespaces(N,"requiredNamespaces"),!_s(J)&&0!==Dp(J)&&n.validateNamespaces(J,"optionalNamespaces"),_s(ee)||n.validateSessionProps(ee,"sessionProperties")});return function(l){return o.apply(this,arguments)}}(),this.validateNamespaces=(o,l)=>{const m=function xW(t,e,n){let o=null;if(t&&Dp(t)){const l=ex(t,e);l&&(o=l);const m=_W(t,e,n);m&&(o=m)}else o=_n("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return o}(o,"connect()",l);if(m)throw new Error(m.message)},this.isValidApprove=function(){var o=(0,Le.Z)(function*(l){if(!Us(l))throw new Error(_n("MISSING_OR_INVALID",`approve() params: ${l}`).message);const{id:m,namespaces:N,relayProtocol:J,sessionProperties:ee}=l;yield n.isValidProposalId(m);const oe=n.client.proposal.get(m),ue=mb(N,"approve()");if(ue)throw new Error(ue.message);const ge=o3(oe.requiredNamespaces,N,"approve()");if(ge)throw new Error(ge.message);if(!So(J,!0)){const{message:Ie}=_n("MISSING_OR_INVALID",`approve() relayProtocol: ${J}`);throw new Error(Ie)}_s(ee)||n.validateSessionProps(ee,"sessionProperties")});return function(l){return o.apply(this,arguments)}}(),this.isValidReject=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:J}=_n("MISSING_OR_INVALID",`reject() params: ${l}`);throw new Error(J)}const{id:m,reason:N}=l;if(yield n.isValidProposalId(m),!function OW(t){return!!(t&&"object"==typeof t&&t.code&&i3(t.code,!1)&&t.message&&So(t.message,!1))}(N)){const{message:J}=_n("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(N)}`);throw new Error(J)}});return function(l){return o.apply(this,arguments)}}(),this.isValidSessionSettleRequest=o=>{if(!Us(o)){const{message:ue}=_n("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${o}`);throw new Error(ue)}const{relay:l,controller:m,namespaces:N,expiry:J}=o;if(!tx(l)){const{message:ue}=_n("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(ue)}const ee=function EW(t,e){let n=null;return So(t?.publicKey,!1)||(n=_n("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}(m,"onSessionSettleRequest()");if(ee)throw new Error(ee.message);const oe=mb(N,"onSessionSettleRequest()");if(oe)throw new Error(oe.message);if(kf(J)){const{message:ue}=_n("EXPIRED","onSessionSettleRequest()");throw new Error(ue)}},this.isValidUpdate=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:ue}=_n("MISSING_OR_INVALID",`update() params: ${l}`);throw new Error(ue)}const{topic:m,namespaces:N}=l;yield n.isValidSessionTopic(m);const J=n.client.session.get(m),ee=mb(N,"update()");if(ee)throw new Error(ee.message);const oe=o3(J.requiredNamespaces,N,"update()");if(oe)throw new Error(oe.message)});return function(l){return o.apply(this,arguments)}}(),this.isValidExtend=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:N}=_n("MISSING_OR_INVALID",`extend() params: ${l}`);throw new Error(N)}const{topic:m}=l;yield n.isValidSessionTopic(m)});return function(l){return o.apply(this,arguments)}}(),this.isValidRequest=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:ue}=_n("MISSING_OR_INVALID",`request() params: ${l}`);throw new Error(ue)}const{topic:m,request:N,chainId:J,expiry:ee}=l;yield n.isValidSessionTopic(m);const{namespaces:oe}=n.client.session.get(m);if(!nx(oe,J)){const{message:ue}=_n("MISSING_OR_INVALID",`request() chainId: ${J}`);throw new Error(ue)}if(!function NW(t){return!(_s(t)||!So(t.method,!1))}(N)){const{message:ue}=_n("MISSING_OR_INVALID",`request() ${JSON.stringify(N)}`);throw new Error(ue)}if(!kW(oe,J,N.method)){const{message:ue}=_n("MISSING_OR_INVALID",`request() method: ${N.method}`);throw new Error(ue)}if(ee&&!function jW(t,e){return i3(t,!1)&&t<=e.max&&t>=e.min}(ee,S3)){const{message:ue}=_n("MISSING_OR_INVALID",`request() expiry: ${ee}. Expiry must be a number (in seconds) between ${S3.min} and ${S3.max}`);throw new Error(ue)}});return function(l){return o.apply(this,arguments)}}(),this.isValidRespond=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:J}=_n("MISSING_OR_INVALID",`respond() params: ${l}`);throw new Error(J)}const{topic:m,response:N}=l;if(yield n.isValidSessionTopic(m),!function PW(t){return!(_s(t)||_s(t.result)&&_s(t.error)||!i3(t.id,!1)||!So(t.jsonrpc,!1))}(N)){const{message:J}=_n("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(N)}`);throw new Error(J)}});return function(l){return o.apply(this,arguments)}}(),this.isValidPing=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:N}=_n("MISSING_OR_INVALID",`ping() params: ${l}`);throw new Error(N)}const{topic:m}=l;yield n.isValidSessionOrPairingTopic(m)});return function(l){return o.apply(this,arguments)}}(),this.isValidEmit=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:oe}=_n("MISSING_OR_INVALID",`emit() params: ${l}`);throw new Error(oe)}const{topic:m,event:N,chainId:J}=l;yield n.isValidSessionTopic(m);const{namespaces:ee}=n.client.session.get(m);if(!nx(ee,J)){const{message:oe}=_n("MISSING_OR_INVALID",`emit() chainId: ${J}`);throw new Error(oe)}if(!function RW(t){return!(_s(t)||!So(t.name,!1))}(N)){const{message:oe}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(N)}`);throw new Error(oe)}if(!LW(ee,J,N.name)){const{message:oe}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(N)}`);throw new Error(oe)}});return function(l){return o.apply(this,arguments)}}(),this.isValidDisconnect=function(){var o=(0,Le.Z)(function*(l){if(!Us(l)){const{message:N}=_n("MISSING_OR_INVALID",`disconnect() params: ${l}`);throw new Error(N)}const{topic:m}=l;yield n.isValidSessionOrPairingTopic(m)});return function(l){return o.apply(this,arguments)}}(),this.getVerifyContext=function(){var o=(0,Le.Z)(function*(l,m){const N={verified:{verifyUrl:m.verifyUrl||Op,validation:"UNKNOWN",origin:m.url||""}};try{const J=yield n.client.core.verify.resolve({attestationId:l,verifyUrl:m.verifyUrl});J&&(N.verified.origin=J.origin,N.verified.isScam=J.isScam,N.verified.validation=J.origin===new URL(m.url).origin?"VALID":"INVALID")}catch(J){n.client.logger.info(J)}return n.client.logger.info(`Verify context: ${JSON.stringify(N)}`),N});return function(l,m){return o.apply(this,arguments)}}(),this.validateSessionProps=(o,l)=>{Object.values(o).forEach(m=>{if(!So(m,!1)){const{message:N}=_n("MISSING_OR_INVALID",`${l} must be in Record format. Received: ${JSON.stringify(m)}`);throw new Error(N)}})}}isInitialized(){var e=this;return(0,Le.Z)(function*(){if(!e.initialized){const{message:n}=_n("NOT_INITIALIZED",e.name);throw new Error(n)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(os_message,function(){var n=(0,Le.Z)(function*(o){const{topic:l,message:m}=o;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(m)))return;const N=yield e.client.core.crypto.decode(l,m);try{d3(N)?(e.client.core.history.set(l,N),e.onRelayEventRequest({topic:l,payload:N})):bb(N)?(yield e.client.core.history.resolve(N),yield e.onRelayEventResponse({topic:l,payload:N}),e.client.core.history.delete(l,N.id)):e.onRelayEventUnknownPayload({topic:l,payload:N})}catch(J){e.client.logger.error(J)}});return function(o){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(Fa_expired,function(){var n=(0,Le.Z)(function*(o){const{topic:l,id:m}=GC(o.target);if(m&&e.client.pendingRequest.keys.includes(m))return yield e.deletePendingSessionRequest(m,_n("EXPIRED"),!0);l?e.client.session.keys.includes(l)&&(yield e.deleteSession(l,!0),e.client.events.emit("session_expire",{topic:l})):m&&(yield e.deleteProposal(m,!0),e.client.events.emit("proposal_expire",{id:m}))});return function(o){return n.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(cm_create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!So(e,!1)){const{message:n}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(kf(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=_n("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}isValidSessionTopic(e){var n=this;return(0,Le.Z)(function*(){if(!So(e,!1)){const{message:o}=_n("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(o)}if(!n.client.session.keys.includes(e)){const{message:o}=_n("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(o)}if(kf(n.client.session.get(e).expiry)){yield n.deleteSession(e);const{message:o}=_n("EXPIRED",`session topic: ${e}`);throw new Error(o)}})()}isValidSessionOrPairingTopic(e){var n=this;return(0,Le.Z)(function*(){if(n.client.session.keys.includes(e))yield n.isValidSessionTopic(e);else{if(!n.client.core.pairing.pairings.keys.includes(e)){if(So(e,!1)){const{message:o}=_n("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(o)}{const{message:o}=_n("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(o)}}n.isValidPairingTopic(e)}})()}isValidProposalId(e){var n=this;return(0,Le.Z)(function*(){if(!function TW(t){return"number"==typeof t}(e)){const{message:o}=_n("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(o)}if(!n.client.proposal.keys.includes(e)){const{message:o}=_n("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(o)}if(kf(n.client.proposal.get(e).expiry)){yield n.deleteProposal(e);const{message:o}=_n("EXPIRED",`proposal id: ${e}`);throw new Error(o)}})()}}class XY extends Ab{constructor(e,n){super(e,n,"proposal",A3),this.core=e,this.logger=n}}class $Y extends Ab{constructor(e,n){super(e,n,"session",A3),this.core=e,this.logger=n}}class eJ extends Ab{constructor(e,n){super(e,n,"request",A3,o=>o.id),this.core=e,this.logger=n}}class _3 extends nV{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.name=E3_name,this.events=new uu.EventEmitter,this.on=(l,m)=>this.events.on(l,m),this.once=(l,m)=>this.events.once(l,m),this.off=(l,m)=>this.events.off(l,m),this.removeListener=(l,m)=>this.events.removeListener(l,m),this.removeAllListeners=l=>this.events.removeAllListeners(l),this.connect=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.connect(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.pair=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.pair(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.approve=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.approve(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.reject=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.reject(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.update=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.update(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.extend=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.extend(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.request=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.request(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.respond=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.respond(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.ping=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.ping(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.emit=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.emit(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.disconnect=function(){var l=(0,Le.Z)(function*(m){try{return yield n.engine.disconnect(m)}catch(N){throw n.logger.error(N.message),N}});return function(m){return l.apply(this,arguments)}}(),this.find=l=>{try{return this.engine.find(l)}catch(m){throw this.logger.error(m.message),m}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(l){throw this.logger.error(l.message),l}},this.name=e?.name||E3_name,this.metadata=e?.metadata||function Lz(){return(0,lz.D)()||{name:"",description:"",url:"",icons:[""]}}();const o=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,zr.pino)((0,zr.getDefaultLoggerOptions)({level:e?.logger||E3_logger}));this.core=e?.core||new jY(e),this.logger=(0,zr.generateChildLogger)(o,this.name),this.session=new $Y(this.core,this.logger),this.proposal=new XY(this.core,this.logger),this.pendingRequest=new eJ(this.core,this.logger),this.engine=new qY(this)}static init(e){return(0,Le.Z)(function*(){const n=new _3(e);return yield n.initialize(),n})()}get context(){return(0,zr.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(n){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(n.message),n}})()}}var Ah=y(36953);class tJ{constructor(e){this.openModal=Ah.jb.open,this.closeModal=Ah.jb.close,this.subscribeModal=Ah.jb.subscribe,this.setTheme=Ah.Ic.setThemeConfig,Ah.Ic.setThemeConfig(e),Ah.t0.setConfig(e),this.initUi()}initUi(){return(0,Le.Z)(function*(){if(typeof window<"u"){yield y.e(390).then(y.bind(y,52390));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Ah.zb.setIsUiLoaded(!0)}})()}}const rJ=class nJ{init(e){var n=this;return(0,Le.Z)(function*(){n.client=yield _3.init(e)})()}constructor(e){this.emitter=e}get session(){return this.client.session}on(e,n){return this.client.on(e,n),{remove:()=>this.client.removeListener(e,n)}}once(e,n){this.client.once(e,n)}connect(e,n,o,l){var m=this;return(0,Le.Z)(function*(){const N=new tJ({projectId:o,chains:[l],explorerExcludedWalletIds:"ALL"});return new Promise((J,ee)=>{m.client.connect(e).then(({uri:oe,approval:ue})=>{oe&&(n?(N.openModal({uri:oe,standaloneChains:[l]}),N.subscribeModal(({open:ge})=>{ge||ee(new Error("User cancelled pairing"))})):m.emitter.emit("uriChanged",{uri:oe})),ue().then(J).catch(ee).finally(()=>N.closeModal())}).catch(ee)})})()}request(e){var n=this;return(0,Le.Z)(function*(){return n.client.request(e)})()}disconnect(e){var n=this;return(0,Le.Z)(function*(){return n.client.disconnect(e)})()}},iJ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAir0lEQVR42u3deZxcVZn/8c9zbnV3dhIim6CMCIyK4rigM6S6AUEZc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ErkJggg==",oJ=["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions","near_verifyOwner","near_signMessage"],sJ=["chainChanged","accountsChanged"],aJ=function(){var t=(0,Le.Z)(function*(e,n,o){const l=new rJ(o);let m=null;const N=new Zn.keyStores.BrowserLocalStorageKeyStore(window.localStorage,`near-wallet-selector:${e}:keystore:`);if(yield l.init({projectId:n.projectId,metadata:n.metadata,relayUrl:n.relayUrl}),l.session.length){const J=l.session.keys.length-1;m=l.session.get(l.session.keys[J])}return{client:l,session:m,keystore:N,subscriptions:[]}});return function(n,o,l){return t.apply(this,arguments)}}(),eD=function(){var t=(0,Le.Z)(function*({state:e,chainId:n,qrCodeModal:o,projectId:l}){return yield e.client.connect({requiredNamespaces:{near:{chains:[n],methods:oJ,events:sJ}}},o,l,n)});return function(n){return t.apply(this,arguments)}}(),M3=function(){var t=(0,Le.Z)(function*({state:e}){yield e.client.disconnect({topic:e.session.topic,reason:{code:5900,message:"User disconnected"}})});return function(n){return t.apply(this,arguments)}}(),uJ=function(){var t=(0,Le.Z)(function*({id:e,options:n,store:o,params:l,provider:m,emitter:N,logger:J}){const ee=yield aJ(e,l,N),oe=()=>{if(l.chainId)return l.chainId;const{networkId:vn}=n.network;if(["mainnet","testnet"].includes(vn))return`near:${vn}`;throw new Error("Invalid chain id")},ue=function(){var vn=(0,Le.Z)(function*(){const pn=ee.session?.namespaces.near.accounts||[],xn=[];for(let wr=0;wrpn.remove()),ee.subscriptions=[],ee.session=null});return function(){return vn.apply(this,arguments)}}(),Ie=(vn,pn)=>{if("FullAccess"===pn.permission)return pn;const{receiver_id:xn,method_names:wr}=pn.permission.FunctionCall;return vn.receiverId!==xn?null:vn.actions.every(mr=>{if("FunctionCall"!==mr.type)return!1;const{methodName:ar,deposit:Ar}=mr.params;return(!wr.length||!wr.includes(ar))&&parseFloat(Ar)<=0})},Re=function(){var vn=(0,Le.Z)(function*(pn){const xn=new Zn.InMemorySigner(ee.keystore),wr=[],mr=yield m.block({finality:"final"});for(let ar=0;aral(Ua)),Zn.utils.serialize.base_decode(mr.header.hash)),[,fc]=yield Zn.transactions.signTransaction(lc,xn,pn[ar].signerId,n.network.networkId);wr.push(fc)}return wr});return function(xn){return vn.apply(this,arguments)}}(),Te=function(){var vn=(0,Le.Z)(function*(){return ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_getAccounts",params:{}}})});return function(){return vn.apply(this,arguments)}}(),ke=function(){var vn=(0,Le.Z)(function*(pn,xn){return ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_verifyOwner",params:{accountId:pn,message:xn}}})});return function(xn,wr){return vn.apply(this,arguments)}}(),Ue=function(){var vn=(0,Le.Z)(function*(pn){const{message:xn,nonce:wr,recipient:mr,callbackUrl:ar,accountId:Ar}=pn;return ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_signMessage",params:{message:xn,nonce:wr,recipient:mr,...ar&&{callbackUrl:ar},...Ar&&{accountId:Ar}}}})});return function(xn){return vn.apply(this,arguments)}}(),Ge=function(){var vn=(0,Le.Z)(function*(pn){const wr=(yield Te()).find(jo=>jo.accountId===pn.signerId);if(!wr)throw new Error("Invalid signer id");const[mr,ar]=yield Promise.all([m.block({finality:"final"}),m.query({request_type:"view_access_key",finality:"final",account_id:pn.signerId,public_key:wr.publicKey})]),Ar=Zn.transactions.createTransaction(pn.signerId,Zn.utils.PublicKey.from(wr.publicKey),pn.receiverId,ar.nonce+1,pn.actions.map(jo=>al(jo)),Zn.utils.serialize.base_decode(mr.header.hash)),Ui=yield ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_signTransaction",params:{transaction:Ar.encode()}}});return Zn.transactions.SignedTransaction.decode(Buffer.from(Ui))});return function(xn){return vn.apply(this,arguments)}}(),nt=function(){var vn=(0,Le.Z)(function*(pn){if(!pn.length)return[];const xn=[],[wr,mr]=yield Promise.all([m.block({finality:"final"}),Te()]);for(let Ar=0;Arfc.accountId===Ui.signerId);if(!jo)throw new Error("Invalid signer id");const lc=yield m.query({request_type:"view_access_key",finality:"final",account_id:Ui.signerId,public_key:jo.publicKey});xn.push(Zn.transactions.createTransaction(Ui.signerId,Zn.utils.PublicKey.from(jo.publicKey),Ui.receiverId,lc.nonce+Ar+1,Ui.actions.map(fc=>al(fc)),Zn.utils.serialize.base_decode(wr.header.hash)))}return(yield ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_signTransactions",params:{transactions:xn.map(Ar=>Ar.encode())}}})).map(Ar=>Zn.transactions.SignedTransaction.decode(Buffer.from(Ar)))});return function(xn){return vn.apply(this,arguments)}}(),Xe=function(){var vn=(0,Le.Z)(function*(){return(yield ue()).map(({accountId:xn})=>({accountId:xn,keyPair:Zn.utils.KeyPair.fromRandom("ed25519")}))});return function(){return vn.apply(this,arguments)}}(),St=function(){var vn=(0,Le.Z)(function*(pn){const xn=yield Xe(),wr=xn.map(({accountId:mr,keyPair:ar})=>({accountId:mr,publicKey:ar.getPublicKey().toString()}));yield ee.client.request({topic:ee.session.topic,chainId:oe(),request:{method:"near_signIn",params:{permission:pn,accounts:wr}}});for(let mr=0;mr(0,Le.Z)(function*(){try{const{contract:wr}=o.getState();ee.session&&!wr&&(yield M3({state:ee}),yield ge());const mr=oe();return ee.session=yield eD({state:ee,chainId:mr,qrCodeModal:xn,projectId:l.projectId}),yield St({receiverId:vn,methodNames:pn}),yield Nn(),yield ue()}catch(wr){throw yield un(),wr}})(),signOut:un,getAccounts:()=>(0,Le.Z)(function*(){return ue()})(),verifyOwner:({message:vn})=>(0,Le.Z)(function*(){J.log("WalletConnect:verifyOwner",{message:vn});const{contract:pn}=o.getState();if(!ee.session||!pn)throw new Error("Wallet not signed in");const xn=Df(o.getState());if(!xn)throw new Error("No active account");return ke(xn.accountId,vn)})(),signMessage:({message:vn,nonce:pn,recipient:xn,callbackUrl:wr})=>(0,Le.Z)(function*(){J.log("WalletConnect:signMessage",{message:vn,nonce:pn,recipient:xn});try{const mr=oe();ee.session||(ee.session=ee.session=yield eD({state:ee,chainId:mr,qrCodeModal:!0,projectId:l.projectId}));const ar=Df(o.getState());return yield Ue({message:vn,nonce:pn,recipient:xn,callbackUrl:wr,accountId:ar?.accountId})}catch(mr){throw yield M3({state:ee}),yield ge(),mr}})(),signAndSendTransaction:({signerId:vn,receiverId:pn,actions:xn})=>(0,Le.Z)(function*(){J.log("signAndSendTransaction",{signerId:vn,receiverId:pn,actions:xn});const{contract:wr}=o.getState();if(!ee.session||!wr)throw new Error("Wallet not signed in");const mr=Df(o.getState());if(!mr)throw new Error("No active account");const ar={signerId:vn||mr.accountId,receiverId:pn||wr.contractId,actions:xn};try{const[Ar]=yield Re([ar]);return m.sendTransaction(Ar)}catch(Ar){J.log("Falling back to WalletConnect to sign transaction",Ar);const Ui=yield Ge(ar);return m.sendTransaction(Ui)}})(),signAndSendTransactions:({transactions:vn})=>(0,Le.Z)(function*(){J.log("signAndSendTransactions",{transactions:vn});const{contract:pn}=o.getState();if(!ee.session||!pn)throw new Error("Wallet not signed in");const xn=Df(o.getState());if(!xn)throw new Error("No active account");const wr=vn.map(mr=>({signerId:mr.signerId||xn.accountId,receiverId:mr.receiverId,actions:mr.actions}));try{const mr=yield Re(wr),ar=[];for(let Ar=0;AruJ({...N,params:{projectId:t,metadata:e,relayUrl:o,chainId:n}})}})}const cJ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAe+0lEQVR42u2dV3ccV7bff7tCRyQiMIAgSIJJ1ChwNGNRWRqF0QTPeHxf/C38KfzkZ38Gey2v67m+9rWX585ao5E0IzETjCLFBBAAAZJgQu7uOuf44dRBg6QCQ8dC/dYCwwHQXVW9/7t27bPPPmKMMaSkNAtj7JeI/QKimzcoH/+S3Nuf4HX3Vr9fB4Jmn3/KOsUYjDGI51nj1prS1cssH/6C8tHPyQwOUvjNf7A/Wyfjh1QAKY3GGOvQPUFE0KUyi+fPsvD3L6hcPo9fWcSPlsm8+rr9ea3B8+p2OKkAUhqC0cY6chFEoH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n/I0NEwAnmcXkRw7oshmn27md63h+z689jPr8Q8e9PFSw095DhoigNXw57xmevrJtjxyD6xa23KFIICf/dzjD/8+4JVXq21G3GunD7cpz0JDQ6CTJ2zp84+FP26hzMoyZHPw3vs+v/t9wJ693kOhTmr4Kc9L3QXgJptKJThx/PvDHxe+RBEsLNj1Ae9/4PP7PwTs3VctUEsNP6WWNEQAInD6tGLiunls5ZcLdZzhd3UJv/ltwO9+H7Bt2Bq+E0xq+Cm1pmEh0PFjmnLZkM0JRlUXmUeVap3Or34d8stf+QwPVxtKrZYrpKTUgboKwBnv/Lzh1KgNf4jLocslWClZw//dvwv57b8N6O9PKzNTGkvdBSACly9pZqYN+bxda1suGQa3enzyacgHv/AZGKjO2kJq+CmNo+4CADh0yGZ/lBK2bhU++jjkk1/6dPdImsNPaSp1E4Bb+fXggeHYEc2uXR5/+IeAd971KRRSw09pDcSY+nTjceHP+Jjm+HHNb34brNbpuO+lYU5Ks/n/VnKP4Bbx7PAAAAAASUVORK5CYII=";var nD,rD,iD;function lJ(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})}const hm=null!=(nD={}.NEXT_PUBLIC_RAMPER_ENV)?nD:globalThis.RAMPER_ENV,mi_LOCAL="local",mi_PREVIEW="preview",mi_DEV="dev",mi_STAGING="staging",mi_PROD="prod",pm=(rD={}.NEXT_PUBLIC_VERCEL_URL,iD={}.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF,()=>void 0===globalThis.window),mu=()=>!pm()&&window.location.hostname.includes("dev.ramper.xyz")?mi_DEV:!pm()&&window.location.hostname.includes("preview.ramper.xyz")?mi_PREVIEW:!pm()&&window.location.hostname.includes("staging.ramper.xyz")?mi_STAGING:hm===mi_PROD?mi_PROD:hm===mi_STAGING?mi_STAGING:hm===mi_DEV?mi_DEV:hm===mi_PREVIEW?mi_PREVIEW:hm===mi_LOCAL?mi_LOCAL:mi_PROD;var oD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yJ(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),e}var I3={exports:{}};(function(t,e){!function(n,o){var J="function",ee="undefined",oe="object",ue="string",Ie="model",Re="name",Te="type",ke="vendor",Ue="version",Ge="architecture",nt="console",Xe="mobile",St="tablet",kt="smarttv",un="wearable",Nn="embedded",pn="Amazon",xn="Apple",mr="BlackBerry",ar="Browser",Ar="Chrome",jo="Firefox",lc="Google",vu="Microsoft",Ms="Motorola",wl="Opera",Sm="Samsung",Al="Sony",Bp="Zebra",Rb="Facebook",jp=function(Tr){for(var Xr={},Or=0;Or0?2===vi.length?typeof vi[1]==J?this[vi[0]]=vi[1].call(this,dc):this[vi[0]]=vi[1]:3===vi.length?typeof vi[1]!==J||vi[1].exec&&vi[1].test?this[vi[0]]=dc?dc.replace(vi[1],vi[2]):o:this[vi[0]]=dc?vi[1].call(this,dc,vi[2]):o:4===vi.length&&(this[vi[0]]=dc?vi[3].call(this,dc.replace(vi[1],vi[2])):o):this[vi]=dc||o;Or+=2}},H3=function(Tr,Xr){for(var Or in Xr)if(typeof Xr[Or]===oe&&Xr[Or].length>0){for(var Ki=0;Ki255?V3(kr,255):kr,this},this.setUA(Or),this};wu.VERSION="1.0.2",wu.BROWSER=jp([Re,Ue,"major"]),wu.CPU=jp([Ge]),wu.DEVICE=jp([Ie,ke,Te,nt,Xe,kt,St,un,Nn]),wu.ENGINE=wu.OS=jp([Re,Ue]),t.exports&&(e=t.exports=wu),e.UAParser=wu;var Up=typeof n!==ee&&(n.jQuery||n.Zepto);if(Up&&!Up.ua){var kb=new wu;Up.ua=kb.getResult(),Up.ua.get=function(){return kb.getUA()},Up.ua.set=function(Tr){kb.setUA(Tr);var Xr=kb.getResult();for(var Or in Xr)Up.ua[Or]=Xr[Or]}}}("object"==typeof window?window:oD)})(I3,I3.exports),(new I3.exports.UAParser).getBrowser;!function(t,e){var l;l=function(){var n=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053a":"JH","\u053b":"I","\u053c":"L","\u053d":"X","\u053e":"C\'","\u053f":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054a":"P","\u054b":"J","\u054c":"R\'","\u054d":"S","\u054e":"V","\u054f":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062a":"t","\u062b":"th","\u062c":"j","\u062d":"h","\u062e":"kh","\u062f":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063a":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064a":"y","\u064b":"an","\u064c":"on","\u064d":"en","\u064e":"a","\u064f":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067e":"p","\u0686":"ch","\u0698":"zh","\u06a9":"k","\u06af":"g","\u06cc":"y","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e62":"S","\u1e63":"s","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u201e":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial","\ufef5":"laa","\ufef7":"laa","\ufef9":"lai","\ufefb":"la"}'),o=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042a":"A","\u042c":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044a":"a","\u044c":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","\u20a3":"francos","\u2211":"suma","\u221e":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","\u2211":"soma","\xa3":"libra","\u221e":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function l(m,N){if("string"!=typeof m)throw new Error("slugify: string argument expected");var J=o[(N="string"==typeof N?{replacement:N}:N||{}).locale]||{},ee=void 0===N.replacement?"-":N.replacement,oe=void 0===N.trim||N.trim,ue=m.normalize().split("").reduce(function(ge,Ie){var Re=J[Ie]||n[Ie]||Ie;return Re===ee&&(Re=" "),ge+Re.replace(N.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return N.strict&&(ue=ue.replace(/[^A-Za-z0-9\s]/g,"")),oe&&(ue=ue.trim()),ue=ue.replace(/\s+/g,ee),N.lower&&(ue=ue.toLowerCase()),ue}return l.extend=function(m){Object.assign(n,m)},l},t.exports=l(),t.exports.default=l()}({exports:{}});const Np=()=>pm()?"localhost":window.location.hostname;({local:`http://${Np()}:3000`,preview:"https://auth.v1.preview.ramper.xyz",dev:"https://auth.v1.dev.ramper.xyz",staging:"https://auth.v1.staging.ramper.xyz",prod:"https://auth.v1.ramper.xyz"})[mu()];({local:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",preview:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",dev:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",staging:"https://us-central1-ramper-prod.cloudfunctions.net",prod:"https://us-central1-ramper-prod.cloudfunctions.net"})[mu()],{local:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",preview:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",dev:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",staging:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod",prod:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod"}[mu()],{local:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",preview:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",dev:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",staging:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0",prod:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0"}[mu()],{local:"G-QDW3GW421L",preview:"G-QDW3GW421L",dev:"G-QDW3GW421L",staging:"G-7NRREF51EB",prod:"G-7NRREF51EB"}[mu()],{local:`http://${Np()}:3001`,preview:"https://example.preview.ramper.xyz",dev:"https://example.dev.ramper.xyz",staging:"https://example.staging.ramper.xyz",prod:"https://example.ramper.xyz"}[mu()];({local:`http://${Np()}:3002`,preview:"https://static.preview.ramper.xyz",dev:"https://static.dev.ramper.xyz",staging:"https://static.staging.ramper.xyz",prod:"https://static.ramper.xyz"})[mu()];({local:`http://${Np()}:3004`,preview:"https://docs.preview.ramper.xyz",dev:"https://docs.dev.ramper.xyz",staging:"https://docs.staging.ramper.xyz",prod:"https://docs.ramper.xyz"})[mu()];const sD={local:`http://${Np()}:3005`,preview:"https://js.preview.ramper.xyz",dev:"https://js.dev.ramper.xyz",staging:"https://js.staging.ramper.xyz",prod:"https://js.ramper.xyz"};sD[mu()],{local:"suyklxmori",preview:"suyklxmori",dev:"suyklxmori",staging:"dtofgevaxu",prod:"dtofgevaxu"}[mu()],{local:`http://${Np()}:3008`,preview:"https://developer.preview.ramper.xyz",dev:"https://developer.dev.ramper.xyz",staging:"https://developer.staging.ramper.xyz",prod:"https://developer.ramper.xyz"}[mu()];const Sb=t=>window[t];let _b;const Ff_GOOGLE="google",Ff_FACEBOOK="facebook",Ff_APPLE="apple",Ff_TWITTER="twitter",Ff_EMAIL="email",Pp={MAINNET:"mainnet",ROPSTEN:"ropsten",GOERLI:"goerli",MATIC:"matic",MATICMUM:"maticmum"},aD_DARK=(Pp.MAINNET,Pp.GOERLI,Pp.MATIC,Pp.MATICMUM,"dark"),Rp=(Pp.MAINNET,{ALL:"ALL",DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR"}),C3=Rp.DEBUG,Mb=(t,...e)=>{};class IJ{constructor(e=C3){this.debug=Mb,this.info=Mb,this.warn=Mb,this.error=Mb;const n=Object.values(Rp).includes(e)?e:C3;this.error=console.error.bind(console),n!==Rp.ERROR&&(this.warn=console.warn.bind(console),n!==Rp.WARN&&(this.info=console.info.bind(console),n!==Rp.INFO&&(this.debug=console.log.bind(console),Rp.DEBUG)))}}let CJ;if(void 0!==globalThis.window){CJ=new IJ(window.localStorage.getItem("ramper_loggingLevel")||C3)}function x3(t){this.message=t}x3.prototype=new Error,x3.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function Ib(t){this.message=t}Ib.prototype=new Error,Ib.prototype.name="InvalidTokenError";!function(){try{window&&window.Promise}catch{return null}}();var kJ=yJ(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(t){var e=kJ,n={HS256:"sha256",HS384:"sha384",HS512:"sha512",RS256:"RSA-SHA256"},o={HS256:"hmac",HS384:"hmac",HS512:"hmac",RS256:"sign"},l=t.exports;function J(Ie,Re,Te,ke){var Ue;if("hmac"===ke)Ue=e.createHmac(Te,Re).update(Ie).digest("base64");else{if("sign"!=ke)throw new Error("Algorithm type not recognized");Ue=e.createSign(Te).update(Ie).sign(Re,"base64")}return ge(Ue)}function ee(Ie){return Buffer.from(oe(Ie),"base64").toString()}function oe(Ie){return(Ie+=new Array(5-Ie.length%4).join("=")).replace(/\-/g,"+").replace(/_/g,"/")}function ue(Ie){return ge(Buffer.from(Ie).toString("base64"))}function ge(Ie){return Ie.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}l.version="0.5.6",l.decode=function(Re,Te,ke,Ue){if(!Re)throw new Error("No token supplied");var Ge=Re.split(".");if(3!==Ge.length)throw new Error("Not enough or too many segments");var nt=Ge[0],Xe=Ge[1],St=Ge[2],kt=JSON.parse(ee(nt)),un=JSON.parse(ee(Xe));if(!ke){!Ue&&/BEGIN( RSA)? PUBLIC KEY/.test(Te.toString())&&(Ue="RS256");var Nn=n[Ue||kt.alg],vn=o[Ue||kt.alg];if(!Nn||!vn)throw new Error("Algorithm not supported");if(!function N(Ie,Re,Te,ke,Ue){if("hmac"===ke)return Ue===J(Ie,Re,Te,ke);if("sign"==ke)return e.createVerify(Te).update(Ie).verify(Re,oe(Ue),"base64");throw new Error("Algorithm type not recognized")}([nt,Xe].join("."),Te,Nn,vn,St))throw new Error("Signature verification failed");if(un.nbf&&Date.now()<1e3*un.nbf)throw new Error("Token not yet active");if(un.exp&&Date.now()>1e3*un.exp)throw new Error("Token expired")}return un},l.encode=function(Re,Te,ke,Ue){if(!Te)throw new Error("Require key");ke||(ke="HS256");var Ge=n[ke],nt=o[ke];if(!Ge||!nt)throw new Error("Algorithm not supported");var Xe={typ:"JWT",alg:ke};Ue&&Ue.header&&function m(Ie,Re){for(var Te in Re)Re.hasOwnProperty(Te)&&(Ie[Te]=Re[Te])}(Xe,Ue.header);var St=[];return St.push(ue(JSON.stringify(Xe))),St.push(ue(JSON.stringify(Re))),St.push(J(St.join("."),Te,Ge,nt)),St.join(".")}}({exports:{}});const FJ=()=>`${sD[(()=>{const t=globalThis.RAMPER_ENV;return t===mi_PROD?mi_PROD:t===mi_STAGING?mi_STAGING:t===mi_DEV?mi_DEV:t===mi_PREVIEW?mi_PREVIEW:t===mi_LOCAL?mi_LOCAL:mi_PROD})()]}/v1/near`,BJ=({src:t})=>pm()?Promise.resolve({}):((t,e)=>{const n=document.querySelector(`[src="${t}"]`);if(null!=n&&void 0!==_b)return _b;if(null!=n&&void 0!==Sb(e))return Promise.resolve(Sb(e));const o=document.createElement("script");return o.src=t,_b=new Promise((l,m)=>{document.head.appendChild(o),window.addEventListener(`initialize:${e}`,()=>{void 0!==Sb(e)?l(Sb(e)):m(new Error(`Failed to load script: [${t}]`))})}),_b})(t,"ramper"),yl=()=>globalThis.ramper,lD=(...t)=>{var e;return null===(e=yl())||void 0===e?void 0:e.sendTransaction(...t)},VJ=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,options:o,logger:l}){yield((...t)=>lJ(void 0,void 0,void 0,function*(){const e=yield BJ({src:FJ()});return yield e?.init(...t),e}))({appName:"Ramper Wallet",authProviders:[Ff_GOOGLE,Ff_FACEBOOK,Ff_TWITTER,Ff_APPLE,Ff_EMAIL],walletProviders:[],network:o.network.networkId,theme:aD_DARK});const m={wallet:window.ramper},N=function(){var ee=(0,Le.Z)(function*(){const{wallets:oe}=m.wallet.getUser(),{publicKey:ue}=oe.near;return ue?[{accountId:ue}]:[]});return function(){return ee.apply(this,arguments)}}(),J=function(){var ee=(0,Le.Z)(function*(oe){const ue=yield N(),{contract:ge}=n.getState();if(!ue.length||!ge)throw new Error("Wallet not signed in");return oe.map(Ie=>{const Re=Ie.actions.map(Te=>al(Te));return{receiverId:Ie.receiverId||ge.contractId,actions:Re}})});return function(ue){return ee.apply(this,arguments)}}();return{signIn:()=>(0,Le.Z)(function*(){const ee=yield((...t)=>{var e;return null===(e=yl())||void 0===e?void 0:e.signIn(...t)})();if("cancel"===ee.method||"none"===ee.method)throw new Error("Something went wrong");const oe=yield N();return oe.length?oe:N()})(),signOut:()=>(0,Le.Z)(function*(){m.wallet.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return N()})(),verifyOwner:({message:ee})=>(0,Le.Z)(function*(){throw l.log("Ramper Wallet:verifyOwner",{message:ee}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({receiverId:ee,actions:oe})=>(0,Le.Z)(function*(){l.log("signAndSendTransaction",{receiverId:ee,actions:oe});const{contract:ue}=n.getState();if(!(yield N()).length||!ue)throw new Error("Wallet not signed in");const Ie=yield J([{receiverId:ee,actions:oe}]);try{const{result:Re}=yield lD({transactionActions:Ie});if(0===Object.keys(Re[0]).length&&Re[0].constructor===Object)throw new Error;return Re[0]}catch{throw new Error("Failed to send transaction")}})(),signAndSendTransactions:({transactions:ee})=>(0,Le.Z)(function*(){l.log("signAndSendTransactions",{transactions:ee});const oe=yield J(ee);try{const{result:ue}=yield lD({transactionActions:oe});if(0===Object.keys(ue[0]).length&&ue[0].constructor===Object)throw new Error;return ue}catch{throw new Error("Failed to send transactions")}})()}});return function(n){return t.apply(this,arguments)}}();function fD({iconUrl:t=cJ,deprecated:e=!1}={}){return(0,Le.Z)(function*(){return(0,na.isMobile)()?null:{id:"ramper-wallet",type:"injected",metadata:{name:"Ramper Wallet",description:null,iconUrl:t,downloadUrl:"https://docs.ramper.xyz/",deprecated:e,available:!0},init:VJ}})}var Ba=y(44304),D3=function(t,e,n,o){return new(n||(n=Promise))(function(m,N){function J(ue){try{oe(o.next(ue))}catch(ge){N(ge)}}function ee(ue){try{oe(o.throw(ue))}catch(ge){N(ge)}}function oe(ue){ue.done?m(ue.value):function l(m){return m instanceof n?m:new n(function(N){N(m)})}(ue.value).then(J,ee)}oe((o=o.apply(t,e||[])).next())})},T3=function(t,e){var o,l,m,N,n={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return N={next:J(0),throw:J(1),return:J(2)},"function"==typeof Symbol&&(N[Symbol.iterator]=function(){return this}),N;function J(oe){return function(ue){return function ee(oe){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,l&&(m=2&oe[0]?l.return:oe[0]?l.throw||((m=l.return)&&m.call(l),0):l.next)&&!(m=m.call(l,oe[1])).done)return m;switch(l=0,m&&(oe=[2&oe[0],m.value]),oe[0]){case 0:case 1:m=oe;break;case 4:return n.label++,{value:oe[1],done:!1};case 5:n.label++,l=oe[1],oe=[0];continue;case 7:oe=n.ops.pop(),n.trys.pop();continue;default:if(!(m=(m=n.trys).length>0&&m[m.length-1])&&(6===oe[0]||2===oe[0])){n=0;continue}if(3===oe[0]&&(!m||oe[1]>m[0]&&oe[1]0)&&!(l=o.next()).done;)m.push(l.value)}catch(J){N={error:J}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(N)throw N.error}}return m},zJ=function(t,e,n){if(n||2===arguments.length)for(var m,o=0,l=e.length;o=256)throw new Ba.TransportError("data.length exceed 256 bytes limit. Got: "+N.length,"DataLengthTooBig");return[4,this.exchange(Buffer.concat([Buffer.from([n,o,l,m]),Buffer.from([N.length]),N]))];case 1:if(ee=ue.sent(),oe=ee.readUInt16BE(ee.length-2),!J.some(function(ge){return ge===oe}))throw new Ba.TransportStatusError(oe);return[2,ee]}})})},this.exchangeAtomicImpl=function(n){return D3(e,void 0,void 0,function(){var o,l,m,N,J,ee=this;return T3(this,function(oe){switch(oe.label){case 0:if(this.exchangeBusyPromise)throw new Ba.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect.");l=new Promise(function(ue){o=ue}),this.exchangeBusyPromise=l,m=!1,N=setTimeout(function(){m=!0,ee.emit("unresponsive")},this.unresponsiveTimeout),oe.label=1;case 1:return oe.trys.push([1,,3,4]),[4,n()];case 2:return J=oe.sent(),m&&this.emit("responsive"),[2,J];case 3:return clearTimeout(N),o&&o(),this.exchangeBusyPromise=null,[7];case 4:return[2]}})})},this._appAPIlock=null}return t.prototype.exchange=function(e){throw new Error("exchange not implemented")},t.prototype.setScrambleKey=function(e){},t.prototype.close=function(){return Promise.resolve()},t.prototype.on=function(e,n){this._events.on(e,n)},t.prototype.off=function(e,n){this._events.removeListener(e,n)},t.prototype.emit=function(e){for(var n,o=[],l=1;l=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),J=N.next();!J.done;J=N.next()){var ee=J.value;e[ee]=this.decorateAppAPIMethod(ee,e[ee],e,o)}}catch(oe){l={error:oe}}finally{try{J&&!J.done&&(m=N.return)&&m.call(N)}finally{if(l)throw l.error}}},t.prototype.decorateAppAPIMethod=function(e,n,o,l){var m=this;return function(){for(var N=[],J=0;J>8;return xb.find(function(l){return l.productIdMM===n})},gD=[],N3={};for(var qJ in Cb){var yD=Cb[qJ],P3=yD.bluetoothSpec;if(P3)for(var R3=0;R30&&m[m.length-1])&&(6===oe[0]||2===oe[0])){n=0;continue}if(3===oe[0]&&(!m||oe[1]>m[0]&&oe[1]0)&&!(l=o.next()).done;)m.push(l.value)}catch(J){N={error:J}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(N)throw N.error}}return m},rQ=[{vendorId:hD}],iQ=function(){return Promise.resolve(!(!window.navigator||!window.navigator.hid))},Tb=function(){var t=navigator.hid;if(!t)throw new Ba.TransportError("navigator.hid is not supported","HIDNotSupported");return t};function vD(){return ml(this,void 0,void 0,function(){var t;return vl(this,function(e){switch(e.label){case 0:return[4,Tb().requestDevice({filters:rQ})];case 1:return t=e.sent(),Array.isArray(t)?[2,t]:[2,[t]]}})})}function k3(){return ml(this,void 0,void 0,function(){return vl(this,function(e){switch(e.label){case 0:return[4,Tb().getDevices()];case 1:return[2,e.sent().filter(function(n){return n.vendorId===hD})]}})})}var sQ=function(t){function e(n){var o=t.call(this)||this;return o.channel=Math.floor(65535*Math.random()),o.packetSize=64,o.inputs=[],o.read=function(){return o.inputs.length?Promise.resolve(o.inputs.shift()):new Promise(function(l){o.inputCallback=l})},o.onInputReport=function(l){var m=Buffer.from(l.data.buffer);o.inputCallback?(o.inputCallback(m),o.inputCallback=null):o.inputs.push(m)},o._disconnectEmitted=!1,o._emitDisconnect=function(l){o._disconnectEmitted||(o._disconnectEmitted=!0,o.emit("disconnect",l))},o.exchange=function(l){return ml(o,void 0,void 0,function(){var N=this;return vl(this,function(J){switch(J.label){case 0:return[4,this.exchangeAtomicImpl(function(){return ml(N,void 0,void 0,function(){var ee,oe,ue,ge,Ie,Re,Te,ke,Ue;return vl(this,function(Ge){switch(Ge.label){case 0:oe=(ee=this).channel,ue=ee.packetSize,mD("apdu","=> "+l.toString("hex")),ge=(0,YJ.Z)(oe,ue),Ie=ge.makeBlocks(l),Re=0,Ge.label=1;case 1:return Re0?[2,t[0]]:[4,vD()];case 2:return[2,n.sent()[0]]}})})}().then(function(m){if(m){if(!o){var N="number"==typeof m.productId?pD(m.productId):void 0;n.next({type:"add",descriptor:m,deviceModel:N}),n.complete()}}else n.error(new Ba.TransportOpenUserCancelled("Access denied to use Ledger device"))},function(m){n.error(new Ba.TransportOpenUserCancelled(m.message))}),{unsubscribe:function l(){o=!0}}},e}(ZJ);const aQ=sQ;function bD(t){const e=t.split("/");return Buffer.concat(e.map(n=>n.endsWith("'")?2147483648|Math.abs(parseInt(n.slice(0,-1))):Math.abs(parseInt(n))).map(n=>Buffer.from([n>>24&255,n>>16&255,n>>8&255,255&n])))}const pQ="W".charCodeAt(0),gQ=()=>!!window.navigator?.hid;class yQ{constructor(){var e=this;this.transport=null,this.isConnected=()=>Boolean(this.transport),this.connect=(0,Le.Z)(function*(){e.transport=yield aQ.create();const n=()=>{e.transport?.off("disconnect",n),e.transport=null};e.transport.on("disconnect",n)}),this.disconnect=(0,Le.Z)(function*(){if(!e.transport)throw new Error("Device not connected");yield e.transport.close(),e.transport=null}),this.setScrambleKey=n=>{if(!this.transport)throw new Error("Device not connected");this.transport.setScrambleKey(n)},this.on=(n,o)=>{if(!this.transport)throw new Error("Device not connected");return this.transport.on(n,o),{remove:()=>this.transport?.off(n,o)}},this.off=(n,o)=>{if(!this.transport)throw new Error("Device not connected");this.transport.off(n,o)},this.getVersion=(0,Le.Z)(function*(){if(!e.transport)throw new Error("Device not connected");const n=yield e.transport.send(128,6,0,0),[o,l,m]=Array.from(n);return`${o}.${l}.${m}`}),this.getPublicKey=function(){var n=(0,Le.Z)(function*({derivationPath:o}){if(!e.transport)throw new Error("Device not connected");const l=yield e.transport.send(128,4,0,pQ,bD(o));return Zn.utils.serialize.base_encode(l.subarray(0,-2))});return function(o){return n.apply(this,arguments)}}(),this.sign=function(){var n=(0,Le.Z)(function*({data:o,derivationPath:l}){if(!e.transport)throw new Error("Device not connected");yield e.getVersion();const N=Buffer.concat([bD(l),Buffer.from(o)]);for(let J=0;J=N.length,oe=yield e.transport.send(128,2,ee?128:0,0,Buffer.from(N.subarray(J,J+123)));if(ee)return Buffer.from(oe.subarray(0,-2))}throw new Error("Invalid data or derivation path")});return function(o){return n.apply(this,arguments)}}()}}const mQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAQAAADTdEb+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAFQkAABUJATOjLtcAAAAHdElNRQfmCBYRFRR5QOqTAAAE6UlEQVR42u3dPYtcZRzG4fvkRQxRNBhlQcEQED+HjY2wKa0stLCxsLS2FfHlC8TaVkhjnzRWqYw2IkGIkJBgQMgmu2NhfZbMMPc8szvXNeVwZv7POb+ZOXAGTgIAAAAAAAAAAAAAAAAAAAAAwOk3zT7zbj7M2dHjrW2VD/NDHo0eI8mr+TiXshg9xpoc5sf8tuxG13KYxal53M2V0UchSXIld4fvi/U9DnNtbqFnZnfBIoejj8Iabc9atmeSdaxl9rv3zDKv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EWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhWrhzX6/spswspHedVb917NdyfoZuNncj/f58HoMZK8ls9z+QR9KM/n6mobrhrWXj4dveal/JXrWxHWy/kkb44eYhN25Rzr2egBtnCSql0Jiw0TFhXCokJYVAiLCmFRISwqhEWFsKgQFhXComI+rClnRw+3Rtuzlu2ZZB1rmeaemv93w518eWp2wpSHeTR6iCTJo3yTS1mMHmNNDnNn9AgAAAAAAAAAAAAAAAAAAAAAAIz0H5C/bp2MgRJCAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTIyVDE3OjIwOjM2KzAwOjAwLb5rZQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0yMlQxNzoyMDozNiswMDowMFzj09kAAAAASUVORK5CYII=",B3="accounts",vQ=function(){var t=(0,Le.Z)(function*(e){const n=yield e.getItem(B3);return{client:new yQ,subscriptions:[],accounts:n||[]}});return function(n){return t.apply(this,arguments)}}(),bQ=function(){var t=(0,Le.Z)(function*({options:e,store:n,provider:o,logger:l,storage:m,metadata:N}){const J=yield vQ(m),ee={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(ke=(0,Le.Z)(function*(Ue){const Ge=J.accounts.find(nt=>nt.accountId===Ue);if(!Ge)throw new Error("Failed to find public key for account");return Zn.utils.PublicKey.from(Ge.publicKey)}),function(Ge){return ke.apply(this,arguments)}),signMessage:function(){var ke=(0,Le.Z)(function*(Ue,Ge){const nt=J.accounts.find(St=>St.accountId===Ge);if(!nt)throw new Error("Failed to find account for signing");return{signature:yield J.client.sign({data:Ue,derivationPath:nt.derivationPath}),publicKey:Zn.utils.PublicKey.from(nt.publicKey)}});return function(Ge,nt){return ke.apply(this,arguments)}}()},oe=()=>J.accounts.map(ke=>({accountId:ke.accountId,publicKey:"ed25519:"+ke.publicKey})),ge=function(){var ke=(0,Le.Z)(function*(){J.client.isConnected()&&(yield J.client.disconnect().catch(Ue=>{l.log("Failed to disconnect device"),l.error(Ue)})),J.subscriptions.forEach(ke=>ke.remove()),J.subscriptions=[],J.accounts=[],m.removeItem(B3)});return function(){return ke.apply(this,arguments)}}(),Ie=function(){var ke=(0,Le.Z)(function*(){J.client.isConnected()||(yield J.client.connect())});return function(){return ke.apply(this,arguments)}}(),Re=({accountId:ke,publicKey:Ue})=>(l.log("validateAccessKey",{accountId:ke,publicKey:Ue}),o.viewAccessKey({accountId:ke,publicKey:Ue}).then(Ge=>{if(l.log("validateAccessKey:accessKey",{accessKey:Ge}),"FullAccess"!==Ge.permission)throw new Error("Public key requires 'FullAccess' permission");return Ge},Ge=>{if("AccessKeyDoesNotExist"===Ge.type)return null;throw Ge})),Te=ke=>{const{contract:Ue}=n.getState();if(!Ue)throw new Error("Wallet not signed in");const Ge=Df(n.getState());if(!Ge)throw new Error("No active account");return ke.map(nt=>({signerId:nt.signerId||Ge.accountId,receiverId:nt.receiverId||Ue.contractId,actions:nt.actions}))};var ke;return{signIn:({accounts:ke})=>(0,Le.Z)(function*(){const Ue=oe();if(Ue.length)return Ue;const Ge=[];for(let nt=0;nt(0,Le.Z)(function*(){return oe()})(),verifyOwner:({message:ke})=>(0,Le.Z)(function*(){throw l.log("Ledger:verifyOwner",{message:ke}),new Error(`Method not supported by ${N.name}`)})(),signAndSendTransaction:({signerId:ke,receiverId:Ue,actions:Ge})=>(0,Le.Z)(function*(){if(l.log("signAndSendTransaction",{signerId:ke,receiverId:Ue,actions:Ge}),!J.accounts.length)throw new Error("Wallet not signed in");yield Ie();const nt=yield ic(Te([{signerId:ke,receiverId:Ue,actions:Ge}]),ee,e.network);return o.sendTransaction(nt[0])})(),signAndSendTransactions:({transactions:ke})=>(0,Le.Z)(function*(){if(l.log("signAndSendTransactions",{transactions:ke}),!J.accounts.length)throw new Error("Wallet not signed in");yield Ie();const Ue=yield ic(Te(ke),ee,e.network),Ge=[];for(let nt=0;nt(0,Le.Z)(function*(){return yield Ie(),yield J.client.getPublicKey({derivationPath:ke})})()}});return function(n){return t.apply(this,arguments)}}();function wD({iconUrl:t=mQ,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=(0,na.isMobile)(),o=gQ();return n?null:{id:"ledger",type:"hardware",metadata:{name:"Ledger",description:"Protect crypto assets with the most popular hardware wallet.",iconUrl:t,deprecated:e,available:o},init:bQ}})}var wQ=y(96105);const AQ=function(){var t=(0,Le.Z)(function*(e){const{store:n,options:o,logger:l,dAppMetadata:m}=e,N=new wQ.NearMobileWallet({network:o.network.networkId,nodeUrl:o.network.nodeUrl,metadata:m});function J(){return ee.apply(this,arguments)}function ee(){return(ee=(0,Le.Z)(function*(){l.log("[NearMobileWallet]:getAccounts");const oe=yield N.getAccounts(),ue=[];for(let ge=0;ge(0,Le.Z)(function*(){l.log("[NearMobileWallet]: signIn");const ue=""!==oe.contractId?oe.contractId:void 0;return yield N.signIn({...oe,contractId:ue}),yield J()})(),signOut:()=>(0,Le.Z)(function*(){l.log("[NearMobileWallet]: signOut"),yield N.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return J()})(),signAndSendTransaction:oe=>(0,Le.Z)(function*(){l.log("[NearMobileWallet]: signAndSendTransaction",oe);const{contract:ue}=n.getState();if(!ue)throw new Error("Wallet not signed in");return yield N.signAndSendTransaction({receiverId:ue.contractId,...oe})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("[NearMobileWallet]: verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:oe=>(0,Le.Z)(function*(){const{recipient:ue,nonce:ge,...Ie}=oe;l.log("[NearMobileWallet]: signMessage",oe);const Re=yield N.signMessage({...Ie,receiver:ue,nonce:Array.from(ge)});return{accountId:Re.accountId,signature:Re.signature.toString(),publicKey:Re.publicKey.toString()}})(),signAndSendTransactions:oe=>(0,Le.Z)(function*(){return l.log("[NearMobileWallet]: signAndSendTransactions",oe),yield N.signAndSendTransactions(oe)})()}});return function(n){return t.apply(this,argu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Fm893LXwcnLit5HkgWJG0skPP/8hRX5PGVr2V0t+qU89218rdjQ04Ia5PU0f4mU/CwMBcPMje+dOzeBmciH+hCRPMoofE02B7Jc0vtTKfpf/kCN/DdfftacC8iuL/EfGhN8U+beOPuTT2tz4H1/5ijFa7oBAHYCDd37pqczRJ51+ZjY3c5lpmBfkYBxnWFaXtEHlJL2vCExDMf0aX87ZMF15BnyOQZlomhPYMvmG9Fjx5TOyknIQYL9f4yvUs8HOMwP6s2sktsuJHNQo+2XHUWQltkEJzSMrFbD2OZhsaQGuv11yLl3kp6/0wjC3k8u2aiZrPbtoTtOrX/qSkQt6/H8DRMdL1OqM1CwAAAAASUVORK5CYII=";function AD({dAppMetadata:t}={}){return(0,Le.Z)(function*(){return{id:"near-mobile-wallet",type:"injected",metadata:{iconUrl:EQ,name:"Near Mobile Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!1,downloadUrl:"https://nearmobile.app/",deprecated:!1,available:!0},init:e=>AQ({...e,dAppMetadata:t})}})}const ED="guest-book.testnet";function _Q(t,e){return t===e}class gm{}gm.\u0275fac=function(e){return new(e||gm)},gm.\u0275cmp=xs({type:gm,selectors:[["near-wallet-selector-sign-in"]],decls:6,vars:0,template:function(e,n){1&e&&(si(0,"p"),Si(1," This app demonstrates a key element of NEAR\u2019s UX: once an app has permission to make calls on behalf of a user (that is, once a user signs in), the app can make calls to the blockchain for them without prompting extra confirmation. So you\u2019ll see that if you don\u2019t include a donation, your message gets posted right to the guest book.\n"),Wr(),si(2,"p"),Si(3," But if you do add a donation, then NEAR will double-check that you\u2019re ok with sending money to this app.\n"),Wr(),si(4,"p"),Si(5,"Go ahead and sign in to try it out!"),Wr())}});const MQ=function(t){return{"is-premium":t}};function IQ(t,e){if(1&t&&(si(0,"p",1)(1,"strong"),Si(2),Wr(),Si(3,":"),ks(4,"br"),Si(5),Wr()),2&t){const n=e.$implicit;bo("ngClass",K_(3,MQ,n.premium)),Jo(2),Wv(n.sender),Jo(3),k0(" ",n.text,"\n")}}class ym{}ym.\u0275fac=function(e){return new(e||ym)},ym.\u0275cmp=xs({type:ym,selectors:[["near-wallet-selector-messages"]],inputs:{messages:"messages"},decls:3,vars:1,consts:[[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(e,n){1&e&&(si(0,"h2"),Si(1,"Messages"),Wr(),Sa(2,IQ,6,5,"p",0)),2&e&&(Jo(2),bo("ngForOf",n.messages))},dependencies:[G0,Z0]});var CQ=20,xQ=1,_h=1e6,DQ=-7,TQ=21,OQ=!1,mm="[big.js] ",Mh=mm+"Invalid ",Ob=Mh+"decimal places",NQ=Mh+"rounding mode",_D=mm+"Division by zero",qr={},cc=void 0,PQ=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ih(t,e,n,o){var l=t.c;if(n===cc&&(n=t.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error(NQ);if(e<1)o=3===n&&(o||!!l[0])||0===e&&(1===n&&l[0]>=5||2===n&&(l[0]>5||5===l[0]&&(o||l[1]!==cc))),l.length=1,o?(t.e=t.e-e+1,l[0]=1):l[0]=t.e=0;else if(e=5||2===n&&(l[e]>5||5===l[e]&&(o||l[e+1]!==cc||1&l[e-1]))||3===n&&(o||!!l[0]),l.length=e,o)for(;++l[--e]>9;)if(l[e]=0,0===e){++t.e,l.unshift(1);break}for(e=l.length;!l[--e];)l.pop()}return t}function kp(t,e,n){var o=t.e,l=t.c.join(""),m=l.length;if(e)l=l.charAt(0)+(m>1?"."+l.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(o>0)if(++o>m)for(o-=m;o--;)l+="0";else o1&&(l=l.charAt(0)+"."+l.slice(1));return t.s<0&&n?"-"+l:l}qr.abs=function(){var t=new this.constructor(this);return t.s=1,t},qr.cmp=function(t){var e,n=this,o=n.c,l=(t=new n.constructor(t)).c,m=n.s,N=t.s,J=n.e,ee=t.e;if(!o[0]||!l[0])return o[0]?m:l[0]?-N:0;if(m!=N)return m;if(e=m<0,J!=ee)return J>ee^e?1:-1;for(N=(J=o.length)<(ee=l.length)?J:ee,m=-1;++ml[m]^e?1:-1;return J==ee?0:J>ee^e?1:-1},qr.div=function(t){var e=this,n=e.constructor,o=e.c,l=(t=new n(t)).c,m=e.s==t.s?1:-1,N=n.DP;if(N!==~~N||N<0||N>_h)throw Error(Ob);if(!l[0])throw Error(_D);if(!o[0])return t.s=m,t.c=[t.e=0],t;var J,ee,oe,ue,ge,Ie=l.slice(),Re=J=l.length,Te=o.length,ke=o.slice(0,J),Ue=ke.length,Ge=t,nt=Ge.c=[],Xe=0,St=N+(Ge.e=e.e-t.e)+1;for(Ge.s=m,m=St<0?0:St,Ie.unshift(0);Ue++Ue?1:-1;else for(ge=-1,ue=0;++geke[ge]?1:-1;break}if(!(ue<0))break;for(ee=Ue==J?l:Ie;Ue;){if(ke[--Ue]St&&Ih(Ge,St,n.RM,ke[0]!==cc),Ge},qr.eq=function(t){return 0===this.cmp(t)},qr.gt=function(t){return this.cmp(t)>0},qr.gte=function(t){return this.cmp(t)>-1},qr.lt=function(t){return this.cmp(t)<0},qr.lte=function(t){return this.cmp(t)<1},qr.minus=qr.sub=function(t){var e,n,o,l,m=this,N=m.constructor,J=m.s,ee=(t=new N(t)).s;if(J!=ee)return t.s=-ee,m.plus(t);var oe=m.c.slice(),ue=m.e,ge=t.c,Ie=t.e;if(!oe[0]||!ge[0])return ge[0]?t.s=-ee:oe[0]?t=new N(m):t.s=1,t;if(J=ue-Ie){for((l=J<0)?(J=-J,o=oe):(Ie=ue,o=ge),o.reverse(),ee=J;ee--;)o.push(0);o.reverse()}else for(n=((l=oe.length0)for(;ee--;)oe[e++]=0;for(ee=e;n>J;){if(oe[--n]0?(ee=N,o=oe):(e=-e,o=J),o.reverse();e--;)o.push(0);o.reverse()}for(J.length-oe.length<0&&(o=oe,oe=J,J=o),e=oe.length,n=0;e;J[e]%=10)n=(J[--e]=J[e]+oe[e]+n)/10|0;for(n&&(J.unshift(n),++ee),e=J.length;0===J[--e];)J.pop();return t.c=J,t.e=ee,t},qr.pow=function(t){var e=this,n=new e.constructor("1"),o=n,l=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(Mh+"exponent");for(l&&(t=-t);1&t&&(o=o.times(e)),t>>=1;)e=e.times(e);return l?n.div(o):o},qr.prec=function(t,e){if(t!==~~t||t<1||t>_h)throw Error(Mh+"precision");return Ih(new this.constructor(this),t,e)},qr.round=function(t,e){if(t===cc)t=0;else if(t!==~~t||t<-_h||t>_h)throw Error(Ob);return Ih(new this.constructor(this),t+this.e+1,e)},qr.sqrt=function(){var t,e,n,o=this,l=o.constructor,m=o.s,N=o.e,J=new l("0.5");if(!o.c[0])return new l(o);if(m<0)throw Error(mm+"No square root");0===(m=Math.sqrt(o+""))||m===1/0?((e=o.c.join("")).length+N&1||(e+="0"),N=((N+1)/2|0)-(N<0||1&N),t=new l(((m=Math.sqrt(e))==1/0?"5e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+N)):t=new l(m+""),N=t.e+(l.DP+=4);do{n=t,t=J.times(n.plus(o.div(n)))}while(n.c.slice(0,N).join("")!==t.c.slice(0,N).join(""));return Ih(t,(l.DP-=4)+t.e+1,l.RM)},qr.times=qr.mul=function(t){var e,n=this,o=n.constructor,l=n.c,m=(t=new o(t)).c,N=l.length,J=m.length,ee=n.e,oe=t.e;if(t.s=n.s==t.s?1:-1,!l[0]||!m[0])return t.c=[t.e=0],t;for(t.e=ee+oe,Nee;)J=e[oe]+m[ee]*l[oe-ee-1]+J,e[oe--]=J%10,J=J/10|0;e[oe]=J}for(J?++t.e:e.shift(),ee=e.length;!e[--ee];)e.pop();return t.c=e,t},qr.toExponential=function(t,e){var n=this,o=n.c[0];if(t!==cc){if(t!==~~t||t<0||t>_h)throw Error(Ob);for(n=Ih(new n.constructor(n),++t,e);n.c.length_h)throw Error(Ob);for(t=t+(n=Ih(new n.constructor(n),t+n.e+1,e)).e+1;n.c.length=e.PE,!!t.c[0])},qr.toNumber=function(){var t=Number(kp(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(mm+"Imprecise conversion");return t},qr.toPrecision=function(t,e){var n=this,o=n.constructor,l=n.c[0];if(t!==cc){if(t!==~~t||t<1||t>_h)throw Error(Mh+"precision");for(n=Ih(new o(n),t,e);n.c.length=o.PE,!!l)},qr.valueOf=function(){var t=this,e=t.constructor;if(!0===e.strict)throw Error(mm+"valueOf disallowed");return kp(t,t.e<=e.NE||t.e>=e.PE,!0)};var kQ=function MD(){function t(e){var n=this;if(!(n instanceof t))return e===cc?MD():new t(e);if(e instanceof t)n.s=e.s,n.e=e.e,n.c=e.c.slice();else{if("string"!=typeof e){if(!0===t.strict&&"bigint"!=typeof e)throw TypeError(Mh+"value");e=0===e&&1/e<0?"-0":String(e)}!function RQ(t,e){var n,o,l;if(!PQ.test(e))throw Error(Mh+"number");for(t.s="-"==e.charAt(0)?(e=e.slice(1),-1):1,(n=e.indexOf("."))>-1&&(e=e.replace(".","")),(o=e.search(/e/i))>0?(n<0&&(n=o),n+=+e.slice(o+1),e=e.substring(0,o)):n<0&&(n=e.length),l=e.length,o=0;o0&&"0"==e.charAt(--l););for(t.e=n-o-1,t.c=[],n=0;o<=l;)t.c[n++]=+e.charAt(o++)}return t}(n,e)}n.constructor=t}return t.prototype=qr,t.DP=CQ,t.RM=xQ,t.NE=DQ,t.PE=TQ,t.strict=OQ,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();const LQ=kQ;class vm{constructor(){this.addMessage=new wo}ngOnInit(){this.maxValue=LQ(this.account.amount).div(10**24).toString()}onSubmit(e){this.addMessage.emit(e)}}function FQ(t,e){if(1&t){const n=zg();si(0,"button",1),ji("click",function(){io(n);return Do(_a(2).switchAccount())}),Si(1," Switch Account "),Wr()}}function BQ(t,e){if(1&t&&ks(0,"near-wallet-selector-messages",5),2&t){bo("messages",_a(2).messages)}}function jQ(t,e){if(1&t){const n=zg();Vg(0),si(1,"div")(2,"button",1),ji("click",function(){io(n);return Do(_a().signOut())}),Si(3,"Log out"),Wr(),si(4,"button",1),ji("click",function(){io(n);return Do(_a().switchWallet())}),Si(5,"Switch Wallet"),Wr(),si(6,"button",1),ji("click",function(){io(n);return Do(_a().onVerifyOwner())}),Si(7,"Verify Owner"),Wr(),si(8,"button",1),ji("click",function(){io(n);return Do(_a().onSignMessage())}),Si(9,"Sign Message"),Wr(),Sa(10,FQ,2,0,"button",2),Wr(),si(11,"near-wallet-selector-form",3),ji("addMessage",function(l){io(n);return Do(_a().onSubmit(l))}),Wr(),Sa(12,BQ,1,1,"near-wallet-selector-messages",4),Hg()}if(2&t){const n=_a();Jo(10),bo("ngIf",n.accounts.length>1),Jo(1),bo("account",n.account),Jo(1),bo("ngIf",!!n.messages.length)}}function UQ(t,e){if(1&t){const n=zg();Vg(0),si(1,"button",1),ji("click",function(){io(n);return Do(_a().signIn())}),Si(2,"Log In"),Wr(),ks(3,"near-wallet-selector-sign-in"),Hg()}}vm.\u0275fac=function(e){return new(e||vm)},vm.\u0275cmp=xs({type:vm,selectors:[["near-wallet-selector-form"]],inputs:{account:"account"},outputs:{addMessage:"addMessage"},decls:20,vars:3,consts:[[3,"ngSubmit"],["id","fieldset"],[1,"highlight"],["for","message"],["autoComplete","off","autoFocus","","id","message","required",""],["for","donation"],["autocomplete","off","id","donation","min","0","step","0.01","type","number",3,"defaultValue","max"],["title","NEAR Tokens"],["htmlFor","multiple"],["id","multiple","type","checkbox"],["type","submit"]],template:function(e,n){1&e&&(si(0,"form",0),ji("ngSubmit",function(l){return n.onSubmit(l)}),si(1,"fieldset",1)(2,"p"),Si(3),Wr(),si(4,"p",2)(5,"label",3),Si(6,"Message:"),Wr(),ks(7,"input",4),Wr(),si(8,"p")(9,"label",5),Si(10,"Donation (optional):"),Wr(),ks(11,"input",6),si(12,"span",7),Si(13,"\u24c3"),Wr()(),si(14,"p")(15,"label",8),Si(16,"Multiple Transactions:"),Wr(),ks(17,"input",9),Wr(),si(18,"button",10),Si(19,"Sign"),Wr()()()),2&e&&(Jo(3),k0("Sign the guest book, ",n.account.account_id,"!"),Jo(8),qw("max",n.maxValue),bo("defaultValue","0"))},dependencies:[ap,ip,Sf]});const ID=Zn.utils.format.parseNearAmount("0.00000000003");class bm{ngOnInit(){var e=this;return(0,Le.Z)(function*(){const[n,o]=yield Promise.all([e.getMessages(),e.getAccount()]);e.account=o,e.messages=n,e.subscribeToEvents(),yield e.verifyMessageBrowserWallet()})()}getAccountBalance({provider:e,accountId:n}){return(0,Le.Z)(function*(){try{const{amount:o}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(o).isZero()}}catch{return{hasBalance:!1}}})()}getAccount(){var e=this;return(0,Le.Z)(function*(){if(!e.accountId)return null;const{network:n}=e.selector.options,o=new Zn.providers.JsonRpcProvider({url:n.nodeUrl}),{hasBalance:l}=yield e.getAccountBalance({provider:o,accountId:e.accountId});return l?o.query({request_type:"view_account",finality:"final",account_id:e.accountId}).then(m=>({...m,account_id:e.accountId})):(window.alert(`Account ID: ${e.accountId} has not been founded. Please send some NEAR into this account.`),yield(yield e.selector.wallet()).signOut(),null)})()}signIn(){this.modal.show()}signOut(){var e=this;return(0,Le.Z)(function*(){(yield e.selector.wallet()).signOut().catch(o=>{console.log("Failed to sign out"),console.error(o)})})()}switchWallet(){this.modal.show()}getMessages(){const{network:e}=this.selector.options;return new Zn.providers.JsonRpcProvider({url:e.nodeUrl}).query({request_type:"call_function",account_id:ED,method_name:"getMessages",args_base64:"",finality:"optimistic"}).then(o=>JSON.parse(Buffer.from(o.result).toString()))}switchAccount(){const e=this.accounts.findIndex(l=>l.accountId===this.accountId),n=e{const N=new x2({message:n,nonce:o,recipient:l,callbackUrl:m}),J=(0,L5.serialize)(F5,N),ee=Uint8Array.from(AF.sha256.array(J)),oe=Buffer.from(e,"base64");return Zn.utils.PublicKey.from(t).verify(ee,oe)})({message:e.message,nonce:e.nonce,recipient:e.recipient,publicKey:n.publicKey,signature:n.signature,callbackUrl:e.callbackUrl}),J=(yield MF({publicKey:n.publicKey,accountId:n.accountId,network:o.selector.options.network}))&&l?"Successfully verified":"Failed to verify";alert(`${J} signed message: '${e.message}': \n ${JSON.stringify(n)}`)})()}verifyMessageBrowserWallet(){var e=this;return(0,Le.Z)(function*(){const n=new URLSearchParams(window.location.hash.substring(1)),o=n.get("accountId"),l=n.get("publicKey"),m=n.get("signature");if(!o&&!l&&!m)return;const N=JSON.parse(localStorage.getItem("message")),J={accountId:o,publicKey:l,signature:m};yield e.verifyMessage(N,J);const ee=new URL(location.href);ee.hash="",ee.search="",window.history.replaceState({},document.title,ee),localStorage.removeItem("message")})()}onSignMessage(){var e=this;return(0,Le.Z)(function*(){const n=yield e.selector.wallet(),o="test message to sign",l=Buffer.from(Array.from(Array(32).keys())),m="guest-book.testnet";"browser"===n.type&&localStorage.setItem("message",JSON.stringify({message:o,nonce:[...l],recipient:m,callbackUrl:location.href}));try{const N=yield n.signMessage({message:o,nonce:l,recipient:m});N&&(yield e.verifyMessage({message:o,nonce:l,recipient:m},N))}catch(N){const J=N instanceof Error?N.message:"Something went wrong";alert(J)}})()}subscribeToEvents(){this.subscription=this.selector.store.observable.pipe(tt(e=>e.accounts),function SQ(t,e=ve){return t=t??_Q,Ve((n,o)=>{let l,m=!0;n.subscribe(Ut(o,N=>{const J=e(N);(m||!t(l,J))&&(m=!1,l=J,o.next(N))}))})}()).subscribe(e=>{console.log("Accounts Update",e),this.accounts=e,this.accountId=e.find(n=>n.active)?.accountId||null,this.getAccount().then(n=>{this.account=n})}),this.modal.on("onHide",({hideReason:e})=>{console.log(`The reason for hiding the modal ${e}`)})}addMessages(e,n,o){var l=this;return(0,Le.Z)(function*(){const{contract:m}=l.selector.store.getState(),N=yield l.selector.wallet();if(!o)return N.signAndSendTransaction({signerId:l.accountId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:e},gas:ID,deposit:Zn.utils.format.parseNearAmount(n)}}]}).catch(ee=>{throw alert("Failed to add message"),console.log("Failed to add message"),ee});const J=[];for(let ee=0;ee<2;ee+=1)J.push({signerId:l.accountId,receiverId:m.contractId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:`${e} (${ee+1}/2)`},gas:ID,deposit:Zn.utils.format.parseNearAmount(n)}}]});return N.signAndSendTransactions({transactions:J}).catch(ee=>{throw alert("Failed to add messages"),console.log("Failed to add messages"),ee})})()}onSubmit(e){var n=this;return(0,Le.Z)(function*(){const{fieldset:o,message:l,donation:m,multiple:N}=e.target.elements;o.disabled=!0,n.addMessages(l.value,m.value||"0",N.checked).then(()=>n.getMessages().then(J=>{n.messages=J,l.value="",m.value="0",o.disabled=!1,N.checked=!1,l.focus()}).catch(J=>{throw alert("Failed to refresh messages"),console.log("Failed to refresh messages"),J})).catch(J=>{console.error(J),o.disabled=!1})})()}ngOnDestroy(){this.subscription?.unsubscribe()}}bm.\u0275fac=function(e){return new(e||bm)},bm.\u0275cmp=xs({type:bm,selectors:[["near-wallet-selector-content"]],inputs:{selector:"selector",modal:"modal",accounts:"accounts",accountId:"accountId"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"],[3,"click",4,"ngIf"],[3,"account","addMessage"],[3,"messages",4,"ngIf"],[3,"messages"]],template:function(e,n){1&e&&(Sa(0,jQ,13,3,"ng-container",0),Sa(1,UQ,4,0,"ng-container",0)),2&e&&(bo("ngIf",n.account),Jo(1),bo("ngIf",!n.accountId))},dependencies:[il,gm,ym,vm]});class Lp{}function VQ(t,e){1&t&&ks(0,"near-wallet-selector-loading")}function HQ(t,e){if(1&t&&ks(0,"near-wallet-selector-content",2),2&t){const n=_a();bo("selector",n.selector)("accounts",n.accounts)("accountId",n.accountId)("modal",n.modal)}}Lp.\u0275fac=function(e){return new(e||Lp)},Lp.\u0275cmp=xs({type:Lp,selectors:[["near-wallet-selector-loading"]],decls:5,vars:0,consts:[[1,"lds-ellipsis"]],template:function(e,n){1&e&&(si(0,"div",0),ks(1,"div")(2,"div")(3,"div")(4,"div"),Wr())},styles:[".lds-ellipsis[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;margin:auto}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--fg);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis1 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){left:32px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){left:56px;animation:_ngcontent-%COMP%_lds-ellipsis3 .6s infinite}@keyframes _ngcontent-%COMP%_lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}"]});class wm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Le.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Le.Z)(function*(){const n=yield P5({network:"testnet",debug:!0,modules:[T1(),wD(),$5(),t8(),n8(),r8(),i8(),o8(),a8(),u8(),c8(),l8(),f8(),tj(),WI({bundle:!1}),GI(),tD({projectId:"c8cb6204543639c31aef44ea4837a554",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),fD(),AD()]}),o=rB(n,{contractId:ED}),l=n.store.getState();e.accounts=l.accounts,e.accountId=l.accounts.find(m=>m.active)?.accountId||null,window.selector=n,window.modal=o,e.selector=n,e.modal=o})()}}wm.\u0275fac=function(e){return new(e||wm)},wm.\u0275cmp=xs({type:wm,selectors:[["near-wallet-selector-wallet-selector"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"selector","accounts","accountId","modal",4,"ngIf"],[3,"selector","accounts","accountId","modal"]],template:function(e,n){1&e&&(Sa(0,VQ,1,0,"near-wallet-selector-loading",0),Sa(1,HQ,1,4,"near-wallet-selector-content",1)),2&e&&(bo("ngIf",!n.modal||!n.selector),Jo(1),bo("ngIf",!!n.selector))},dependencies:[il,bm,Lp]});var Ot=y(18348),zQ=y(49965),Gr=y(54284);const WQ=({selector:t,handleWalletClick:e})=>{const[n,o]=(0,Gr.useState)([]),[l,m]=(0,Gr.useState)("");function N(J){return J.reduce((ee,oe,ue)=>{const{selectedWalletId:ge}=t.store.getState(),{name:Ie,iconUrl:Re,deprecated:Te}=oe.metadata,ke=oe.id===ge;return ee.push((0,Ot.jsxs)("li",{tabIndex:0,className:`single-wallet ${l===oe.id?"selected-wallet":""} ${ke?"connected-wallet":""} ${Te?"deprecated-wallet":""} sidebar ${oe.id}`,onClick:()=>(oe.id===J[ue].id&&m(oe.id),e(oe)),children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:Re,alt:Ie})}),(0,Ot.jsxs)("div",{className:"import-content",children:[(0,Ot.jsx)("div",{className:"title",children:Ie}),(0,Ot.jsx)("div",{className:"import-type",children:Sn(`modal.exportAccounts.walletTypes.${oe.type}`)})]}),Te&&(0,Ot.jsx)("div",{className:"warning-triangle",children:(0,Ot.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("path",{d:"M4.95215 16.3536L10.2152 5.85657C10.9531 4.38481 13.0538 4.38519 13.7912 5.85723L19.0494 16.3543C19.7156 17.6841 18.7486 19.25 17.2612 19.25H6.74001C5.25228 19.25 4.28535 17.6835 4.95215 16.3536Z",stroke:"#E6B73E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("path",{d:"M12 10V12",stroke:"#E6B73E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("path",{d:"M12.5 16C12.5 16.2761 12.2761 16.5 12 16.5C11.7239 16.5 11.5 16.2761 11.5 16C11.5 15.7239 11.7239 15.5 12 15.5C12.2761 15.5 12.5 15.7239 12.5 16Z",stroke:"#E6B73E"})]})})]},oe.id)),ee},[])}return(0,Gr.useEffect)(()=>{const J=t.store.observable.subscribe(ee=>{o(ee.modules)});return()=>J.unsubscribe()},[]),(0,Ot.jsx)("div",{children:t.options.optimizeWalletOrder&&t.store.getState().recentlySignedInWallets.length>0?(0,Ot.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ot.jsx)("div",{className:"options-list-section",children:(0,Ot.jsx)("div",{className:"options-list more-options-list-content",children:N(n)})})}):(0,Ot.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ot.jsx)("div",{className:"options-list",children:N(n)})})})},CD=({onClick:t})=>(0,Ot.jsx)("button",{onClick:t,className:"back-button",children:(0,Ot.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ot.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),GQ=({onClick:t})=>(0,Ot.jsx)("button",{onClick:t,className:"close-button",children:(0,Ot.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1",children:[(0,Ot.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Ot.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})}),Ch=({title:t,onCloseModal:e,onBack:n})=>{const o="Get a Wallet"===t?" -open":"";return(0,Ot.jsxs)("div",{className:"nws-modal-header",children:[n&&(0,Ot.jsx)(CD,{onClick:n}),(0,Ot.jsx)("h3",{className:`middleTitle ${o}`,children:t}),(0,Ot.jsx)(GQ,{onClick:e})]})},ZQ=({message:t,module:e,onBack:n,onCloseModal:o})=>(0,Ot.jsxs)(Gr.Fragment,{children:[(0,Ot.jsx)(Ch,{title:"",onCloseModal:o,onBack:n}),(0,Ot.jsx)("div",{className:"alert-message connecting-wrapper connecting-wrapper-err",children:(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:e?.metadata.iconUrl,alt:e?.metadata.name})}),(0,Ot.jsx)("h3",{className:"connecting-name",children:e?.metadata.name}),(0,Ot.jsx)("h4",{children:t})]})})]}),YQ=({module:t,onBack:e,onCloseModal:n})=>(0,Ot.jsxs)(Gr.Fragment,{children:[(0,Ot.jsxs)("div",{className:"nws-modal-header-wrapper",children:[(0,Ot.jsx)(CD,{onClick:e}),(0,Ot.jsx)(Ch,{title:"",onCloseModal:n})]}),(0,Ot.jsxs)("div",{className:"wallet-not-installed-wrapper",children:[(0,Ot.jsxs)("div",{className:"wallet-data",children:[(0,Ot.jsx)("div",{className:`wallet-icon-box ${t.id}`,children:(0,Ot.jsx)("img",{src:t.metadata.iconUrl,alt:t.metadata.name})}),(0,Ot.jsx)("p",{children:t.metadata.name})]}),(0,Ot.jsxs)("p",{children:[Sn("modal.install.youllNeedToInstall")," ",t.metadata.name," ",Sn("modal.install.toContinueAfterInstalling"),(0,Ot.jsxs)("span",{className:"refresh-link",onClick:()=>window.location.reload(),children:[" ",Sn("modal.install.refreshThePage")]})]}),(0,Ot.jsx)("div",{className:"action-buttons",children:(0,Ot.jsxs)("button",{className:"middleButton",onClick:()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")},children:[Sn("modal.install.open")," ",t.metadata.name]})})]})]}),JQ=({onCloseModal:t})=>(0,Ot.jsxs)("div",{className:"wallet-home-wrapper",children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(Ch,{title:Sn("modal.exportAccounts.transferYourAccounts"),onCloseModal:t})}),(0,Ot.jsxs)("div",{className:"wallet-info-wrapper what-wallet-hide",children:[(0,Ot.jsxs)("div",{className:"wallet-what",children:[(0,Ot.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17897)"}),(0,Ot.jsx)("g",{opacity:"0.7",children:(0,Ot.jsx)("path",{d:"M23 43.5H16.3333C15.4493 43.5 14.6014 43.1488 13.9763 42.5237C13.3512 41.8986 13 41.0507 13 40.1667V16.8333C13 15.9493 13.3512 15.1014 13.9763 14.4763C14.6014 13.8512 15.4493 13.5 16.3333 13.5H23M34.6667 36.8333L43 28.5M43 28.5L34.6667 20.1667M43 28.5H23",stroke:"#568FFC",strokeWidth:"3.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("radialGradient",{id:"paint0_radial_2563_17897",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ot.jsx)("stop",{stopColor:"#112140"}),(0,Ot.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ot.jsxs)("div",{className:"content-side",children:[(0,Ot.jsx)("h3",{children:Sn("modal.exportAccounts.chooseAWallet")}),(0,Ot.jsx)("p",{children:Sn("modal.exportAccounts.selectAWallet")})]})]}),(0,Ot.jsxs)("div",{className:"wallet-what",children:[(0,Ot.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17904)"}),(0,Ot.jsxs)("g",{opacity:"0.7",children:[(0,Ot.jsx)("path",{d:"M13 28.5C13 20.2157 19.7157 13.5 28 13.5C36.2843 13.5 43 20.2157 43 28.5C43 29.4205 43.7462 30.1667 44.6667 30.1667C45.5871 30.1667 46.3333 29.4205 46.3333 28.5C46.3333 18.3748 38.1252 10.1667 28 10.1667C17.8748 10.1667 9.66667 18.3748 9.66667 28.5C9.66667 29.4205 10.4129 30.1667 11.3333 30.1667C12.2538 30.1667 13 29.4205 13 28.5Z",fill:"#568FFC"}),(0,Ot.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38 28.5C38 31.0612 37.0372 33.3975 35.4537 35.1667H42.6434C43.8167 35.1667 44.6152 36.3476 44.0465 37.3738C40.9203 43.0147 34.9061 46.8333 28 46.8333C21.0939 46.8333 15.0796 43.0147 11.9535 37.3738C11.3848 36.3476 12.1833 35.1667 13.3566 35.1667H20.5463C18.9628 33.3975 18 31.0612 18 28.5C18 22.9771 22.4772 18.5 28 18.5C33.5228 18.5 38 22.9771 38 28.5ZM28 35.1667C31.6819 35.1667 34.6667 32.1819 34.6667 28.5C34.6667 24.8181 31.6819 21.8333 28 21.8333C24.3181 21.8333 21.3333 24.8181 21.3333 28.5C21.3333 32.1819 24.3181 35.1667 28 35.1667ZM16.8189 38.5H39.1811C36.4319 41.572 32.4397 43.5 28 43.5C23.5603 43.5 19.5681 41.572 16.8189 38.5Z",fill:"#568FFC"})]}),(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("radialGradient",{id:"paint0_radial_2563_17904",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ot.jsx)("stop",{stopColor:"#112140"}),(0,Ot.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ot.jsxs)("div",{className:"content-side",children:[(0,Ot.jsx)("h3",{children:Sn("modal.exportAccounts.selectYourAccounts")}),(0,Ot.jsx)("p",{children:Sn("modal.exportAccounts.afterDecide")})]})]}),(0,Ot.jsx)("div",{className:"button-spacing"}),(0,Ot.jsx)("div",{className:"middleContainer",children:(0,Ot.jsx)("p",{children:Sn("modal.exportAccounts.disclaimer")})})]})]}),qQ=({hasBalance:t,type:e})=>e===bl.UNKNOWN?(0,Ot.jsx)("span",{className:"error",children:Sn("modal.exportAccounts.selectAccounts.error")}):e===bl.LEDGER?(0,Ot.jsx)("span",{className:"warning",children:Sn("modal.exportAccounts.selectAccounts.warningLedger")}):t?null:(0,Ot.jsx)("span",{className:"warning",children:Sn("modal.exportAccounts.selectAccounts.noBalance")}),XQ=({onCloseModal:t,onBack:e,selectedAccounts:n,setSelectedAccounts:o,accountsWithDetail:l,disabledAccounts:m,onNextStep:N,isLoading:J,buttonLabel:ee})=>{const oe=(Ie,Re)=>{o(Re?[...n,Ie]:n.filter(Te=>Te!==Ie))},ge=n.length===l.length?Sn("modal.exportAccounts.selectAccounts.deselectAll"):Sn("modal.exportAccounts.selectAccounts.selectAll");return(0,Gr.useEffect)(()=>{n.length||o(l.map(({accountId:Ie})=>Ie))},[l.length]),(0,Ot.jsxs)(Gr.Fragment,{children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(Ch,{title:Sn("modal.exportAccounts.selectAccounts.title"),onCloseModal:t,onBack:e})}),(0,Ot.jsx)("div",{className:"account-export connecting-wrapper",children:(0,Ot.jsx)("div",{className:"content",children:J?(0,Ot.jsx)("div",{className:"connecting-details",children:(0,Ot.jsx)("div",{className:"spinner account-selection-spinner",children:(0,Ot.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAA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FhsLB7rev3JLQKVSyfjmaW2BJSavDlqR7c5VrR+4AbLttbkXMehH7gjA8gZiD/tq+Or/ABZ3dUW/J62LcPUGcrW8pKSVFAg6cHz3O0l25qZHa/XGwWPg9aAwwzdZAaDX+7tbNsMYf5+bpaUS0dDQEF8rtsUxCbI5e5KRzGhBMiqNxllKju7d8NOYXjseRBytQngcVDL3wD9H+7vf3YS7mnnzqrZpwSxrwkh04cpM5NTMyJdHbIgaESyxJ6tZ5cDbw3qd0tqVCp25Se/4yYdr5/zm/ehjwvpxZHgN0Wlub0/Yt7awdykqRYFHy6NUQVrBd4o6p6ngrVL2Bo8ksuJqoXzq9Ln9m6rj9U74b6Wjo8OeP082aY5NUxRsYzwDkeFsU+MdUU3U4PG0QtbahqhadDMuHTy4fvS/9EwIUpdeuW/ZiShOipFxURRbNdWETFMRZrCFlEZGkuPHdycTafgLExNiI6YfUpcAAAAASUVORK5CYII=",alt:"loading-icon"})})}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("div",{className:"account-selection-container",children:[(0,Ot.jsx)("span",{className:"account-select-all",onClick:()=>{n.length!==l.length?o(l.map(({accountId:Ie})=>Ie)):o([])},children:ge}),(0,Ot.jsx)("div",{className:"account-selection",children:l.map(({accountId:Ie})=>(0,Ot.jsx)("div",{className:"account-selection-row",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:Re=>{oe(Ie,Re.target.checked)},checked:n.includes(Ie),type:"checkbox",id:Ie,name:Ie,value:Ie}),(0,Ot.jsx)("label",{htmlFor:Ie,title:Ie,children:(0,Ot.jsx)("span",{className:"label",children:Ie})})]})},Ie))}),m.length>0&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("span",{className:"account-unavailable",children:Sn("modal.exportAccounts.selectAccounts.unavailable")}),(0,Ot.jsx)("div",{className:"account-selection",children:m.map(({accountId:Ie,type:Re,hasBalance:Te})=>(0,Ot.jsx)("div",{className:"account-selection-row",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:ke=>{oe(Ie,ke.target.checked)},checked:n.includes(Ie),type:"checkbox",id:Ie,name:Ie,value:Ie,disabled:!0}),(0,Ot.jsxs)("label",{htmlFor:Ie,title:Ie,children:[(0,Ot.jsx)("span",{className:"account-id",children:Ie}),qQ({hasBalance:Te,type:Re})]})]})},Ie))})]}),(0,Ot.jsx)("div",{className:"filler"})]}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:N,disabled:0===n.length,children:Sn(ee)})]})})})]})};var $Q=y(40489),Nb=y.n($Q),Pb=y(47768);const nq=({children:t,copy:e,onClick:n,id:o})=>{const[l,m]=(0,Gr.useState)(!1);return(0,Ot.jsxs)("button",{title:Sn("component.clickToCopy.tooltip"),className:"click-to-copy",onClick:()=>{m(!0),setTimeout(()=>m(!1),2e3);const J=document.createElement("textarea");J.innerHTML=e,document.body.appendChild(J),J.select();const ee=document.execCommand("copy");return document.body.removeChild(J),n&&n(e),ee},id:o,children:[t,(0,Ot.jsx)("div",{className:"copy-success"+(l?" show":""),children:Sn("component.clickToCopy.label")})]})},rq=({onNextStep:t,hasCopied:e,setHasCopied:n,onCloseModal:o,onBack:l,onPassphraseSave:m})=>{const[N,J]=(0,Gr.useState)("");(0,Gr.useEffect)(()=>{const ue=(()=>{const t=Nb().randomBytes(24);return(0,Pb.encodeBase64)(t)})();J(ue)},[]);return(0,Ot.jsxs)(Gr.Fragment,{children:[(0,Ot.jsx)(Ch,{title:Sn("modal.exportAccounts.getPassphrase.title"),onCloseModal:o,onBack:l}),(0,Ot.jsx)("div",{className:"account-export",children:(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("h4",{className:"passphrase-title",children:Sn("modal.exportAccounts.getPassphrase.desc")}),(0,Ot.jsx)(nq,{copy:N,id:"passphraseButton",children:(0,Ot.jsx)("div",{className:"passphrase-text",children:N})}),(0,Ot.jsx)("label",{htmlFor:"passphraseButton",className:"passphrase-label",children:Sn("modal.exportAccounts.getPassphrase.label")}),(0,Ot.jsx)("div",{className:"filler"}),(0,Ot.jsx)("div",{className:"passphrase-check-container",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:ue=>{n(ue.target.checked),m(N)},checked:e,type:"checkbox",id:"passphrase-check",name:"passphrase-check",value:"passphrase-check"}),(0,Ot.jsx)("label",{htmlFor:"passphrase-check",children:(0,Ot.jsx)("span",{className:"label",children:Sn("modal.exportAccounts.getPassphrase.checkLabel")})})]})}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t()},disabled:!e,children:Sn("modal.exportAccounts.getPassphrase.transferButton")})]})})]})},iq=({src:t,name:e,alertMessage:n,onCloseModal:o,onBack:l})=>(0,Ot.jsxs)("div",{className:"account-export connecting-wrapper",children:[(0,Ot.jsx)(Ch,{title:"No interface found",onCloseModal:o,onBack:l}),(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:t,alt:e})}),(0,Ot.jsx)("h3",{className:"connecting-name",children:e}),(0,Ot.jsx)("p",{children:n})]})]}),oq=({onComplete:t,onBack:e,onCloseModal:n,onStartOver:o})=>(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(Ch,{title:Sn("modal.exportAccounts.complete.title"),onCloseModal:n,onBack:e})}),(0,Ot.jsxs)("div",{className:"complete-desc",children:[(0,Ot.jsx)("h4",{className:"content",children:Sn("modal.exportAccounts.complete.descOne")}),(0,Ot.jsx)("h4",{className:"content",children:Sn("modal.exportAccounts.complete.descTwo")})]}),(0,Ot.jsx)("button",{className:"middleButton account-export-button secondary",onClick:o,children:Sn("modal.exportAccounts.complete.startOverButton")}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t(),n()},children:Sn("modal.exportAccounts.complete.button")})]}),ja_ACCOUNT_SELECTION="ACCOUNT_SELECTION",ja_GET_PASSPHRASE="GET_PASSPHRASE",ja_NO_INTERFACE="NO_INTERFACE",ja_COMPLETE="COMPLETE",bl={LEDGER:"Ledger",FULL_ACCESS_KEY:"Full Access Key",MULTI_SIG:"Multi-Sig",UNKNOWN:"Unknown"},sq=t=>{if("FullAccess"===t)return bl.FULL_ACCESS_KEY;if(t?.FunctionCall?.method_names.includes("__wallet__metadata"))return bl.LEDGER;const e=["add_request","add_request_and_confirm","delete_request","confirm"];return t?.FunctionCall?.method_names.every(n=>e.includes(n))?bl.MULTI_SIG:bl.UNKNOWN},aq=function(){var t=(0,Le.Z)(function*({provider:e,accountId:n,publicKey:o}){try{const{permission:l}=yield e.query({request_type:"view_access_key",account_id:n,public_key:o,finality:"final"});return{type:sq(l)}}catch{return{type:bl.UNKNOWN}}});return function(n){return t.apply(this,arguments)}}(),uq=function(){var t=(0,Le.Z)(function*({provider:e,accountId:n}){try{const{amount:o}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(o).isZero()}}catch{return{hasBalance:!1}}});return function(n){return t.apply(this,arguments)}}(),cq=({alertMessage:t,module:e,onCloseModal:n,onWarning:o,accounts:l,selector:m,wallet:N,onBack:J,onComplete:ee})=>{const[oe,ue]=(0,Gr.useState)([]),[ge,Ie]=(0,Gr.useState)(!1),[Re,Te]=(0,Gr.useState)([]),[ke,Ue]=(0,Gr.useState)([]),[Ge,nt]=(0,Gr.useState)(""),[Xe,St]=(0,Gr.useState)({});(0,Gr.useEffect)(()=>{!function(){var vu=(0,Le.Z)(function*(){try{const{buildImportAccountsUrl:Ms,importAccountsInSecureContext:wl}=yield N.wallet();St({buildImportAccountsUrl:Ms,importAccountsInSecureContext:wl}),!Ms&&!wl&&o()}catch{o()}});return function(){return vu.apply(this,arguments)}}()()},[e?.metadata.name,t]);const{network:kt}=m.options,un=new Zn.providers.JsonRpcProvider({url:kt.nodeUrl}),[Nn,vn]=(0,Gr.useState)(!1);(0,Gr.useEffect)(()=>{const Ua=function(){var vu=(0,Le.Z)(function*(){Ie(!0);const Ms=yield Promise.all(l.map(function(){var Al=(0,Le.Z)(function*({accountId:bu,privateKey:Bp}){const Rb=Zn.utils.KeyPair.fromString(Bp),{type:K3}=yield aq({provider:un,accountId:bu,publicKey:Rb.getPublicKey().toString()}),{hasBalance:jp}=yield uq({provider:un,accountId:bu});return{accountId:bu,privateKey:Bp,type:K3,hasBalance:jp}});return function(bu){return Al.apply(this,arguments)}}())),wl=Ms.filter(({hasBalance:Al,type:bu})=>Al&&bu===bl.FULL_ACCESS_KEY);Te(wl);const Sm=Ms.filter(({hasBalance:Al,type:bu})=>!Al||bu!==bl.FULL_ACCESS_KEY);Ue(Sm),Ie(!1)});return function(){return vu.apply(this,arguments)}}();0===Re.length&&Ua()},[Xe.buildImportAccountsUrl,Xe.importAccountsInSecureContext]);const[pn,xn]=(0,Gr.useState)(ja_ACCOUNT_SELECTION);(0,Gr.useEffect)(()=>{xn(t?ja_NO_INTERFACE:ja_ACCOUNT_SELECTION)},[t]);const mr=()=>{xn(ja_GET_PASSPHRASE)},{buildImportAccountsUrl:ar,importAccountsInSecureContext:Ar}=Xe,jo=function(){var Ua=(0,Le.Z)(function*(){Ar?yield Ar({accounts:l.filter(({accountId:vu})=>oe.includes(vu))}):xn(ja_NO_INTERFACE)});return function(){return Ua.apply(this,arguments)}}();return(0,Ot.jsxs)(Gr.Fragment,{children:[pn===ja_NO_INTERFACE&&(0,Ot.jsx)(iq,{src:e?.metadata.iconUrl,name:e?.metadata.name,alertMessage:t,onBack:J,onCloseModal:n}),pn===ja_ACCOUNT_SELECTION&&(0,Ot.jsx)(XQ,{onCloseModal:n,onBack:J,selectedAccounts:oe,setSelectedAccounts:ue,accountsWithDetail:Re,disabledAccounts:ke,onNextStep:()=>{"injected"!==N.type||N.metadata.useUrlAccountImport?mr():(jo(),xn(ja_COMPLETE))},isLoading:ge,buttonLabel:"injected"===N.type?"modal.exportAccounts.getPassphrase.button":"modal.exportAccounts.selectAccounts.button"}),pn===ja_GET_PASSPHRASE&&(0,Ot.jsx)(rq,{onNextStep:()=>{const Ua=(({accountData:t,secretKey:e})=>{if(!e)throw new Error("Secret key is required");try{const n=(0,Pb.decodeBase64)(Buffer.from(e).toString("base64")),o=(0,Pb.decodeUTF8)(JSON.stringify(t)),l=Nb().randomBytes(Nb().secretbox.nonceLength),m=Nb().secretbox(o,l,n),N=new Uint8Array(l.length+m.length);return N.set(l),N.set(m,l.length),(0,Pb.encodeBase64)(N)}catch{throw new Error("Unable to encrypt account data")}})({accountData:l.filter(({accountId:Ms})=>oe.includes(Ms)),secretKey:Ge});if(("browser"===N.type||N.metadata.useUrlAccountImport)&&ar){const Ms=`${ar()}#${Ua}`;window.open(Ms,"_blank")}xn(ja_COMPLETE)},hasCopied:Nn,setHasCopied:vn,onCloseModal:n,onBack:()=>xn(ja_ACCOUNT_SELECTION),onPassphraseSave:nt}),pn===ja_COMPLETE&&(0,Ot.jsx)(oq,{onCloseModal:n,onBack:mr,onComplete:()=>{ee&&ee({accounts:oe,walletName:e?.metadata.name||"Unknown"})},onStartOver:J})]})},lq=t=>{switch(t){case"dark":return"dark-theme";case"light":return"light-theme";default:return""}},fq=({selector:t,options:e,visible:n,hide:o})=>{const[l,m]=(0,Gr.useState)({name:"WalletHome"}),[N,J]=(0,Gr.useState)(null),[ee,oe]=(0,Gr.useState)(),ue=()=>{m({name:"WalletHome"})};(0,Gr.useEffect)(()=>{m({name:"WalletHome"});const{selectedWalletId:Te,modules:ke}=t.store.getState();if(Te){const Ue=ke.find(Ge=>Ge.id===Te);oe(Ue)}},[n]);const ge=(0,Gr.useCallback)(()=>{J(null),ue(),o()},[o]);(0,Gr.useEffect)(()=>{const Te=ke=>{"Escape"===ke.key&&ge()};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[ge]);const Ie=function(){var Te=(0,Le.Z)(function*(ke){J(null),oe(ke);try{const{deprecated:Ue,available:Ge}=ke.metadata;return"injected"!==ke.type||Ge?Ue?(J(`${ke.metadata.name} is deprecated. Please select another wallet.`),void m({name:"AlertMessage",params:{module:ke}})):void m({name:"ExportAccounts",params:{module:ke}}):void m({name:"WalletNotInstalled",params:{module:ke}})}catch(Ue){const{name:Ge}=ke.metadata,nt=Ue instanceof Error?Ue.message:"Something went wrong";J(`Failed to sign in with ${Ge}: ${nt}`),m({name:"AlertMessage",params:{module:ke}})}});return function(Ue){return Te.apply(this,arguments)}}(),Re=(0,Gr.useCallback)(()=>{ee&&(J(`${ee?.metadata.name} ${Sn("modal.exportAccounts.warning")}`),m({name:"AlertMessage",params:{module:ee}}))},[ee]);return n?(0,Ot.jsxs)("div",{className:`nws-modal-wrapper ${lq(e?.theme)} ${n?"open":""}`,children:[(0,Ot.jsx)("div",{className:"nws-modal-overlay",onClick:ge}),(0,Ot.jsxs)("div",{className:"nws-modal",children:[(0,Ot.jsxs)("div",{className:"modal-left",children:[(0,Ot.jsx)("div",{className:"modal-left-title",children:(0,Ot.jsx)("h2",{children:Sn("modal.exportAccounts.chooseAWallet")})}),(0,Ot.jsx)(WQ,{handleWalletClick:Te=>{Ie(Te)},selector:t})]}),(0,Ot.jsx)("div",{className:"modal-right",children:(0,Ot.jsxs)("div",{className:"nws-modal-body account-export-body",children:["AlertMessage"===l.name&&N&&(0,Ot.jsx)(ZQ,{message:N,module:l.params?.module,onBack:()=>{J(null),ue()},onCloseModal:ge}),"WalletNotInstalled"===l.name&&(0,Ot.jsx)(YQ,{module:l.params?.module,onBack:()=>{ue()},onCloseModal:ge}),"WalletHome"===l.name&&(0,Ot.jsx)(JQ,{onCloseModal:ge}),"ExportAccounts"===l.name&&(0,Ot.jsx)(cq,{module:l.params?.module,alertMessage:N,onCloseModal:ge,onWarning:Re,onBack:ue,selector:t,accounts:e.accounts,wallet:ee,onComplete:e?.onComplete})]})})]})]}):null};let j3=null,U3=null;function pq(t,e){1&t&&ks(0,"near-wallet-selector-loading")}function gq(t,e){if(1&t){const n=zg();si(0,"div")(1,"button",1),ji("click",function(){io(n);return Do(_a().show())}),Si(2,"Open Modal"),Wr(),si(3,"p"),Si(4," The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive data in transit during this process will be encrypted with a randomly-generated password which the user will be required to copy down and use in the account import process on the target wallet. "),Wr()()}}class Am{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Le.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Le.Z)(function*(){const n=yield P5({network:"testnet",debug:!0,modules:[T1(),wD(),$5(),t8(),n8(),r8(),i8(),o8(),a8(),u8(),c8(),l8(),f8(),WI({bundle:!1}),GI(),tD({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),fD(),AD()]}),o=((t,e)=>{if(!U3){const o=document.body,l=document.createElement("div");l.id="near-wallet-selector-modal",o.appendChild(l),U3=(0,zQ.s)(l)}const n=o=>{U3.render((0,Ot.jsx)(fq,{selector:t,options:e,visible:o,hide:()=>n(!1)}))};return j3||(j3={show:()=>{n(!0)},hide:()=>{n(!1)}}),j3})(n,{accounts:[],onComplete:m=>{console.log("Transfer Completed: ",m)}}),l=n.store.getState();e.accounts=l.accounts,e.accountId=l.accounts.find(m=>m.active)?.accountId||null,window.exportSelector=n,window.exportModal=o,e.exportSelector=n,e.exportModal=o})()}show(){this.exportModal.show()}}function yq(t,e){1&t&&ks(0,"near-wallet-selector-wallet-selector")}function mq(t,e){1&t&&ks(0,"near-wallet-selector-wallet-selector-export")}Am.\u0275fac=function(e){return new(e||Am)},Am.\u0275cmp=xs({type:Am,selectors:[["near-wallet-selector-wallet-selector-export"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"]],template:function(e,n){1&e&&(Sa(0,pq,1,0,"near-wallet-selector-loading",0),Sa(1,gq,5,0,"div",0)),2&e&&(bo("ngIf",!n.exportModal||!n.exportSelector),Jo(1),bo("ngIf",n.exportModal||n.exportSelector))},dependencies:[il,Lp]});class Em{}Em.\u0275fac=function(e){return new(e||Em)},Em.\u0275cmp=xs({type:Em,selectors:[["near-wallet-selector-root"]],decls:8,vars:4,consts:[[1,"title-container"],[3,"click"],[4,"ngIf"]],template:function(e,n){1&e&&(si(0,"main")(1,"div",0)(2,"h1"),Si(3),Wr(),si(4,"button",1),ji("click",function(){return n.showImport=!n.showImport}),Si(5),Wr()(),Sa(6,yq,1,0,"near-wallet-selector-wallet-selector",2),Sa(7,mq,1,0,"near-wallet-selector-wallet-selector-export",2),Wr()),2&e&&(Jo(3),Wv(n.showImport?"Export Account":"NEAR Guest Book"),Jo(2),k0(" ",n.showImport?"Back to Log in":"Try Export Account"," "),Jo(1),bo("ngIf",!n.showImport),Jo(1),bo("ngIf",n.showImport))},dependencies:[il,wm,Am]});class Fp{}Fp.\u0275fac=function(e){return new(e||Fp)},Fp.\u0275mod=cs({type:Fp,bootstrap:[Em]}),Fp.\u0275inj=Ri({imports:[vf,xf]}),Gk().bootstrapModule(Fp).catch(t=>console.error(t))},55945:(ne,a,y)=>{"use strict";var C=y(44304);function M(g){var b=Buffer.alloc(2);return b.writeUInt16BE(g,0),b}var u={data:Buffer.alloc(0),dataLength:0,sequence:0};a.Z=function(g,b){return{makeBlocks:function(I){var _=Buffer.concat([M(I.length),I]),A=b-5,R=Math.ceil(_.length/A);_=Buffer.concat([_,Buffer.alloc(R*A-_.length+1).fill(0)]);for(var D=[],T=0;TD&&(R=R.slice(0,D)),{data:R,dataLength:D,sequence:T}},getReducedResult:function(I){if(I&&I.dataLength===I.data.length)return I.data}}}},44304:(ne,a,y)=>{"use strict";y.r(a),y.d(a,{AccountNameRequiredError:()=>I,AccountNotSupported:()=>_,AmountRequired:()=>A,BluetoothRequired:()=>R,BtcUnmatchedApp:()=>D,CantOpenDevice:()=>T,CantScanQRCode:()=>we,CashAddrNotSupported:()=>F,CurrencyNotSupported:()=>L,DBNotReset:()=>Pt,DBWrongPassword:()=>Tt,DeviceAppVerifyNotSupported:()=>V,DeviceGenuineSocketEarlyClose:()=>j,DeviceHalted:()=>X,DeviceInOSUExpected:()=>q,DeviceNameInvalid:()=>Q,DeviceNotGenuineError:()=>Z,DeviceOnDashboardExpected:()=>Y,DeviceOnDashboardUnexpected:()=>G,DeviceShouldStayInApp:()=>lt,DeviceSocketFail:()=>z,DeviceSocketNoBulkStatus:()=>$,DisconnectedDevice:()=>S,DisconnectedDeviceDuringOperation:()=>r,ETHAddressNonEIP:()=>Se,EnpointConfigError:()=>s,EthAppPleaseEnableContractData:()=>d,FeeEstimationFailed:()=>h,FeeNotLoaded:()=>_e,FeeRequired:()=>me,FeeTooHigh:()=>De,FirmwareNotRecognized:()=>E,FirmwareOrAppUpdateRequired:()=>Ct,GasLessThanEstimate:()=>ot,GenuineCheckFailed:()=>Je,HardResetFail:()=>k,InvalidAddress:()=>x,InvalidAddressBecauseDestinationIsAlsoSource:()=>f,InvalidXRPTag:()=>B,LatestMCUInstalledError:()=>P,LedgerAPI4xx:()=>qe,LedgerAPI5xx:()=>Ht,LedgerAPIError:()=>te,LedgerAPIErrorWithMessage:()=>ie,LedgerAPINotAvailable:()=>de,MCUNotGenuineToDashboard:()=>ze,ManagerAppAlreadyInstalledError:()=>Ce,ManagerAppDepInstallRequired:()=>ve,ManagerAppDepUninstallRequired:()=>ae,ManagerAppRelyOnBTCError:()=>ye,ManagerDeviceLockedError:()=>fe,ManagerFirmwareNotEnoughSpaceError:()=>pe,ManagerNotEnoughSpaceError:()=>Ee,ManagerUninstallBTCDep:()=>ce,NetworkDown:()=>be,NoAccessToCamera:()=>$e,NoAddressesFound:()=>Ne,NoDBPathGiven:()=>Lt,NotEnoughBalance:()=>Fe,NotEnoughBalanceBecauseDestinationNotCreated:()=>Ut,NotEnoughBalanceInParentAccount:()=>Ze,NotEnoughBalanceToDelegate:()=>ct,NotEnoughGas:()=>tt,NotEnoughSpendableBalance:()=>Ve,NotSupportedLegacyAddress:()=>Xt,PairingFailed:()=>it,PasswordIncorrectError:()=>$t,PasswordsDontMatchError:()=>st,RecipientRequired:()=>mt,RecommendSubAccountsToEmpty:()=>Pe,RecommendUndelegation:()=>Ae,StatusCodes:()=>Zt,SyncError:()=>Ke,TimeoutTagged:()=>xe,TransportError:()=>Bt,TransportInterfaceNotAvailable:()=>dt,TransportOpenUserCancelled:()=>on,TransportRaceCondition:()=>pt,TransportStatusError:()=>fn,TransportWebUSBGestureRequired:()=>yn,UnavailableTezosOriginatedAccountReceive:()=>Ye,UnavailableTezosOriginatedAccountSend:()=>ut,UnexpectedBootloader:()=>Be,UnknownMCU:()=>se,UpdateFetchFileFail:()=>ln,UpdateIncorrectHash:()=>ft,UpdateIncorrectSig:()=>wt,UpdateYourApp:()=>mn,UserRefusedAddress:()=>Qe,UserRefusedAllowManager:()=>ht,UserRefusedDeviceNameChange:()=>We,UserRefusedFirmwareUpdate:()=>Qt,UserRefusedOnDevice:()=>gt,WebsocketConnectionError:()=>vt,WebsocketConnectionFailed:()=>En,WrongAppForCurrency:()=>At,WrongDeviceForAccount:()=>yt,addCustomErrorDeserializer:()=>M,createCustomErrorClass:()=>u,deserializeError:()=>v,getAltStatusMessage:()=>qt,serializeError:()=>g});var p=function(xt){var Kt="function"==typeof Symbol&&Symbol.iterator,Rt=Kt&&xt[Kt],Yt=0;if(Rt)return Rt.call(xt);if(xt&&"number"==typeof xt.length)return{next:function(){return xt&&Yt>=xt.length&&(xt=void 0),{value:xt&&xt[Yt++],done:!xt}}};throw new TypeError(Kt?"Object is not iterable.":"Symbol.iterator is not defined.")},C={},w={},M=function(xt,Kt){w[xt]=Kt},u=function(xt){var Kt=function(Yt,zt){Object.assign(this,zt),this.name=xt,this.message=Yt||xt,this.stack=(new Error).stack};return Kt.prototype=new Error,C[xt]=Kt,Kt},v=function(xt){if("object"==typeof xt&&xt){try{var Kt=JSON.parse(xt.message);Kt.message&&Kt.name&&(xt=Kt)}catch{}var Rt=void 0;if("string"==typeof xt.name){var Yt=xt.name,zt=w[Yt];if(zt)Rt=zt(xt);else{var Vt="Error"===Yt?Error:C[Yt];Vt||(console.warn("deserializing an unknown class '"+Yt+"'"),Vt=u(Yt)),Rt=Object.create(Vt.prototype);try{for(var nn in xt)xt.hasOwnProperty(nn)&&(Rt[nn]=xt[nn])}catch{}}}else Rt=new Error(xt.message);return!Rt.stack&&Error.captureStackTrace&&Error.captureStackTrace(Rt,v),Rt}return new Error(String(xt))},g=function(xt){return xt&&("object"==typeof xt?b(xt,[]):"function"==typeof xt?"[Function: "+(xt.name||"anonymous")+"]":xt)};function b(xt,Kt){var Rt,Yt,zt={};Kt.push(xt);try{for(var Vt=p(Object.keys(xt)),nn=Vt.next();!nn.done;nn=Vt.next()){var Gt=nn.value,Mt=xt[Gt];if("function"!=typeof Mt){if(!Mt||"object"!=typeof Mt){zt[Gt]=Mt;continue}if(-1===Kt.indexOf(xt[Gt])){zt[Gt]=b(xt[Gt],Kt.slice(0));continue}zt[Gt]="[Circular]"}}}catch(_t){Rt={error:_t}}finally{try{nn&&!nn.done&&(Yt=Vt.return)&&Yt.call(Vt)}finally{if(Rt)throw Rt.error}}return"string"==typeof xt.name&&(zt.name=xt.name),"string"==typeof xt.message&&(zt.message=xt.message),"string"==typeof xt.stack&&(zt.stack=xt.stack),zt}var I=u("AccountNameRequired"),_=u("AccountNotSupported"),A=u("AmountRequired"),R=u("BluetoothRequired"),D=u("BtcUnmatchedApp"),T=u("CantOpenDevice"),F=u("CashAddrNotSupported"),L=u("CurrencyNotSupported"),V=u("DeviceAppVerifyNotSupported"),j=u("DeviceGenuineSocketEarlyClose"),Z=u("DeviceNotGenuine"),Y=u("DeviceOnDashboardExpected"),G=u("DeviceOnDashboardUnexpected"),q=u("DeviceInOSUExpected"),X=u("DeviceHalted"),Q=u("DeviceNameInvalid"),z=u("DeviceSocketFail"),$=u("DeviceSocketNoBulkStatus"),S=u("DisconnectedDevice"),r=u("DisconnectedDeviceDuringOperation"),s=u("EnpointConfig"),d=u("EthAppPleaseEnableContractData"),h=u("FeeEstimationFailed"),E=u("FirmwareNotRecognized"),k=u("HardResetFail"),B=u("InvalidXRPTag"),x=u("InvalidAddress"),f=u("InvalidAddressBecauseDestinationIsAlsoSource"),P=u("LatestMCUInstalledError"),se=u("UnknownMCU"),te=u("LedgerAPIError"),ie=u("LedgerAPIErrorWithMessage"),de=u("LedgerAPINotAvailable"),Ce=u("ManagerAppAlreadyInstalled"),ye=u("ManagerAppRelyOnBTC"),ve=u("ManagerAppDepInstallRequired"),ae=u("ManagerAppDepUninstallRequired"),fe=u("ManagerDeviceLocked"),pe=u("ManagerFirmwareNotEnoughSpace"),Ee=u("ManagerNotEnoughSpace"),ce=u("ManagerUninstallBTCDep"),be=u("NetworkDown"),Ne=u("NoAddressesFound"),Fe=u("NotEnoughBalance"),ct=u("NotEnoughBalanceToDelegate"),Ze=u("NotEnoughBalanceInParentAccount"),Ve=u("NotEnoughSpendableBalance"),Ut=u("NotEnoughBalanceBecauseDestinationNotCreated"),$e=u("NoAccessToCamera"),tt=u("NotEnoughGas"),Xt=u("NotSupportedLegacyAddress"),ot=u("GasLessThanEstimate"),st=u("PasswordsDontMatch"),$t=u("PasswordIncorrect"),Pe=u("RecommendSubAccountsToEmpty"),Ae=u("RecommendUndelegation"),xe=u("TimeoutTagged"),Be=u("UnexpectedBootloader"),ze=u("MCUNotGenuineToDashboard"),mt=u("RecipientRequired"),Ye=u("UnavailableTezosOriginatedAccountReceive"),ut=u("UnavailableTezosOriginatedAccountSend"),ln=u("UpdateFetchFileFail"),ft=u("UpdateIncorrectHash"),wt=u("UpdateIncorrectSig"),mn=u("UpdateYourApp"),We=u("UserRefusedDeviceNameChange"),Qe=u("UserRefusedAddress"),Qt=u("UserRefusedFirmwareUpdate"),ht=u("UserRefusedAllowManager"),gt=u("UserRefusedOnDevice"),on=u("TransportOpenUserCancelled"),dt=u("TransportInterfaceNotAvailable"),pt=u("TransportRaceCondition"),yn=u("TransportWebUSBGestureRequired"),lt=u("DeviceShouldStayInApp"),vt=u("WebsocketConnectionError"),En=u("WebsocketConnectionFailed"),yt=u("WrongDeviceForAccount"),At=u("WrongAppForCurrency"),Se=u("ETHAddressNonEIP"),we=u("CantScanQRCode"),_e=u("FeeNotLoaded"),me=u("FeeRequired"),De=u("FeeTooHigh"),Ke=u("SyncError"),it=u("PairingFailed"),Je=u("GenuineCheckFailed"),qe=u("LedgerAPI4xx"),Ht=u("LedgerAPI5xx"),Ct=u("FirmwareOrAppUpdateRequired"),Lt=u("NoDBPathGiven"),Tt=u("DBWrongPassword"),Pt=u("DBNotReset");function Bt(xt,Kt){this.name="TransportError",this.message=xt,this.stack=(new Error).stack,this.id=Kt}Bt.prototype=new Error,M("TransportError",function(xt){return new Bt(xt.message,xt.id)});var Zt={PIN_REMAINING_ATTEMPTS:25536,INCORRECT_LENGTH:26368,MISSING_CRITICAL_PARAMETER:26624,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,SECURITY_STATUS_NOT_SATISFIED:27010,CONDITIONS_OF_USE_NOT_SATISFIED:27013,INCORRECT_DATA:27264,NOT_ENOUGH_MEMORY_SPACE:27268,REFERENCED_DATA_NOT_FOUND:27272,FILE_ALREADY_EXISTS:27273,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,CLA_NOT_SUPPORTED:28160,TECHNICAL_PROBLEM:28416,OK:36864,MEMORY_PROBLEM:37440,NO_EF_SELECTED:37888,INVALID_OFFSET:37890,FILE_NOT_FOUND:37892,INCONSISTENT_FILE:37896,ALGORITHM_NOT_SUPPORTED:38020,INVALID_KCV:38021,CODE_NOT_INITIALIZED:38914,ACCESS_CONDITION_NOT_FULFILLED:38916,CONTRADICTION_SECRET_CODE_STATUS:38920,CONTRADICTION_INVALIDATION:38928,CODE_BLOCKED:38976,MAX_VALUE_REACHED:38992,GP_AUTH_FAILED:25344,LICENSING:28482,HALTED:28586};function qt(xt){switch(xt){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received"}if(28416<=xt&&xt<=28671)return"Internal error, please report"}function fn(xt){this.name="TransportStatusError";var Kt=Object.keys(Zt).find(function(zt){return Zt[zt]===xt})||"UNKNOWN_ERROR",Rt=qt(xt)||Kt,Yt=xt.toString(16);this.message="Ledger device: "+Rt+" (0x"+Yt+")",this.stack=(new Error).stack,this.statusCode=xt,this.statusText=Kt}fn.prototype=new Error,M("TransportStatusError",function(xt){return new fn(xt.statusCode)})},35469:ne=>{"use strict";ne.exports=function a({mustBeMetaMask:y=!1,silent:p=!1,timeout:C=3e3}={}){!function M(){if("boolean"!=typeof y)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof p)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof C)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let w=!1;return new Promise(u=>{function v(){if(w)return;w=!0,window.removeEventListener("ethereum#initialized",v);const{ethereum:g}=window;!g||y&&!g.isMetaMask?(!p&&console.error("@metamask/detect-provider:",y&&g?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),u(null)):u(g)}window.ethereum?v():(window.addEventListener("ethereum#initialized",v,{once:!0}),setTimeout(()=>{v()},C))})}},32676:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.THEME_SMALL_WINDOW_WIDTH_MAX=a.THEME_CONSTANT_BADGE_GREY_COLOR=a.THEME_CONSTANT_GREEN_COLOR=a.THEME_CONSTANT_RED_COLOR=a.THEME_CONSTANT_COLOR_DARK=a.THEME_CONSTANT_COLOR_BRAND=a.SIGN_POPUP_HEIGHT=a.SIGN_POPUP_WIDTH=void 0,a.SIGN_POPUP_WIDTH=390,a.SIGN_POPUP_HEIGHT=650,a.THEME_CONSTANT_COLOR_BRAND="#471be8",a.THEME_CONSTANT_COLOR_DARK="#101046",a.THEME_CONSTANT_RED_COLOR="#e25252",a.THEME_CONSTANT_GREEN_COLOR="#8bdaa1",a.THEME_CONSTANT_BADGE_GREY_COLOR="rgba(116,117,126,0.67)",a.THEME_SMALL_WINDOW_WIDTH_MAX=600},6364:(ne,a)=>{"use strict";var p;Object.defineProperty(a,"__esModule",{value:!0}),a.ENearNetwork=void 0,(p=a.ENearNetwork||(a.ENearNetwork={})).localnet="localnet",p.testnet="testnet",p.betanet="betanet",p.mainnet="mainnet"},98249:(ne,a)=>{"use strict";var y,w;Object.defineProperty(a,"__esModule",{value:!0}),a.getExternalActionErrorMessageForEndTag=a.EDappActionErrorTag=void 0,(w=y=a.EDappActionErrorTag||(a.EDappActionErrorTag={})).NEW_ACTION_STARTED="NEW_ACTION_STARTED",w.INCOMPLETE_ACTION="INCOMPLETE_ACTION",w.NO_ACCOUNTS="NO_ACCOUNTS",w.WINDOW_CLOSED="WINDOW_CLOSED",w.USER_CANCELLED="USER_CANCELLED",w.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",w.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED";const p={[y.WINDOW_CLOSED]:"User closed the window",[y.INCOMPLETE_ACTION]:"User didn't complete the action",[y.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[y.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[y.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[y.USER_CANCELLED]:"User cancelled the action",[y.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};a.getExternalActionErrorMessageForEndTag=function C(w){var M;return null!==(M=p[w])&&void 0!==M?M:"An unknown error occurred"}},13628:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.EDappActionConnectionStatus=a.EDappActionSource=a.EMeteorInjectedFeature=a.EMeteorExtensionDirectActionType=a.EWalletExternalActionStatus=a.EWalletExternalAction_SignIn_AccessType=a.EMeteorWalletSignInType=a.EExternalActionType=a.MeteorActionError=void 0;const p=y(98249);class C extends Error{constructor(R,D){var T,F;super(),null==R.message&&(R.message=(0,p.getExternalActionErrorMessageForEndTag)(null!==(F=null===(T=R.endTags)||void 0===T?void 0:T[R.endTags.length-1])&&void 0!==F?F:"unknown")),this._reason=R,this.message=R.message,this.name="MeteorActionError",this.cause=D}}var A;a.MeteorActionError=C,(A=a.EExternalActionType||(a.EExternalActionType={})).login="login",A.sign="sign",A.logout="logout",A.verify_owner="verify_owner",A.keypom_claim="keypom_claim",A.sign_message="sign_message",function(A){A.ALL_METHODS="ALL_METHODS",A.SELECTED_METHODS="SELECTED_METHODS",A.FULL_ACCESS="FULL_ACCESS"}(a.EMeteorWalletSignInType||(a.EMeteorWalletSignInType={})),function(A){A.FULL_ACCESS="fullAccess",A.LIMITED_ACCESS="limitedAccess"}(a.EWalletExternalAction_SignIn_AccessType||(a.EWalletExternalAction_SignIn_AccessType={})),function(A){A.UNCONFIRMED="UNCONFIRMED",A.PENDING="PENDING",A.SUCCESS="SUCCESS",A.FAILURE="FAILURE"}(a.EWalletExternalActionStatus||(a.EWalletExternalActionStatus={})),function(A){A.check_sync_status="check_sync_status",A.sync_accounts="sync_accounts",A.open_page="open_page"}(a.EMeteorExtensionDirectActionType||(a.EMeteorExtensionDirectActionType={})),function(A){A.open_page="open_page",A.batch_import="batch_import",A.sync_check="sync_check",A.account_sync="account_sync"}(a.EMeteorInjectedFeature||(a.EMeteorInjectedFeature={})),function(A){A.website_callback="wcb",A.website_post_message="wpm",A.website_visit="wv",A.extension_injected="ext"}(a.EDappActionSource||(a.EDappActionSource={})),function(A){A.initializing="initializing",A.connected="connected",A.attempting_reconnect="attempting_reconnect",A.disconnected="disconnected",A.closed_success="closed_success",A.closed_fail="closed_fail",A.closed_window="closed_window"}(a.EDappActionConnectionStatus||(a.EDappActionConnectionStatus={}))},10012:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.StringUtils=a.stringToConstantStyledString=a.convertToSlug=a.pad=a.createPadder=a.BetterStringArray=a.safeAppend=a.firstNotNullEmpty=a.nullEmpty=a.notNullEmpty=a.StringRegex=void 0,a.StringRegex={digitsRegex:/\b\d+\b/gi};a.notNullEmpty=r=>null!=r&&r.length>0;a.nullEmpty=r=>!(0,a.notNullEmpty)(r);a.firstNotNullEmpty=(...r)=>{for(const s of r)if((0,a.notNullEmpty)(s))return s};a.safeAppend=(r,s,d=null)=>(0,a.notNullEmpty)(r)?r+s:d??s;function v(r,s,d=!1){return h=>g(h,r,s,d)}function g(r,s,d,h=!1){const E=d-`${r}`.length;if(E>0){const k=new Array(E).fill(s);return h?`${r}${k.join("")}`:`${k.join("")}${r}`}return`${r}`}a.BetterStringArray=class u extends Array{pushIfNotNullEmpty(s){(0,a.notNullEmpty)(s)&&this.push(s)}},a.createPadder=v,a.pad=g;const b=new RegExp("\\s+","g"),I=new RegExp("--+","g"),_=new RegExp("^-+","g"),A=new RegExp("-+$","g"),R=new RegExp("-","g"),D=new RegExp("[^\\w\\-]+","g"),T=new RegExp("_","g");a.convertToSlug=(r,{slugDivider:s="-",letterCase:d="LOWER",normalize:h=!0,excludeCharacters:E=[]}={})=>{if(!r||0===r.length)return"";let k=r.toString();return h&&(k=k.normalize("NFD")),"LOWER"===d?k=k.toLowerCase():"UPPER"===d&&(k=k.toUpperCase()),k.replace(b,"-").replace(E.length>0?new RegExp(`[^\\w\\-${E.map(B=>function F(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(B)).join("")}]+`,"g"):D,"").replace(E.includes("_")?b:T,"-").replace(I,"-").replace(_,"").replace(A,"").replace(R,s)};a.stringToConstantStyledString=r=>(0,a.convertToSlug)(r,{normalize:!0,slugDivider:"_",letterCase:"UPPER"});function Z(r){return(r=r||"")!==decodeURIComponent(r)}const z=(...r)=>r.filter(s=>s).map((s,d,h)=>{const E=0!==d,k=d!==h.length-1;return E&&(s=s.startsWith("/")?s.slice(1):s),k&&(s=s.endsWith("/")?s.slice(0,-1):s),s}).join("/");a.StringUtils={isUriEncoded:Z,decodeUriFully:r=>{let s=0;for(;Z(r);)if(s+=1,r=decodeURIComponent(r),s>20)throw new Error("String Utils: Decode URI Fully: Enacted while loop too many times with attempt to decode fully.");return r},StringRegex:a.StringRegex,reverse:r=>{let s="";for(const d of r)s=`${d}${s}`;return s},notNullEmpty:a.notNullEmpty,nullEmpty:a.nullEmpty,anyNullEmpty:r=>{for(const s of r)if((0,a.nullEmpty)(s))return!0;return!1},safeAppend:a.safeAppend,createPadder:v,pad:g,convertToSlug:a.convertToSlug,stringToConstantStyledString:a.stringToConstantStyledString,removeAndTrim:(r,s,{spaceAware:d=!0,insideWords:h=!1}={})=>{let E=`${r}`;for(const k of s)if(d)if(h){const B=[new RegExp(`\\s${k}\\s`,"g"),new RegExp(`\\s${k}`,"g"),new RegExp(`${k}\\s`,"g")];for(const x of B)x.test(E)&&(console.log(`Replacing "${x}" in "${E}"`),E=E.replace(x," "),console.log(`Text after: "${E}"`))}else E.indexOf(` ${k} `)>=0?E=E.replace(` ${k} `," "):(E.startsWith(`${k} `)&&(E=E.substring(k.length+1)),E.endsWith(` ${k}`)&&(E=E.substring(0,E.length-(k.length+1))));else E.indexOf(k)>=0&&(E=E.replace(k,""));return E.trim()},sortCompareStrings:function q(r,s){const d=r.toLowerCase(),h=s.toLowerCase();return dh?1:0},comparePure:function X(r,s){return r>s?1:rs.startsWith("http://")||s.startsWith("https://")?s:z(r,s),isHashId:r=>{const s=r.match(/^[a-zA-Z0-9]+$/);return Boolean(s)}}},55088:(ne,a,y)=>{"use strict";var p=y(59344).default;Object.defineProperty(a,"__esModule",{value:!0}),a.EnvironmentStateAdapter_Sync=a.EnvironmentStateAdapter=void 0;a.EnvironmentStateAdapter=class C{constructor(u){this.implementation=u}setJson(u,v){var g=this;return p(function*(){yield g.implementation.setString(u,JSON.stringify(v))})()}getJson(u){var v=this;return p(function*(){const g=yield v.implementation.getString(u);if(null!=g&&"undefined"!==g&&"null"!==g)return JSON.parse(g)})()}setString(u,v){var g=this;return p(function*(){yield g.implementation.setString(u,v)})()}getString(u){var v=this;return p(function*(){const g=yield v.implementation.getString(u);if(null!=g)return g})()}createJsonGetterSetter(u){return{get:()=>this.getJson(u),set:v=>this.setJson(u,v)}}createStringGetterSetter(u){return{get:()=>this.getString(u),set:v=>this.setString(u,v)}}};a.EnvironmentStateAdapter_Sync=class w{constructor(u){this.implementation=u}setJson(u,v){this.implementation.setString(u,JSON.stringify(v))}getJson(u){const v=this.implementation.getString(u);if(null!=v&&"undefined"!==v&&"null"!==v)return JSON.parse(v)}setString(u,v){this.implementation.setString(u,v)}getString(u){const v=this.implementation.getString(u);if(null!=v)return v}clear(u){this.implementation.clear(u)}createJsonGetterSetter(u){return{get:()=>this.getJson(u),set:v=>this.setJson(u,v)}}createStringGetterSetter(u){return{get:()=>this.getString(u),set:v=>this.setString(u,v)}}}},43467:(ne,a,y)=>{"use strict";var p=y(59344).default;Object.defineProperty(a,"__esModule",{value:!0}),a.ConnectedMeteorWalletAccount=a.MeteorWallet=void 0;const C=y(71836),w=y(13628),M=y(21531),u=y(10012),v=y(55088),g=y(66530),b=y(91221),I=y(31574),F=new v.EnvironmentStateAdapter_Sync({getString:Z=>window.localStorage.getItem(Z),setString:(Z,Y)=>window.localStorage.setItem(Z,Y),clear:Z=>window.localStorage.removeItem(Z)});new v.EnvironmentStateAdapter_Sync({getString:Z=>window.sessionStorage.getItem(Z),setString:(Z,Y)=>window.sessionStorage.setItem(Z,Y),clear:Z=>window.sessionStorage.removeItem(Z)});class V{static init({walletUrl:Y,...G}){return p(function*(){const q=new C.keyStores.BrowserLocalStorageKeyStore,X=yield(0,C.connect)({keyStore:q,headers:{},walletUrl:(0,b.resolveWalletUrl)(G.networkId,Y),...(0,b.getNetworkPreset)(G.networkId),...G}),Q=new V({near:X,appKeyPrefix:"near_app"});return Q.isSignedIn()||(yield q.clear()),Q})()}constructor(Y){var G,q,{near:X,appKeyPrefix:Q=(null!==(G=X.config.contractName)&&void 0!==G?G:"default")}=Y;this._initializationPromises=[],this._near=X;const z=Q+"_meteor_wallet_auth_key";this._authDataKey=z,this._authData=null!==(q=F.getJson(z))&&void 0!==q?q:{allKeys:[]},this._networkId=X.config.networkId,this._walletBaseUrl=X.config.walletUrl,this._keyStore=X.connection.signer.keyStore}isExtensionInstalled(){return null!=window.meteorWallet}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}verifyOwner(Y){var G=this;return p(function*(){var q;const X=null!==(q=Y.accountId)&&void 0!==q?q:G.getAccountId(),Q=yield(0,I.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:w.EExternalActionType.verify_owner,inputs:{accountId:X,message:Y.message},network:G._networkId});if(Q.success)return Q;throw new w.MeteorActionError({endTags:Q.endTags,message:Q.message})})()}requestSignIn(Y){var G=this;return p(function*(){const{keyPair:q,...X}=Y,Q=q??C.KeyPair.fromRandom("ed25519");let z=Q.getPublicKey().toString();const $=yield(0,I.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:w.EExternalActionType.login,inputs:{public_key:z,...X},network:G._networkId});if($.success){const{allKeys:S,accountId:r}=$.payload;return G._authData={accountId:r,allKeys:S,signedInContract:{contract_id:X.contract_id,public_key:z}},F.setJson(G._authDataKey,G._authData),yield G._keyStore.setKey(G._networkId,r,Q),{success:!0,endTags:[],payload:{accessKey:Q,accountId:r}}}throw new w.MeteorActionError({endTags:$.endTags,message:$.message})})()}signOut(){var Y=this;return p(function*(){const G=Y.getAccountId();if(null!=Y._authData.signedInContract&&null!=G){const q={accountId:G,contractInfo:Y._authData.signedInContract};yield(0,I.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:w.EExternalActionType.logout,inputs:q,network:Y._networkId})}Y._authData={allKeys:[]},F.clear(Y._authDataKey)})()}signMessage({message:Y,nonce:G,recipient:q,callbackUrl:X,state:Q,accountId:z}){var $=this;return p(function*(){const S=yield(0,I.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:w.EExternalActionType.sign_message,inputs:{message:Y,nonce:G,recipient:q,callbackUrl:X,state:Q,accountId:z},network:$._networkId});if(S.success)return S.payload.state=Q,S;throw new w.MeteorActionError({endTags:S.endTags,message:S.message})})()}requestSignTransactions(Y){var G=this;return p(function*(){const{transactions:q}=Y,X=yield(0,I.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:w.EExternalActionType.sign,inputs:{transactions:q.map(Q=>(0,M.serialize)(g.SCHEMA,Q)).map(Q=>Buffer.from(Q).toString("base64")).join(",")},network:G._networkId});if(X.success)return X.payload.executionOutcomes;throw new w.MeteorActionError({endTags:X.endTags,message:X.message})})()}account(){const Y=this.getAccountId();return!this._connectedAccount&&(0,u.notNullEmpty)(Y)&&(this._connectedAccount=new j(this,this._near.connection,Y)),this._connectedAccount}}a.MeteorWallet=V;class j extends C.Account{constructor(Y,G,q){super(G,q),this.meteorWallet=Y}signAndSendTransaction(...Y){var G=this;return p(function*(){return"string"==typeof Y[0]?G.signAndSendTransaction_direct({receiverId:Y[0],actions:Y[1]}):G.signAndSendTransaction_direct(Y[0])})()}trySendOrCreateTransaction({receiverId:Y,actions:G}){var q=()=>super.signAndSendTransaction,X=this;return p(function*(){const Q=yield X.connection.signer.getPublicKey(X.accountId,X.connection.networkId);let z=yield X.accessKeyForTransaction(Y,G,Q);if(!z)throw new Error(`Cannot find matching key for transaction sent to ${Y}`);if(Q&&Q.toString()===z.public_key)try{return{executionOutcome:yield q().call(X,{receiverId:Y,actions:G}),sent:!0}}catch(h){if("NotEnoughAllowance"!==h.type)throw h;z=yield X.accessKeyForTransaction(Y,G)}const $=yield X.connection.provider.block({finality:"final"}),S=(0,M.baseDecode)($.header.hash),r=C.utils.PublicKey.from(z.public_key),s=z.access_key.nonce+1;return{sent:!1,transaction:C.transactions.createTransaction(X.accountId,r,Y,s,G,S)}})()}signAndSendTransaction_direct({receiverId:Y,actions:G}){var q=this;return p(function*(){const{transaction:X,sent:Q,executionOutcome:z}=yield q.trySendOrCreateTransaction({receiverId:Y,actions:G});return Q?z:(yield q.meteorWallet.requestSignTransactions({transactions:[X]}))[0]})()}accessKeyMatchesTransaction(Y,G,q){var X=this;return p(function*(){const{access_key:{permission:Q}}=Y;if("FullAccess"===Q)return!0;if(Q.FunctionCall){const{receiver_id:z,method_names:$}=Q.FunctionCall;if(z===X.accountId&&$.includes("add_request_and_confirm"))return!0;if(z===G){if(1!==q.length)return!1;const[{functionCall:S}]=q;return S&&(!S.deposit||"0"===S.deposit.toString())&&(0===$.length||$.includes(S.methodName))}}return!1})()}accessKeyForTransaction(Y,G,q){var X=this;return p(function*(){const Q=yield X.getAccessKeys();if(q){const $=Q.find(S=>S.public_key.toString()===q.toString());if($&&(yield X.accessKeyMatchesTransaction($,Y,G)))return $}const z=X.meteorWallet._authData.allKeys;for(const $ of Q)if(-1!==z.indexOf($.public_key)&&(yield X.accessKeyMatchesTransaction($,Y,G)))return $;return null})()}}a.ConnectedMeteorWalletAccount=j},75115:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WALLET_URL_LOCALHOST_BASE=a.WALLET_URL_PRODUCTION_BASE=a.WALLET_URL_DEV_BASE=void 0,a.WALLET_URL_DEV_BASE="https://dev.wallet.meteorwallet.app",a.WALLET_URL_PRODUCTION_BASE="https://wallet.meteorwallet.app",a.WALLET_URL_LOCALHOST_BASE="https://localhost:3000"},23638:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.setEnvConfig=a.envConfig=void 0;const p=y(75115),C=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0;a.envConfig={wallet_base_url:C??p.WALLET_URL_PRODUCTION_BASE},a.setEnvConfig=function w(M){Object.assign(a.envConfig,M)}},72235:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(u,v,g,b){void 0===b&&(b=g);var I=Object.getOwnPropertyDescriptor(v,g);(!I||("get"in I?!v.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return v[g]}}),Object.defineProperty(u,b,I)}:function(u,v,g,b){void 0===b&&(b=g),u[b]=v[g]}),C=this&&this.__exportStar||function(u,v){for(var g in u)"default"!==g&&!Object.prototype.hasOwnProperty.call(v,g)&&p(v,u,g)};Object.defineProperty(a,"__esModule",{value:!0}),a.setEnvConfig=a.ENearNetwork=void 0,C(y(43467),a),C(y(91221),a),C(y(75115),a),C(y(13628),a);var w=y(6364);Object.defineProperty(a,"ENearNetwork",{enumerable:!0,get:function(){return w.ENearNetwork}});var M=y(23638);Object.defineProperty(a,"setEnvConfig",{enumerable:!0,get:function(){return M.setEnvConfig}})},66530:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SCHEMA=void 0;const p=y(71836);a.SCHEMA=new Map([[p.transactions.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[p.transactions.SignedTransaction,{kind:"struct",fields:[["transaction",p.transactions.Transaction],["signature",p.transactions.Signature]]}],[p.transactions.Transaction,{kind:"struct",fields:[["signerId","string"],["publicKey",p.utils.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[p.transactions.Action]]]}],[p.utils.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[p.transactions.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",p.transactions.AccessKeyPermission]]}],[p.transactions.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",p.transactions.FunctionCallPermission],["fullAccess",p.transactions.FullAccessPermission]]}],[p.transactions.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[p.transactions.FullAccessPermission,{kind:"struct",fields:[]}],[p.transactions.Action,{kind:"enum",field:"enum",values:[["createAccount",p.transactions.CreateAccount],["deployContract",p.transactions.DeployContract],["functionCall",p.transactions.FunctionCall],["transfer",p.transactions.Transfer],["stake",p.transactions.Stake],["addKey",p.transactions.AddKey],["deleteKey",p.transactions.DeleteKey],["deleteAccount",p.transactions.DeleteAccount]]}],[p.transactions.CreateAccount,{kind:"struct",fields:[]}],[p.transactions.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[p.transactions.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[p.transactions.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[p.transactions.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.utils.PublicKey]]}],[p.transactions.AddKey,{kind:"struct",fields:[["publicKey",p.utils.PublicKey],["accessKey",p.transactions.AccessKey]]}],[p.transactions.DeleteKey,{kind:"struct",fields:[["publicKey",p.utils.PublicKey]]}],[p.transactions.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}]])},31574:(ne,a,y)=>{"use strict";var p=y(59344).default;Object.defineProperty(a,"__esModule",{value:!0}),a.getMeteorPostMessenger=void 0;const C=y(47053),w=y(23638),M=y(13628),u=y(63230),v=y(98249),g=y(32676);class b{constructor(T,F){const L=w.envConfig.wallet_base_url,V=new URL(L);if(this.walletOrigin=V.origin,null==window.meteorCom){this.comType=M.EDappActionSource.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");const j={source:M.EDappActionSource.website_post_message,connectionUid:T.uid},Z=g.SIGN_POPUP_WIDTH,Y=g.SIGN_POPUP_HEIGHT,G=window.top.outerHeight/2+window.top.screenY-Y/2,q=window.top.outerWidth/2+window.top.screenX-Z/2,X=window.open(`${L}/connect/${T.network}/${T.actionType}?${(0,u.stringify)(j)}`,"_blank",`popup=1,width=${Z},height=${Y},top=${G},left=${q}`);if(null==X)throw new M.MeteorActionError({message:"Couldn't open popup window to complete wallet action",endTags:[v.EDappActionErrorTag.POPUP_WINDOW_OPEN_FAILED]});this.websiteWindow=X,window.addEventListener("message",Q=>F(Q.data)),this.wasOpened=!1}else this.comType=M.EDappActionSource.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(F)}focus(){var T;this.comType===M.EDappActionSource.website_post_message&&(null===(T=this.websiteWindow)||void 0===T||T.focus())}sendMessage(T){var F,L;this.comType===M.EDappActionSource.website_post_message?null===(F=this.websiteWindow)||void 0===F||F.postMessage(T,this.walletOrigin):null===(L=window.meteorCom)||void 0===L||L.sendMessageData(T)}isWindowClosed(){var T,F;return this.comType===M.EDappActionSource.website_post_message&&(null===(F=null===(T=this.websiteWindow)||void 0===T?void 0:T.closed)||void 0===F||F)}hasActiveWindow(){return this.comType!==M.EDappActionSource.website_post_message||null!=this.websiteWindow}close(){this.comType===M.EDappActionSource.website_post_message&&delete this.websiteWindow}}class _{constructor(){this.connections=[];const T=w.envConfig.wallet_base_url,F=new URL(T);this.baseWalletUrl=T,this.walletOrigin=F.origin,this.listener=L=>{if(null!=L){const V=this.connections.find(j=>j.uid===L.uid);null!=V&&(this.updateConnection(V.uid,{lastConnection:Date.now()}),L.status===M.EDappActionConnectionStatus.attempting_reconnect&&(this.updateConnection(V.uid,{status:M.EDappActionConnectionStatus.initializing}),this.sendComs()),L.status===M.EDappActionConnectionStatus.connected&&V.status===M.EDappActionConnectionStatus.initializing&&this.updateConnection(V.uid,{status:M.EDappActionConnectionStatus.connected}),L.status===M.EDappActionConnectionStatus.closed_success&&(V.resolve({success:!0,endTags:[],payload:L.payload}),this.updateConnection(V.uid,{status:M.EDappActionConnectionStatus.closed_success}),this.sendComs()),L.status===M.EDappActionConnectionStatus.closed_fail&&(this.updateConnection(V.uid,{status:M.EDappActionConnectionStatus.closed_fail}),this.sendComs(),V.reject(new M.MeteorActionError({endTags:L.endTags}))),L.status===M.EDappActionConnectionStatus.closed_window&&(this.updateConnection(V.uid,{status:M.EDappActionConnectionStatus.closed_window}),V.reject(new M.MeteorActionError({endTags:L.endTags,message:"User closed the window"}))),[M.EDappActionConnectionStatus.disconnected,M.EDappActionConnectionStatus.closed_fail,M.EDappActionConnectionStatus.closed_window,M.EDappActionConnectionStatus.closed_success].includes(L.status)&&this.removeConnection(V.uid))}}}removeConnection(T){this.connections=this.connections.filter(F=>F.uid!==T),0===this.connections.length&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(T,F){this.connections=this.connections.map(L=>L.uid===T?{...L,...F,uid:L.uid}:L)}sendComs(){var T;if(null!==(T=this.comWindow)&&void 0!==T&&T.hasActiveWindow()&&this.connections.length>0)if(null==this.comInterval&&(this.comInterval=setInterval(()=>this.sendComs(),450)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(const F of this.connections)F.reject(new M.MeteorActionError({message:"User closed the window before completing the action",endTags:[v.EDappActionErrorTag.INCOMPLETE_ACTION,v.EDappActionErrorTag.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(const{network:F,actionType:L,endTags:V,status:j,inputs:Z,uid:Y}of this.connections){const G={endTags:V,actionType:L,status:j,uid:Y,network:F};j===M.EDappActionConnectionStatus.initializing&&(G.inputs=Z),this.comWindow.sendMessage(G)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(T){if(this.connections.length>0)for(const F of this.connections)F.status=M.EDappActionConnectionStatus.disconnected,F.endTags=[v.EDappActionErrorTag.NEW_ACTION_STARTED];this.connections.push(T),null!=this.comWindow&&this.comWindow.hasActiveWindow()?this.comWindow.focus():this.comWindow=new b(T,this.listener),this.sendComs()}connectAndWaitForResponse({actionType:T,network:F,inputs:L}){var V=this;return p(function*(){let j={uid:(0,C.nanoid)(),actionType:T,lastAttemptedConnection:0,lastConnection:0,status:M.EDappActionConnectionStatus.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:L,network:F,endTags:[]};const Z=new Promise((Y,G)=>{j.resolve=Y,j.reject=q=>{V.connections=V.connections.filter(X=>X.uid!==j.uid),G(q)}});return j.promise=Z,V.addAndStartConnection(j),yield Z})()}}let A;a.getMeteorPostMessenger=function R(){return null==A&&(A=new _),A}},91221:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getNetworkPreset=a.resolveWalletUrl=void 0;const p=y(23638);a.resolveWalletUrl=(M,u)=>{if(u)return u;const v=p.envConfig.wallet_base_url;switch(M){case"mainnet":return`${v}/connect/mainnet`;case"testnet":return`${v}/connect/testnet`;case"betanet":return`${v}/connect/betanet`;default:throw new Error("Invalid wallet URL")}};a.getNetworkPreset=M=>{switch(M){case"mainnet":return{networkId:M,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org"};case"testnet":return{networkId:M,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"};case"betanet":return{networkId:M,nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"};default:throw Error(`Failed to find config for: '${M}'`)}}},15139:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function($,S,r,s){return new(r||(r=Promise))(function(h,E){function k(f){try{x(s.next(f))}catch(P){E(P)}}function B(f){try{x(s.throw(f))}catch(P){E(P)}}function x(f){f.done?h(f.value):function d(h){return h instanceof r?h:new r(function(E){E(h)})}(f.value).then(k,B)}x((s=s.apply($,S||[])).next())})},C=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a,"__esModule",{value:!0}),a.Account=void 0;const w=y(29761),M=y(1656),u=y(38445),v=y(17527),g=y(41166),b=C(y(98538)),I=y(21531),{addKey:_,createAccount:A,deleteAccount:R,deleteKey:D,deployContract:T,fullAccessKey:F,functionCall:L,functionCallAccessKey:V,stake:j,transfer:Z}=u.actionCreators;function X($){return JSON.parse(Buffer.from($).toString())}function Q($){return Buffer.from(JSON.stringify($))}class z{constructor(S,r){this.accessKeyByPublicKeyCache={},this.connection=S,this.accountId=r}state(){return p(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(S,r){return p(this,void 0,void 0,function*(){const s=yield this.findAccessKey(S,r);if(!s)throw new v.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=s,E=(yield this.connection.provider.block({finality:"final"})).header.hash,k=d.nonce.add(new b.default(1));return yield(0,u.signTransaction)(S,k,r,(0,I.baseDecode)(E),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:S,actions:r,returnError:s}){return p(this,void 0,void 0,function*(){let d,h;const E=yield(0,M.exponentialBackoff)(500,12,1.5,()=>p(this,void 0,void 0,function*(){[d,h]=yield this.signTransaction(S,r);const k=h.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(h)}catch(B){if("InvalidNonce"===B.type)return(0,g.logWarning)(`Retrying transaction ${S}:${(0,I.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[k.toString()],null;if("Expired"===B.type)return(0,g.logWarning)(`Retrying transaction ${S}:${(0,I.baseEncode)(d)} due to expired block hash`),null;throw B.context=new v.ErrorContext((0,I.baseEncode)(d)),B}}));if(!E)throw new v.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:h.transaction.receiverId,outcome:E}),!s&&"object"==typeof E.status&&"object"==typeof E.status.Failure&&null!==E.status.Failure)throw E.status.Failure.error_message&&E.status.Failure.error_type?new v.TypedError(`Transaction ${E.transaction_outcome.id} failed. ${E.status.Failure.error_message}`,E.status.Failure.error_type):(0,g.parseResultError)(E);return E})}findAccessKey(S,r){return p(this,void 0,void 0,function*(){const s=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!s)throw new v.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[s.toString()];if(void 0!==d)return{publicKey:s,accessKey:d};try{const h=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:s.toString(),finality:"optimistic"}),E=Object.assign(Object.assign({},h),{nonce:new b.default(h.nonce)});return this.accessKeyByPublicKeyCache[s.toString()]?{publicKey:s,accessKey:this.accessKeyByPublicKeyCache[s.toString()]}:(this.accessKeyByPublicKeyCache[s.toString()]=E,{publicKey:s,accessKey:E})}catch(h){if("AccessKeyDoesNotExist"==h.type)return null;throw h}})}createAndDeployContract(S,r,s,d){return p(this,void 0,void 0,function*(){const h=F();return yield this.signAndSendTransaction({receiverId:S,actions:[A(),Z(d),_(w.PublicKey.from(r),h),T(s)]}),new z(this.connection,S)})}sendMoney(S,r){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:S,actions:[Z(r)]})})}createAccount(S,r,s){return p(this,void 0,void 0,function*(){const d=F();return this.signAndSendTransaction({receiverId:S,actions:[A(),Z(s),_(w.PublicKey.from(r),d)]})})}deleteAccount(S){return p(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[R(S)]})})}deployContract(S){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(S)]})})}encodeJSContractArgs(S,r,s){return Buffer.concat([Buffer.from(S),Buffer.from([0]),Buffer.from(r),Buffer.from([0]),Buffer.from(s)])}functionCall({contractId:S,methodName:r,args:s={},gas:d=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:h,walletMeta:E,walletCallbackUrl:k,stringify:B,jsContract:x}){return p(this,void 0,void 0,function*(){let f;if(this.validateArgs(s),x)f=["call_js_contract",this.encodeJSContractArgs(S,r,JSON.stringify(s)),d,h,null,!0];else{const P=void 0===B?u.stringifyJsonOrBytes:B;f=[r,s,d,h,P,!1]}return this.signAndSendTransaction({receiverId:x?this.connection.jsvmAccountId:S,actions:[L.apply(void 0,f)],walletMeta:E,walletCallbackUrl:k})})}addKey(S,r,s,d){return p(this,void 0,void 0,function*(){let h;return s||(s=[]),Array.isArray(s)||(s=[s]),h=r?V(r,s,d):F(),this.signAndSendTransaction({receiverId:this.accountId,actions:[_(w.PublicKey.from(S),h)]})})}deleteKey(S){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[D(w.PublicKey.from(S))]})})}stake(S,r){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[j(r,w.PublicKey.from(S))]})})}signedDelegate({actions:S,blockHeightTtl:r,receiverId:s}){return p(this,void 0,void 0,function*(){const{provider:d,signer:h}=this.connection,{header:E}=yield d.block({finality:"final"}),{accessKey:k,publicKey:B}=yield this.findAccessKey(null,null),x=(0,u.buildDelegateAction)({actions:S,maxBlockHeight:new b.default(E.height).add(new b.default(r)),nonce:new b.default(k.nonce).add(new b.default(1)),publicKey:B,receiverId:s,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,u.signDelegateAction)({delegateAction:x,signer:{sign:P=>p(this,void 0,void 0,function*(){const{signature:se}=yield h.signMessage(P,x.senderId,this.connection.networkId);return se})}});return f})}validateArgs(S){if((void 0===S.byteLength||S.byteLength!==S.length)&&(Array.isArray(S)||"object"!=typeof S))throw new v.PositionalArgsError}viewFunction({contractId:S,methodName:r,args:s={},parse:d=X,stringify:h=Q,jsContract:E=!1,blockQuery:k={finality:"optimistic"}}){return p(this,void 0,void 0,function*(){let B;this.validateArgs(s),B=E?this.encodeJSContractArgs(S,r,Object.keys(s).length>0?JSON.stringify(s):""):h(s);const x=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},k),{account_id:E?this.connection.jsvmAccountId:S,method_name:E?"view_js_contract":r,args_base64:B.toString("base64")}));return x.logs&&(0,g.printTxOutcomeLogs)({contractId:S,logs:x.logs}),x.result&&x.result.length>0&&d(Buffer.from(x.result))})}viewState(S,r={finality:"optimistic"}){return p(this,void 0,void 0,function*(){const{values:s}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},r),{account_id:this.accountId,prefix_base64:Buffer.from(S).toString("base64")}));return s.map(({key:d,value:h})=>({key:Buffer.from(d,"base64"),value:Buffer.from(h,"base64")}))})}getAccessKeys(){var S;return p(this,void 0,void 0,function*(){const r=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(S=r?.keys)||void 0===S?void 0:S.map(s=>Object.assign(Object.assign({},s),{access_key:Object.assign(Object.assign({},s.access_key),{nonce:new b.default(s.access_key.nonce)})}))})}getAccountDetails(){return p(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(s=>"FullAccess"!==s.access_key.permission).map(s=>{const d=s.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:s.public_key}})}})}getAccountBalance(){return p(this,void 0,void 0,function*(){const S=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),r=yield this.state(),s=new b.default(S.runtime_config.storage_amount_per_byte),d=new b.default(r.storage_usage).mul(s),h=new b.default(r.locked),E=new b.default(r.amount).add(h),k=E.sub(b.default.max(h,d));return{total:E.toString(),stateStaked:d.toString(),staked:h.toString(),available:k.toString()}})}getActiveDelegatedStakeBalance(){return p(this,void 0,void 0,function*(){const S=yield this.connection.provider.block({finality:"final"}),r=S.header.hash,s=S.header.epoch_id,{current_validators:d,next_validators:h,current_proposals:E}=yield this.connection.provider.validators(s),k=new Set;[...d,...h,...E].forEach(te=>k.add(te.account_id));const B=[...k],x=B.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:r}})),f=yield Promise.allSettled(x);if(f.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((te,ie,de)=>{const Ce=B[de];if("fulfilled"===ie.status){const ye=new b.default(ie.value);if(!ye.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:Ce,amount:ye.toString()}],total:te.total.add(ye)})}return"rejected"===ie.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:Ce,error:ie.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}a.Account=z},46398:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(Z,Y,G,q){return new(G||(G=Promise))(function(Q,z){function $(s){try{r(q.next(s))}catch(d){z(d)}}function S(s){try{r(q.throw(s))}catch(d){z(d)}}function r(s){s.done?Q(s.value):function X(Q){return Q instanceof G?Q:new G(function(z){z(Q)})}(s.value).then($,S)}r((q=q.apply(Z,Y||[])).next())})},C=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(a,"__esModule",{value:!0}),a.Account2FA=void 0;const w=y(29761),M=y(17527),u=y(1656),v=y(38445),g=C(y(98538)),b=y(64706),I=y(69865),_=y(3725),{addKey:A,deleteKey:R,deployContract:D,fullAccessKey:T,functionCall:F,functionCallAccessKey:L}=v.actionCreators;class V extends b.AccountMultisig{constructor(Y,G,q){super(Y,G,q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=q.helperUrl||this.helperUrl,this.storage=q.storage,this.sendCode=q.sendCode||this.sendCodeDefault,this.getCode=q.getCode||this.getCodeDefault,this.verifyCode=q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=q.onConfirmResult}signAndSendTransaction({receiverId:Y,actions:G}){const q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){yield q.signAndSendTransaction.call(this,{receiverId:Y,actions:G}),yield this.sendCode();const X=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(X)),X})}deployMultisig(Y){const G=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return p(this,void 0,void 0,function*(){const{accountId:q}=this,X=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:h})=>("phrase"===d||"ledger"===d)&&null!==h).map(d=>d.publicKey),Q=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:h}})=>"FullAccess"===h&&!X.includes(d)).map(d=>d.public_key).map(j),z=j((yield this.postSignedJson("/2fa/getAccessKey",{accountId:q})).publicKey),$=Buffer.from(JSON.stringify({num_confirmations:2})),S=[...Q.map(d=>R(d)),...Q.map(d=>A(d,L(q,I.MULTISIG_CHANGE_METHODS,null))),A(z,L(q,I.MULTISIG_CONFIRM_METHODS,null)),D(Y)],r=S.concat(F("new",$,I.MULTISIG_GAS,I.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",q);const{stateStatus:s}=yield this.checkMultisigCodeAndStateStatus(Y);switch(s){case _.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield G.signAndSendTransactionWithAccount.call(this,q,r);case _.MultisigStateStatus.VALID_STATE:return yield G.signAndSendTransactionWithAccount.call(this,q,S);case _.MultisigStateStatus.INVALID_STATE:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:Y,cleanupContractBytes:G}){return p(this,void 0,void 0,function*(){let q=[];G&&(yield this.deleteAllRequests().catch($=>$),q=yield this.get2faDisableCleanupActions(G));const X=yield this.get2faDisableKeyConversionActions(),Q=[...q,...X,D(Y)],z=yield this.findAccessKey(this.accountId,Q);if(z&&z.accessKey&&"FullAccess"!==z.accessKey.permission)throw new M.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,Q)})}get2faDisableCleanupActions(Y){return p(this,void 0,void 0,function*(){const G=yield this.viewState("").catch(X=>{const Q=X.cause&&X.cause.name;if("NO_CONTRACT_CODE"==Q)return[];throw"TOO_LARGE_CONTRACT_STATE"==Q?new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):X}),q=G.map(({key:X})=>X.toString("base64"));return G.length?[D(Y),F("clean",{keys:q},I.MULTISIG_GAS,new g.default("0"))]:[]})}get2faDisableKeyConversionActions(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,q=(yield this.getAccessKeys()).filter(({access_key:Q})=>"FullAccess"!==Q.permission).filter(({access_key:Q})=>{const z=Q.permission.FunctionCall;return z.receiver_id===Y&&4===z.method_names.length&&z.method_names.includes("add_request_and_confirm")}),X=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey);return[R(X),...q.map(({public_key:Q})=>R(w.PublicKey.from(Q))),...q.map(({public_key:Q})=>A(w.PublicKey.from(Q),T()))]})}disable(Y,G){return p(this,void 0,void 0,function*(){const{stateStatus:q}=yield this.checkMultisigCodeAndStateStatus();if(q!==_.MultisigStateStatus.VALID_STATE&&q!==_.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let X;yield this.deleteAllRequests().catch($=>X=$);const z=[...yield this.get2faDisableCleanupActions(G).catch($=>{throw"ContractHasExistingState"===$.type&&X||$}),...yield this.get2faDisableKeyConversionActions(),D(Y)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:z})})}sendCodeDefault(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,{requestId:G}=this.getRequest(),q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:Y,method:q,requestId:G}),G})}getCodeDefault(){return p(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return p(this,void 0,void 0,function*(){const Y=yield this.get2faMethod(),G=yield this.getCode(Y);try{return yield this.verifyCode(G)}catch(q){if(console.warn("Error validating security code:",q),q.toString().includes("invalid 2fa code provided")||q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw q}})}verifyCodeDefault(Y){return p(this,void 0,void 0,function*(){const{accountId:G}=this,q=this.getRequest();if(!q)throw new Error("no request pending");const{requestId:X}=q;return yield this.postSignedJson("/2fa/verify",{accountId:G,securityCode:Y,requestId:X})})}getRecoveryMethods(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this;return{accountId:Y,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:Y})}})}get2faMethod(){return p(this,void 0,void 0,function*(){let{data:Y}=yield this.getRecoveryMethods();if(Y&&Y.length&&(Y=Y.find(X=>0===X.kind.indexOf("2fa-"))),!Y)return null;const{kind:G,detail:q}=Y;return{kind:G,detail:q}})}signatureFor(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),X=yield this.connection.signer.signMessage(Buffer.from(q),Y,this.connection.networkId);return{blockNumber:q,blockNumberSignature:Buffer.from(X.signature).toString("base64")}})}postSignedJson(Y,G){return p(this,void 0,void 0,function*(){return yield(0,u.fetchJson)(this.helperUrl+Y,JSON.stringify(Object.assign(Object.assign({},G),yield this.signatureFor())))})}}a.Account2FA=V;const j=Z=>w.PublicKey.from(Z)},53683:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=void 0;const C=y(1656);class w{}a.AccountCreator=w;a.LocalAccountCreator=class M extends w{constructor(g,b){super(),this.masterAccount=g,this.initialBalance=b}createAccount(g,b){return p(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(g,b,this.initialBalance)})}};a.UrlAccountCreator=class u extends w{constructor(g,b){super(),this.connection=g,this.helperUrl=b}createAccount(g,b){return p(this,void 0,void 0,function*(){yield(0,C.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:g,newAccountPublicKey:b.toString()}))})}}},64706:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(D,T,F,L){return new(F||(F=Promise))(function(j,Z){function Y(X){try{q(L.next(X))}catch(Q){Z(Q)}}function G(X){try{q(L.throw(X))}catch(Q){Z(Q)}}function q(X){X.done?j(X.value):function V(j){return j instanceof F?j:new F(function(Z){Z(j)})}(X.value).then(Y,G)}q((L=L.apply(D,T||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.AccountMultisig=void 0;const C=y(38445),w=y(15139),M=y(69865),u=y(3725),{deployContract:v,functionCall:g}=C.actionCreators;var b,D;(D=b||(b={}))[D.INVALID_CODE=0]="INVALID_CODE",D[D.VALID_CODE=1]="VALID_CODE",D[D.UNKNOWN_CODE=2]="UNKNOWN_CODE";const I={[M.MULTISIG_STORAGE_KEY]:null};class _ extends w.Account{constructor(T,F,L){super(T,F),this.storage=L.storage,this.onAddRequestResult=L.onAddRequestResult}signAndSendTransactionWithAccount(T,F){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){return L.signAndSendTransaction.call(this,{receiverId:T,actions:F})})}signAndSendTransaction({receiverId:T,actions:F}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const{accountId:V}=this,j=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:R(F,V,T)}}));let Z;try{Z=yield L.signAndSendTransaction.call(this,{receiverId:V,actions:[g("add_request_and_confirm",j,M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch(G){if(G.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:F});throw G}if(!Z.status)throw new Error("Request failed");const Y=Object.assign({},Z.status);if(!Y.SuccessValue||"string"!=typeof Y.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:V,actions:F,requestId:parseInt(Buffer.from(Y.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(Z)),this.deleteUnconfirmedRequests(),Z})}checkMultisigCodeAndStateStatus(T){const F=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const V=T?b.UNKNOWN_CODE:b.VALID_CODE;try{return T?yield F.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[v(T),g("delete_request",{request_id:4294967295},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:u.MultisigStateStatus.VALID_STATE}}catch(j){if(new RegExp(u.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.INVALID_STATE};if(new RegExp(u.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(u.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.VALID_STATE};if(new RegExp(u.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(j&&j.message))return{codeStatus:b.INVALID_CODE,stateStatus:u.MultisigStateStatus.UNKNOWN_STATE};throw j}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[g("delete_request",{request_id:T},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return p(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(F=>this.deleteRequest(F))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const F=yield this.getRequestIds(),{requestId:L}=this.getRequest();for(const V of F)if(V!=L)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g("delete_request",{request_id:V},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return p(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(M.MULTISIG_STORAGE_KEY)||"{}"):I[M.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(M.MULTISIG_STORAGE_KEY,JSON.stringify(T));I[M.MULTISIG_STORAGE_KEY]=T}}a.AccountMultisig=_;const A=D=>D.toString().replace("ed25519:",""),R=(D,T,F)=>D.map(L=>{const V=L.enum,{gas:j,publicKey:Z,methodName:Y,args:G,deposit:q,accessKey:X,code:Q}=L[V],z={type:V[0].toUpperCase()+V.substr(1),gas:j&&j.toString()||void 0,public_key:Z&&A(Z)||void 0,method_name:Y,args:G&&Buffer.from(G).toString("base64")||void 0,code:Q&&Buffer.from(Q).toString("base64")||void 0,amount:q&&q.toString()||void 0,deposit:q&&q.toString()||"0",permission:void 0};if(X&&(F===T&&"fullAccess"!==X.permission.enum&&(z.permission={receiver_id:T,allowance:M.MULTISIG_ALLOWANCE.toString(),method_names:M.MULTISIG_CHANGE_METHODS}),"functionCall"===X.permission.enum)){const{receiverId:$,methodNames:S,allowance:r}=X.permission.functionCall;z.permission={receiver_id:$,allowance:r&&r.toString()||void 0,method_names:S}}return z})},52357:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Connection=void 0;const p=y(82613),C=y(1656);class u{constructor(g,b,I,_){this.networkId=g,this.provider=b,this.signer=I,this.jsvmAccountId=_}static fromConfig(g){const b=function w(v){switch(v.type){case void 0:return v;case"JsonRpcProvider":return new C.JsonRpcProvider(Object.assign({},v.args));default:throw new Error(`Unknown provider type ${v.type}`)}}(g.provider),I=function M(v){switch(v.type){case void 0:return v;case"InMemorySigner":return new p.InMemorySigner(v.keyStore);default:throw new Error(`Unknown signer type ${v.type}`)}}(g.signer);return new u(g.networkId,b,I,g.jsvmAccountId)}}a.Connection=u},69865:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(a,"__esModule",{value:!0}),a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=void 0;const C=y(41166),w=p(y(98538));a.MULTISIG_STORAGE_KEY="__multisigRequest",a.MULTISIG_ALLOWANCE=new w.default((0,C.parseNearAmount)("1")),a.MULTISIG_GAS=new w.default("100000000000000"),a.MULTISIG_DEPOSIT=new w.default("0"),a.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],a.MULTISIG_CONFIRM_METHODS=["confirm"]},44575:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(j,Z,Y,G){return new(Y||(Y=Promise))(function(X,Q){function z(r){try{S(G.next(r))}catch(s){Q(s)}}function $(r){try{S(G.throw(r))}catch(s){Q(s)}}function S(r){r.done?X(r.value):function q(X){return X instanceof Y?X:new Y(function(Q){Q(X)})}(r.value).then(z,$)}S((G=G.apply(j,Z||[])).next())})},C=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=void 0;const w=y(41166),M=y(17527),u=C(y(74411)),v=C(y(26474)),g=C(y(98538)),b=C(y(89176)),I=y(84778),_=y(43506);function A(j,Z){return{[j]:(...Y)=>Z(...Y)}[j]}function R(j,Z,Y,G){var q;if(!F(j))return;if(Z.params&&Z.params.serialization_type!==I.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(Z.name,Z.params.serialization_type);if(Z.result&&Z.result.serialization_type!==I.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(Z.name,Z.result.serialization_type);const X=(null===(q=Z.params)||void 0===q?void 0:q.args)||[];for(const Q of X){const z=j[Q.name],$=Q.type_schema;$.definitions=G.body.root_schema.definitions;const S=Y.compile($);if(!S(z))throw new _.ArgumentSchemaError(Q.name,S.errors)}for(const Q of Object.keys(j))if(!X.find($=>$.name===Q))throw new _.UnknownArgumentError(Q,X.map($=>$.name))}const T=j=>j&&void 0!==j.byteLength&&j.byteLength===j.length,F=j=>"[object Object]"===Object.prototype.toString.call(j);a.Contract=class L{constructor(Z,Y,G){this.account=Z,this.contractId=Y;const{viewMethods:q=[],changeMethods:X=[],abi:Q}=G;let z=q.map(r=>({name:r,abi:null})),$=X.map(r=>({name:r,abi:null}));if(Q){if(z.length>0||$.length>0)throw new _.ConflictingOptions;z=Q.body.functions.filter(r=>r.kind===I.AbiFunctionKind.View).map(r=>({name:r.name,abi:r})),$=Q.body.functions.filter(r=>r.kind===I.AbiFunctionKind.Call).map(r=>({name:r.name,abi:r}))}const S=function D(){const j=new u.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,v.default)(j),j}();z.forEach(({name:r,abi:s})=>{Object.defineProperty(this,r,{writable:!1,enumerable:!0,value:A(r,(d={},h={},...E)=>p(this,void 0,void 0,function*(){if(E.length||!F(d)&&!T(d)||!F(h))throw new M.PositionalArgsError;return s&&R(d,s,S,Q),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:r,args:d},h))}))})}),$.forEach(({name:r,abi:s})=>{Object.defineProperty(this,r,{writable:!1,enumerable:!0,value:A(r,(...d)=>p(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!F(d[0])&&!T(d[0])))throw new M.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),s&&R(d[0].args,s,S,Q),this._changeMethod(Object.assign({methodName:r},d[0]))}))})})}_changeMethod({args:Z,methodName:Y,gas:G,amount:q,meta:X,callbackUrl:Q}){return p(this,void 0,void 0,function*(){!function V(j){const Z="number, decimal string or BN";for(const Y of Object.keys(j)){const G=j[Y];if(G&&!g.default.isBN(G)&&isNaN(G))throw new M.ArgumentTypeError(Y,Z,G)}}({gas:G,amount:q});const z=yield this.account.functionCall({contractId:this.contractId,methodName:Y,args:Z,gas:G,attachedDeposit:q,walletMeta:X,walletCallbackUrl:Q});return(0,w.getTransactionLastResult)(z)})}}},43506:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ConflictingOptions=a.ArgumentSchemaError=a.UnknownArgumentError=a.UnsupportedSerializationError=void 0;class y extends Error{constructor(u,v){super(`Contract method '${u}' is using an unsupported serialization type ${v}`)}}a.UnsupportedSerializationError=y;class p extends Error{constructor(u,v){super(`Unrecognized argument '${u}', expected '${JSON.stringify(v)}'`)}}a.UnknownArgumentError=p;class C extends Error{constructor(u,v){super(`Argument '${u}' does not conform to the specified ABI schema: '${JSON.stringify(v)}'`)}}a.ArgumentSchemaError=C;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}a.ConflictingOptions=w},74931:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=a.UnsupportedSerializationError=a.UnknownArgumentError=a.ConflictingOptions=a.ArgumentSchemaError=a.Contract=a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=a.Connection=a.AccountMultisig=a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=a.Account2FA=a.Account=void 0;var p=y(15139);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return p.Account}});var C=y(46398);Object.defineProperty(a,"Account2FA",{enumerable:!0,get:function(){return C.Account2FA}});var w=y(53683);Object.defineProperty(a,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(a,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(a,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var M=y(64706);Object.defineProperty(a,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var u=y(52357);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return u.Connection}});var v=y(69865);Object.defineProperty(a,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return v.MULTISIG_STORAGE_KEY}}),Object.defineProperty(a,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return v.MULTISIG_ALLOWANCE}}),Object.defineProperty(a,"MULTISIG_GAS",{enumerable:!0,get:function(){return v.MULTISIG_GAS}}),Object.defineProperty(a,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return v.MULTISIG_DEPOSIT}}),Object.defineProperty(a,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(a,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CONFIRM_METHODS}});var g=y(44575);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return g.Contract}});var b=y(43506);Object.defineProperty(a,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(a,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(a,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(a,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var I=y(3725);Object.defineProperty(a,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return I.MultisigDeleteRequestRejectionError}}),Object.defineProperty(a,"MultisigStateStatus",{enumerable:!0,get:function(){return I.MultisigStateStatus}})},3725:(ne,a)=>{"use strict";var C;Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=void 0,(C=a.MultisigDeleteRequestRejectionError||(a.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",C.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",C.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",C.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",C.METHOD_NOT_FOUND="Contract method is not found",function(C){C[C.INVALID_STATE=0]="INVALID_STATE",C[C.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",C[C.VALID_STATE=2]="VALID_STATE",C[C.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(a.MultisigStateStatus||(a.MultisigStateStatus={}))},15932:(ne,a)=>{"use strict";var p;Object.defineProperty(a,"__esModule",{value:!0}),a.KeyType=void 0,(p=a.KeyType||(a.KeyType={}))[p.ED25519=0]="ED25519"},29761:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=a.KeyPairEd25519=a.KeyPair=a.KeyType=void 0;var p=y(15932);Object.defineProperty(a,"KeyType",{enumerable:!0,get:function(){return p.KeyType}});var C=y(82568);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return C.KeyPair}});var w=y(56510);Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var M=y(987);Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},82568:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPair=void 0;const p=y(98475),C=y(56510);class w extends p.KeyPairBase{static fromRandom(u){if("ED25519"===u.toUpperCase())return C.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${u}`)}static fromString(u){const v=u.split(":");if(1===v.length)return new C.KeyPairEd25519(v[0]);if(2===v.length){if("ED25519"===v[0].toUpperCase())return new C.KeyPairEd25519(v[1]);throw new Error(`Unknown curve: ${v[0]}`)}throw new Error("Invalid encoded key format, must be :")}}a.KeyPair=w},98475:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPairBase=void 0;a.KeyPairBase=class y{}},56510:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPairEd25519=void 0;const C=y(21531),w=p(y(40489)),M=y(15932),u=y(98475),v=y(987);class g extends u.KeyPairBase{constructor(I){super();const _=w.default.sign.keyPair.fromSecretKey((0,C.baseDecode)(I));this.publicKey=new v.PublicKey({keyType:M.KeyType.ED25519,data:_.publicKey}),this.secretKey=I}static fromRandom(){const I=w.default.sign.keyPair();return new g((0,C.baseEncode)(I.secretKey))}sign(I){return{signature:w.default.sign.detached(I,(0,C.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(I,_){return this.publicKey.verify(I,_)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}a.KeyPairEd25519=g},987:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=void 0;const C=y(17527),w=y(21531),M=p(y(40489)),u=y(15932);function g(I){if("ed25519"===I.toLowerCase())return u.KeyType.ED25519;throw new Error(`Unknown key type ${I}`)}class b extends C.Assignable{static from(_){return"string"==typeof _?b.fromString(_):_}static fromString(_){const A=_.split(":");if(1===A.length)return new b({keyType:u.KeyType.ED25519,data:(0,w.baseDecode)(A[0])});if(2===A.length)return new b({keyType:g(A[0]),data:(0,w.baseDecode)(A[1])});throw new Error("Invalid encoded key format, must be :")}toString(){return`${function v(I){if(I===u.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${I}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(_,A){if(this.keyType===u.KeyType.ED25519)return M.default.sign.detached.verify(_,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}a.PublicKey=b},9454:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;const C=y(29761),w=y(69170);class u extends w.KeyStore{constructor(g=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=g,this.prefix=b}setKey(g,b,I){return p(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(g,b),I.toString())})}getKey(g,b){return p(this,void 0,void 0,function*(){const I=this.localStorage.getItem(this.storageKeyForSecretKey(g,b));return I?C.KeyPair.fromString(I):null})}removeKey(g,b){return p(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(g,b))})}clear(){return p(this,void 0,void 0,function*(){for(const g of this.storageKeys())g.startsWith(this.prefix)&&this.localStorage.removeItem(g)})}getNetworks(){return p(this,void 0,void 0,function*(){const g=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const I=b.substring(this.prefix.length).split(":");g.add(I[1])}return Array.from(g.values())})}getAccounts(g){return p(this,void 0,void 0,function*(){const b=new Array;for(const I of this.storageKeys())if(I.startsWith(this.prefix)){const _=I.substring(this.prefix.length).split(":");_[1]===g&&b.push(_[0])}return b})}storageKeyForSecretKey(g,b){return`${this.prefix}${b}:${g}`}*storageKeys(){for(let g=0;g{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;var p=y(9454);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},55738:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UnencryptedFileSystemKeyStore=a.readKeyFile=void 0;var p=y(2252);Object.defineProperty(a,"readKeyFile",{enumerable:!0,get:function(){return p.readKeyFile}}),Object.defineProperty(a,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return p.UnencryptedFileSystemKeyStore}})},2252:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(Z,Y,G,q){return new(G||(G=Promise))(function(Q,z){function $(s){try{r(q.next(s))}catch(d){z(d)}}function S(s){try{r(q.throw(s))}catch(d){z(d)}}function r(s){s.done?Q(s.value):function X(Q){return Q instanceof G?Q:new G(function(z){z(Q)})}(s.value).then($,S)}r((q=q.apply(Z,Y||[])).next())})},C=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(a,"__esModule",{value:!0}),a.UnencryptedFileSystemKeyStore=a.readKeyFile=void 0;const w=y(29761),M=y(69170),u=C(y(6581)),v=C(y(63928)),g=y(26788),b=Z=>Z?(0,g.promisify)(Z):()=>{throw new Error("Trying to use unimplemented function. `fs` module not available in web build?")},I=b(u.default.exists),_=b(u.default.readFile),A=b(u.default.writeFile),R=b(u.default.unlink),D=b(u.default.readdir),T=b(u.default.mkdir);function V(Z){return p(this,void 0,void 0,function*(){const Y=yield function F(Z){return p(this,void 0,void 0,function*(){const Y=yield _(Z);return JSON.parse(Y.toString())})}(Z);let G=Y.private_key;return!G&&Y.secret_key&&(G=Y.secret_key),[Y.account_id,w.KeyPair.fromString(G)]})}a.readKeyFile=V;class j extends M.KeyStore{constructor(Y){super(),this.keyDir=v.default.resolve(Y)}setKey(Y,G,q){return p(this,void 0,void 0,function*(){yield function L(Z){return p(this,void 0,void 0,function*(){try{yield T(Z,{recursive:!0})}catch(Y){if("EEXIST"!==Y.code)throw Y}})}(`${this.keyDir}/${Y}`);const X={account_id:G,public_key:q.getPublicKey().toString(),private_key:q.toString()};yield A(this.getKeyFilePath(Y,G),JSON.stringify(X),{mode:384})})}getKey(Y,G){return p(this,void 0,void 0,function*(){return(yield I(this.getKeyFilePath(Y,G)))?(yield V(this.getKeyFilePath(Y,G)))[1]:null})}removeKey(Y,G){return p(this,void 0,void 0,function*(){(yield I(this.getKeyFilePath(Y,G)))&&(yield R(this.getKeyFilePath(Y,G)))})}clear(){return p(this,void 0,void 0,function*(){for(const Y of yield this.getNetworks())for(const G of yield this.getAccounts(Y))yield this.removeKey(Y,G)})}getKeyFilePath(Y,G){return`${this.keyDir}/${Y}/${G}.json`}getNetworks(){return p(this,void 0,void 0,function*(){const Y=yield D(this.keyDir),G=new Array;return Y.forEach(q=>{G.push(q)}),G})}getAccounts(Y){return p(this,void 0,void 0,function*(){return(yield I(`${this.keyDir}/${Y}`))?(yield D(`${this.keyDir}/${Y}`)).filter(q=>q.endsWith(".json")).map(q=>q.replace(/.json$/,"")):[]})}toString(){return`UnencryptedFileSystemKeyStore(${this.keyDir})`}}a.UnencryptedFileSystemKeyStore=j},14484:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(u,v,g,b){return new(g||(g=Promise))(function(_,A){function R(F){try{T(b.next(F))}catch(L){A(L)}}function D(F){try{T(b.throw(F))}catch(L){A(L)}}function T(F){F.done?_(F.value):function I(_){return _ instanceof g?_:new g(function(A){A(_)})}(F.value).then(R,D)}T((b=b.apply(u,v||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.InMemoryKeyStore=void 0;const C=y(29761),w=y(99749);class M extends w.KeyStore{constructor(){super(),this.keys={}}setKey(v,g,b){return p(this,void 0,void 0,function*(){this.keys[`${g}:${v}`]=b.toString()})}getKey(v,g){return p(this,void 0,void 0,function*(){const b=this.keys[`${g}:${v}`];return b?C.KeyPair.fromString(b):null})}removeKey(v,g){return p(this,void 0,void 0,function*(){delete this.keys[`${g}:${v}`]})}clear(){return p(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return p(this,void 0,void 0,function*(){const v=new Set;return Object.keys(this.keys).forEach(g=>{const b=g.split(":");v.add(b[1])}),Array.from(v.values())})}getAccounts(v){return p(this,void 0,void 0,function*(){const g=new Array;return Object.keys(this.keys).forEach(b=>{const I=b.split(":");I[I.length-1]===v&&g.push(I.slice(0,I.length-1).join(":"))}),g})}toString(){return"InMemoryKeyStore"}}a.InMemoryKeyStore=M},69170:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=a.KeyStore=a.InMemoryKeyStore=void 0;var p=y(14484);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}});var C=y(99749);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return C.KeyStore}});var w=y(93669);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},99749:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyStore=void 0;a.KeyStore=class y{}},93669:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(M,u,v,g){return new(v||(v=Promise))(function(I,_){function A(T){try{D(g.next(T))}catch(F){_(F)}}function R(T){try{D(g.throw(T))}catch(F){_(F)}}function D(T){T.done?I(T.value):function b(I){return I instanceof v?I:new v(function(_){_(I)})}(T.value).then(A,R)}D((g=g.apply(M,u||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=void 0;const C=y(99749);class w extends C.KeyStore{constructor(u,v={writeKeyStoreIndex:0}){super(),this.options=v,this.keyStores=u}setKey(u,v,g){return p(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(u,v,g)})}getKey(u,v){return p(this,void 0,void 0,function*(){for(const g of this.keyStores){const b=yield g.getKey(u,v);if(b)return b}return null})}removeKey(u,v){return p(this,void 0,void 0,function*(){for(const g of this.keyStores)yield g.removeKey(u,v)})}clear(){return p(this,void 0,void 0,function*(){for(const u of this.keyStores)yield u.clear()})}getNetworks(){return p(this,void 0,void 0,function*(){const u=new Set;for(const v of this.keyStores)for(const g of yield v.getNetworks())u.add(g);return Array.from(u)})}getAccounts(u){return p(this,void 0,void 0,function*(){const v=new Set;for(const g of this.keyStores)for(const b of yield g.getAccounts(u))v.add(b);return Array.from(v)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}a.MergeKeyStore=w},82420:function(ne,a){"use strict";var y=this&&this.__awaiter||function(w,M,u,v){return new(u||(u=Promise))(function(b,I){function _(D){try{R(v.next(D))}catch(T){I(T)}}function A(D){try{R(v.throw(D))}catch(T){I(T)}}function R(D){D.done?b(D.value):function g(b){return b instanceof u?b:new u(function(I){I(b)})}(D.value).then(_,A)}R((v=v.apply(w,M||[])).next())})};function C(w){return new Promise(M=>setTimeout(M,w))}Object.defineProperty(a,"__esModule",{value:!0}),a.exponentialBackoff=void 0,a.exponentialBackoff=function p(w,M,u,v){return y(this,void 0,void 0,function*(){let g=w;for(let b=0;b!process.env.NEAR_NO_LOGS&&console.warn(...T);a.fetchJson=function D(T,F){return M(this,void 0,void 0,function*(){let L={url:null};"string"==typeof T?L.url=T:L=T;const V=yield(0,b.exponentialBackoff)(I,A,_,()=>M(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(y(60778)))).default);const j=yield global.fetch(L.url,{method:F?"POST":"GET",body:F||void 0,headers:Object.assign(Object.assign({},L.headers),{"Content-Type":"application/json"})});if(!j.ok){if(503===j.status)return R(`Retrying HTTP request for ${L.url} as it's not available now`),null;throw(0,g.default)(j.status,yield j.text())}return j}catch(j){if(j.toString().includes("FetchError")||j.toString().includes("Failed to fetch"))return R(`Retrying HTTP request for ${L.url} because of error: ${j}`),null;throw j}}));if(!V)throw new v.TypedError(`Exceeded ${A} attempts for ${L.url}.`,"RetriesExceeded");return yield V.json()})}},1656:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fetchJson=a.Provider=a.JsonRpcProvider=a.exponentialBackoff=void 0;var p=y(82420);Object.defineProperty(a,"exponentialBackoff",{enumerable:!0,get:function(){return p.exponentialBackoff}});var C=y(71935);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}});var w=y(10488);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return w.Provider}});var M=y(22292);Object.defineProperty(a,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},71935:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(F,L,V,j){return new(V||(V=Promise))(function(Y,G){function q(z){try{Q(j.next(z))}catch($){G($)}}function X(z){try{Q(j.throw(z))}catch($){G($)}}function Q(z){z.done?Y(z.value):function Z(Y){return Y instanceof V?Y:new V(function(G){G(Y)})}(z.value).then(q,X)}Q((j=j.apply(F,L||[])).next())})},C=this&&this.__rest||function(F,L){var V={};for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&L.indexOf(j)<0&&(V[j]=F[j]);if(null!=F&&"function"==typeof Object.getOwnPropertySymbols){var Z=0;for(j=Object.getOwnPropertySymbols(F);Zp(this,void 0,void 0,function*(){try{const Y={method:L,params:V,id:D++,jsonrpc:"2.0"},G=yield(0,I.fetchJson)(this.connection,JSON.stringify(Y));if(G.error){if("object"==typeof G.error.data)throw"string"==typeof G.error.data.error_message&&"string"==typeof G.error.data.error_type?new M.TypedError(G.error.data.error_message,G.error.data.error_type):(0,w.parseRpcError)(G.error.data);{const q=`[${G.error.code}] ${G.error.message}: ${G.error.data}`;throw"Timeout"===G.error.data||q.includes("Timeout error")||q.includes("query has timed out")?new M.TypedError(q,"TimeoutError"):new M.TypedError(q,(0,w.getErrorTypeFromErrorMessage)(G.error.data,G.error.name))}}return G}catch(Y){if("TimeoutError"===Y.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${L} as it has timed out`,V),null;throw Y}})),{result:Z}=j;if(typeof Z>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${L}.`,"RetriesExceeded");return Z})}}a.JsonRpcProvider=T},10488:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Provider=void 0;a.Provider=class y{}},89614:ne=>{"use strict";function y(C,w){if("function"!=typeof C)throw new TypeError("argument fn must be a function");return C}function p(C,w,M){if(!C||"object"!=typeof C&&"function"!=typeof C)throw new TypeError("argument obj must be object");var u=Object.getOwnPropertyDescriptor(C,w);if(!u)throw new TypeError("must call property on owner object");if(!u.configurable)throw new TypeError("property must be configurable")}ne.exports=function a(C){if(!C)throw new TypeError("argument namespace is required");function w(M){}return w._file=void 0,w._ignored=!0,w._namespace=C,w._traced=!1,w._warned=Object.create(null),w.function=y,w.property=p,w}},31400:(ne,a,y)=>{"use strict";var p=y(89614)("http-errors"),C=y(1106),w=y(99881),M=y(83894),u=y(77721);function v(F){return Number(String(F).charAt(0)+"00")}function R(F,L){var V=Object.getOwnPropertyDescriptor(F,"name");V&&V.configurable&&(V.value=L,Object.defineProperty(F,"name",V))}function T(F){return"Error"!==F.substr(-5)?F+"Error":F}ne.exports=function g(){for(var F,L,V=500,j={},Z=0;Z=600)&&p("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof V||!w[V]&&(V<400||V>=600))&&(V=500);var G=g[V]||g[v(V)];for(var q in F||(F=G?new G(L):new Error(L||w[V]),Error.captureStackTrace(F,g)),(!G||!(F instanceof G)||F.status!==V)&&(F.expose=V<500,F.status=F.statusCode=V),j)"status"!==q&&"statusCode"!==q&&(F[q]=j[q]);return F},ne.exports.HttpError=function b(){function F(){throw new TypeError("cannot construct abstract class")}return M(F,Error),F}(),ne.exports.isHttpError=function _(F){return function(V){return!(!V||"object"!=typeof V)&&(V instanceof F||V instanceof Error&&"boolean"==typeof V.expose&&"number"==typeof V.statusCode&&V.status===V.statusCode)}}(ne.exports.HttpError),function D(F,L,V){L.forEach(function(Z){var Y,G=u(w[Z]);switch(v(Z)){case 400:Y=function I(F,L,V){var j=T(L);function Z(Y){var G=Y??w[V],q=new Error(G);return Error.captureStackTrace(q,Z),C(q,Z.prototype),Object.defineProperty(q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),q}return M(Z,F),R(Z,j),Z.prototype.status=V,Z.prototype.statusCode=V,Z.prototype.expose=!0,Z}(V,G,Z);break;case 500:Y=function A(F,L,V){var j=T(L);function Z(Y){var G=Y??w[V],q=new Error(G);return Error.captureStackTrace(q,Z),C(q,Z.prototype),Object.defineProperty(q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),q}return M(Z,F),R(Z,j),Z.prototype.status=V,Z.prototype.statusCode=V,Z.prototype.expose=!1,Z}(V,G,Z)}Y&&(F[Z]=Y,F[G]=Y)}),F["I'mateapot"]=p.function(F.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,w.codes,ne.exports.HttpError)},99881:(ne,a,y)=>{"use strict";var p=y(20863);function w(M){if("number"==typeof M){if(!w[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var u=parseInt(M,10);if(!isNaN(u)){if(!w[u])throw new Error("invalid status code: "+u);return u}if(!(u=w[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return u}ne.exports=w,w.STATUS_CODES=p,w.codes=function C(M,u){var v=[];return Object.keys(u).forEach(function(b){var I=u[b],_=Number(b);M[_]=I,M[I]=_,M[I.toLowerCase()]=_,v.push(_)}),v}(w,p),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},68492:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(b,I,_,A){return new(_||(_=Promise))(function(D,T){function F(j){try{V(A.next(j))}catch(Z){T(Z)}}function L(j){try{V(A.throw(j))}catch(Z){T(Z)}}function V(j){j.done?D(j.value):function R(D){return D instanceof _?D:new _(function(T){T(D)})}(j.value).then(F,L)}V((A=A.apply(b,I||[])).next())})},C=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.InMemorySigner=void 0;const w=y(29761),M=y(69170),u=C(y(1520)),v=y(2345);class g extends v.Signer{constructor(I){super(),this.keyStore=I}static fromKeyPair(I,_,A){return p(this,void 0,void 0,function*(){const R=new M.InMemoryKeyStore;return yield R.setKey(I,_,A),new g(R)})}createKey(I,_){return p(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(_,I,A),A.getPublicKey()})}getPublicKey(I,_){return p(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(_,I);return null===A?null:A.getPublicKey()})}signMessage(I,_,A){return p(this,void 0,void 0,function*(){const R=new Uint8Array(u.default.sha256.array(I));if(!_)throw new Error("InMemorySigner requires provided account id");const D=yield this.keyStore.getKey(A,_);if(null===D)throw new Error(`Key for ${_} not found in ${A}`);return D.sign(R)})}toString(){return`InMemorySigner(${this.keyStore})`}}a.InMemorySigner=g},82613:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=a.InMemorySigner=void 0;var p=y(68492);Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}});var C=y(2345);Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return C.Signer}})},2345:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=void 0;a.Signer=class y{}},39779:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.actionCreators=a.stringifyJsonOrBytes=void 0;const p=y(83407);function v(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}a.stringifyJsonOrBytes=v,a.actionCreators={addKey:function _(T,F){return new p.Action({addKey:new p.AddKey({publicKey:T,accessKey:F})})},createAccount:function M(){return new p.Action({createAccount:new p.CreateAccount({})})},deleteAccount:function R(T){return new p.Action({deleteAccount:new p.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new p.Action({deleteKey:new p.DeleteKey({publicKey:T})})},deployContract:function u(T){return new p.Action({deployContract:new p.DeployContract({code:T})})},fullAccessKey:function C(){return new p.AccessKey({permission:new p.AccessKeyPermission({fullAccess:new p.FullAccessPermission({})})})},functionCall:function g(T,F,L,V,j=v,Z=!1){return Z?new p.Action({functionCall:new p.FunctionCall({methodName:T,args:F,gas:L,deposit:V})}):new p.Action({functionCall:new p.FunctionCall({methodName:T,args:j(F),gas:L,deposit:V})})},functionCallAccessKey:function w(T,F,L){return new p.AccessKey({permission:new p.AccessKeyPermission({functionCall:new p.FunctionCallPermission({receiverId:T,allowance:L,methodNames:F})})})},signedDelegate:function D({delegateAction:T,signature:F}){return new p.Action({signedDelegate:new p.SignedDelegate({delegateAction:T,signature:F})})},stake:function I(T,F){return new p.Action({stake:new p.Stake({stake:T,publicKey:F})})},transfer:function b(T){return new p.Action({transfer:new p.Transfer({deposit:T})})}}},83407:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Action=a.SignedDelegate=a.DeleteAccount=a.DeleteKey=a.AddKey=a.Stake=a.Transfer=a.FunctionCall=a.DeployContract=a.CreateAccount=a.IAction=a.AccessKey=a.AccessKeyPermission=a.FullAccessPermission=a.FunctionCallPermission=void 0;const p=y(17527);class C{constructor(Z){if(1!==Object.keys(Z).length)throw new Error("Enum can only take single value");Object.keys(Z).map(Y=>{this[Y]=Z[Y],this.enum=Y})}}class w extends p.Assignable{}a.FunctionCallPermission=w;class M extends p.Assignable{}a.FullAccessPermission=M;a.AccessKeyPermission=class u extends C{};class v extends p.Assignable{}a.AccessKey=v;class g extends p.Assignable{}a.IAction=g;a.CreateAccount=class b extends g{};a.DeployContract=class I extends g{};a.FunctionCall=class _ extends g{};a.Transfer=class A extends g{};a.Stake=class R extends g{};a.AddKey=class D extends g{};a.DeleteKey=class T extends g{};a.DeleteAccount=class F extends g{};a.SignedDelegate=class L extends g{};a.Action=class V extends C{}},71354:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createTransaction=void 0;const p=y(73315);a.createTransaction=function C(w,M,u,v,g,b){return new p.Transaction({signerId:w,publicKey:M,nonce:v,receiverId:u,actions:g,blockHash:b})}},91396:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.buildDelegateAction=a.DelegateAction=void 0;const p=y(17527),C=y(39779),{addKey:w,createAccount:M,deleteAccount:u,deleteKey:v,deployContract:g,functionCall:b,stake:I,transfer:_}=C.actionCreators;class A extends p.Assignable{}a.DelegateAction=A,a.buildDelegateAction=function R({actions:D,maxBlockHeight:T,nonce:F,publicKey:L,receiverId:V,senderId:j}){return new A({senderId:j,receiverId:V,actions:D.map(Z=>{if(!Z.type&&!Z.params)return Z;switch(Z.type){case"AddKey":{const{publicKey:Y,accessKey:G}=Z.params;return w(Y,G)}case"CreateAccount":return M(Z.params.createAccount);case"DeleteAccount":return u(Z.params.deleteAccount);case"DeleteKey":return v(Z.params.publicKey);case"DeployContract":return g(Z.params.code);case"FunctionCall":{const{methodName:Y,args:G,gas:q,deposit:X}=Z.params;return b(Y,G,q,X)}case"Stake":return I(Z.params.stake,Z.params.publicKey);case"Transfer":{const{deposit:Y}=Z.params;return _(Y)}}throw new Error("Unrecognized action")}),nonce:F,maxBlockHeight:T,publicKey:L})}},38445:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(39779),a),C(y(83407),a),C(y(71354),a),C(y(91396),a),C(y(73315),a),C(y(20373),a),C(y(95758),a)},11739:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.DelegateActionPrefix=void 0;const p=y(17527),C=Math.pow(2,30),w_MetaTransactions=366;class M extends p.Assignable{}class u extends M{constructor(b){super({prefix:C+b})}}a.DelegateActionPrefix=class v extends u{constructor(){super(w_MetaTransactions)}}},73315:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SCHEMA=a.SignedTransaction=a.Transaction=a.decodeSignedTransaction=a.decodeTransaction=a.encodeTransaction=a.encodeSignedDelegate=a.encodeDelegateAction=void 0;const p=y(29761),C=y(17527),w=y(21531),M=y(83407),u=y(91396),v=y(11739),g=y(95758);function _(F){return(0,w.serialize)(a.SCHEMA,F)}function A(F){return(0,w.deserialize)(a.SCHEMA,D,F)}function R(F){return(0,w.deserialize)(a.SCHEMA,T,F)}a.encodeDelegateAction=function b(F){return new Uint8Array([...(0,w.serialize)(a.SCHEMA,new v.DelegateActionPrefix),...(0,w.serialize)(a.SCHEMA,F)])},a.encodeSignedDelegate=function I(F){return(0,w.serialize)(a.SCHEMA,F)},a.encodeTransaction=_,a.decodeTransaction=A,a.decodeSignedTransaction=R;class D extends C.Assignable{encode(){return _(this)}static decode(L){return A(L)}}a.Transaction=D;class T extends C.Assignable{encode(){return _(this)}static decode(L){return R(L)}}a.SignedTransaction=T,a.SCHEMA=new Map([[g.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",D],["signature",g.Signature]]}],[D,{kind:"struct",fields:[["signerId","string"],["publicKey",p.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[M.Action]]]}],[p.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[M.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",M.AccessKeyPermission]]}],[M.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",M.FunctionCallPermission],["fullAccess",M.FullAccessPermission]]}],[M.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[M.FullAccessPermission,{kind:"struct",fields:[]}],[M.Action,{kind:"enum",field:"enum",values:[["createAccount",M.CreateAccount],["deployContract",M.DeployContract],["functionCall",M.FunctionCall],["transfer",M.Transfer],["stake",M.Stake],["addKey",M.AddKey],["deleteKey",M.DeleteKey],["deleteAccount",M.DeleteAccount],["signedDelegate",M.SignedDelegate]]}],[M.CreateAccount,{kind:"struct",fields:[]}],[M.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[M.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[M.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[M.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.PublicKey]]}],[M.AddKey,{kind:"struct",fields:[["publicKey",p.PublicKey],["accessKey",M.AccessKey]]}],[M.DeleteKey,{kind:"struct",fields:[["publicKey",p.PublicKey]]}],[M.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[u.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[M.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",p.PublicKey]]}],[v.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[M.SignedDelegate,{kind:"struct",fields:[["delegateAction",u.DelegateAction],["signature",g.Signature]]}]])},20373:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(A,R,D,T){return new(D||(D=Promise))(function(L,V){function j(G){try{Y(T.next(G))}catch(q){V(q)}}function Z(G){try{Y(T.throw(G))}catch(q){V(q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof D?L:new D(function(V){V(L)})}(G.value).then(j,Z)}Y((T=T.apply(A,R||[])).next())})},C=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(a,"__esModule",{value:!0}),a.signDelegateAction=a.signTransaction=void 0;const w=C(y(1520)),M=y(83407),u=y(71354),v=y(73315),g=y(95758);function b(A,R,D,T){return p(this,void 0,void 0,function*(){const F=(0,v.encodeTransaction)(A),L=new Uint8Array(w.default.sha256.array(F)),V=yield R.signMessage(F,D,T);return[L,new v.SignedTransaction({transaction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:V.signature})})]})}a.signTransaction=function I(...A){return p(this,void 0,void 0,function*(){if(A[0].constructor===v.Transaction){const[R,D,T,F]=A;return b(R,D,T,F)}{const[R,D,T,F,L,V,j]=A,Z=yield L.getPublicKey(V,j);return b((0,u.createTransaction)(V,Z,R,D,T,F),L,V,j)}})},a.signDelegateAction=function _({delegateAction:A,signer:R}){return p(this,void 0,void 0,function*(){const D=(0,v.encodeDelegateAction)(A),T=yield R.sign(D),F=new M.SignedDelegate({delegateAction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(w.default.sha256.array(D)),signedDelegateAction:F}})}},95758:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signature=void 0;const p=y(17527);class C extends p.Assignable{}a.Signature=C},32272:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Assignable=void 0;a.Assignable=class y{constructor(C){Object.keys(C).map(w=>{this[w]=C[w]})}}},27876:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorContext=a.TypedError=a.ArgumentTypeError=a.PositionalArgsError=void 0;class y extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}a.PositionalArgsError=y;class p extends Error{constructor(u,v,g){super(`Expected ${v} for '${u}' argument, but got '${JSON.stringify(g)}'`)}}a.ArgumentTypeError=p;class C extends Error{constructor(u,v,g){super(u),this.type=v||"UntypedError",this.context=g}}a.TypedError=C;a.ErrorContext=class w{constructor(u){this.transactionHash=u}}},17527:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(32272),a),C(y(27876),a),C(y(39077),a)},39077:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FinalExecutionStatusBasic=a.ExecutionStatusBasic=a.IdType=void 0;var p=y(16365);Object.defineProperty(a,"IdType",{enumerable:!0,get:function(){return p.IdType}});var C=y(83706);Object.defineProperty(a,"ExecutionStatusBasic",{enumerable:!0,get:function(){return C.ExecutionStatusBasic}}),Object.defineProperty(a,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return C.FinalExecutionStatusBasic}})},16365:(ne,a)=>{"use strict";var p;Object.defineProperty(a,"__esModule",{value:!0}),a.IdType=void 0,(p=a.IdType||(a.IdType={})).Transaction="transaction",p.Receipt="receipt"},83706:(ne,a)=>{"use strict";var C;Object.defineProperty(a,"__esModule",{value:!0}),a.FinalExecutionStatusBasic=a.ExecutionStatusBasic=void 0,(C=a.ExecutionStatusBasic||(a.ExecutionStatusBasic={})).Unknown="Unknown",C.Pending="Pending",C.Failure="Failure",function(C){C.NotStarted="NotStarted",C.Started="Started",C.Failure="Failure"}(a.FinalExecutionStatusBasic||(a.FinalExecutionStatusBasic={}))},73215:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_FUNCTION_CALL_GAS=void 0;const C=p(y(98538));a.DEFAULT_FUNCTION_CALL_GAS=new C.default("30000000000000")},38668:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.logWarning=void 0,a.logWarning=function y(...p){process.env.NEAR_NO_LOGS||console.warn(...p)}},359:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.parseRpcError=a.parseResultError=a.getErrorTypeFromErrorMessage=a.formatError=a.ServerError=a.logWarning=void 0;var p=y(38668);Object.defineProperty(a,"logWarning",{enumerable:!0,get:function(){return p.logWarning}});var C=y(97217);Object.defineProperty(a,"ServerError",{enumerable:!0,get:function(){return C.ServerError}}),Object.defineProperty(a,"formatError",{enumerable:!0,get:function(){return C.formatError}}),Object.defineProperty(a,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return C.getErrorTypeFromErrorMessage}}),Object.defineProperty(a,"parseResultError",{enumerable:!0,get:function(){return C.parseResultError}}),Object.defineProperty(a,"parseRpcError",{enumerable:!0,get:function(){return C.parseRpcError}})},97217:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(a,"__esModule",{value:!0}),a.getErrorTypeFromErrorMessage=a.formatError=a.parseResultError=a.parseRpcError=a.ServerError=void 0;const C=y(17527),w=p(y(11346)),M=y(67112),u=p(y(56584)),v=p(y(96747)),g={formatNear:()=>(V,j)=>(0,M.formatNearAmount)(j(V))};class b extends C.TypedError{}a.ServerError=b;class I extends b{}function _(V){const j={},Z=D(V,v.default.schema,j,""),Y=new b(R(Z,j),Z);return Object.assign(Y,j),Y}function R(V,j){return"string"==typeof u.default[V]?w.default.render(u.default[V],Object.assign(Object.assign({},j),g)):JSON.stringify(j)}function D(V,j,Z,Y){let G,q,X;for(const Q in j){if(L(V[Q]))return V[Q];if(F(V[Q]))G=V[Q],q=j[Q],X=Q;else{if(!F(V.kind)||!F(V.kind[Q]))continue;G=V.kind[Q],q=j[Q],X=Q}}if(G&&q){for(const Q of Object.keys(q.props))Z[Q]=G[Q];return D(G,j,Z,X)}return Z.kind=V,Y}function F(V){return"[object Object]"===Object.prototype.toString.call(V)}function L(V){return"[object String]"===Object.prototype.toString.call(V)}a.parseRpcError=_,a.parseResultError=function A(V){const j=_(V.status.Failure),Z=new I;return Object.assign(Z,j),Z.type=j.type,Z.message=j.message,Z.transaction_outcome=V.transaction_outcome,Z},a.formatError=R,a.getErrorTypeFromErrorMessage=function T(V,j){switch(!0){case/^account .*? does not exist while viewing$/.test(V):case/^Account .*? doesn't exist$/.test(V):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(V):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(V):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(V):return"InvalidNonce";default:return j}}},67112:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(a,"__esModule",{value:!0}),a.parseNearAmount=a.formatNearAmount=a.NEAR_NOMINATION=a.NEAR_NOMINATION_EXP=void 0;const C=p(y(98538));a.NEAR_NOMINATION_EXP=24,a.NEAR_NOMINATION=new C.default("10",10).pow(new C.default(a.NEAR_NOMINATION_EXP,10));const w=[],M=new C.default(10);for(let A=0,R=new C.default(5);A0&&D.iadd(w[L])}const T=(A=D.toString()).substring(0,A.length-a.NEAR_NOMINATION_EXP)||"0",F=A.substring(A.length-a.NEAR_NOMINATION_EXP).padStart(a.NEAR_NOMINATION_EXP,"0").substring(0,R);return function b(A){return A.replace(/\.?0*$/,"")}(`${function _(A){const R=/(-?\d+)(\d{3})/;for(;R.test(A);)A=A.replace(R,"$1,$2");return A}(T)}.${F}`)},a.parseNearAmount=function v(A){if(!A)return null;const R=(A=function g(A){return A.replace(/,/g,"").trim()}(A)).split("."),D=R[0],T=R[1]||"";if(R.length>2||T.length>a.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${A}' as NEAR amount`);return function I(A){return A=A.replace(/^0+/,""),""===A?"0":A}(D+T.padEnd(a.NEAR_NOMINATION_EXP,"0"))}},41166:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(73215),a),C(y(359),a),C(y(67112),a),C(y(30279),a),C(y(11305),a),C(y(85406),a)},30279:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.printTxOutcomeLogs=a.printTxOutcomeLogsAndFailures=void 0;const p=y(359),C=!!process.env.NEAR_NO_LOGS;function M({contractId:u,logs:v,prefix:g=""}){if(!C)for(const b of v)console.log(`${g}Log [${u}]: ${b}`)}a.printTxOutcomeLogsAndFailures=function w({contractId:u,outcome:v}){if(C)return;const g=[v.transaction_outcome,...v.receipts_outcome].reduce((b,I)=>{const _="object"==typeof I.outcome.status&&"object"==typeof I.outcome.status.Failure;return I.outcome.logs.length||_?b.concat({receiptIds:I.outcome.receipt_ids,logs:I.outcome.logs,failure:"object"==typeof I.outcome.status&&void 0!==I.outcome.status.Failure?(0,p.parseRpcError)(I.outcome.status.Failure):null}):b},[]);for(const b of g)console.log(`Receipt${b.receiptIds.length>1?"s":""}: ${b.receiptIds.join(", ")}`),M({contractId:u,logs:b.logs,prefix:"\t"}),b.failure&&console.warn(`\tFailure [${u}]: ${b.failure}`)},a.printTxOutcomeLogs=M},11305:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getTransactionLastResult=void 0,a.getTransactionLastResult=function y(p){if("object"==typeof p.status&&"string"==typeof p.status.SuccessValue){const C=Buffer.from(p.status.SuccessValue,"base64").toString();try{return JSON.parse(C)}catch{return C}}return null}},85406:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.diffEpochValidators=a.findSeatPrice=void 0;const C=p(y(98538)),w=p(y(89176));a.findSeatPrice=function M(b,I,_,A){return A&&A<49?function u(b,I){const _=b.map(F=>new C.default(F.stake,10)).sort((F,L)=>F.cmp(L)),A=new C.default(I),R=_.reduce((F,L)=>F.add(L));if(R.lt(A))throw new Error("Stakes are below seats");let D=new C.default(1),T=R.add(new C.default(1));for(;!D.eq(T.sub(new C.default(1)));){const F=D.add(T).div(new C.default(2));let L=!1,V=new C.default(0);for(let j=0;j<_.length;++j)if(V=V.add(_[j].div(F)),V.gte(A)){D=F,L=!0;break}L||(T=F)}return D}(b,I):(_||((0,w.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),_=[1,6250]),function v(b,I,_){if(2!=_.length)throw Error("minimumStakeRatio should have 2 elements");const A=b.map(D=>new C.default(D.stake,10)).sort((D,T)=>D.cmp(T)),R=A.reduce((D,T)=>D.add(T));return b.length_.set(R.account_id,R));const A=new Set(I.map(R=>R.account_id));return{newValidators:I.filter(R=>!_.has(R.account_id)),removedValidators:b.filter(R=>!A.has(R.account_id)),changedValidators:I.filter(R=>_.has(R.account_id)&&_.get(R.account_id).stake!=R.stake).map(R=>({current:_.get(R.account_id),next:R}))}}},9855:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=a.Near=void 0;var p=y(75754);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return p.Near}});var C=y(55859);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return C.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return C.WalletConnection}})},75754:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})},C=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(a,"__esModule",{value:!0}),a.Near=void 0;const w=y(74931),M=C(y(98538));a.Near=class u{constructor(g){var b;if(this.config=g,this.connection=w.Connection.fromConfig({networkId:g.networkId,provider:{type:"JsonRpcProvider",args:{url:g.nodeUrl,headers:g.headers}},signer:g.signer||{type:"InMemorySigner",keyStore:g.keyStore||(null===(b=g.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:g.jsvmAccountId||`jsvm.${g.networkId}`}),g.masterAccount){const I=g.initialBalance?new M.default(g.initialBalance):new M.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,g.masterAccount),I)}else g.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,g.helperUrl):this.accountCreator=null}account(g){return p(this,void 0,void 0,function*(){return new w.Account(this.connection,g)})}createAccount(g,b){return p(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(g,b),new w.Account(this.connection,g)})}}},55859:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(T,F,L,V){return new(L||(L=Promise))(function(Z,Y){function G(Q){try{X(V.next(Q))}catch(z){Y(z)}}function q(Q){try{X(V.throw(Q))}catch(z){Y(z)}}function X(Q){Q.done?Z(Q.value):function j(Z){return Z instanceof L?Z:new L(function(Y){Y(Z)})}(Q.value).then(G,q)}X((V=V.apply(T,F||[])).next())})},C=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(a,"__esModule",{value:!0}),a.ConnectedWalletAccount=a.WalletConnection=void 0;const w=y(74931),M=y(29761),u=y(38445),v=C(y(98538)),g=y(21531),A="pending_key";a.WalletConnection=class R{constructor(F,L){if("string"!=typeof L)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(Z,Y)=>"isSignedIn"===Y?()=>!1:"getAccountId"===Y?()=>"":Z[Y]&&"function"==typeof Z[Y]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:Z[Y]});this._near=F;const V=L+"_wallet_auth_key",j=JSON.parse(window.localStorage.getItem(V));this._networkId=F.config.networkId,this._walletBaseUrl=F.config.walletUrl,L=L||F.config.contractName||"default",this._keyStore=F.connection.signer.keyStore,this._authData=j||{allKeys:[]},this._authDataKey=V,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return p(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:F,methodNames:L,successUrl:V,failureUrl:j}){return p(this,void 0,void 0,function*(){const Z=new URL(window.location.href),Y=new URL(this._walletBaseUrl+"/login/");if(Y.searchParams.set("success_url",V||Z.href),Y.searchParams.set("failure_url",j||Z.href),F){yield(yield this._near.account(F)).state(),Y.searchParams.set("contract_id",F);const q=M.KeyPair.fromRandom("ed25519");Y.searchParams.set("public_key",q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+q.getPublicKey(),q)}L&&L.forEach(G=>{Y.searchParams.append("methodNames",G)}),window.location.assign(Y.toString())})}requestSignTransactions({transactions:F,meta:L,callbackUrl:V}){return p(this,void 0,void 0,function*(){const j=new URL(window.location.href),Z=new URL("sign",this._walletBaseUrl);Z.searchParams.set("transactions",F.map(Y=>(0,g.serialize)(u.SCHEMA,Y)).map(Y=>Buffer.from(Y).toString("base64")).join(",")),Z.searchParams.set("callbackUrl",V||j.href),L&&Z.searchParams.set("meta",L),window.location.assign(Z.toString())})}_completeSignInWithAccessKey(){return p(this,void 0,void 0,function*(){const F=new URL(window.location.href),L=F.searchParams.get("public_key")||"",V=(F.searchParams.get("all_keys")||"").split(","),j=F.searchParams.get("account_id")||"";if(j){const Z={accountId:j,allKeys:V};window.localStorage.setItem(this._authDataKey,JSON.stringify(Z)),L&&(yield this._moveKeyFromTempToPermanent(j,L)),this._authData=Z}F.searchParams.delete("public_key"),F.searchParams.delete("all_keys"),F.searchParams.delete("account_id"),F.searchParams.delete("meta"),F.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,F.toString())})}_moveKeyFromTempToPermanent(F,L){return p(this,void 0,void 0,function*(){const V=yield this._keyStore.getKey(this._networkId,A+L);yield this._keyStore.setKey(this._networkId,F,V),yield this._keyStore.removeKey(this._networkId,A+L)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new D(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class D extends w.Account{constructor(F,L,V){super(L,V),this.walletConnection=F}signAndSendTransaction({receiverId:F,actions:L,walletMeta:V,walletCallbackUrl:j=window.location.href}){const Z=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const Y=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let G=yield this.accessKeyForTransaction(F,L,Y);if(!G)throw new Error(`Cannot find matching key for transaction sent to ${F}`);if(Y&&Y.toString()===G.public_key)try{return yield Z.signAndSendTransaction.call(this,{receiverId:F,actions:L})}catch(S){if("NotEnoughAllowance"!==S.type)throw S;G=yield this.accessKeyForTransaction(F,L)}const q=yield this.connection.provider.block({finality:"final"}),X=(0,g.baseDecode)(q.header.hash),Q=M.PublicKey.from(G.public_key),z=G.access_key.nonce.add(new v.default(1)),$=(0,u.createTransaction)(this.accountId,Q,F,z,L,X);return yield this.walletConnection.requestSignTransactions({transactions:[$],meta:V,callbackUrl:j}),new Promise((S,r)=>{setTimeout(()=>{r(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(F,L,V){return p(this,void 0,void 0,function*(){const{access_key:{permission:j}}=F;if("FullAccess"===j)return!0;if(j.FunctionCall){const{receiver_id:Z,method_names:Y}=j.FunctionCall;if(Z===this.accountId&&Y.includes("add_request_and_confirm"))return!0;if(Z===L){if(1!==V.length)return!1;const[{functionCall:G}]=V;return G&&(!G.deposit||"0"===G.deposit.toString())&&(0===Y.length||Y.includes(G.methodName))}}return!1})}accessKeyForTransaction(F,L,V){return p(this,void 0,void 0,function*(){const j=yield this.getAccessKeys();if(V){const Y=j.find(G=>G.public_key.toString()===V.toString());if(Y&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y}const Z=this.walletConnection._authData.allKeys;for(const Y of j)if(-1!==Z.indexOf(Y.public_key)&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y;return null})}}a.ConnectedWalletAccount=D},67497:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function($,S,r,s){void 0===s&&(s=r);var d=Object.getOwnPropertyDescriptor(S,r);(!d||("get"in d?!S.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return S[r]}}),Object.defineProperty($,s,d)}:function($,S,r,s){void 0===s&&(s=r),$[s]=S[r]}),C=this&&this.__setModuleDefault||(Object.create?function($,S){Object.defineProperty($,"default",{enumerable:!0,value:S})}:function($,S){$.default=S}),w=this&&this.__importStar||function($){if($&&$.__esModule)return $;var S={};if(null!=$)for(var r in $)"default"!==r&&Object.prototype.hasOwnProperty.call($,r)&&p(S,$,r);return C(S,$),S},M=this&&this.__awaiter||function($,S,r,s){return new(r||(r=Promise))(function(h,E){function k(f){try{x(s.next(f))}catch(P){E(P)}}function B(f){try{x(s.throw(f))}catch(P){E(P)}}function x(f){f.done?h(f.value):function d(h){return h instanceof r?h:new r(function(E){E(h)})}(f.value).then(k,B)}x((s=s.apply($,S||[])).next())})},u=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a,"__esModule",{value:!0});const v=u(y(41348)),g=y(38445),b=y(71836),I=y(91001),_=y(91311),A=y(7123),R=y(45733),D=y(46358),T=y(8127),F=y(98538),L=y(46260),V=y(67388),j=y(89764),Z=w(y(65645)),Y=y(35737),G=y(30684),q=u(y(59881)),X=y(70560),Q={mainnet:"https://rpc.mainnet.near.org",testnet:"https://rpc.testnet.near.org"};class z extends b.Account{constructor(S){var r,s;super({networkId:S.network,jsvmAccountId:`jsvm.${S.network}`,signer:new b.InMemorySigner(new I.InMemoryKeyStore),provider:new _.JsonRpcProvider({url:Q[S.network]})},S.accountId),this.publicKey=S.publicKey,this.snap=null!==(r=S.snap)&&void 0!==r?r:new q.default,this.delegateProvider=null!==(s=S.delegateProvider)&&void 0!==s?s:new X.HEREDelegateProvider}get network(){return this.connection.networkId}connect(S,r=[]){return M(this,void 0,void 0,function*(){return yield this.snap.connect({network:this.network,contractId:S,methods:r})})}disconnect(){return M(this,void 0,void 0,function*(){return yield this.snap.disconnect({network:this.network})})}authenticate(S,r){return M(this,void 0,void 0,function*(){yield this.activateIfNeeded();const s=v.default.randomBytes(32),d={message:r,recipient:S,nonce:s,network:this.network},h=yield this.signMessage(d);if(!Z.verifySignature(d,h))throw Error("Signature is incorrect");if(!(yield this.getAccessKeys()).some(x=>x.public_key===h.publicKey&&"FullAccess"===x.access_key.permission))throw Error("Signer public key is not full access");return h})}signMessage(S){return M(this,void 0,void 0,function*(){const r=yield this.snap.signMessage({message:S.message,nonce:Array.from(S.nonce),recipient:S.recipient,network:this.network});if(!r)throw Error("Signed result is undefined");const{accountId:s,publicKey:d,signature:h}=r;if(!s||!d||!h)throw Error("Signed result is undefined");return{accountId:s,publicKey:d,signature:h}})}signTransaction(S,r){return M(this,void 0,void 0,function*(){const s=yield this.getLastNonce(),{total:d}=yield this.getAccountBalance(),h=yield this.snap.signTransactions({network:this.connection.networkId,hintBalance:d,transactions:[{recentBlockHash:s.block_hash,nonce:new F.BN(s.nonce).iaddn(1).toNumber(),actions:r.map(V.convertAction),receiverId:S}]});if(!h?.[0])throw Error("Access denided");return[(0,A.base_decode)(h[0][0]),R.SignedTransaction.decode((0,A.base_decode)(h[0][1]))]})}activateIfNeeded(S=2){return M(this,void 0,void 0,function*(){if(S<=0)return null;try{return yield this.getLastNonce()}catch{try{if(!this.delegateProvider)throw Error();return yield this.delegateProvider.activateAccount(this.accountId,this.publicKey.toString(),this.network),yield(0,L.wait)(1e3),yield this.activateIfNeeded(S-1)}catch{return yield this.snap.needActivate(this.network),yield(0,L.wait)(1e3),yield this.activateIfNeeded(S-1)}}})}getLastNonce(){return M(this,void 0,void 0,function*(){return yield this.connection.provider.query({request_type:"view_access_key",public_key:this.publicKey.toString(),account_id:this.accountId,finality:"final"})})}signedDelegate({actions:S,blockHeightTtl:r,receiverId:s,payer:d}){return M(this,void 0,void 0,function*(){const h=yield this.getLastNonce(),E=(0,g.buildDelegateAction)({maxBlockHeight:new F.BN(h.block_height).add(new F.BN(r)),nonce:new F.BN(h.nonce).add(new F.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:s,actions:S}),{total:k}=yield this.getAccountBalance(),B=yield this.snap.signDelegatedTransactions({payer:d,hintBalance:k,network:this.connection.networkId,delegateAction:{maxBlockHeight:E.maxBlockHeight.toString(),actions:E.actions.map(V.convertAction),publicKey:E.publicKey.toString(),nonce:E.nonce.toString(),receiverId:E.receiverId,senderId:E.senderId}});if(!B?.signature||!B?.transaction)throw Error("Access denied");return{delegateAction:E,signature:{keyType:D.KeyType.ED25519,data:(0,A.base_decode)(B.signature)}}})}signAndSendTransaction({receiverId:S,actions:r}){return M(this,void 0,void 0,function*(){return(yield this.executeTransactions([{actions:r.map(V.convertAction),receiverId:S}]))[0]})}buildDelegateAction(S){return M(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new X.DelegateNotAllowed;if(S instanceof g.DelegateAction){const E=this.connection.networkId,k=yield this.delegateProvider.isCanDelegate(S,E);return{action:S,allowed:k}}const r=yield this.getLastNonce(),s=(0,g.buildDelegateAction)({actions:S.actions.map(j.createAction),maxBlockHeight:new F.BN(r.block_height).add(new F.BN(100)),nonce:new F.BN(r.nonce).add(new F.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:S.receiverId}),d=this.connection.networkId;return{action:s,allowed:yield this.delegateProvider.isCanDelegate(s,d)}})}executeDelegate(S){return M(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new X.DelegateNotAllowed;yield this.activateIfNeeded();const{action:r,allowed:s}=yield this.buildDelegateAction(S);if(!s){const B=`Delegated transaction is now allowed by ${this.delegateProvider.payer}. Try other DelegateProvider`;throw new X.DelegateNotAllowed(B)}const d=yield this.signedDelegate({payer:this.delegateProvider.payer,actions:r.actions,receiverId:S.receiverId,blockHeightTtl:100}),{provider:h,networkId:E}=this.connection,k=yield this.delegateProvider.sendDelegate(d,E);return yield(0,L.waitTransactionResult)(k,this.accountId,h)})}executeTransaction(S){return M(this,void 0,void 0,function*(){try{if(S.disableDelegate)throw new X.DelegateNotAllowed;return yield this.executeDelegate(S)}catch(r){if(r instanceof X.DelegateNotAllowed||r instanceof X.DelegateRequestError)return(yield this.executeTransactions([S]))[0];throw r}})}executeTransactions(S){return M(this,void 0,void 0,function*(){yield this.activateIfNeeded();const r=yield this.getLastNonce(),{total:s}=yield this.getAccountBalance(),d=yield this.snap.signTransactions({hintBalance:s,network:this.connection.networkId,transactions:S.map((E,k)=>Object.assign({nonce:new F.BN(r.nonce).iaddn(k+1).toNumber(),recentBlockHash:r.block_hash},E))});if(null==d)throw new Y.TransactionSignRejected;const h=[];d?.forEach((E,k)=>{if(null==E)throw new Y.TransactionSignRejected(S[k])});try{for(const E of d){const k=E,B=R.SignedTransaction.decode(Buffer.from(k[1],"hex"));h.push(yield this.connection.provider.sendTransaction(B))}}catch(E){throw new Y.TransactionInListError(h,E)}return h})}static restore({network:S,delegateProvider:r,snap:s=new q.default}){return M(this,void 0,void 0,function*(){const d=yield s.getAccount(S).catch(()=>null);if(!d?.accountId||!d?.publicKey)return null;const h=new z({publicKey:T.PublicKey.fromString(d.publicKey),accountId:d.accountId,delegateProvider:r,network:S,snap:s});return yield h.activateIfNeeded(),h})}static connect({snap:S=new q.default,delegateProvider:r,contractId:s,methods:d,network:h}){return M(this,void 0,void 0,function*(){const E=yield S.getStatus();if(E===G.NearSnapStatus.NOT_SUPPORTED)throw Error("You need install Metamask no lower than version 11");E===G.NearSnapStatus.NOT_INSTALLED&&(yield S.install());const k=yield S.connect({contractId:s,methods:d,network:h});if(!k?.accountId)throw Error("Metamask Near Snap did not return account id");if(!k?.publicKey)throw Error("Metamask Near Snap did not return public key");const B=new z({delegateProvider:r,publicKey:T.PublicKey.fromString(k.publicKey),accountId:k.accountId,network:h,snap:S});return yield B.activateIfNeeded(),B})}}a.default=z},70560:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(g,b,I,_){return new(I||(I=Promise))(function(R,D){function T(V){try{L(_.next(V))}catch(j){D(j)}}function F(V){try{L(_.throw(V))}catch(j){D(j)}}function L(V){V.done?R(V.value):function A(R){return R instanceof I?R:new I(function(D){D(R)})}(V.value).then(T,F)}L((_=_.apply(g,b||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.HEREDelegateProvider=a.DelegateRequestError=a.DelegateNotAllowed=void 0;const C=y(7123),w=y(71836);class M extends Error{}a.DelegateNotAllowed=M;class u extends Error{}a.DelegateRequestError=u;a.HEREDelegateProvider=class v{constructor(){this.endpoint="https://api.herewallet.app/api/v1",this.payer="here"}activateAccount(b,I,_){return p(this,void 0,void 0,function*(){const A=yield fetch(`${this.endpoint}/user/create_near_username`,{method:"POST",body:JSON.stringify({near_account_id:b,device_id:"metamask",public_key:I,sign:""}),headers:{Network:_}});if(!A.ok)throw new u(yield A.text())})}isCanDelegate(b,I="mainnet"){return p(this,void 0,void 0,function*(){if("mainnet"!==I)return!1;const _=Buffer.from(w.transactions.encodeDelegateAction(b)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/is_delegate`,{body:JSON.stringify({transaction:_}),method:"POST"});if(!A.ok)throw new u(yield A.text());const{allowed:R}=yield A.json();return R})}sendDelegate(b,I="mainnet"){return p(this,void 0,void 0,function*(){if("mainnet"!==I)throw new M;const _=Buffer.from(w.transactions.encodeDelegateAction(b.delegateAction)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/call_delegate`,{method:"POST",body:JSON.stringify({signature:(0,C.base_encode)(b.signature.data),transaction:_})});if(!A.ok)throw new u(yield A.text());const{hash:R}=yield A.json();return R})}}},35737:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TransactionInListError=a.TransactionSignRejected=void 0;class y extends Error{constructor(w){super("Transaction was rejected by Metamask user"),this.name="TransactionSignRejected",this.trx=w}}a.TransactionSignRejected=y;class p extends Error{constructor(w,M){super(M instanceof Error?M.message:String(M)),this.name="ListOfTransactionsError",this.completed=w,this.reason=M}}a.TransactionInListError=p},72487:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(b,I,_,A){void 0===A&&(A=_);var R=Object.getOwnPropertyDescriptor(I,_);(!R||("get"in R?!I.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return I[_]}}),Object.defineProperty(b,A,R)}:function(b,I,_,A){void 0===A&&(A=_),b[A]=I[_]}),C=this&&this.__exportStar||function(b,I){for(var _ in b)"default"!==_&&!Object.prototype.hasOwnProperty.call(I,_)&&p(I,b,_)},w=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.NearSnapAccount=a.TransactionSignRejected=a.TransactionInListError=a.NearSnapProvider=a.NearSnap=void 0,C(y(30684),a);var M=y(59881);Object.defineProperty(a,"NearSnap",{enumerable:!0,get:function(){return w(M).default}});var u=y(10243);Object.defineProperty(a,"NearSnapProvider",{enumerable:!0,get:function(){return w(u).default}});var v=y(35737);Object.defineProperty(a,"TransactionInListError",{enumerable:!0,get:function(){return v.TransactionInListError}}),Object.defineProperty(a,"TransactionSignRejected",{enumerable:!0,get:function(){return v.TransactionSignRejected}});var g=y(67497);Object.defineProperty(a,"NearSnapAccount",{enumerable:!0,get:function(){return w(g).default}})},10243:function(ne,a){"use strict";var y=this&&this.__awaiter||function(C,w,M,u){return new(M||(M=Promise))(function(g,b){function I(R){try{A(u.next(R))}catch(D){b(D)}}function _(R){try{A(u.throw(R))}catch(D){b(D)}}function A(R){R.done?g(R.value):function v(g){return g instanceof M?g:new M(function(b){b(g)})}(R.value).then(I,_)}A((u=u.apply(C,w||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0});a.default=class p{isSnapsAvailable(w=11){return y(this,void 0,void 0,function*(){const M=window.ethereum,u=yield M?.request({method:"web3_clientVersion"}).catch(()=>null);if("string"!=typeof u)return!1;const v=u.replace("MetaMask/v","").split(".")[0];return Number(v)>=w})}getSnaps(){return y(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_getSnaps"})})}connectSnap(w,M={}){return y(this,void 0,void 0,function*(){yield window.ethereum.request({method:"wallet_requestSnaps",params:{[w]:M}})})}getSnap(w,M){return y(this,void 0,void 0,function*(){try{const u=yield this.getSnaps();return Object.values(u).find(v=>v.id===w&&(!M||v.version===M))}catch(u){return void console.log("Failed to obtain installed snap",u)}})}invokeSnap(w,M,u){return y(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_invokeSnap",params:{snapId:w,request:{method:M,params:u}}})})}}},59881:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})},C=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(a,"__esModule",{value:!0});const w=C(y(10243)),M=y(30684);a.default=class u{constructor(g){var b,I;this.provider=null!==(b=g?.provider)&&void 0!==b?b:new w.default,this.id=null!==(I=g?.id)&&void 0!==I?I:"npm:@near-snap/plugin"}get isLocal(){return this.id.startsWith("local:")}getStatus(){return p(this,void 0,void 0,function*(){return(yield this.provider.isSnapsAvailable())?(yield this.provider.getSnap(this.id))?M.NearSnapStatus.INSTALLED:M.NearSnapStatus.NOT_INSTALLED:M.NearSnapStatus.NOT_SUPPORTED})}install(){return p(this,void 0,void 0,function*(){yield this.provider.connectSnap(this.id)})}getAccount(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getAccount",{network:g})})}connect(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_connect",g)})}disconnect(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_disconnect",g)})}getPermissions(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getPermissions",{network:g})})}needActivate(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_needActivate",{network:g})})}signMessage(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signMessage",g)})}signDelegatedTransactions(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signDelegate",g)})}signTransactions(g){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signTransactions",g)})}}},30684:(ne,a)=>{"use strict";var y,p;Object.defineProperty(a,"__esModule",{value:!0}),a.NearSnapStatus=void 0,(p=y||(a.NearSnapStatus=y={}))[p.NOT_SUPPORTED=0]="NOT_SUPPORTED",p[p.NOT_INSTALLED=1]="NOT_INSTALLED",p[p.INSTALLED=2]="INSTALLED"},67388:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.convertAction=a.TGAS=void 0,a.TGAS=Math.pow(10,12);const y=C=>{try{return JSON.parse(Buffer.from(C).toString("utf8"))}catch{return Array.from(C)}};a.convertAction=C=>{var w,M,u,v,g,b;if(C.addKey){const{accessKey:I,publicKey:_}=C.addKey;if(I.permission.fullAccess)return{type:"AddKey",params:{accessKey:{permission:"FullAccess"},publicKey:_.toString()}};if(I.permission.functionCall){const A=I.permission.functionCall;return{type:"AddKey",params:{publicKey:_.toString(),accessKey:{permission:{receiverId:A.receiverId,methodNames:A.methodNames,allowance:null===(w=A.allowance)||void 0===w?void 0:w.toString(10)}}}}}}if(C.createAccount)return{type:"CreateAccount"};if(C.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:C.deleteAccount.beneficiaryId}};if(C.deleteKey)return{type:"DeleteKey",params:{publicKey:C.deleteKey.publicKey.toString()}};if(C.deployContract)return{type:"DeployContract",params:{code:C.deployContract.code}};if(C.functionCall)return{type:"FunctionCall",params:{args:y(C.functionCall.args),deposit:null!==(u=null===(M=C.functionCall.deposit)||void 0===M?void 0:M.toString())&&void 0!==u?u:"0",gas:null!==(g=null===(v=C.functionCall.gas)||void 0===v?void 0:v.toString())&&void 0!==g?g:String(300*a.TGAS),methodName:null!==(b=C.functionCall.methodName)&&void 0!==b?b:""}};if(C.transfer)return{type:"Transfer",params:{deposit:C.transfer.deposit.toString()}};if(C.stake)return{type:"Stake",params:{publicKey:C.stake.publicKey.toString(),stake:C.stake.stake.toString()}};throw Error(`Action ${C.enum} is not supported`)}},89764:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(I,_,A,R){void 0===R&&(R=A);var D=Object.getOwnPropertyDescriptor(_,A);(!D||("get"in D?!_.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(I,R,D)}:function(I,_,A,R){void 0===R&&(R=A),I[R]=_[A]}),C=this&&this.__setModuleDefault||(Object.create?function(I,_){Object.defineProperty(I,"default",{enumerable:!0,value:_})}:function(I,_){I.default=_}),w=this&&this.__importStar||function(I){if(I&&I.__esModule)return I;var _={};if(null!=I)for(var A in I)"default"!==A&&Object.prototype.hasOwnProperty.call(I,A)&&p(_,I,A);return C(_,I),_};Object.defineProperty(a,"__esModule",{value:!0}),a.createAction=void 0;const M=y(98538),u=w(y(45733)),v=y(8127);a.createAction=I=>{switch(I.type){case"CreateAccount":return u.createAccount();case"DeployContract":{const{code:_}=I.params;return u.deployContract(_)}case"FunctionCall":{const{methodName:_,args:A,gas:R,deposit:D}=I.params;return u.functionCall(_,A,new M.BN(R),new M.BN(D))}case"Transfer":{const{deposit:_}=I.params;return u.transfer(new M.BN(_))}case"Stake":{const{stake:_,publicKey:A}=I.params;return u.stake(new M.BN(_),v.PublicKey.from(A))}case"AddKey":{const{publicKey:_,accessKey:A}=I.params;return u.addKey(v.PublicKey.from(_),(I=>{if("FullAccess"===I)return u.fullAccessKey();const{receiverId:_,methodNames:A=[]}=I,R=I.allowance?new M.BN(I.allowance):void 0;return u.functionCallAccessKey(_,A,R)})(A.permission))}case"DeleteKey":{const{publicKey:_}=I.params;return u.deleteKey(v.PublicKey.from(_))}case"DeleteAccount":{const{beneficiaryId:_}=I.params;return u.deleteAccount(_)}default:throw new Error("Invalid action type")}}},65645:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(a,"__esModule",{value:!0}),a.verifySignature=a.authPayloadSchema=a.AuthPayload=void 0;const C=p(y(41348)),w=y(8127),M=y(7123);class u{constructor({message:b,nonce:I,recipient:_,callbackUrl:A}){this.tag=2147484061,this.message=b,this.nonce=I,this.recipient=_,A&&(this.callbackUrl=A)}}a.AuthPayload=u,a.authPayloadSchema=new Map([[u,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),a.verifySignature=function v(g,b){const I=new u(g),_=(0,M.serialize)(a.authPayloadSchema,I),A=C.default.createHash("sha256"),R=Uint8Array.from(A.update(_).digest()),D=new Uint8Array(Buffer.from(b.signature,"base64"));return w.PublicKey.from(b.publicKey).verify(R,D)}},46260:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(u,v,g,b){return new(g||(g=Promise))(function(_,A){function R(F){try{T(b.next(F))}catch(L){A(L)}}function D(F){try{T(b.throw(F))}catch(L){A(L)}}function T(F){F.done?_(F.value):function I(_){return _ instanceof g?_:new g(function(A){A(_)})}(F.value).then(R,D)}T((b=b.apply(u,v||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.waitTransactionResult=a.wait=void 0;const C=y(5754);a.wait=u=>new Promise(v=>setTimeout(v,u));a.waitTransactionResult=(u,v,g)=>p(void 0,void 0,void 0,function*(){let b;yield(0,a.wait)(2e3);try{b=yield g.txStatus(u,v)}catch{return yield(0,a.waitTransactionResult)(u,v,g)}const I=[],_=b.transaction_outcome.outcome,A=b.receipts_outcome.reduce((T,F)=>(T[F.id]=F.outcome,T),{}),R=T=>T.some(F=>{if(!A[F])return!1;const{status:L}=A[F];return"string"==typeof L?(L===C.ExecutionStatusBasic.Failure&&I.push(L),!1):L.Failure?(I.push(L.Failure),!1):"string"==typeof L.SuccessValue&&0===A[F].receipt_ids.length||R(A[F].receipt_ids)}),D=R(_.receipt_ids);if(I.length>0)throw Error(JSON.stringify(I,null,2));return D?b:yield(0,a.waitTransactionResult)(u,v,g)})},76913:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(a,"__esModule",{value:!0});const C=p(y(87908)),w=p(y(98593)),M=p(y(50539)),u=p(y(13917)),v=p(y(15247)),g={development:Object.assign(Object.assign({},M.default),C.default),test:Object.assign({},w.default),staging:Object.assign(Object.assign({},M.default),v.default),production:Object.assign(Object.assign({},M.default),u.default)},b=process.env.CONFIG_ENV||"production";if(!(b in g))throw new Error(`${b} is not a valid env config`);const I=g[b];a.default=I},863:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(a,"__esModule",{value:!0}),a.createAction=a.parseArgs=void 0;const C=y(8597),w=p(y(98538));a.parseArgs=g=>"string"==typeof g?Buffer.from(g,"base64"):g;a.createAction=g=>{switch(g.type){case"CreateAccount":return C.transactions.createAccount();case"DeployContract":{const{code:b}=g.params;return C.transactions.deployContract(b)}case"FunctionCall":{const{methodName:b,args:I,gas:_,deposit:A}=g.params;return C.transactions.functionCall(b,(0,a.parseArgs)(I),new w.default(_),new w.default(A))}case"Transfer":{const{deposit:b}=g.params;return C.transactions.transfer(new w.default(b))}case"Stake":{const{stake:b,publicKey:I}=g.params;return C.transactions.stake(new w.default(b),C.utils.PublicKey.from(I))}case"AddKey":{const{publicKey:b,accessKey:I}=g.params;return C.transactions.addKey(C.utils.PublicKey.from(b),(g=>{if("FullAccess"===g)return C.transactions.fullAccessKey();const{receiverId:b,methodNames:I=[]}=g,_=g.allowance?new w.default(g.allowance):void 0;return C.transactions.functionCallAccessKey(b,I,_)})(I.permission))}case"DeleteKey":{const{publicKey:b}=g.params;return C.transactions.deleteKey(C.utils.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=g.params;return C.transactions.deleteAccount(b)}default:throw new Error("Invalid action type")}}},23183:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isValidAccessKey=void 0;a.isValidAccessKey=(p,C,w,M)=>{if(C.public_key===w)return!0;const{permission:u}=C.access_key;if("FullAccess"===u)return!0;if(M&&u.FunctionCall){const{receiver_id:v,method_names:g}=u.FunctionCall;if(v===p&&g.includes("add_request_and_confirm"))return!0;if(v===M.receiverId)return 1===M.actions.length&&M.actions.every(b=>"FunctionCall"===b.type&&((!b.params.deposit||"0"===b.params.deposit.toString())&&(0===g.length||g.includes(b.params.methodName))))}return!1}},33492:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(g,b,I,_){void 0===_&&(_=I);var A=Object.getOwnPropertyDescriptor(b,I);(!A||("get"in A?!b.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return b[I]}}),Object.defineProperty(g,_,A)}:function(g,b,I,_){void 0===_&&(_=I),g[_]=b[I]}),C=this&&this.__setModuleDefault||(Object.create?function(g,b){Object.defineProperty(g,"default",{enumerable:!0,value:b})}:function(g,b){g.default=b}),w=this&&this.__importStar||function(g){if(g&&g.__esModule)return g;var b={};if(null!=g)for(var I in g)"default"!==I&&Object.prototype.hasOwnProperty.call(g,I)&&p(b,g,I);return C(b,g),b},M=this&&this.__awaiter||function(g,b,I,_){return new(I||(I=Promise))(function(R,D){function T(V){try{L(_.next(V))}catch(j){D(j)}}function F(V){try{L(_.throw(V))}catch(j){D(j)}}function L(V){V.done?R(V.value):function A(R){return R instanceof I?R:new I(function(D){D(R)})}(V.value).then(T,F)}L((_=_.apply(g,b||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0});const u=w(y(27682));a.default=function v(g,b,I={}){let _,A=!1;const D=(()=>M(this,void 0,void 0,function*(){const{delay:T=1e3,maxIterations:F,timeout:L}=I;let Z,V=0,j=!1;function Y(){return M(this,void 0,void 0,function*(){j=!1;try{return yield void 0!==L?(0,u.default)(g(),L):g()}catch(G){if(!(G instanceof u.TimeoutPromiseError))throw G;j=!0}})}for(Z=yield Y();!A&&(j||b(Z));){if(V===F)throw new Error("Polling executed the maximum number iterations");yield new Promise(G=>{_=setTimeout(()=>M(this,void 0,void 0,function*(){V++,Z=yield Y(),G()}),T)})}return Z}))();return D.abort=()=>{A=!0,clearTimeout(_)},D}},27682:function(ne,a){"use strict";var y=this&&this.__awaiter||function(w,M,u,v){return new(u||(u=Promise))(function(b,I){function _(D){try{R(v.next(D))}catch(T){I(T)}}function A(D){try{R(v.throw(D))}catch(T){I(T)}}function R(D){D.done?b(D.value):function g(b){return b instanceof u?b:new u(function(I){I(b)})}(D.value).then(_,A)}R((v=v.apply(w,M||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.TimeoutPromiseError=void 0;class p extends Error{constructor(){super("Promise timeout")}}a.TimeoutPromiseError=p,a.default=function C(w,M){return y(this,void 0,void 0,function*(){let u;const v=new Promise((b,I)=>{u=setTimeout(()=>{I(new p)},M)}),g=yield Promise.race([w,v]);return clearTimeout(u),g})}},39825:(ne,a)=>{"use strict";var y,p;Object.defineProperty(a,"__esModule",{value:!0}),a.SignerRequestStatus=void 0,(p=y||(a.SignerRequestStatus=y={})).PENDING="pending",p.APPROVED="approved",p.REJECTED="rejected"},96299:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ApiError=void 0;class y extends Error{constructor(C,w,M){super(M),this.name="ApiError",this.url=w.url,this.status=w.status,this.statusText=w.statusText,this.body=w.body,this.request=C}}a.ApiError=y},43868:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CancelablePromise=a.CancelError=void 0;class y extends Error{constructor(w){super(w),this.name="CancelError"}get isCancelled(){return!0}}a.CancelError=y;a.CancelablePromise=class p{constructor(w){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((M,u)=>{this._resolve=M,this._reject=u;const b=I=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(I)};return Object.defineProperty(b,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(b,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(b,"isCancelled",{get:()=>this._isCancelled}),w(I=>{var _;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,null===(_=this._resolve)||void 0===_||_.call(this,I))},I=>{var _;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,null===(_=this._reject)||void 0===_||_.call(this,I))},b)})}then(w,M){return this._promise.then(w,M)}catch(w){return this._promise.catch(w)}finally(w){return this._promise.finally(w)}cancel(){var w;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const M of this._cancelHandlers)M()}catch(M){return void console.warn("Cancellation threw an error",M)}this._cancelHandlers.length=0,null===(w=this._reject)||void 0===w||w.call(this,new y("Request aborted"))}}get isCancelled(){return this._isCancelled}}},75023:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(a,"__esModule",{value:!0}),a.OpenAPI=void 0;const C=p(y(76913));a.OpenAPI={BASE:C.default.proxyUrl,VERSION:"0.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},51022:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(G,q,X,Q){return new(X||(X=Promise))(function($,S){function r(h){try{d(Q.next(h))}catch(E){S(E)}}function s(h){try{d(Q.throw(h))}catch(E){S(E)}}function d(h){h.done?$(h.value):function z($){return $ instanceof X?$:new X(function(S){S($)})}(h.value).then(r,s)}d((Q=Q.apply(G,q||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.request=a.sendRequest=void 0;const C=y(96299),w=y(43868),M=G=>null!=G,u=G=>"string"==typeof G,v=G=>u(G)&&""!==G,g=G=>"object"==typeof G&&"string"==typeof G.type&&"function"==typeof G.stream&&"function"==typeof G.arrayBuffer&&"function"==typeof G.constructor&&"string"==typeof G.constructor.name&&/^(Blob|File)$/.test(G.constructor.name)&&/^(Blob|File)$/.test(G[Symbol.toStringTag]),b=G=>G instanceof FormData,_=G=>{const q=[],Q=(z,$)=>{M($)&&(Array.isArray($)?$.forEach(S=>{Q(z,S)}):"object"==typeof $?Object.entries($).forEach(([S,r])=>{Q(`${z}[${S}]`,r)}):((z,$)=>{q.push(`${encodeURIComponent(z)}=${encodeURIComponent(String($))}`)})(z,$))};return Object.entries(G).forEach(([z,$])=>{Q(z,$)}),q.length>0?`?${q.join("&")}`:""},D=(G,q)=>p(void 0,void 0,void 0,function*(){return"function"==typeof q?q(G):q}),T=(G,q)=>p(void 0,void 0,void 0,function*(){const X=yield D(q,G.TOKEN),Q=yield D(q,G.USERNAME),z=yield D(q,G.PASSWORD),$=yield D(q,G.HEADERS),S=Object.entries(Object.assign(Object.assign({Accept:"application/json"},$),q.headers)).filter(([r,s])=>M(s)).reduce((r,[s,d])=>Object.assign(Object.assign({},r),{[s]:String(d)}),{});if(v(X)&&(S.Authorization=`Bearer ${X}`),v(Q)&&v(z)){const r=(G=>{try{return btoa(G)}catch{return Buffer.from(G).toString("base64")}})(`${Q}:${z}`);S.Authorization=`Basic ${r}`}return q.body&&(q.mediaType?S["Content-Type"]=q.mediaType:g(q.body)?S["Content-Type"]=q.body.type||"application/octet-stream":u(q.body)?S["Content-Type"]="text/plain":b(q.body)||(S["Content-Type"]="application/json")),new Headers(S)});a.sendRequest=(G,q,X,Q,z,$,S)=>p(void 0,void 0,void 0,function*(){const r=new AbortController,s={headers:$,body:Q??z,method:q.method,signal:r.signal};return G.WITH_CREDENTIALS&&(s.credentials=G.CREDENTIALS),S(()=>r.abort()),yield fetch(X,s)});a.request=(G,q)=>new w.CancelablePromise((X,Q,z)=>p(void 0,void 0,void 0,function*(){try{const $=((G,q)=>{const X=G.ENCODE_PATH||encodeURI,Q=q.url.replace("{api-version}",G.VERSION).replace(/{(.*?)}/g,($,S)=>{var r;return null!==(r=q.path)&&void 0!==r&&r.hasOwnProperty(S)?X(String(q.path[S])):$}),z=`${G.BASE}${Q}`;return q.query?`${z}${_(q.query)}`:z})(G,q),S=(G=>{if(G.formData){const q=new FormData,X=(Q,z)=>{u(z)||g(z)?q.append(Q,z):q.append(Q,JSON.stringify(z))};return Object.entries(G.formData).filter(([Q,z])=>M(z)).forEach(([Q,z])=>{Array.isArray(z)?z.forEach($=>X(Q,$)):X(Q,z)}),q}})(q),r=(G=>{var q;if(G.body)return null!==(q=G.mediaType)&&void 0!==q&&q.includes("/json")?JSON.stringify(G.body):u(G.body)||g(G.body)||b(G.body)?G.body:JSON.stringify(G.body)})(q),s=yield T(G,q);if(!z.isCancelled){const d=yield(0,a.sendRequest)(G,q,$,r,S,s,z),h=yield(G=>p(void 0,void 0,void 0,function*(){if(204!==G.status)try{const q=G.headers.get("Content-Type");if(q)return q.toLowerCase().startsWith("application/json")?yield G.json():yield G.text()}catch(q){console.error(q)}}))(d),E=((G,q)=>{if(q){const X=G.headers.get(q);if(u(X))return X}})(d,q.responseHeader),k={url:$,ok:d.ok,status:d.status,statusText:d.statusText,body:E??h};((G,q)=>{const Q=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},G.errors)[q.status];if(Q)throw new C.ApiError(G,q,Q);if(!q.ok)throw new C.ApiError(G,q,"Generic Error")})(q,k),X(k.body)}}catch($){Q($)}}))},9273:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SignerRequestApi=a.$SignRequest=a.$SignMessageRequestPayload=a.$SignMessageRequestDto=a.$SignerTransactionDto=a.$SignerRequestStatusDto=a.$SignerRequestDto=a.$DAppMetadatRequest=a.$DAppMetadataDto=a.$CreateSignMessageRequest=a.$CreateSignerRequest=a.OpenAPI=a.CancelError=a.CancelablePromise=a.ApiError=void 0;var p=y(96299);Object.defineProperty(a,"ApiError",{enumerable:!0,get:function(){return p.ApiError}});var C=y(43868);Object.defineProperty(a,"CancelablePromise",{enumerable:!0,get:function(){return C.CancelablePromise}}),Object.defineProperty(a,"CancelError",{enumerable:!0,get:function(){return C.CancelError}});var w=y(75023);Object.defineProperty(a,"OpenAPI",{enumerable:!0,get:function(){return w.OpenAPI}});var M=y(16588);Object.defineProperty(a,"$CreateSignerRequest",{enumerable:!0,get:function(){return M.$CreateSignerRequest}});var u=y(82988);Object.defineProperty(a,"$CreateSignMessageRequest",{enumerable:!0,get:function(){return u.$CreateSignMessageRequest}});var v=y(57470);Object.defineProperty(a,"$DAppMetadataDto",{enumerable:!0,get:function(){return v.$DAppMetadataDto}});var g=y(71482);Object.defineProperty(a,"$DAppMetadatRequest",{enumerable:!0,get:function(){return g.$DAppMetadatRequest}});var b=y(48322);Object.defineProperty(a,"$SignerRequestDto",{enumerable:!0,get:function(){return b.$SignerRequestDto}});var I=y(47282);Object.defineProperty(a,"$SignerRequestStatusDto",{enumerable:!0,get:function(){return I.$SignerRequestStatusDto}});var _=y(34652);Object.defineProperty(a,"$SignerTransactionDto",{enumerable:!0,get:function(){return _.$SignerTransactionDto}});var A=y(25654);Object.defineProperty(a,"$SignMessageRequestDto",{enumerable:!0,get:function(){return A.$SignMessageRequestDto}});var R=y(93089);Object.defineProperty(a,"$SignMessageRequestPayload",{enumerable:!0,get:function(){return R.$SignMessageRequestPayload}});var D=y(53951);Object.defineProperty(a,"$SignRequest",{enumerable:!0,get:function(){return D.$SignRequest}});var T=y(61123);Object.defineProperty(a,"SignerRequestApi",{enumerable:!0,get:function(){return T.SignerRequestApi}})},82988:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$CreateSignMessageRequest=void 0,a.$CreateSignMessageRequest={properties:{network:{type:"Enum",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},receiverMetadata:{type:"DAppMetadatRequest"}}}},16588:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$CreateSignerRequest=void 0,a.$CreateSignerRequest={properties:{network:{type:"Enum",isRequired:!0},transactions:{type:"array",contains:{type:"one-of",contains:[{type:"SignerTransactionDto"}]},isRequired:!0},dAppMetadata:{type:"DAppMetadatRequest"}}}},71482:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$DAppMetadatRequest=void 0,a.$DAppMetadatRequest={properties:{}}},57470:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$DAppMetadataDto=void 0,a.$DAppMetadataDto={properties:{name:{type:"string",isRequired:!0},logoUrl:{type:"string",isRequired:!0},url:{type:"string"}}}},25654:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignMessageRequestDto=void 0,a.$SignMessageRequestDto={properties:{id:{type:"string",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},network:{type:"Enum",isRequired:!0},response:{properties:{},isRequired:!0},receiverMetadata:{type:"DAppMetadataDto"},status:{type:"Enum",isRequired:!0}}}},93089:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignMessageRequestPayload=void 0,a.$SignMessageRequestPayload={properties:{accountId:{type:"string",isRequired:!0},signature:{type:"string",isRequired:!0},publicKey:{type:"string",isRequired:!0}}}},53951:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignRequest=void 0,a.$SignRequest={properties:{signerAccountId:{type:"string",isRequired:!0},txHash:{type:"array",contains:{type:"string"},isRequired:!0}}}},48322:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignerRequestDto=void 0,a.$SignerRequestDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0},network:{type:"Enum",isRequired:!0},signerAccountId:{type:"string",isRequired:!0},requests:{type:"array",contains:{properties:{}},isRequired:!0},dAppMetadata:{type:"DAppMetadataDto"},txHash:{type:"array",contains:{type:"string"}},createdAt:{type:"string",isRequired:!0,format:"date-time"},updatedAt:{type:"string",isRequired:!0,format:"date-time"}}}},47282:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignerRequestStatusDto=void 0,a.$SignerRequestStatusDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0}}}},34652:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.$SignerTransactionDto=void 0,a.$SignerTransactionDto={properties:{signerId:{type:"string"},receiverId:{type:"string"},actions:{type:"array",contains:{properties:{}},isRequired:!0}}}},61123:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SignerRequestApi=void 0;const p=y(75023),C=y(51022);a.SignerRequestApi=class w{static createSignerRequest(u){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request",body:u,mediaType:"application/json"})}static getSignerRequestStatus(u){return(0,C.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/{id}/status",path:{id:u}})}static approveSignerRequest(u,v){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/approve",path:{id:u},body:v,mediaType:"application/json"})}static rejectSignerRequest(u){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/reject",path:{id:u}})}static getSignerRequest(u){return(0,C.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/{id}",path:{id:u}})}static createSignMessageRequest(u){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message",body:u,mediaType:"application/json"})}static getSignMessageRequest(u){return(0,C.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/message/{id}",path:{id:u}})}static signMessageRequest(u,v){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/sign",path:{id:u},body:v,mediaType:"application/json"})}static rejectMessageRequest(u){return(0,C.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/reject",path:{id:u}})}}},2199:(ne,a)=>{"use strict";var y,p;Object.defineProperty(a,"__esModule",{value:!0}),a.RepositoryErrorCodes=a.SessionRepositoryErrorCodes=void 0,(p=y||(a.SessionRepositoryErrorCodes=y={})).INVALID_ACCOUNT_ID="INVALID_ACCOUNT_ID",p.ACCOUNT_KEY_NOT_FOUND="ACCOUNT_KEY_NOT_FOUND",a.RepositoryErrorCodes=y},21251:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(69560),a)},45358:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.SessionRepository=void 0;const C=y(82687),w=y(2199),M=y(8597);class u extends C.WindowLocalStorageRepository{constructor(){super("session"),this.loadSessionState()}loadSessionState(){return p(this,void 0,void 0,function*(){(yield this.get())||(yield this.set({mainnet:{activeAccount:null,accounts:{}},testnet:{activeAccount:null,accounts:{}}}))})}getKey(g,b){return p(this,void 0,void 0,function*(){const _=(yield this.get())[g].accounts[b];if(!_)throw new Error(w.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return M.KeyPair.fromString(_)})}setKey(g,b,I){return p(this,void 0,void 0,function*(){const _=yield this.get();_[g].accounts[b]=I.toString(),yield this.set(_)})}removeKey(g,b){return p(this,void 0,void 0,function*(){const I=yield this.get();I[g].activeAccount===b&&(I[g].activeAccount=null),delete I[g].accounts[b],yield this.set(I)})}getActiveAccount(g){return p(this,void 0,void 0,function*(){return(yield this.get())[g].activeAccount})}setActiveAccount(g,b){return p(this,void 0,void 0,function*(){const I=yield this.get();if(!Object.keys(I[g].accounts).includes(b))throw new Error(w.RepositoryErrorCodes.INVALID_ACCOUNT_ID);I[g].activeAccount=b,yield this.set(I)})}getAccounts(g){return p(this,void 0,void 0,function*(){const I=(yield this.get())[g].accounts;return Object.keys(I)})}getNetworks(){return p(this,void 0,void 0,function*(){const g=yield this.get();return Object.keys(g)})}clear(){return p(this,void 0,void 0,function*(){yield this.clear()})}}a.SessionRepository=u},98494:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(45358),a)},61439:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Repository=void 0;a.Repository=class y{constructor(C){this.projectName="near-mobile-signer",this.key=`${this.projectName}:${C}`}}},82687:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WindowLocalStorageRepository=void 0;const p=y(61439);class C extends p.Repository{set(M){return Promise.resolve(window.localStorage.setItem(this.key,JSON.stringify(M)))}get(){const M=window.localStorage.getItem(this.key);return Promise.resolve(M?JSON.parse(M):void 0)}clear(){return Promise.resolve(window.localStorage.removeItem(this.key))}}a.WindowLocalStorageRepository=C},75729:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WindowLocalStorageRepository=a.Repository=void 0;var p=y(61439);Object.defineProperty(a,"Repository",{enumerable:!0,get:function(){return p.Repository}});var C=y(82687);Object.defineProperty(a,"WindowLocalStorageRepository",{enumerable:!0,get:function(){return C.WindowLocalStorageRepository}})},69560:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(98494),a),C(y(75729),a)},96105:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(D,T,F,L){return new(F||(F=Promise))(function(j,Z){function Y(X){try{q(L.next(X))}catch(Q){Z(Q)}}function G(X){try{q(L.throw(X))}catch(Q){Z(Q)}}function q(X){X.done?j(X.value):function V(j){return j instanceof F?j:new F(function(Z){Z(j)})}(X.value).then(Y,G)}q((L=L.apply(D,T||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.NearMobileWallet=void 0;const C=y(8597),w=y(87974),M=y(97186),u=y(12139),v=y(39825),g=y(23183),b=y(863),I=y(93730),_=y(21251),A=y(94196);a.NearMobileWallet=class R{handleRequestStatus(T){var F,L,V,j;T===v.SignerRequestStatus.APPROVED?null===(L=(F=this.defaultStrategy).onApproved)||void 0===L||L.call(F):T===v.SignerRequestStatus.REJECTED&&(null===(j=(V=this.defaultStrategy).onError)||void 0===j||j.call(V))}loadConnection(T,F){const L=new C.InMemorySigner(this.sessionRepository),V=new w.JsonRpcProvider({url:T??`https://rpc.${F}.near.org`});this.connection=C.Connection.fromConfig({jsvmAccountId:`jsvm.${F}`,provider:V,network:F,signer:L})}retryTransaction({requests:T}){var F,L,V,j;return p(this,void 0,void 0,function*(){try{const{id:Z,network:Y,requests:G}=yield this.defaultProvider.createRequest(this.network,T,this.dAppMetadata);null===(L=(F=this.defaultStrategy).onRequested)||void 0===L||L.call(F,Z,{network:Y,request:G});const{status:q}=yield this.defaultProvider.awaitActionSignatureResolution(Z);this.handleRequestStatus(q);const{signerAccountId:X,txHash:Q}=yield this.defaultProvider.getRequest(Z);if(!X||!Q)throw new Error(I.WalletErrors.REQUEST_NOT_SIGNED);if(1===Q.length)return yield this.rpc.txStatus(Q[0],X);throw new Error(I.WalletErrors.OPERATION_FAILED)}catch(Z){throw null===(j=(V=this.defaultStrategy).onError)||void 0===j||j.call(V),new Error(Z)}})}constructor({nodeUrl:T,network:F="testnet",sessionRepository:L=new _.SessionRepository,metadata:V}={}){this.network=F,this.sessionRepository=L,this.defaultStrategy=new M.WidgetStrategy,this.defaultProvider=new u.NearMobileSignerProxy,this.dAppMetadata=V,this.loadConnection(T,F)}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}getAccounts(){return p(this,void 0,void 0,function*(){return this.sessionRepository.getAccounts(this.network)})}signOut(){return p(this,void 0,void 0,function*(){const T=yield this.sessionRepository.getActiveAccount(this.network);if(null===T)throw new Error(I.WalletErrors.NO_ACTIVE_ACCOUNT);const F=yield this.sessionRepository.getKey(this.network,T);if(null===F)throw new Error(I.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const L=F.getPublicKey().toString();try{yield this.silentSignAndSendTransaction({signerId:T,receiverId:T,actions:[{type:"DeleteKey",params:{publicKey:L}}]}),yield this.sessionRepository.removeKey(this.network,T)}catch{yield this.retryTransaction({requests:[{actions:[{type:"DeleteKey",params:{publicKey:L}}],signerId:T,receiverId:T}]}),yield this.sessionRepository.removeKey(this.network,T)}})}signIn({contractId:T,allowance:F,methodNames:L=[]}){var V,j;return p(this,void 0,void 0,function*(){try{const Z=C.KeyPair.fromRandom("ed25519"),Y={receiverId:T,methodNames:L,allowance:F},G=[{actions:[{type:"AddKey",params:{publicKey:Z.getPublicKey().toString(),accessKey:{permission:Y}}}]}],{id:q,network:X,requests:Q}=yield this.defaultProvider.createRequest(this.network,G,this.dAppMetadata),z=()=>p(this,void 0,void 0,function*(){return yield this.defaultProvider.rejectSignerRequest(q)});null===(j=(V=this.defaultStrategy).onRequested)||void 0===j||j.call(V,q,{network:X,request:Q},z);const{status:$}=yield this.defaultProvider.awaitActionSignatureResolution(q);this.handleRequestStatus($);const{signerAccountId:S}=yield this.defaultProvider.getRequest(q);if(!S)throw new Error(I.WalletErrors.REQUEST_NOT_SIGNED);return yield this.sessionRepository.setKey(this.network,S,Z),yield this.sessionRepository.setActiveAccount(this.network,S),S}catch(Z){throw new Error(Z)}})}account(T){return p(this,void 0,void 0,function*(){const F=T??(yield this.sessionRepository.getActiveAccount(this.network));if(null===F)throw new Error(I.WalletErrors.NO_ACTIVE_ACCOUNT);return new C.Account(this.connection,F)})}silentSignAndSendTransaction({signerId:T,receiverId:F,actions:L}){return p(this,void 0,void 0,function*(){const V=yield this.account(T),j=yield this.sessionRepository.getKey(this.network,V.accountId);if(null===j)throw new Error(I.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const Z=j.getPublicKey().toString(),Y=yield V.getAccessKeys(),G={receiverId:F,actions:L};if(!Y.some(X=>(0,g.isValidAccessKey)(V.accountId,X,Z,G)))throw new Error(I.WalletErrors.INVALID_ACCESS_KEY);return yield V.signAndSendTransaction({actions:L.map(X=>(0,b.createAction)(X)),receiverId:F??V.accountId})})}signAndSendTransaction({signerId:T,receiverId:F,actions:L}){var V,j;return p(this,void 0,void 0,function*(){try{const Z=yield this.silentSignAndSendTransaction({signerId:T,receiverId:F,actions:L});return null===(j=(V=this.defaultStrategy).onSuccess)||void 0===j||j.call(V),Z}catch{return yield this.retryTransaction({requests:[{actions:L,receiverId:F,signerId:T}]})}})}signAndSendTransactions({transactions:T}){var F,L,V,j;return p(this,void 0,void 0,function*(){try{const{id:Z,network:Y,requests:G}=yield this.defaultProvider.createRequest(this.network,T,this.dAppMetadata);null===(L=(F=this.defaultStrategy).onRequested)||void 0===L||L.call(F,Z,{network:Y,request:G});const{status:q}=yield this.defaultProvider.awaitActionSignatureResolution(Z);this.handleRequestStatus(q);const{signerAccountId:X,txHash:Q}=yield this.defaultProvider.getRequest(Z);if(!X||!Q)throw new Error(I.WalletErrors.REQUEST_NOT_SIGNED);const z=[];for(const $ of Q){const S=yield this.rpc.txStatus($,X);z.push(S)}return z}catch(Z){throw null===(j=(V=this.defaultStrategy).onError)||void 0===j||j.call(V),new Error(Z)}})}signMessage({message:T,receiver:F,nonce:L,callbackUrl:V}){var j,Z,Y,G,q,X;return p(this,void 0,void 0,function*(){const{id:Q}=yield this.defaultProvider.createSignMessage(this.network,T,F,L,V,this.dAppMetadata);null===(Z=(j=this.defaultStrategy).onRequested)||void 0===Z||Z.call(j,Q,{network:this.network,message:T,receiver:F,nonce:L,callbackUrl:V});const{response:z,status:$}=yield this.defaultProvider.awaitMessageSignatureResolution(Q);if(this.handleRequestStatus($),!z&&$!==v.SignerRequestStatus.APPROVED)throw new Error(I.WalletErrors.NO_SIGNATURE);try{const{publicKey:S,signature:r,accountId:s}=z;if(!(0,A.verifySignature)({publicKey:S,signature:r,message:T,nonce:Buffer.from(L),recipient:F}))throw new Error(I.WalletErrors.INVALID_SIGNATURE);if(!(yield(yield this.account(s)).getAccessKeys()).some(B=>!(B.public_key!==S||"FullAccess"!==B.access_key.permission)))throw Error(I.WalletErrors.INVALID_ACCESS_KEY);return null===(G=(Y=this.defaultStrategy).onSuccess)||void 0===G||G.call(Y),{signature:r,publicKey:S,message:T,accountId:s,receiver:F,nonce:L,callbackUrl:V}}catch(S){throw null===(X=(q=this.defaultStrategy).onError)||void 0===X||X.call(q),new Error(S)}})}}},93730:(ne,a)=>{"use strict";var y,p;Object.defineProperty(a,"__esModule",{value:!0}),a.WalletErrors=void 0,(p=y||(a.WalletErrors=y={})).NO_ACTIVE_ACCOUNT="NO_ACTIVE_ACCOUNT",p.NO_ACCOUNT_LOCAL_KEY="NO_ACCOUNT_LOCAL_KEY",p.INVALID_ACCESS_KEY="INVALID_ACCESS_KEY",p.NO_SIGNER_ACCOUNT_ID="NO_SIGNER_ACCOUNT_ID",p.REQUEST_NOT_SIGNED="REQUEST_NOT_SIGNED",p.NO_SIGNATURE="NO_SIGNATURE",p.INVALID_SIGNATURE="INVALID_SIGNATURE",p.OPERATION_FAILED="OPERATION_FAILED"},12139:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(b,I,_,A){return new(_||(_=Promise))(function(D,T){function F(j){try{V(A.next(j))}catch(Z){T(Z)}}function L(j){try{V(A.throw(j))}catch(Z){T(Z)}}function V(j){j.done?D(j.value):function R(D){return D instanceof _?D:new _(function(T){T(D)})}(j.value).then(F,L)}V((A=A.apply(b,I||[])).next())})},C=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.NearMobileSignerProxy=void 0;const w=C(y(76913)),M=C(y(33492)),u=y(39825),v=y(9273);a.NearMobileSignerProxy=class g{createRequest(I,_,A){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.createSignerRequest({network:I,transactions:_,dAppMetadata:A})})}awaitActionSignatureResolution(I){return p(this,void 0,void 0,function*(){return yield(0,M.default)(()=>v.SignerRequestApi.getSignerRequestStatus(I),({status:_})=>_===u.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}getRequest(I){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.getSignerRequest(I)})}createSignMessage(I,_,A,R,D,T){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.createSignMessageRequest({network:I,message:_,receiver:A,nonce:R,callbackUrl:D,receiverMetadata:T})})}awaitMessageSignatureResolution(I){return p(this,void 0,void 0,function*(){return yield(0,M.default)(()=>v.SignerRequestApi.getSignMessageRequest(I),({response:_,status:A})=>!_&&A===u.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}rejectSignerRequest(I){return p(this,void 0,void 0,function*(){yield v.SignerRequestApi.rejectSignerRequest(I)})}}},97186:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(a,"__esModule",{value:!0}),a.WidgetStrategy=void 0;const C=p(y(76913));class M{constructor(){this.widgetUrl=C.default.widgetUrl,null==M.connector&&(M.connector=(u=>{const v=document.createElement("iframe");return v.src=u,v.style.border="none",v.style.zIndex="10000",v.style.position="fixed",v.style.display="none",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",document.body.appendChild(v),v})(this.widgetUrl),M.connector.addEventListener("load",()=>{M.isLoaded=!0}))}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),null!=M.connector&&(M.connector.style.display="none")}onRequested(v,g,b){if(null==M.connector)return;M.connector.style.display="block";const I=()=>{var _,A;M.connector.removeEventListener("load",I);const R="message"in g?"message":"request",D=`${C.default.nearMobileWalletUrl}/${R}/${v}`;null===(A=null===(_=M.connector)||void 0===_?void 0:_.contentWindow)||void 0===A||A.postMessage({requestUrl:D},new URL(this.widgetUrl).origin)};M.isLoaded?I():M.connector.addEventListener("load",I),this.messageHandler=_=>{_.origin===new URL(this.widgetUrl).origin&&"close"===_.data&&(b?.(),this.onError())},window.addEventListener("message",this.messageHandler)}onApproved(){this.close()}onSuccess(){this.close()}onError(){this.close()}}a.WidgetStrategy=M,M.isLoaded=!1},99868:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.payloadSchema=a.Payload=void 0;class y{constructor(C){this.tag=2147484061,this.message=C.message,this.nonce=C.nonce,this.recipient=C.recipient,C.callbackUrl&&(this.callbackUrl=C.callbackUrl)}}a.Payload=y,a.payloadSchema=new Map([[y,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]])},94196:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.verifySignature=void 0;const p=y(8597),C=y(21531),w=y(1520),M=y(99868);a.verifySignature=({publicKey:v,signature:g,message:b,nonce:I,recipient:_,callbackUrl:A})=>{const R=new M.Payload({message:b,nonce:I,recipient:_,callbackUrl:A}),D=(0,C.serialize)(M.payloadSchema,R),T=Uint8Array.from(w.sha256.array(D)),F=Buffer.from(g,"base64");return p.utils.PublicKey.from(v).verify(T,F)}},77118:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function($,S,r,s){return new(r||(r=Promise))(function(h,E){function k(f){try{x(s.next(f))}catch(P){E(P)}}function B(f){try{x(s.throw(f))}catch(P){E(P)}}function x(f){f.done?h(f.value):function d(h){return h instanceof r?h:new r(function(E){E(h)})}(f.value).then(k,B)}x((s=s.apply($,S||[])).next())})},C=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a,"__esModule",{value:!0}),a.Account=void 0;const w=y(55911),M=y(1739),u=y(30448),v=y(17527),g=y(41166),b=C(y(98538)),I=y(21531),{addKey:_,createAccount:A,deleteAccount:R,deleteKey:D,deployContract:T,fullAccessKey:F,functionCall:L,functionCallAccessKey:V,stake:j,transfer:Z}=u.actionCreators;function X($){return JSON.parse(Buffer.from($).toString())}function Q($){return Buffer.from(JSON.stringify($))}class z{constructor(S,r){this.accessKeyByPublicKeyCache={},this.connection=S,this.accountId=r}state(){return p(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(S,r){return p(this,void 0,void 0,function*(){const s=yield this.findAccessKey(S,r);if(!s)throw new v.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=s,E=(yield this.connection.provider.block({finality:"final"})).header.hash,k=d.nonce.add(new b.default(1));return yield(0,u.signTransaction)(S,k,r,(0,I.baseDecode)(E),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:S,actions:r,returnError:s}){return p(this,void 0,void 0,function*(){let d,h;const E=yield(0,M.exponentialBackoff)(500,12,1.5,()=>p(this,void 0,void 0,function*(){[d,h]=yield this.signTransaction(S,r);const k=h.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(h)}catch(B){if("InvalidNonce"===B.type)return(0,g.logWarning)(`Retrying transaction ${S}:${(0,I.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[k.toString()],null;if("Expired"===B.type)return(0,g.logWarning)(`Retrying transaction ${S}:${(0,I.baseEncode)(d)} due to expired block hash`),null;throw B.context=new v.ErrorContext((0,I.baseEncode)(d)),B}}));if(!E)throw new v.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:h.transaction.receiverId,outcome:E}),!s&&"object"==typeof E.status&&"object"==typeof E.status.Failure&&null!==E.status.Failure)throw E.status.Failure.error_message&&E.status.Failure.error_type?new v.TypedError(`Transaction ${E.transaction_outcome.id} failed. ${E.status.Failure.error_message}`,E.status.Failure.error_type):(0,g.parseResultError)(E);return E})}findAccessKey(S,r){return p(this,void 0,void 0,function*(){const s=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!s)throw new v.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[s.toString()];if(void 0!==d)return{publicKey:s,accessKey:d};try{const h=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:s.toString(),finality:"optimistic"}),E=Object.assign(Object.assign({},h),{nonce:new b.default(h.nonce)});return this.accessKeyByPublicKeyCache[s.toString()]?{publicKey:s,accessKey:this.accessKeyByPublicKeyCache[s.toString()]}:(this.accessKeyByPublicKeyCache[s.toString()]=E,{publicKey:s,accessKey:E})}catch(h){if("AccessKeyDoesNotExist"==h.type)return null;throw h}})}createAndDeployContract(S,r,s,d){return p(this,void 0,void 0,function*(){const h=F();return yield this.signAndSendTransaction({receiverId:S,actions:[A(),Z(d),_(w.PublicKey.from(r),h),T(s)]}),new z(this.connection,S)})}sendMoney(S,r){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:S,actions:[Z(r)]})})}createAccount(S,r,s){return p(this,void 0,void 0,function*(){const d=F();return this.signAndSendTransaction({receiverId:S,actions:[A(),Z(s),_(w.PublicKey.from(r),d)]})})}deleteAccount(S){return p(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[R(S)]})})}deployContract(S){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(S)]})})}encodeJSContractArgs(S,r,s){return Buffer.concat([Buffer.from(S),Buffer.from([0]),Buffer.from(r),Buffer.from([0]),Buffer.from(s)])}functionCall({contractId:S,methodName:r,args:s={},gas:d=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:h,walletMeta:E,walletCallbackUrl:k,stringify:B,jsContract:x}){return p(this,void 0,void 0,function*(){let f;if(this.validateArgs(s),x)f=["call_js_contract",this.encodeJSContractArgs(S,r,JSON.stringify(s)),d,h,null,!0];else{const P=void 0===B?u.stringifyJsonOrBytes:B;f=[r,s,d,h,P,!1]}return this.signAndSendTransaction({receiverId:x?this.connection.jsvmAccountId:S,actions:[L.apply(void 0,f)],walletMeta:E,walletCallbackUrl:k})})}addKey(S,r,s,d){return p(this,void 0,void 0,function*(){let h;return s||(s=[]),Array.isArray(s)||(s=[s]),h=r?V(r,s,d):F(),this.signAndSendTransaction({receiverId:this.accountId,actions:[_(w.PublicKey.from(S),h)]})})}deleteKey(S){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[D(w.PublicKey.from(S))]})})}stake(S,r){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[j(r,w.PublicKey.from(S))]})})}signedDelegate({actions:S,blockHeightTtl:r,receiverId:s}){return p(this,void 0,void 0,function*(){const{provider:d,signer:h}=this.connection,{header:E}=yield d.block({finality:"final"}),{accessKey:k,publicKey:B}=yield this.findAccessKey(null,null),x=(0,u.buildDelegateAction)({actions:S,maxBlockHeight:new b.default(E.height).add(new b.default(r)),nonce:new b.default(k.nonce).add(new b.default(1)),publicKey:B,receiverId:s,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,u.signDelegateAction)({delegateAction:x,signer:{sign:P=>p(this,void 0,void 0,function*(){const{signature:se}=yield h.signMessage(P,x.senderId,this.connection.networkId);return se})}});return f})}validateArgs(S){if((void 0===S.byteLength||S.byteLength!==S.length)&&(Array.isArray(S)||"object"!=typeof S))throw new v.PositionalArgsError}viewFunction({contractId:S,methodName:r,args:s={},parse:d=X,stringify:h=Q,jsContract:E=!1,blockQuery:k={finality:"optimistic"}}){return p(this,void 0,void 0,function*(){let B;this.validateArgs(s),B=E?this.encodeJSContractArgs(S,r,Object.keys(s).length>0?JSON.stringify(s):""):h(s);const x=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},k),{account_id:E?this.connection.jsvmAccountId:S,method_name:E?"view_js_contract":r,args_base64:B.toString("base64")}));return x.logs&&(0,g.printTxOutcomeLogs)({contractId:S,logs:x.logs}),x.result&&x.result.length>0&&d(Buffer.from(x.result))})}viewState(S,r={finality:"optimistic"}){return p(this,void 0,void 0,function*(){const{values:s}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},r),{account_id:this.accountId,prefix_base64:Buffer.from(S).toString("base64")}));return s.map(({key:d,value:h})=>({key:Buffer.from(d,"base64"),value:Buffer.from(h,"base64")}))})}getAccessKeys(){var S;return p(this,void 0,void 0,function*(){const r=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(S=r?.keys)||void 0===S?void 0:S.map(s=>Object.assign(Object.assign({},s),{access_key:Object.assign(Object.assign({},s.access_key),{nonce:new b.default(s.access_key.nonce)})}))})}getAccountDetails(){return p(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(s=>"FullAccess"!==s.access_key.permission).map(s=>{const d=s.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:s.public_key}})}})}getAccountBalance(){return p(this,void 0,void 0,function*(){const S=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),r=yield this.state(),s=new b.default(S.runtime_config.storage_amount_per_byte),d=new b.default(r.storage_usage).mul(s),h=new b.default(r.locked),E=new b.default(r.amount).add(h),k=E.sub(b.default.max(h,d));return{total:E.toString(),stateStaked:d.toString(),staked:h.toString(),available:k.toString()}})}getActiveDelegatedStakeBalance(){return p(this,void 0,void 0,function*(){const S=yield this.connection.provider.block({finality:"final"}),r=S.header.hash,s=S.header.epoch_id,{current_validators:d,next_validators:h,current_proposals:E}=yield this.connection.provider.validators(s),k=new Set;[...d,...h,...E].forEach(te=>k.add(te.account_id));const B=[...k],x=B.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:r}})),f=yield Promise.allSettled(x);if(f.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((te,ie,de)=>{const Ce=B[de];if("fulfilled"===ie.status){const ye=new b.default(ie.value);if(!ye.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:Ce,amount:ye.toString()}],total:te.total.add(ye)})}return"rejected"===ie.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:Ce,error:ie.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}a.Account=z},71339:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(Z,Y,G,q){return new(G||(G=Promise))(function(Q,z){function $(s){try{r(q.next(s))}catch(d){z(d)}}function S(s){try{r(q.throw(s))}catch(d){z(d)}}function r(s){s.done?Q(s.value):function X(Q){return Q instanceof G?Q:new G(function(z){z(Q)})}(s.value).then($,S)}r((q=q.apply(Z,Y||[])).next())})},C=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(a,"__esModule",{value:!0}),a.Account2FA=void 0;const w=y(55911),M=y(17527),u=y(1739),v=y(30448),g=C(y(98538)),b=y(30776),I=y(94914),_=y(87932),{addKey:A,deleteKey:R,deployContract:D,fullAccessKey:T,functionCall:F,functionCallAccessKey:L}=v.actionCreators;class V extends b.AccountMultisig{constructor(Y,G,q){super(Y,G,q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=q.helperUrl||this.helperUrl,this.storage=q.storage,this.sendCode=q.sendCode||this.sendCodeDefault,this.getCode=q.getCode||this.getCodeDefault,this.verifyCode=q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=q.onConfirmResult}signAndSendTransaction({receiverId:Y,actions:G}){const q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){yield q.signAndSendTransaction.call(this,{receiverId:Y,actions:G}),yield this.sendCode();const X=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(X)),X})}deployMultisig(Y){const G=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return p(this,void 0,void 0,function*(){const{accountId:q}=this,X=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:h})=>("phrase"===d||"ledger"===d)&&null!==h).map(d=>d.publicKey),Q=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:h}})=>"FullAccess"===h&&!X.includes(d)).map(d=>d.public_key).map(j),z=j((yield this.postSignedJson("/2fa/getAccessKey",{accountId:q})).publicKey),$=Buffer.from(JSON.stringify({num_confirmations:2})),S=[...Q.map(d=>R(d)),...Q.map(d=>A(d,L(q,I.MULTISIG_CHANGE_METHODS,null))),A(z,L(q,I.MULTISIG_CONFIRM_METHODS,null)),D(Y)],r=S.concat(F("new",$,I.MULTISIG_GAS,I.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",q);const{stateStatus:s}=yield this.checkMultisigCodeAndStateStatus(Y);switch(s){case _.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield G.signAndSendTransactionWithAccount.call(this,q,r);case _.MultisigStateStatus.VALID_STATE:return yield G.signAndSendTransactionWithAccount.call(this,q,S);case _.MultisigStateStatus.INVALID_STATE:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:Y,cleanupContractBytes:G}){return p(this,void 0,void 0,function*(){let q=[];G&&(yield this.deleteAllRequests().catch($=>$),q=yield this.get2faDisableCleanupActions(G));const X=yield this.get2faDisableKeyConversionActions(),Q=[...q,...X,D(Y)],z=yield this.findAccessKey(this.accountId,Q);if(z&&z.accessKey&&"FullAccess"!==z.accessKey.permission)throw new M.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,Q)})}get2faDisableCleanupActions(Y){return p(this,void 0,void 0,function*(){const G=yield this.viewState("").catch(X=>{const Q=X.cause&&X.cause.name;if("NO_CONTRACT_CODE"==Q)return[];throw"TOO_LARGE_CONTRACT_STATE"==Q?new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):X}),q=G.map(({key:X})=>X.toString("base64"));return G.length?[D(Y),F("clean",{keys:q},I.MULTISIG_GAS,new g.default("0"))]:[]})}get2faDisableKeyConversionActions(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,q=(yield this.getAccessKeys()).filter(({access_key:Q})=>"FullAccess"!==Q.permission).filter(({access_key:Q})=>{const z=Q.permission.FunctionCall;return z.receiver_id===Y&&4===z.method_names.length&&z.method_names.includes("add_request_and_confirm")}),X=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey);return[R(X),...q.map(({public_key:Q})=>R(w.PublicKey.from(Q))),...q.map(({public_key:Q})=>A(w.PublicKey.from(Q),T()))]})}disable(Y,G){return p(this,void 0,void 0,function*(){const{stateStatus:q}=yield this.checkMultisigCodeAndStateStatus();if(q!==_.MultisigStateStatus.VALID_STATE&&q!==_.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let X;yield this.deleteAllRequests().catch($=>X=$);const z=[...yield this.get2faDisableCleanupActions(G).catch($=>{throw"ContractHasExistingState"===$.type&&X||$}),...yield this.get2faDisableKeyConversionActions(),D(Y)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:z})})}sendCodeDefault(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,{requestId:G}=this.getRequest(),q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:Y,method:q,requestId:G}),G})}getCodeDefault(){return p(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return p(this,void 0,void 0,function*(){const Y=yield this.get2faMethod(),G=yield this.getCode(Y);try{return yield this.verifyCode(G)}catch(q){if(console.warn("Error validating security code:",q),q.toString().includes("invalid 2fa code provided")||q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw q}})}verifyCodeDefault(Y){return p(this,void 0,void 0,function*(){const{accountId:G}=this,q=this.getRequest();if(!q)throw new Error("no request pending");const{requestId:X}=q;return yield this.postSignedJson("/2fa/verify",{accountId:G,securityCode:Y,requestId:X})})}getRecoveryMethods(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this;return{accountId:Y,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:Y})}})}get2faMethod(){return p(this,void 0,void 0,function*(){let{data:Y}=yield this.getRecoveryMethods();if(Y&&Y.length&&(Y=Y.find(X=>0===X.kind.indexOf("2fa-"))),!Y)return null;const{kind:G,detail:q}=Y;return{kind:G,detail:q}})}signatureFor(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),X=yield this.connection.signer.signMessage(Buffer.from(q),Y,this.connection.networkId);return{blockNumber:q,blockNumberSignature:Buffer.from(X.signature).toString("base64")}})}postSignedJson(Y,G){return p(this,void 0,void 0,function*(){return yield(0,u.fetchJson)(this.helperUrl+Y,JSON.stringify(Object.assign(Object.assign({},G),yield this.signatureFor())))})}}a.Account2FA=V;const j=Z=>w.PublicKey.from(Z)},57107:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=void 0;const C=y(1739);class w{}a.AccountCreator=w;a.LocalAccountCreator=class M extends w{constructor(g,b){super(),this.masterAccount=g,this.initialBalance=b}createAccount(g,b){return p(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(g,b,this.initialBalance)})}};a.UrlAccountCreator=class u extends w{constructor(g,b){super(),this.connection=g,this.helperUrl=b}createAccount(g,b){return p(this,void 0,void 0,function*(){yield(0,C.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:g,newAccountPublicKey:b.toString()}))})}}},30776:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(D,T,F,L){return new(F||(F=Promise))(function(j,Z){function Y(X){try{q(L.next(X))}catch(Q){Z(Q)}}function G(X){try{q(L.throw(X))}catch(Q){Z(Q)}}function q(X){X.done?j(X.value):function V(j){return j instanceof F?j:new F(function(Z){Z(j)})}(X.value).then(Y,G)}q((L=L.apply(D,T||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.AccountMultisig=void 0;const C=y(30448),w=y(77118),M=y(94914),u=y(87932),{deployContract:v,functionCall:g}=C.actionCreators;var b,D;(D=b||(b={}))[D.INVALID_CODE=0]="INVALID_CODE",D[D.VALID_CODE=1]="VALID_CODE",D[D.UNKNOWN_CODE=2]="UNKNOWN_CODE";const I={[M.MULTISIG_STORAGE_KEY]:null};class _ extends w.Account{constructor(T,F,L){super(T,F),this.storage=L.storage,this.onAddRequestResult=L.onAddRequestResult}signAndSendTransactionWithAccount(T,F){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){return L.signAndSendTransaction.call(this,{receiverId:T,actions:F})})}signAndSendTransaction({receiverId:T,actions:F}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const{accountId:V}=this,j=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:R(F,V,T)}}));let Z;try{Z=yield L.signAndSendTransaction.call(this,{receiverId:V,actions:[g("add_request_and_confirm",j,M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch(G){if(G.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:F});throw G}if(!Z.status)throw new Error("Request failed");const Y=Object.assign({},Z.status);if(!Y.SuccessValue||"string"!=typeof Y.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:V,actions:F,requestId:parseInt(Buffer.from(Y.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(Z)),this.deleteUnconfirmedRequests(),Z})}checkMultisigCodeAndStateStatus(T){const F=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const V=T?b.UNKNOWN_CODE:b.VALID_CODE;try{return T?yield F.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[v(T),g("delete_request",{request_id:4294967295},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:u.MultisigStateStatus.VALID_STATE}}catch(j){if(new RegExp(u.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.INVALID_STATE};if(new RegExp(u.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(u.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:V,stateStatus:u.MultisigStateStatus.VALID_STATE};if(new RegExp(u.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(j&&j.message))return{codeStatus:b.INVALID_CODE,stateStatus:u.MultisigStateStatus.UNKNOWN_STATE};throw j}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[g("delete_request",{request_id:T},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return p(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(F=>this.deleteRequest(F))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const F=yield this.getRequestIds(),{requestId:L}=this.getRequest();for(const V of F)if(V!=L)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g("delete_request",{request_id:V},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return p(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(M.MULTISIG_STORAGE_KEY)||"{}"):I[M.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(M.MULTISIG_STORAGE_KEY,JSON.stringify(T));I[M.MULTISIG_STORAGE_KEY]=T}}a.AccountMultisig=_;const A=D=>D.toString().replace("ed25519:",""),R=(D,T,F)=>D.map(L=>{const V=L.enum,{gas:j,publicKey:Z,methodName:Y,args:G,deposit:q,accessKey:X,code:Q}=L[V],z={type:V[0].toUpperCase()+V.substr(1),gas:j&&j.toString()||void 0,public_key:Z&&A(Z)||void 0,method_name:Y,args:G&&Buffer.from(G).toString("base64")||void 0,code:Q&&Buffer.from(Q).toString("base64")||void 0,amount:q&&q.toString()||void 0,deposit:q&&q.toString()||"0",permission:void 0};if(X&&(F===T&&"fullAccess"!==X.permission.enum&&(z.permission={receiver_id:T,allowance:M.MULTISIG_ALLOWANCE.toString(),method_names:M.MULTISIG_CHANGE_METHODS}),"functionCall"===X.permission.enum)){const{receiverId:$,methodNames:S,allowance:r}=X.permission.functionCall;z.permission={receiver_id:$,allowance:r&&r.toString()||void 0,method_names:S}}return z})},35999:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Connection=void 0;const p=y(25035),C=y(1739);class u{constructor(g,b,I,_){this.networkId=g,this.provider=b,this.signer=I,this.jsvmAccountId=_}static fromConfig(g){const b=function w(v){switch(v.type){case void 0:return v;case"JsonRpcProvider":return new C.JsonRpcProvider(Object.assign({},v.args));default:throw new Error(`Unknown provider type ${v.type}`)}}(g.provider),I=function M(v){switch(v.type){case void 0:return v;case"InMemorySigner":return new p.InMemorySigner(v.keyStore);default:throw new Error(`Unknown signer type ${v.type}`)}}(g.signer);return new u(g.networkId,b,I,g.jsvmAccountId)}}a.Connection=u},94914:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(a,"__esModule",{value:!0}),a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=void 0;const C=y(41166),w=p(y(98538));a.MULTISIG_STORAGE_KEY="__multisigRequest",a.MULTISIG_ALLOWANCE=new w.default((0,C.parseNearAmount)("1")),a.MULTISIG_GAS=new w.default("100000000000000"),a.MULTISIG_DEPOSIT=new w.default("0"),a.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],a.MULTISIG_CONFIRM_METHODS=["confirm"]},43017:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(j,Z,Y,G){return new(Y||(Y=Promise))(function(X,Q){function z(r){try{S(G.next(r))}catch(s){Q(s)}}function $(r){try{S(G.throw(r))}catch(s){Q(s)}}function S(r){r.done?X(r.value):function q(X){return X instanceof Y?X:new Y(function(Q){Q(X)})}(r.value).then(z,$)}S((G=G.apply(j,Z||[])).next())})},C=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=void 0;const w=y(41166),M=y(17527),u=C(y(74411)),v=C(y(26474)),g=C(y(98538)),b=C(y(89176)),I=y(84778),_=y(49467);function A(j,Z){return{[j]:(...Y)=>Z(...Y)}[j]}function R(j,Z,Y,G){var q;if(!F(j))return;if(Z.params&&Z.params.serialization_type!==I.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(Z.name,Z.params.serialization_type);if(Z.result&&Z.result.serialization_type!==I.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(Z.name,Z.result.serialization_type);const X=(null===(q=Z.params)||void 0===q?void 0:q.args)||[];for(const Q of X){const z=j[Q.name],$=Q.type_schema;$.definitions=G.body.root_schema.definitions;const S=Y.compile($);if(!S(z))throw new _.ArgumentSchemaError(Q.name,S.errors)}for(const Q of Object.keys(j))if(!X.find($=>$.name===Q))throw new _.UnknownArgumentError(Q,X.map($=>$.name))}const T=j=>j&&void 0!==j.byteLength&&j.byteLength===j.length,F=j=>"[object Object]"===Object.prototype.toString.call(j);a.Contract=class L{constructor(Z,Y,G){this.account=Z,this.contractId=Y;const{viewMethods:q=[],changeMethods:X=[],abi:Q}=G;let z=q.map(r=>({name:r,abi:null})),$=X.map(r=>({name:r,abi:null}));if(Q){if(z.length>0||$.length>0)throw new _.ConflictingOptions;z=Q.body.functions.filter(r=>r.kind===I.AbiFunctionKind.View).map(r=>({name:r.name,abi:r})),$=Q.body.functions.filter(r=>r.kind===I.AbiFunctionKind.Call).map(r=>({name:r.name,abi:r}))}const S=function D(){const j=new u.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,v.default)(j),j}();z.forEach(({name:r,abi:s})=>{Object.defineProperty(this,r,{writable:!1,enumerable:!0,value:A(r,(d={},h={},...E)=>p(this,void 0,void 0,function*(){if(E.length||!F(d)&&!T(d)||!F(h))throw new M.PositionalArgsError;return s&&R(d,s,S,Q),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:r,args:d},h))}))})}),$.forEach(({name:r,abi:s})=>{Object.defineProperty(this,r,{writable:!1,enumerable:!0,value:A(r,(...d)=>p(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!F(d[0])&&!T(d[0])))throw new M.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),s&&R(d[0].args,s,S,Q),this._changeMethod(Object.assign({methodName:r},d[0]))}))})})}_changeMethod({args:Z,methodName:Y,gas:G,amount:q,meta:X,callbackUrl:Q}){return p(this,void 0,void 0,function*(){!function V(j){const Z="number, decimal string or BN";for(const Y of Object.keys(j)){const G=j[Y];if(G&&!g.default.isBN(G)&&isNaN(G))throw new M.ArgumentTypeError(Y,Z,G)}}({gas:G,amount:q});const z=yield this.account.functionCall({contractId:this.contractId,methodName:Y,args:Z,gas:G,attachedDeposit:q,walletMeta:X,walletCallbackUrl:Q});return(0,w.getTransactionLastResult)(z)})}}},49467:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ConflictingOptions=a.ArgumentSchemaError=a.UnknownArgumentError=a.UnsupportedSerializationError=void 0;class y extends Error{constructor(u,v){super(`Contract method '${u}' is using an unsupported serialization type ${v}`)}}a.UnsupportedSerializationError=y;class p extends Error{constructor(u,v){super(`Unrecognized argument '${u}', expected '${JSON.stringify(v)}'`)}}a.UnknownArgumentError=p;class C extends Error{constructor(u,v){super(`Argument '${u}' does not conform to the specified ABI schema: '${JSON.stringify(v)}'`)}}a.ArgumentSchemaError=C;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}a.ConflictingOptions=w},11538:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=a.UnsupportedSerializationError=a.UnknownArgumentError=a.ConflictingOptions=a.ArgumentSchemaError=a.Contract=a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=a.Connection=a.AccountMultisig=a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=a.Account2FA=a.Account=void 0;var p=y(77118);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return p.Account}});var C=y(71339);Object.defineProperty(a,"Account2FA",{enumerable:!0,get:function(){return C.Account2FA}});var w=y(57107);Object.defineProperty(a,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(a,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(a,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var M=y(30776);Object.defineProperty(a,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var u=y(35999);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return u.Connection}});var v=y(94914);Object.defineProperty(a,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return v.MULTISIG_STORAGE_KEY}}),Object.defineProperty(a,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return v.MULTISIG_ALLOWANCE}}),Object.defineProperty(a,"MULTISIG_GAS",{enumerable:!0,get:function(){return v.MULTISIG_GAS}}),Object.defineProperty(a,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return v.MULTISIG_DEPOSIT}}),Object.defineProperty(a,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(a,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CONFIRM_METHODS}});var g=y(43017);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return g.Contract}});var b=y(49467);Object.defineProperty(a,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(a,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(a,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(a,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var I=y(87932);Object.defineProperty(a,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return I.MultisigDeleteRequestRejectionError}}),Object.defineProperty(a,"MultisigStateStatus",{enumerable:!0,get:function(){return I.MultisigStateStatus}})},87932:(ne,a)=>{"use strict";var C;Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=void 0,(C=a.MultisigDeleteRequestRejectionError||(a.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",C.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",C.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",C.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",C.METHOD_NOT_FOUND="Contract method is not found",function(C){C[C.INVALID_STATE=0]="INVALID_STATE",C[C.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",C[C.VALID_STATE=2]="VALID_STATE",C[C.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(a.MultisigStateStatus||(a.MultisigStateStatus={}))},36999:(ne,a)=>{"use strict";var p;Object.defineProperty(a,"__esModule",{value:!0}),a.KeyType=void 0,(p=a.KeyType||(a.KeyType={}))[p.ED25519=0]="ED25519"},55911:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=a.KeyPairEd25519=a.KeyPair=a.KeyType=void 0;var p=y(36999);Object.defineProperty(a,"KeyType",{enumerable:!0,get:function(){return p.KeyType}});var C=y(53087);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return C.KeyPair}});var w=y(46735);Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var M=y(73833);Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},53087:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPair=void 0;const p=y(25387),C=y(46735);class w extends p.KeyPairBase{static fromRandom(u){if("ED25519"===u.toUpperCase())return C.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${u}`)}static fromString(u){const v=u.split(":");if(1===v.length)return new C.KeyPairEd25519(v[0]);if(2===v.length){if("ED25519"===v[0].toUpperCase())return new C.KeyPairEd25519(v[1]);throw new Error(`Unknown curve: ${v[0]}`)}throw new Error("Invalid encoded key format, must be :")}}a.KeyPair=w},25387:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPairBase=void 0;a.KeyPairBase=class y{}},46735:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.KeyPairEd25519=void 0;const C=y(21531),w=p(y(40489)),M=y(36999),u=y(25387),v=y(73833);class g extends u.KeyPairBase{constructor(I){super();const _=w.default.sign.keyPair.fromSecretKey((0,C.baseDecode)(I));this.publicKey=new v.PublicKey({keyType:M.KeyType.ED25519,data:_.publicKey}),this.secretKey=I}static fromRandom(){const I=w.default.sign.keyPair();return new g((0,C.baseEncode)(I.secretKey))}sign(I){return{signature:w.default.sign.detached(I,(0,C.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(I,_){return this.publicKey.verify(I,_)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}a.KeyPairEd25519=g},73833:function(ne,a,y){"use strict";var p=this&&this.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=void 0;const C=y(17527),w=y(21531),M=p(y(40489)),u=y(36999);class b extends C.Assignable{static from(_){return"string"==typeof _?b.fromString(_):_}static fromString(_){const A=_.split(":");let R,D=u.KeyType.ED25519;if(1===A.length)R=A[0];else{if(2!==A.length)throw new Error("Invalid encoded key format, must be :");R=A[1],D=function g(I){if("ed25519"===I.toLowerCase())return u.KeyType.ED25519;throw new Error(`Unknown key type ${I}`)}(A[0])}const T=(0,w.baseDecode)(R);if(T.length!==M.default.box.publicKeyLength)throw new Error(`Invalid public key size (${T.length}), must be ${M.default.box.publicKeyLength}`);return new b({keyType:D,data:T})}toString(){return`${function v(I){if(I===u.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${I}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(_,A){if(this.keyType===u.KeyType.ED25519)return M.default.sign.detached.verify(_,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}a.PublicKey=b},85051:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;const C=y(55911),w=y(90793);class u extends w.KeyStore{constructor(g=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=g,this.prefix=b}setKey(g,b,I){return p(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(g,b),I.toString())})}getKey(g,b){return p(this,void 0,void 0,function*(){const I=this.localStorage.getItem(this.storageKeyForSecretKey(g,b));return I?C.KeyPair.fromString(I):null})}removeKey(g,b){return p(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(g,b))})}clear(){return p(this,void 0,void 0,function*(){for(const g of this.storageKeys())g.startsWith(this.prefix)&&this.localStorage.removeItem(g)})}getNetworks(){return p(this,void 0,void 0,function*(){const g=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const I=b.substring(this.prefix.length).split(":");g.add(I[1])}return Array.from(g.values())})}getAccounts(g){return p(this,void 0,void 0,function*(){const b=new Array;for(const I of this.storageKeys())if(I.startsWith(this.prefix)){const _=I.substring(this.prefix.length).split(":");_[1]===g&&b.push(_[0])}return b})}storageKeyForSecretKey(g,b){return`${this.prefix}${b}:${g}`}*storageKeys(){for(let g=0;g{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;var p=y(85051);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},93414:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(u,v,g,b){return new(g||(g=Promise))(function(_,A){function R(F){try{T(b.next(F))}catch(L){A(L)}}function D(F){try{T(b.throw(F))}catch(L){A(L)}}function T(F){F.done?_(F.value):function I(_){return _ instanceof g?_:new g(function(A){A(_)})}(F.value).then(R,D)}T((b=b.apply(u,v||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.InMemoryKeyStore=void 0;const C=y(55911),w=y(86614);class M extends w.KeyStore{constructor(){super(),this.keys={}}setKey(v,g,b){return p(this,void 0,void 0,function*(){this.keys[`${g}:${v}`]=b.toString()})}getKey(v,g){return p(this,void 0,void 0,function*(){const b=this.keys[`${g}:${v}`];return b?C.KeyPair.fromString(b):null})}removeKey(v,g){return p(this,void 0,void 0,function*(){delete this.keys[`${g}:${v}`]})}clear(){return p(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return p(this,void 0,void 0,function*(){const v=new Set;return Object.keys(this.keys).forEach(g=>{const b=g.split(":");v.add(b[1])}),Array.from(v.values())})}getAccounts(v){return p(this,void 0,void 0,function*(){const g=new Array;return Object.keys(this.keys).forEach(b=>{const I=b.split(":");I[I.length-1]===v&&g.push(I.slice(0,I.length-1).join(":"))}),g})}toString(){return"InMemoryKeyStore"}}a.InMemoryKeyStore=M},90793:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=a.KeyStore=a.InMemoryKeyStore=void 0;var p=y(93414);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}});var C=y(86614);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return C.KeyStore}});var w=y(51731);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},86614:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyStore=void 0;a.KeyStore=class y{}},51731:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(M,u,v,g){return new(v||(v=Promise))(function(I,_){function A(T){try{D(g.next(T))}catch(F){_(F)}}function R(T){try{D(g.throw(T))}catch(F){_(F)}}function D(T){T.done?I(T.value):function b(I){return I instanceof v?I:new v(function(_){_(I)})}(T.value).then(A,R)}D((g=g.apply(M,u||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=void 0;const C=y(86614);class w extends C.KeyStore{constructor(u,v={writeKeyStoreIndex:0}){super(),this.options=v,this.keyStores=u}setKey(u,v,g){return p(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(u,v,g)})}getKey(u,v){return p(this,void 0,void 0,function*(){for(const g of this.keyStores){const b=yield g.getKey(u,v);if(b)return b}return null})}removeKey(u,v){return p(this,void 0,void 0,function*(){for(const g of this.keyStores)yield g.removeKey(u,v)})}clear(){return p(this,void 0,void 0,function*(){for(const u of this.keyStores)yield u.clear()})}getNetworks(){return p(this,void 0,void 0,function*(){const u=new Set;for(const v of this.keyStores)for(const g of yield v.getNetworks())u.add(g);return Array.from(u)})}getAccounts(u){return p(this,void 0,void 0,function*(){const v=new Set;for(const g of this.keyStores)for(const b of yield g.getAccounts(u))v.add(b);return Array.from(v)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}a.MergeKeyStore=w},35103:function(ne,a){"use strict";var y=this&&this.__awaiter||function(w,M,u,v){return new(u||(u=Promise))(function(b,I){function _(D){try{R(v.next(D))}catch(T){I(T)}}function A(D){try{R(v.throw(D))}catch(T){I(T)}}function R(D){D.done?b(D.value):function g(b){return b instanceof u?b:new u(function(I){I(b)})}(D.value).then(_,A)}R((v=v.apply(w,M||[])).next())})};function C(w){return new Promise(M=>setTimeout(M,w))}Object.defineProperty(a,"__esModule",{value:!0}),a.exponentialBackoff=void 0,a.exponentialBackoff=function p(w,M,u,v){return y(this,void 0,void 0,function*(){let g=w;for(let b=0;b!process.env.NEAR_NO_LOGS&&console.warn(...T);a.fetchJson=function D(T,F){return M(this,void 0,void 0,function*(){let L={url:null};"string"==typeof T?L.url=T:L=T;const V=yield(0,b.exponentialBackoff)(I,A,_,()=>M(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(y(75645)))).default);const j=yield global.fetch(L.url,{method:F?"POST":"GET",body:F||void 0,headers:Object.assign(Object.assign({},L.headers),{"Content-Type":"application/json"})});if(!j.ok){if(503===j.status)return R(`Retrying HTTP request for ${L.url} as it's not available now`),null;throw(0,g.default)(j.status,yield j.text())}return j}catch(j){if(j.toString().includes("FetchError")||j.toString().includes("Failed to fetch"))return R(`Retrying HTTP request for ${L.url} because of error: ${j}`),null;throw j}}));if(!V)throw new v.TypedError(`Exceeded ${A} attempts for ${L.url}.`,"RetriesExceeded");return yield V.json()})}},1739:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fetchJson=a.Provider=a.JsonRpcProvider=a.exponentialBackoff=void 0;var p=y(35103);Object.defineProperty(a,"exponentialBackoff",{enumerable:!0,get:function(){return p.exponentialBackoff}});var C=y(44459);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}});var w=y(95326);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return w.Provider}});var M=y(243);Object.defineProperty(a,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},44459:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(F,L,V,j){return new(V||(V=Promise))(function(Y,G){function q(z){try{Q(j.next(z))}catch($){G($)}}function X(z){try{Q(j.throw(z))}catch($){G($)}}function Q(z){z.done?Y(z.value):function Z(Y){return Y instanceof V?Y:new V(function(G){G(Y)})}(z.value).then(q,X)}Q((j=j.apply(F,L||[])).next())})},C=this&&this.__rest||function(F,L){var V={};for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&L.indexOf(j)<0&&(V[j]=F[j]);if(null!=F&&"function"==typeof Object.getOwnPropertySymbols){var Z=0;for(j=Object.getOwnPropertySymbols(F);Zp(this,void 0,void 0,function*(){try{const Y={method:L,params:V,id:D++,jsonrpc:"2.0"},G=yield(0,I.fetchJson)(this.connection,JSON.stringify(Y));if(G.error){if("object"==typeof G.error.data)throw"string"==typeof G.error.data.error_message&&"string"==typeof G.error.data.error_type?new M.TypedError(G.error.data.error_message,G.error.data.error_type):(0,w.parseRpcError)(G.error.data);{const q=`[${G.error.code}] ${G.error.message}: ${G.error.data}`;throw"Timeout"===G.error.data||q.includes("Timeout error")||q.includes("query has timed out")?new M.TypedError(q,"TimeoutError"):new M.TypedError(q,(0,w.getErrorTypeFromErrorMessage)(G.error.data,G.error.name))}}return G}catch(Y){if("TimeoutError"===Y.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${L} as it has timed out`,V),null;throw Y}})),{result:Z}=j;if(typeof Z>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${L}.`,"RetriesExceeded");return Z})}}a.JsonRpcProvider=T},95326:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Provider=void 0;a.Provider=class y{}},22972:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(b,I,_,A){return new(_||(_=Promise))(function(D,T){function F(j){try{V(A.next(j))}catch(Z){T(Z)}}function L(j){try{V(A.throw(j))}catch(Z){T(Z)}}function V(j){j.done?D(j.value):function R(D){return D instanceof _?D:new _(function(T){T(D)})}(j.value).then(F,L)}V((A=A.apply(b,I||[])).next())})},C=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(a,"__esModule",{value:!0}),a.InMemorySigner=void 0;const w=y(55911),M=y(90793),u=C(y(1520)),v=y(83159);class g extends v.Signer{constructor(I){super(),this.keyStore=I}static fromKeyPair(I,_,A){return p(this,void 0,void 0,function*(){const R=new M.InMemoryKeyStore;return yield R.setKey(I,_,A),new g(R)})}createKey(I,_){return p(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(_,I,A),A.getPublicKey()})}getPublicKey(I,_){return p(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(_,I);return null===A?null:A.getPublicKey()})}signMessage(I,_,A){return p(this,void 0,void 0,function*(){const R=new Uint8Array(u.default.sha256.array(I));if(!_)throw new Error("InMemorySigner requires provided account id");const D=yield this.keyStore.getKey(A,_);if(null===D)throw new Error(`Key for ${_} not found in ${A}`);return D.sign(R)})}toString(){return`InMemorySigner(${this.keyStore})`}}a.InMemorySigner=g},25035:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=a.InMemorySigner=void 0;var p=y(22972);Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}});var C=y(83159);Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return C.Signer}})},83159:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=void 0;a.Signer=class y{}},79344:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.actionCreators=a.stringifyJsonOrBytes=void 0;const p=y(86041);function v(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}a.stringifyJsonOrBytes=v,a.actionCreators={addKey:function _(T,F){return new p.Action({addKey:new p.AddKey({publicKey:T,accessKey:F})})},createAccount:function M(){return new p.Action({createAccount:new p.CreateAccount({})})},deleteAccount:function R(T){return new p.Action({deleteAccount:new p.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new p.Action({deleteKey:new p.DeleteKey({publicKey:T})})},deployContract:function u(T){return new p.Action({deployContract:new p.DeployContract({code:T})})},fullAccessKey:function C(){return new p.AccessKey({permission:new p.AccessKeyPermission({fullAccess:new p.FullAccessPermission({})})})},functionCall:function g(T,F,L,V,j=v,Z=!1){return Z?new p.Action({functionCall:new p.FunctionCall({methodName:T,args:F,gas:L,deposit:V})}):new p.Action({functionCall:new p.FunctionCall({methodName:T,args:j(F),gas:L,deposit:V})})},functionCallAccessKey:function w(T,F,L){return new p.AccessKey({permission:new p.AccessKeyPermission({functionCall:new p.FunctionCallPermission({receiverId:T,allowance:L,methodNames:F})})})},signedDelegate:function D({delegateAction:T,signature:F}){return new p.Action({signedDelegate:new p.SignedDelegate({delegateAction:T,signature:F})})},stake:function I(T,F){return new p.Action({stake:new p.Stake({stake:T,publicKey:F})})},transfer:function b(T){return new p.Action({transfer:new p.Transfer({deposit:T})})}}},86041:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Action=a.SignedDelegate=a.DeleteAccount=a.DeleteKey=a.AddKey=a.Stake=a.Transfer=a.FunctionCall=a.DeployContract=a.CreateAccount=a.IAction=a.AccessKey=a.AccessKeyPermission=a.FullAccessPermission=a.FunctionCallPermission=void 0;const p=y(17527);class C{constructor(Z){if(1!==Object.keys(Z).length)throw new Error("Enum can only take single value");Object.keys(Z).map(Y=>{this[Y]=Z[Y],this.enum=Y})}}class w extends p.Assignable{}a.FunctionCallPermission=w;class M extends p.Assignable{}a.FullAccessPermission=M;a.AccessKeyPermission=class u extends C{};class v extends p.Assignable{}a.AccessKey=v;class g extends p.Assignable{}a.IAction=g;a.CreateAccount=class b extends g{};a.DeployContract=class I extends g{};a.FunctionCall=class _ extends g{};a.Transfer=class A extends g{};a.Stake=class R extends g{};a.AddKey=class D extends g{};a.DeleteKey=class T extends g{};a.DeleteAccount=class F extends g{};a.SignedDelegate=class L extends g{};a.Action=class V extends C{}},11889:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createTransaction=void 0;const p=y(53699);a.createTransaction=function C(w,M,u,v,g,b){return new p.Transaction({signerId:w,publicKey:M,nonce:v,receiverId:u,actions:g,blockHash:b})}},34169:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.buildDelegateAction=a.DelegateAction=void 0;const p=y(17527),C=y(79344),{addKey:w,createAccount:M,deleteAccount:u,deleteKey:v,deployContract:g,functionCall:b,stake:I,transfer:_}=C.actionCreators;class A extends p.Assignable{}a.DelegateAction=A,a.buildDelegateAction=function R({actions:D,maxBlockHeight:T,nonce:F,publicKey:L,receiverId:V,senderId:j}){return new A({senderId:j,receiverId:V,actions:D.map(Z=>{if(!Z.type&&!Z.params)return Z;switch(Z.type){case"AddKey":{const{publicKey:Y,accessKey:G}=Z.params;return w(Y,G)}case"CreateAccount":return M(Z.params.createAccount);case"DeleteAccount":return u(Z.params.deleteAccount);case"DeleteKey":return v(Z.params.publicKey);case"DeployContract":return g(Z.params.code);case"FunctionCall":{const{methodName:Y,args:G,gas:q,deposit:X}=Z.params;return b(Y,G,q,X)}case"Stake":return I(Z.params.stake,Z.params.publicKey);case"Transfer":{const{deposit:Y}=Z.params;return _(Y)}}throw new Error("Unrecognized action")}),nonce:F,maxBlockHeight:T,publicKey:L})}},30448:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,M,u,v){void 0===v&&(v=u);var g=Object.getOwnPropertyDescriptor(M,u);(!g||("get"in g?!M.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return M[u]}}),Object.defineProperty(w,v,g)}:function(w,M,u,v){void 0===v&&(v=u),w[v]=M[u]}),C=this&&this.__exportStar||function(w,M){for(var u in w)"default"!==u&&!Object.prototype.hasOwnProperty.call(M,u)&&p(M,w,u)};Object.defineProperty(a,"__esModule",{value:!0}),C(y(79344),a),C(y(86041),a),C(y(11889),a),C(y(34169),a),C(y(53699),a),C(y(33033),a),C(y(13904),a)},37665:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.DelegateActionPrefix=void 0;const p=y(17527),C=Math.pow(2,30),w_MetaTransactions=366;class M extends p.Assignable{}class u extends M{constructor(b){super({prefix:C+b})}}a.DelegateActionPrefix=class v extends u{constructor(){super(w_MetaTransactions)}}},53699:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SCHEMA=a.SignedTransaction=a.Transaction=a.decodeSignedTransaction=a.decodeTransaction=a.encodeTransaction=a.encodeSignedDelegate=a.encodeDelegateAction=void 0;const p=y(55911),C=y(17527),w=y(21531),M=y(86041),u=y(34169),v=y(37665),g=y(13904);function _(F){return(0,w.serialize)(a.SCHEMA,F)}function A(F){return(0,w.deserialize)(a.SCHEMA,D,F)}function R(F){return(0,w.deserialize)(a.SCHEMA,T,F)}a.encodeDelegateAction=function b(F){return new Uint8Array([...(0,w.serialize)(a.SCHEMA,new v.DelegateActionPrefix),...(0,w.serialize)(a.SCHEMA,F)])},a.encodeSignedDelegate=function I(F){return(0,w.serialize)(a.SCHEMA,F)},a.encodeTransaction=_,a.decodeTransaction=A,a.decodeSignedTransaction=R;class D extends C.Assignable{encode(){return _(this)}static decode(L){return A(L)}}a.Transaction=D;class T extends C.Assignable{encode(){return _(this)}static decode(L){return R(L)}}a.SignedTransaction=T,a.SCHEMA=new Map([[g.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",D],["signature",g.Signature]]}],[D,{kind:"struct",fields:[["signerId","string"],["publicKey",p.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[M.Action]]]}],[p.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[M.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",M.AccessKeyPermission]]}],[M.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",M.FunctionCallPermission],["fullAccess",M.FullAccessPermission]]}],[M.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[M.FullAccessPermission,{kind:"struct",fields:[]}],[M.Action,{kind:"enum",field:"enum",values:[["createAccount",M.CreateAccount],["deployContract",M.DeployContract],["functionCall",M.FunctionCall],["transfer",M.Transfer],["stake",M.Stake],["addKey",M.AddKey],["deleteKey",M.DeleteKey],["deleteAccount",M.DeleteAccount],["signedDelegate",M.SignedDelegate]]}],[M.CreateAccount,{kind:"struct",fields:[]}],[M.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[M.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[M.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[M.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.PublicKey]]}],[M.AddKey,{kind:"struct",fields:[["publicKey",p.PublicKey],["accessKey",M.AccessKey]]}],[M.DeleteKey,{kind:"struct",fields:[["publicKey",p.PublicKey]]}],[M.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[u.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[M.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",p.PublicKey]]}],[v.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[M.SignedDelegate,{kind:"struct",fields:[["delegateAction",u.DelegateAction],["signature",g.Signature]]}]])},33033:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(A,R,D,T){return new(D||(D=Promise))(function(L,V){function j(G){try{Y(T.next(G))}catch(q){V(q)}}function Z(G){try{Y(T.throw(G))}catch(q){V(q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof D?L:new D(function(V){V(L)})}(G.value).then(j,Z)}Y((T=T.apply(A,R||[])).next())})},C=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(a,"__esModule",{value:!0}),a.signDelegateAction=a.signTransaction=void 0;const w=C(y(1520)),M=y(86041),u=y(11889),v=y(53699),g=y(13904);function b(A,R,D,T){return p(this,void 0,void 0,function*(){const F=(0,v.encodeTransaction)(A),L=new Uint8Array(w.default.sha256.array(F)),V=yield R.signMessage(F,D,T);return[L,new v.SignedTransaction({transaction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:V.signature})})]})}a.signTransaction=function I(...A){return p(this,void 0,void 0,function*(){if(A[0].constructor===v.Transaction){const[R,D,T,F]=A;return b(R,D,T,F)}{const[R,D,T,F,L,V,j]=A,Z=yield L.getPublicKey(V,j);return b((0,u.createTransaction)(V,Z,R,D,T,F),L,V,j)}})},a.signDelegateAction=function _({delegateAction:A,signer:R}){return p(this,void 0,void 0,function*(){const D=(0,v.encodeDelegateAction)(A),T=yield R.sign(D),F=new M.SignedDelegate({delegateAction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(w.default.sha256.array(D)),signedDelegateAction:F}})}},13904:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signature=void 0;const p=y(17527);class C extends p.Assignable{}a.Signature=C},52596:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=a.Near=void 0;var p=y(56557);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return p.Near}});var C=y(55193);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return C.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return C.WalletConnection}})},56557:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(v,g,b,I){return new(b||(b=Promise))(function(A,R){function D(L){try{F(I.next(L))}catch(V){R(V)}}function T(L){try{F(I.throw(L))}catch(V){R(V)}}function F(L){L.done?A(L.value):function _(A){return A instanceof b?A:new b(function(R){R(A)})}(L.value).then(D,T)}F((I=I.apply(v,g||[])).next())})},C=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(a,"__esModule",{value:!0}),a.Near=void 0;const w=y(11538),M=C(y(98538));a.Near=class u{constructor(g){var b;if(this.config=g,this.connection=w.Connection.fromConfig({networkId:g.networkId,provider:{type:"JsonRpcProvider",args:{url:g.nodeUrl,headers:g.headers}},signer:g.signer||{type:"InMemorySigner",keyStore:g.keyStore||(null===(b=g.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:g.jsvmAccountId||`jsvm.${g.networkId}`}),g.masterAccount){const I=g.initialBalance?new M.default(g.initialBalance):new M.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,g.masterAccount),I)}else g.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,g.helperUrl):this.accountCreator=null}account(g){return p(this,void 0,void 0,function*(){return new w.Account(this.connection,g)})}createAccount(g,b){return p(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(g,b),new w.Account(this.connection,g)})}}},55193:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(T,F,L,V){return new(L||(L=Promise))(function(Z,Y){function G(Q){try{X(V.next(Q))}catch(z){Y(z)}}function q(Q){try{X(V.throw(Q))}catch(z){Y(z)}}function X(Q){Q.done?Z(Q.value):function j(Z){return Z instanceof L?Z:new L(function(Y){Y(Z)})}(Q.value).then(G,q)}X((V=V.apply(T,F||[])).next())})},C=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(a,"__esModule",{value:!0}),a.ConnectedWalletAccount=a.WalletConnection=void 0;const w=y(11538),M=y(55911),u=y(30448),v=C(y(98538)),g=y(21531),A="pending_key";a.WalletConnection=class R{constructor(F,L){if("string"!=typeof L)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(Z,Y)=>"isSignedIn"===Y?()=>!1:"getAccountId"===Y?()=>"":Z[Y]&&"function"==typeof Z[Y]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:Z[Y]});this._near=F;const V=L+"_wallet_auth_key",j=JSON.parse(window.localStorage.getItem(V));this._networkId=F.config.networkId,this._walletBaseUrl=F.config.walletUrl,L=L||F.config.contractName||"default",this._keyStore=F.connection.signer.keyStore,this._authData=j||{allKeys:[]},this._authDataKey=V,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return p(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:F,methodNames:L,successUrl:V,failureUrl:j}){return p(this,void 0,void 0,function*(){const Z=new URL(window.location.href),Y=new URL(this._walletBaseUrl+"/login/");if(Y.searchParams.set("success_url",V||Z.href),Y.searchParams.set("failure_url",j||Z.href),F){yield(yield this._near.account(F)).state(),Y.searchParams.set("contract_id",F);const q=M.KeyPair.fromRandom("ed25519");Y.searchParams.set("public_key",q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+q.getPublicKey(),q)}L&&L.forEach(G=>{Y.searchParams.append("methodNames",G)}),window.location.assign(Y.toString())})}requestSignTransactions({transactions:F,meta:L,callbackUrl:V}){return p(this,void 0,void 0,function*(){const j=new URL(window.location.href),Z=new URL("sign",this._walletBaseUrl);Z.searchParams.set("transactions",F.map(Y=>(0,g.serialize)(u.SCHEMA,Y)).map(Y=>Buffer.from(Y).toString("base64")).join(",")),Z.searchParams.set("callbackUrl",V||j.href),L&&Z.searchParams.set("meta",L),window.location.assign(Z.toString())})}_completeSignInWithAccessKey(){return p(this,void 0,void 0,function*(){const F=new URL(window.location.href),L=F.searchParams.get("public_key")||"",V=(F.searchParams.get("all_keys")||"").split(","),j=F.searchParams.get("account_id")||"";if(j){const Z={accountId:j,allKeys:V};window.localStorage.setItem(this._authDataKey,JSON.stringify(Z)),L&&(yield this._moveKeyFromTempToPermanent(j,L)),this._authData=Z}F.searchParams.delete("public_key"),F.searchParams.delete("all_keys"),F.searchParams.delete("account_id"),F.searchParams.delete("meta"),F.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,F.toString())})}_moveKeyFromTempToPermanent(F,L){return p(this,void 0,void 0,function*(){const V=yield this._keyStore.getKey(this._networkId,A+L);yield this._keyStore.setKey(this._networkId,F,V),yield this._keyStore.removeKey(this._networkId,A+L)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new D(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class D extends w.Account{constructor(F,L,V){super(L,V),this.walletConnection=F}signAndSendTransaction({receiverId:F,actions:L,walletMeta:V,walletCallbackUrl:j=window.location.href}){const Z=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const Y=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let G=yield this.accessKeyForTransaction(F,L,Y);if(!G)throw new Error(`Cannot find matching key for transaction sent to ${F}`);if(Y&&Y.toString()===G.public_key)try{return yield Z.signAndSendTransaction.call(this,{receiverId:F,actions:L})}catch(S){if("NotEnoughAllowance"!==S.type)throw S;G=yield this.accessKeyForTransaction(F,L)}const q=yield this.connection.provider.block({finality:"final"}),X=(0,g.baseDecode)(q.header.hash),Q=M.PublicKey.from(G.public_key),z=G.access_key.nonce.add(new v.default(1)),$=(0,u.createTransaction)(this.accountId,Q,F,z,L,X);return yield this.walletConnection.requestSignTransactions({transactions:[$],meta:V,callbackUrl:j}),new Promise((S,r)=>{setTimeout(()=>{r(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(F,L,V){return p(this,void 0,void 0,function*(){const{access_key:{permission:j}}=F;if("FullAccess"===j)return!0;if(j.FunctionCall){const{receiver_id:Z,method_names:Y}=j.FunctionCall;if(Z===this.accountId&&Y.includes("add_request_and_confirm"))return!0;if(Z===L){if(1!==V.length)return!1;const[{functionCall:G}]=V;return G&&(!G.deposit||"0"===G.deposit.toString())&&(0===Y.length||Y.includes(G.methodName))}}return!1})}accessKeyForTransaction(F,L,V){return p(this,void 0,void 0,function*(){const j=yield this.getAccessKeys();if(V){const Y=j.find(G=>G.public_key.toString()===V.toString());if(Y&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y}const Z=this.walletConnection._authData.allKeys;for(const Y of j)if(-1!==Z.indexOf(Y.public_key)&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y;return null})}}a.ConnectedWalletAccount=D},52602:(ne,a,y)=>{"use strict";var p=y(9028)("http-errors"),C=y(1106),w=y(31831),M=y(83894),u=y(77721);function v(F){return Number(String(F).charAt(0)+"00")}function R(F,L){var V=Object.getOwnPropertyDescriptor(F,"name");V&&V.configurable&&(V.value=L,Object.defineProperty(F,"name",V))}function T(F){return"Error"!==F.substr(-5)?F+"Error":F}ne.exports=function g(){for(var F,L,V=500,j={},Z=0;Z=600)&&p("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof V||!w[V]&&(V<400||V>=600))&&(V=500);var G=g[V]||g[v(V)];for(var q in F||(F=G?new G(L):new Error(L||w[V]),Error.captureStackTrace(F,g)),(!G||!(F instanceof G)||F.status!==V)&&(F.expose=V<500,F.status=F.statusCode=V),j)"status"!==q&&"statusCode"!==q&&(F[q]=j[q]);return F},ne.exports.HttpError=function b(){function F(){throw new TypeError("cannot construct abstract class")}return M(F,Error),F}(),ne.exports.isHttpError=function _(F){return function(V){return!(!V||"object"!=typeof V)&&(V instanceof F||V instanceof Error&&"boolean"==typeof V.expose&&"number"==typeof V.statusCode&&V.status===V.statusCode)}}(ne.exports.HttpError),function D(F,L,V){L.forEach(function(Z){var Y,G=u(w[Z]);switch(v(Z)){case 400:Y=function I(F,L,V){var j=T(L);function Z(Y){var G=Y??w[V],q=new Error(G);return Error.captureStackTrace(q,Z),C(q,Z.prototype),Object.defineProperty(q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),q}return M(Z,F),R(Z,j),Z.prototype.status=V,Z.prototype.statusCode=V,Z.prototype.expose=!0,Z}(V,G,Z);break;case 500:Y=function A(F,L,V){var j=T(L);function Z(Y){var G=Y??w[V],q=new Error(G);return Error.captureStackTrace(q,Z),C(q,Z.prototype),Object.defineProperty(q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),q}return M(Z,F),R(Z,j),Z.prototype.status=V,Z.prototype.statusCode=V,Z.prototype.expose=!1,Z}(V,G,Z)}Y&&(F[Z]=Y,F[G]=Y)}),F["I'mateapot"]=p.function(F.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,w.codes,ne.exports.HttpError)},9028:ne=>{"use strict";function y(C,w){if("function"!=typeof C)throw new TypeError("argument fn must be a function");return C}function p(C,w,M){if(!C||"object"!=typeof C&&"function"!=typeof C)throw new TypeError("argument obj must be object");var u=Object.getOwnPropertyDescriptor(C,w);if(!u)throw new TypeError("must call property on owner object");if(!u.configurable)throw new TypeError("property must be configurable")}ne.exports=function a(C){if(!C)throw new TypeError("argument namespace is required");function w(M){}return w._file=void 0,w._ignored=!0,w._namespace=C,w._traced=!1,w._warned=Object.create(null),w.function=y,w.property=p,w}},60144:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Account=void 0;var p=y(11538);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return p.Account}})},30115:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=void 0;var p=y(11538);Object.defineProperty(a,"AccountCreator",{enumerable:!0,get:function(){return p.AccountCreator}}),Object.defineProperty(a,"LocalAccountCreator",{enumerable:!0,get:function(){return p.LocalAccountCreator}}),Object.defineProperty(a,"UrlAccountCreator",{enumerable:!0,get:function(){return p.UrlAccountCreator}})},32164:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=a.AccountMultisig=a.Account2FA=void 0;var p=y(11538);Object.defineProperty(a,"Account2FA",{enumerable:!0,get:function(){return p.Account2FA}}),Object.defineProperty(a,"AccountMultisig",{enumerable:!0,get:function(){return p.AccountMultisig}}),Object.defineProperty(a,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return p.MULTISIG_STORAGE_KEY}}),Object.defineProperty(a,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return p.MULTISIG_ALLOWANCE}}),Object.defineProperty(a,"MULTISIG_GAS",{enumerable:!0,get:function(){return p.MULTISIG_GAS}}),Object.defineProperty(a,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return p.MULTISIG_DEPOSIT}}),Object.defineProperty(a,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(a,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(a,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return p.MultisigDeleteRequestRejectionError}}),Object.defineProperty(a,"MultisigStateStatus",{enumerable:!0,get:function(){return p.MultisigStateStatus}})},76207:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(M,u,v,g){return new(v||(v=Promise))(function(I,_){function A(T){try{D(g.next(T))}catch(F){_(F)}}function R(T){try{D(g.throw(T))}catch(F){_(F)}}function D(T){T.done?I(T.value):function b(I){return I instanceof v?I:new v(function(_){_(I)})}(T.value).then(A,R)}D((g=g.apply(M,u||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.connect=void 0;const C=y(33906);a.connect=function w(M){return p(this,void 0,void 0,function*(){return new C.Near(M)})}},8597:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(u,v,g,b){void 0===b&&(b=g);var I=Object.getOwnPropertyDescriptor(v,g);(!I||("get"in I?!v.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return v[g]}}),Object.defineProperty(u,b,I)}:function(u,v,g,b){void 0===b&&(b=g),u[b]=v[g]}),C=this&&this.__setModuleDefault||(Object.create?function(u,v){Object.defineProperty(u,"default",{enumerable:!0,value:v})}:function(u,v){u.default=v}),w=this&&this.__importStar||function(u){if(u&&u.__esModule)return u;var v={};if(null!=u)for(var g in u)"default"!==g&&Object.prototype.hasOwnProperty.call(u,g)&&p(v,u,g);return C(v,u),v},M=this&&this.__exportStar||function(u,v){for(var g in u)"default"!==g&&!Object.prototype.hasOwnProperty.call(v,g)&&p(v,u,g)};Object.defineProperty(a,"__esModule",{value:!0}),a.keyStores=void 0,a.keyStores=w(y(46015)),M(y(29424),a),M(y(76207),a),y(4073)},29424:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(V,j,Z,Y){void 0===Y&&(Y=Z);var G=Object.getOwnPropertyDescriptor(j,Z);(!G||("get"in G?!j.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return j[Z]}}),Object.defineProperty(V,Y,G)}:function(V,j,Z,Y){void 0===Y&&(Y=Z),V[Y]=j[Z]}),C=this&&this.__setModuleDefault||(Object.create?function(V,j){Object.defineProperty(V,"default",{enumerable:!0,value:j})}:function(V,j){V.default=j}),w=this&&this.__importStar||function(V){if(V&&V.__esModule)return V;var j={};if(null!=V)for(var Z in V)"default"!==Z&&Object.prototype.hasOwnProperty.call(V,Z)&&p(j,V,Z);return C(j,V),j};Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=a.Near=a.KeyPair=a.Signer=a.InMemorySigner=a.Contract=a.Connection=a.Account=a.multisig=a.validators=a.transactions=a.utils=a.providers=a.accountCreator=void 0;const M=w(y(87974));a.providers=M;const u=w(y(75141));a.utils=u;const v=w(y(41468));a.transactions=v;const g=w(y(90744));a.validators=g;const b=y(60144);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return b.Account}});const I=w(y(32164));a.multisig=I;const _=w(y(30115));a.accountCreator=_;const A=y(60177);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return A.Connection}});const R=y(96519);Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return R.Signer}}),Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return R.InMemorySigner}});const D=y(20866);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return D.Contract}});const T=y(93633);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const F=y(33906);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return F.Near}});const L=y(85091);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return L.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return L.WalletConnection}})},60177:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Connection=void 0;var p=y(11538);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return p.Connection}})},20866:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=void 0;var p=y(11538);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return p.Contract}})},46015:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=a.BrowserLocalStorageKeyStore=a.InMemoryKeyStore=a.KeyStore=void 0;const p=y(60987);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const C=y(21473);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return C.InMemoryKeyStore}});const w=y(94974);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const M=y(26523);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},94974:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;var p=y(82540);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},21473:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.InMemoryKeyStore=void 0;var p=y(90793);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}})},60987:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyStore=void 0;var p=y(90793);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}})},26523:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=void 0;var p=y(90793);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return p.MergeKeyStore}})},33906:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Near=void 0;var p=y(52596);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return p.Near}})},87974:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorContext=a.TypedError=a.getTransactionLastResult=a.FinalExecutionStatusBasic=a.JsonRpcProvider=a.Provider=void 0;const p=y(71308);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return p.Provider}}),Object.defineProperty(a,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}}),Object.defineProperty(a,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return p.FinalExecutionStatusBasic}});const C=y(21355);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return C.TypedError}}),Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return C.ErrorContext}})},21355:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.JsonRpcProvider=a.TypedError=a.ErrorContext=void 0;var p=y(17527);Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return p.ErrorContext}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return p.TypedError}});var C=y(1739);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}})},71308:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FinalExecutionStatusBasic=a.ExecutionStatusBasic=a.IdType=a.Provider=a.getTransactionLastResult=void 0;var p=y(41166);Object.defineProperty(a,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}});var C=y(1739);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return C.Provider}});var w=y(17527);Object.defineProperty(a,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(a,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(a,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},96519:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=a.InMemorySigner=void 0;var p=y(25035);Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}}),Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return p.Signer}})},41468:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.transfer=a.stake=a.functionCallAccessKey=a.functionCall=a.fullAccessKey=a.deployContract=a.deleteKey=a.deleteAccount=a.createAccount=a.addKey=a.encodeDelegateAction=a.encodeSignedDelegate=a.Transaction=a.SignedTransaction=a.Signature=a.signTransaction=a.createTransaction=a.SCHEMA=a.Transfer=a.Stake=a.FunctionCallPermission=a.FunctionCall=a.FullAccessPermission=a.DeployContract=a.DeleteKey=a.DeleteAccount=a.CreateAccount=a.AddKey=a.AccessKeyPermission=a.AccessKey=a.Action=a.stringifyJsonOrBytes=void 0;var p=y(30448);Object.defineProperty(a,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return p.stringifyJsonOrBytes}}),Object.defineProperty(a,"Action",{enumerable:!0,get:function(){return p.Action}}),Object.defineProperty(a,"AccessKey",{enumerable:!0,get:function(){return p.AccessKey}}),Object.defineProperty(a,"AccessKeyPermission",{enumerable:!0,get:function(){return p.AccessKeyPermission}}),Object.defineProperty(a,"AddKey",{enumerable:!0,get:function(){return p.AddKey}}),Object.defineProperty(a,"CreateAccount",{enumerable:!0,get:function(){return p.CreateAccount}}),Object.defineProperty(a,"DeleteAccount",{enumerable:!0,get:function(){return p.DeleteAccount}}),Object.defineProperty(a,"DeleteKey",{enumerable:!0,get:function(){return p.DeleteKey}}),Object.defineProperty(a,"DeployContract",{enumerable:!0,get:function(){return p.DeployContract}}),Object.defineProperty(a,"FullAccessPermission",{enumerable:!0,get:function(){return p.FullAccessPermission}}),Object.defineProperty(a,"FunctionCall",{enumerable:!0,get:function(){return p.FunctionCall}}),Object.defineProperty(a,"FunctionCallPermission",{enumerable:!0,get:function(){return p.FunctionCallPermission}}),Object.defineProperty(a,"Stake",{enumerable:!0,get:function(){return p.Stake}}),Object.defineProperty(a,"Transfer",{enumerable:!0,get:function(){return p.Transfer}}),Object.defineProperty(a,"SCHEMA",{enumerable:!0,get:function(){return p.SCHEMA}}),Object.defineProperty(a,"createTransaction",{enumerable:!0,get:function(){return p.createTransaction}}),Object.defineProperty(a,"signTransaction",{enumerable:!0,get:function(){return p.signTransaction}}),Object.defineProperty(a,"Signature",{enumerable:!0,get:function(){return p.Signature}}),Object.defineProperty(a,"SignedTransaction",{enumerable:!0,get:function(){return p.SignedTransaction}}),Object.defineProperty(a,"Transaction",{enumerable:!0,get:function(){return p.Transaction}}),Object.defineProperty(a,"encodeSignedDelegate",{enumerable:!0,get:function(){return p.encodeSignedDelegate}}),Object.defineProperty(a,"encodeDelegateAction",{enumerable:!0,get:function(){return p.encodeDelegateAction}});const C=y(30448);a.addKey=(D,T)=>C.actionCreators.addKey(D,T);a.createAccount=()=>C.actionCreators.createAccount();a.deleteAccount=D=>C.actionCreators.deleteAccount(D);a.deleteKey=D=>C.actionCreators.deleteKey(D);a.deployContract=D=>C.actionCreators.deployContract(D);a.fullAccessKey=()=>C.actionCreators.fullAccessKey();a.functionCall=(D,T,F,L,V,j)=>C.actionCreators.functionCall(D,T,F,L,V,j);a.functionCallAccessKey=(D,T,F)=>C.actionCreators.functionCallAccessKey(D,T,F);a.stake=(D,T)=>C.actionCreators.stake(D,T);a.transfer=D=>C.actionCreators.transfer(D)},64179:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Enum=a.Assignable=void 0;var p=y(17527);Object.defineProperty(a,"Assignable",{enumerable:!0,get:function(){return p.Assignable}});a.Enum=class C{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(u=>{this[u]=M[u],this.enum=u})}}},342:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.logWarning=a.TypedError=a.PositionalArgsError=a.ErrorContext=a.ArgumentTypeError=a.UnsupportedSerializationError=a.UnknownArgumentError=a.ConflictingOptions=a.ArgumentSchemaError=void 0;var p=y(11538);Object.defineProperty(a,"ArgumentSchemaError",{enumerable:!0,get:function(){return p.ArgumentSchemaError}}),Object.defineProperty(a,"ConflictingOptions",{enumerable:!0,get:function(){return p.ConflictingOptions}}),Object.defineProperty(a,"UnknownArgumentError",{enumerable:!0,get:function(){return p.UnknownArgumentError}}),Object.defineProperty(a,"UnsupportedSerializationError",{enumerable:!0,get:function(){return p.UnsupportedSerializationError}});var C=y(17527);Object.defineProperty(a,"ArgumentTypeError",{enumerable:!0,get:function(){return C.ArgumentTypeError}}),Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return C.ErrorContext}}),Object.defineProperty(a,"PositionalArgsError",{enumerable:!0,get:function(){return C.PositionalArgsError}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return C.TypedError}});var w=y(41166);Object.defineProperty(a,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},76185:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.parseNearAmount=a.formatNearAmount=a.NEAR_NOMINATION_EXP=a.NEAR_NOMINATION=void 0;var p=y(41166);Object.defineProperty(a,"NEAR_NOMINATION",{enumerable:!0,get:function(){return p.NEAR_NOMINATION}}),Object.defineProperty(a,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return p.NEAR_NOMINATION_EXP}}),Object.defineProperty(a,"formatNearAmount",{enumerable:!0,get:function(){return p.formatNearAmount}}),Object.defineProperty(a,"parseNearAmount",{enumerable:!0,get:function(){return p.parseNearAmount}})},75141:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(R,D,T,F){void 0===F&&(F=T);var L=Object.getOwnPropertyDescriptor(D,T);(!L||("get"in L?!D.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return D[T]}}),Object.defineProperty(R,F,L)}:function(R,D,T,F){void 0===F&&(F=T),R[F]=D[T]}),C=this&&this.__setModuleDefault||(Object.create?function(R,D){Object.defineProperty(R,"default",{enumerable:!0,value:D})}:function(R,D){R.default=D}),w=this&&this.__importStar||function(R){if(R&&R.__esModule)return R;var D={};if(null!=R)for(var T in R)"default"!==T&&Object.prototype.hasOwnProperty.call(R,T)&&p(D,R,T);return C(D,R),D};Object.defineProperty(a,"__esModule",{value:!0}),a.logWarning=a.rpc_errors=a.KeyPairEd25519=a.KeyPair=a.PublicKey=a.format=a.enums=a.web=a.serialize=a.key_pair=void 0;const M=w(y(93633));a.key_pair=M;const u=w(y(55822));a.serialize=u;const v=w(y(63770));a.web=v;const g=w(y(64179));a.enums=g;const b=w(y(76185));a.format=b;const I=w(y(1158));a.rpc_errors=I;const _=y(93633);Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}}),Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}}),Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return _.KeyPairEd25519}});const A=y(342);Object.defineProperty(a,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},93633:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=a.KeyType=a.KeyPairEd25519=a.KeyPair=void 0;var p=y(55911);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}}),Object.defineProperty(a,"KeyType",{enumerable:!0,get:function(){return p.KeyType}}),Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}})},1158:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ServerError=a.getErrorTypeFromErrorMessage=a.formatError=a.parseResultError=a.parseRpcError=void 0;var p=y(41166);Object.defineProperty(a,"parseRpcError",{enumerable:!0,get:function(){return p.parseRpcError}}),Object.defineProperty(a,"parseResultError",{enumerable:!0,get:function(){return p.parseResultError}}),Object.defineProperty(a,"formatError",{enumerable:!0,get:function(){return p.formatError}}),Object.defineProperty(a,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return p.getErrorTypeFromErrorMessage}}),Object.defineProperty(a,"ServerError",{enumerable:!0,get:function(){return p.ServerError}})},55822:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BinaryReader=a.BinaryWriter=a.BorshError=a.deserialize=a.serialize=a.base_decode=a.base_encode=void 0;var p=y(21531);Object.defineProperty(a,"base_encode",{enumerable:!0,get:function(){return p.baseEncode}}),Object.defineProperty(a,"base_decode",{enumerable:!0,get:function(){return p.baseDecode}}),Object.defineProperty(a,"serialize",{enumerable:!0,get:function(){return p.serialize}}),Object.defineProperty(a,"deserialize",{enumerable:!0,get:function(){return p.deserialize}}),Object.defineProperty(a,"BorshError",{enumerable:!0,get:function(){return p.BorshError}}),Object.defineProperty(a,"BinaryWriter",{enumerable:!0,get:function(){return p.BinaryWriter}}),Object.defineProperty(a,"BinaryReader",{enumerable:!0,get:function(){return p.BinaryReader}})},63770:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fetchJson=void 0;var p=y(1739);Object.defineProperty(a,"fetchJson",{enumerable:!0,get:function(){return p.fetchJson}})},90744:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.findSeatPrice=a.diffEpochValidators=void 0;var p=y(41166);Object.defineProperty(a,"diffEpochValidators",{enumerable:!0,get:function(){return p.diffEpochValidators}}),Object.defineProperty(a,"findSeatPrice",{enumerable:!0,get:function(){return p.findSeatPrice}})},85091:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=void 0;var p=y(52596);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return p.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return p.WalletConnection}})},31831:(ne,a,y)=>{"use strict";var p=y(31008);function w(M){if("number"==typeof M){if(!w[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var u=parseInt(M,10);if(!isNaN(u)){if(!w[u])throw new Error("invalid status code: "+u);return u}if(!(u=w[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return u}ne.exports=w,w.STATUS_CODES=p,w.codes=function C(M,u){var v=[];return Object.keys(u).forEach(function(b){var I=u[b],_=Number(b);M[_]=I,M[I]=_,M[I.toLowerCase()]=_,v.push(_)}),v}(w,p),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},54502:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(8046);function v(E,k,B){return void 0===k&&(k=new Uint8Array(2)),void 0===B&&(B=0),k[B+0]=E>>>8,k[B+1]=E>>>0,k}function g(E,k,B){return void 0===k&&(k=new Uint8Array(2)),void 0===B&&(B=0),k[B+0]=E>>>0,k[B+1]=E>>>8,k}function b(E,k){return void 0===k&&(k=0),E[k]<<24|E[k+1]<<16|E[k+2]<<8|E[k+3]}function I(E,k){return void 0===k&&(k=0),(E[k]<<24|E[k+1]<<16|E[k+2]<<8|E[k+3])>>>0}function _(E,k){return void 0===k&&(k=0),E[k+3]<<24|E[k+2]<<16|E[k+1]<<8|E[k]}function A(E,k){return void 0===k&&(k=0),(E[k+3]<<24|E[k+2]<<16|E[k+1]<<8|E[k])>>>0}function R(E,k,B){return void 0===k&&(k=new Uint8Array(4)),void 0===B&&(B=0),k[B+0]=E>>>24,k[B+1]=E>>>16,k[B+2]=E>>>8,k[B+3]=E>>>0,k}function D(E,k,B){return void 0===k&&(k=new Uint8Array(4)),void 0===B&&(B=0),k[B+0]=E>>>0,k[B+1]=E>>>8,k[B+2]=E>>>16,k[B+3]=E>>>24,k}function j(E,k,B){return void 0===k&&(k=new Uint8Array(8)),void 0===B&&(B=0),R(E/4294967296>>>0,k,B),R(E>>>0,k,B+4),k}function Z(E,k,B){return void 0===k&&(k=new Uint8Array(8)),void 0===B&&(B=0),D(E>>>0,k,B),D(E/4294967296>>>0,k,B+4),k}a.readInt16BE=function C(E,k){return void 0===k&&(k=0),(E[k+0]<<8|E[k+1])<<16>>16},a.readUint16BE=function w(E,k){return void 0===k&&(k=0),(E[k+0]<<8|E[k+1])>>>0},a.readInt16LE=function M(E,k){return void 0===k&&(k=0),(E[k+1]<<8|E[k])<<16>>16},a.readUint16LE=function u(E,k){return void 0===k&&(k=0),(E[k+1]<<8|E[k])>>>0},a.writeUint16BE=v,a.writeInt16BE=v,a.writeUint16LE=g,a.writeInt16LE=g,a.readInt32BE=b,a.readUint32BE=I,a.readInt32LE=_,a.readUint32LE=A,a.writeUint32BE=R,a.writeInt32BE=R,a.writeUint32LE=D,a.writeInt32LE=D,a.readInt64BE=function T(E,k){void 0===k&&(k=0);var B=b(E,k),x=b(E,k+4);return 4294967296*B+x-4294967296*(x>>31)},a.readUint64BE=function F(E,k){return void 0===k&&(k=0),4294967296*I(E,k)+I(E,k+4)},a.readInt64LE=function L(E,k){void 0===k&&(k=0);var B=_(E,k);return 4294967296*_(E,k+4)+B-4294967296*(B>>31)},a.readUint64LE=function V(E,k){void 0===k&&(k=0);var B=A(E,k);return 4294967296*A(E,k+4)+B},a.writeUint64BE=j,a.writeInt64BE=j,a.writeUint64LE=Z,a.writeInt64LE=Z,a.readUintBE=function Y(E,k,B){if(void 0===B&&(B=0),E%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(E/8>k.length-B)throw new Error("readUintBE: array is too short for the given bitLength");for(var x=0,f=1,P=E/8+B-1;P>=B;P--)x+=k[P]*f,f*=256;return x},a.readUintLE=function G(E,k,B){if(void 0===B&&(B=0),E%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(E/8>k.length-B)throw new Error("readUintLE: array is too short for the given bitLength");for(var x=0,f=1,P=B;P=x;P--)B[P]=k/f&255,f*=256;return B},a.writeUintLE=function X(E,k,B,x){if(void 0===B&&(B=new Uint8Array(E/8)),void 0===x&&(x=0),E%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!p.isSafeInteger(k))throw new Error("writeUintLE value must be an integer");for(var f=1,P=x;P{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(54502),C=y(69815),w=20;function M(b,I,_){for(var A=1634760805,R=857760878,D=2036477234,T=1797285236,F=_[3]<<24|_[2]<<16|_[1]<<8|_[0],L=_[7]<<24|_[6]<<16|_[5]<<8|_[4],V=_[11]<<24|_[10]<<16|_[9]<<8|_[8],j=_[15]<<24|_[14]<<16|_[13]<<8|_[12],Z=_[19]<<24|_[18]<<16|_[17]<<8|_[16],Y=_[23]<<24|_[22]<<16|_[21]<<8|_[20],G=_[27]<<24|_[26]<<16|_[25]<<8|_[24],q=_[31]<<24|_[30]<<16|_[29]<<8|_[28],X=I[3]<<24|I[2]<<16|I[1]<<8|I[0],Q=I[7]<<24|I[6]<<16|I[5]<<8|I[4],z=I[11]<<24|I[10]<<16|I[9]<<8|I[8],$=I[15]<<24|I[14]<<16|I[13]<<8|I[12],S=A,r=R,s=D,d=T,h=F,E=L,k=V,B=j,x=Z,f=Y,P=G,se=q,te=X,ie=Q,de=z,Ce=$,ye=0;ye>>16|te<<16)|0)>>>20|h<<12,E=(E^=f=f+(ie=(ie^=r=r+E|0)>>>16|ie<<16)|0)>>>20|E<<12,k=(k^=P=P+(de=(de^=s=s+k|0)>>>16|de<<16)|0)>>>20|k<<12,B=(B^=se=se+(Ce=(Ce^=d=d+B|0)>>>16|Ce<<16)|0)>>>20|B<<12,k=(k^=P=P+(de=(de^=s=s+k|0)>>>24|de<<8)|0)>>>25|k<<7,B=(B^=se=se+(Ce=(Ce^=d=d+B|0)>>>24|Ce<<8)|0)>>>25|B<<7,E=(E^=f=f+(ie=(ie^=r=r+E|0)>>>24|ie<<8)|0)>>>25|E<<7,h=(h^=x=x+(te=(te^=S=S+h|0)>>>24|te<<8)|0)>>>25|h<<7,E=(E^=P=P+(Ce=(Ce^=S=S+E|0)>>>16|Ce<<16)|0)>>>20|E<<12,k=(k^=se=se+(te=(te^=r=r+k|0)>>>16|te<<16)|0)>>>20|k<<12,B=(B^=x=x+(ie=(ie^=s=s+B|0)>>>16|ie<<16)|0)>>>20|B<<12,h=(h^=f=f+(de=(de^=d=d+h|0)>>>16|de<<16)|0)>>>20|h<<12,B=(B^=x=x+(ie=(ie^=s=s+B|0)>>>24|ie<<8)|0)>>>25|B<<7,h=(h^=f=f+(de=(de^=d=d+h|0)>>>24|de<<8)|0)>>>25|h<<7,k=(k^=se=se+(te=(te^=r=r+k|0)>>>24|te<<8)|0)>>>25|k<<7,E=(E^=P=P+(Ce=(Ce^=S=S+E|0)>>>24|Ce<<8)|0)>>>25|E<<7;p.writeUint32LE(S+A|0,b,0),p.writeUint32LE(r+R|0,b,4),p.writeUint32LE(s+D|0,b,8),p.writeUint32LE(d+T|0,b,12),p.writeUint32LE(h+F|0,b,16),p.writeUint32LE(E+L|0,b,20),p.writeUint32LE(k+V|0,b,24),p.writeUint32LE(B+j|0,b,28),p.writeUint32LE(x+Z|0,b,32),p.writeUint32LE(f+Y|0,b,36),p.writeUint32LE(P+G|0,b,40),p.writeUint32LE(se+q|0,b,44),p.writeUint32LE(te+X|0,b,48),p.writeUint32LE(ie+Q|0,b,52),p.writeUint32LE(de+z|0,b,56),p.writeUint32LE(Ce+$|0,b,60)}function u(b,I,_,A,R){if(void 0===R&&(R=0),32!==b.length)throw new Error("ChaCha: key size must be 32 bytes");if(A.length<_.length)throw new Error("ChaCha: destination is shorter than source");var D,T;if(0===R){if(8!==I.length&&12!==I.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");T=(D=new Uint8Array(16)).length-I.length,D.set(I,T)}else{if(16!==I.length)throw new Error("ChaCha nonce with counter must be 16 bytes");D=I,T=R}for(var F=new Uint8Array(64),L=0;L<_.length;L+=64){M(F,D,b);for(var V=L;V>>=8,I++;if(A>0)throw new Error("ChaCha: counter overflow")}a.streamXOR=u,a.stream=function v(b,I,_,A){return void 0===A&&(A=0),C.wipe(_),u(b,I,_,_,A)}},95876:(ne,a,y)=>{"use strict";var C=y(4484),w=y(60314),M=y(69815),u=y(54502),v=y(19976);a.Cv=32,a.WH=12,a.pg=16;var g=new Uint8Array(16),b=function(){function I(_){if(this.nonceLength=a.WH,this.tagLength=a.pg,_.length!==a.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(_)}return I.prototype.seal=function(_,A,R,D){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var T=new Uint8Array(16);T.set(_,T.length-_.length);var F=new Uint8Array(32);C.stream(this._key,T,F,4);var V,L=A.length+this.tagLength;if(D){if(D.length!==L)throw new Error("ChaCha20Poly1305: incorrect destination length");V=D}else V=new Uint8Array(L);return C.streamXOR(this._key,T,A,V,4),this._authenticate(V.subarray(V.length-this.tagLength,V.length),F,V.subarray(0,V.length-this.tagLength),R),M.wipe(T),V},I.prototype.open=function(_,A,R,D){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(A.length0&&T.update(g.subarray(D.length%16))),T.update(R),R.length%16>0&&T.update(g.subarray(R.length%16));var F=new Uint8Array(8);D&&u.writeUint64LE(D.length,F),T.update(F),u.writeUint64LE(R.length,F),T.update(F);for(var L=T.digest(),V=0;V{"use strict";function C(M,u){if(M.length!==u.length)return 0;for(var v=0,g=0;g>>8}Object.defineProperty(a,"__esModule",{value:!0}),a.select=function y(M,u,v){return~(M-1)&u|M-1&v},a.lessOrEqual=function p(M,u){return(0|M)-(0|u)-1>>>31&1},a.compare=C,a.equal=function w(M,u){return 0!==M.length&&0!==u.length&&0!==C(M,u)}},65553:(ne,a,y)=>{"use strict";var C=y(5784),w=y(86375),M=y(69815);function u(ve){var ae=new Float64Array(16);if(ve)for(var fe=0;fe>16&1),fe[Ee-1]&=65535;fe[15]=pe[15]-32767-(fe[14]>>16&1);var be=fe[15]>>16&1;fe[14]&=65535,L(pe,fe,1-be)}for(Ee=0;Ee<16;Ee++)ve[2*Ee]=255&pe[Ee],ve[2*Ee+1]=pe[Ee]>>8}function j(ve,ae){for(var fe=0,pe=0;pe<32;pe++)fe|=ve[pe]^ae[pe];return(1&fe-1>>>8)-1}function Z(ve,ae){var fe=new Uint8Array(32),pe=new Uint8Array(32);return V(fe,ve),V(pe,ae),j(fe,pe)}function Y(ve){var ae=new Uint8Array(32);return V(ae,ve),1&ae[0]}function q(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]+fe[pe]}function X(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]-fe[pe]}function Q(ve,ae,fe){var pe,Ee,ce=0,be=0,Ne=0,Fe=0,ct=0,Ze=0,Ve=0,Ut=0,$e=0,tt=0,Xt=0,ot=0,st=0,$t=0,Pe=0,Ae=0,xe=0,Be=0,ze=0,mt=0,Ye=0,ut=0,ln=0,ft=0,wt=0,mn=0,We=0,Qe=0,Qt=0,ht=0,gt=0,on=fe[0],dt=fe[1],pt=fe[2],yn=fe[3],lt=fe[4],vt=fe[5],En=fe[6],yt=fe[7],At=fe[8],Se=fe[9],we=fe[10],_e=fe[11],me=fe[12],De=fe[13],Ke=fe[14],it=fe[15];ce+=(pe=ae[0])*on,be+=pe*dt,Ne+=pe*pt,Fe+=pe*yn,ct+=pe*lt,Ze+=pe*vt,Ve+=pe*En,Ut+=pe*yt,$e+=pe*At,tt+=pe*Se,Xt+=pe*we,ot+=pe*_e,st+=pe*me,$t+=pe*De,Pe+=pe*Ke,Ae+=pe*it,be+=(pe=ae[1])*on,Ne+=pe*dt,Fe+=pe*pt,ct+=pe*yn,Ze+=pe*lt,Ve+=pe*vt,Ut+=pe*En,$e+=pe*yt,tt+=pe*At,Xt+=pe*Se,ot+=pe*we,st+=pe*_e,$t+=pe*me,Pe+=pe*De,Ae+=pe*Ke,xe+=pe*it,Ne+=(pe=ae[2])*on,Fe+=pe*dt,ct+=pe*pt,Ze+=pe*yn,Ve+=p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*_e,We+=pe*me,Qe+=pe*De,Qt+=pe*Ke,ht+=pe*it,Ae+=(pe=ae[15])*on,be+=38*(Be+=pe*pt),Ne+=38*(ze+=pe*yn),Fe+=38*(mt+=pe*lt),ct+=38*(Ye+=pe*vt),Ze+=38*(ut+=pe*En),Ve+=38*(ln+=pe*yt),Ut+=38*(ft+=pe*At),$e+=38*(wt+=pe*Se),tt+=38*(mn+=pe*we),Xt+=38*(We+=pe*_e),ot+=38*(Qe+=pe*me),st+=38*(Qt+=pe*De),$t+=38*(ht+=pe*Ke),Pe+=38*(gt+=pe*it),ce=(pe=(ce+=38*(xe+=pe*dt))+(Ee=1)+65535)-65536*(Ee=Math.floor(pe/65536)),be=(pe=be+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ne=(pe=Ne+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Fe=(pe=Fe+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ct=(pe=ct+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ze=(pe=Ze+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ve=(pe=Ve+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ut=(pe=Ut+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),$e=(pe=$e+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),tt=(pe=tt+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Xt=(pe=Xt+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ot=(pe=ot+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),st=(pe=st+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),$t=(pe=$t+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Pe=(pe=Pe+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ae=(pe=Ae+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ce=(pe=(ce+=Ee-1+37*(Ee-1))+(Ee=1)+65535)-65536*(Ee=Math.floor(pe/65536)),be=(pe=be+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ne=(pe=Ne+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Fe=(pe=Fe+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ct=(pe=ct+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ze=(pe=Ze+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ve=(pe=Ve+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ut=(pe=Ut+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),$e=(pe=$e+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),tt=(pe=tt+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Xt=(pe=Xt+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ot=(pe=ot+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),st=(pe=st+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),$t=(pe=$t+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Pe=(pe=Pe+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),Ae=(pe=Ae+Ee+65535)-65536*(Ee=Math.floor(pe/65536)),ce+=Ee-1+37*(Ee-1),ve[0]=ce,ve[1]=be,ve[2]=Ne,ve[3]=Fe,ve[4]=ct,ve[5]=Ze,ve[6]=Ve,ve[7]=Ut,ve[8]=$e,ve[9]=tt,ve[10]=Xt,ve[11]=ot,ve[12]=st,ve[13]=$t,ve[14]=Pe,ve[15]=Ae}function z(ve,ae){Q(ve,ae,ae)}function $(ve,ae){var pe,fe=u();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=253;pe>=0;pe--)z(fe,fe),2!==pe&&4!==pe&&Q(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}function r(ve,ae){var fe=u(),pe=u(),Ee=u(),ce=u(),be=u(),Ne=u(),Fe=u(),ct=u(),Ze=u();X(fe,ve[1],ve[0]),X(Ze,ae[1],ae[0]),Q(fe,fe,Ze),q(pe,ve[0],ve[1]),q(Ze,ae[0],ae[1]),Q(pe,pe,Ze),Q(Ee,ve[3],ae[3]),Q(Ee,Ee,_),Q(ce,ve[2],ae[2]),q(ce,ce,ce),X(be,pe,fe),X(Ne,ce,Ee),q(Fe,ce,Ee),q(ct,pe,fe),Q(ve[0],be,Ne),Q(ve[1],ct,Fe),Q(ve[2],Fe,Ne),Q(ve[3],be,ct)}function s(ve,ae,fe){for(var pe=0;pe<4;pe++)L(ve[pe],ae[pe],fe)}function d(ve,ae){var fe=u(),pe=u(),Ee=u();$(Ee,ae[2]),Q(fe,ae[0],Ee),Q(pe,ae[1],Ee),V(ve,pe),ve[31]^=Y(fe)<<7}function h(ve,ae,fe){T(ve[0],g),T(ve[1],b),T(ve[2],b),T(ve[3],g);for(var pe=255;pe>=0;--pe){var Ee=fe[pe/8|0]>>(7&pe)&1;s(ve,ae,Ee),r(ae,ve),r(ve,ve),s(ve,ae,Ee)}}function E(ve,ae){var fe=[u(),u(),u(),u()];T(fe[0],A),T(fe[1],R),T(fe[2],b),Q(fe[3],A,R),h(ve,fe,ae)}function k(ve){if(ve.length!==a.aP)throw new Error("ed25519: seed must be "+a.aP+" bytes");var ae=w.hash(ve);ae[0]&=248,ae[31]&=127,ae[31]|=64;var fe=new Uint8Array(32),pe=[u(),u(),u(),u()];E(pe,ae),d(fe,pe);var Ee=new Uint8Array(64);return Ee.set(ve),Ee.set(fe,32),{publicKey:fe,secretKey:Ee}}a._w=k;var f=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function P(ve,ae){var fe,pe,Ee,ce;for(pe=63;pe>=32;--pe){for(fe=0,Ee=pe-32,ce=pe-12;Ee>4)*f[Ee],fe=ae[Ee]>>8,ae[Ee]&=255;for(Ee=0;Ee<32;Ee++)ae[Ee]-=fe*f[Ee];for(pe=0;pe<32;pe++)ae[pe+1]+=ae[pe]>>8,ve[pe]=255&ae[pe]}function se(ve){for(var ae=new Float64Array(64),fe=0;fe<64;fe++)ae[fe]=ve[fe];for(fe=0;fe<64;fe++)ve[fe]=0;P(ve,ae)}function ie(ve,ae){var fe=u(),pe=u(),Ee=u(),ce=u(),be=u(),Ne=u(),Fe=u();return T(ve[2],b),function G(ve,ae){for(var fe=0;fe<16;fe++)ve[fe]=ae[2*fe]+(ae[2*fe+1]<<8);ve[15]&=32767}(ve[1],ae),z(Ee,ve[1]),Q(ce,Ee,I),X(Ee,Ee,ve[2]),q(ce,ve[2],ce),z(be,ce),z(Ne,be),Q(Fe,Ne,be),Q(fe,Fe,Ee),Q(fe,fe,ce),function S(ve,ae){var pe,fe=u();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=250;pe>=0;pe--)z(fe,fe),1!==pe&&Q(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}(fe,fe),Q(fe,fe,Ee),Q(fe,fe,ce),Q(fe,fe,ce),Q(ve[0],fe,ce),z(pe,ve[0]),Q(pe,pe,ce),Z(pe,Ee)&&Q(ve[0],ve[0],D),z(pe,ve[0]),Q(pe,pe,ce),Z(pe,Ee)?-1:(Y(ve[0])===ae[31]>>7&&X(ve[0],g,ve[0]),Q(ve[3],ve[0],ve[1]),0)}a.Xx=function te(ve,ae){var fe=new Float64Array(64),pe=[u(),u(),u(),u()],Ee=w.hash(ve.subarray(0,32));Ee[0]&=248,Ee[31]&=127,Ee[31]|=64;var ce=new Uint8Array(64);ce.set(Ee.subarray(32),32);var be=new w.SHA512;be.update(ce.subarray(32)),be.update(ae);var Ne=be.digest();be.clean(),se(Ne),E(pe,Ne),d(ce,pe),be.reset(),be.update(ce.subarray(0,32)),be.update(ve.subarray(32)),be.update(ae);var Fe=be.digest();se(Fe);for(var ct=0;ct<32;ct++)fe[ct]=Ne[ct];for(ct=0;ct<32;ct++)for(var Ze=0;Ze<32;Ze++)fe[ct+Ze]+=Fe[ct]*Ee[Ze];return P(ce.subarray(32),fe),ce}},35571:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isSerializableHash=function y(p){return typeof p.saveState<"u"&&typeof p.restoreState<"u"&&typeof p.cleanSavedState<"u"}},85705:(ne,a,y)=>{"use strict";var C=y(54193),w=y(69815),M=function(){function u(v,g,b,I){void 0===b&&(b=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=v,this._info=I;var _=C.hmac(this._hash,b,g);this._hmac=new C.HMAC(v,_),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return u.prototype._fillBuffer=function(){this._counter[0]++;var v=this._counter[0];if(0===v)throw new Error("hkdf: cannot expand more");this._hmac.reset(),v>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},u.prototype.expand=function(v){for(var g=new Uint8Array(v),b=0;b{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(35571),C=y(19976),w=y(69815),M=function(){function v(g,b){this._finished=!1,this._inner=new g,this._outer=new g,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var I=new Uint8Array(this.blockSize);b.length>this.blockSize?this._inner.update(b).finish(I).clean():I.set(b);for(var _=0;_{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.mul=Math.imul||function y(v,g){var I=65535&v,A=65535&g;return I*A+((v>>>16&65535)*A+I*(g>>>16&65535)<<16>>>0)|0},a.add=function p(v,g){return v+g|0},a.sub=function C(v,g){return v-g|0},a.rotl=function w(v,g){return v<>>32-g},a.rotr=function M(v,g){return v<<32-g|v>>>g},a.isInteger=Number.isInteger||function u(v){return"number"==typeof v&&isFinite(v)&&Math.floor(v)===v},a.MAX_SAFE_INTEGER=9007199254740991,a.isSafeInteger=function(v){return a.isInteger(v)&&v>=-a.MAX_SAFE_INTEGER&&v<=a.MAX_SAFE_INTEGER}},60314:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(19976),C=y(69815);a.DIGEST_LENGTH=16;var w=function(){function v(g){this.digestLength=a.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var b=g[0]|g[1]<<8;this._r[0]=8191&b;var I=g[2]|g[3]<<8;this._r[1]=8191&(b>>>13|I<<3);var _=g[4]|g[5]<<8;this._r[2]=7939&(I>>>10|_<<6);var A=g[6]|g[7]<<8;this._r[3]=8191&(_>>>7|A<<9);var R=g[8]|g[9]<<8;this._r[4]=255&(A>>>4|R<<12),this._r[5]=R>>>1&8190;var D=g[10]|g[11]<<8;this._r[6]=8191&(R>>>14|D<<2);var T=g[12]|g[13]<<8;this._r[7]=8065&(D>>>11|T<<5);var F=g[14]|g[15]<<8;this._r[8]=8191&(T>>>8|F<<8),this._r[9]=F>>>5&127,this._pad[0]=g[16]|g[17]<<8,this._pad[1]=g[18]|g[19]<<8,this._pad[2]=g[20]|g[21]<<8,this._pad[3]=g[22]|g[23]<<8,this._pad[4]=g[24]|g[25]<<8,this._pad[5]=g[26]|g[27]<<8,this._pad[6]=g[28]|g[29]<<8,this._pad[7]=g[30]|g[31]<<8}return v.prototype._blocks=function(g,b,I){for(var _=this._fin?0:2048,A=this._h[0],R=this._h[1],D=this._h[2],T=this._h[3],F=this._h[4],L=this._h[5],V=this._h[6],j=this._h[7],Z=this._h[8],Y=this._h[9],G=this._r[0],q=this._r[1],X=this._r[2],Q=this._r[3],z=this._r[4],$=this._r[5],S=this._r[6],r=this._r[7],s=this._r[8],d=this._r[9];I>=16;){var h=g[b+0]|g[b+1]<<8;A+=8191&h;var E=g[b+2]|g[b+3]<<8;R+=8191&(h>>>13|E<<3);var k=g[b+4]|g[b+5]<<8;D+=8191&(E>>>10|k<<6);var B=g[b+6]|g[b+7]<<8;T+=8191&(k>>>7|B<<9);var x=g[b+8]|g[b+9]<<8;F+=8191&(B>>>4|x<<12),L+=x>>>1&8191;var f=g[b+10]|g[b+11]<<8;V+=8191&(x>>>14|f<<2);var P=g[b+12]|g[b+13]<<8;j+=8191&(f>>>11|P<<5);var se=g[b+14]|g[b+15]<<8,te=0,ie=te;ie+=A*G,ie+=R*(5*d),ie+=D*(5*s),ie+=T*(5*r),te=(ie+=F*(5*S))>>>13,ie&=8191,ie+=L*(5*$),ie+=V*(5*z),ie+=j*(5*Q),ie+=(Z+=8191&(P>>>8|se<<8))*(5*X);var de=te+=(ie+=(Y+=se>>>5|_)*(5*q))>>>13;de+=A*q,de+=R*G,de+=D*(5*d),de+=T*(5*s),te=(de+=F*(5*r))>>>13,de&=8191,de+=L*(5*S),de+=V*(5*$),de+=j*(5*z),de+=Z*(5*Q),te+=(de+=Y*(5*X))>>>13,de&=8191;var Ce=te;Ce+=A*X,Ce+=R*q,Ce+=D*G,Ce+=T*(5*d),te=(Ce+=F*(5*s))>>>13,Ce&=8191,Ce+=L*(5*r),Ce+=V*(5*S),Ce+=j*(5*$),Ce+=Z*(5*z);var ye=te+=(Ce+=Y*(5*Q))>>>13;ye+=A*Q,ye+=R*X,ye+=D*q,ye+=T*G,te=(ye+=F*(5*d))>>>13,ye&=8191,ye+=L*(5*s),ye+=V*(5*r),ye+=j*(5*S),ye+=Z*(5*$);var ve=te+=(ye+=Y*(5*z))>>>13;ve+=A*z,ve+=R*Q,ve+=D*X,ve+=T*q,te=(ve+=F*G)>>>13,ve&=8191,ve+=L*(5*d),ve+=V*(5*s),ve+=j*(5*r),ve+=Z*(5*S);var ae=te+=(ve+=Y*(5*$))>>>13;ae+=A*$,ae+=R*z,ae+=D*Q,ae+=T*X,te=(ae+=F*q)>>>13,ae&=8191,ae+=L*G,ae+=V*(5*d),ae+=j*(5*s),ae+=Z*(5*r);var fe=te+=(ae+=Y*(5*S))>>>13;fe+=A*S,fe+=R*$,fe+=D*z,fe+=T*Q,te=(fe+=F*X)>>>13,fe&=8191,fe+=L*q,fe+=V*G,fe+=j*(5*d),fe+=Z*(5*s);var pe=te+=(fe+=Y*(5*r))>>>13;pe+=A*r,pe+=R*S,pe+=D*$,pe+=T*z,te=(pe+=F*Q)>>>13,pe&=8191,pe+=L*X,pe+=V*q,pe+=j*G,pe+=Z*(5*d);var Ee=te+=(pe+=Y*(5*s))>>>13;Ee+=A*s,Ee+=R*r,Ee+=D*S,Ee+=T*$,te=(Ee+=F*z)>>>13,Ee&=8191,Ee+=L*Q,Ee+=V*X,Ee+=j*q,Ee+=Z*G;var ce=te+=(Ee+=Y*(5*d))>>>13;ce+=A*d,ce+=R*s,ce+=D*r,ce+=T*S,te=(ce+=F*$)>>>13,ce&=8191,ce+=L*z,ce+=V*Q,ce+=j*X,ce+=Z*q,A=ie=8191&(te=(te=((te+=(ce+=Y*G)>>>13)<<2)+te|0)+(ie&=8191)|0),R=de+=te>>>=13,D=Ce&=8191,T=ye&=8191,F=ve&=8191,L=ae&=8191,V=fe&=8191,j=pe&=8191,Z=Ee&=8191,Y=ce&=8191,b+=16,I-=16}this._h[0]=A,this._h[1]=R,this._h[2]=D,this._h[3]=T,this._h[4]=F,this._h[5]=L,this._h[6]=V,this._h[7]=j,this._h[8]=Z,this._h[9]=Y},v.prototype.finish=function(g,b){void 0===b&&(b=0);var _,A,R,D,I=new Uint16Array(10);if(this._leftover){for(D=this._leftover,this._buffer[D++]=1;D<16;D++)this._buffer[D]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(_=this._h[1]>>>13,this._h[1]&=8191,D=2;D<10;D++)this._h[D]+=_,_=this._h[D]>>>13,this._h[D]&=8191;for(this._h[0]+=5*_,_=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=_,_=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=_,I[0]=this._h[0]+5,_=I[0]>>>13,I[0]&=8191,D=1;D<10;D++)I[D]=this._h[D]+_,_=I[D]>>>13,I[D]&=8191;for(I[9]-=8192,A=(1^_)-1,D=0;D<10;D++)I[D]&=A;for(A=~A,D=0;D<10;D++)this._h[D]=this._h[D]&A|I[D];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),R=this._h[0]+this._pad[0],this._h[0]=65535&R,D=1;D<8;D++)R=(this._h[D]+this._pad[D]|0)+(R>>>16)|0,this._h[D]=65535&R;return g[b+0]=this._h[0]>>>0,g[b+1]=this._h[0]>>>8,g[b+2]=this._h[1]>>>0,g[b+3]=this._h[1]>>>8,g[b+4]=this._h[2]>>>0,g[b+5]=this._h[2]>>>8,g[b+6]=this._h[3]>>>0,g[b+7]=this._h[3]>>>8,g[b+8]=this._h[4]>>>0,g[b+9]=this._h[4]>>>8,g[b+10]=this._h[5]>>>0,g[b+11]=this._h[5]>>>8,g[b+12]=this._h[6]>>>0,g[b+13]=this._h[6]>>>8,g[b+14]=this._h[7]>>>0,g[b+15]=this._h[7]>>>8,this._finished=!0,this},v.prototype.update=function(g){var _,b=0,I=g.length;if(this._leftover){(_=16-this._leftover)>I&&(_=I);for(var A=0;A<_;A++)this._buffer[this._leftover+A]=g[b+A];if(I-=_,b+=_,this._leftover+=_,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(I>=16&&(_=I-I%16,this._blocks(g,b,_),b+=_,I-=_),I){for(A=0;A{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(59753),C=y(54502),w=y(69815);function M(I,_){return void 0===_&&(_=a.defaultRandomSource),_.randomBytes(I)}a.defaultRandomSource=new p.SystemRandomSource,a.randomBytes=M,a.randomUint32=function u(I){void 0===I&&(I=a.defaultRandomSource);var _=M(4,I),A=C.readUint32LE(_);return w.wipe(_),A};var v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function g(I,_,A){if(void 0===_&&(_=v),void 0===A&&(A=a.defaultRandomSource),_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");for(var R="",D=_.length,T=256-256%D;I>0;){for(var F=M(Math.ceil(256*I/T),A),L=0;L0;L++){var V=F[L];V{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=function(){function C(){this.isAvailable=!1,this.isInstantiated=!1;var w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}return C.prototype.randomBytes=function(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var M=new Uint8Array(w),u=0;u{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(69815),C=function(){function w(){this.isAvailable=!1,this.isInstantiated=!1;var M=y(41348);M&&M.randomBytes&&(this._crypto=M,this.isAvailable=!0,this.isInstantiated=!0)}return w.prototype.randomBytes=function(M){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var u=this._crypto.randomBytes(M);if(u.length!==M)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var v=new Uint8Array(M),g=0;g{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(77170),C=y(1382),w=function(){function M(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new C.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return M.prototype.randomBytes=function(u){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(u)},M}();a.SystemRandomSource=w},10893:(ne,a,y)=>{"use strict";var C=y(54502),w=y(69815);a.k=32,a.cn=64;var M=function(){function b(){this.digestLength=a.k,this.blockSize=a.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return b.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},b.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},b.prototype.clean=function(){w.wipe(this._buffer),w.wipe(this._temp),this.reset()},b.prototype.update=function(I,_){if(void 0===_&&(_=I.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=I[A++],_--;this._bufferLength===this.blockSize&&(v(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(A=v(this._temp,this._state,I,A,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=I[A++],_--;return this},b.prototype.finish=function(I){if(!this._finished){var _=this._bytesHashed,A=this._bufferLength,R=_/536870912|0,D=_<<3,T=_%64<56?64:128;this._buffer[A]=128;for(var F=A+1;F0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},b.prototype.restoreState=function(I){return this._state.set(I.state),this._bufferLength=I.bufferLength,I.buffer&&this._buffer.set(I.buffer),this._bytesHashed=I.bytesHashed,this._finished=!1,this},b.prototype.cleanSavedState=function(I){w.wipe(I.state),I.buffer&&w.wipe(I.buffer),I.bufferLength=0,I.bytesHashed=0},b}();a.mE=M;var u=new Int32Array([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 v(b,I,_,A,R){for(;R>=64;){for(var D=I[0],T=I[1],F=I[2],L=I[3],V=I[4],j=I[5],Z=I[6],Y=I[7],G=0;G<16;G++){var q=A+4*G;b[G]=C.readUint32BE(_,q)}for(G=16;G<64;G++){var X=b[G-2],Q=(X>>>17|X<<15)^(X>>>19|X<<13)^X>>>10,z=((X=b[G-15])>>>7|X<<25)^(X>>>18|X<<14)^X>>>3;b[G]=(Q+b[G-7]|0)+(z+b[G-16]|0)}for(G=0;G<64;G++){Q=(((V>>>6|V<<26)^(V>>>11|V<<21)^(V>>>25|V<<7))+(V&j^~V&Z)|0)+(Y+(u[G]+b[G]|0)|0)|0,z=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&T^D&F^T&F)|0;Y=Z,Z=j,j=V,V=L+Q|0,L=F,F=T,T=D,D=Q+z|0}I[0]+=D,I[1]+=T,I[2]+=F,I[3]+=L,I[4]+=V,I[5]+=j,I[6]+=Z,I[7]+=Y,A+=64,R-=64}return A}a.vp=function g(b){var I=new M;I.update(b);var _=I.digest();return I.clean(),_}},86375:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var p=y(54502),C=y(69815);a.DIGEST_LENGTH=64,a.BLOCK_SIZE=128;var w=function(){function g(){this.digestLength=a.DIGEST_LENGTH,this.blockSize=a.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return g.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},g.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},g.prototype.clean=function(){C.wipe(this._buffer),C.wipe(this._tempHi),C.wipe(this._tempLo),this.reset()},g.prototype.update=function(b,I){if(void 0===I&&(I=b.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var _=0;if(this._bytesHashed+=I,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=b[_++],I--;this._bufferLength===this.blockSize&&(u(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(I>=this.blockSize&&(_=u(this._tempHi,this._tempLo,this._stateHi,this._stateLo,b,_,I),I%=this.blockSize);I>0;)this._buffer[this._bufferLength++]=b[_++],I--;return this},g.prototype.finish=function(b){if(!this._finished){var I=this._bytesHashed,_=this._bufferLength,A=I/536870912|0,R=I<<3,D=I%128<112?128:256;this._buffer[_]=128;for(var T=_+1;T0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},g.prototype.restoreState=function(b){return this._stateHi.set(b.stateHi),this._stateLo.set(b.stateLo),this._bufferLength=b.bufferLength,b.buffer&&this._buffer.set(b.buffer),this._bytesHashed=b.bytesHashed,this._finished=!1,this},g.prototype.cleanSavedState=function(b){C.wipe(b.stateHi),C.wipe(b.stateLo),b.buffer&&C.wipe(b.buffer),b.bufferLength=0,b.bytesHashed=0},g}();a.SHA512=w;var M=new Int32Array([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 u(g,b,I,_,A,R,D){for(var d,h,E,k,B,x,f,P,T=I[0],F=I[1],L=I[2],V=I[3],j=I[4],Z=I[5],Y=I[6],G=I[7],q=_[0],X=_[1],Q=_[2],z=_[3],$=_[4],S=_[5],r=_[6],s=_[7];D>=128;){for(var se=0;se<16;se++){var te=8*se+R;g[se]=p.readUint32BE(A,te),b[se]=p.readUint32BE(A,te+4)}for(se=0;se<80;se++){var pe,Ve,ie=T,de=F,Ce=L,ye=V,ve=j,ae=Z,fe=Y,Ee=q,ce=X,be=Q,Ne=z,Fe=$,ct=S,Ze=r;if(B=65535&(h=s),x=h>>>16,f=65535&(d=G),P=d>>>16,B+=65535&(h=($>>>14|j<<18)^($>>>18|j<<14)^(j>>>9|$<<23)),x+=h>>>16,f+=65535&(d=(j>>>14|$<<18)^(j>>>18|$<<14)^($>>>9|j<<23)),P+=d>>>16,B+=65535&(h=$&S^~$&r),x+=h>>>16,f+=65535&(d=j&Z^~j&Y),P+=d>>>16,d=M[2*se],B+=65535&(h=M[2*se+1]),x+=h>>>16,f+=65535&d,P+=d>>>16,d=g[se%16],x+=(h=b[se%16])>>>16,f+=65535&d,P+=d>>>16,f+=(x+=(B+=65535&h)>>>16)>>>16,B=65535&(h=k=65535&B|x<<16),x=h>>>16,f=65535&(d=E=65535&f|(P+=f>>>16)<<16),P=d>>>16,B+=65535&(h=(q>>>28|T<<4)^(T>>>2|q<<30)^(T>>>7|q<<25)),x+=h>>>16,f+=65535&(d=(T>>>28|q<<4)^(q>>>2|T<<30)^(q>>>7|T<<25)),P+=d>>>16,x+=(h=q&X^q&Q^X&Q)>>>16,f+=65535&(d=T&F^T&L^F&L),P+=d>>>16,pe=65535&(f+=(x+=(B+=65535&h)>>>16)>>>16)|(P+=f>>>16)<<16,Ve=65535&B|x<<16,B=65535&(h=Ne),x=h>>>16,f=65535&(d=ye),P=d>>>16,x+=(h=k)>>>16,f+=65535&(d=E),P+=d>>>16,F=ie,L=de,V=Ce,j=ye=65535&(f+=(x+=(B+=65535&h)>>>16)>>>16)|(P+=f>>>16)<<16,Z=ve,Y=ae,G=fe,T=pe,X=Ee,Q=ce,z=be,$=Ne=65535&B|x<<16,S=Fe,r=ct,s=Ze,q=Ve,se%16==15)for(te=0;te<16;te++)d=g[te],B=65535&(h=b[te]),x=h>>>16,f=65535&d,P=d>>>16,d=g[(te+9)%16],B+=65535&(h=b[(te+9)%16]),x+=h>>>16,f+=65535&d,P+=d>>>16,E=g[(te+1)%16],B+=65535&(h=((k=b[(te+1)%16])>>>1|E<<31)^(k>>>8|E<<24)^(k>>>7|E<<25)),x+=h>>>16,f+=65535&(d=(E>>>1|k<<31)^(E>>>8|k<<24)^E>>>7),P+=d>>>16,E=g[(te+14)%16],x+=(h=((k=b[(te+14)%16])>>>19|E<<13)^(E>>>29|k<<3)^(k>>>6|E<<26))>>>16,f+=65535&(d=(E>>>19|k<<13)^(k>>>29|E<<3)^E>>>6),P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,g[te]=65535&f|P<<16,b[te]=65535&B|x<<16}B=65535&(h=q),x=h>>>16,f=65535&(d=T),P=d>>>16,d=I[0],x+=(h=_[0])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[0]=T=65535&f|P<<16,_[0]=q=65535&B|x<<16,B=65535&(h=X),x=h>>>16,f=65535&(d=F),P=d>>>16,d=I[1],x+=(h=_[1])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[1]=F=65535&f|P<<16,_[1]=X=65535&B|x<<16,B=65535&(h=Q),x=h>>>16,f=65535&(d=L),P=d>>>16,d=I[2],x+=(h=_[2])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[2]=L=65535&f|P<<16,_[2]=Q=65535&B|x<<16,B=65535&(h=z),x=h>>>16,f=65535&(d=V),P=d>>>16,d=I[3],x+=(h=_[3])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[3]=V=65535&f|P<<16,_[3]=z=65535&B|x<<16,B=65535&(h=$),x=h>>>16,f=65535&(d=j),P=d>>>16,d=I[4],x+=(h=_[4])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[4]=j=65535&f|P<<16,_[4]=$=65535&B|x<<16,B=65535&(h=S),x=h>>>16,f=65535&(d=Z),P=d>>>16,d=I[5],x+=(h=_[5])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[5]=Z=65535&f|P<<16,_[5]=S=65535&B|x<<16,B=65535&(h=r),x=h>>>16,f=65535&(d=Y),P=d>>>16,d=I[6],x+=(h=_[6])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[6]=Y=65535&f|P<<16,_[6]=r=65535&B|x<<16,B=65535&(h=s),x=h>>>16,f=65535&(d=G),P=d>>>16,d=I[7],x+=(h=_[7])>>>16,f+=65535&d,P+=d>>>16,P+=(f+=(x+=(B+=65535&h)>>>16)>>>16)>>>16,I[7]=G=65535&f|P<<16,_[7]=s=65535&B|x<<16,R+=128,D-=128}return R}a.hash=function v(g){var b=new w;b.update(g);var I=b.digest();return b.clean(),I}},69815:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.wipe=function y(p){for(var C=0;C{"use strict";a.gi=a.Au=a.KS=a.kz=void 0;const C=y(52579),w=y(69815);function M(G){const q=new Float64Array(16);if(G)for(let X=0;X=0;--B){const x=X[B>>>3]>>>(7&B)&1;b(z,$,x),b(S,r,x),A(s,z,S),R(z,z,S),A(S,$,r),R($,$,r),T(r,s),T(d,z),D(z,S,z),D(S,$,s),A(s,z,S),R(z,z,S),T($,z),R(S,r,d),D(z,S,v),A(z,z,r),D(S,S,z),D(z,r,d),D(r,$,Q),T($,s),b(z,$,x),b(S,r,x)}for(let B=0;B<16;B++)Q[B+16]=z[B],Q[B+32]=S[B],Q[B+48]=$[B],Q[B+64]=r[B];const h=Q.subarray(32),E=Q.subarray(16);(function F(G,q){const X=M();for(let Q=0;Q<16;Q++)X[Q]=q[Q];for(let Q=253;Q>=0;Q--)T(X,X),2!==Q&&4!==Q&&D(X,X,q);for(let Q=0;Q<16;Q++)G[Q]=X[Q]})(h,h),D(E,E,h);const k=new Uint8Array(32);return function I(G,q){const X=M(),Q=M();for(let z=0;z<16;z++)Q[z]=q[z];g(Q),g(Q),g(Q);for(let z=0;z<2;z++){X[0]=Q[0]-65517;for(let S=1;S<15;S++)X[S]=Q[S]-65535-(X[S-1]>>16&1),X[S-1]&=65535;X[15]=Q[15]-32767-(X[14]>>16&1);const $=X[15]>>16&1;X[14]&=65535,b(Q,X,1-$)}for(let z=0;z<16;z++)G[2*z]=255&Q[z],G[2*z+1]=Q[z]>>8}(k,E),k}function V(G){return L(G,u)}function j(G){if(G.length!==a.KS)throw new Error(`x25519: seed must be ${a.KS} bytes`);const q=new Uint8Array(G);return{publicKey:V(q),secretKey:q}}a.Au=function Z(G){const q=(0,C.randomBytes)(32,G),X=j(q);return(0,w.wipe)(q),X},a.gi=function Y(G,q,X=!1){if(G.length!==a.kz)throw new Error("X25519: incorrect secret key length");if(q.length!==a.kz)throw new Error("X25519: incorrect public key length");const Q=L(G,q);if(X){let z=0;for(let $=0;${"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.randomStringForEntropy=a.randomString=a.randomUint32=a.randomBytes=a.defaultRandomSource=void 0;const p=y(65615),C=y(54502),w=y(69815);function M(I,_=a.defaultRandomSource){return _.randomBytes(I)}a.defaultRandomSource=new p.SystemRandomSource,a.randomBytes=M,a.randomUint32=function u(I=a.defaultRandomSource){const _=M(4,I),A=(0,C.readUint32LE)(_);return(0,w.wipe)(_),A};const v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function g(I,_=v,A=a.defaultRandomSource){if(_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");let R="";const D=_.length,T=256-256%D;for(;I>0;){const F=M(Math.ceil(256*I/T),A);for(let L=0;L0;L++){const V=F[L];V{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserRandomSource=void 0;a.BrowserRandomSource=class p{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const M=new Uint8Array(w);for(let u=0;u{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.NodeRandomSource=void 0;const p=y(69815);a.NodeRandomSource=class C{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const M=y(41348);M&&M.randomBytes&&(this._crypto=M,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(M){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let u=this._crypto.randomBytes(M);if(u.length!==M)throw new Error("NodeRandomSource: got fewer bytes than requested");const v=new Uint8Array(M);for(let g=0;g{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SystemRandomSource=void 0;const p=y(72773),C=y(5447);a.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new C.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(u){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(u)}}},31688:(ne,a)=>{"use strict";function y(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function p(){const w=y();return w.subtle||w.webkitSubtle}Object.defineProperty(a,"__esModule",{value:!0}),a.isBrowserCryptoAvailable=a.getSubtleCrypto=a.getBrowerCrypto=void 0,a.getBrowerCrypto=y,a.getSubtleCrypto=p,a.isBrowserCryptoAvailable=function C(){return!!y()&&!!p()}},32220:(ne,a)=>{"use strict";function y(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function p(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(a,"__esModule",{value:!0}),a.isBrowser=a.isNode=a.isReactNative=void 0,a.isReactNative=y,a.isNode=p,a.isBrowser=function C(){return!y()&&!p()}},71948:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(34308);p.__exportStar(y(31688),a),p.__exportStar(y(32220),a)},42092:(ne,a,y)=>{"use strict";y.d(a,{q:()=>p});class p{}},1252:(ne,a,y)=>{"use strict";y.r(a),y.d(a,{IEvents:()=>p.q});var p=y(42092)},63510:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.HEARTBEAT_EVENTS=a.HEARTBEAT_INTERVAL=void 0;const p=y(43961);a.HEARTBEAT_INTERVAL=p.FIVE_SECONDS,a.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},46844:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),y(39653).__exportStar(y(63510),a)},72271:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.HeartBeat=void 0;const p=y(39653),C=y(59069),w=y(43961),M=y(76925),u=y(46844);class v extends M.IHeartBeat{constructor(b){super(b),this.events=new C.EventEmitter,this.interval=u.HEARTBEAT_INTERVAL,this.interval=b?.interval||u.HEARTBEAT_INTERVAL}static init(b){return p.__awaiter(this,void 0,void 0,function*(){const I=new v(b);return yield I.init(),I})}init(){return p.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(b,I){this.events.on(b,I)}once(b,I){this.events.once(b,I)}off(b,I){this.events.off(b,I)}removeListener(b,I){this.events.removeListener(b,I)}initialize(){return p.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),w.toMiliseconds(this.interval))})}pulse(){this.events.emit(u.HEARTBEAT_EVENTS.pulse)}}a.HeartBeat=v},72062:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(39653);p.__exportStar(y(72271),a),p.__exportStar(y(76925),a),p.__exportStar(y(46844),a)},88891:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.IHeartBeat=void 0;const p=y(1252);class C extends p.IEvents{constructor(M){super()}}a.IHeartBeat=C},76925:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),y(39653).__exportStar(y(88891),a)},25504:ne=>{"use strict";ne.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},49274:(ne,a,y)=>{"use strict";const C=y(33893),w=y(11404),M=C.__importDefault(y(56474)),u=y(50285);class v{constructor(){this.localStorage=M.default}getKeys(){return C.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return C.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(u.parseEntry)})}getItem(b){return C.__awaiter(this,void 0,void 0,function*(){const I=this.localStorage.getItem(b);if(null!==I)return w.safeJsonParse(I)})}setItem(b,I){return C.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(b,w.safeJsonStringify(I))})}removeItem(b){return C.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(b)})}}a.ZP=v},56474:ne=>{"use strict";!function(){let a;function y(){}a=y,a.prototype.getItem=function(p){return this.hasOwnProperty(p)?String(this[p]):null},a.prototype.setItem=function(p,C){this[p]=String(C)},a.prototype.removeItem=function(p){delete this[p]},a.prototype.clear=function(){const p=this;Object.keys(p).forEach(function(C){p[C]=void 0,delete p[C]})},a.prototype.key=function(p){return p=p||0,Object.keys(this)[p]},a.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof global<"u"&&global.localStorage?ne.exports=global.localStorage:typeof window<"u"&&window.localStorage?ne.exports=window.localStorage:ne.exports=new y}()},50285:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(33893);p.__exportStar(y(54110),a),p.__exportStar(y(21474),a)},54110:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.IKeyValueStorage=void 0;a.IKeyValueStorage=class y{}},21474:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.parseEntry=void 0;const p=y(11404);a.parseEntry=function C(w){var M;return[w[0],p.safeJsonParse(null!==(M=w[1])&&void 0!==M?M:"")]}},46499:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PINO_CUSTOM_CONTEXT_KEY=a.PINO_LOGGER_DEFAULTS=void 0,a.PINO_LOGGER_DEFAULTS={level:"info"},a.PINO_CUSTOM_CONTEXT_KEY="custom_context"},83767:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pino=void 0;const p=y(57121),C=p.__importDefault(y(28544));Object.defineProperty(a,"pino",{enumerable:!0,get:function(){return C.default}}),p.__exportStar(y(46499),a),p.__exportStar(y(96873),a)},96873:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.generateChildLogger=a.formatChildLoggerContext=a.getLoggerContext=a.setBrowserLoggerContext=a.getBrowserLoggerContext=a.getDefaultLoggerOptions=void 0;const p=y(46499);function w(b,I=p.PINO_CUSTOM_CONTEXT_KEY){return b[I]||""}function M(b,I,_=p.PINO_CUSTOM_CONTEXT_KEY){return b[_]=I,b}function u(b,I=p.PINO_CUSTOM_CONTEXT_KEY){let _="";return _=typeof b.bindings>"u"?w(b,I):b.bindings().context||"",_}function v(b,I,_=p.PINO_CUSTOM_CONTEXT_KEY){const A=u(b,_);return A.trim()?`${A}/${I}`:I}a.getDefaultLoggerOptions=function C(b){return Object.assign(Object.assign({},b),{level:b?.level||p.PINO_LOGGER_DEFAULTS.level})},a.getBrowserLoggerContext=w,a.setBrowserLoggerContext=M,a.getLoggerContext=u,a.formatChildLoggerContext=v,a.generateChildLogger=function g(b,I,_=p.PINO_CUSTOM_CONTEXT_KEY){const A=v(b,I,_);return M(b.child({context:A}),A,_)}},62079:()=>{},6375:()=>{},86205:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(30004);p.__exportStar(y(20725),a),p.__exportStar(y(48562),a)},20725:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ONE_THOUSAND=a.ONE_HUNDRED=void 0,a.ONE_HUNDRED=100,a.ONE_THOUSAND=1e3},48562:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ONE_YEAR=a.FOUR_WEEKS=a.THREE_WEEKS=a.TWO_WEEKS=a.ONE_WEEK=a.THIRTY_DAYS=a.SEVEN_DAYS=a.FIVE_DAYS=a.THREE_DAYS=a.ONE_DAY=a.TWENTY_FOUR_HOURS=a.TWELVE_HOURS=a.SIX_HOURS=a.THREE_HOURS=a.ONE_HOUR=a.SIXTY_MINUTES=a.THIRTY_MINUTES=a.TEN_MINUTES=a.FIVE_MINUTES=a.ONE_MINUTE=a.SIXTY_SECONDS=a.THIRTY_SECONDS=a.TEN_SECONDS=a.FIVE_SECONDS=a.ONE_SECOND=void 0,a.ONE_SECOND=1,a.FIVE_SECONDS=5,a.TEN_SECONDS=10,a.THIRTY_SECONDS=30,a.SIXTY_SECONDS=60,a.ONE_MINUTE=a.SIXTY_SECONDS,a.FIVE_MINUTES=5*a.ONE_MINUTE,a.TEN_MINUTES=10*a.ONE_MINUTE,a.THIRTY_MINUTES=30*a.ONE_MINUTE,a.SIXTY_MINUTES=60*a.ONE_MINUTE,a.ONE_HOUR=a.SIXTY_MINUTES,a.THREE_HOURS=3*a.ONE_HOUR,a.SIX_HOURS=6*a.ONE_HOUR,a.TWELVE_HOURS=12*a.ONE_HOUR,a.TWENTY_FOUR_HOURS=24*a.ONE_HOUR,a.ONE_DAY=a.TWENTY_FOUR_HOURS,a.THREE_DAYS=3*a.ONE_DAY,a.FIVE_DAYS=5*a.ONE_DAY,a.SEVEN_DAYS=7*a.ONE_DAY,a.THIRTY_DAYS=30*a.ONE_DAY,a.ONE_WEEK=a.SEVEN_DAYS,a.TWO_WEEKS=2*a.ONE_WEEK,a.THREE_WEEKS=3*a.ONE_WEEK,a.FOUR_WEEKS=4*a.ONE_WEEK,a.ONE_YEAR=365*a.ONE_DAY},43961:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(30004);p.__exportStar(y(64497),a),p.__exportStar(y(63509),a),p.__exportStar(y(43622),a),p.__exportStar(y(86205),a)},43622:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),y(30004).__exportStar(y(99761),a)},99761:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.IWatch=void 0;a.IWatch=class y{}},88784:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fromMiliseconds=a.toMiliseconds=void 0;const p=y(86205);a.toMiliseconds=function C(M){return M*p.ONE_THOUSAND},a.fromMiliseconds=function w(M){return Math.floor(M/p.ONE_THOUSAND)}},77657:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.delay=void 0,a.delay=function y(p){return new Promise(C=>{setTimeout(()=>{C(!0)},p)})}},64497:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(30004);p.__exportStar(y(77657),a),p.__exportStar(y(88784),a)},63509:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Watch=void 0;class y{constructor(){this.timestamps=new Map}start(C){if(this.timestamps.has(C))throw new Error(`Watch already started for label: ${C}`);this.timestamps.set(C,{started:Date.now()})}stop(C){const w=this.get(C);if(typeof w.elapsed<"u")throw new Error(`Watch already stopped for label: ${C}`);const M=Date.now()-w.started;this.timestamps.set(C,{started:w.started,elapsed:M})}get(C){const w=this.timestamps.get(C);if(typeof w>"u")throw new Error(`No timestamp found for label: ${C}`);return w}elapsed(C){const w=this.get(C);return w.elapsed||Date.now()-w.started}}a.Watch=y,a.default=y},10976:(ne,a,y)=>{"use strict";a.O6=a.hf=void 0;const C=y(85639),w=y(54502),M=y(69815);function u(_,A=a.hf){return A.randomBytes(_)}a.hf=new C.SystemRandomSource,a.O6=u;const g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function b(_,A=g,R=a.hf){if(A.length<2)throw new Error("randomString charset is too short");if(A.length>256)throw new Error("randomString charset is too long");let D="";const T=A.length,F=256-256%T;for(;_>0;){const L=u(Math.ceil(256*_/F),R);for(let V=0;V0;V++){const j=L[V];j{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserRandomSource=void 0;a.BrowserRandomSource=class p{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const M=new Uint8Array(w);for(let u=0;u{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.NodeRandomSource=void 0;const p=y(69815);a.NodeRandomSource=class C{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const M=y(41348);M&&M.randomBytes&&(this._crypto=M,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(M){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let u=this._crypto.randomBytes(M);if(u.length!==M)throw new Error("NodeRandomSource: got fewer bytes than requested");const v=new Uint8Array(M);for(let g=0;g{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SystemRandomSource=void 0;const p=y(38459),C=y(41981);a.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new C.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(u){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(u)}}},6499:(ne,a)=>{"use strict";function y(R){let D;return typeof window<"u"&&typeof window[R]<"u"&&(D=window[R]),D}function p(R){const D=y(R);if(!D)throw new Error(`${R} is not defined in Window`);return D}Object.defineProperty(a,"__esModule",{value:!0}),a.getLocalStorage=a.getLocalStorageOrThrow=a.getCrypto=a.getCryptoOrThrow=a.getLocation=a.getLocationOrThrow=a.getNavigator=a.getNavigatorOrThrow=a.getDocument=a.getDocumentOrThrow=a.getFromWindowOrThrow=a.getFromWindow=void 0,a.getFromWindow=y,a.getFromWindowOrThrow=p,a.getDocumentOrThrow=function C(){return p("document")},a.getDocument=function w(){return y("document")},a.getNavigatorOrThrow=function M(){return p("navigator")},a.getNavigator=function u(){return y("navigator")},a.getLocationOrThrow=function v(){return p("location")},a.getLocation=function g(){return y("location")},a.getCryptoOrThrow=function b(){return p("crypto")},a.getCrypto=function I(){return y("crypto")},a.getLocalStorageOrThrow=function _(){return p("localStorage")},a.getLocalStorage=function A(){return y("localStorage")}},30543:(ne,a,y)=>{"use strict";a.D=void 0;const C=y(6499);a.D=function w(){let M,u;try{M=C.getDocumentOrThrow(),u=C.getLocationOrThrow()}catch{return null}function g(...F){const L=M.getElementsByTagName("meta");for(let V=0;Vj.getAttribute(Y)).filter(Y=>!!Y&&F.includes(Y));if(Z.length&&Z){const Y=j.getAttribute("content");if(Y)return Y}}return""}const _=function b(){let F=g("name","og:site_name","og:title","twitter:title");return F||(F=M.title),F}();return{description:function I(){return g("description","og:description","twitter:description","keywords")}(),url:u.origin,icons:function v(){const F=M.getElementsByTagName("link"),L=[];for(let V=0;V-1){const Y=j.getAttribute("href");if(Y)if(-1===Y.toLowerCase().indexOf("https:")&&-1===Y.toLowerCase().indexOf("http:")&&0!==Y.indexOf("//")){let G=u.protocol+"//"+u.host;if(0===Y.indexOf("/"))G+=Y;else{const q=u.pathname.split("/");q.pop();G+=q.join("/")+"/"+Y}L.push(G)}else if(0===Y.indexOf("//")){const G=u.protocol+Y;L.push(G)}else L.push(Y)}}return L}(),name:_}}},88599:ne=>{function a(y){this._db=y,this._operations=[],this._written=!1}a.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},a.prototype.put=function(y,p){this._checkWritten();var C=this._db._checkKeyValue(y,"key",this._db._isBuffer);if(C||(C=this._db._checkKeyValue(p,"value",this._db._isBuffer)))throw C;return this._db._isBuffer(y)||(y=String(y)),this._db._isBuffer(p)||(p=String(p)),"function"==typeof this._put?this._put(y,p):this._operations.push({type:"put",key:y,value:p}),this},a.prototype.del=function(y){this._checkWritten();var p=this._db._checkKeyValue(y,"key",this._db._isBuffer);if(p)throw p;return this._db._isBuffer(y)||(y=String(y)),"function"==typeof this._del?this._del(y):this._operations.push({type:"del",key:y}),this},a.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},a.prototype.write=function(y,p){if(this._checkWritten(),"function"==typeof y&&(p=y),"function"!=typeof p)throw new Error("write() requires a callback argument");return"object"!=typeof y&&(y={}),this._written=!0,"function"==typeof this._write?this._write(p):"function"==typeof this._db._batch?this._db._batch(this._operations,y,p):void process.nextTick(p)},ne.exports=a},14968:ne=>{function a(y){this.db=y,this._ended=!1,this._nexting=!1}a.prototype.next=function(y){var p=this;if("function"!=typeof y)throw new Error("next() requires a callback argument");return p._ended?y(new Error("cannot call next() after end()")):p._nexting?y(new Error("cannot call next() before previous next() has completed")):(p._nexting=!0,"function"==typeof p._next?p._next(function(){p._nexting=!1,y.apply(null,arguments)}):void process.nextTick(function(){p._nexting=!1,y()}))},a.prototype.end=function(y){if("function"!=typeof y)throw new Error("end() requires a callback argument");return this._ended?y(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(y):void process.nextTick(y))},ne.exports=a},30826:(ne,a,y)=>{var C=y(78677),w=y(14968),M=y(88599);function u(v){if(!arguments.length||void 0===v)throw new Error("constructor requires at least a location argument");if("string"!=typeof v)throw new Error("constructor requires a location string argument");this.location=v}u.prototype.open=function(v,g){if("function"==typeof v&&(g=v),"function"!=typeof g)throw new Error("open() requires a callback argument");if("object"!=typeof v&&(v={}),"function"==typeof this._open)return this._open(v,g);process.nextTick(g)},u.prototype.close=function(v){if("function"!=typeof v)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(v);process.nextTick(v)},u.prototype.get=function(v,g,b){var I;if("function"==typeof g&&(b=g),"function"!=typeof b)throw new Error("get() requires a callback argument");return(I=this._checkKeyValue(v,"key",this._isBuffer))?b(I):(this._isBuffer(v)||(v=String(v)),"object"!=typeof g&&(g={}),"function"==typeof this._get?this._get(v,g,b):void process.nextTick(function(){b(new Error("NotFound"))}))},u.prototype.put=function(v,g,b,I){var _;if("function"==typeof b&&(I=b),"function"!=typeof I)throw new Error("put() requires a callback argument");return(_=this._checkKeyValue(v,"key",this._isBuffer))||(_=this._checkKeyValue(g,"value",this._isBuffer))?I(_):(this._isBuffer(v)||(v=String(v)),!this._isBuffer(g)&&!process.browser&&(g=String(g)),"object"!=typeof b&&(b={}),"function"==typeof this._put?this._put(v,g,b,I):void process.nextTick(I))},u.prototype.del=function(v,g,b){var I;if("function"==typeof g&&(b=g),"function"!=typeof b)throw new Error("del() requires a callback argument");return(I=this._checkKeyValue(v,"key",this._isBuffer))?b(I):(this._isBuffer(v)||(v=String(v)),"object"!=typeof g&&(g={}),"function"==typeof this._del?this._del(v,g,b):void process.nextTick(b))},u.prototype.batch=function(v,g,b){if(!arguments.length)return this._chainedBatch();if("function"==typeof g&&(b=g),"function"!=typeof b)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(v))return b(new Error("batch(array) requires an array argument"));"object"!=typeof g&&(g={});for(var A,R,I=0,_=v.length;I<_;I++)if("object"==typeof(A=v[I])&&((R=this._checkKeyValue(A.type,"type",this._isBuffer))||(R=this._checkKeyValue(A.key,"key",this._isBuffer))||"put"==A.type&&(R=this._checkKeyValue(A.value,"value",this._isBuffer))))return b(R);if("function"==typeof this._batch)return this._batch(v,g,b);process.nextTick(b)},u.prototype.approximateSize=function(v,g,b){if(null==v||null==g||"function"==typeof v||"function"==typeof g)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof b)throw new Error("approximateSize() requires a callback argument");if(this._isBuffer(v)||(v=String(v)),this._isBuffer(g)||(g=String(g)),"function"==typeof this._approximateSize)return this._approximateSize(v,g,b);process.nextTick(function(){b(null,0)})},u.prototype._setupIteratorOptions=function(v){var g=this;return v=C(v),["start","end","gt","gte","lt","lte"].forEach(function(b){v[b]&&g._isBuffer(v[b])&&0===v[b].length&&delete v[b]}),v.reverse=!!v.reverse,v.reverse&&v.lt&&(v.start=v.lt),v.reverse&&v.lte&&(v.start=v.lte),!v.reverse&&v.gt&&(v.start=v.gt),!v.reverse&&v.gte&&(v.start=v.gte),(v.reverse&&v.lt&&!v.lte||!v.reverse&&v.gt&&!v.gte)&&(v.exclusiveStart=!0),v},u.prototype.iterator=function(v){return"object"!=typeof v&&(v={}),v=this._setupIteratorOptions(v),"function"==typeof this._iterator?this._iterator(v):new w(this)},u.prototype._chainedBatch=function(){return new M(this)},u.prototype._isBuffer=function(v){return Buffer.isBuffer(v)},u.prototype._checkKeyValue=function(v,g){if(null==v)return new Error(g+" cannot be `null` or `undefined`");if(this._isBuffer(v)){if(0===v.length)return new Error(g+" cannot be an empty Buffer")}else if(""===String(v))return new Error(g+" cannot be an empty String")},ne.exports.NI=u,ne.exports.YI=w},35180:(ne,a)=>{"use strict";function y(Q,z){return{validate:Q,compare:z}}Object.defineProperty(a,"__esModule",{value:!0}),a.formatNames=a.fastFormats=a.fullFormats=void 0,a.fullFormats={date:y(M,u),time:y(g,b),"date-time":y(function _(Q){const z=Q.split(I);return 2===z.length&&M(z[0])&&g(z[1],!0)},A),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function T(Q){return R.test(Q)&&D.test(Q)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2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1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function X(Q){if(q.test(Q))return!1;try{return new RegExp(Q),!0}catch{return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function L(Q){return F.lastIndex=0,F.test(Q)},int32:{type:"number",validate:function Z(Q){return Number.isInteger(Q)&&Q<=j&&Q>=V}},int64:{type:"number",validate:function Y(Q){return Number.isInteger(Q)}},float:{type:"number",validate:G},double:{type:"number",validate:G},password:!0,binary:!0},a.fastFormats={...a.fullFormats,date:y(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,u),time:y(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),"date-time":y(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,A),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},a.formatNames=Object.keys(a.fullFormats);const C=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31];function M(Q){const z=C.exec(Q);if(!z)return!1;const $=+z[1],S=+z[2],r=+z[3];return S>=1&&S<=12&&r>=1&&r<=(2===S&&function p(Q){return Q%4==0&&(Q%100!=0||Q%400==0)}($)?29:w[S])}function u(Q,z){if(Q&&z)return Q>z?1:Q(z=S[1]+S[2]+S[3]+(S[4]||""))?1:Q{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(35180),C=y(65413),w=y(56382),M=new w.Name("fullFormats"),u=new w.Name("fastFormats"),v=(b,I={keywords:!0})=>{if(Array.isArray(I))return g(b,I,p.fullFormats,M),b;const[_,A]="fast"===I.mode?[p.fastFormats,u]:[p.fullFormats,M];return g(b,I.formats||p.formatNames,_,A),I.keywords&&C.default(b),b};function g(b,I,_,A){var R,D;null!==(R=(D=b.opts.code).formats)&&void 0!==R||(D.formats=w._`require("ajv-formats/dist/formats").${A}`);for(const T of I)b.addFormat(T,_[T])}v.get=(b,I="full")=>{const A=("fast"===I?p.fastFormats:p.fullFormats)[b];if(!A)throw new Error(`Unknown format "${b}"`);return A},ne.exports=a=v,Object.defineProperty(a,"__esModule",{value:!0}),a.default=v},65413:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.formatLimitDefinition=void 0;const p=y(74411),C=y(56382),w=C.operators,M={formatMaximum:{okStr:"<=",ok:w.LTE,fail:w.GT},formatMinimum:{okStr:">=",ok:w.GTE,fail:w.LT},formatExclusiveMaximum:{okStr:"<",ok:w.LT,fail:w.GTE},formatExclusiveMinimum:{okStr:">",ok:w.GT,fail:w.LTE}},u={message:({keyword:g,schemaCode:b})=>C.str`should be ${M[g].okStr} ${b}`,params:({keyword:g,schemaCode:b})=>C._`{comparison: ${M[g].okStr}, limit: ${b}}`};a.formatLimitDefinition={keyword:Object.keys(M),type:"string",schemaType:"string",$data:!0,error:u,code(g){const{gen:b,data:I,schemaCode:_,keyword:A,it:R}=g,{opts:D,self:T}=R;if(!D.validateFormats)return;const F=new p.KeywordCxt(R,T.RULES.all.format.definition,"format");function j(Z){return C._`${Z}.compare(${I}, ${_}) ${M[A].fail} 0`}F.$data?function L(){const Z=b.scopeValue("formats",{ref:T.formats,code:D.code.formats}),Y=b.const("fmt",C._`${Z}[${F.schemaCode}]`);g.fail$data(C.or(C._`typeof ${Y} != "object"`,C._`${Y} instanceof RegExp`,C._`typeof ${Y}.compare != "function"`,j(Y)))}():function V(){const Z=F.schema,Y=T.formats[Z];if(!Y||!0===Y)return;if("object"!=typeof Y||Y instanceof RegExp||"function"!=typeof Y.compare)throw new Error(`"${A}": format "${Z}" does not define "compare" function`);const G=b.scopeValue("formats",{key:Z,ref:Y,code:D.code.formats?C._`${D.code.formats}${C.getProperty(Z)}`:void 0});g.fail$data(j(G))}()},dependencies:["format"]};a.default=g=>(g.addKeyword(a.formatLimitDefinition),g)},74411:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MissingRefError=a.ValidationError=a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=void 0;const p=y(25910),C=y(77032),w=y(81849),M=y(98),u=["/properties"],v="http://json-schema.org/draft-07/schema";class g extends p.default{_addVocabularies(){super._addVocabularies(),C.default.forEach(D=>this.addVocabulary(D)),this.opts.discriminator&&this.addKeyword(w.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const D=this.opts.$data?this.$dataMetaSchema(M,u):M;this.addMetaSchema(D,v,!1),this.refs["http://json-schema.org/schema"]=v}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}}ne.exports=a=g,Object.defineProperty(a,"__esModule",{value:!0}),a.default=g;var b=y(66764);Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return b.KeywordCxt}});var I=y(56382);Object.defineProperty(a,"_",{enumerable:!0,get:function(){return I._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return I.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return I.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return I.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return I.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return I.CodeGen}});var _=y(20496);Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return _.default}});var A=y(80140);Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},26295:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.regexpCode=a.getEsmExportName=a.getProperty=a.safeStringify=a.stringify=a.strConcat=a.addCodeArg=a.str=a._=a.nil=a._Code=a.Name=a.IDENTIFIER=a._CodeOrName=void 0;class y{}a._CodeOrName=y,a.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class p extends y{constructor(V){if(super(),!a.IDENTIFIER.test(V))throw new Error("CodeGen: name must be a valid identifier");this.str=V}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}a.Name=p;class C extends y{constructor(V){super(),this._items="string"==typeof V?[V]:V}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const V=this._items[0];return""===V||'""'===V}get str(){var V;return null!==(V=this._str)&&void 0!==V?V:this._str=this._items.reduce((j,Z)=>`${j}${Z}`,"")}get names(){var V;return null!==(V=this._names)&&void 0!==V?V:this._names=this._items.reduce((j,Z)=>(Z instanceof p&&(j[Z.str]=(j[Z.str]||0)+1),j),{})}}function w(L,...V){const j=[L[0]];let Z=0;for(;Z{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.or=a.and=a.not=a.CodeGen=a.operators=a.varKinds=a.ValueScopeName=a.ValueScope=a.Scope=a.Name=a.regexpCode=a.stringify=a.getProperty=a.nil=a.strConcat=a.str=a._=void 0;const p=y(26295),C=y(1917);var w=y(26295);Object.defineProperty(a,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(a,"strConcat",{enumerable:!0,get:function(){return w.strConcat}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(a,"getProperty",{enumerable:!0,get:function(){return w.getProperty}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(a,"regexpCode",{enumerable:!0,get:function(){return w.regexpCode}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return w.Name}});var M=y(1917);Object.defineProperty(a,"Scope",{enumerable:!0,get:function(){return M.Scope}}),Object.defineProperty(a,"ValueScope",{enumerable:!0,get:function(){return M.ValueScope}}),Object.defineProperty(a,"ValueScopeName",{enumerable:!0,get:function(){return M.ValueScopeName}}),Object.defineProperty(a,"varKinds",{enumerable:!0,get:function(){return M.varKinds}}),a.operators={GT:new p._Code(">"),GTE:new p._Code(">="),LT:new p._Code("<"),LTE:new p._Code("<="),EQ:new p._Code("==="),NEQ:new p._Code("!=="),NOT:new p._Code("!"),OR:new p._Code("||"),AND:new p._Code("&&"),ADD:new p._Code("+")};class u{optimizeNodes(){return this}optimizeNames(ie,de){return this}}class v extends u{constructor(ie,de,Ce){super(),this.varKind=ie,this.name=de,this.rhs=Ce}render({es5:ie,_n:de}){const Ce=ie?C.varKinds.var:this.varKind,ye=void 0===this.rhs?"":` = ${this.rhs}`;return`${Ce} ${this.name}${ye};`+de}optimizeNames(ie,de){if(ie[this.name.str])return this.rhs&&(this.rhs=d(this.rhs,ie,de)),this}get names(){return this.rhs instanceof p._CodeOrName?this.rhs.names:{}}}class g extends u{constructor(ie,de,Ce){super(),this.lhs=ie,this.rhs=de,this.sideEffects=Ce}render({_n:ie}){return`${this.lhs} = ${this.rhs};`+ie}optimizeNames(ie,de){if(!(this.lhs instanceof p.Name)||ie[this.lhs.str]||this.sideEffects)return this.rhs=d(this.rhs,ie,de),this}get names(){return s(this.lhs instanceof p.Name?{}:{...this.lhs.names},this.rhs)}}class b extends g{constructor(ie,de,Ce,ye){super(ie,Ce,ye),this.op=de}render({_n:ie}){return`${this.lhs} ${this.op}= ${this.rhs};`+ie}}class I extends u{constructor(ie){super(),this.label=ie,this.names={}}render({_n:ie}){return`${this.label}:`+ie}}class _ extends u{constructor(ie){super(),this.label=ie,this.names={}}render({_n:ie}){return`break${this.label?` ${this.label}`:""};`+ie}}class A extends u{constructor(ie){super(),this.error=ie}render({_n:ie}){return`throw ${this.error};`+ie}get names(){return this.error.names}}class R extends u{constructor(ie){super(),this.code=ie}render({_n:ie}){return`${this.code};`+ie}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(ie,de){return this.code=d(this.code,ie,de),this}get names(){return this.code instanceof p._CodeOrName?this.code.names:{}}}class D extends u{constructor(ie=[]){super(),this.nodes=ie}render(ie){return this.nodes.reduce((de,Ce)=>de+Ce.render(ie),"")}optimizeNodes(){const{nodes:ie}=this;let de=ie.length;for(;de--;){const Ce=ie[de].optimizeNodes();Array.isArray(Ce)?ie.splice(de,1,...Ce):Ce?ie[de]=Ce:ie.splice(de,1)}return ie.length>0?this:void 0}optimizeNames(ie,de){const{nodes:Ce}=this;let ye=Ce.length;for(;ye--;){const ve=Ce[ye];ve.optimizeNames(ie,de)||(h(ie,ve.names),Ce.splice(ye,1))}return Ce.length>0?this:void 0}get names(){return this.nodes.reduce((ie,de)=>r(ie,de.names),{})}}class T extends D{render(ie){return"{"+ie._n+super.render(ie)+"}"+ie._n}}class F extends D{}class L extends T{}L.kind="else";class V extends T{constructor(ie,de){super(de),this.condition=ie}render(ie){let de=`if(${this.condition})`+super.render(ie);return this.else&&(de+="else "+this.else.render(ie)),de}optimizeNodes(){super.optimizeNodes();const ie=this.condition;if(!0===ie)return this.nodes;let de=this.else;if(de){const Ce=de.optimizeNodes();de=this.else=Array.isArray(Ce)?new L(Ce):Ce}return de?!1===ie?de instanceof V?de:de.nodes:this.nodes.length?this:new V(E(ie),de instanceof V?[de]:de.nodes):!1!==ie&&this.nodes.length?this:void 0}optimizeNames(ie,de){var Ce;if(this.else=null===(Ce=this.else)||void 0===Ce?void 0:Ce.optimizeNames(ie,de),super.optimizeNames(ie,de)||this.else)return this.condition=d(this.condition,ie,de),this}get names(){const ie=super.names;return s(ie,this.condition),this.else&&r(ie,this.else.names),ie}}V.kind="if";class j extends T{}j.kind="for";class Z extends j{constructor(ie){super(),this.iteration=ie}render(ie){return`for(${this.iteration})`+super.render(ie)}optimizeNames(ie,de){if(super.optimizeNames(ie,de))return this.iteration=d(this.iteration,ie,de),this}get names(){return r(super.names,this.iteration.names)}}class Y extends j{constructor(ie,de,Ce,ye){super(),this.varKind=ie,this.name=de,this.from=Ce,this.to=ye}render(ie){const de=ie.es5?C.varKinds.var:this.varKind,{name:Ce,from:ye,to:ve}=this;return`for(${de} ${Ce}=${ye}; ${Ce}<${ve}; ${Ce}++)`+super.render(ie)}get names(){const ie=s(super.names,this.from);return s(ie,this.to)}}class G extends j{constructor(ie,de,Ce,ye){super(),this.loop=ie,this.varKind=de,this.name=Ce,this.iterable=ye}render(ie){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(ie)}optimizeNames(ie,de){if(super.optimizeNames(ie,de))return this.iterable=d(this.iterable,ie,de),this}get names(){return r(super.names,this.iterable.names)}}class q extends T{constructor(ie,de,Ce){super(),this.name=ie,this.args=de,this.async=Ce}render(ie){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(ie)}}q.kind="func";class X extends D{render(ie){return"return "+super.render(ie)}}X.kind="return";class Q extends T{render(ie){let de="try"+super.render(ie);return this.catch&&(de+=this.catch.render(ie)),this.finally&&(de+=this.finally.render(ie)),de}optimizeNodes(){var ie,de;return super.optimizeNodes(),null===(ie=this.catch)||void 0===ie||ie.optimizeNodes(),null===(de=this.finally)||void 0===de||de.optimizeNodes(),this}optimizeNames(ie,de){var Ce,ye;return super.optimizeNames(ie,de),null===(Ce=this.catch)||void 0===Ce||Ce.optimizeNames(ie,de),null===(ye=this.finally)||void 0===ye||ye.optimizeNames(ie,de),this}get names(){const ie=super.names;return this.catch&&r(ie,this.catch.names),this.finally&&r(ie,this.finally.names),ie}}class z extends T{constructor(ie){super(),this.error=ie}render(ie){return`catch(${this.error})`+super.render(ie)}}z.kind="catch";class $ extends T{render(ie){return"finally"+super.render(ie)}}$.kind="finally";function r(te,ie){for(const de in ie)te[de]=(te[de]||0)+(ie[de]||0);return te}function s(te,ie){return ie instanceof p._CodeOrName?r(te,ie.names):te}function d(te,ie,de){return te instanceof p.Name?Ce(te):function ye(ve){return ve instanceof p._Code&&ve._items.some(ae=>ae instanceof p.Name&&1===ie[ae.str]&&void 0!==de[ae.str])}(te)?new p._Code(te._items.reduce((ve,ae)=>(ae instanceof p.Name&&(ae=Ce(ae)),ae instanceof p._Code?ve.push(...ae._items):ve.push(ae),ve),[])):te;function Ce(ve){const ae=de[ve.str];return void 0===ae||1!==ie[ve.str]?ve:(delete ie[ve.str],ae)}}function h(te,ie){for(const de in ie)te[de]=(te[de]||0)-(ie[de]||0)}function E(te){return"boolean"==typeof te||"number"==typeof te||null===te?!te:p._`!${se(te)}`}a.CodeGen=class S{constructor(ie,de={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...de,_n:de.lines?"\n":""},this._extScope=ie,this._scope=new C.Scope({parent:ie}),this._nodes=[new F]}toString(){return this._root.render(this.opts)}name(ie){return this._scope.name(ie)}scopeName(ie){return this._extScope.name(ie)}scopeValue(ie,de){const Ce=this._extScope.value(ie,de);return(this._values[Ce.prefix]||(this._values[Ce.prefix]=new Set)).add(Ce),Ce}getScopeValue(ie,de){return this._extScope.getValue(ie,de)}scopeRefs(ie){return this._extScope.scopeRefs(ie,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(ie,de,Ce,ye){const ve=this._scope.toName(de);return void 0!==Ce&&ye&&(this._constants[ve.str]=Ce),this._leafNode(new v(ie,ve,Ce)),ve}const(ie,de,Ce){return this._def(C.varKinds.const,ie,de,Ce)}let(ie,de,Ce){return this._def(C.varKinds.let,ie,de,Ce)}var(ie,de,Ce){return this._def(C.varKinds.var,ie,de,Ce)}assign(ie,de,Ce){return this._leafNode(new g(ie,de,Ce))}add(ie,de){return this._leafNode(new b(ie,a.operators.ADD,de))}code(ie){return"function"==typeof ie?ie():ie!==p.nil&&this._leafNode(new R(ie)),this}object(...ie){const de=["{"];for(const[Ce,ye]of ie)de.length>1&&de.push(","),de.push(Ce),(Ce!==ye||this.opts.es5)&&(de.push(":"),(0,p.addCodeArg)(de,ye));return de.push("}"),new p._Code(de)}if(ie,de,Ce){if(this._blockNode(new V(ie)),de&&Ce)this.code(de).else().code(Ce).endIf();else if(de)this.code(de).endIf();else if(Ce)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(ie){return this._elseNode(new V(ie))}else(){return this._elseNode(new L)}endIf(){return this._endBlockNode(V,L)}_for(ie,de){return this._blockNode(ie),de&&this.code(de).endFor(),this}for(ie,de){return this._for(new Z(ie),de)}forRange(ie,de,Ce,ye,ve=(this.opts.es5?C.varKinds.var:C.varKinds.let)){const ae=this._scope.toName(ie);return this._for(new Y(ve,ae,de,Ce),()=>ye(ae))}forOf(ie,de,Ce,ye=C.varKinds.const){const ve=this._scope.toName(ie);if(this.opts.es5){const ae=de instanceof p.Name?de:this.var("_arr",de);return this.forRange("_i",0,p._`${ae}.length`,fe=>{this.var(ve,p._`${ae}[${fe}]`),Ce(ve)})}return this._for(new G("of",ye,ve,de),()=>Ce(ve))}forIn(ie,de,Ce,ye=(this.opts.es5?C.varKinds.var:C.varKinds.const)){if(this.opts.ownProperties)return this.forOf(ie,p._`Object.keys(${de})`,Ce);const ve=this._scope.toName(ie);return this._for(new G("in",ye,ve,de),()=>Ce(ve))}endFor(){return this._endBlockNode(j)}label(ie){return this._leafNode(new I(ie))}break(ie){return this._leafNode(new _(ie))}return(ie){const de=new X;if(this._blockNode(de),this.code(ie),1!==de.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(X)}try(ie,de,Ce){if(!de&&!Ce)throw new Error('CodeGen: "try" without "catch" and "finally"');const ye=new Q;if(this._blockNode(ye),this.code(ie),de){const ve=this.name("e");this._currNode=ye.catch=new z(ve),de(ve)}return Ce&&(this._currNode=ye.finally=new $,this.code(Ce)),this._endBlockNode(z,$)}throw(ie){return this._leafNode(new A(ie))}block(ie,de){return this._blockStarts.push(this._nodes.length),ie&&this.code(ie).endBlock(de),this}endBlock(ie){const de=this._blockStarts.pop();if(void 0===de)throw new Error("CodeGen: not in self-balancing block");const Ce=this._nodes.length-de;if(Ce<0||void 0!==ie&&Ce!==ie)throw new Error(`CodeGen: wrong number of nodes: ${Ce} vs ${ie} expected`);return this._nodes.length=de,this}func(ie,de=p.nil,Ce,ye){return this._blockNode(new q(ie,de,Ce)),ye&&this.code(ye).endFunc(),this}endFunc(){return this._endBlockNode(q)}optimize(ie=1){for(;ie-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(ie){return this._currNode.nodes.push(ie),this}_blockNode(ie){this._currNode.nodes.push(ie),this._nodes.push(ie)}_endBlockNode(ie,de){const Ce=this._currNode;if(Ce instanceof ie||de&&Ce instanceof de)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${de?`${ie.kind}/${de.kind}`:ie.kind}"`)}_elseNode(ie){const de=this._currNode;if(!(de instanceof V))throw new Error('CodeGen: "else" without "if"');return this._currNode=de.else=ie,this}get _root(){return this._nodes[0]}get _currNode(){const ie=this._nodes;return ie[ie.length-1]}set _currNode(ie){const de=this._nodes;de[de.length-1]=ie}},a.not=E;const k=P(a.operators.AND);a.and=function B(...te){return te.reduce(k)};const x=P(a.operators.OR);function P(te){return(ie,de)=>ie===p.nil?de:de===p.nil?ie:p._`${se(ie)} ${te} ${se(de)}`}function se(te){return te instanceof p.Name?te:p._`(${te})`}a.or=function f(...te){return te.reduce(x)}},1917:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ValueScope=a.ValueScopeName=a.Scope=a.varKinds=a.UsedValueState=void 0;const p=y(26295);class C extends Error{constructor(I){super(`CodeGen: "code" for ${I} not defined`),this.value=I.value}}var w,b;(b=w=a.UsedValueState||(a.UsedValueState={}))[b.Started=0]="Started",b[b.Completed=1]="Completed",a.varKinds={const:new p.Name("const"),let:new p.Name("let"),var:new p.Name("var")};class M{constructor({prefixes:I,parent:_}={}){this._names={},this._prefixes=I,this._parent=_}toName(I){return I instanceof p.Name?I:this.name(I)}name(I){return new p.Name(this._newName(I))}_newName(I){return`${I}${(this._names[I]||this._nameGroup(I)).index++}`}_nameGroup(I){var _,A;if(null!==(A=null===(_=this._parent)||void 0===_?void 0:_._prefixes)&&void 0!==A&&A.has(I)||this._prefixes&&!this._prefixes.has(I))throw new Error(`CodeGen: prefix "${I}" is not allowed in this scope`);return this._names[I]={prefix:I,index:0}}}a.Scope=M;class u extends p.Name{constructor(I,_){super(_),this.prefix=I}setValue(I,{property:_,itemIndex:A}){this.value=I,this.scopePath=p._`.${new p.Name(_)}[${A}]`}}a.ValueScopeName=u;const v=p._`\n`;a.ValueScope=class g extends M{constructor(I){super(I),this._values={},this._scope=I.scope,this.opts={...I,_n:I.lines?v:p.nil}}get(){return this._scope}name(I){return new u(I,this._newName(I))}value(I,_){var A;if(void 0===_.ref)throw new Error("CodeGen: ref must be passed in value");const R=this.toName(I),{prefix:D}=R,T=null!==(A=_.key)&&void 0!==A?A:_.ref;let F=this._values[D];if(F){const j=F.get(T);if(j)return j}else F=this._values[D]=new Map;F.set(T,R);const L=this._scope[D]||(this._scope[D]=[]),V=L.length;return L[V]=_.ref,R.setValue(_,{property:D,itemIndex:V}),R}getValue(I,_){const A=this._values[I];if(A)return A.get(_)}scopeRefs(I,_=this._values){return this._reduceValues(_,A=>{if(void 0===A.scopePath)throw new Error(`CodeGen: name "${A}" has no value`);return p._`${I}${A.scopePath}`})}scopeCode(I=this._values,_,A){return this._reduceValues(I,R=>{if(void 0===R.value)throw new Error(`CodeGen: name "${R}" has no value`);return R.value.code},_,A)}_reduceValues(I,_,A={},R){let D=p.nil;for(const T in I){const F=I[T];if(!F)continue;const L=A[T]=A[T]||new Map;F.forEach(V=>{if(L.has(V))return;L.set(V,w.Started);let j=_(V);if(j){const Z=this.opts.es5?a.varKinds.var:a.varKinds.const;D=p._`${D}${Z} ${V} = ${j};${this.opts._n}`}else{if(!(j=R?.(V)))throw new C(V);D=p._`${D}${j}${this.opts._n}`}L.set(V,w.Completed)})}return D}}},75091:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.extendErrors=a.resetErrorsCount=a.reportExtraError=a.reportError=a.keyword$DataError=a.keywordError=void 0;const p=y(56382),C=y(97990),w=y(5976);function b(L,V){const j=L.const("err",V);L.if(p._`${w.default.vErrors} === null`,()=>L.assign(w.default.vErrors,p._`[${j}]`),p._`${w.default.vErrors}.push(${j})`),L.code(p._`${w.default.errors}++`)}function I(L,V){const{gen:j,validateName:Z,schemaEnv:Y}=L;Y.$async?j.throw(p._`new ${L.ValidationError}(${V})`):(j.assign(p._`${Z}.errors`,V),j.return(!1))}a.keywordError={message:({keyword:L})=>p.str`must pass "${L}" keyword validation`},a.keyword$DataError={message:({keyword:L,schemaType:V})=>V?p.str`"${L}" keyword must be ${V} ($data)`:p.str`"${L}" keyword is invalid ($data)`},a.reportError=function M(L,V=a.keywordError,j,Z){const{it:Y}=L,{gen:G,compositeRule:q,allErrors:X}=Y,Q=A(L,V,j);Z??(q||X)?b(G,Q):I(Y,p._`[${Q}]`)},a.reportExtraError=function u(L,V=a.keywordError,j){const{it:Z}=L,{gen:Y,compositeRule:G,allErrors:q}=Z;b(Y,A(L,V,j)),G||q||I(Z,w.default.vErrors)},a.resetErrorsCount=function v(L,V){L.assign(w.default.errors,V),L.if(p._`${w.default.vErrors} !== null`,()=>L.if(V,()=>L.assign(p._`${w.default.vErrors}.length`,V),()=>L.assign(w.default.vErrors,null)))},a.extendErrors=function g({gen:L,keyword:V,schemaValue:j,data:Z,errsCount:Y,it:G}){if(void 0===Y)throw new Error("ajv implementation error");const q=L.name("err");L.forRange("i",Y,w.default.errors,X=>{L.const(q,p._`${w.default.vErrors}[${X}]`),L.if(p._`${q}.instancePath === undefined`,()=>L.assign(p._`${q}.instancePath`,(0,p.strConcat)(w.default.instancePath,G.errorPath))),L.assign(p._`${q}.schemaPath`,p.str`${G.errSchemaPath}/${V}`),G.opts.verbose&&(L.assign(p._`${q}.schema`,j),L.assign(p._`${q}.data`,Z))})};const _={keyword:new p.Name("keyword"),schemaPath:new p.Name("schemaPath"),params:new p.Name("params"),propertyName:new p.Name("propertyName"),message:new p.Name("message"),schema:new p.Name("schema"),parentSchema:new p.Name("parentSchema")};function A(L,V,j){const{createErrors:Z}=L.it;return!1===Z?p._`{}`:function R(L,V,j={}){const{gen:Z,it:Y}=L,G=[D(Y,j),T(L,j)];return function F(L,{params:V,message:j},Z){const{keyword:Y,data:G,schemaValue:q,it:X}=L,{opts:Q,propertyName:z,topSchemaRef:$,schemaPath:S}=X;Z.push([_.keyword,Y],[_.params,"function"==typeof V?V(L):V||p._`{}`]),Q.messages&&Z.push([_.message,"function"==typeof j?j(L):j]),Q.verbose&&Z.push([_.schema,q],[_.parentSchema,p._`${$}${S}`],[w.default.data,G]),z&&Z.push([_.propertyName,z])}(L,V,G),Z.object(...G)}(L,V,j)}function D({errorPath:L},{instancePath:V}){const j=V?p.str`${L}${(0,C.getErrorPath)(V,C.Type.Str)}`:L;return[w.default.instancePath,(0,p.strConcat)(w.default.instancePath,j)]}function T({keyword:L,it:{errSchemaPath:V}},{schemaPath:j,parentSchema:Z}){let Y=Z?V:p.str`${V}/${L}`;return j&&(Y=p.str`${Y}${(0,C.getErrorPath)(j,C.Type.Str)}`),[_.schemaPath,Y]}},17140:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.resolveSchema=a.getCompilingSchema=a.resolveRef=a.compileSchema=a.SchemaEnv=void 0;const p=y(56382),C=y(20496),w=y(5976),M=y(31880),u=y(97990),v=y(66764);class g{constructor(j){var Z;let Y;this.refs={},this.dynamicAnchors={},"object"==typeof j.schema&&(Y=j.schema),this.schema=j.schema,this.schemaId=j.schemaId,this.root=j.root||this,this.baseId=null!==(Z=j.baseId)&&void 0!==Z?Z:(0,M.normalizeId)(Y?.[j.schemaId||"$id"]),this.schemaPath=j.schemaPath,this.localRefs=j.localRefs,this.meta=j.meta,this.$async=Y?.$async,this.refs={}}}function b(V){const j=A.call(this,V);if(j)return j;const Z=(0,M.getFullPath)(this.opts.uriResolver,V.root.baseId),{es5:Y,lines:G}=this.opts.code,{ownProperties:q}=this.opts,X=new p.CodeGen(this.scope,{es5:Y,lines:G,ownProperties:q});let Q;V.$async&&(Q=X.scopeValue("Error",{ref:C.default,code:p._`require("ajv/dist/runtime/validation_error").default`}));const z=X.scopeName("validate");V.validateName=z;const $={gen:X,allErrors:this.opts.allErrors,data:w.default.data,parentData:w.default.parentData,parentDataProperty:w.default.parentDataProperty,dataNames:[w.default.data],dataPathArr:[p.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:X.scopeValue("schema",!0===this.opts.code.source?{ref:V.schema,code:(0,p.stringify)(V.schema)}:{ref:V.schema}),validateName:z,ValidationError:Q,schema:V.schema,schemaEnv:V,rootId:Z,baseId:V.baseId||Z,schemaPath:p.nil,errSchemaPath:V.schemaPath||(this.opts.jtd?"":"#"),errorPath:p._`""`,opts:this.opts,self:this};let S;try{this._compilations.add(V),(0,v.validateFunctionCode)($),X.optimize(this.opts.code.optimize);const r=X.toString();S=`${X.scopeRefs(w.default.scope)}return ${r}`,this.opts.code.process&&(S=this.opts.code.process(S,V));const d=new Function(`${w.default.self}`,`${w.default.scope}`,S)(this,this.scope.get());if(this.scope.value(z,{ref:d}),d.errors=null,d.schema=V.schema,d.schemaEnv=V,V.$async&&(d.$async=!0),!0===this.opts.code.source&&(d.source={validateName:z,validateCode:r,scopeValues:X._values}),this.opts.unevaluated){const{props:h,items:E}=$;d.evaluated={props:h instanceof p.Name?void 0:h,items:E instanceof p.Name?void 0:E,dynamicProps:h instanceof p.Name,dynamicItems:E instanceof p.Name},d.source&&(d.source.evaluated=(0,p.stringify)(d.evaluated))}return V.validate=d,V}catch(r){throw delete V.validate,delete V.validateName,S&&this.logger.error("Error compiling schema, function code:",S),r}finally{this._compilations.delete(V)}}function _(V){return(0,M.inlineRef)(V.schema,this.opts.inlineRefs)?V.schema:V.validate?V:b.call(this,V)}function A(V){for(const j of this._compilations)if(R(j,V))return j}function R(V,j){return V.schema===j.schema&&V.root===j.root&&V.baseId===j.baseId}function D(V,j){let Z;for(;"string"==typeof(Z=this.refs[j]);)j=Z;return Z||this.schemas[j]||T.call(this,V,j)}function T(V,j){const Z=this.opts.uriResolver.parse(j),Y=(0,M._getFullPath)(this.opts.uriResolver,Z);let G=(0,M.getFullPath)(this.opts.uriResolver,V.baseId,void 0);if(Object.keys(V.schema).length>0&&Y===G)return L.call(this,Z,V);const q=(0,M.normalizeId)(Y),X=this.refs[q]||this.schemas[q];if("string"==typeof X){const Q=T.call(this,V,X);return"object"!=typeof Q?.schema?void 0:L.call(this,Z,Q)}if("object"==typeof X?.schema){if(X.validate||b.call(this,X),q===(0,M.normalizeId)(j)){const{schema:Q}=X,{schemaId:z}=this.opts,$=Q[z];return $&&(G=(0,M.resolveUrl)(this.opts.uriResolver,G,$)),new g({schema:Q,schemaId:z,root:V,baseId:G})}return L.call(this,Z,X)}}a.SchemaEnv=g,a.compileSchema=b,a.resolveRef=function I(V,j,Z){var Y;Z=(0,M.resolveUrl)(this.opts.uriResolver,j,Z);const G=V.refs[Z];if(G)return G;let q=D.call(this,V,Z);if(void 0===q){const X=null===(Y=V.localRefs)||void 0===Y?void 0:Y[Z],{schemaId:Q}=this.opts;X&&(q=new g({schema:X,schemaId:Q,root:V,baseId:j}))}return void 0!==q?V.refs[Z]=_.call(this,q):void 0},a.getCompilingSchema=A,a.resolveSchema=T;const F=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function L(V,{baseId:j,schema:Z,root:Y}){var G;if("/"!==(null===(G=V.fragment)||void 0===G?void 0:G[0]))return;for(const Q of V.fragment.slice(1).split("/")){if("boolean"==typeof Z)return;const z=Z[(0,u.unescapeFragment)(Q)];if(void 0===z)return;const $="object"==typeof(Z=z)&&Z[this.opts.schemaId];!F.has(Q)&&$&&(j=(0,M.resolveUrl)(this.opts.uriResolver,j,$))}let q;if("boolean"!=typeof Z&&Z.$ref&&!(0,u.schemaHasRulesButRef)(Z,this.RULES)){const Q=(0,M.resolveUrl)(this.opts.uriResolver,j,Z.$ref);q=T.call(this,Y,Q)}const{schemaId:X}=this.opts;return q=q||new g({schema:Z,schemaId:X,root:Y,baseId:j}),q.schema!==q.root.schema?q:void 0}},5976:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C={data:new p.Name("data"),valCxt:new p.Name("valCxt"),instancePath:new p.Name("instancePath"),parentData:new p.Name("parentData"),parentDataProperty:new p.Name("parentDataProperty"),rootData:new p.Name("rootData"),dynamicAnchors:new p.Name("dynamicAnchors"),vErrors:new p.Name("vErrors"),errors:new p.Name("errors"),this:new p.Name("this"),self:new p.Name("self"),scope:new p.Name("scope"),json:new p.Name("json"),jsonPos:new p.Name("jsonPos"),jsonLen:new p.Name("jsonLen"),jsonPart:new p.Name("jsonPart")};a.default=C},80140:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(31880);class C extends Error{constructor(M,u,v,g){super(g||`can't resolve reference ${v} from id ${u}`),this.missingRef=(0,p.resolveUrl)(M,u,v),this.missingSchema=(0,p.normalizeId)((0,p.getFullPath)(M,this.missingRef))}}a.default=C},31880:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getSchemaRefs=a.resolveUrl=a.normalizeId=a._getFullPath=a.getFullPath=a.inlineRef=void 0;const p=y(97990),C=y(12559),w=y(23366),M=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);a.inlineRef=function u(L,V=!0){return"boolean"==typeof L||(!0===V?!g(L):!!V&&b(L)<=V)};const v=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function g(L){for(const V in L){if(v.has(V))return!0;const j=L[V];if(Array.isArray(j)&&j.some(g)||"object"==typeof j&&g(j))return!0}return!1}function b(L){let V=0;for(const j in L){if("$ref"===j)return 1/0;if(V++,!M.has(j)&&("object"==typeof L[j]&&(0,p.eachItem)(L[j],Z=>V+=b(Z)),V===1/0))return 1/0}return V}function I(L,V="",j){!1!==j&&(V=R(V));const Z=L.parse(V);return _(L,Z)}function _(L,V){return L.serialize(V).split("#")[0]+"#"}a.getFullPath=I,a._getFullPath=_;const A=/#\/?$/;function R(L){return L?L.replace(A,""):""}a.normalizeId=R,a.resolveUrl=function D(L,V,j){return j=R(j),L.resolve(V,j)};const T=/^[a-z_][-a-z0-9._]*$/i;a.getSchemaRefs=function F(L,V){if("boolean"==typeof L)return{};const{schemaId:j,uriResolver:Z}=this.opts,Y=R(L[j]||V),G={"":Y},q=I(Z,Y,!1),X={},Q=new Set;return w(L,{allKeys:!0},(S,r,s,d)=>{if(void 0===d)return;const h=q+r;let E=G[d];function k(x){const f=this.opts.uriResolver.resolve;if(x=R(E?f(E,x):x),Q.has(x))throw $(x);Q.add(x);let P=this.refs[x];return"string"==typeof P&&(P=this.refs[P]),"object"==typeof P?z(S,P.schema,x):x!==R(h)&&("#"===x[0]?(z(S,X[x],x),X[x]=S):this.refs[x]=h),x}function B(x){if("string"==typeof x){if(!T.test(x))throw new Error(`invalid anchor "${x}"`);k.call(this,`#${x}`)}}"string"==typeof S[j]&&(E=k.call(this,S[j])),B.call(this,S.$anchor),B.call(this,S.$dynamicAnchor),G[r]=E}),X;function z(S,r,s){if(void 0!==r&&!C(S,r))throw $(s)}function $(S){return new Error(`reference "${S}" resolves to more than one schema`)}}},62848:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getRules=a.isJSONType=void 0;const p=new Set(["string","number","integer","boolean","null","object","array"]);a.isJSONType=function C(M){return"string"==typeof M&&p.has(M)},a.getRules=function w(){const M={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...M,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},M.number,M.string,M.array,M.object],post:{rules:[]},all:{},keywords:{}}}},97990:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.checkStrictMode=a.getErrorPath=a.Type=a.useFunc=a.setEvaluated=a.evaluatedPropsToName=a.mergeEvaluated=a.eachItem=a.unescapeJsonPointer=a.escapeJsonPointer=a.escapeFragment=a.unescapeFragment=a.schemaRefOrVal=a.schemaHasRulesButRef=a.schemaHasRules=a.checkUnknownRules=a.alwaysValidSchema=a.toHash=void 0;const p=y(56382),C=y(26295);function u(q,X=q.schema){const{opts:Q,self:z}=q;if(!Q.strictSchema||"boolean"==typeof X)return;const $=z.RULES.keywords;for(const S in X)$[S]||G(q,`unknown keyword: "${S}"`)}function v(q,X){if("boolean"==typeof q)return!q;for(const Q in q)if(X[Q])return!0;return!1}function A(q){return"number"==typeof q?`${q}`:q.replace(/~/g,"~0").replace(/\//g,"~1")}function R(q){return q.replace(/~1/g,"/").replace(/~0/g,"~")}function T({mergeNames:q,mergeToName:X,mergeValues:Q,resultToName:z}){return($,S,r,s)=>{const d=void 0===r?S:r instanceof p.Name?(S instanceof p.Name?q($,S,r):X($,S,r),r):S instanceof p.Name?(X($,r,S),S):Q(S,r);return s!==p.Name||d instanceof p.Name?d:z($,d)}}function F(q,X){if(!0===X)return q.var("props",!0);const Q=q.var("props",p._`{}`);return void 0!==X&&L(q,Q,X),Q}function L(q,X,Q){Object.keys(Q).forEach(z=>q.assign(p._`${X}${(0,p.getProperty)(z)}`,!0))}a.toHash=function w(q){const X={};for(const Q of q)X[Q]=!0;return X},a.alwaysValidSchema=function M(q,X){return"boolean"==typeof X?X:0===Object.keys(X).length||(u(q,X),!v(X,q.self.RULES.all))},a.checkUnknownRules=u,a.schemaHasRules=v,a.schemaHasRulesButRef=function g(q,X){if("boolean"==typeof q)return!q;for(const Q in q)if("$ref"!==Q&&X.all[Q])return!0;return!1},a.schemaRefOrVal=function b({topSchemaRef:q,schemaPath:X},Q,z,$){if(!$){if("number"==typeof Q||"boolean"==typeof Q)return Q;if("string"==typeof Q)return p._`${Q}`}return p._`${q}${X}${(0,p.getProperty)(z)}`},a.unescapeFragment=function I(q){return R(decodeURIComponent(q))},a.escapeFragment=function _(q){return encodeURIComponent(A(q))},a.escapeJsonPointer=A,a.unescapeJsonPointer=R,a.eachItem=function D(q,X){if(Array.isArray(q))for(const Q of q)X(Q);else X(q)},a.mergeEvaluated={props:T({mergeNames:(q,X,Q)=>q.if(p._`${Q} !== true && ${X} !== undefined`,()=>{q.if(p._`${X} === true`,()=>q.assign(Q,!0),()=>q.assign(Q,p._`${Q} || {}`).code(p._`Object.assign(${Q}, ${X})`))}),mergeToName:(q,X,Q)=>q.if(p._`${Q} !== true`,()=>{!0===X?q.assign(Q,!0):(q.assign(Q,p._`${Q} || {}`),L(q,Q,X))}),mergeValues:(q,X)=>!0===q||{...q,...X},resultToName:F}),items:T({mergeNames:(q,X,Q)=>q.if(p._`${Q} !== true && ${X} !== undefined`,()=>q.assign(Q,p._`${X} === true ? true : ${Q} > ${X} ? ${Q} : ${X}`)),mergeToName:(q,X,Q)=>q.if(p._`${Q} !== true`,()=>q.assign(Q,!0===X||p._`${Q} > ${X} ? ${Q} : ${X}`)),mergeValues:(q,X)=>!0===q||Math.max(q,X),resultToName:(q,X)=>q.var("items",X)})},a.evaluatedPropsToName=F,a.setEvaluated=L;const V={};var Z,q;function G(q,X,Q=q.opts.strictSchema){if(Q){if(X=`strict mode: ${X}`,!0===Q)throw new Error(X);q.self.logger.warn(X)}}a.useFunc=function j(q,X){return q.scopeValue("func",{ref:X,code:V[X.code]||(V[X.code]=new C._Code(X.code))})},(q=Z=a.Type||(a.Type={}))[q.Num=0]="Num",q[q.Str=1]="Str",a.getErrorPath=function Y(q,X,Q){if(q instanceof p.Name){const z=X===Z.Num;return Q?z?p._`"[" + ${q} + "]"`:p._`"['" + ${q} + "']"`:z?p._`"/" + ${q}`:p._`"/" + ${q}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return Q?(0,p.getProperty)(q).toString():"/"+A(q)},a.checkStrictMode=G},20368:(ne,a)=>{"use strict";function p(w,M){return M.rules.some(u=>C(w,u))}function C(w,M){var u;return void 0!==w[M.keyword]||(null===(u=M.definition.implements)||void 0===u?void 0:u.some(v=>void 0!==w[v]))}Object.defineProperty(a,"__esModule",{value:!0}),a.shouldUseRule=a.shouldUseGroup=a.schemaHasRulesForType=void 0,a.schemaHasRulesForType=function y({schema:w,self:M},u){const v=M.RULES.types[u];return v&&!0!==v&&p(w,v)},a.shouldUseGroup=p,a.shouldUseRule=C},8007:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.boolOrEmptySchema=a.topBoolOrEmptySchema=void 0;const p=y(75091),C=y(56382),w=y(5976),M={message:"boolean schema is false"};function g(b,I){const{gen:_,data:A}=b,R={gen:_,keyword:"false schema",data:A,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:b};(0,p.reportError)(R,M,void 0,I)}a.topBoolOrEmptySchema=function u(b){const{gen:I,schema:_,validateName:A}=b;!1===_?g(b,!1):"object"==typeof _&&!0===_.$async?I.return(w.default.data):(I.assign(C._`${A}.errors`,null),I.return(!0))},a.boolOrEmptySchema=function v(b,I){const{gen:_,schema:A}=b;!1===A?(_.var(I,!1),g(b)):_.var(I,!0)}},59078:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.reportTypeError=a.checkDataTypes=a.checkDataType=a.coerceAndCheckDataType=a.getJSONTypes=a.getSchemaTypes=a.DataType=void 0;const p=y(62848),C=y(20368),w=y(75091),M=y(56382),u=y(97990);var v,Z;function b(Z){const Y=Array.isArray(Z)?Z:Z?[Z]:[];if(Y.every(p.isJSONType))return Y;throw new Error("type must be JSONType or JSONType[]: "+Y.join(","))}(Z=v=a.DataType||(a.DataType={}))[Z.Correct=0]="Correct",Z[Z.Wrong=1]="Wrong",a.getSchemaTypes=function g(Z){const Y=b(Z.type);if(Y.includes("null")){if(!1===Z.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!Y.length&&void 0!==Z.nullable)throw new Error('"nullable" cannot be used without "type"');!0===Z.nullable&&Y.push("null")}return Y},a.getJSONTypes=b,a.coerceAndCheckDataType=function I(Z,Y){const{gen:G,data:q,opts:X}=Z,Q=function A(Z,Y){return Y?Z.filter(G=>_.has(G)||"array"===Y&&"array"===G):[]}(Y,X.coerceTypes),z=Y.length>0&&!(0===Q.length&&1===Y.length&&(0,C.schemaHasRulesForType)(Z,Y[0]));if(z){const $=F(Y,q,X.strictNumbers,v.Wrong);G.if($,()=>{Q.length?function R(Z,Y,G){const{gen:q,data:X,opts:Q}=Z,z=q.let("dataType",M._`typeof ${X}`),$=q.let("coerced",M._`undefined`);"array"===Q.coerceTypes&&q.if(M._`${z} == 'object' && Array.isArray(${X}) && ${X}.length == 1`,()=>q.assign(X,M._`${X}[0]`).assign(z,M._`typeof ${X}`).if(F(Y,X,Q.strictNumbers),()=>q.assign($,X))),q.if(M._`${$} !== undefined`);for(const r of G)(_.has(r)||"array"===r&&"array"===Q.coerceTypes)&&S(r);function S(r){switch(r){case"string":return void q.elseIf(M._`${z} == "number" || ${z} == "boolean"`).assign($,M._`"" + ${X}`).elseIf(M._`${X} === null`).assign($,M._`""`);case"number":return void q.elseIf(M._`${z} == "boolean" || ${X} === null - || (${z} == "string" && ${X} && ${X} == +${X})`).assign($,M._`+${X}`);case"integer":return void q.elseIf(M._`${z} === "boolean" || ${X} === null - || (${z} === "string" && ${X} && ${X} == +${X} && !(${X} % 1))`).assign($,M._`+${X}`);case"boolean":return void q.elseIf(M._`${X} === "false" || ${X} === 0 || ${X} === null`).assign($,!1).elseIf(M._`${X} === "true" || ${X} === 1`).assign($,!0);case"null":return q.elseIf(M._`${X} === "" || ${X} === 0 || ${X} === false`),void q.assign($,null);case"array":q.elseIf(M._`${z} === "string" || ${z} === "number" - || ${z} === "boolean" || ${X} === null`).assign($,M._`[${X}]`)}}q.else(),V(Z),q.endIf(),q.if(M._`${$} !== undefined`,()=>{q.assign(X,$),function D({gen:Z,parentData:Y,parentDataProperty:G},q){Z.if(M._`${Y} !== undefined`,()=>Z.assign(M._`${Y}[${G}]`,q))}(Z,$)})}(Z,Y,Q):V(Z)})}return z};const _=new Set(["string","number","integer","boolean","null"]);function T(Z,Y,G,q=v.Correct){const X=q===v.Correct?M.operators.EQ:M.operators.NEQ;let Q;switch(Z){case"null":return M._`${Y} ${X} null`;case"array":Q=M._`Array.isArray(${Y})`;break;case"object":Q=M._`${Y} && typeof ${Y} == "object" && !Array.isArray(${Y})`;break;case"integer":Q=z(M._`!(${Y} % 1) && !isNaN(${Y})`);break;case"number":Q=z();break;default:return M._`typeof ${Y} ${X} ${Z}`}return q===v.Correct?Q:(0,M.not)(Q);function z($=M.nil){return(0,M.and)(M._`typeof ${Y} == "number"`,$,G?M._`isFinite(${Y})`:M.nil)}}function F(Z,Y,G,q){if(1===Z.length)return T(Z[0],Y,G,q);let X;const Q=(0,u.toHash)(Z);if(Q.array&&Q.object){const z=M._`typeof ${Y} != "object"`;X=Q.null?z:M._`!${Y} || ${z}`,delete Q.null,delete Q.array,delete Q.object}else X=M.nil;Q.number&&delete Q.integer;for(const z in Q)X=(0,M.and)(X,T(z,Y,G,q));return X}a.checkDataType=T,a.checkDataTypes=F;const L={message:({schema:Z})=>`must be ${Z}`,params:({schema:Z,schemaValue:Y})=>"string"==typeof Z?M._`{type: ${Z}}`:M._`{type: ${Y}}`};function V(Z){const Y=function j(Z){const{gen:Y,data:G,schema:q}=Z,X=(0,u.schemaRefOrVal)(Z,q,"type");return{gen:Y,keyword:"type",data:G,schema:q.type,schemaCode:X,schemaValue:X,parentSchema:q,params:{},it:Z}}(Z);(0,w.reportError)(Y,L)}a.reportTypeError=V},57866:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.assignDefaults=void 0;const p=y(56382),C=y(97990);function M(u,v,g){const{gen:b,compositeRule:I,data:_,opts:A}=u;if(void 0===g)return;const R=p._`${_}${(0,p.getProperty)(v)}`;if(I)return void(0,C.checkStrictMode)(u,`default is ignored for: ${R}`);let D=p._`${R} === undefined`;"empty"===A.useDefaults&&(D=p._`${D} || ${R} === null || ${R} === ""`),b.if(D,p._`${R} = ${(0,p.stringify)(g)}`)}a.assignDefaults=function w(u,v){const{properties:g,items:b}=u.schema;if("object"===v&&g)for(const I in g)M(u,I,g[I].default);else"array"===v&&Array.isArray(b)&&b.forEach((I,_)=>M(u,_,I.default))}},66764:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getData=a.KeywordCxt=a.validateFunctionCode=void 0;const p=y(8007),C=y(59078),w=y(20368),M=y(59078),u=y(57866),v=y(22707),g=y(62639),b=y(56382),I=y(5976),_=y(31880),A=y(97990),R=y(75091);function T({gen:Ee,validateName:ce,schema:be,schemaEnv:Ne,opts:Fe},ct){Fe.code.es5?Ee.func(ce,b._`${I.default.data}, ${I.default.valCxt}`,Ne.$async,()=>{Ee.code(b._`"use strict"; ${Z(be,Fe)}`),function L(Ee,ce){Ee.if(I.default.valCxt,()=>{Ee.var(I.default.instancePath,b._`${I.default.valCxt}.${I.default.instancePath}`),Ee.var(I.default.parentData,b._`${I.default.valCxt}.${I.default.parentData}`),Ee.var(I.default.parentDataProperty,b._`${I.default.valCxt}.${I.default.parentDataProperty}`),Ee.var(I.default.rootData,b._`${I.default.valCxt}.${I.default.rootData}`),ce.dynamicRef&&Ee.var(I.default.dynamicAnchors,b._`${I.default.valCxt}.${I.default.dynamicAnchors}`)},()=>{Ee.var(I.default.instancePath,b._`""`),Ee.var(I.default.parentData,b._`undefined`),Ee.var(I.default.parentDataProperty,b._`undefined`),Ee.var(I.default.rootData,I.default.data),ce.dynamicRef&&Ee.var(I.default.dynamicAnchors,b._`{}`)})}(Ee,Fe),Ee.code(ct)}):Ee.func(ce,b._`${I.default.data}, ${function F(Ee){return b._`{${I.default.instancePath}="", ${I.default.parentData}, ${I.default.parentDataProperty}, ${I.default.rootData}=${I.default.data}${Ee.dynamicRef?b._`, ${I.default.dynamicAnchors}={}`:b.nil}}={}`}(Fe)}`,Ne.$async,()=>Ee.code(Z(be,Fe)).code(ct))}function Z(Ee,ce){const be="object"==typeof Ee&&Ee[ce.schemaId];return be&&(ce.code.source||ce.code.process)?b._`/*# sourceURL=${be} */`:b.nil}function Y(Ee,ce){q(Ee)&&(Q(Ee),G(Ee))?function X(Ee,ce){const{schema:be,gen:Ne,opts:Fe}=Ee;Fe.$comment&&be.$comment&&d(Ee),function r(Ee){const ce=Ee.schema[Ee.opts.schemaId];ce&&(Ee.baseId=(0,_.resolveUrl)(Ee.opts.uriResolver,Ee.baseId,ce))}(Ee),function s(Ee){if(Ee.schema.$async&&!Ee.schemaEnv.$async)throw new Error("async schema in sync schema")}(Ee);const ct=Ne.const("_errs",I.default.errors);z(Ee,ct),Ne.var(ce,b._`${ct} === ${I.default.errors}`)}(Ee,ce):(0,p.boolOrEmptySchema)(Ee,ce)}function G({schema:Ee,self:ce}){if("boolean"==typeof Ee)return!Ee;for(const be in Ee)if(ce.RULES.all[be])return!0;return!1}function q(Ee){return"boolean"!=typeof Ee.schema}function Q(Ee){(0,A.checkUnknownRules)(Ee),function $(Ee){const{schema:ce,errSchemaPath:be,opts:Ne,self:Fe}=Ee;ce.$ref&&Ne.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(ce,Fe.RULES)&&Fe.logger.warn(`$ref: keywords ignored in schema at path "${be}"`)}(Ee)}function z(Ee,ce){if(Ee.opts.jtd)return k(Ee,[],!1,ce);const be=(0,C.getSchemaTypes)(Ee.schema);k(Ee,be,!(0,C.coerceAndCheckDataType)(Ee,be),ce)}function d({gen:Ee,schemaEnv:ce,schema:be,errSchemaPath:Ne,opts:Fe}){const ct=be.$comment;if(!0===Fe.$comment)Ee.code(b._`${I.default.self}.logger.log(${ct})`);else if("function"==typeof Fe.$comment){const Ze=b.str`${Ne}/$comment`,Ve=Ee.scopeValue("root",{ref:ce.root});Ee.code(b._`${I.default.self}.opts.$comment(${ct}, ${Ze}, ${Ve}.schema)`)}}function k(Ee,ce,be,Ne){const{gen:Fe,schema:ct,data:Ze,allErrors:Ve,opts:Ut,self:$e}=Ee,{RULES:tt}=$e;function Xt(ot){(0,w.shouldUseGroup)(ct,ot)&&(ot.type?(Fe.if((0,M.checkDataType)(ot.type,Ze,Ut.strictNumbers)),B(Ee,ot),1===ce.length&&ce[0]===ot.type&&be&&(Fe.else(),(0,M.reportTypeError)(Ee)),Fe.endIf()):B(Ee,ot),Ve||Fe.if(b._`${I.default.errors} === ${Ne||0}`))}!ct.$ref||!Ut.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(ct,tt)?(Ut.jtd||function x(Ee,ce){Ee.schemaEnv.meta||!Ee.opts.strictTypes||(function f(Ee,ce){if(ce.length){if(!Ee.dataTypes.length)return void(Ee.dataTypes=ce);ce.forEach(be=>{ie(Ee.dataTypes,be)||Ce(Ee,`type "${be}" not allowed by context "${Ee.dataTypes.join(",")}"`)}),function de(Ee,ce){const be=[];for(const Ne of Ee.dataTypes)ie(ce,Ne)?be.push(Ne):ce.includes("integer")&&"number"===Ne&&be.push("integer");Ee.dataTypes=be}(Ee,ce)}}(Ee,ce),Ee.opts.allowUnionTypes||function P(Ee,ce){ce.length>1&&(2!==ce.length||!ce.includes("null"))&&Ce(Ee,"use allowUnionTypes to allow union type keyword")}(Ee,ce),function se(Ee,ce){const be=Ee.self.RULES.all;for(const Ne in be){const Fe=be[Ne];if("object"==typeof Fe&&(0,w.shouldUseRule)(Ee.schema,Fe)){const{type:ct}=Fe.definition;ct.length&&!ct.some(Ze=>te(ce,Ze))&&Ce(Ee,`missing type "${ct.join(",")}" for keyword "${Ne}"`)}}}(Ee,Ee.dataTypes))}(Ee,ce),Fe.block(()=>{for(const ot of tt.rules)Xt(ot);Xt(tt.post)})):Fe.block(()=>ve(Ee,"$ref",tt.all.$ref.definition))}function B(Ee,ce){const{gen:be,schema:Ne,opts:{useDefaults:Fe}}=Ee;Fe&&(0,u.assignDefaults)(Ee,ce.type),be.block(()=>{for(const ct of ce.rules)(0,w.shouldUseRule)(Ne,ct)&&ve(Ee,ct.keyword,ct.definition,ce.type)})}function te(Ee,ce){return Ee.includes(ce)||"number"===ce&&Ee.includes("integer")}function ie(Ee,ce){return Ee.includes(ce)||"integer"===ce&&Ee.includes("number")}function Ce(Ee,ce){ce+=` at "${Ee.schemaEnv.baseId+Ee.errSchemaPath}" (strictTypes)`,(0,A.checkStrictMode)(Ee,ce,Ee.opts.strictTypes)}a.validateFunctionCode=function D(Ee){q(Ee)&&(Q(Ee),G(Ee))?function V(Ee){const{schema:ce,opts:be,gen:Ne}=Ee;T(Ee,()=>{be.$comment&&ce.$comment&&d(Ee),function S(Ee){const{schema:ce,opts:be}=Ee;void 0!==ce.default&&be.useDefaults&&be.strictSchema&&(0,A.checkStrictMode)(Ee,"default is ignored in the schema root")}(Ee),Ne.let(I.default.vErrors,null),Ne.let(I.default.errors,0),be.unevaluated&&function j(Ee){const{gen:ce,validateName:be}=Ee;Ee.evaluated=ce.const("evaluated",b._`${be}.evaluated`),ce.if(b._`${Ee.evaluated}.dynamicProps`,()=>ce.assign(b._`${Ee.evaluated}.props`,b._`undefined`)),ce.if(b._`${Ee.evaluated}.dynamicItems`,()=>ce.assign(b._`${Ee.evaluated}.items`,b._`undefined`))}(Ee),z(Ee),function h(Ee){const{gen:ce,schemaEnv:be,validateName:Ne,ValidationError:Fe,opts:ct}=Ee;be.$async?ce.if(b._`${I.default.errors} === 0`,()=>ce.return(I.default.data),()=>ce.throw(b._`new ${Fe}(${I.default.vErrors})`)):(ce.assign(b._`${Ne}.errors`,I.default.vErrors),ct.unevaluated&&function E({gen:Ee,evaluated:ce,props:be,items:Ne}){be instanceof b.Name&&Ee.assign(b._`${ce}.props`,be),Ne instanceof b.Name&&Ee.assign(b._`${ce}.items`,Ne)}(Ee),ce.return(b._`${I.default.errors} === 0`))}(Ee)})}(Ee):T(Ee,()=>(0,p.topBoolOrEmptySchema)(Ee))};class ye{constructor(ce,be,Ne){if((0,v.validateKeywordUsage)(ce,be,Ne),this.gen=ce.gen,this.allErrors=ce.allErrors,this.keyword=Ne,this.data=ce.data,this.schema=ce.schema[Ne],this.$data=be.$data&&ce.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(ce,this.schema,Ne,this.$data),this.schemaType=be.schemaType,this.parentSchema=ce.schema,this.params={},this.it=ce,this.def=be,this.$data)this.schemaCode=ce.gen.const("vSchema",pe(this.$data,ce));else if(this.schemaCode=this.schemaValue,!(0,v.validSchemaType)(this.schema,be.schemaType,be.allowUndefined))throw new Error(`${Ne} value must be ${JSON.stringify(be.schemaType)}`);("code"in be?be.trackErrors:!1!==be.errors)&&(this.errsCount=ce.gen.const("_errs",I.default.errors))}result(ce,be,Ne){this.failResult((0,b.not)(ce),be,Ne)}failResult(ce,be,Ne){this.gen.if(ce),Ne?Ne():this.error(),be?(this.gen.else(),be(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ce,be){this.failResult((0,b.not)(ce),void 0,be)}fail(ce){if(void 0===ce)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(ce),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ce){if(!this.$data)return this.fail(ce);const{schemaCode:be}=this;this.fail(b._`${be} !== undefined && (${(0,b.or)(this.invalid$data(),ce)})`)}error(ce,be,Ne){if(be)return this.setParams(be),this._error(ce,Ne),void this.setParams({});this._error(ce,Ne)}_error(ce,be){(ce?R.reportExtraError:R.reportError)(this,this.def.error,be)}$dataError(){(0,R.reportError)(this,this.def.$dataError||R.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,R.resetErrorsCount)(this.gen,this.errsCount)}ok(ce){this.allErrors||this.gen.if(ce)}setParams(ce,be){be?Object.assign(this.params,ce):this.params=ce}block$data(ce,be,Ne=b.nil){this.gen.block(()=>{this.check$data(ce,Ne),be()})}check$data(ce=b.nil,be=b.nil){if(!this.$data)return;const{gen:Ne,schemaCode:Fe,schemaType:ct,def:Ze}=this;Ne.if((0,b.or)(b._`${Fe} === undefined`,be)),ce!==b.nil&&Ne.assign(ce,!0),(ct.length||Ze.validateSchema)&&(Ne.elseIf(this.invalid$data()),this.$dataError(),ce!==b.nil&&Ne.assign(ce,!1)),Ne.else()}invalid$data(){const{gen:ce,schemaCode:be,schemaType:Ne,def:Fe,it:ct}=this;return(0,b.or)(function Ze(){if(Ne.length){if(!(be instanceof b.Name))throw new Error("ajv implementation error");const Ut=Array.isArray(Ne)?Ne:[Ne];return b._`${(0,M.checkDataTypes)(Ut,be,ct.opts.strictNumbers,M.DataType.Wrong)}`}return b.nil}(),function Ve(){if(Fe.validateSchema){const Ut=ce.scopeValue("validate$data",{ref:Fe.validateSchema});return b._`!${Ut}(${be})`}return b.nil}())}subschema(ce,be){const Ne=(0,g.getSubschema)(this.it,ce);(0,g.extendSubschemaData)(Ne,this.it,ce),(0,g.extendSubschemaMode)(Ne,ce);const Fe={...this.it,...Ne,items:void 0,props:void 0};return Y(Fe,be),Fe}mergeEvaluated(ce,be){const{it:Ne,gen:Fe}=this;Ne.opts.unevaluated&&(!0!==Ne.props&&void 0!==ce.props&&(Ne.props=A.mergeEvaluated.props(Fe,ce.props,Ne.props,be)),!0!==Ne.items&&void 0!==ce.items&&(Ne.items=A.mergeEvaluated.items(Fe,ce.items,Ne.items,be)))}mergeValidEvaluated(ce,be){const{it:Ne,gen:Fe}=this;if(Ne.opts.unevaluated&&(!0!==Ne.props||!0!==Ne.items))return Fe.if(be,()=>this.mergeEvaluated(ce,b.Name)),!0}}function ve(Ee,ce,be,Ne){const Fe=new ye(Ee,be,ce);"code"in be?be.code(Fe,Ne):Fe.$data&&be.validate?(0,v.funcKeywordCode)(Fe,be):"macro"in be?(0,v.macroKeywordCode)(Fe,be):(be.compile||be.validate)&&(0,v.funcKeywordCode)(Fe,be)}a.KeywordCxt=ye;const ae=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pe(Ee,{dataLevel:ce,dataNames:be,dataPathArr:Ne}){let Fe,ct;if(""===Ee)return I.default.rootData;if("/"===Ee[0]){if(!ae.test(Ee))throw new Error(`Invalid JSON-pointer: ${Ee}`);Fe=Ee,ct=I.default.rootData}else{const $e=fe.exec(Ee);if(!$e)throw new Error(`Invalid JSON-pointer: ${Ee}`);const tt=+$e[1];if(Fe=$e[2],"#"===Fe){if(tt>=ce)throw new Error(Ut("property/index",tt));return Ne[ce-tt]}if(tt>ce)throw new Error(Ut("data",tt));if(ct=be[ce-tt],!Fe)return ct}let Ze=ct;const Ve=Fe.split("/");for(const $e of Ve)$e&&(ct=b._`${ct}${(0,b.getProperty)((0,A.unescapeJsonPointer)($e))}`,Ze=b._`${Ze} && ${ct}`);return Ze;function Ut($e,tt){return`Cannot access ${$e} ${tt} levels up, current level is ${ce}`}}a.getData=pe},22707:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateKeywordUsage=a.validSchemaType=a.funcKeywordCode=a.macroKeywordCode=void 0;const p=y(56382),C=y(5976),w=y(92812),M=y(75091);function g(D){const{gen:T,data:F,it:L}=D;T.if(L.parentData,()=>T.assign(F,p._`${L.parentData}[${L.parentDataProperty}]`))}function _(D,T,F){if(void 0===F)throw new Error(`keyword "${T}" failed to compile`);return D.scopeValue("keyword","function"==typeof F?{ref:F}:{ref:F,code:(0,p.stringify)(F)})}a.macroKeywordCode=function u(D,T){const{gen:F,keyword:L,schema:V,parentSchema:j,it:Z}=D,Y=T.macro.call(Z.self,V,j,Z),G=_(F,L,Y);!1!==Z.opts.validateSchema&&Z.self.validateSchema(Y,!0);const q=F.name("valid");D.subschema({schema:Y,schemaPath:p.nil,errSchemaPath:`${Z.errSchemaPath}/${L}`,topSchemaRef:G,compositeRule:!0},q),D.pass(q,()=>D.error(!0))},a.funcKeywordCode=function v(D,T){var F;const{gen:L,keyword:V,schema:j,parentSchema:Z,$data:Y,it:G}=D;!function I({schemaEnv:D},T){if(T.async&&!D.$async)throw new Error("async keyword in sync schema")}(G,T);const q=!Y&&T.compile?T.compile.call(G.self,j,Z,G):T.validate,X=_(L,V,q),Q=L.let("valid");function r(d=(T.async?p._`await `:p.nil)){const h=G.opts.passContext?C.default.this:C.default.self,E=!("compile"in T&&!Y||!1===T.schema);L.assign(Q,p._`${d}${(0,w.callValidateCode)(D,X,h,E)}`,T.modifying)}function s(d){var h;L.if((0,p.not)(null!==(h=T.valid)&&void 0!==h?h:Q),d)}D.block$data(Q,function z(){if(!1===T.errors)r(),T.modifying&&g(D),s(()=>D.error());else{const d=T.async?function $(){const d=L.let("ruleErrs",null);return L.try(()=>r(p._`await `),h=>L.assign(Q,!1).if(p._`${h} instanceof ${G.ValidationError}`,()=>L.assign(d,p._`${h}.errors`),()=>L.throw(h))),d}():function S(){const d=p._`${X}.errors`;return L.assign(d,null),r(p.nil),d}();T.modifying&&g(D),s(()=>function b(D,T){const{gen:F}=D;F.if(p._`Array.isArray(${T})`,()=>{F.assign(C.default.vErrors,p._`${C.default.vErrors} === null ? ${T} : ${C.default.vErrors}.concat(${T})`).assign(C.default.errors,p._`${C.default.vErrors}.length`),(0,M.extendErrors)(D)},()=>D.error())}(D,d))}}),D.ok(null!==(F=T.valid)&&void 0!==F?F:Q)},a.validSchemaType=function A(D,T,F=!1){return!T.length||T.some(L=>"array"===L?Array.isArray(D):"object"===L?D&&"object"==typeof D&&!Array.isArray(D):typeof D==L||F&&typeof D>"u")},a.validateKeywordUsage=function R({schema:D,opts:T,self:F,errSchemaPath:L},V,j){if(Array.isArray(V.keyword)?!V.keyword.includes(j):V.keyword!==j)throw new Error("ajv implementation error");const Z=V.dependencies;if(Z?.some(Y=>!Object.prototype.hasOwnProperty.call(D,Y)))throw new Error(`parent schema must have dependencies of ${j}: ${Z.join(",")}`);if(V.validateSchema&&!V.validateSchema(D[j])){const G=`keyword "${j}" value is invalid at path "${L}": `+F.errorsText(V.validateSchema.errors);if("log"!==T.validateSchema)throw new Error(G);F.logger.error(G)}}},62639:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.extendSubschemaMode=a.extendSubschemaData=a.getSubschema=void 0;const p=y(56382),C=y(97990);a.getSubschema=function w(v,{keyword:g,schemaProp:b,schema:I,schemaPath:_,errSchemaPath:A,topSchemaRef:R}){if(void 0!==g&&void 0!==I)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==g){const D=v.schema[g];return void 0===b?{schema:D,schemaPath:p._`${v.schemaPath}${(0,p.getProperty)(g)}`,errSchemaPath:`${v.errSchemaPath}/${g}`}:{schema:D[b],schemaPath:p._`${v.schemaPath}${(0,p.getProperty)(g)}${(0,p.getProperty)(b)}`,errSchemaPath:`${v.errSchemaPath}/${g}/${(0,C.escapeFragment)(b)}`}}if(void 0!==I){if(void 0===_||void 0===A||void 0===R)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:I,schemaPath:_,topSchemaRef:R,errSchemaPath:A}}throw new Error('either "keyword" or "schema" must be passed')},a.extendSubschemaData=function M(v,g,{dataProp:b,dataPropType:I,data:_,dataTypes:A,propertyName:R}){if(void 0!==_&&void 0!==b)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:D}=g;if(void 0!==b){const{errorPath:F,dataPathArr:L,opts:V}=g;T(D.let("data",p._`${g.data}${(0,p.getProperty)(b)}`,!0)),v.errorPath=p.str`${F}${(0,C.getErrorPath)(b,I,V.jsPropertySyntax)}`,v.parentDataProperty=p._`${b}`,v.dataPathArr=[...L,v.parentDataProperty]}if(void 0!==_){T(_ instanceof p.Name?_:D.let("data",_,!0)),void 0!==R&&(v.propertyName=R)}function T(F){v.data=F,v.dataLevel=g.dataLevel+1,v.dataTypes=[],g.definedProperties=new Set,v.parentData=g.data,v.dataNames=[...g.dataNames,F]}A&&(v.dataTypes=A)},a.extendSubschemaMode=function u(v,{jtdDiscriminator:g,jtdMetadata:b,compositeRule:I,createErrors:_,allErrors:A}){void 0!==I&&(v.compositeRule=I),void 0!==_&&(v.createErrors=_),void 0!==A&&(v.allErrors=A),v.jtdDiscriminator=g,v.jtdMetadata=b}},25910:(ne,a,y)=>{"use strict";var p=y(59344).default;Object.defineProperty(a,"__esModule",{value:!0}),a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=void 0;var C=y(66764);Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return C.KeywordCxt}});var w=y(56382);Object.defineProperty(a,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return w.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return w.CodeGen}});const M=y(20496),u=y(80140),v=y(62848),g=y(17140),b=y(56382),I=y(31880),_=y(59078),A=y(97990),R=y(64775),D=y(51364),T=(P,se)=>new RegExp(P,se);T.code="new RegExp";const F=["removeAdditional","useDefaults","coerceTypes"],L=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),V={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},j={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Z=200;function Y(P){var se,te,ie,de,Ce,ye,ve,ae,fe,pe,Ee,ce,be,Ne,Fe,ct,Ze,Ve,Ut,$e,tt,Xt,ot,st,$t;const Pe=P.strict,Ae=null===(se=P.code)||void 0===se?void 0:se.optimize,xe=!0===Ae||void 0===Ae?1:Ae||0,Be=null!==(ie=null===(te=P.code)||void 0===te?void 0:te.regExp)&&void 0!==ie?ie:T,ze=null!==(de=P.uriResolver)&&void 0!==de?de:D.default;return{strictSchema:null===(ye=null!==(Ce=P.strictSchema)&&void 0!==Ce?Ce:Pe)||void 0===ye||ye,strictNumbers:null===(ae=null!==(ve=P.strictNumbers)&&void 0!==ve?ve:Pe)||void 0===ae||ae,strictTypes:null!==(pe=null!==(fe=P.strictTypes)&&void 0!==fe?fe:Pe)&&void 0!==pe?pe:"log",strictTuples:null!==(ce=null!==(Ee=P.strictTuples)&&void 0!==Ee?Ee:Pe)&&void 0!==ce?ce:"log",strictRequired:null!==(Ne=null!==(be=P.strictRequired)&&void 0!==be?be:Pe)&&void 0!==Ne&&Ne,code:P.code?{...P.code,optimize:xe,regExp:Be}:{optimize:xe,regExp:Be},loopRequired:null!==(Fe=P.loopRequired)&&void 0!==Fe?Fe:Z,loopEnum:null!==(ct=P.loopEnum)&&void 0!==ct?ct:Z,meta:null===(Ze=P.meta)||void 0===Ze||Ze,messages:null===(Ve=P.messages)||void 0===Ve||Ve,inlineRefs:null===(Ut=P.inlineRefs)||void 0===Ut||Ut,schemaId:null!==($e=P.schemaId)&&void 0!==$e?$e:"$id",addUsedSchema:null===(tt=P.addUsedSchema)||void 0===tt||tt,validateSchema:null===(Xt=P.validateSchema)||void 0===Xt||Xt,validateFormats:null===(ot=P.validateFormats)||void 0===ot||ot,unicodeRegExp:null===(st=P.unicodeRegExp)||void 0===st||st,int32range:null===($t=P.int32range)||void 0===$t||$t,uriResolver:ze}}class G{constructor(se={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,se=this.opts={...se,...Y(se)};const{es5:te,lines:ie}=this.opts.code;this.scope=new b.ValueScope({scope:{},prefixes:L,es5:te,lines:ie}),this.logger=function s(P){if(!1===P)return r;if(void 0===P)return console;if(P.log&&P.warn&&P.error)return P;throw new Error("logger must implement log, warn and error methods")}(se.logger);const de=se.validateFormats;se.validateFormats=!1,this.RULES=(0,v.getRules)(),q.call(this,V,se,"NOT SUPPORTED"),q.call(this,j,se,"DEPRECATED","warn"),this._metaOpts=S.call(this),se.formats&&z.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),se.keywords&&$.call(this,se.keywords),"object"==typeof se.meta&&this.addMetaSchema(se.meta),Q.call(this),se.validateFormats=de}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:se,meta:te,schemaId:ie}=this.opts;let de=R;"id"===ie&&(de={...R},de.id=de.$id,delete de.$id),te&&se&&this.addMetaSchema(de,de[ie],!1)}defaultMeta(){const{meta:se,schemaId:te}=this.opts;return this.opts.defaultMeta="object"==typeof se?se[te]||se:void 0}validate(se,te){let ie;if("string"==typeof se){if(ie=this.getSchema(se),!ie)throw new Error(`no schema with key or ref "${se}"`)}else ie=this.compile(se);const de=ie(te);return"$async"in ie||(this.errors=ie.errors),de}compile(se,te){const ie=this._addSchema(se,te);return ie.validate||this._compileSchemaEnv(ie)}compileAsync(se,te){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:ie}=this.opts;return de.call(this,se,te);function de(Fe,ct){return Ce.apply(this,arguments)}function Ce(){return(Ce=p(function*(Fe,ct){yield ye.call(this,Fe.$schema);const Ze=this._addSchema(Fe,ct);return Ze.validate||ae.call(this,Ze)})).apply(this,arguments)}function ye(Fe){return ve.apply(this,arguments)}function ve(){return(ve=p(function*(Fe){Fe&&!this.getSchema(Fe)&&(yield de.call(this,{$ref:Fe},!0))})).apply(this,arguments)}function ae(Fe){return fe.apply(this,arguments)}function fe(){return(fe=p(function*(Fe){try{return this._compileSchemaEnv(Fe)}catch(ct){if(!(ct instanceof u.default))throw ct;return pe.call(this,ct),yield Ee.call(this,ct.missingSchema),ae.call(this,Fe)}})).apply(this,arguments)}function pe({missingSchema:Fe,missingRef:ct}){if(this.refs[Fe])throw new Error(`AnySchema ${Fe} is loaded but ${ct} cannot be resolved`)}function Ee(Fe){return ce.apply(this,arguments)}function ce(){return(ce=p(function*(Fe){const ct=yield be.call(this,Fe);this.refs[Fe]||(yield ye.call(this,ct.$schema)),this.refs[Fe]||this.addSchema(ct,Fe,te)})).apply(this,arguments)}function be(Fe){return Ne.apply(this,arguments)}function Ne(){return(Ne=p(function*(Fe){const ct=this._loading[Fe];if(ct)return ct;try{return yield this._loading[Fe]=ie(Fe)}finally{delete this._loading[Fe]}})).apply(this,arguments)}}addSchema(se,te,ie,de=this.opts.validateSchema){if(Array.isArray(se)){for(const ye of se)this.addSchema(ye,void 0,ie,de);return this}let Ce;if("object"==typeof se){const{schemaId:ye}=this.opts;if(Ce=se[ye],void 0!==Ce&&"string"!=typeof Ce)throw new Error(`schema ${ye} must be string`)}return te=(0,I.normalizeId)(te||Ce),this._checkUnique(te),this.schemas[te]=this._addSchema(se,ie,te,de,!0),this}addMetaSchema(se,te,ie=this.opts.validateSchema){return this.addSchema(se,te,!0,ie),this}validateSchema(se,te){if("boolean"==typeof se)return!0;let ie;if(ie=se.$schema,void 0!==ie&&"string"!=typeof ie)throw new Error("$schema must be a string");if(ie=ie||this.opts.defaultMeta||this.defaultMeta(),!ie)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const de=this.validate(ie,se);if(!de&&te){const Ce="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(Ce);this.logger.error(Ce)}return de}getSchema(se){let te;for(;"string"==typeof(te=X.call(this,se));)se=te;if(void 0===te){const{schemaId:ie}=this.opts,de=new g.SchemaEnv({schema:{},schemaId:ie});if(te=g.resolveSchema.call(this,de,se),!te)return;this.refs[se]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(se){if(se instanceof RegExp)return this._removeAllSchemas(this.schemas,se),this._removeAllSchemas(this.refs,se),this;switch(typeof se){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=X.call(this,se);return"object"==typeof te&&this._cache.delete(te.schema),delete this.schemas[se],delete this.refs[se],this}case"object":{const te=se;this._cache.delete(te);let ie=se[this.opts.schemaId];return ie&&(ie=(0,I.normalizeId)(ie),delete this.schemas[ie],delete this.refs[ie]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(se){for(const te of se)this.addKeyword(te);return this}addKeyword(se,te){let ie;if("string"==typeof se)ie=se,"object"==typeof te&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=ie);else{if("object"!=typeof se||void 0!==te)throw new Error("invalid addKeywords parameters");if(ie=(te=se).keyword,Array.isArray(ie)&&!ie.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(h.call(this,ie,te),!te)return(0,A.eachItem)(ie,Ce=>E.call(this,Ce)),this;B.call(this,te);const de={...te,type:(0,_.getJSONTypes)(te.type),schemaType:(0,_.getJSONTypes)(te.schemaType)};return(0,A.eachItem)(ie,0===de.type.length?Ce=>E.call(this,Ce,de):Ce=>de.type.forEach(ye=>E.call(this,Ce,de,ye))),this}getKeyword(se){const te=this.RULES.all[se];return"object"==typeof te?te.definition:!!te}removeKeyword(se){const{RULES:te}=this;delete te.keywords[se],delete te.all[se];for(const ie of te.rules){const de=ie.rules.findIndex(Ce=>Ce.keyword===se);de>=0&&ie.rules.splice(de,1)}return this}addFormat(se,te){return"string"==typeof te&&(te=new RegExp(te)),this.formats[se]=te,this}errorsText(se=this.errors,{separator:te=", ",dataVar:ie="data"}={}){return se&&0!==se.length?se.map(de=>`${ie}${de.instancePath} ${de.message}`).reduce((de,Ce)=>de+te+Ce):"No errors"}$dataMetaSchema(se,te){const ie=this.RULES.all;se=JSON.parse(JSON.stringify(se));for(const de of te){const Ce=de.split("/").slice(1);let ye=se;for(const ve of Ce)ye=ye[ve];for(const ve in ie){const ae=ie[ve];if("object"!=typeof ae)continue;const{$data:fe}=ae.definition,pe=ye[ve];fe&&pe&&(ye[ve]=f(pe))}}return se}_removeAllSchemas(se,te){for(const ie in se){const de=se[ie];(!te||te.test(ie))&&("string"==typeof de?delete se[ie]:de&&!de.meta&&(this._cache.delete(de.schema),delete se[ie]))}}_addSchema(se,te,ie,de=this.opts.validateSchema,Ce=this.opts.addUsedSchema){let ye;const{schemaId:ve}=this.opts;if("object"==typeof se)ye=se[ve];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof se)throw new Error("schema must be object or boolean")}let ae=this._cache.get(se);if(void 0!==ae)return ae;ie=(0,I.normalizeId)(ye||ie);const fe=I.getSchemaRefs.call(this,se,ie);return ae=new g.SchemaEnv({schema:se,schemaId:ve,meta:te,baseId:ie,localRefs:fe}),this._cache.set(ae.schema,ae),Ce&&!ie.startsWith("#")&&(ie&&this._checkUnique(ie),this.refs[ie]=ae),de&&this.validateSchema(se,!0),ae}_checkUnique(se){if(this.schemas[se]||this.refs[se])throw new Error(`schema with key or id "${se}" already exists`)}_compileSchemaEnv(se){if(se.meta?this._compileMetaSchema(se):g.compileSchema.call(this,se),!se.validate)throw new Error("ajv implementation error");return se.validate}_compileMetaSchema(se){const te=this.opts;this.opts=this._metaOpts;try{g.compileSchema.call(this,se)}finally{this.opts=te}}}function q(P,se,te,ie="error"){for(const de in P){const Ce=de;Ce in se&&this.logger[ie](`${te}: option ${de}. ${P[Ce]}`)}}function X(P){return P=(0,I.normalizeId)(P),this.schemas[P]||this.refs[P]}function Q(){const P=this.opts.schemas;if(P)if(Array.isArray(P))this.addSchema(P);else for(const se in P)this.addSchema(P[se],se)}function z(){for(const P in this.opts.formats){const se=this.opts.formats[P];se&&this.addFormat(P,se)}}function $(P){if(Array.isArray(P))this.addVocabulary(P);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const se in P){const te=P[se];te.keyword||(te.keyword=se),this.addKeyword(te)}}}function S(){const P={...this.opts};for(const se of F)delete P[se];return P}a.default=G,G.ValidationError=M.default,G.MissingRefError=u.default;const r={log(){},warn(){},error(){}};const d=/^[a-z_$][a-z0-9_$:-]*$/i;function h(P,se){const{RULES:te}=this;if((0,A.eachItem)(P,ie=>{if(te.keywords[ie])throw new Error(`Keyword ${ie} is already defined`);if(!d.test(ie))throw new Error(`Keyword ${ie} has invalid name`)}),se&&se.$data&&!("code"in se)&&!("validate"in se))throw new Error('$data keyword must have "code" or "validate" function')}function E(P,se,te){var ie;const de=se?.post;if(te&&de)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Ce}=this;let ye=de?Ce.post:Ce.rules.find(({type:ae})=>ae===te);if(ye||(ye={type:te,rules:[]},Ce.rules.push(ye)),Ce.keywords[P]=!0,!se)return;const ve={keyword:P,definition:{...se,type:(0,_.getJSONTypes)(se.type),schemaType:(0,_.getJSONTypes)(se.schemaType)}};se.before?k.call(this,ye,ve,se.before):ye.rules.push(ve),Ce.all[P]=ve,null===(ie=se.implements)||void 0===ie||ie.forEach(ae=>this.addKeyword(ae))}function k(P,se,te){const ie=P.rules.findIndex(de=>de.keyword===te);ie>=0?P.rules.splice(ie,0,se):(P.rules.push(se),this.logger.warn(`rule ${te} is not defined`))}function B(P){let{metaSchema:se}=P;void 0!==se&&(P.$data&&this.opts.$data&&(se=f(se)),P.validateSchema=this.compile(se,!0))}const x={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function f(P){return{anyOf:[P,x]}}},40834:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(12559);p.code='require("ajv/dist/runtime/equal").default',a.default=p},26344:(ne,a)=>{"use strict";function y(p){const C=p.length;let u,w=0,M=0;for(;M=55296&&u<=56319&&M{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(96482);p.code='require("ajv/dist/runtime/uri").default',a.default=p},20496:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});class y extends Error{constructor(C){super("validation failed"),this.errors=C,this.ajv=this.validation=!0}}a.default=y},29282:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateAdditionalItems=void 0;const p=y(56382),C=y(97990),M={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:v}})=>p.str`must NOT have more than ${v} items`,params:({params:{len:v}})=>p._`{limit: ${v}}`},code(v){const{parentSchema:g,it:b}=v,{items:I}=g;Array.isArray(I)?u(v,I):(0,C.checkStrictMode)(b,'"additionalItems" is ignored when "items" is not an array of schemas')}};function u(v,g){const{gen:b,schema:I,data:_,keyword:A,it:R}=v;R.items=!0;const D=b.const("len",p._`${_}.length`);if(!1===I)v.setParams({len:g.length}),v.pass(p._`${D} <= ${g.length}`);else if("object"==typeof I&&!(0,C.alwaysValidSchema)(R,I)){const F=b.var("valid",p._`${D} <= ${g.length}`);b.if((0,p.not)(F),()=>function T(F){b.forRange("i",g.length,D,L=>{v.subschema({keyword:A,dataProp:L,dataPropType:C.Type.Num},F),R.allErrors||b.if((0,p.not)(F),()=>b.break())})}(F)),v.ok(F)}}a.validateAdditionalItems=u,a.default=M},75459:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(92812),C=y(56382),w=y(5976),M=y(97990),v={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:g})=>C._`{additionalProperty: ${g.additionalProperty}}`},code(g){const{gen:b,schema:I,parentSchema:_,data:A,errsCount:R,it:D}=g;if(!R)throw new Error("ajv implementation error");const{allErrors:T,opts:F}=D;if(D.props=!0,"all"!==F.removeAdditional&&(0,M.alwaysValidSchema)(D,I))return;const L=(0,p.allSchemaProperties)(_.properties),V=(0,p.allSchemaProperties)(_.patternProperties);function Y(X){b.code(C._`delete ${A}[${X}]`)}function G(X){if("all"===F.removeAdditional||F.removeAdditional&&!1===I)Y(X);else{if(!1===I)return g.setParams({additionalProperty:X}),g.error(),void(T||b.break());if("object"==typeof I&&!(0,M.alwaysValidSchema)(D,I)){const Q=b.name("valid");"failing"===F.removeAdditional?(q(X,Q,!1),b.if((0,C.not)(Q),()=>{g.reset(),Y(X)})):(q(X,Q),T||b.if((0,C.not)(Q),()=>b.break()))}}}function q(X,Q,z){const $={keyword:"additionalProperties",dataProp:X,dataPropType:M.Type.Str};!1===z&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),g.subschema($,Q)}(function j(){b.forIn("key",A,X=>{L.length||V.length?b.if(function Z(X){let Q;if(L.length>8){const z=(0,M.schemaRefOrVal)(D,_.properties,"properties");Q=(0,p.isOwnProperty)(b,z,X)}else Q=L.length?(0,C.or)(...L.map(z=>C._`${X} === ${z}`)):C.nil;return V.length&&(Q=(0,C.or)(Q,...V.map(z=>C._`${(0,p.usePattern)(g,z)}.test(${X})`))),(0,C.not)(Q)}(X),()=>G(X)):G(X)})})(),g.ok(C._`${R} === ${w.default.errors}`)}};a.default=v},46186:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(97990),C={keyword:"allOf",schemaType:"array",code(w){const{gen:M,schema:u,it:v}=w;if(!Array.isArray(u))throw new Error("ajv implementation error");const g=M.name("valid");u.forEach((b,I)=>{if((0,p.alwaysValidSchema)(v,b))return;const _=w.subschema({keyword:"allOf",schemaProp:I},g);w.ok(g),w.mergeEvaluated(_)})}};a.default=C},60290:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const C={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:y(92812).validateUnion,error:{message:"must match a schema in anyOf"}};a.default=C},25738:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),M={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:u,max:v}})=>void 0===v?p.str`must contain at least ${u} valid item(s)`:p.str`must contain at least ${u} and no more than ${v} valid item(s)`,params:({params:{min:u,max:v}})=>void 0===v?p._`{minContains: ${u}}`:p._`{minContains: ${u}, maxContains: ${v}}`},code(u){const{gen:v,schema:g,parentSchema:b,data:I,it:_}=u;let A,R;const{minContains:D,maxContains:T}=b;_.opts.next?(A=void 0===D?1:D,R=T):A=1;const F=v.const("len",p._`${I}.length`);if(u.setParams({min:A,max:R}),void 0===R&&0===A)return void(0,C.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==R&&A>R)return(0,C.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),void u.fail();if((0,C.alwaysValidSchema)(_,g)){let Y=p._`${F} >= ${A}`;return void 0!==R&&(Y=p._`${Y} && ${F} <= ${R}`),void u.pass(Y)}_.items=!0;const L=v.name("valid");function V(){const Y=v.name("_valid"),G=v.let("count",0);j(Y,()=>v.if(Y,()=>function Z(Y){v.code(p._`${Y}++`),void 0===R?v.if(p._`${Y} >= ${A}`,()=>v.assign(L,!0).break()):(v.if(p._`${Y} > ${R}`,()=>v.assign(L,!1).break()),1===A?v.assign(L,!0):v.if(p._`${Y} >= ${A}`,()=>v.assign(L,!0)))}(G)))}function j(Y,G){v.forRange("i",0,F,q=>{u.subschema({keyword:"contains",dataProp:q,dataPropType:C.Type.Num,compositeRule:!0},Y),G()})}void 0===R&&1===A?j(L,()=>v.if(L,()=>v.break())):0===A?(v.let(L,!0),void 0!==R&&v.if(p._`${I}.length > 0`,V)):(v.let(L,!1),V()),u.result(L,()=>u.reset())}};a.default=M},1886:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateSchemaDeps=a.validatePropertyDeps=a.error=void 0;const p=y(56382),C=y(97990),w=y(92812);a.error={message:({params:{property:b,depsCount:I,deps:_}})=>{const A=1===I?"property":"properties";return p.str`must have ${A} ${_} when property ${b} is present`},params:({params:{property:b,depsCount:I,deps:_,missingProperty:A}})=>p._`{property: ${b}, - missingProperty: ${A}, - depsCount: ${I}, - deps: ${_}}`};const M={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(b){const[I,_]=function u({schema:b}){const I={},_={};for(const A in b){if("__proto__"===A)continue;(Array.isArray(b[A])?I:_)[A]=b[A]}return[I,_]}(b);v(b,I),g(b,_)}};function v(b,I=b.schema){const{gen:_,data:A,it:R}=b;if(0===Object.keys(I).length)return;const D=_.let("missing");for(const T in I){const F=I[T];if(0===F.length)continue;const L=(0,w.propertyInData)(_,A,T,R.opts.ownProperties);b.setParams({property:T,depsCount:F.length,deps:F.join(", ")}),R.allErrors?_.if(L,()=>{for(const V of F)(0,w.checkReportMissingProp)(b,V)}):(_.if(p._`${L} && (${(0,w.checkMissingProp)(b,F,D)})`),(0,w.reportMissingProp)(b,D),_.else())}}function g(b,I=b.schema){const{gen:_,data:A,keyword:R,it:D}=b,T=_.name("valid");for(const F in I)(0,C.alwaysValidSchema)(D,I[F])||(_.if((0,w.propertyInData)(_,A,F,D.opts.ownProperties),()=>{const L=b.subschema({keyword:R,schemaProp:F},T);b.mergeValidEvaluated(L,T)},()=>_.var(T,!0)),b.ok(T))}a.validatePropertyDeps=v,a.validateSchemaDeps=g,a.default=M},43632:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),M={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:v})=>p.str`must match "${v.ifClause}" schema`,params:({params:v})=>p._`{failingKeyword: ${v.ifClause}}`},code(v){const{gen:g,parentSchema:b,it:I}=v;void 0===b.then&&void 0===b.else&&(0,C.checkStrictMode)(I,'"if" without "then" and "else" is ignored');const _=u(I,"then"),A=u(I,"else");if(!_&&!A)return;const R=g.let("valid",!0),D=g.name("_valid");if(function T(){const L=v.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},D);v.mergeEvaluated(L)}(),v.reset(),_&&A){const L=g.let("ifClause");v.setParams({ifClause:L}),g.if(D,F("then",L),F("else",L))}else _?g.if(D,F("then")):g.if((0,p.not)(D),F("else"));function F(L,V){return()=>{const j=v.subschema({keyword:L},D);g.assign(R,D),v.mergeValidEvaluated(j,R),V?g.assign(V,p._`${L}`):v.setParams({ifClause:L})}}v.pass(R,()=>v.error(!0))}};function u(v,g){const b=v.schema[g];return void 0!==b&&!(0,C.alwaysValidSchema)(v,b)}a.default=M},17737:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(29282),C=y(84947),w=y(69180),M=y(41785),u=y(25738),v=y(1886),g=y(37947),b=y(75459),I=y(68415),_=y(50896),A=y(36330),R=y(60290),D=y(92337),T=y(46186),F=y(43632),L=y(71344);a.default=function V(j=!1){const Z=[A.default,R.default,D.default,T.default,F.default,L.default,g.default,b.default,v.default,I.default,_.default];return j?Z.push(C.default,M.default):Z.push(p.default,w.default),Z.push(u.default),Z}},69180:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateTuple=void 0;const p=y(56382),C=y(97990),w=y(92812),M={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(v){const{schema:g,it:b}=v;if(Array.isArray(g))return u(v,"additionalItems",g);b.items=!0,!(0,C.alwaysValidSchema)(b,g)&&v.ok((0,w.validateArray)(v))}};function u(v,g,b=v.schema){const{gen:I,parentSchema:_,data:A,keyword:R,it:D}=v;(function L(V){const{opts:j,errSchemaPath:Z}=D,Y=b.length,G=Y===V.minItems&&(Y===V.maxItems||!1===V[g]);if(j.strictTuples&&!G){const q=`"${R}" is ${Y}-tuple, but minItems or maxItems/${g} are not specified or different at path "${Z}"`;(0,C.checkStrictMode)(D,q,j.strictTuples)}})(_),D.opts.unevaluated&&b.length&&!0!==D.items&&(D.items=C.mergeEvaluated.items(I,b.length,D.items));const T=I.name("valid"),F=I.const("len",p._`${A}.length`);b.forEach((V,j)=>{(0,C.alwaysValidSchema)(D,V)||(I.if(p._`${F} > ${j}`,()=>v.subschema({keyword:R,schemaProp:j,dataProp:j},T)),v.ok(T))})}a.validateTuple=u,a.default=M},41785:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),w=y(92812),M=y(29282),v={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:g}})=>p.str`must NOT have more than ${g} items`,params:({params:{len:g}})=>p._`{limit: ${g}}`},code(g){const{schema:b,parentSchema:I,it:_}=g,{prefixItems:A}=I;_.items=!0,!(0,C.alwaysValidSchema)(_,b)&&(A?(0,M.validateAdditionalItems)(g,A):g.ok((0,w.validateArray)(g)))}};a.default=v},36330:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(97990),C={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(w){const{gen:M,schema:u,it:v}=w;if((0,p.alwaysValidSchema)(v,u))return void w.fail();const g=M.name("valid");w.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},g),w.failResult(g,()=>w.reset(),()=>w.error())},error:{message:"must NOT be valid"}};a.default=C},92337:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),M={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:u})=>p._`{passingSchemas: ${u.passing}}`},code(u){const{gen:v,schema:g,parentSchema:b,it:I}=u;if(!Array.isArray(g))throw new Error("ajv implementation error");if(I.opts.discriminator&&b.discriminator)return;const _=g,A=v.let("valid",!1),R=v.let("passing",null),D=v.name("_valid");u.setParams({passing:R}),v.block(function T(){_.forEach((F,L)=>{let V;(0,C.alwaysValidSchema)(I,F)?v.var(D,!0):V=u.subschema({keyword:"oneOf",schemaProp:L,compositeRule:!0},D),L>0&&v.if(p._`${D} && ${A}`).assign(A,!1).assign(R,p._`[${R}, ${L}]`).else(),v.if(D,()=>{v.assign(A,!0),v.assign(R,L),V&&u.mergeEvaluated(V,p.Name)})})}),u.result(A,()=>u.reset(),()=>u.error(!0))}};a.default=M},50896:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(92812),C=y(56382),w=y(97990),M=y(97990),u={keyword:"patternProperties",type:"object",schemaType:"object",code(v){const{gen:g,schema:b,data:I,parentSchema:_,it:A}=v,{opts:R}=A,D=(0,p.allSchemaProperties)(b),T=D.filter(G=>(0,w.alwaysValidSchema)(A,b[G]));if(0===D.length||T.length===D.length&&(!A.opts.unevaluated||!0===A.props))return;const F=R.strictSchema&&!R.allowMatchingProperties&&_.properties,L=g.name("valid");!0!==A.props&&!(A.props instanceof C.Name)&&(A.props=(0,M.evaluatedPropsToName)(g,A.props));const{props:V}=A;function Z(G){for(const q in F)new RegExp(G).test(q)&&(0,w.checkStrictMode)(A,`property ${q} matches pattern ${G} (use allowMatchingProperties)`)}function Y(G){g.forIn("key",I,q=>{g.if(C._`${(0,p.usePattern)(v,G)}.test(${q})`,()=>{const X=T.includes(G);X||v.subschema({keyword:"patternProperties",schemaProp:G,dataProp:q,dataPropType:M.Type.Str},L),A.opts.unevaluated&&!0!==V?g.assign(C._`${V}[${q}]`,!0):!X&&!A.allErrors&&g.if((0,C.not)(L),()=>g.break())})})}!function j(){for(const G of D)F&&Z(G),A.allErrors?Y(G):(g.var(L,!0),Y(G),g.if(L))}()}};a.default=u},84947:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(69180),C={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:w=>(0,p.validateTuple)(w,"items")};a.default=C},68415:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(66764),C=y(92812),w=y(97990),M=y(75459),u={keyword:"properties",type:"object",schemaType:"object",code(v){const{gen:g,schema:b,parentSchema:I,data:_,it:A}=v;"all"===A.opts.removeAdditional&&void 0===I.additionalProperties&&M.default.code(new p.KeywordCxt(A,M.default,"additionalProperties"));const R=(0,C.allSchemaProperties)(b);for(const V of R)A.definedProperties.add(V);A.opts.unevaluated&&R.length&&!0!==A.props&&(A.props=w.mergeEvaluated.props(g,(0,w.toHash)(R),A.props));const D=R.filter(V=>!(0,w.alwaysValidSchema)(A,b[V]));if(0===D.length)return;const T=g.name("valid");for(const V of D)F(V)?L(V):(g.if((0,C.propertyInData)(g,_,V,A.opts.ownProperties)),L(V),A.allErrors||g.else().var(T,!0),g.endIf()),v.it.definedProperties.add(V),v.ok(T);function F(V){return A.opts.useDefaults&&!A.compositeRule&&void 0!==b[V].default}function L(V){v.subschema({keyword:"properties",schemaProp:V,dataProp:V},T)}}};a.default=u},37947:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),M={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:u})=>p._`{propertyName: ${u.propertyName}}`},code(u){const{gen:v,schema:g,data:b,it:I}=u;if((0,C.alwaysValidSchema)(I,g))return;const _=v.name("valid");v.forIn("key",b,A=>{u.setParams({propertyName:A}),u.subschema({keyword:"propertyNames",data:A,dataTypes:["string"],propertyName:A,compositeRule:!0},_),v.if((0,p.not)(_),()=>{u.error(!0),I.allErrors||v.break()})}),u.ok(_)}};a.default=M},71344:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(97990),C={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:w,parentSchema:M,it:u}){void 0===M.if&&(0,p.checkStrictMode)(u,`"${w}" without "if" is ignored`)}};a.default=C},92812:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateUnion=a.validateArray=a.usePattern=a.callValidateCode=a.schemaProperties=a.allSchemaProperties=a.noPropertyInData=a.propertyInData=a.isOwnProperty=a.hasPropFunc=a.reportMissingProp=a.checkMissingProp=a.checkReportMissingProp=void 0;const p=y(56382),C=y(97990),w=y(5976),M=y(97990);function b(Z){return Z.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:p._`Object.prototype.hasOwnProperty`})}function I(Z,Y,G){return p._`${b(Z)}.call(${Y}, ${G})`}function A(Z,Y,G,q){const X=p._`${Y}${(0,p.getProperty)(G)} === undefined`;return q?(0,p.or)(X,(0,p.not)(I(Z,Y,G))):X}function R(Z){return Z?Object.keys(Z).filter(Y=>"__proto__"!==Y):[]}a.checkReportMissingProp=function u(Z,Y){const{gen:G,data:q,it:X}=Z;G.if(A(G,q,Y,X.opts.ownProperties),()=>{Z.setParams({missingProperty:p._`${Y}`},!0),Z.error()})},a.checkMissingProp=function v({gen:Z,data:Y,it:{opts:G}},q,X){return(0,p.or)(...q.map(Q=>(0,p.and)(A(Z,Y,Q,G.ownProperties),p._`${X} = ${Q}`)))},a.reportMissingProp=function g(Z,Y){Z.setParams({missingProperty:Y},!0),Z.error()},a.hasPropFunc=b,a.isOwnProperty=I,a.propertyInData=function _(Z,Y,G,q){const X=p._`${Y}${(0,p.getProperty)(G)} !== undefined`;return q?p._`${X} && ${I(Z,Y,G)}`:X},a.noPropertyInData=A,a.allSchemaProperties=R,a.schemaProperties=function D(Z,Y){return R(Y).filter(G=>!(0,C.alwaysValidSchema)(Z,Y[G]))},a.callValidateCode=function T({schemaCode:Z,data:Y,it:{gen:G,topSchemaRef:q,schemaPath:X,errorPath:Q},it:z},$,S,r){const s=r?p._`${Z}, ${Y}, ${q}${X}`:Y,d=[[w.default.instancePath,(0,p.strConcat)(w.default.instancePath,Q)],[w.default.parentData,z.parentData],[w.default.parentDataProperty,z.parentDataProperty],[w.default.rootData,w.default.rootData]];z.opts.dynamicRef&&d.push([w.default.dynamicAnchors,w.default.dynamicAnchors]);const h=p._`${s}, ${G.object(...d)}`;return S!==p.nil?p._`${$}.call(${S}, ${h})`:p._`${$}(${h})`};const F=p._`new RegExp`;a.usePattern=function L({gen:Z,it:{opts:Y}},G){const q=Y.unicodeRegExp?"u":"",{regExp:X}=Y.code,Q=X(G,q);return Z.scopeValue("pattern",{key:Q.toString(),ref:Q,code:p._`${"new RegExp"===X.code?F:(0,M.useFunc)(Z,X)}(${G}, ${q})`})},a.validateArray=function V(Z){const{gen:Y,data:G,keyword:q,it:X}=Z,Q=Y.name("valid");if(X.allErrors){const $=Y.let("valid",!0);return z(()=>Y.assign($,!1)),$}return Y.var(Q,!0),z(()=>Y.break()),Q;function z($){const S=Y.const("len",p._`${G}.length`);Y.forRange("i",0,S,r=>{Z.subschema({keyword:q,dataProp:r,dataPropType:C.Type.Num},Q),Y.if((0,p.not)(Q),$)})}},a.validateUnion=function j(Z){const{gen:Y,schema:G,keyword:q,it:X}=Z;if(!Array.isArray(G))throw new Error("ajv implementation error");if(G.some(S=>(0,C.alwaysValidSchema)(X,S))&&!X.opts.unevaluated)return;const z=Y.let("valid",!1),$=Y.name("_valid");Y.block(()=>G.forEach((S,r)=>{const s=Z.subschema({keyword:q,schemaProp:r,compositeRule:!0},$);Y.assign(z,p._`${z} || ${$}`),Z.mergeValidEvaluated(s,$)||Y.if((0,p.not)(z))})),Z.result(z,()=>Z.reset(),()=>Z.error(!0))}},11167:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const y={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};a.default=y},31093:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(11167),C=y(64703),w=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",p.default,C.default];a.default=w},64703:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.callRef=a.getValidate=void 0;const p=y(80140),C=y(92812),w=y(56382),M=y(5976),u=y(17140),v=y(97990),g={keyword:"$ref",schemaType:"string",code(_){const{gen:A,schema:R,it:D}=_,{baseId:T,schemaEnv:F,validateName:L,opts:V,self:j}=D,{root:Z}=F;if(("#"===R||"#/"===R)&&T===Z.baseId)return function G(){if(F===Z)return I(_,L,F,F.$async);const Q=A.scopeValue("root",{ref:Z});return I(_,w._`${Q}.validate`,Z,Z.$async)}();const Y=u.resolveRef.call(j,Z,T,R);if(void 0===Y)throw new p.default(D.opts.uriResolver,T,R);return Y instanceof u.SchemaEnv?function q(Q){const z=b(_,Q);I(_,z,Q,Q.$async)}(Y):function X(Q){const z=A.scopeValue("schema",!0===V.code.source?{ref:Q,code:(0,w.stringify)(Q)}:{ref:Q}),$=A.name("valid"),S=_.subschema({schema:Q,dataTypes:[],schemaPath:w.nil,topSchemaRef:z,errSchemaPath:R},$);_.mergeEvaluated(S),_.ok($)}(Y)}};function b(_,A){const{gen:R}=_;return A.validate?R.scopeValue("validate",{ref:A.validate}):w._`${R.scopeValue("wrapper",{ref:A})}.validate`}function I(_,A,R,D){const{gen:T,it:F}=_,{allErrors:L,schemaEnv:V,opts:j}=F,Z=j.passContext?M.default.this:w.nil;function q(Q){const z=w._`${Q}.errors`;T.assign(M.default.vErrors,w._`${M.default.vErrors} === null ? ${z} : ${M.default.vErrors}.concat(${z})`),T.assign(M.default.errors,w._`${M.default.vErrors}.length`)}function X(Q){var z;if(!F.opts.unevaluated)return;const $=null===(z=R?.validate)||void 0===z?void 0:z.evaluated;if(!0!==F.props)if($&&!$.dynamicProps)void 0!==$.props&&(F.props=v.mergeEvaluated.props(T,$.props,F.props));else{const S=T.var("props",w._`${Q}.evaluated.props`);F.props=v.mergeEvaluated.props(T,S,F.props,w.Name)}if(!0!==F.items)if($&&!$.dynamicItems)void 0!==$.items&&(F.items=v.mergeEvaluated.items(T,$.items,F.items));else{const S=T.var("items",w._`${Q}.evaluated.items`);F.items=v.mergeEvaluated.items(T,S,F.items,w.Name)}}D?function Y(){if(!V.$async)throw new Error("async schema referenced by sync schema");const Q=T.let("valid");T.try(()=>{T.code(w._`await ${(0,C.callValidateCode)(_,A,Z)}`),X(A),L||T.assign(Q,!0)},z=>{T.if(w._`!(${z} instanceof ${F.ValidationError})`,()=>T.throw(z)),q(z),L||T.assign(Q,!1)}),_.ok(Q)}():function G(){_.result((0,C.callValidateCode)(_,A,Z),()=>X(A),()=>q(A))}()}a.getValidate=b,a.callRef=I,a.default=g},81849:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(60797),w=y(17140),M=y(97990),v={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:g,tagName:b}})=>g===C.DiscrError.Tag?`tag "${b}" must be string`:`value of tag "${b}" must be in oneOf`,params:({params:{discrError:g,tag:b,tagName:I}})=>p._`{error: ${g}, tag: ${I}, tagValue: ${b}}`},code(g){const{gen:b,data:I,schema:_,parentSchema:A,it:R}=g,{oneOf:D}=A;if(!R.opts.discriminator)throw new Error("discriminator: requires discriminator option");const T=_.propertyName;if("string"!=typeof T)throw new Error("discriminator: requires propertyName");if(_.mapping)throw new Error("discriminator: mapping is not supported");if(!D)throw new Error("discriminator: requires oneOf keyword");const F=b.let("valid",!1),L=b.const("tag",p._`${I}${(0,p.getProperty)(T)}`);function j(Y){const G=b.name("valid"),q=g.subschema({keyword:"oneOf",schemaProp:Y},G);return g.mergeEvaluated(q,p.Name),G}b.if(p._`typeof ${L} == "string"`,()=>function V(){const Y=function Z(){var Y;const G={},q=Q(A);let X=!0;for(let S=0;Sg.error(!1,{discrError:C.DiscrError.Tag,tag:L,tagName:T})),g.ok(F)}};a.default=v},60797:(ne,a)=>{"use strict";var p;Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,(p=a.DiscrError||(a.DiscrError={})).Tag="tag",p.Mapping="mapping"},77032:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(31093),C=y(77887),w=y(17737),M=y(57447),u=y(10760),v=[p.default,C.default,(0,w.default)(),M.default,u.metadataVocabulary,u.contentVocabulary];a.default=v},22364:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),w={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:M})=>p.str`must match format "${M}"`,params:({schemaCode:M})=>p._`{format: ${M}}`},code(M,u){const{gen:v,data:g,$data:b,schema:I,schemaCode:_,it:A}=M,{opts:R,errSchemaPath:D,schemaEnv:T,self:F}=A;R.validateFormats&&(b?function L(){const j=v.scopeValue("formats",{ref:F.formats,code:R.code.formats}),Z=v.const("fDef",p._`${j}[${_}]`),Y=v.let("fType"),G=v.let("format");v.if(p._`typeof ${Z} == "object" && !(${Z} instanceof RegExp)`,()=>v.assign(Y,p._`${Z}.type || "string"`).assign(G,p._`${Z}.validate`),()=>v.assign(Y,p._`"string"`).assign(G,Z)),M.fail$data((0,p.or)(function q(){return!1===R.strictSchema?p.nil:p._`${_} && !${G}`}(),function X(){const Q=T.$async?p._`(${Z}.async ? await ${G}(${g}) : ${G}(${g}))`:p._`${G}(${g})`,z=p._`(typeof ${G} == "function" ? ${Q} : ${G}.test(${g}))`;return p._`${G} && ${G} !== true && ${Y} === ${u} && !${z}`}()))}():function V(){const j=F.formats[I];if(!j)return void function q(){if(!1===R.strictSchema)return void F.logger.warn(z());throw new Error(z());function z(){return`unknown format "${I}" ignored in schema at path "${D}"`}}();if(!0===j)return;const[Z,Y,G]=function X(z){const $=z instanceof RegExp?(0,p.regexpCode)(z):R.code.formats?p._`${R.code.formats}${(0,p.getProperty)(I)}`:void 0,S=v.scopeValue("formats",{key:I,ref:z,code:$});return"object"!=typeof z||z instanceof RegExp?["string",z,S]:[z.type||"string",z.validate,p._`${S}.validate`]}(j);Z===u&&M.pass(function Q(){if("object"==typeof j&&!(j instanceof RegExp)&&j.async){if(!T.$async)throw new Error("async format in sync schema");return p._`await ${G}(${g})`}return"function"==typeof Y?p._`${G}(${g})`:p._`${G}.test(${g})`}())}())}};a.default=w},57447:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const C=[y(22364).default];a.default=C},10760:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.contentVocabulary=a.metadataVocabulary=void 0,a.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],a.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},37677:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),w=y(40834),u={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:v})=>p._`{allowedValue: ${v}}`},code(v){const{gen:g,data:b,$data:I,schemaCode:_,schema:A}=v;I||A&&"object"==typeof A?v.fail$data(p._`!${(0,C.useFunc)(g,w.default)}(${b}, ${_})`):v.fail(p._`${A} !== ${b}`)}};a.default=u},38373:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),w=y(40834),u={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:v})=>p._`{allowedValues: ${v}}`},code(v){const{gen:g,data:b,$data:I,schema:_,schemaCode:A,it:R}=v;if(!I&&0===_.length)throw new Error("enum must have non-empty array");const D=_.length>=R.opts.loopEnum;let T;const F=()=>T??(T=(0,C.useFunc)(g,w.default));let L;if(D||I)L=g.let("valid"),v.block$data(L,function V(){g.assign(L,!1),g.forOf("v",A,Z=>g.if(p._`${F()}(${b}, ${Z})`,()=>g.assign(L,!0).break()))});else{if(!Array.isArray(_))throw new Error("ajv implementation error");const Z=g.const("vSchema",A);L=(0,p.or)(..._.map((Y,G)=>function j(Z,Y){const G=_[Y];return"object"==typeof G&&null!==G?p._`${F()}(${b}, ${Z}[${Y}])`:p._`${b} === ${G}`}(Z,G)))}v.pass(L)}};a.default=u},77887:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(37126),C=y(52018),w=y(56230),M=y(58455),u=y(25608),v=y(70109),g=y(45132),b=y(74097),I=y(37677),_=y(38373),A=[p.default,C.default,w.default,M.default,u.default,v.default,g.default,b.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},I.default,_.default];a.default=A},45132:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),w={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:u}){const v="maxItems"===M?"more":"fewer";return p.str`must NOT have ${v} than ${u} items`},params:({schemaCode:M})=>p._`{limit: ${M}}`},code(M){const{keyword:u,data:v,schemaCode:g}=M,b="maxItems"===u?p.operators.GT:p.operators.LT;M.fail$data(p._`${v}.length ${b} ${g}`)}};a.default=w},56230:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=y(97990),w=y(26344),u={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:v,schemaCode:g}){const b="maxLength"===v?"more":"fewer";return p.str`must NOT have ${b} than ${g} characters`},params:({schemaCode:v})=>p._`{limit: ${v}}`},code(v){const{keyword:g,data:b,schemaCode:I,it:_}=v,A="maxLength"===g?p.operators.GT:p.operators.LT,R=!1===_.opts.unicode?p._`${b}.length`:p._`${(0,C.useFunc)(v.gen,w.default)}(${b})`;v.fail$data(p._`${R} ${A} ${I}`)}};a.default=u},37126:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),C=p.operators,w={maximum:{okStr:"<=",ok:C.LTE,fail:C.GT},minimum:{okStr:">=",ok:C.GTE,fail:C.LT},exclusiveMaximum:{okStr:"<",ok:C.LT,fail:C.GTE},exclusiveMinimum:{okStr:">",ok:C.GT,fail:C.LTE}},M={message:({keyword:v,schemaCode:g})=>p.str`must be ${w[v].okStr} ${g}`,params:({keyword:v,schemaCode:g})=>p._`{comparison: ${w[v].okStr}, limit: ${g}}`},u={keyword:Object.keys(w),type:"number",schemaType:"number",$data:!0,error:M,code(v){const{keyword:g,data:b,schemaCode:I}=v;v.fail$data(p._`${b} ${w[g].fail} ${I} || isNaN(${b})`)}};a.default=u},25608:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),w={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:u}){const v="maxProperties"===M?"more":"fewer";return p.str`must NOT have ${v} than ${u} properties`},params:({schemaCode:M})=>p._`{limit: ${M}}`},code(M){const{keyword:u,data:v,schemaCode:g}=M,b="maxProperties"===u?p.operators.GT:p.operators.LT;M.fail$data(p._`Object.keys(${v}).length ${b} ${g}`)}};a.default=w},52018:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(56382),w={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:M})=>p.str`must be multiple of ${M}`,params:({schemaCode:M})=>p._`{multipleOf: ${M}}`},code(M){const{gen:u,data:v,schemaCode:g,it:b}=M,I=b.opts.multipleOfPrecision,_=u.let("res"),A=I?p._`Math.abs(Math.round(${_}) - ${_}) > 1e-${I}`:p._`${_} !== parseInt(${_})`;M.fail$data(p._`(${g} === 0 || (${_} = ${v}/${g}, ${A}))`)}};a.default=w},58455:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(92812),C=y(56382),M={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:u})=>C.str`must match pattern "${u}"`,params:({schemaCode:u})=>C._`{pattern: ${u}}`},code(u){const{data:v,$data:g,schema:b,schemaCode:I,it:_}=u,A=_.opts.unicodeRegExp?"u":"",R=g?C._`(new RegExp(${I}, ${A}))`:(0,p.usePattern)(u,b);u.fail$data(C._`!${R}.test(${v})`)}};a.default=M},70109:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(92812),C=y(56382),w=y(97990),u={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:v}})=>C.str`must have required property '${v}'`,params:({params:{missingProperty:v}})=>C._`{missingProperty: ${v}}`},code(v){const{gen:g,schema:b,schemaCode:I,data:_,$data:A,it:R}=v,{opts:D}=R;if(!A&&0===b.length)return;const T=b.length>=D.loopRequired;if(R.allErrors?function F(){if(T||A)v.block$data(C.nil,V);else for(const Z of b)(0,p.checkReportMissingProp)(v,Z)}():function L(){const Z=g.let("missing");if(T||A){const Y=g.let("valid",!0);v.block$data(Y,()=>function j(Z,Y){v.setParams({missingProperty:Z}),g.forOf(Z,I,()=>{g.assign(Y,(0,p.propertyInData)(g,_,Z,D.ownProperties)),g.if((0,C.not)(Y),()=>{v.error(),g.break()})},C.nil)}(Z,Y)),v.ok(Y)}else g.if((0,p.checkMissingProp)(v,b,Z)),(0,p.reportMissingProp)(v,Z),g.else()}(),D.strictRequired){const Z=v.parentSchema.properties,{definedProperties:Y}=v.it;for(const G of b)if(void 0===Z?.[G]&&!Y.has(G)){const X=`required property "${G}" is not defined at "${R.schemaEnv.baseId+R.errSchemaPath}" (strictRequired)`;(0,w.checkStrictMode)(R,X,R.opts.strictRequired)}}function V(){g.forOf("prop",I,Z=>{v.setParams({missingProperty:Z}),g.if((0,p.noPropertyInData)(g,_,Z,D.ownProperties),()=>v.error())})}}};a.default=u},74097:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const p=y(59078),C=y(56382),w=y(97990),M=y(40834),v={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:g,j:b}})=>C.str`must NOT have duplicate items (items ## ${b} and ${g} are identical)`,params:({params:{i:g,j:b}})=>C._`{i: ${g}, j: ${b}}`},code(g){const{gen:b,data:I,$data:_,schema:A,parentSchema:R,schemaCode:D,it:T}=g;if(!_&&!A)return;const F=b.let("valid"),L=R.items?(0,p.getSchemaTypes)(R.items):[];function Z(G,q){const X=b.name("item"),Q=(0,p.checkDataTypes)(L,X,T.opts.strictNumbers,p.DataType.Wrong),z=b.const("indices",C._`{}`);b.for(C._`;${G}--;`,()=>{b.let(X,C._`${I}[${G}]`),b.if(Q,C._`continue`),L.length>1&&b.if(C._`typeof ${X} == "string"`,C._`${X} += "_"`),b.if(C._`typeof ${z}[${X}] == "number"`,()=>{b.assign(q,C._`${z}[${X}]`),g.error(),b.assign(F,!1).break()}).code(C._`${z}[${X}] = ${G}`)})}function Y(G,q){const X=(0,w.useFunc)(b,M.default),Q=b.name("outer");b.label(Q).for(C._`;${G}--;`,()=>b.for(C._`${q} = ${G}; ${q}--;`,()=>b.if(C._`${X}(${I}[${G}], ${I}[${q}])`,()=>{g.error(),b.assign(F,!1).break(Q)})))}g.block$data(F,function V(){const G=b.let("i",C._`${I}.length`),q=b.let("j");g.setParams({i:G,j:q}),b.assign(F,!0),b.if(C._`${G} > 1`,()=>(function j(){return L.length>0&&!L.some(G=>"object"===G||"array"===G)}()?Z:Y)(G,q))},C._`${D} === false`),g.ok(F)}};a.default=v},87977:(ne,a,y)=>{"use strict";const p=a;p.bignum=y(13854),p.define=y(39516).define,p.base=y(87813),p.constants=y(5459),p.decoders=y(70196),p.encoders=y(21131)},39516:(ne,a,y)=>{"use strict";const p=y(21131),C=y(70196),w=y(83894);function u(v,g){this.name=v,this.body=g,this.decoders={},this.encoders={}}a.define=function(g,b){return new u(g,b)},u.prototype._createNamed=function(g){const b=this.name;function I(_){this._initNamed(_,b)}return w(I,g),I.prototype._initNamed=function(A,R){g.call(this,A,R)},new I(this)},u.prototype._getDecoder=function(g){return g=g||"der",this.decoders.hasOwnProperty(g)||(this.decoders[g]=this._createNamed(C[g])),this.decoders[g]},u.prototype.decode=function(g,b,I){return this._getDecoder(b).decode(g,I)},u.prototype._getEncoder=function(g){return g=g||"der",this.encoders.hasOwnProperty(g)||(this.encoders[g]=this._createNamed(p[g])),this.encoders[g]},u.prototype.encode=function(g,b,I){return this._getEncoder(b).encode(g,I)}},12769:(ne,a,y)=>{"use strict";const p=y(83894),C=y(4919).b,w=y(62038).Buffer;function M(v,g){C.call(this,g),w.isBuffer(v)?(this.base=v,this.offset=0,this.length=v.length):this.error("Input not Buffer")}function u(v,g){if(Array.isArray(v))this.length=0,this.value=v.map(function(b){return u.isEncoderBuffer(b)||(b=new u(b,g)),this.length+=b.length,b},this);else if("number"==typeof v){if(!(0<=v&&v<=255))return g.error("non-byte EncoderBuffer value");this.value=v,this.length=1}else if("string"==typeof v)this.value=v,this.length=w.byteLength(v);else{if(!w.isBuffer(v))return g.error("Unsupported type: "+typeof v);this.value=v,this.length=v.length}}p(M,C),a.C=M,M.isDecoderBuffer=function(g){return g instanceof M||"object"==typeof g&&w.isBuffer(g.base)&&"DecoderBuffer"===g.constructor.name&&"number"==typeof g.offset&&"number"==typeof g.length&&"function"==typeof g.save&&"function"==typeof g.restore&&"function"==typeof g.isEmpty&&"function"==typeof g.readUInt8&&"function"==typeof g.skip&&"function"==typeof g.raw},M.prototype.save=function(){return{offset:this.offset,reporter:C.prototype.save.call(this)}},M.prototype.restore=function(g){const b=new M(this.base);return b.offset=g.offset,b.length=this.offset,this.offset=g.offset,C.prototype.restore.call(this,g.reporter),b},M.prototype.isEmpty=function(){return this.offset===this.length},M.prototype.readUInt8=function(g){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(g||"DecoderBuffer overrun")},M.prototype.skip=function(g,b){if(!(this.offset+g<=this.length))return this.error(b||"DecoderBuffer overrun");const I=new M(this.base);return I._reporterState=this._reporterState,I.offset=this.offset,I.length=this.offset+g,this.offset+=g,I},M.prototype.raw=function(g){return this.base.slice(g?g.offset:this.offset,this.length)},a.R=u,u.isEncoderBuffer=function(g){return g instanceof u||"object"==typeof g&&"EncoderBuffer"===g.constructor.name&&"number"==typeof g.length&&"function"==typeof g.join},u.prototype.join=function(g,b){return g||(g=w.alloc(this.length)),b||(b=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(I){I.join(g,b),b+=I.length}):("number"==typeof this.value?g[b]=this.value:"string"==typeof this.value?g.write(this.value,b):w.isBuffer(this.value)&&this.value.copy(g,b),b+=this.length)),g}},87813:(ne,a,y)=>{"use strict";const p=a;p.Reporter=y(4919).b,p.DecoderBuffer=y(12769).C,p.EncoderBuffer=y(12769).R,p.Node=y(31430)},31430:(ne,a,y)=>{"use strict";const p=y(4919).b,C=y(12769).R,w=y(12769).C,M=y(32391),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"],v=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function b(_,A,R){const D={};this._baseState=D,D.name=R,D.enc=_,D.parent=A||null,D.children=null,D.tag=null,D.args=null,D.reverseArgs=null,D.choice=null,D.optional=!1,D.any=!1,D.obj=!1,D.use=null,D.useDecoder=null,D.key=null,D.default=null,D.explicit=null,D.implicit=null,D.contains=null,D.parent||(D.children=[],this._wrap())}ne.exports=b;const I=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){const A=this._baseState,R={};I.forEach(function(T){R[T]=A[T]});const D=new this.constructor(R.parent);return D._baseState=R,D},b.prototype._wrap=function(){const A=this._baseState;v.forEach(function(R){this[R]=function(){const T=new this.constructor(this);return A.children.push(T),T[R].apply(T,arguments)}},this)},b.prototype._init=function(A){const R=this._baseState;M(null===R.parent),A.call(this),R.children=R.children.filter(function(D){return D._baseState.parent===this},this),M.equal(R.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(A){const R=this._baseState,D=A.filter(function(T){return T instanceof this.constructor},this);A=A.filter(function(T){return!(T instanceof this.constructor)},this),0!==D.length&&(M(null===R.children),R.children=D,D.forEach(function(T){T._baseState.parent=this},this)),0!==A.length&&(M(null===R.args),R.args=A,R.reverseArgs=A.map(function(T){if("object"!=typeof T||T.constructor!==Object)return T;const F={};return Object.keys(T).forEach(function(L){L==(0|L)&&(L|=0);const V=T[L];F[V]=L}),F}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(_){b.prototype[_]=function(){const R=this._baseState;throw new Error(_+" not implemented for encoding: "+R.enc)}}),u.forEach(function(_){b.prototype[_]=function(){const R=this._baseState,D=Array.prototype.slice.call(arguments);return M(null===R.tag),R.tag=_,this._useArgs(D),this}}),b.prototype.use=function(A){M(A);const R=this._baseState;return M(null===R.use),R.use=A,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(A){const R=this._baseState;return M(null===R.default),R.default=A,R.optional=!0,this},b.prototype.explicit=function(A){const R=this._baseState;return M(null===R.explicit&&null===R.implicit),R.explicit=A,this},b.prototype.implicit=function(A){const R=this._baseState;return M(null===R.explicit&&null===R.implicit),R.implicit=A,this},b.prototype.obj=function(){const A=this._baseState,R=Array.prototype.slice.call(arguments);return A.obj=!0,0!==R.length&&this._useArgs(R),this},b.prototype.key=function(A){const R=this._baseState;return M(null===R.key),R.key=A,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(A){const R=this._baseState;return M(null===R.choice),R.choice=A,this._useArgs(Object.keys(A).map(function(D){return A[D]})),this},b.prototype.contains=function(A){const R=this._baseState;return M(null===R.use),R.contains=A,this},b.prototype._decode=function(A,R){const D=this._baseState;if(null===D.parent)return A.wrapResult(D.children[0]._decode(A,R));let V,T=D.default,F=!0,L=null;if(null!==D.key&&(L=A.enterKey(D.key)),D.optional){let j=null;if(null!==D.explicit?j=D.explicit:null!==D.implicit?j=D.implicit:null!==D.tag&&(j=D.tag),null!==j||D.any){if(F=this._peekTag(A,j,D.any),A.isError(F))return F}else{const Z=A.save();try{null===D.choice?this._decodeGeneric(D.tag,A,R):this._decodeChoice(A,R),F=!0}catch{F=!1}A.restore(Z)}}if(D.obj&&F&&(V=A.enterObject()),F){if(null!==D.explicit){const Z=this._decodeTag(A,D.explicit);if(A.isError(Z))return Z;A=Z}const j=A.offset;if(null===D.use&&null===D.choice){let Z;D.any&&(Z=A.save());const Y=this._decodeTag(A,null!==D.implicit?D.implicit:D.tag,D.any);if(A.isError(Y))return Y;D.any?T=A.raw(Z):A=Y}if(R&&R.track&&null!==D.tag&&R.track(A.path(),j,A.length,"tagged"),R&&R.track&&null!==D.tag&&R.track(A.path(),A.offset,A.length,"content"),D.any||(T=null===D.choice?this._decodeGeneric(D.tag,A,R):this._decodeChoice(A,R)),A.isError(T))return T;if(!D.any&&null===D.choice&&null!==D.children&&D.children.forEach(function(Y){Y._decode(A,R)}),D.contains&&("octstr"===D.tag||"bitstr"===D.tag)){const Z=new w(T);T=this._getUse(D.contains,A._reporterState.obj)._decode(Z,R)}}return D.obj&&F&&(T=A.leaveObject(V)),null===D.key||null===T&&!0!==F?null!==L&&A.exitKey(L):A.leaveKey(L,D.key,T),T},b.prototype._decodeGeneric=function(A,R,D){const T=this._baseState;return"seq"===A||"set"===A?null:"seqof"===A||"setof"===A?this._decodeList(R,A,T.args[0],D):/str$/.test(A)?this._decodeStr(R,A,D):"objid"===A&&T.args?this._decodeObjid(R,T.args[0],T.args[1],D):"objid"===A?this._decodeObjid(R,null,null,D):"gentime"===A||"utctime"===A?this._decodeTime(R,A,D):"null_"===A?this._decodeNull(R,D):"bool"===A?this._decodeBool(R,D):"objDesc"===A?this._decodeStr(R,A,D):"int"===A||"enum"===A?this._decodeInt(R,T.args&&T.args[0],D):null!==T.use?this._getUse(T.use,R._reporterState.obj)._decode(R,D):R.error("unknown tag: "+A)},b.prototype._getUse=function(A,R){const D=this._baseState;return D.useDecoder=this._use(A,R),M(null===D.useDecoder._baseState.parent),D.useDecoder=D.useDecoder._baseState.children[0],D.implicit!==D.useDecoder._baseState.implicit&&(D.useDecoder=D.useDecoder.clone(),D.useDecoder._baseState.implicit=D.implicit),D.useDecoder},b.prototype._decodeChoice=function(A,R){const D=this._baseState;let T=null,F=!1;return Object.keys(D.choice).some(function(L){const V=A.save(),j=D.choice[L];try{const Z=j._decode(A,R);if(A.isError(Z))return!1;T={type:L,value:Z},F=!0}catch{return A.restore(V),!1}return!0},this),F?T:A.error("Choice not matched")},b.prototype._createEncoderBuffer=function(A){return new C(A,this.reporter)},b.prototype._encode=function(A,R,D){const T=this._baseState;if(null!==T.default&&T.default===A)return;const F=this._encodeValue(A,R,D);return void 0===F||this._skipDefault(F,R,D)?void 0:F},b.prototype._encodeValue=function(A,R,D){const T=this._baseState;if(null===T.parent)return T.children[0]._encode(A,R||new p);let F=null;if(this.reporter=R,T.optional&&void 0===A){if(null===T.default)return;A=T.default}let L=null,V=!1;if(T.any)F=this._createEncoderBuffer(A);else if(T.choice)F=this._encodeChoice(A,R);else if(T.contains)L=this._getUse(T.contains,D)._encode(A,R),V=!0;else if(T.children)L=T.children.map(function(j){if("null_"===j._baseState.tag)return j._encode(null,R,A);if(null===j._baseState.key)return R.error("Child should have a key");const Z=R.enterKey(j._baseState.key);if("object"!=typeof A)return R.error("Child expected, but input is not object");const Y=j._encode(A[j._baseState.key],R,A);return R.leaveKey(Z),Y},this).filter(function(j){return j}),L=this._createEncoderBuffer(L);else if("seqof"===T.tag||"setof"===T.tag){if(!T.args||1!==T.args.length)return R.error("Too many args for : "+T.tag);if(!Array.isArray(A))return R.error("seqof/setof, but data is not Array");const j=this.clone();j._baseState.implicit=null,L=this._createEncoderBuffer(A.map(function(Z){const Y=this._baseState;return this._getUse(Y.args[0],A)._encode(Z,R)},j))}else null!==T.use?F=this._getUse(T.use,D)._encode(A,R):(L=this._encodePrimitive(T.tag,A),V=!0);if(!T.any&&null===T.choice){const j=null!==T.implicit?T.implicit:T.tag,Z=null===T.implicit?"universal":"context";null===j?null===T.use&&R.error("Tag could be omitted only for .use()"):null===T.use&&(F=this._encodeComposite(j,V,Z,L))}return null!==T.explicit&&(F=this._encodeComposite(T.explicit,!1,"context",F)),F},b.prototype._encodeChoice=function(A,R){const D=this._baseState,T=D.choice[A.type];return T||M(!1,A.type+" not found in "+JSON.stringify(Object.keys(D.choice))),T._encode(A.value,R)},b.prototype._encodePrimitive=function(A,R){const D=this._baseState;if(/str$/.test(A))return this._encodeStr(R,A);if("objid"===A&&D.args)return this._encodeObjid(R,D.reverseArgs[0],D.args[1]);if("objid"===A)return this._encodeObjid(R,null,null);if("gentime"===A||"utctime"===A)return this._encodeTime(R,A);if("null_"===A)return this._encodeNull();if("int"===A||"enum"===A)return this._encodeInt(R,D.args&&D.reverseArgs[0]);if("bool"===A)return this._encodeBool(R);if("objDesc"===A)return this._encodeStr(R,A);throw new Error("Unsupported tag: "+A)},b.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},b.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(A)}},4919:(ne,a,y)=>{"use strict";const p=y(83894);function C(M){this._reporterState={obj:null,path:[],options:M||{},errors:[]}}function w(M,u){this.path=M,this.rethrow(u)}a.b=C,C.prototype.isError=function(u){return u instanceof w},C.prototype.save=function(){const u=this._reporterState;return{obj:u.obj,pathLen:u.path.length}},C.prototype.restore=function(u){const v=this._reporterState;v.obj=u.obj,v.path=v.path.slice(0,u.pathLen)},C.prototype.enterKey=function(u){return this._reporterState.path.push(u)},C.prototype.exitKey=function(u){const v=this._reporterState;v.path=v.path.slice(0,u-1)},C.prototype.leaveKey=function(u,v,g){const b=this._reporterState;this.exitKey(u),null!==b.obj&&(b.obj[v]=g)},C.prototype.path=function(){return this._reporterState.path.join("/")},C.prototype.enterObject=function(){const u=this._reporterState,v=u.obj;return u.obj={},v},C.prototype.leaveObject=function(u){const v=this._reporterState,g=v.obj;return v.obj=u,g},C.prototype.error=function(u){let v;const g=this._reporterState,b=u instanceof w;if(v=b?u:new w(g.path.map(function(I){return"["+JSON.stringify(I)+"]"}).join(""),u.message||u,u.stack),!g.options.partial)throw v;return b||g.errors.push(v),v},C.prototype.wrapResult=function(u){const v=this._reporterState;return v.options.partial?{result:this.isError(u)?null:u,errors:v.errors}:u},p(w,Error),w.prototype.rethrow=function(u){if(this.message=u+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,w),!this.stack)try{throw new Error(this.message)}catch(v){this.stack=v.stack}return this}},25496:(ne,a)=>{"use strict";function y(p){const C={};return Object.keys(p).forEach(function(w){(0|w)==w&&(w|=0);const M=p[w];C[M]=w}),C}a.tagClass={0:"universal",1:"application",2:"context",3:"private"},a.tagClassByName=y(a.tagClass),a.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"},a.tagByName=y(a.tag)},5459:(ne,a,y)=>{"use strict";const p=a;p._reverse=function(w){const M={};return Object.keys(w).forEach(function(u){(0|u)==u&&(u|=0);const v=w[u];M[v]=u}),M},p.der=y(25496)},87127:(ne,a,y)=>{"use strict";const p=y(83894),C=y(13854),w=y(12769).C,M=y(31430),u=y(25496);function v(_){this.enc="der",this.name=_.name,this.entity=_,this.tree=new g,this.tree._init(_.body)}function g(_){M.call(this,"der",_)}function b(_,A){let R=_.readUInt8(A);if(_.isError(R))return R;const D=u.tagClass[R>>6],T=0==(32&R);if(31==(31&R)){let L=R;for(R=0;128==(128&L);){if(L=_.readUInt8(A),_.isError(L))return L;R<<=7,R|=127&L}}else R&=31;return{cls:D,primitive:T,tag:R,tagStr:u.tag[R]}}function I(_,A,R){let D=_.readUInt8(R);if(_.isError(D))return D;if(!A&&128===D)return null;if(!(128&D))return D;const T=127&D;if(T>4)return _.error("length octect is too long");D=0;for(let F=0;F{"use strict";const p=a;p.der=y(87127),p.pem=y(99617)},99617:(ne,a,y)=>{"use strict";const p=y(83894),C=y(62038).Buffer,w=y(87127);function M(u){w.call(this,u),this.enc="pem"}p(M,w),ne.exports=M,M.prototype.decode=function(v,g){const b=v.toString().split(/[\r\n]+/g),I=g.label.toUpperCase(),_=/^-----(BEGIN|END) ([^-]+)-----$/;let A=-1,R=-1;for(let F=0;F{"use strict";const p=y(83894),C=y(62038).Buffer,w=y(31430),M=y(25496);function u(I){this.enc="der",this.name=I.name,this.entity=I,this.tree=new v,this.tree._init(I.body)}function v(I){w.call(this,"der",I)}function g(I){return I<10?"0"+I:I}ne.exports=u,u.prototype.encode=function(_,A){return this.tree._encode(_,A).join()},p(v,w),v.prototype._encodeComposite=function(_,A,R,D){const T=function b(I,_,A,R){let D;if("seqof"===I?I="seq":"setof"===I&&(I="set"),M.tagByName.hasOwnProperty(I))D=M.tagByName[I];else{if("number"!=typeof I||(0|I)!==I)return R.error("Unknown tag: "+I);D=I}return D>=31?R.error("Multi-octet tag encoding unsupported"):(_||(D|=32),D|=M.tagClassByName[A||"universal"]<<6,D)}(_,A,R,this.reporter);if(D.length<128){const V=C.alloc(2);return V[0]=T,V[1]=D.length,this._createEncoderBuffer([V,D])}let F=1;for(let V=D.length;V>=256;V>>=8)F++;const L=C.alloc(2+F);L[0]=T,L[1]=128|F;for(let V=1+F,j=D.length;j>0;V--,j>>=8)L[V]=255&j;return this._createEncoderBuffer([L,D])},v.prototype._encodeStr=function(_,A){if("bitstr"===A)return this._createEncoderBuffer([0|_.unused,_.data]);if("bmpstr"===A){const R=C.alloc(2*_.length);for(let D=0;D<_.length;D++)R.writeUInt16BE(_.charCodeAt(D),2*D);return this._createEncoderBuffer(R)}return"numstr"===A?this._isNumstr(_)?this._createEncoderBuffer(_):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===A?this._isPrintstr(_)?this._createEncoderBuffer(_):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(A)||"objDesc"===A?this._createEncoderBuffer(_):this.reporter.error("Encoding of string type: "+A+" unsupported")},v.prototype._encodeObjid=function(_,A,R){if("string"==typeof _){if(!A)return this.reporter.error("string objid given, but no values map found");if(!A.hasOwnProperty(_))return this.reporter.error("objid not found in values map");_=A[_].split(/[\s.]+/g);for(let L=0;L<_.length;L++)_[L]|=0}else if(Array.isArray(_)){_=_.slice();for(let L=0;L<_.length;L++)_[L]|=0}if(!Array.isArray(_))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(_));if(!R){if(_[1]>=40)return this.reporter.error("Second objid identifier OOB");_.splice(0,2,40*_[0]+_[1])}let D=0;for(let L=0;L<_.length;L++){let V=_[L];for(D++;V>=128;V>>=7)D++}const T=C.alloc(D);let F=T.length-1;for(let L=_.length-1;L>=0;L--){let V=_[L];for(T[F--]=127&V;(V>>=7)>0;)T[F--]=128|127&V}return this._createEncoderBuffer(T)},v.prototype._encodeTime=function(_,A){let R;const D=new Date(_);return"gentime"===A?R=[g(D.getUTCFullYear()),g(D.getUTCMonth()+1),g(D.getUTCDate()),g(D.getUTCHours()),g(D.getUTCMinutes()),g(D.getUTCSeconds()),"Z"].join(""):"utctime"===A?R=[g(D.getUTCFullYear()%100),g(D.getUTCMonth()+1),g(D.getUTCDate()),g(D.getUTCHours()),g(D.getUTCMinutes()),g(D.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+A+" time is not supported yet"),this._encodeStr(R,"octstr")},v.prototype._encodeNull=function(){return this._createEncoderBuffer("")},v.prototype._encodeInt=function(_,A){if("string"==typeof _){if(!A)return this.reporter.error("String int or enum given, but no values map");if(!A.hasOwnProperty(_))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(_));_=A[_]}if("number"!=typeof _&&!C.isBuffer(_)){const T=_.toArray();!_.sign&&128&T[0]&&T.unshift(0),_=C.from(T)}if(C.isBuffer(_)){let T=_.length;0===_.length&&T++;const F=C.alloc(T);return _.copy(F),0===_.length&&(F[0]=0),this._createEncoderBuffer(F)}if(_<128)return this._createEncoderBuffer(_);if(_<256)return this._createEncoderBuffer([0,_]);let R=1;for(let T=_;T>=256;T>>=8)R++;const D=new Array(R);for(let T=D.length-1;T>=0;T--)D[T]=255&_,_>>=8;return 128&D[0]&&D.unshift(0),this._createEncoderBuffer(C.from(D))},v.prototype._encodeBool=function(_){return this._createEncoderBuffer(_?255:0)},v.prototype._use=function(_,A){return"function"==typeof _&&(_=_(A)),_._getEncoder("der").tree},v.prototype._skipDefault=function(_,A,R){const D=this._baseState;let T;if(null===D.default)return!1;const F=_.join();if(void 0===D.defaultBuffer&&(D.defaultBuffer=this._encodeValue(D.default,A,R).join()),F.length!==D.defaultBuffer.length)return!1;for(T=0;T{"use strict";const p=a;p.der=y(16374),p.pem=y(3530)},3530:(ne,a,y)=>{"use strict";const p=y(83894),C=y(16374);function w(M){C.call(this,M),this.enc="pem"}p(w,C),ne.exports=w,w.prototype.encode=function(u,v){const b=C.prototype.encode.call(this,u).toString("base64"),I=["-----BEGIN "+v.label+"-----"];for(let _=0;_=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},21082:(ne,a,y)=>{"use strict";var p=y(73502).Buffer;ne.exports=function C(w){if(w.length>=255)throw new TypeError("Alphabet too long");for(var M=new Uint8Array(256),u=0;u>>0,G=new Uint8Array(Y);L[V];){var q=M[L.charCodeAt(V)];if(255===q)return;for(var X=0,Q=Y-1;(0!==q||X>>0,G[Q]=q%256>>>0,q=q/256>>>0;if(0!==q)throw new Error("Non-zero carry");Z=X,V++}for(var z=Y-Z;z!==Y&&0===G[z];)z++;var $=p.allocUnsafe(j+(Y-z));$.fill(0,0,j);for(var S=j;z!==Y;)$[S++]=G[z++];return $}return{encode:function D(L){if((Array.isArray(L)||L instanceof Uint8Array)&&(L=p.from(L)),!p.isBuffer(L))throw new TypeError("Expected Buffer");if(0===L.length)return"";for(var V=0,j=0,Z=0,Y=L.length;Z!==Y&&0===L[Z];)Z++,V++;for(var G=(Y-Z)*R+1>>>0,q=new Uint8Array(G);Z!==Y;){for(var X=L[Z],Q=0,z=G-1;(0!==X||Q>>0,q[z]=X%I>>>0,X=X/I>>>0;if(0!==X)throw new Error("Non-zero carry");j=Q,Z++}for(var $=G-j;$!==G&&0===q[$];)$++;for(var S=_.repeat(V);${"use strict";a.byteLength=function g(D){var T=v(D),F=T[0],L=T[1];return 3*(F+L)/4-L},a.toByteArray=function I(D){var T,G,F=v(D),L=F[0],V=F[1],j=new C(function b(D,T,F){return 3*(T+F)/4-F}(0,L,V)),Z=0,Y=V>0?L-4:L;for(G=0;G>16&255,j[Z++]=T>>8&255,j[Z++]=255&T;return 2===V&&(T=p[D.charCodeAt(G)]<<2|p[D.charCodeAt(G+1)]>>4,j[Z++]=255&T),1===V&&(T=p[D.charCodeAt(G)]<<10|p[D.charCodeAt(G+1)]<<4|p[D.charCodeAt(G+2)]>>2,j[Z++]=T>>8&255,j[Z++]=255&T),j},a.fromByteArray=function R(D){for(var T,F=D.length,L=F%3,V=[],j=16383,Z=0,Y=F-L;ZY?Y:Z+j));return 1===L?(T=D[F-1],V.push(y[T>>2]+y[T<<4&63]+"==")):2===L&&(T=(D[F-2]<<8)+D[F-1],V.push(y[T>>10]+y[T>>4&63]+y[T<<2&63]+"=")),V.join("")};for(var y=[],p=[],C=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,u=w.length;M0)throw new Error("Invalid string. Length must be a multiple of 4");var F=D.indexOf("=");return-1===F&&(F=T),[F,F===T?0:4-F%4]}function _(D){return y[D>>18&63]+y[D>>12&63]+y[D>>6&63]+y[63&D]}function A(D,T,F){for(var L,V=[],j=T;j{"use strict";for(var a="qpzry9x8gf2tvdw0s3jn54khce6mua7l",y={},p=0;p>25;return(33554431&T)<<5^996825010&-(F>>0&1)^642813549&-(F>>1&1)^513874426&-(F>>2&1)^1027748829&-(F>>3&1)^705979059&-(F>>4&1)}function M(T){for(var F=1,L=0;L126)return"Invalid prefix ("+T+")";F=w(F)^V>>5}for(F=w(F),L=0;LF)return"Exceeds length limit";var L=T.toLowerCase(),V=T.toUpperCase();if(T!==L&&T!==V)return"Mixed-case string "+T;var j=(T=L).lastIndexOf("1");if(-1===j)return"No separator character for "+T;if(0===j)return"Missing prefix for "+T;var Z=T.slice(0,j),Y=T.slice(j+1);if(Y.length<6)return"Data too short";var G=M(Z);if("string"==typeof G)return G;for(var q=[],X=0;X=Y.length)&&q.push(z)}return 1!==G?"Invalid checksum for "+T:{prefix:Z,words:q}}function I(T,F,L,V){for(var j=0,Z=0,Y=(1<=L;)Z-=L,G.push(j>>Z&Y);if(V)Z>0&&G.push(j<=F)return"Excess padding";if(j<L)throw new TypeError("Exceeds length limit");var V=M(T=T.toLowerCase());if("string"==typeof V)throw new Error(V);for(var j=T+"1",Z=0;Z>5)throw new Error("Non 5-bit word");V=w(V)^Y,j+=a.charAt(Y)}for(Z=0;Z<6;++Z)V=w(V);for(V^=1,Z=0;Z<6;++Z){var G=V>>5*(5-Z)&31;j+=a.charAt(G)}return j},toWordsUnsafe:function _(T){var F=I(T,8,5,!0);if(Array.isArray(F))return F},toWords:function A(T){var F=I(T,8,5,!0);if(Array.isArray(F))return F;throw new Error(F)},fromWordsUnsafe:function R(T){var F=I(T,5,8,!1);if(Array.isArray(F))return F},fromWords:function D(T){var F=I(T,5,8,!1);if(Array.isArray(F))return F;throw new Error(F)}}},48670:(ne,a,y)=>{var p;p=typeof window<"u"&&window.crypto?function(Y){var G=new Uint32Array(Y);return Buffer.from(window.crypto.getRandomValues(G))}:y(41348).randomBytes;var C=y(96386),w=y(99357).pbkdf2Sync,M=y(24457),u=M,v="Invalid mnemonic",g="Invalid entropy",b="Invalid mnemonic checksum";function I(Y,G,q){for(;Y.length32)throw new Error(g);if(S.length%4!=0)throw new Error(g);var r=Buffer.from(S);if(R(r)!==$)throw new Error(b);return r.toString("hex")}function V(Y,G){if(Buffer.isBuffer(Y)||(Y=Buffer.from(Y,"hex")),G=G||u,Y.length<16)throw new TypeError(g);if(Y.length>32)throw new TypeError(g);if(Y.length%4!=0)throw new TypeError(g);return(A([].slice.call(Y))+R(Y)).match(/(.{1,11})/g).map(function(S){var r=_(S);return G[r]}).join(" ")}ne.exports={mnemonicToSeed:T,mnemonicToSeedHex:function F(Y,G){return T(Y,G).toString("hex")},mnemonicToEntropy:L,entropyToMnemonic:V,generateMnemonic:function j(Y,G,q){if((Y=Y||128)%32!=0)throw new TypeError(g);return V((G=G||p)(Y/8),q)},validateMnemonic:function Z(Y,G){try{L(Y,G)}catch{return!1}return!0},wordlists:{EN:M}}},98538:function(ne,a,y){(function(p,C){"use strict";function w(d,h){if(!d)throw new Error(h||"Assertion failed")}function M(d,h){d.super_=h;var E=function(){};E.prototype=h.prototype,d.prototype=new E,d.prototype.constructor=d}function u(d,h,E){if(u.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,null!==d&&(("le"===h||"be"===h)&&(E=h,h=10),this._init(d||0,h||10,E||"be"))}var v;"object"==typeof p?p.exports=u:C.BN=u,u.BN=u,u.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:y(46601).Buffer}catch{}function g(d,h){var E=d.charCodeAt(h);return E>=48&&E<=57?E-48:E>=65&&E<=70?E-55:E>=97&&E<=102?E-87:void w(!1,"Invalid character in "+d)}function b(d,h,E){var k=g(d,E);return E-1>=h&&(k|=g(d,E-1)<<4),k}function I(d,h,E,k){for(var B=0,x=0,f=Math.min(d.length,E),P=h;P=49?se-49+10:se>=17?se-17+10:se,w(se>=0&&x0?h:E},u.min=function(h,E){return h.cmp(E)<0?h:E},u.prototype._init=function(h,E,k){if("number"==typeof h)return this._initNumber(h,E,k);if("object"==typeof h)return this._initArray(h,E,k);"hex"===E&&(E=16),w(E===(0|E)&&E>=2&&E<=36);var B=0;"-"===(h=h.toString().replace(/\s+/g,""))[0]&&(B++,this.negative=1),B=0;B-=3)f=h[B]|h[B-1]<<8|h[B-2]<<16,this.words[x]|=f<>>26-P&67108863,(P+=24)>=26&&(P-=26,x++);else if("le"===k)for(B=0,x=0;B>>26-P&67108863,(P+=24)>=26&&(P-=26,x++);return this._strip()},u.prototype._parseHex=function(h,E,k){this.length=Math.ceil((h.length-E)/6),this.words=new Array(this.length);for(var B=0;B=E;B-=2)P=b(h,E,B)<=18?(x-=18,f+=1,this.words[f]|=P>>>26):x+=8;else for(B=(h.length-E)%2==0?E+1:E;B=18?(x-=18,f+=1,this.words[f]|=P>>>26):x+=8;this._strip()},u.prototype._parseBase=function(h,E,k){this.words=[0],this.length=1;for(var B=0,x=1;x<=67108863;x*=E)B++;B--,x=x/E|0;for(var f=h.length-k,P=f%B,se=Math.min(f,f-P)+k,te=0,ie=k;ie1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{u.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{u.prototype.inspect=A}else u.prototype.inspect=A;function A(){return(this.red?""}var R=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[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];u.prototype.toString=function(h,E){var k;if(E=0|E||1,16===(h=h||10)||"hex"===h){k="";for(var B=0,x=0,f=0;f>>24-B&16777215,(B+=2)>=26&&(B-=26,f--),k=0!==x||f!==this.length-1?R[6-se.length]+se+k:se+k}for(0!==x&&(k=x.toString(16)+k);k.length%E!=0;)k="0"+k;return 0!==this.negative&&(k="-"+k),k}if(h===(0|h)&&h>=2&&h<=36){var te=D[h],ie=T[h];k="";var de=this.clone();for(de.negative=0;!de.isZero();){var Ce=de.modrn(ie).toString(h);k=(de=de.idivn(ie)).isZero()?Ce+k:R[te-Ce.length]+Ce+k}for(this.isZero()&&(k="0"+k);k.length%E!=0;)k="0"+k;return 0!==this.negative&&(k="-"+k),k}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var h=this.words[0];return 2===this.length?h+=67108864*this.words[1]:3===this.length&&1===this.words[2]?h+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-h:h},u.prototype.toJSON=function(){return this.toString(16,2)},v&&(u.prototype.toBuffer=function(h,E){return this.toArrayLike(v,h,E)}),u.prototype.toArray=function(h,E){return this.toArrayLike(Array,h,E)};function V(d,h,E){E.negative=h.negative^d.negative;var k=d.length+h.length|0;E.length=k,k=k-1|0;var B=0|d.words[0],x=0|h.words[0],f=B*x,P=67108863&f,se=f/67108864|0;E.words[0]=P;for(var te=1;te>>26,de=67108863&se,Ce=Math.min(te,h.length-1),ye=Math.max(0,te-d.length+1);ye<=Ce;ye++){var ve=te-ye|0;ie+=(f=(B=0|d.words[ve])*(x=0|h.words[ye])+de)/67108864|0,de=67108863&f}E.words[te]=0|de,se=0|ie}return 0!==se?E.words[te]=0|se:E.length--,E._strip()}u.prototype.toArrayLike=function(h,E,k){this._strip();var B=this.byteLength(),x=k||Math.max(1,B);w(B<=x,"byte array longer than desired length"),w(x>0,"Requested array length <= 0");var f=function(h,E){return h.allocUnsafe?h.allocUnsafe(E):new h(E)}(h,x);return this["_toArrayLike"+("le"===E?"LE":"BE")](f,B),f},u.prototype._toArrayLikeLE=function(h,E){for(var k=0,B=0,x=0,f=0;x>8&255),k>16&255),6===f?(k>24&255),B=0,f=0):(B=P>>>24,f+=2)}if(k=0&&(h[k--]=P>>8&255),k>=0&&(h[k--]=P>>16&255),6===f?(k>=0&&(h[k--]=P>>24&255),B=0,f=0):(B=P>>>24,f+=2)}if(k>=0)for(h[k--]=B;k>=0;)h[k--]=0},Math.clz32?u.prototype._countBits=function(h){return 32-Math.clz32(h)}:u.prototype._countBits=function(h){var E=h,k=0;return E>=4096&&(k+=13,E>>>=13),E>=64&&(k+=7,E>>>=7),E>=8&&(k+=4,E>>>=4),E>=2&&(k+=2,E>>>=2),k+E},u.prototype._zeroBits=function(h){if(0===h)return 26;var E=h,k=0;return 8191&E||(k+=13,E>>>=13),127&E||(k+=7,E>>>=7),15&E||(k+=4,E>>>=4),3&E||(k+=2,E>>>=2),1&E||k++,k},u.prototype.bitLength=function(){var h=this.words[this.length-1],E=this._countBits(h);return 26*(this.length-1)+E},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,E=0;Eh.length?this.clone().ior(h):h.clone().ior(this)},u.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},u.prototype.iuand=function(h){var E;E=this.length>h.length?h:this;for(var k=0;kh.length?this.clone().iand(h):h.clone().iand(this)},u.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},u.prototype.iuxor=function(h){var E,k;this.length>h.length?(E=this,k=h):(E=h,k=this);for(var B=0;Bh.length?this.clone().ixor(h):h.clone().ixor(this)},u.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},u.prototype.inotn=function(h){w("number"==typeof h&&h>=0);var E=0|Math.ceil(h/26),k=h%26;this._expand(E),k>0&&E--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-k),this._strip()},u.prototype.notn=function(h){return this.clone().inotn(h)},u.prototype.setn=function(h,E){w("number"==typeof h&&h>=0);var k=h/26|0,B=h%26;return this._expand(k+1),this.words[k]=E?this.words[k]|1<h.length?(k=this,B=h):(k=h,B=this);for(var x=0,f=0;f>>26;for(;0!==x&&f>>26;if(this.length=k.length,0!==x)this.words[this.length]=x,this.length++;else if(k!==this)for(;fh.length?this.clone().iadd(h):h.clone().iadd(this)},u.prototype.isub=function(h){if(0!==h.negative){h.negative=0;var E=this.iadd(h);return h.negative=1,E._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var B,x,k=this.cmp(h);if(0===k)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(B=this,x=h):(B=h,x=this);for(var f=0,P=0;P>26,this.words[P]=67108863&E;for(;0!==f&&P>26,this.words[P]=67108863&E;if(0===f&&P>>13,ve=0|B[1],ae=8191&ve,fe=ve>>>13,pe=0|B[2],Ee=8191&pe,ce=pe>>>13,be=0|B[3],Ne=8191&be,Fe=be>>>13,ct=0|B[4],Ze=8191&ct,Ve=ct>>>13,Ut=0|B[5],$e=8191&Ut,tt=Ut>>>13,Xt=0|B[6],ot=8191&Xt,st=Xt>>>13,$t=0|B[7],Pe=8191&$t,Ae=$t>>>13,xe=0|B[8],Be=8191&xe,ze=xe>>>13,mt=0|B[9],Ye=8191&mt,ut=mt>>>13,ln=0|x[0],ft=8191&ln,wt=ln>>>13,mn=0|x[1],We=8191&mn,Qe=mn>>>13,Qt=0|x[2],ht=8191&Qt,gt=Qt>>>13,on=0|x[3],dt=8191&on,pt=on>>>13,yn=0|x[4],lt=8191&yn,vt=yn>>>13,En=0|x[5],yt=8191&En,At=En>>>13,Se=0|x[6],we=8191&Se,_e=Se>>>13,me=0|x[7],De=8191&me,Ke=me>>>13,it=0|x[8],Je=8191&it,qe=it>>>13,Ht=0|x[9],Ct=8191&Ht,Lt=Ht>>>13;k.negative=h.negative^E.negative,k.length=19;var Tt=(P+(se=Math.imul(Ce,ft))|0)+((8191&(te=(te=Math.imul(Ce,wt))+Math.imul(ye,ft)|0))<<13)|0;P=((ie=Math.imul(ye,wt))+(te>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,se=Math.imul(ae,ft),te=(te=Math.imul(ae,wt))+Math.imul(fe,ft)|0,ie=Math.imul(fe,wt);var Pt=(P+(se=se+Math.imul(Ce,We)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0))<<13)|0;P=((ie=ie+Math.imul(ye,Qe)|0)+(te>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,se=Math.imul(Ee,ft),te=(te=Math.imul(Ee,wt))+Math.imul(ce,ft)|0,ie=Math.imul(ce,wt),se=se+Math.imul(ae,We)|0,te=(te=te+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,ie=ie+Math.imul(fe,Qe)|0;var Bt=(P+(se=se+Math.imul(Ce,ht)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0))<<13)|0;P=((ie=ie+Math.imul(ye,gt)|0)+(te>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,se=Math.imul(Ne,ft),te=(te=Math.imul(Ne,wt))+Math.imul(Fe,ft)|0,ie=Math.imul(Fe,wt),se=se+Math.imul(Ee,We)|0,te=(te=te+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,ie=ie+Math.imul(ce,Qe)|0,se=se+Math.imul(ae,ht)|0,te=(te=te+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,ie=ie+Math.imul(fe,gt)|0;var Zt=(P+(se=se+Math.imul(Ce,dt)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0))<<13)|0;P=((ie=ie+Math.imul(ye,pt)|0)+(te>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,se=Math.imul(Ze,ft),te=(te=Math.imul(Ze,wt))+Math.imul(Ve,ft)|0,ie=Math.imul(Ve,wt),se=se+Math.imul(Ne,We)|0,te=(te=te+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,ie=ie+Math.imul(Fe,Qe)|0,se=se+Math.imul(Ee,ht)|0,te=(te=te+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,ie=ie+Math.imul(ce,gt)|0,se=se+Math.imul(ae,dt)|0,te=(te=te+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,ie=ie+Math.imul(fe,pt)|0;var qt=(P+(se=se+Math.imul(Ce,lt)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0))<<13)|0;P=((ie=ie+Math.imul(ye,vt)|0)+(te>>>13)|0)+(qt>>>26)|0,qt&=67108863,se=Math.imul($e,ft),te=(te=Math.imul($e,wt))+Math.imul(tt,ft)|0,ie=Math.imul(tt,wt),se=se+Math.imul(Ze,We)|0,te=(te=te+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,ie=ie+Math.imul(Ve,Qe)|0,se=se+Math.imul(Ne,ht)|0,te=(te=te+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,ie=ie+Math.imul(Fe,gt)|0,se=se+Math.imul(Ee,dt)|0,te=(te=te+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,ie=ie+Math.imul(ce,pt)|0,se=se+Math.imul(ae,lt)|0,te=(te=te+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,ie=ie+Math.imul(fe,vt)|0;var fn=(P+(se=se+Math.imul(Ce,yt)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0))<<13)|0;P=((ie=ie+Math.imul(ye,At)|0)+(te>>>13)|0)+(fn>>>26)|0,fn&=67108863,se=Math.imul(ot,ft),te=(te=Math.imul(ot,wt))+Math.imul(st,ft)|0,ie=Math.imul(st,wt),se=se+Math.imul($e,We)|0,te=(te=te+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,ie=ie+Math.imul(tt,Qe)|0,se=se+Math.imul(Ze,ht)|0,te=(te=te+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,ie=ie+Math.imul(Ve,gt)|0,se=se+Math.imul(Ne,dt)|0,te=(te=te+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,ie=ie+Math.imul(Fe,pt)|0,se=se+Math.imul(Ee,lt)|0,te=(te=te+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,ie=ie+Math.imul(ce,vt)|0,se=se+Math.imul(ae,yt)|0,te=(te=te+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,ie=ie+Math.imul(fe,At)|0;var xt=(P+(se=se+Math.imul(Ce,we)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0))<<13)|0;P=((ie=ie+Math.imul(ye,_e)|0)+(te>>>13)|0)+(xt>>>26)|0,xt&=67108863,se=Math.imul(Pe,ft),te=(te=Math.imul(Pe,wt))+Math.imul(Ae,ft)|0,ie=Math.imul(Ae,wt),se=se+Math.imul(ot,We)|0,te=(te=te+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,ie=ie+Math.imul(st,Qe)|0,se=se+Math.imul($e,ht)|0,te=(te=te+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,ie=ie+Math.imul(tt,gt)|0,se=se+Math.imul(Ze,dt)|0,te=(te=te+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,ie=ie+Math.imul(Ve,pt)|0,se=se+Math.imul(Ne,lt)|0,te=(te=te+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,ie=ie+Math.imul(Fe,vt)|0,se=se+Math.imul(Ee,yt)|0,te=(te=te+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,ie=ie+Math.imul(ce,At)|0,se=se+Math.imul(ae,we)|0,te=(te=te+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,ie=ie+Math.imul(fe,_e)|0;var Kt=(P+(se=se+Math.imul(Ce,De)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0))<<13)|0;P=((ie=ie+Math.imul(ye,Ke)|0)+(te>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,se=Math.imul(Be,ft),te=(te=Math.imul(Be,wt))+Math.imul(ze,ft)|0,ie=Math.imul(ze,wt),se=se+Math.imul(Pe,We)|0,te=(te=te+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,ie=ie+Math.imul(Ae,Qe)|0,se=se+Math.imul(ot,ht)|0,te=(te=te+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,ie=ie+Math.imul(st,gt)|0,se=se+Math.imul($e,dt)|0,te=(te=te+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,ie=ie+Math.imul(tt,pt)|0,se=se+Math.imul(Ze,lt)|0,te=(te=te+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,ie=ie+Math.imul(Ve,vt)|0,se=se+Math.imul(Ne,yt)|0,te=(te=te+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,ie=ie+Math.imul(Fe,At)|0,se=se+Math.imul(Ee,we)|0,te=(te=te+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,ie=ie+Math.imul(ce,_e)|0,se=se+Math.imul(ae,De)|0,te=(te=te+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,ie=ie+Math.imul(fe,Ke)|0;var Rt=(P+(se=se+Math.imul(Ce,Je)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;P=((ie=ie+Math.imul(ye,qe)|0)+(te>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,se=Math.imul(Ye,ft),te=(te=Math.imul(Ye,wt))+Math.imul(ut,ft)|0,ie=Math.imul(ut,wt),se=se+Math.imul(Be,We)|0,te=(te=te+Math.imul(Be,Qe)|0)+Math.imul(ze,We)|0,ie=ie+Math.imul(ze,Qe)|0,se=se+Math.imul(Pe,ht)|0,te=(te=te+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,ie=ie+Math.imul(Ae,gt)|0,se=se+Math.imul(ot,dt)|0,te=(te=te+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,ie=ie+Math.imul(st,pt)|0,se=se+Math.imul($e,lt)|0,te=(te=te+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,ie=ie+Math.imul(tt,vt)|0,se=se+Math.imul(Ze,yt)|0,te=(te=te+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,ie=ie+Math.imul(Ve,At)|0,se=se+Math.imul(Ne,we)|0,te=(te=te+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,ie=ie+Math.imul(Fe,_e)|0,se=se+Math.imul(Ee,De)|0,te=(te=te+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,ie=ie+Math.imul(ce,Ke)|0,se=se+Math.imul(ae,Je)|0,te=(te=te+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0,ie=ie+Math.imul(fe,qe)|0;var Yt=(P+(se=se+Math.imul(Ce,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,Lt)|0)+Math.imul(ye,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(ye,Lt)|0)+(te>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,se=Math.imul(Ye,We),te=(te=Math.imul(Ye,Qe))+Math.imul(ut,We)|0,ie=Math.imul(ut,Qe),se=se+Math.imul(Be,ht)|0,te=(te=te+Math.imul(Be,gt)|0)+Math.imul(ze,ht)|0,ie=ie+Math.imul(ze,gt)|0,se=se+Math.imul(Pe,dt)|0,te=(te=te+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,ie=ie+Math.imul(Ae,pt)|0,se=se+Math.imul(ot,lt)|0,te=(te=te+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,ie=ie+Math.imul(st,vt)|0,se=se+Math.imul($e,yt)|0,te=(te=te+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,ie=ie+Math.imul(tt,At)|0,se=se+Math.imul(Ze,we)|0,te=(te=te+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,ie=ie+Math.imul(Ve,_e)|0,se=se+Math.imul(Ne,De)|0,te=(te=te+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,ie=ie+Math.imul(Fe,Ke)|0,se=se+Math.imul(Ee,Je)|0,te=(te=te+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0,ie=ie+Math.imul(ce,qe)|0;var zt=(P+(se=se+Math.imul(ae,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(ae,Lt)|0)+Math.imul(fe,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(fe,Lt)|0)+(te>>>13)|0)+(zt>>>26)|0,zt&=67108863,se=Math.imul(Ye,ht),te=(te=Math.imul(Ye,gt))+Math.imul(ut,ht)|0,ie=Math.imul(ut,gt),se=se+Math.imul(Be,dt)|0,te=(te=te+Math.imul(Be,pt)|0)+Math.imul(ze,dt)|0,ie=ie+Math.imul(ze,pt)|0,se=se+Math.imul(Pe,lt)|0,te=(te=te+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,ie=ie+Math.imul(Ae,vt)|0,se=se+Math.imul(ot,yt)|0,te=(te=te+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,ie=ie+Math.imul(st,At)|0,se=se+Math.imul($e,we)|0,te=(te=te+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,ie=ie+Math.imul(tt,_e)|0,se=se+Math.imul(Ze,De)|0,te=(te=te+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,ie=ie+Math.imul(Ve,Ke)|0,se=se+Math.imul(Ne,Je)|0,te=(te=te+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0,ie=ie+Math.imul(Fe,qe)|0;var Vt=(P+(se=se+Math.imul(Ee,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Ee,Lt)|0)+Math.imul(ce,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(ce,Lt)|0)+(te>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,se=Math.imul(Ye,dt),te=(te=Math.imul(Ye,pt))+Math.imul(ut,dt)|0,ie=Math.imul(ut,pt),se=se+Math.imul(Be,lt)|0,te=(te=te+Math.imul(Be,vt)|0)+Math.imul(ze,lt)|0,ie=ie+Math.imul(ze,vt)|0,se=se+Math.imul(Pe,yt)|0,te=(te=te+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,ie=ie+Math.imul(Ae,At)|0,se=se+Math.imul(ot,we)|0,te=(te=te+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,ie=ie+Math.imul(st,_e)|0,se=se+Math.imul($e,De)|0,te=(te=te+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,ie=ie+Math.imul(tt,Ke)|0,se=se+Math.imul(Ze,Je)|0,te=(te=te+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0,ie=ie+Math.imul(Ve,qe)|0;var nn=(P+(se=se+Math.imul(Ne,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Ne,Lt)|0)+Math.imul(Fe,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(Fe,Lt)|0)+(te>>>13)|0)+(nn>>>26)|0,nn&=67108863,se=Math.imul(Ye,lt),te=(te=Math.imul(Ye,vt))+Math.imul(ut,lt)|0,ie=Math.imul(ut,vt),se=se+Math.imul(Be,yt)|0,te=(te=te+Math.imul(Be,At)|0)+Math.imul(ze,yt)|0,ie=ie+Math.imul(ze,At)|0,se=se+Math.imul(Pe,we)|0,te=(te=te+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,ie=ie+Math.imul(Ae,_e)|0,se=se+Math.imul(ot,De)|0,te=(te=te+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,ie=ie+Math.imul(st,Ke)|0,se=se+Math.imul($e,Je)|0,te=(te=te+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0,ie=ie+Math.imul(tt,qe)|0;var Gt=(P+(se=se+Math.imul(Ze,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Ze,Lt)|0)+Math.imul(Ve,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(Ve,Lt)|0)+(te>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,se=Math.imul(Ye,yt),te=(te=Math.imul(Ye,At))+Math.imul(ut,yt)|0,ie=Math.imul(ut,At),se=se+Math.imul(Be,we)|0,te=(te=te+Math.imul(Be,_e)|0)+Math.imul(ze,we)|0,ie=ie+Math.imul(ze,_e)|0,se=se+Math.imul(Pe,De)|0,te=(te=te+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,ie=ie+Math.imul(Ae,Ke)|0,se=se+Math.imul(ot,Je)|0,te=(te=te+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0,ie=ie+Math.imul(st,qe)|0;var Mt=(P+(se=se+Math.imul($e,Ct)|0)|0)+((8191&(te=(te=te+Math.imul($e,Lt)|0)+Math.imul(tt,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(tt,Lt)|0)+(te>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,se=Math.imul(Ye,we),te=(te=Math.imul(Ye,_e))+Math.imul(ut,we)|0,ie=Math.imul(ut,_e),se=se+Math.imul(Be,De)|0,te=(te=te+Math.imul(Be,Ke)|0)+Math.imul(ze,De)|0,ie=ie+Math.imul(ze,Ke)|0,se=se+Math.imul(Pe,Je)|0,te=(te=te+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0,ie=ie+Math.imul(Ae,qe)|0;var _t=(P+(se=se+Math.imul(ot,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(ot,Lt)|0)+Math.imul(st,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(st,Lt)|0)+(te>>>13)|0)+(_t>>>26)|0,_t&=67108863,se=Math.imul(Ye,De),te=(te=Math.imul(Ye,Ke))+Math.imul(ut,De)|0,ie=Math.imul(ut,Ke),se=se+Math.imul(Be,Je)|0,te=(te=te+Math.imul(Be,qe)|0)+Math.imul(ze,Je)|0,ie=ie+Math.imul(ze,qe)|0;var en=(P+(se=se+Math.imul(Pe,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Pe,Lt)|0)+Math.imul(Ae,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(Ae,Lt)|0)+(te>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul(Ye,Je),te=(te=Math.imul(Ye,qe))+Math.imul(ut,Je)|0,ie=Math.imul(ut,qe);var jt=(P+(se=se+Math.imul(Be,Ct)|0)|0)+((8191&(te=(te=te+Math.imul(Be,Lt)|0)+Math.imul(ze,Ct)|0))<<13)|0;P=((ie=ie+Math.imul(ze,Lt)|0)+(te>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Wt=(P+(se=Math.imul(Ye,Ct))|0)+((8191&(te=(te=Math.imul(Ye,Lt))+Math.imul(ut,Ct)|0))<<13)|0;return P=((ie=Math.imul(ut,Lt))+(te>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,f[0]=Tt,f[1]=Pt,f[2]=Bt,f[3]=Zt,f[4]=qt,f[5]=fn,f[6]=xt,f[7]=Kt,f[8]=Rt,f[9]=Yt,f[10]=zt,f[11]=Vt,f[12]=nn,f[13]=Gt,f[14]=Mt,f[15]=_t,f[16]=en,f[17]=jt,f[18]=Wt,0!==P&&(f[19]=P,k.length++),k};function Z(d,h,E){E.negative=h.negative^d.negative,E.length=d.length+h.length;for(var k=0,B=0,x=0;x>>26)|0)>>>26,f&=67108863}E.words[x]=P,k=f,f=B}return 0!==k?E.words[x]=k:E.length--,E._strip()}function Y(d,h,E){return Z(d,h,E)}function G(d,h){this.x=d,this.y=h}Math.imul||(j=V),u.prototype.mulTo=function(h,E){var B=this.length+h.length;return 10===this.length&&10===h.length?j(this,h,E):B<63?V(this,h,E):B<1024?Z(this,h,E):Y(this,h,E)},G.prototype.makeRBT=function(h){for(var E=new Array(h),k=u.prototype._countBits(h)-1,B=0;B>=1;return B},G.prototype.permute=function(h,E,k,B,x,f){for(var P=0;P>>=1)x++;return 1<>>=13,k[2*f+1]=8191&x,x>>>=13;for(f=2*E;f>=26,k+=x/67108864|0,k+=f>>>26,this.words[B]=67108863&f}return 0!==k&&(this.words[B]=k,this.length++),E?this.ineg():this},u.prototype.muln=function(h){return this.clone().imuln(h)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(h){var E=function L(d){for(var h=new Array(d.bitLength()),E=0;E>>B&1}return h}(h);if(0===E.length)return new u(1);for(var k=this,B=0;B=0);var x,E=h%26,k=(h-E)/26,B=67108863>>>26-E<<26-E;if(0!==E){var f=0;for(x=0;x>>26-E}f&&(this.words[x]=f,this.length++)}if(0!==k){for(x=this.length-1;x>=0;x--)this.words[x+k]=this.words[x];for(x=0;x=0),B=E?(E-E%26)/26:0;var x=h%26,f=Math.min((h-x)/26,this.length),P=67108863^67108863>>>x<f)for(this.length-=f,te=0;te=0&&(0!==ie||te>=B);te--){var de=0|this.words[te];this.words[te]=ie<<26-x|de>>>x,ie=de&P}return se&&0!==ie&&(se.words[se.length++]=ie),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},u.prototype.ishrn=function(h,E,k){return w(0===this.negative),this.iushrn(h,E,k)},u.prototype.shln=function(h){return this.clone().ishln(h)},u.prototype.ushln=function(h){return this.clone().iushln(h)},u.prototype.shrn=function(h){return this.clone().ishrn(h)},u.prototype.ushrn=function(h){return this.clone().iushrn(h)},u.prototype.testn=function(h){w("number"==typeof h&&h>=0);var E=h%26,k=(h-E)/26,B=1<=0);var E=h%26,k=(h-E)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=k)return this;if(0!==E&&k++,this.length=Math.min(k,this.length),0!==E){var B=67108863^67108863>>>E<=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},u.prototype.isubn=function(h){if(w("number"==typeof h),w(h<67108864),h<0)return this.iaddn(-h);if(0!==this.negative)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E>26)-(se/67108864|0),this.words[x+k]=67108863&f}for(;x>26,this.words[x+k]=67108863&f;if(0===P)return this._strip();for(w(-1===P),P=0,x=0;x>26,this.words[x]=67108863&f;return this.negative=1,this._strip()},u.prototype._wordDiv=function(h,E){var k=(this.length,h.length),B=this.clone(),x=h,f=0|x.words[x.length-1];0!==(k=26-this._countBits(f))&&(x=x.ushln(k),B.iushln(k),f=0|x.words[x.length-1]);var te,se=B.length-x.length;if("mod"!==E){(te=new u(null)).length=se+1,te.words=new Array(te.length);for(var ie=0;ie=0;Ce--){var ye=67108864*(0|B.words[x.length+Ce])+(0|B.words[x.length+Ce-1]);for(ye=Math.min(ye/f|0,67108863),B._ishlnsubmul(x,ye,Ce);0!==B.negative;)ye--,B.negative=0,B._ishlnsubmul(x,1,Ce),B.isZero()||(B.negative^=1);te&&(te.words[Ce]=ye)}return te&&te._strip(),B._strip(),"div"!==E&&0!==k&&B.iushrn(k),{div:te||null,mod:B}},u.prototype.divmod=function(h,E,k){return w(!h.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===h.negative?(f=this.neg().divmod(h,E),"mod"!==E&&(B=f.div.neg()),"div"!==E&&(x=f.mod.neg(),k&&0!==x.negative&&x.iadd(h)),{div:B,mod:x}):0===this.negative&&0!==h.negative?(f=this.divmod(h.neg(),E),"mod"!==E&&(B=f.div.neg()),{div:B,mod:f.mod}):this.negative&h.negative?(f=this.neg().divmod(h.neg(),E),"div"!==E&&(x=f.mod.neg(),k&&0!==x.negative&&x.isub(h)),{div:f.div,mod:x}):h.length>this.length||this.cmp(h)<0?{div:new u(0),mod:this}:1===h.length?"div"===E?{div:this.divn(h.words[0]),mod:null}:"mod"===E?{div:null,mod:new u(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new u(this.modrn(h.words[0]))}:this._wordDiv(h,E);var B,x,f},u.prototype.div=function(h){return this.divmod(h,"div",!1).div},u.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},u.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},u.prototype.divRound=function(h){var E=this.divmod(h);if(E.mod.isZero())return E.div;var k=0!==E.div.negative?E.mod.isub(h):E.mod,B=h.ushrn(1),x=h.andln(1),f=k.cmp(B);return f<0||1===x&&0===f?E.div:0!==E.div.negative?E.div.isubn(1):E.div.iaddn(1)},u.prototype.modrn=function(h){var E=h<0;E&&(h=-h),w(h<=67108863);for(var k=(1<<26)%h,B=0,x=this.length-1;x>=0;x--)B=(k*B+(0|this.words[x]))%h;return E?-B:B},u.prototype.modn=function(h){return this.modrn(h)},u.prototype.idivn=function(h){var E=h<0;E&&(h=-h),w(h<=67108863);for(var k=0,B=this.length-1;B>=0;B--){var x=(0|this.words[B])+67108864*k;this.words[B]=x/h|0,k=x%h}return this._strip(),E?this.ineg():this},u.prototype.divn=function(h){return this.clone().idivn(h)},u.prototype.egcd=function(h){w(0===h.negative),w(!h.isZero());var E=this,k=h.clone();E=0!==E.negative?E.umod(h):E.clone();for(var B=new u(1),x=new u(0),f=new u(0),P=new u(1),se=0;E.isEven()&&k.isEven();)E.iushrn(1),k.iushrn(1),++se;for(var te=k.clone(),ie=E.clone();!E.isZero();){for(var de=0,Ce=1;!(E.words[0]&Ce)&&de<26;++de,Ce<<=1);if(de>0)for(E.iushrn(de);de-- >0;)(B.isOdd()||x.isOdd())&&(B.iadd(te),x.isub(ie)),B.iushrn(1),x.iushrn(1);for(var ye=0,ve=1;!(k.words[0]&ve)&&ye<26;++ye,ve<<=1);if(ye>0)for(k.iushrn(ye);ye-- >0;)(f.isOdd()||P.isOdd())&&(f.iadd(te),P.isub(ie)),f.iushrn(1),P.iushrn(1);E.cmp(k)>=0?(E.isub(k),B.isub(f),x.isub(P)):(k.isub(E),f.isub(B),P.isub(x))}return{a:f,b:P,gcd:k.iushln(se)}},u.prototype._invmp=function(h){w(0===h.negative),w(!h.isZero());var de,E=this,k=h.clone();E=0!==E.negative?E.umod(h):E.clone();for(var B=new u(1),x=new u(0),f=k.clone();E.cmpn(1)>0&&k.cmpn(1)>0;){for(var P=0,se=1;!(E.words[0]&se)&&P<26;++P,se<<=1);if(P>0)for(E.iushrn(P);P-- >0;)B.isOdd()&&B.iadd(f),B.iushrn(1);for(var te=0,ie=1;!(k.words[0]&ie)&&te<26;++te,ie<<=1);if(te>0)for(k.iushrn(te);te-- >0;)x.isOdd()&&x.iadd(f),x.iushrn(1);E.cmp(k)>=0?(E.isub(k),B.isub(x)):(k.isub(E),x.isub(B))}return(de=0===E.cmpn(1)?B:x).cmpn(0)<0&&de.iadd(h),de},u.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var E=this.clone(),k=h.clone();E.negative=0,k.negative=0;for(var B=0;E.isEven()&&k.isEven();B++)E.iushrn(1),k.iushrn(1);for(;;){for(;E.isEven();)E.iushrn(1);for(;k.isEven();)k.iushrn(1);var x=E.cmp(k);if(x<0){var f=E;E=k,k=f}else if(0===x||0===k.cmpn(1))break;E.isub(k)}return k.iushln(B)},u.prototype.invm=function(h){return this.egcd(h).a.umod(h)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(h){return this.words[0]&h},u.prototype.bincn=function(h){w("number"==typeof h);var E=h%26,k=(h-E)/26,B=1<>>26,P&=67108863,this.words[f]=P}return 0!==x&&(this.words[f]=x,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(h){var k,E=h<0;if(0!==this.negative&&!E)return-1;if(0===this.negative&&E)return 1;if(this._strip(),this.length>1)k=1;else{E&&(h=-h),w(h<=67108863,"Number is too big");var B=0|this.words[0];k=B===h?0:Bh.length)return 1;if(this.length=0;k--){var B=0|this.words[k],x=0|h.words[k];if(B!==x){Bx&&(E=1);break}}return E},u.prototype.gtn=function(h){return 1===this.cmpn(h)},u.prototype.gt=function(h){return 1===this.cmp(h)},u.prototype.gten=function(h){return this.cmpn(h)>=0},u.prototype.gte=function(h){return this.cmp(h)>=0},u.prototype.ltn=function(h){return-1===this.cmpn(h)},u.prototype.lt=function(h){return-1===this.cmp(h)},u.prototype.lten=function(h){return this.cmpn(h)<=0},u.prototype.lte=function(h){return this.cmp(h)<=0},u.prototype.eqn=function(h){return 0===this.cmpn(h)},u.prototype.eq=function(h){return 0===this.cmp(h)},u.red=function(h){return new r(h)},u.prototype.toRed=function(h){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),h.convertTo(this)._forceRed(h)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(h){return this.red=h,this},u.prototype.forceRed=function(h){return w(!this.red,"Already a number in reduction context"),this._forceRed(h)},u.prototype.redAdd=function(h){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},u.prototype.redIAdd=function(h){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},u.prototype.redSub=function(h){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},u.prototype.redISub=function(h){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},u.prototype.redShl=function(h){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},u.prototype.redMul=function(h){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},u.prototype.redIMul=function(h){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(h){return w(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var q={k256:null,p224:null,p192:null,p25519:null};function X(d,h){this.name=d,this.p=new u(h,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function Q(){X.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function z(){X.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function $(){X.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){X.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function r(d){if("string"==typeof d){var h=u._prime(d);this.m=h.p,this.prime=h}else w(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}function s(d){r.call(this,d),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}X.prototype._tmp=function(){var h=new u(null);return h.words=new Array(Math.ceil(this.n/13)),h},X.prototype.ireduce=function(h){var k,E=h;do{this.split(E,this.tmp),k=(E=(E=this.imulK(E)).iadd(this.tmp)).bitLength()}while(k>this.n);var B=k0?E.isub(this.p):void 0!==E.strip?E.strip():E._strip(),E},X.prototype.split=function(h,E){h.iushrn(this.n,0,E)},X.prototype.imulK=function(h){return h.imul(this.k)},M(Q,X),Q.prototype.split=function(h,E){for(var k=4194303,B=Math.min(h.length,9),x=0;x>>22,f=P}f>>>=22,h.words[x-10]=f,0===f&&h.length>10?h.length-=10:h.length-=9},Q.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var E=0,k=0;k>>=26,h.words[k]=x,E=B}return 0!==E&&(h.words[h.length++]=E),h},u._prime=function(h){if(q[h])return q[h];var E;if("k256"===h)E=new Q;else if("p224"===h)E=new z;else if("p192"===h)E=new $;else{if("p25519"!==h)throw new Error("Unknown prime "+h);E=new S}return q[h]=E,E},r.prototype._verify1=function(h){w(0===h.negative,"red works only with positives"),w(h.red,"red works only with red numbers")},r.prototype._verify2=function(h,E){w(0==(h.negative|E.negative),"red works only with positives"),w(h.red&&h.red===E.red,"red works only with red numbers")},r.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(_(h,h.umod(this.m)._forceRed(this)),h)},r.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},r.prototype.add=function(h,E){this._verify2(h,E);var k=h.add(E);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},r.prototype.iadd=function(h,E){this._verify2(h,E);var k=h.iadd(E);return k.cmp(this.m)>=0&&k.isub(this.m),k},r.prototype.sub=function(h,E){this._verify2(h,E);var k=h.sub(E);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},r.prototype.isub=function(h,E){this._verify2(h,E);var k=h.isub(E);return k.cmpn(0)<0&&k.iadd(this.m),k},r.prototype.shl=function(h,E){return this._verify1(h),this.imod(h.ushln(E))},r.prototype.imul=function(h,E){return this._verify2(h,E),this.imod(h.imul(E))},r.prototype.mul=function(h,E){return this._verify2(h,E),this.imod(h.mul(E))},r.prototype.isqr=function(h){return this.imul(h,h.clone())},r.prototype.sqr=function(h){return this.mul(h,h)},r.prototype.sqrt=function(h){if(h.isZero())return h.clone();var E=this.m.andln(3);if(w(E%2==1),3===E){var k=this.m.add(new u(1)).iushrn(2);return this.pow(h,k)}for(var B=this.m.subn(1),x=0;!B.isZero()&&0===B.andln(1);)x++,B.iushrn(1);w(!B.isZero());var f=new u(1).toRed(this),P=f.redNeg(),se=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new u(2*te*te).toRed(this);0!==this.pow(te,se).cmp(P);)te.redIAdd(P);for(var ie=this.pow(te,B),de=this.pow(h,B.addn(1).iushrn(1)),Ce=this.pow(h,B),ye=x;0!==Ce.cmp(f);){for(var ve=Ce,ae=0;0!==ve.cmp(f);ae++)ve=ve.redSqr();w(ae=0;x--){for(var ie=E.words[x],de=te-1;de>=0;de--){var Ce=ie>>de&1;(f!==B[0]&&(f=this.sqr(f)),0!==Ce||0!==P)?(P<<=1,P|=Ce,(4===++se||0===x&&0===de)&&(f=this.mul(f,B[P]),se=0,P=0)):se=0}te=26}return f},r.prototype.convertTo=function(h){var E=h.umod(this.m);return E===h?E.clone():E},r.prototype.convertFrom=function(h){var E=h.clone();return E.red=null,E},u.mont=function(h){return new s(h)},M(s,r),s.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},s.prototype.convertFrom=function(h){var E=this.imod(h.mul(this.rinv));return E.red=null,E},s.prototype.imul=function(h,E){if(h.isZero()||E.isZero())return h.words[0]=0,h.length=1,h;var k=h.imul(E),B=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=k.isub(B).iushrn(this.shift),f=x;return x.cmp(this.m)>=0?f=x.isub(this.m):x.cmpn(0)<0&&(f=x.iadd(this.m)),f._forceRed(this)},s.prototype.mul=function(h,E){if(h.isZero()||E.isZero())return new u(0)._forceRed(this);var k=h.mul(E),B=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=k.isub(B).iushrn(this.shift),f=x;return x.cmp(this.m)>=0?f=x.isub(this.m):x.cmpn(0)<0&&(f=x.iadd(this.m)),f._forceRed(this)},s.prototype.invm=function(h){return this.imod(h._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},21531:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function($,S,r,s){void 0===s&&(s=r),Object.defineProperty($,s,{enumerable:!0,get:function(){return S[r]}})}:function($,S,r,s){void 0===s&&(s=r),$[s]=S[r]}),C=this&&this.__setModuleDefault||(Object.create?function($,S){Object.defineProperty($,"default",{enumerable:!0,value:S})}:function($,S){$.default=S}),w=this&&this.__decorate||function($,S,r,s){var E,d=arguments.length,h=d<3?S:null===s?s=Object.getOwnPropertyDescriptor(S,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate($,S,r,s);else for(var k=$.length-1;k>=0;k--)(E=$[k])&&(h=(d<3?E(h):d>3?E(S,r,h):E(S,r))||h);return d>3&&h&&Object.defineProperty(S,r,h),h},M=this&&this.__importStar||function($){if($&&$.__esModule)return $;var S={};if(null!=$)for(var r in $)"default"!==r&&Object.hasOwnProperty.call($,r)&&p(S,$,r);return C(S,$),S},u=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a,"__esModule",{value:!0}),a.deserializeUnchecked=a.deserialize=a.serialize=a.BinaryReader=a.BinaryWriter=a.BorshError=a.baseDecode=a.baseEncode=void 0;const v=u(y(98538)),g=u(y(39076)),b=M(y(62949)),_=new("function"!=typeof TextDecoder?b.TextDecoder:TextDecoder)("utf-8",{fatal:!0});a.baseEncode=function A($){return"string"==typeof $&&($=Buffer.from($,"utf8")),g.default.encode(Buffer.from($))},a.baseDecode=function R($){return Buffer.from(g.default.decode($))};const D=1024;class T extends Error{constructor(S){super(S),this.fieldPath=[],this.originalMessage=S}addToFieldPath(S){this.fieldPath.splice(0,0,S),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}a.BorshError=T;class F{constructor(){this.buf=Buffer.alloc(D),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(D)]))}writeU8(S){this.maybeResize(),this.buf.writeUInt8(S,this.length),this.length+=1}writeU16(S){this.maybeResize(),this.buf.writeUInt16LE(S,this.length),this.length+=2}writeU32(S){this.maybeResize(),this.buf.writeUInt32LE(S,this.length),this.length+=4}writeU64(S){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(S).toArray("le",8)))}writeU128(S){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(S).toArray("le",16)))}writeU256(S){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(S).toArray("le",32)))}writeU512(S){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(S).toArray("le",64)))}writeBuffer(S){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),S,Buffer.alloc(D)]),this.length+=S.length}writeString(S){this.maybeResize();const r=Buffer.from(S,"utf8");this.writeU32(r.length),this.writeBuffer(r)}writeFixedArray(S){this.writeBuffer(Buffer.from(S))}writeArray(S,r){this.maybeResize(),this.writeU32(S.length);for(const s of S)this.maybeResize(),r(s)}toArray(){return this.buf.subarray(0,this.length)}}function L($,S,r){const s=r.value;r.value=function(...d){try{return s.apply(this,d)}catch(h){if(h instanceof RangeError){const E=h.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(E)>=0)throw new T("Reached the end of buffer when deserializing")}throw h}}}a.BinaryWriter=F;class V{constructor(S){this.buf=S,this.offset=0}readU8(){const S=this.buf.readUInt8(this.offset);return this.offset+=1,S}readU16(){const S=this.buf.readUInt16LE(this.offset);return this.offset+=2,S}readU32(){const S=this.buf.readUInt32LE(this.offset);return this.offset+=4,S}readU64(){const S=this.readBuffer(8);return new v.default(S,"le")}readU128(){const S=this.readBuffer(16);return new v.default(S,"le")}readU256(){const S=this.readBuffer(32);return new v.default(S,"le")}readU512(){const S=this.readBuffer(64);return new v.default(S,"le")}readBuffer(S){if(this.offset+S>this.buf.length)throw new T(`Expected buffer length ${S} isn't within bounds`);const r=this.buf.slice(this.offset,this.offset+S);return this.offset+=S,r}readString(){const S=this.readU32(),r=this.readBuffer(S);try{return _.decode(r)}catch(s){throw new T(`Error decoding UTF-8 string: ${s}`)}}readFixedArray(S){return new Uint8Array(this.readBuffer(S))}readArray(S){const r=this.readU32(),s=Array();for(let d=0;d{Z($,S,h,s[0],d)});else if(void 0!==s.kind)switch(s.kind){case"option":null==r?d.writeU8(0):(d.writeU8(1),Z($,S,r,s.type,d));break;case"map":d.writeU32(r.size),r.forEach((h,E)=>{Z($,S,E,s.key,d),Z($,S,h,s.value,d)});break;default:throw new T(`FieldType ${s} unrecognized`)}else Y($,r,d)}catch(h){throw h instanceof T&&h.addToFieldPath(S),h}}function Y($,S,r){if("function"==typeof S.borshSerialize)return void S.borshSerialize(r);const s=$.get(S.constructor);if(!s)throw new T(`Class ${S.constructor.name} is missing in schema`);if("struct"===s.kind)s.fields.map(([d,h])=>{Z($,d,S[d],h,r)});else{if("enum"!==s.kind)throw new T(`Unexpected schema kind: ${s.kind} for ${S.constructor.name}`);{const d=S[s.field];for(let h=0;hq($,S,r[0],s))}if("option"===r.kind)return s.readU8()?q($,S,r.type,s):void 0;if("map"===r.kind){let d=new Map;const h=s.readU32();for(let E=0;E=s.values.length)throw new T(`Enum index: ${d} is out of range`);const[h,E]=s.values[d];return new S({[h]:q($,h,E,r)})}throw new T(`Unexpected schema kind: ${s.kind} for ${S.constructor.name}`)}w([L],V.prototype,"readU8",null),w([L],V.prototype,"readU16",null),w([L],V.prototype,"readU32",null),w([L],V.prototype,"readU64",null),w([L],V.prototype,"readU128",null),w([L],V.prototype,"readU256",null),w([L],V.prototype,"readU512",null),w([L],V.prototype,"readString",null),w([L],V.prototype,"readFixedArray",null),w([L],V.prototype,"readArray",null),a.BinaryReader=V,a.serialize=function G($,S,r=F){const s=new r;return Y($,S,s),s.toArray()},a.deserialize=function Q($,S,r,s=V){const d=new s(r),h=X($,S,d);if(d.offset{var p=y(21082);ne.exports=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},37950:(ne,a,y)=>{var p;function C(M){this.rand=M}if(ne.exports=function(u){return p||(p=new C(null)),p.generate(u)},ne.exports.Rand=C,C.prototype.generate=function(u){return this._rand(u)},C.prototype._rand=function(u){if(this.rand.getBytes)return this.rand.getBytes(u);for(var v=new Uint8Array(u),g=0;g{var p=y(73502).Buffer;function C(b){p.isBuffer(b)||(b=p.from(b));for(var I=b.length/4|0,_=new Array(I),A=0;A>>24]^T[j>>>16&255]^F[Z>>>8&255]^L[255&Y]^I[z++],q=D[j>>>24]^T[Z>>>16&255]^F[Y>>>8&255]^L[255&V]^I[z++],X=D[Z>>>24]^T[Y>>>16&255]^F[V>>>8&255]^L[255&j]^I[z++],Q=D[Y>>>24]^T[V>>>16&255]^F[j>>>8&255]^L[255&Z]^I[z++],V=G,j=q,Z=X,Y=Q;return G=(A[V>>>24]<<24|A[j>>>16&255]<<16|A[Z>>>8&255]<<8|A[255&Y])^I[z++],q=(A[j>>>24]<<24|A[Z>>>16&255]<<16|A[Y>>>8&255]<<8|A[255&V])^I[z++],X=(A[Z>>>24]<<24|A[Y>>>16&255]<<16|A[V>>>8&255]<<8|A[255&j])^I[z++],Q=(A[Y>>>24]<<24|A[V>>>16&255]<<16|A[j>>>8&255]<<8|A[255&Z])^I[z++],[G>>>=0,q>>>=0,X>>>=0,Q>>>=0]}var u=[0,1,2,4,8,16,32,64,128,27,54],v=function(){for(var b=new Array(256),I=0;I<256;I++)b[I]=I<128?I<<1:I<<1^283;for(var _=[],A=[],R=[[],[],[],[]],D=[[],[],[],[]],T=0,F=0,L=0;L<256;++L){var V=F^F<<1^F<<2^F<<3^F<<4;V=V>>>8^255&V^99,_[T]=V,A[V]=T;var j=b[T],Z=b[j],Y=b[Z],G=257*b[V]^16843008*V;R[0][T]=G<<24|G>>>8,R[1][T]=G<<16|G>>>16,R[2][T]=G<<8|G>>>24,R[3][T]=G,G=16843009*Y^65537*Z^257*j^16843008*T,D[0][V]=G<<24|G>>>8,D[1][V]=G<<16|G>>>16,D[2][V]=G<<8|G>>>24,D[3][V]=G,0===T?T=F=1:(T=j^b[b[b[Y^j]]],F^=b[b[F]])}return{SBOX:_,INV_SBOX:A,SUB_MIX:R,INV_SUB_MIX:D}}();function g(b){this._key=C(b),this._reset()}g.blockSize=16,g.keySize=32,g.prototype.blockSize=g.blockSize,g.prototype.keySize=g.keySize,g.prototype._reset=function(){for(var b=this._key,I=b.length,_=I+6,A=4*(_+1),R=[],D=0;D>>24,T=v.SBOX[T>>>24]<<24|v.SBOX[T>>>16&255]<<16|v.SBOX[T>>>8&255]<<8|v.SBOX[255&T],T^=u[D/I|0]<<24):I>6&&D%I==4&&(T=v.SBOX[T>>>24]<<24|v.SBOX[T>>>16&255]<<16|v.SBOX[T>>>8&255]<<8|v.SBOX[255&T]),R[D]=R[D-I]^T}for(var F=[],L=0;L>>24]]^v.INV_SUB_MIX[1][v.SBOX[j>>>16&255]]^v.INV_SUB_MIX[2][v.SBOX[j>>>8&255]]^v.INV_SUB_MIX[3][v.SBOX[255&j]]}this._nRounds=_,this._keySchedule=R,this._invKeySchedule=F},g.prototype.encryptBlockRaw=function(b){return M(b=C(b),this._keySchedule,v.SUB_MIX,v.SBOX,this._nRounds)},g.prototype.encryptBlock=function(b){var I=this.encryptBlockRaw(b),_=p.allocUnsafe(16);return _.writeUInt32BE(I[0],0),_.writeUInt32BE(I[1],4),_.writeUInt32BE(I[2],8),_.writeUInt32BE(I[3],12),_},g.prototype.decryptBlock=function(b){var I=(b=C(b))[1];b[1]=b[3],b[3]=I;var _=M(b,this._invKeySchedule,v.INV_SUB_MIX,v.INV_SBOX,this._nRounds),A=p.allocUnsafe(16);return A.writeUInt32BE(_[0],0),A.writeUInt32BE(_[3],4),A.writeUInt32BE(_[2],8),A.writeUInt32BE(_[1],12),A},g.prototype.scrub=function(){w(this._keySchedule),w(this._invKeySchedule),w(this._key)},ne.exports.AES=g},69382:(ne,a,y)=>{var p=y(41899),C=y(73502).Buffer,w=y(61052),M=y(83894),u=y(68857),v=y(58789),g=y(7968);function _(A,R,D,T){w.call(this);var F=C.alloc(4,0);this._cipher=new p.AES(R);var L=this._cipher.encryptBlock(F);this._ghash=new u(L),D=function I(A,R,D){if(12===R.length)return A._finID=C.concat([R,C.from([0,0,0,1])]),C.concat([R,C.from([0,0,0,2])]);var T=new u(D),F=R.length,L=F%16;T.update(R),L&&(L=16-L,T.update(C.alloc(L,0))),T.update(C.alloc(8,0));var V=8*F,j=C.alloc(8);j.writeUIntBE(V,0,8),T.update(j),A._finID=T.state;var Z=C.from(A._finID);return g(Z),Z}(this,D,L),this._prev=C.from(D),this._cache=C.allocUnsafe(0),this._secCache=C.allocUnsafe(0),this._decrypt=T,this._alen=0,this._len=0,this._mode=A,this._authTag=null,this._called=!1}M(_,w),_.prototype._update=function(A){if(!this._called&&this._alen){var R=16-this._alen%16;R<16&&(R=C.alloc(R,0),this._ghash.update(R))}this._called=!0;var D=this._mode.encrypt(this,A);return this._decrypt?this._ghash.update(A):this._ghash.update(D),this._len+=A.length,D},_.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var A=v(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function b(A,R){var D=0;A.length!==R.length&&D++;for(var T=Math.min(A.length,R.length),F=0;F{var p=y(96900),C=y(40856),w=y(44946);a.createCipher=a.Cipher=p.createCipher,a.createCipheriv=a.Cipheriv=p.createCipheriv,a.createDecipher=a.Decipher=C.createDecipher,a.createDecipheriv=a.Decipheriv=C.createDecipheriv,a.listCiphers=a.getCiphers=function M(){return Object.keys(w)}},40856:(ne,a,y)=>{var p=y(69382),C=y(73502).Buffer,w=y(29171),M=y(38441),u=y(61052),v=y(41899),g=y(40347);function I(T,F,L){u.call(this),this._cache=new _,this._last=void 0,this._cipher=new v.AES(F),this._prev=C.from(L),this._mode=T,this._autopadding=!0}function _(){this.cache=C.allocUnsafe(0)}function R(T,F,L){var V=w[T.toLowerCase()];if(!V)throw new TypeError("invalid suite type");if("string"==typeof L&&(L=C.from(L)),"GCM"!==V.mode&&L.length!==V.iv)throw new TypeError("invalid iv length "+L.length);if("string"==typeof F&&(F=C.from(F)),F.length!==V.key/8)throw new TypeError("invalid key length "+F.length);return"stream"===V.type?new M(V.module,F,L,!0):"auth"===V.type?new p(V.module,F,L,!0):new I(V.module,F,L)}y(83894)(I,u),I.prototype._update=function(T){this._cache.add(T);for(var F,L,V=[];F=this._cache.get(this._autopadding);)L=this._mode.decrypt(this,F),V.push(L);return C.concat(V)},I.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return function A(T){var F=T[15];if(F<1||F>16)throw new Error("unable to decrypt data");for(var L=-1;++L16)return F=this.cache.slice(0,16),this.cache=this.cache.slice(16),F}else if(this.cache.length>=16)return F=this.cache.slice(0,16),this.cache=this.cache.slice(16),F;return null},_.prototype.flush=function(){if(this.cache.length)return this.cache},a.createDecipher=function D(T,F){var L=w[T.toLowerCase()];if(!L)throw new TypeError("invalid suite type");var V=g(F,!1,L.key,L.iv);return R(T,V.key,V.iv)},a.createDecipheriv=R},96900:(ne,a,y)=>{var p=y(29171),C=y(69382),w=y(73502).Buffer,M=y(38441),u=y(61052),v=y(41899),g=y(40347);function I(T,F,L){u.call(this),this._cache=new A,this._cipher=new v.AES(F),this._prev=w.from(L),this._mode=T,this._autopadding=!0}y(83894)(I,u),I.prototype._update=function(T){this._cache.add(T);for(var F,L,V=[];F=this._cache.get();)L=this._mode.encrypt(this,F),V.push(L);return w.concat(V)};var _=w.alloc(16,16);function A(){this.cache=w.allocUnsafe(0)}function R(T,F,L){var V=p[T.toLowerCase()];if(!V)throw new TypeError("invalid suite type");if("string"==typeof F&&(F=w.from(F)),F.length!==V.key/8)throw new TypeError("invalid key length "+F.length);if("string"==typeof L&&(L=w.from(L)),"GCM"!==V.mode&&L.length!==V.iv)throw new TypeError("invalid iv length "+L.length);return"stream"===V.type?new M(V.module,F,L):"auth"===V.type?new C(V.module,F,L):new I(V.module,F,L)}I.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return T=this._mode.encrypt(this,T),this._cipher.scrub(),T;if(!T.equals(_))throw this._cipher.scrub(),new Error("data not multiple of block length")},I.prototype.setAutoPadding=function(T){return this._autopadding=!!T,this},A.prototype.add=function(T){this.cache=w.concat([this.cache,T])},A.prototype.get=function(){if(this.cache.length>15){var T=this.cache.slice(0,16);return this.cache=this.cache.slice(16),T}return null},A.prototype.flush=function(){for(var T=16-this.cache.length,F=w.allocUnsafe(T),L=-1;++L{var p=y(73502).Buffer,C=p.alloc(16,0);function M(v){var g=p.allocUnsafe(16);return g.writeUInt32BE(v[0]>>>0,0),g.writeUInt32BE(v[1]>>>0,4),g.writeUInt32BE(v[2]>>>0,8),g.writeUInt32BE(v[3]>>>0,12),g}function u(v){this.h=v,this.state=p.alloc(16,0),this.cache=p.allocUnsafe(0)}u.prototype.ghash=function(v){for(var g=-1;++g0;b--)v[b]=v[b]>>>1|(1&v[b-1])<<31;v[0]=v[0]>>>1,_&&(v[0]=v[0]^225<<24)}this.state=M(g)},u.prototype.update=function(v){this.cache=p.concat([this.cache,v]);for(var g;this.cache.length>=16;)g=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(g)},u.prototype.final=function(v,g){return this.cache.length&&this.ghash(p.concat([this.cache,C],16)),this.ghash(M([0,v,0,g])),this.state},ne.exports=u},7968:ne=>{ne.exports=function a(y){for(var C,p=y.length;p--;){if(255!==(C=y.readUInt8(p))){C++,y.writeUInt8(C,p);break}y.writeUInt8(0,p)}}},64903:(ne,a,y)=>{var p=y(58789);a.encrypt=function(C,w){var M=p(w,C._prev);return C._prev=C._cipher.encryptBlock(M),C._prev},a.decrypt=function(C,w){var M=C._prev;C._prev=w;var u=C._cipher.decryptBlock(w);return p(u,M)}},59885:(ne,a,y)=>{var p=y(73502).Buffer,C=y(58789);function w(M,u,v){var g=u.length,b=C(u,M._cache);return M._cache=M._cache.slice(g),M._prev=p.concat([M._prev,v?u:b]),b}a.encrypt=function(M,u,v){for(var b,g=p.allocUnsafe(0);u.length;){if(0===M._cache.length&&(M._cache=M._cipher.encryptBlock(M._prev),M._prev=p.allocUnsafe(0)),!(M._cache.length<=u.length)){g=p.concat([g,w(M,u,v)]);break}b=M._cache.length,g=p.concat([g,w(M,u.slice(0,b),v)]),u=u.slice(b)}return g}},86531:(ne,a,y)=>{var p=y(73502).Buffer;function C(M,u,v){for(var A,R,b=-1,_=0;++b<8;)A=u&1<<7-b?128:0,_+=(128&(R=M._cipher.encryptBlock(M._prev)[0]^A))>>b%8,M._prev=w(M._prev,v?A:R);return _}function w(M,u){var v=M.length,g=-1,b=p.allocUnsafe(M.length);for(M=p.concat([M,p.from([u])]);++g>7;return b}a.encrypt=function(M,u,v){for(var g=u.length,b=p.allocUnsafe(g),I=-1;++I{var p=y(73502).Buffer;function C(w,M,u){var g=w._cipher.encryptBlock(w._prev)[0]^M;return w._prev=p.concat([w._prev.slice(1),p.from([u?M:g])]),g}a.encrypt=function(w,M,u){for(var v=M.length,g=p.allocUnsafe(v),b=-1;++b{var p=y(58789),C=y(73502).Buffer,w=y(7968);function M(v){var g=v._cipher.encryptBlockRaw(v._prev);return w(v._prev),g}a.encrypt=function(v,g){var b=Math.ceil(g.length/16),I=v._cache.length;v._cache=C.concat([v._cache,C.allocUnsafe(16*b)]);for(var _=0;_{a.encrypt=function(y,p){return y._cipher.encryptBlock(p)},a.decrypt=function(y,p){return y._cipher.decryptBlock(p)}},29171:(ne,a,y)=>{var p={ECB:y(21704),CBC:y(64903),CFB:y(59885),CFB8:y(21641),CFB1:y(86531),OFB:y(86816),CTR:y(11150),GCM:y(11150)},C=y(44946);for(var w in C)C[w].module=p[C[w].mode];ne.exports=C},86816:(ne,a,y)=>{var p=y(58789);function C(w){return w._prev=w._cipher.encryptBlock(w._prev),w._prev}a.encrypt=function(w,M){for(;w._cache.length{var p=y(41899),C=y(73502).Buffer,w=y(61052);function u(v,g,b,I){w.call(this),this._cipher=new p.AES(g),this._prev=C.from(b),this._cache=C.allocUnsafe(0),this._secCache=C.allocUnsafe(0),this._decrypt=I,this._mode=v}y(83894)(u,w),u.prototype._update=function(v){return this._mode.encrypt(this,v,this._decrypt)},u.prototype._final=function(){this._cipher.scrub()},ne.exports=u},55255:(ne,a,y)=>{var p=y(9004),C=y(84330),w=y(29171),M=y(51115),u=y(40347);function b(A,R,D){if(A=A.toLowerCase(),w[A])return C.createCipheriv(A,R,D);if(M[A])return new p({key:R,iv:D,mode:A});throw new TypeError("invalid suite type")}function I(A,R,D){if(A=A.toLowerCase(),w[A])return C.createDecipheriv(A,R,D);if(M[A])return new p({key:R,iv:D,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}a.createCipher=a.Cipher=function v(A,R){var D,T;if(A=A.toLowerCase(),w[A])D=w[A].key,T=w[A].iv;else{if(!M[A])throw new TypeError("invalid suite type");D=8*M[A].key,T=M[A].iv}var F=u(R,!1,D,T);return b(A,F.key,F.iv)},a.createCipheriv=a.Cipheriv=b,a.createDecipher=a.Decipher=function g(A,R){var D,T;if(A=A.toLowerCase(),w[A])D=w[A].key,T=w[A].iv;else{if(!M[A])throw new TypeError("invalid suite type");D=8*M[A].key,T=M[A].iv}var F=u(R,!1,D,T);return I(A,F.key,F.iv)},a.createDecipheriv=a.Decipheriv=I,a.listCiphers=a.getCiphers=function _(){return Object.keys(M).concat(C.getCiphers())}},9004:(ne,a,y)=>{var p=y(61052),C=y(73684),w=y(83894),M=y(73502).Buffer,u={"des-ede3-cbc":C.CBC.instantiate(C.EDE),"des-ede3":C.EDE,"des-ede-cbc":C.CBC.instantiate(C.EDE),"des-ede":C.EDE,"des-cbc":C.CBC.instantiate(C.DES),"des-ecb":C.DES};function v(g){p.call(this);var _,b=g.mode.toLowerCase(),I=u[b];_=g.decrypt?"decrypt":"encrypt";var A=g.key;M.isBuffer(A)||(A=M.from(A)),("des-ede"===b||"des-ede-cbc"===b)&&(A=M.concat([A,A.slice(0,8)]));var R=g.iv;M.isBuffer(R)||(R=M.from(R)),this._des=I.create({key:A,iv:R,type:_})}u.des=u["des-cbc"],u.des3=u["des-ede3-cbc"],ne.exports=v,w(v,p),v.prototype._update=function(g){return M.from(this._des.update(g))},v.prototype._final=function(){return M.from(this._des.final())}},51115:(ne,a)=>{a["des-ecb"]={key:8,iv:0},a["des-cbc"]=a.des={key:8,iv:8},a["des-ede3-cbc"]=a.des3={key:24,iv:8},a["des-ede3"]={key:24,iv:0},a["des-ede-cbc"]={key:16,iv:8},a["des-ede"]={key:16,iv:0}},6581:(ne,a,y)=>{var p=y(77105),C=y(4427),w=y(94115),M=C("level-filesystem",{db:p});ne.exports=w(M)},8466:(ne,a,y)=>{var p=y(98538),C=y(53753);function M(v){var b,g=v.modulus.byteLength();do{b=new p(C(g))}while(b.cmp(v.modulus)>=0||!b.umod(v.prime1)||!b.umod(v.prime2));return b}function u(v,g){var b=function w(v){var g=M(v);return{blinder:g.toRed(p.mont(v.modulus)).redPow(new p(v.publicExponent)).fromRed(),unblinder:g.invm(v.modulus)}}(g),I=g.modulus.byteLength(),_=new p(v).mul(b.blinder).umod(g.modulus),A=_.toRed(p.mont(g.prime1)),R=_.toRed(p.mont(g.prime2)),D=g.coefficient,T=g.prime1,F=g.prime2,L=A.redPow(g.exponent1).fromRed(),V=R.redPow(g.exponent2).fromRed(),j=L.isub(V).imul(D).umod(T).imul(F);return V.iadd(j).imul(b.unblinder).umod(g.modulus).toArrayLike(Buffer,"be",I)}u.getr=M,ne.exports=u},87793:(ne,a,y)=>{"use strict";ne.exports=y(75207)},3923:(ne,a,y)=>{"use strict";var p=y(73502).Buffer,C=y(96386),w=y(31496),M=y(83894),u=y(79947),v=y(3946),g=y(75207);function b(R){w.Writable.call(this);var D=g[R];if(!D)throw new Error("Unknown message digest");this._hashType=D.hash,this._hash=C(D.hash),this._tag=D.id,this._signType=D.sign}function I(R){w.Writable.call(this);var D=g[R];if(!D)throw new Error("Unknown message digest");this._hash=C(D.hash),this._tag=D.id,this._signType=D.sign}function _(R){return new b(R)}function A(R){return new I(R)}Object.keys(g).forEach(function(R){g[R].id=p.from(g[R].id,"hex"),g[R.toLowerCase()]=g[R]}),M(b,w.Writable),b.prototype._write=function(D,T,F){this._hash.update(D),F()},b.prototype.update=function(D,T){return this._hash.update("string"==typeof D?p.from(D,T):D),this},b.prototype.sign=function(D,T){this.end();var F=this._hash.digest(),L=u(F,D,this._hashType,this._signType,this._tag);return T?L.toString(T):L},M(I,w.Writable),I.prototype._write=function(D,T,F){this._hash.update(D),F()},I.prototype.update=function(D,T){return this._hash.update("string"==typeof D?p.from(D,T):D),this},I.prototype.verify=function(D,T,F){var L="string"==typeof T?p.from(T,F):T;this.end();var V=this._hash.digest();return v(L,V,D,this._signType,this._tag)},ne.exports={Sign:_,Verify:A,createSign:_,createVerify:A}},79947:(ne,a,y)=>{"use strict";var p=y(73502).Buffer,C=y(74529),w=y(8466),M=y(57715).ec,u=y(98538),v=y(22772),g=y(1308),b=1;function D(j,Z,Y,G){if((j=p.from(j.toArray())).length0&&Y.ishrn(G),Y}function L(j,Z,Y){var G,q;do{for(G=p.alloc(0);8*G.length{"use strict";var p=y(73502).Buffer,C=y(98538),w=y(57715).ec,M=y(22772),u=y(1308);function I(_,A){if(_.cmpn(0)<=0)throw new Error("invalid sig");if(_.cmp(A)>=0)throw new Error("invalid sig")}ne.exports=function v(_,A,R,D,T){var F=M(R);if("ec"===F.type){if("ecdsa"!==D&&"ecdsa/rsa"!==D)throw new Error("wrong public key type");return function g(_,A,R){var D=u[R.data.algorithm.curve.join(".")];if(!D)throw new Error("unknown curve "+R.data.algorithm.curve.join("."));var T=new w(D),F=R.data.subjectPrivateKey.data;return T.verify(A,_,F)}(_,A,F)}if("dsa"===F.type){if("dsa"!==D)throw new Error("wrong public key type");return function b(_,A,R){var D=R.data.p,T=R.data.q,F=R.data.g,L=R.data.pub_key,V=M.signature.decode(_,"der"),j=V.s,Z=V.r;I(j,T),I(Z,T);var Y=C.mont(D),G=j.invm(T),q=F.toRed(Y).redPow(new C(A).mul(G).mod(T)).fromRed().mul(L.toRed(Y).redPow(Z.mul(G).mod(T)).fromRed()).mod(D).mod(T);return 0===q.cmp(Z)}(_,A,F)}if("rsa"!==D&&"ecdsa/rsa"!==D)throw new Error("wrong public key type");A=p.concat([T,A]);for(var L=F.modulus.byteLength(),V=[1],j=0;A.length+V.length+2{"use strict";var y={};function p(v,g,b){b||(b=Error);var _=function(A){function R(D,T,F){return A.call(this,function I(A,R,D){return"string"==typeof g?g:g(A,R,D)}(D,T,F))||this}return function a(v,g){v.prototype=Object.create(g.prototype),v.prototype.constructor=v,v.__proto__=g}(R,A),R}(b);_.prototype.name=b.name,_.prototype.code=v,y[v]=_}function C(v,g){if(Array.isArray(v)){var b=v.length;return v=v.map(function(I){return String(I)}),b>2?"one of ".concat(g," ").concat(v.slice(0,b-1).join(", "),", or ")+v[b-1]:2===b?"one of ".concat(g," ").concat(v[0]," or ").concat(v[1]):"of ".concat(g," ").concat(v[0])}return"of ".concat(g," ").concat(String(v))}p("ERR_INVALID_OPT_VALUE",function(v,g){return'The value "'+g+'" is invalid for option "'+v+'"'},TypeError),p("ERR_INVALID_ARG_TYPE",function(v,g,b){var I,_;if("string"==typeof g&&function w(v,g,b){return v.substr(!b||b<0?0:+b,g.length)===g}(g,"not ")?(I="must not be",g=g.replace(/^not /,"")):I="must be",function M(v,g,b){return(void 0===b||b>v.length)&&(b=v.length),v.substring(b-g.length,b)===g}(v," argument"))_="The ".concat(v," ").concat(I," ").concat(C(g,"type"));else{var A=function u(v,g,b){return"number"!=typeof b&&(b=0),!(b+g.length>v.length)&&-1!==v.indexOf(g,b)}(v,".")?"property":"argument";_='The "'.concat(v,'" ').concat(A," ").concat(I," ").concat(C(g,"type"))}return _+=". Received type ".concat(typeof b)},TypeError),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),p("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),p("ERR_STREAM_PREMATURE_CLOSE","Premature close"),p("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),p("ERR_STREAM_WRITE_AFTER_END","write after end"),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ne.exports.q=y},55986:(ne,a,y)=>{"use strict";var p=Object.keys||function(_){var A=[];for(var R in _)A.push(R);return A};ne.exports=g;var C=y(14473),w=y(3766);y(83894)(g,C);for(var M=p(w.prototype),u=0;u{"use strict";ne.exports=C;var p=y(3556);function C(w){if(!(this instanceof C))return new C(w);p.call(this,w)}y(83894)(C,p),C.prototype._transform=function(w,M,u){u(null,w)}},14473:(ne,a,y)=>{"use strict";var p;ne.exports=S,S.ReadableState=$;y(59069).EventEmitter;var w=function(be,Ne){return be.listeners(Ne).length},M=y(2228),u=y(93172).Buffer,v=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var _,I=y(56353);_=I&&I.debuglog?I.debuglog("stream"):function(){};var Y,G,q,A=y(76083),R=y(34936),T=y(47890).getHighWaterMark,F=y(84162).q,L=F.ERR_INVALID_ARG_TYPE,V=F.ERR_STREAM_PUSH_AFTER_EOF,j=F.ERR_METHOD_NOT_IMPLEMENTED,Z=F.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;y(83894)(S,M);var X=R.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function $(ce,be,Ne){p=p||y(55986),ce=ce||{},"boolean"!=typeof Ne&&(Ne=be instanceof p),this.objectMode=!!ce.objectMode,Ne&&(this.objectMode=this.objectMode||!!ce.readableObjectMode),this.highWaterMark=T(this,ce,"readableHighWaterMark",Ne),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ce.emitClose,this.autoDestroy=!!ce.autoDestroy,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(Y||(Y=y(13465).s),this.decoder=new Y(ce.encoding),this.encoding=ce.encoding)}function S(ce){if(p=p||y(55986),!(this instanceof S))return new S(ce);var be=this instanceof p;this._readableState=new $(ce,this,be),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),M.call(this)}function r(ce,be,Ne,Fe,ct){_("readableAddChunk",be);var Ve,Ze=ce._readableState;if(null===be)Ze.reading=!1,function B(ce,be){if(_("onEofChunk"),!be.ended){if(be.decoder){var Ne=be.decoder.end();Ne&&Ne.length&&(be.buffer.push(Ne),be.length+=be.objectMode?1:Ne.length)}be.ended=!0,be.sync?x(ce):(be.needReadable=!1,be.emittedReadable||(be.emittedReadable=!0,f(ce)))}}(ce,Ze);else if(ct||(Ve=function d(ce,be){var Ne;return!function b(ce){return u.isBuffer(ce)||ce instanceof v}(be)&&"string"!=typeof be&&void 0!==be&&!ce.objectMode&&(Ne=new L("chunk",["string","Buffer","Uint8Array"],be)),Ne}(Ze,be)),Ve)X(ce,Ve);else if(Ze.objectMode||be&&be.length>0)if("string"!=typeof be&&!Ze.objectMode&&Object.getPrototypeOf(be)!==u.prototype&&(be=function g(ce){return u.from(ce)}(be)),Fe)Ze.endEmitted?X(ce,new Z):s(ce,Ze,be,!0);else if(Ze.ended)X(ce,new V);else{if(Ze.destroyed)return!1;Ze.reading=!1,Ze.decoder&&!Ne?(be=Ze.decoder.write(be),Ze.objectMode||0!==be.length?s(ce,Ze,be,!1):P(ce,Ze)):s(ce,Ze,be,!1)}else Fe||(Ze.reading=!1,P(ce,Ze));return!Ze.ended&&(Ze.lengthbe.highWaterMark&&(be.highWaterMark=function E(ce){return ce>=h?ce=h:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=be.length?ce:be.ended?be.length:(be.needReadable=!0,0))}function x(ce){var be=ce._readableState;_("emitReadable",be.needReadable,be.emittedReadable),be.needReadable=!1,be.emittedReadable||(_("emitReadable",be.flowing),be.emittedReadable=!0,process.nextTick(f,ce))}function f(ce){var be=ce._readableState;_("emitReadable_",be.destroyed,be.length,be.ended),!be.destroyed&&(be.length||be.ended)&&(ce.emit("readable"),be.emittedReadable=!1),be.needReadable=!be.flowing&&!be.ended&&be.length<=be.highWaterMark,ve(ce)}function P(ce,be){be.readingMore||(be.readingMore=!0,process.nextTick(se,ce,be))}function se(ce,be){for(;!be.reading&&!be.ended&&(be.length0,be.resumeScheduled&&!be.paused?be.flowing=!0:ce.listenerCount("data")>0&&ce.resume()}function de(ce){_("readable nexttick read 0"),ce.read(0)}function ye(ce,be){_("resume",be.reading),be.reading||ce.read(0),be.resumeScheduled=!1,ce.emit("resume"),ve(ce),be.flowing&&!be.reading&&ce.read(0)}function ve(ce){var be=ce._readableState;for(_("flow",be.flowing);be.flowing&&null!==ce.read(););}function ae(ce,be){return 0===be.length?null:(be.objectMode?Ne=be.buffer.shift():!ce||ce>=be.length?(Ne=be.decoder?be.buffer.join(""):1===be.buffer.length?be.buffer.first():be.buffer.concat(be.length),be.buffer.clear()):Ne=be.buffer.consume(ce,be.decoder),Ne);var Ne}function fe(ce){var be=ce._readableState;_("endReadable",be.endEmitted),be.endEmitted||(be.ended=!0,process.nextTick(pe,be,ce))}function pe(ce,be){if(_("endReadableNT",ce.endEmitted,ce.length),!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,be.readable=!1,be.emit("end"),ce.autoDestroy)){var Ne=be._writableState;(!Ne||Ne.autoDestroy&&Ne.finished)&&be.destroy()}}function Ee(ce,be){for(var Ne=0,Fe=ce.length;Ne=be.highWaterMark:be.length>0)||be.ended))return _("read: emitReadable",be.length,be.ended),0===be.length&&be.ended?fe(this):x(this),null;if(0===(ce=k(ce,be))&&be.ended)return 0===be.length&&fe(this),null;var ct,Fe=be.needReadable;return _("need readable",Fe),(0===be.length||be.length-ce0?ae(ce,be):null)?(be.needReadable=be.length<=be.highWaterMark,ce=0):(be.length-=ce,be.awaitDrain=0),0===be.length&&(be.ended||(be.needReadable=!0),Ne!==ce&&be.ended&&fe(this)),null!==ct&&this.emit("data",ct),ct},S.prototype._read=function(ce){X(this,new j("_read()"))},S.prototype.pipe=function(ce,be){var Ne=this,Fe=this._readableState;switch(Fe.pipesCount){case 0:Fe.pipes=ce;break;case 1:Fe.pipes=[Fe.pipes,ce];break;default:Fe.pipes.push(ce)}Fe.pipesCount+=1,_("pipe count=%d opts=%j",Fe.pipesCount,be);var Ze=(!be||!1!==be.end)&&ce!==process.stdout&&ce!==process.stderr?Ut:Ae;function Ve(xe,Be){_("onunpipe"),xe===Ne&&Be&&!1===Be.hasUnpiped&&(Be.hasUnpiped=!0,function Xt(){_("cleanup"),ce.removeListener("close",$t),ce.removeListener("finish",Pe),ce.removeListener("drain",$e),ce.removeListener("error",st),ce.removeListener("unpipe",Ve),Ne.removeListener("end",Ut),Ne.removeListener("end",Ae),Ne.removeListener("data",ot),tt=!0,Fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&$e()}())}function Ut(){_("onend"),ce.end()}Fe.endEmitted?process.nextTick(Ze):Ne.once("end",Ze),ce.on("unpipe",Ve);var $e=function te(ce){return function(){var Ne=ce._readableState;_("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,0===Ne.awaitDrain&&w(ce,"data")&&(Ne.flowing=!0,ve(ce))}}(Ne);ce.on("drain",$e);var tt=!1;function ot(xe){_("ondata");var Be=ce.write(xe);_("dest.write",Be),!1===Be&&((1===Fe.pipesCount&&Fe.pipes===ce||Fe.pipesCount>1&&-1!==Ee(Fe.pipes,ce))&&!tt&&(_("false write response, pause",Fe.awaitDrain),Fe.awaitDrain++),Ne.pause())}function st(xe){_("onerror",xe),Ae(),ce.removeListener("error",st),0===w(ce,"error")&&X(ce,xe)}function $t(){ce.removeListener("finish",Pe),Ae()}function Pe(){_("onfinish"),ce.removeListener("close",$t),Ae()}function Ae(){_("unpipe"),Ne.unpipe(ce)}return Ne.on("data",ot),function z(ce,be,Ne){if("function"==typeof ce.prependListener)return ce.prependListener(be,Ne);ce._events&&ce._events[be]?Array.isArray(ce._events[be])?ce._events[be].unshift(Ne):ce._events[be]=[Ne,ce._events[be]]:ce.on(be,Ne)}(ce,"error",st),ce.once("close",$t),ce.once("finish",Pe),ce.emit("pipe",Ne),Fe.flowing||(_("pipe resume"),Ne.resume()),ce},S.prototype.unpipe=function(ce){var be=this._readableState,Ne={hasUnpiped:!1};if(0===be.pipesCount)return this;if(1===be.pipesCount)return ce&&ce!==be.pipes||(ce||(ce=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,ce&&ce.emit("unpipe",this,Ne)),this;if(!ce){var Fe=be.pipes,ct=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var Ze=0;Ze0,!1!==Fe.flowing&&this.resume()):"readable"===ce&&!Fe.endEmitted&&!Fe.readableListening&&(Fe.readableListening=Fe.needReadable=!0,Fe.flowing=!1,Fe.emittedReadable=!1,_("on readable",Fe.length,Fe.reading),Fe.length?x(this):Fe.reading||process.nextTick(de,this)),Ne},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(ce,be){var Ne=M.prototype.removeListener.call(this,ce,be);return"readable"===ce&&process.nextTick(ie,this),Ne},S.prototype.removeAllListeners=function(ce){var be=M.prototype.removeAllListeners.apply(this,arguments);return("readable"===ce||void 0===ce)&&process.nextTick(ie,this),be},S.prototype.resume=function(){var ce=this._readableState;return ce.flowing||(_("resume"),ce.flowing=!ce.readableListening,function Ce(ce,be){be.resumeScheduled||(be.resumeScheduled=!0,process.nextTick(ye,ce,be))}(this,ce)),ce.paused=!1,this},S.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(ce){var be=this,Ne=this._readableState,Fe=!1;for(var ct in ce.on("end",function(){if(_("wrapped end"),Ne.decoder&&!Ne.ended){var Ve=Ne.decoder.end();Ve&&Ve.length&&be.push(Ve)}be.push(null)}),ce.on("data",function(Ve){(_("wrapped data"),Ne.decoder&&(Ve=Ne.decoder.write(Ve)),Ne.objectMode&&null==Ve||!(Ne.objectMode||Ve&&Ve.length))||(be.push(Ve)||(Fe=!0,ce.pause()))}),ce)void 0===this[ct]&&"function"==typeof ce[ct]&&(this[ct]=function(Ut){return function(){return ce[Ut].apply(ce,arguments)}}(ct));for(var Ze=0;Ze{"use strict";ne.exports=b;var p=y(84162).q,C=p.ERR_METHOD_NOT_IMPLEMENTED,w=p.ERR_MULTIPLE_CALLBACK,M=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,u=p.ERR_TRANSFORM_WITH_LENGTH_0,v=y(55986);function g(A,R){var D=this._transformState;D.transforming=!1;var T=D.writecb;if(null===T)return this.emit("error",new w);D.writechunk=null,D.writecb=null,null!=R&&this.push(R),T(A);var F=this._readableState;F.reading=!1,(F.needReadable||F.length{"use strict";function C(ve){var ae=this;this.next=null,this.entry=null,this.finish=function(){!function ye(ve,ae,fe){var pe=ve.entry;for(ve.entry=null;pe;){var Ee=pe.callback;ae.pendingcb--,Ee(fe),pe=pe.next}ae.corkedRequestsFree.next=ve}(ae,ve)}}var w;ne.exports=$,$.WritableState=Q;var M={deprecate:y(23532)},u=y(2228),v=y(93172).Buffer,g=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var z,_=y(34936),R=y(47890).getHighWaterMark,D=y(84162).q,T=D.ERR_INVALID_ARG_TYPE,F=D.ERR_METHOD_NOT_IMPLEMENTED,L=D.ERR_MULTIPLE_CALLBACK,V=D.ERR_STREAM_CANNOT_PIPE,j=D.ERR_STREAM_DESTROYED,Z=D.ERR_STREAM_NULL_VALUES,Y=D.ERR_STREAM_WRITE_AFTER_END,G=D.ERR_UNKNOWN_ENCODING,q=_.errorOrDestroy;function X(){}function Q(ve,ae,fe){w=w||y(55986),ve=ve||{},"boolean"!=typeof fe&&(fe=ae instanceof w),this.objectMode=!!ve.objectMode,fe&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=R(this,ve,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=!1===ve.decodeStrings;this.decodeStrings=!pe,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ee){!function B(ve,ae){var fe=ve._writableState,pe=fe.sync,Ee=fe.writecb;if("function"!=typeof Ee)throw new L;if(function k(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(fe),ae)!function E(ve,ae,fe,pe,Ee){--ae.pendingcb,fe?(process.nextTick(Ee,pe),process.nextTick(de,ve,ae),ve._writableState.errorEmitted=!0,q(ve,pe)):(Ee(pe),ve._writableState.errorEmitted=!0,q(ve,pe),de(ve,ae))}(ve,fe,pe,ae,Ee);else{var ce=se(fe)||ve.destroyed;!ce&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&P(ve,fe),pe?process.nextTick(x,ve,fe,ce,Ee):x(ve,fe,ce,Ee)}}(ae,Ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new C(this)}function $(ve){var ae=this instanceof(w=w||y(55986));if(!ae&&!z.call($,this))return new $(ve);this._writableState=new Q(ve,this,ae),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),u.call(this)}function h(ve,ae,fe,pe,Ee,ce,be){ae.writelen=pe,ae.writecb=be,ae.writing=!0,ae.sync=!0,ae.destroyed?ae.onwrite(new j("write")):fe?ve._writev(Ee,ae.onwrite):ve._write(Ee,ce,ae.onwrite),ae.sync=!1}function x(ve,ae,fe,pe){fe||function f(ve,ae){0===ae.length&&ae.needDrain&&(ae.needDrain=!1,ve.emit("drain"))}(ve,ae),ae.pendingcb--,pe(),de(ve,ae)}function P(ve,ae){ae.bufferProcessing=!0;var fe=ae.bufferedRequest;if(ve._writev&&fe&&fe.next){var pe=ae.bufferedRequestCount,Ee=new Array(pe),ce=ae.corkedRequestsFree;ce.entry=fe;for(var be=0,Ne=!0;fe;)Ee[be]=fe,fe.isBuf||(Ne=!1),fe=fe.next,be+=1;Ee.allBuffers=Ne,h(ve,ae,!0,ae.length,Ee,"",ce.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ce.next?(ae.corkedRequestsFree=ce.next,ce.next=null):ae.corkedRequestsFree=new C(ae),ae.bufferedRequestCount=0}else{for(;fe;){var Fe=fe.chunk,ct=fe.encoding,Ze=fe.callback;if(h(ve,ae,!1,ae.objectMode?1:Fe.length,Fe,ct,Ze),fe=fe.next,ae.bufferedRequestCount--,ae.writing)break}null===fe&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=fe,ae.bufferProcessing=!1}function se(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function te(ve,ae){ve._final(function(fe){ae.pendingcb--,fe&&q(ve,fe),ae.prefinished=!0,ve.emit("prefinish"),de(ve,ae)})}function de(ve,ae){var fe=se(ae);if(fe&&(function ie(ve,ae){!ae.prefinished&&!ae.finalCalled&&("function"!=typeof ve._final||ae.destroyed?(ae.prefinished=!0,ve.emit("prefinish")):(ae.pendingcb++,ae.finalCalled=!0,process.nextTick(te,ve,ae)))}(ve,ae),0===ae.pendingcb&&(ae.finished=!0,ve.emit("finish"),ae.autoDestroy))){var pe=ve._readableState;(!pe||pe.autoDestroy&&pe.endEmitted)&&ve.destroy()}return fe}y(83894)($,u),Q.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,fe=[];ae;)fe.push(ae),ae=ae.next;return fe},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:M.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(z=Function.prototype[Symbol.hasInstance],Object.defineProperty($,Symbol.hasInstance,{value:function(ae){return!!z.call(this,ae)||this===$&&(ae&&ae._writableState instanceof Q)}})):z=function(ae){return ae instanceof this},$.prototype.pipe=function(){q(this,new V)},$.prototype.write=function(ve,ae,fe){var pe=this._writableState,Ee=!1,ce=!pe.objectMode&&function I(ve){return v.isBuffer(ve)||ve instanceof g}(ve);return ce&&!v.isBuffer(ve)&&(ve=function b(ve){return v.from(ve)}(ve)),"function"==typeof ae&&(fe=ae,ae=null),ce?ae="buffer":ae||(ae=pe.defaultEncoding),"function"!=typeof fe&&(fe=X),pe.ending?function S(ve,ae){var fe=new Y;q(ve,fe),process.nextTick(ae,fe)}(this,fe):(ce||function r(ve,ae,fe,pe){var Ee;return null===fe?Ee=new Z:"string"!=typeof fe&&!ae.objectMode&&(Ee=new T("chunk",["string","Buffer"],fe)),!Ee||(q(ve,Ee),process.nextTick(pe,Ee),!1)}(this,pe,ve,fe))&&(pe.pendingcb++,Ee=function d(ve,ae,fe,pe,Ee,ce){if(!fe){var be=function s(ve,ae,fe){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ae&&(ae=v.from(ae,fe)),ae}(ae,pe,Ee);pe!==be&&(fe=!0,Ee="buffer",pe=be)}var Ne=ae.objectMode?1:pe.length;ae.length+=Ne;var Fe=ae.length-1))throw new G(ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty($.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty($.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),$.prototype._write=function(ve,ae,fe){fe(new F("_write()"))},$.prototype._writev=null,$.prototype.end=function(ve,ae,fe){var pe=this._writableState;return"function"==typeof ve?(fe=ve,ve=null,ae=null):"function"==typeof ae&&(fe=ae,ae=null),null!=ve&&this.write(ve,ae),pe.corked&&(pe.corked=1,this.uncork()),pe.ending||function Ce(ve,ae,fe){ae.ending=!0,de(ve,ae),fe&&(ae.finished?process.nextTick(fe):ve.once("finish",fe)),ae.ended=!0,ve.writable=!1}(this,pe,fe),this},Object.defineProperty($.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),$.prototype.destroy=_.destroy,$.prototype._undestroy=_.undestroy,$.prototype._destroy=function(ve,ae){ae(ve)}},56121:(ne,a,y)=>{"use strict";var p;function C(Y,G,q){return G=function w(Y){var G=function M(Y,G){if("object"!=typeof Y||null===Y)return Y;var q=Y[Symbol.toPrimitive];if(void 0!==q){var X=q.call(Y,G||"default");if("object"!=typeof X)return X;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===G?String:Number)(Y)}(Y,"string");return"symbol"==typeof G?G:String(G)}(G),G in Y?Object.defineProperty(Y,G,{value:q,enumerable:!0,configurable:!0,writable:!0}):Y[G]=q,Y}var u=y(81291),v=Symbol("lastResolve"),g=Symbol("lastReject"),b=Symbol("error"),I=Symbol("ended"),_=Symbol("lastPromise"),A=Symbol("handlePromise"),R=Symbol("stream");function D(Y,G){return{value:Y,done:G}}function T(Y){var G=Y[v];if(null!==G){var q=Y[R].read();null!==q&&(Y[_]=null,Y[v]=null,Y[g]=null,G(D(q,!1)))}}function F(Y){process.nextTick(T,Y)}var V=Object.getPrototypeOf(function(){}),j=Object.setPrototypeOf((C(p={get stream(){return this[R]},next:function(){var G=this,q=this[b];if(null!==q)return Promise.reject(q);if(this[I])return Promise.resolve(D(void 0,!0));if(this[R].destroyed)return new Promise(function($,S){process.nextTick(function(){G[b]?S(G[b]):$(D(void 0,!0))})});var Q,X=this[_];if(X)Q=new Promise(function L(Y,G){return function(q,X){Y.then(function(){G[I]?q(D(void 0,!0)):G[A](q,X)},X)}}(X,this));else{var z=this[R].read();if(null!==z)return Promise.resolve(D(z,!1));Q=new Promise(this[A])}return this[_]=Q,Q}},Symbol.asyncIterator,function(){return this}),C(p,"return",function(){var G=this;return new Promise(function(q,X){G[R].destroy(null,function(Q){Q?X(Q):q(D(void 0,!0))})})}),p),V);ne.exports=function(G){var q,X=Object.create(j,(C(q={},R,{value:G,writable:!0}),C(q,v,{value:null,writable:!0}),C(q,g,{value:null,writable:!0}),C(q,b,{value:null,writable:!0}),C(q,I,{value:G._readableState.endEmitted,writable:!0}),C(q,A,{value:function(z,$){var S=X[R].read();S?(X[_]=null,X[v]=null,X[g]=null,z(D(S,!1))):(X[v]=z,X[g]=$)},writable:!0}),q));return X[_]=null,u(G,function(Q){if(Q&&"ERR_STREAM_PREMATURE_CLOSE"!==Q.code){var z=X[g];return null!==z&&(X[_]=null,X[v]=null,X[g]=null,z(Q)),void(X[b]=Q)}var $=X[v];null!==$&&(X[_]=null,X[v]=null,X[g]=null,$(D(void 0,!0))),X[I]=!0}),G.on("readable",F.bind(null,X)),X}},76083:(ne,a,y)=>{"use strict";function p(F,L){var V=Object.keys(F);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(F);L&&(j=j.filter(function(Z){return Object.getOwnPropertyDescriptor(F,Z).enumerable})),V.push.apply(V,j)}return V}function C(F){for(var L=1;L0?this.tail.next=j:this.head=j,this.tail=j,++this.length}},{key:"unshift",value:function(V){var j={data:V,next:this.head};0===this.length&&(this.tail=j),this.head=j,++this.length}},{key:"shift",value:function(){if(0!==this.length){var V=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,V}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(V){if(0===this.length)return"";for(var j=this.head,Z=""+j.data;j=j.next;)Z+=V+j.data;return Z}},{key:"concat",value:function(V){if(0===this.length)return _.alloc(0);for(var j=_.allocUnsafe(V>>>0),Z=this.head,Y=0;Z;)T(Z.data,j,Y),Y+=Z.data.length,Z=Z.next;return j}},{key:"consume",value:function(V,j){var Z;return VG.length?G.length:V;if(q===G.length?Y+=G:Y+=G.slice(0,V),0===(V-=q)){q===G.length?(++Z,j.next?this.head=j.next:this.head=this.tail=null):(this.head=j,j.data=G.slice(q));break}++Z}return this.length-=Z,Y}},{key:"_getBuffer",value:function(V){var j=_.allocUnsafe(V),Z=this.head,Y=1;for(Z.data.copy(j),V-=Z.data.length;Z=Z.next;){var G=Z.data,q=V>G.length?G.length:V;if(G.copy(j,j.length-V,0,q),0===(V-=q)){q===G.length?(++Y,Z.next?this.head=Z.next:this.head=this.tail=null):(this.head=Z,Z.data=G.slice(q));break}++Y}return this.length-=Y,j}},{key:D,value:function(V,j){return R(this,C(C({},j),{},{depth:0,customInspect:!1}))}}]),F}()},34936:ne=>{"use strict";function y(u,v){w(u,v),p(u)}function p(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}function w(u,v){u.emit("error",v)}ne.exports={destroy:function a(u,v){var g=this,b=this._readableState&&this._readableState.destroyed,I=this._writableState&&this._writableState.destroyed;return b||I?(v?v(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(w,this,u)):process.nextTick(w,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(_){!v&&_?g._writableState?g._writableState.errorEmitted?process.nextTick(p,g):(g._writableState.errorEmitted=!0,process.nextTick(y,g,_)):process.nextTick(y,g,_):v?(process.nextTick(p,g),v(_)):process.nextTick(p,g)}),this)},undestroy:function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function M(u,v){var g=u._readableState,b=u._writableState;g&&g.autoDestroy||b&&b.autoDestroy?u.destroy(v):u.emit("error",v)}}},81291:(ne,a,y)=>{"use strict";var p=y(84162).q.ERR_STREAM_PREMATURE_CLOSE;function w(){}ne.exports=function u(v,g,b){if("function"==typeof g)return u(v,null,g);g||(g={}),b=function C(v){var g=!1;return function(){if(!g){g=!0;for(var b=arguments.length,I=new Array(b),_=0;_{ne.exports=function(){throw new Error("Readable.from is not available in the browser")}},33795:(ne,a,y)=>{"use strict";var p;var w=y(84162).q,M=w.ERR_MISSING_ARGS,u=w.ERR_STREAM_DESTROYED;function v(D){if(D)throw D}function I(D){D()}function _(D,T){return D.pipe(T)}ne.exports=function R(){for(var D=arguments.length,T=new Array(D),F=0;F0,function(X){V||(V=X),X&&j.forEach(I),!G&&(j.forEach(I),L(V))})});return T.reduce(_)}},47890:(ne,a,y)=>{"use strict";var p=y(84162).q.ERR_INVALID_OPT_VALUE;ne.exports={getHighWaterMark:function w(M,u,v,g){var b=function C(M,u,v){return null!=M.highWaterMark?M.highWaterMark:u?M[v]:null}(u,g,v);if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new p(g?v:"highWaterMark",b);return Math.floor(b)}return M.objectMode?16:16384}}},2228:(ne,a,y)=>{ne.exports=y(59069).EventEmitter},31496:(ne,a,y)=>{(a=ne.exports=y(14473)).Stream=a,a.Readable=a,a.Writable=y(3766),a.Duplex=y(55986),a.Transform=y(3556),a.PassThrough=y(1576),a.finished=y(81291),a.pipeline=y(33795)},13465:(ne,a,y)=>{"use strict";var p=y(73502).Buffer,C=p.isEncoding||function(j){switch((j=""+j)&&j.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(j){var Z;switch(this.encoding=function M(j){var Z=function w(j){if(!j)return"utf8";for(var Z;;)switch(j){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return j;default:if(Z)return;j=(""+j).toLowerCase(),Z=!0}}(j);if("string"!=typeof Z&&(p.isEncoding===C||!C(j)))throw new Error("Unknown encoding: "+j);return Z||j}(j),this.encoding){case"utf16le":this.text=R,this.end=D,Z=4;break;case"utf8":this.fillLast=I,Z=4;break;case"base64":this.text=T,this.end=F,Z=3;break;default:return this.write=L,void(this.end=V)}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(Z)}function v(j){return j<=127?0:j>>5==6?2:j>>4==14?3:j>>3==30?4:j>>6==2?-1:-2}function I(j){var Z=this.lastTotal-this.lastNeed,Y=function b(j,Z,Y){if(128!=(192&Z[0]))return j.lastNeed=0,"\ufffd";if(j.lastNeed>1&&Z.length>1){if(128!=(192&Z[1]))return j.lastNeed=1,"\ufffd";if(j.lastNeed>2&&Z.length>2&&128!=(192&Z[2]))return j.lastNeed=2,"\ufffd"}}(this,j);return void 0!==Y?Y:this.lastNeed<=j.length?(j.copy(this.lastChar,Z,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(j.copy(this.lastChar,Z,0,j.length),void(this.lastNeed-=j.length))}function R(j,Z){if((j.length-Z)%2==0){var Y=j.toString("utf16le",Z);if(Y){var G=Y.charCodeAt(Y.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1],Y.slice(0,-1)}return Y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=j[j.length-1],j.toString("utf16le",Z,j.length-1)}function D(j){var Z=j&&j.length?this.write(j):"";if(this.lastNeed){var Y=this.lastTotal-this.lastNeed;return Z+this.lastChar.toString("utf16le",0,Y)}return Z}function T(j,Z){var Y=(j.length-Z)%3;return 0===Y?j.toString("base64",Z):(this.lastNeed=3-Y,this.lastTotal=3,1===Y?this.lastChar[0]=j[j.length-1]:(this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1]),j.toString("base64",Z,j.length-Y))}function F(j){var Z=j&&j.length?this.write(j):"";return this.lastNeed?Z+this.lastChar.toString("base64",0,3-this.lastNeed):Z}function L(j){return j.toString(this.encoding)}function V(j){return j&&j.length?this.write(j):""}a.s=u,u.prototype.write=function(j){if(0===j.length)return"";var Z,Y;if(this.lastNeed){if(void 0===(Z=this.fillLast(j)))return"";Y=this.lastNeed,this.lastNeed=0}else Y=0;return Y=0?(q>0&&(j.lastNeed=q-1),q):--G=0?(q>0&&(j.lastNeed=q-2),q):--G=0?(q>0&&(2===q?q=0:j.lastNeed=q-3),q):0))}(this,j,Z);if(!this.lastNeed)return j.toString("utf8",Z);this.lastTotal=Y;var G=j.length-(Y-this.lastNeed);return j.copy(this.lastChar,0,G),j.toString("utf8",Z,G)},u.prototype.fillLast=function(j){if(this.lastNeed<=j.length)return j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,j.length),this.lastNeed-=j.length}},58905:ne=>{var a=Object.prototype.toString,y=typeof Buffer<"u"&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;ne.exports=function M(u,v,g){if("number"==typeof u)throw new TypeError('"value" argument must not be a number');return function p(u){return"ArrayBuffer"===a.call(u).slice(8,-1)}(u)?function C(u,v,g){v>>>=0;var b=u.byteLength-v;if(b<0)throw new RangeError("'offset' is out of bounds");if(void 0===g)g=b;else if((g>>>=0)>b)throw new RangeError("'length' is out of bounds");return y?Buffer.from(u.slice(v,v+g)):new Buffer(new Uint8Array(u.slice(v,v+g)))}(u,v,g):"string"==typeof u?function w(u,v){if(("string"!=typeof v||""===v)&&(v="utf8"),!Buffer.isEncoding(v))throw new TypeError('"encoding" must be a valid string encoding');return y?Buffer.from(u,v):new Buffer(u,v)}(u,v):y?Buffer.from(u):new Buffer(u)}},58789:ne=>{ne.exports=function(y,p){for(var C=Math.min(y.length,p.length),w=new Buffer(C),M=0;M{"use strict";const p=y(5343),C=y(48461),w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=g,a.SlowBuffer=function j(Pe){return+Pe!=Pe&&(Pe=0),g.alloc(+Pe)},a.INSPECT_MAX_BYTES=50;const M=2147483647;function v(Pe){if(Pe>M)throw new RangeError('The value "'+Pe+'" is invalid for option "size"');const Ae=new Uint8Array(Pe);return Object.setPrototypeOf(Ae,g.prototype),Ae}function g(Pe,Ae,xe){if("number"==typeof Pe){if("string"==typeof Ae)throw new TypeError('The "string" argument must be of type string. Received type number');return A(Pe)}return b(Pe,Ae,xe)}function b(Pe,Ae,xe){if("string"==typeof Pe)return function R(Pe,Ae){if(("string"!=typeof Ae||""===Ae)&&(Ae="utf8"),!g.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);const xe=0|Z(Pe,Ae);let Be=v(xe);const ze=Be.write(Pe,Ae);return ze!==xe&&(Be=Be.slice(0,ze)),Be}(Pe,Ae);if(ArrayBuffer.isView(Pe))return function T(Pe){if(tt(Pe,Uint8Array)){const Ae=new Uint8Array(Pe);return F(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return D(Pe)}(Pe);if(null==Pe)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Pe);if(tt(Pe,ArrayBuffer)||Pe&&tt(Pe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(Pe,SharedArrayBuffer)||Pe&&tt(Pe.buffer,SharedArrayBuffer)))return F(Pe,Ae,xe);if("number"==typeof Pe)throw new TypeError('The "value" argument must not be of type number. Received type number');const Be=Pe.valueOf&&Pe.valueOf();if(null!=Be&&Be!==Pe)return g.from(Be,Ae,xe);const ze=function L(Pe){if(g.isBuffer(Pe)){const Ae=0|V(Pe.length),xe=v(Ae);return 0===xe.length||Pe.copy(xe,0,0,Ae),xe}if(void 0!==Pe.length)return"number"!=typeof Pe.length||Xt(Pe.length)?v(0):D(Pe);if("Buffer"===Pe.type&&Array.isArray(Pe.data))return D(Pe.data)}(Pe);if(ze)return ze;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Pe[Symbol.toPrimitive])return g.from(Pe[Symbol.toPrimitive]("string"),Ae,xe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Pe)}function I(Pe){if("number"!=typeof Pe)throw new TypeError('"size" argument must be of type number');if(Pe<0)throw new RangeError('The value "'+Pe+'" is invalid for option "size"')}function A(Pe){return I(Pe),v(Pe<0?0:0|V(Pe))}function D(Pe){const Ae=Pe.length<0?0:0|V(Pe.length),xe=v(Ae);for(let Be=0;Be=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|Pe}function Z(Pe,Ae){if(g.isBuffer(Pe))return Pe.length;if(ArrayBuffer.isView(Pe)||tt(Pe,ArrayBuffer))return Pe.byteLength;if("string"!=typeof Pe)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Pe);const xe=Pe.length,Be=arguments.length>2&&!0===arguments[2];if(!Be&&0===xe)return 0;let ze=!1;for(;;)switch(Ae){case"ascii":case"latin1":case"binary":return xe;case"utf8":case"utf-8":return ct(Pe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*xe;case"hex":return xe>>>1;case"base64":return Ut(Pe).length;default:if(ze)return Be?-1:ct(Pe).length;Ae=(""+Ae).toLowerCase(),ze=!0}}function Y(Pe,Ae,xe){let Be=!1;if((void 0===Ae||Ae<0)&&(Ae=0),Ae>this.length||((void 0===xe||xe>this.length)&&(xe=this.length),xe<=0)||(xe>>>=0)<=(Ae>>>=0))return"";for(Pe||(Pe="utf8");;)switch(Pe){case"hex":return x(this,Ae,xe);case"utf8":case"utf-8":return d(this,Ae,xe);case"ascii":return k(this,Ae,xe);case"latin1":case"binary":return B(this,Ae,xe);case"base64":return s(this,Ae,xe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,Ae,xe);default:if(Be)throw new TypeError("Unknown encoding: "+Pe);Pe=(Pe+"").toLowerCase(),Be=!0}}function G(Pe,Ae,xe){const Be=Pe[Ae];Pe[Ae]=Pe[xe],Pe[xe]=Be}function q(Pe,Ae,xe,Be,ze){if(0===Pe.length)return-1;if("string"==typeof xe?(Be=xe,xe=0):xe>2147483647?xe=2147483647:xe<-2147483648&&(xe=-2147483648),Xt(xe=+xe)&&(xe=ze?0:Pe.length-1),xe<0&&(xe=Pe.length+xe),xe>=Pe.length){if(ze)return-1;xe=Pe.length-1}else if(xe<0){if(!ze)return-1;xe=0}if("string"==typeof Ae&&(Ae=g.from(Ae,Be)),g.isBuffer(Ae))return 0===Ae.length?-1:X(Pe,Ae,xe,Be,ze);if("number"==typeof Ae)return Ae&=255,"function"==typeof Uint8Array.prototype.indexOf?ze?Uint8Array.prototype.indexOf.call(Pe,Ae,xe):Uint8Array.prototype.lastIndexOf.call(Pe,Ae,xe):X(Pe,[Ae],xe,Be,ze);throw new TypeError("val must be string, number or Buffer")}function X(Pe,Ae,xe,Be,ze){let ft,mt=1,Ye=Pe.length,ut=Ae.length;if(void 0!==Be&&("ucs2"===(Be=String(Be).toLowerCase())||"ucs-2"===Be||"utf16le"===Be||"utf-16le"===Be)){if(Pe.length<2||Ae.length<2)return-1;mt=2,Ye/=2,ut/=2,xe/=2}function ln(wt,mn){return 1===mt?wt[mn]:wt.readUInt16BE(mn*mt)}if(ze){let wt=-1;for(ft=xe;ftYe&&(xe=Ye-ut),ft=xe;ft>=0;ft--){let wt=!0;for(let mn=0;mnze&&(Be=ze):Be=ze;const mt=Ae.length;let Ye;for(Be>mt/2&&(Be=mt/2),Ye=0;Ye>8,ze=xe%256,mt.push(ze),mt.push(Be);return mt}(Ae,Pe.length-xe),Pe,xe,Be)}function s(Pe,Ae,xe){return 0===Ae&&xe===Pe.length?p.fromByteArray(Pe):p.fromByteArray(Pe.slice(Ae,xe))}function d(Pe,Ae,xe){xe=Math.min(Pe.length,xe);const Be=[];let ze=Ae;for(;ze239?4:mt>223?3:mt>191?2:1;if(ze+ut<=xe){let ln,ft,wt,mn;switch(ut){case 1:mt<128&&(Ye=mt);break;case 2:ln=Pe[ze+1],128==(192&ln)&&(mn=(31&mt)<<6|63&ln,mn>127&&(Ye=mn));break;case 3:ln=Pe[ze+1],ft=Pe[ze+2],128==(192&ln)&&128==(192&ft)&&(mn=(15&mt)<<12|(63&ln)<<6|63&ft,mn>2047&&(mn<55296||mn>57343)&&(Ye=mn));break;case 4:ln=Pe[ze+1],ft=Pe[ze+2],wt=Pe[ze+3],128==(192&ln)&&128==(192&ft)&&128==(192&wt)&&(mn=(15&mt)<<18|(63&ln)<<12|(63&ft)<<6|63&wt,mn>65535&&mn<1114112&&(Ye=mn))}}null===Ye?(Ye=65533,ut=1):Ye>65535&&(Ye-=65536,Be.push(Ye>>>10&1023|55296),Ye=56320|1023&Ye),Be.push(Ye),ze+=ut}return function E(Pe){const Ae=Pe.length;if(Ae<=h)return String.fromCharCode.apply(String,Pe);let xe="",Be=0;for(;Beze.length?(g.isBuffer(Ye)||(Ye=g.from(Ye)),Ye.copy(ze,mt)):Uint8Array.prototype.set.call(ze,Ye,mt);else{if(!g.isBuffer(Ye))throw new TypeError('"list" argument must be an Array of Buffers');Ye.copy(ze,mt)}mt+=Ye.length}return ze},g.byteLength=Z,g.prototype._isBuffer=!0,g.prototype.swap16=function(){const Ae=this.length;if(Ae%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let xe=0;xexe&&(Ae+=" ... "),""},w&&(g.prototype[w]=g.prototype.inspect),g.prototype.compare=function(Ae,xe,Be,ze,mt){if(tt(Ae,Uint8Array)&&(Ae=g.from(Ae,Ae.offset,Ae.byteLength)),!g.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ae);if(void 0===xe&&(xe=0),void 0===Be&&(Be=Ae?Ae.length:0),void 0===ze&&(ze=0),void 0===mt&&(mt=this.length),xe<0||Be>Ae.length||ze<0||mt>this.length)throw new RangeError("out of range index");if(ze>=mt&&xe>=Be)return 0;if(ze>=mt)return-1;if(xe>=Be)return 1;if(this===Ae)return 0;let Ye=(mt>>>=0)-(ze>>>=0),ut=(Be>>>=0)-(xe>>>=0);const ln=Math.min(Ye,ut),ft=this.slice(ze,mt),wt=Ae.slice(xe,Be);for(let mn=0;mn>>=0,isFinite(Be)?(Be>>>=0,void 0===ze&&(ze="utf8")):(ze=Be,Be=void 0)}const mt=this.length-xe;if((void 0===Be||Be>mt)&&(Be=mt),Ae.length>0&&(Be<0||xe<0)||xe>this.length)throw new RangeError("Attempt to write outside buffer bounds");ze||(ze="utf8");let Ye=!1;for(;;)switch(ze){case"hex":return Q(this,Ae,xe,Be);case"utf8":case"utf-8":return z(this,Ae,xe,Be);case"ascii":case"latin1":case"binary":return $(this,Ae,xe,Be);case"base64":return S(this,Ae,xe,Be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r(this,Ae,xe,Be);default:if(Ye)throw new TypeError("Unknown encoding: "+ze);ze=(""+ze).toLowerCase(),Ye=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const h=4096;function k(Pe,Ae,xe){let Be="";xe=Math.min(Pe.length,xe);for(let ze=Ae;zeBe)&&(xe=Be);let ze="";for(let mt=Ae;mtxe)throw new RangeError("Trying to access beyond buffer length")}function se(Pe,Ae,xe,Be,ze,mt){if(!g.isBuffer(Pe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>ze||AePe.length)throw new RangeError("Index out of range")}function te(Pe,Ae,xe,Be,ze){Ee(Ae,Be,ze,Pe,xe,7);let mt=Number(Ae&BigInt(4294967295));Pe[xe++]=mt,mt>>=8,Pe[xe++]=mt,mt>>=8,Pe[xe++]=mt,mt>>=8,Pe[xe++]=mt;let Ye=Number(Ae>>BigInt(32)&BigInt(4294967295));return Pe[xe++]=Ye,Ye>>=8,Pe[xe++]=Ye,Ye>>=8,Pe[xe++]=Ye,Ye>>=8,Pe[xe++]=Ye,xe}function ie(Pe,Ae,xe,Be,ze){Ee(Ae,Be,ze,Pe,xe,7);let mt=Number(Ae&BigInt(4294967295));Pe[xe+7]=mt,mt>>=8,Pe[xe+6]=mt,mt>>=8,Pe[xe+5]=mt,mt>>=8,Pe[xe+4]=mt;let Ye=Number(Ae>>BigInt(32)&BigInt(4294967295));return Pe[xe+3]=Ye,Ye>>=8,Pe[xe+2]=Ye,Ye>>=8,Pe[xe+1]=Ye,Ye>>=8,Pe[xe]=Ye,xe+8}function de(Pe,Ae,xe,Be,ze,mt){if(xe+Be>Pe.length)throw new RangeError("Index out of range");if(xe<0)throw new RangeError("Index out of range")}function Ce(Pe,Ae,xe,Be,ze){return Ae=+Ae,xe>>>=0,ze||de(Pe,0,xe,4),C.write(Pe,Ae,xe,Be,23,4),xe+4}function ye(Pe,Ae,xe,Be,ze){return Ae=+Ae,xe>>>=0,ze||de(Pe,0,xe,8),C.write(Pe,Ae,xe,Be,52,8),xe+8}g.prototype.slice=function(Ae,xe){const Be=this.length;(Ae=~~Ae)<0?(Ae+=Be)<0&&(Ae=0):Ae>Be&&(Ae=Be),(xe=void 0===xe?Be:~~xe)<0?(xe+=Be)<0&&(xe=0):xe>Be&&(xe=Be),xe>>=0,xe>>>=0,Be||P(Ae,xe,this.length);let ze=this[Ae],mt=1,Ye=0;for(;++Ye>>=0,xe>>>=0,Be||P(Ae,xe,this.length);let ze=this[Ae+--xe],mt=1;for(;xe>0&&(mt*=256);)ze+=this[Ae+--xe]*mt;return ze},g.prototype.readUint8=g.prototype.readUInt8=function(Ae,xe){return Ae>>>=0,xe||P(Ae,1,this.length),this[Ae]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+16777216*this[Ae+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,4,this.length),16777216*this[Ae]+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},g.prototype.readBigUInt64LE=st(function(Ae){ce(Ae>>>=0,"offset");const xe=this[Ae],Be=this[Ae+7];(void 0===xe||void 0===Be)&&be(Ae,this.length-8);const ze=xe+256*this[++Ae]+65536*this[++Ae]+this[++Ae]*2**24,mt=this[++Ae]+256*this[++Ae]+65536*this[++Ae]+Be*2**24;return BigInt(ze)+(BigInt(mt)<>>=0,"offset");const xe=this[Ae],Be=this[Ae+7];(void 0===xe||void 0===Be)&&be(Ae,this.length-8);const ze=xe*2**24+65536*this[++Ae]+256*this[++Ae]+this[++Ae],mt=this[++Ae]*2**24+65536*this[++Ae]+256*this[++Ae]+Be;return(BigInt(ze)<>>=0,xe>>>=0,Be||P(Ae,xe,this.length);let ze=this[Ae],mt=1,Ye=0;for(;++Ye=mt&&(ze-=Math.pow(2,8*xe)),ze},g.prototype.readIntBE=function(Ae,xe,Be){Ae>>>=0,xe>>>=0,Be||P(Ae,xe,this.length);let ze=xe,mt=1,Ye=this[Ae+--ze];for(;ze>0&&(mt*=256);)Ye+=this[Ae+--ze]*mt;return mt*=128,Ye>=mt&&(Ye-=Math.pow(2,8*xe)),Ye},g.prototype.readInt8=function(Ae,xe){return Ae>>>=0,xe||P(Ae,1,this.length),128&this[Ae]?-1*(255-this[Ae]+1):this[Ae]},g.prototype.readInt16LE=function(Ae,xe){Ae>>>=0,xe||P(Ae,2,this.length);const Be=this[Ae]|this[Ae+1]<<8;return 32768&Be?4294901760|Be:Be},g.prototype.readInt16BE=function(Ae,xe){Ae>>>=0,xe||P(Ae,2,this.length);const Be=this[Ae+1]|this[Ae]<<8;return 32768&Be?4294901760|Be:Be},g.prototype.readInt32LE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},g.prototype.readInt32BE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},g.prototype.readBigInt64LE=st(function(Ae){ce(Ae>>>=0,"offset");const xe=this[Ae],Be=this[Ae+7];(void 0===xe||void 0===Be)&&be(Ae,this.length-8);const ze=this[Ae+4]+256*this[Ae+5]+65536*this[Ae+6]+(Be<<24);return(BigInt(ze)<>>=0,"offset");const xe=this[Ae],Be=this[Ae+7];(void 0===xe||void 0===Be)&&be(Ae,this.length-8);const ze=(xe<<24)+65536*this[++Ae]+256*this[++Ae]+this[++Ae];return(BigInt(ze)<>>=0,xe||P(Ae,4,this.length),C.read(this,Ae,!0,23,4)},g.prototype.readFloatBE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,4,this.length),C.read(this,Ae,!1,23,4)},g.prototype.readDoubleLE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,8,this.length),C.read(this,Ae,!0,52,8)},g.prototype.readDoubleBE=function(Ae,xe){return Ae>>>=0,xe||P(Ae,8,this.length),C.read(this,Ae,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(Ae,xe,Be,ze){if(Ae=+Ae,xe>>>=0,Be>>>=0,!ze){se(this,Ae,xe,Be,Math.pow(2,8*Be)-1,0)}let mt=1,Ye=0;for(this[xe]=255&Ae;++Ye>>=0,Be>>>=0,!ze){se(this,Ae,xe,Be,Math.pow(2,8*Be)-1,0)}let mt=Be-1,Ye=1;for(this[xe+mt]=255&Ae;--mt>=0&&(Ye*=256);)this[xe+mt]=Ae/Ye&255;return xe+Be},g.prototype.writeUint8=g.prototype.writeUInt8=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,1,255,0),this[xe]=255&Ae,xe+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,2,65535,0),this[xe]=255&Ae,this[xe+1]=Ae>>>8,xe+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,2,65535,0),this[xe]=Ae>>>8,this[xe+1]=255&Ae,xe+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,4,4294967295,0),this[xe+3]=Ae>>>24,this[xe+2]=Ae>>>16,this[xe+1]=Ae>>>8,this[xe]=255&Ae,xe+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,4,4294967295,0),this[xe]=Ae>>>24,this[xe+1]=Ae>>>16,this[xe+2]=Ae>>>8,this[xe+3]=255&Ae,xe+4},g.prototype.writeBigUInt64LE=st(function(Ae,xe=0){return te(this,Ae,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeBigUInt64BE=st(function(Ae,xe=0){return ie(this,Ae,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeIntLE=function(Ae,xe,Be,ze){if(Ae=+Ae,xe>>>=0,!ze){const ln=Math.pow(2,8*Be-1);se(this,Ae,xe,Be,ln-1,-ln)}let mt=0,Ye=1,ut=0;for(this[xe]=255&Ae;++mt>0)-ut&255;return xe+Be},g.prototype.writeIntBE=function(Ae,xe,Be,ze){if(Ae=+Ae,xe>>>=0,!ze){const ln=Math.pow(2,8*Be-1);se(this,Ae,xe,Be,ln-1,-ln)}let mt=Be-1,Ye=1,ut=0;for(this[xe+mt]=255&Ae;--mt>=0&&(Ye*=256);)Ae<0&&0===ut&&0!==this[xe+mt+1]&&(ut=1),this[xe+mt]=(Ae/Ye>>0)-ut&255;return xe+Be},g.prototype.writeInt8=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[xe]=255&Ae,xe+1},g.prototype.writeInt16LE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,2,32767,-32768),this[xe]=255&Ae,this[xe+1]=Ae>>>8,xe+2},g.prototype.writeInt16BE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,2,32767,-32768),this[xe]=Ae>>>8,this[xe+1]=255&Ae,xe+2},g.prototype.writeInt32LE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,4,2147483647,-2147483648),this[xe]=255&Ae,this[xe+1]=Ae>>>8,this[xe+2]=Ae>>>16,this[xe+3]=Ae>>>24,xe+4},g.prototype.writeInt32BE=function(Ae,xe,Be){return Ae=+Ae,xe>>>=0,Be||se(this,Ae,xe,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[xe]=Ae>>>24,this[xe+1]=Ae>>>16,this[xe+2]=Ae>>>8,this[xe+3]=255&Ae,xe+4},g.prototype.writeBigInt64LE=st(function(Ae,xe=0){return te(this,Ae,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeBigInt64BE=st(function(Ae,xe=0){return ie(this,Ae,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeFloatLE=function(Ae,xe,Be){return Ce(this,Ae,xe,!0,Be)},g.prototype.writeFloatBE=function(Ae,xe,Be){return Ce(this,Ae,xe,!1,Be)},g.prototype.writeDoubleLE=function(Ae,xe,Be){return ye(this,Ae,xe,!0,Be)},g.prototype.writeDoubleBE=function(Ae,xe,Be){return ye(this,Ae,xe,!1,Be)},g.prototype.copy=function(Ae,xe,Be,ze){if(!g.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(Be||(Be=0),!ze&&0!==ze&&(ze=this.length),xe>=Ae.length&&(xe=Ae.length),xe||(xe=0),ze>0&&ze=this.length)throw new RangeError("Index out of range");if(ze<0)throw new RangeError("sourceEnd out of bounds");ze>this.length&&(ze=this.length),Ae.length-xe>>=0,Be=void 0===Be?this.length:Be>>>0,Ae||(Ae=0),"number"==typeof Ae)for(mt=xe;mt=Be+4;xe-=3)Ae=`_${Pe.slice(xe-3,xe)}${Ae}`;return`${Pe.slice(0,xe)}${Ae}`}function Ee(Pe,Ae,xe,Be,ze,mt){if(Pe>xe||Pe3?0===Ae||Ae===BigInt(0)?`>= 0${Ye} and < 2${Ye} ** ${8*(mt+1)}${Ye}`:`>= -(2${Ye} ** ${8*(mt+1)-1}${Ye}) and < 2 ** ${8*(mt+1)-1}${Ye}`:`>= ${Ae}${Ye} and <= ${xe}${Ye}`,new ve.ERR_OUT_OF_RANGE("value",ut,Pe)}!function pe(Pe,Ae,xe){ce(Ae,"offset"),(void 0===Pe[Ae]||void 0===Pe[Ae+xe])&&be(Ae,Pe.length-(xe+1))}(Be,ze,mt)}function ce(Pe,Ae){if("number"!=typeof Pe)throw new ve.ERR_INVALID_ARG_TYPE(Ae,"number",Pe)}function be(Pe,Ae,xe){throw Math.floor(Pe)!==Pe?(ce(Pe,xe),new ve.ERR_OUT_OF_RANGE(xe||"offset","an integer",Pe)):Ae<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(xe||"offset",`>= ${xe?1:0} and <= ${Ae}`,Pe)}ae("ERR_BUFFER_OUT_OF_BOUNDS",function(Pe){return Pe?`${Pe} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ae("ERR_INVALID_ARG_TYPE",function(Pe,Ae){return`The "${Pe}" argument must be of type number. Received type ${typeof Ae}`},TypeError),ae("ERR_OUT_OF_RANGE",function(Pe,Ae,xe){let Be=`The value of "${Pe}" is out of range.`,ze=xe;return Number.isInteger(xe)&&Math.abs(xe)>2**32?ze=fe(String(xe)):"bigint"==typeof xe&&(ze=String(xe),(xe>BigInt(2)**BigInt(32)||xe<-(BigInt(2)**BigInt(32)))&&(ze=fe(ze)),ze+="n"),Be+=` It must be ${Ae}. Received ${ze}`,Be},RangeError);const Ne=/[^+/0-9A-Za-z-_]/g;function ct(Pe,Ae){let xe;Ae=Ae||1/0;const Be=Pe.length;let ze=null;const mt=[];for(let Ye=0;Ye55295&&xe<57344){if(!ze){if(xe>56319){(Ae-=3)>-1&&mt.push(239,191,189);continue}if(Ye+1===Be){(Ae-=3)>-1&&mt.push(239,191,189);continue}ze=xe;continue}if(xe<56320){(Ae-=3)>-1&&mt.push(239,191,189),ze=xe;continue}xe=65536+(ze-55296<<10|xe-56320)}else ze&&(Ae-=3)>-1&&mt.push(239,191,189);if(ze=null,xe<128){if((Ae-=1)<0)break;mt.push(xe)}else if(xe<2048){if((Ae-=2)<0)break;mt.push(xe>>6|192,63&xe|128)}else if(xe<65536){if((Ae-=3)<0)break;mt.push(xe>>12|224,xe>>6&63|128,63&xe|128)}else{if(!(xe<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;mt.push(xe>>18|240,xe>>12&63|128,xe>>6&63|128,63&xe|128)}}return mt}function Ut(Pe){return p.toByteArray(function Fe(Pe){if((Pe=(Pe=Pe.split("=")[0]).trim().replace(Ne,"")).length<2)return"";for(;Pe.length%4!=0;)Pe+="=";return Pe}(Pe))}function $e(Pe,Ae,xe,Be){let ze;for(ze=0;ze=Ae.length||ze>=Pe.length);++ze)Ae[ze+xe]=Pe[ze];return ze}function tt(Pe,Ae){return Pe instanceof Ae||null!=Pe&&null!=Pe.constructor&&null!=Pe.constructor.name&&Pe.constructor.name===Ae.name}function Xt(Pe){return Pe!=Pe}const ot=function(){const Pe="0123456789abcdef",Ae=new Array(256);for(let xe=0;xe<16;++xe){const Be=16*xe;for(let ze=0;ze<16;++ze)Ae[Be+ze]=Pe[xe]+Pe[ze]}return Ae}();function st(Pe){return typeof BigInt>"u"?$t:Pe}function $t(){throw new Error("BigInt not supported")}},94525:ne=>{ne.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},75834:(ne,a,y)=>{"use strict";var p=y(60399),C=y(55685),w=C(p("String.prototype.indexOf"));ne.exports=function(u,v){var g=p(u,!!v);return"function"==typeof g&&w(u,".prototype.")>-1?C(g):g}},55685:(ne,a,y)=>{"use strict";var p=y(84444),C=y(60399),w=C("%Function.prototype.apply%"),M=C("%Function.prototype.call%"),u=C("%Reflect.apply%",!0)||p.call(M,w),v=C("%Object.getOwnPropertyDescriptor%",!0),g=C("%Object.defineProperty%",!0),b=C("%Math.max%");if(g)try{g({},"a",{value:1})}catch{g=null}ne.exports=function(A){var R=u(p,M,arguments);v&&g&&(v(R,"length").configurable&&g(R,"length",{value:1+b(0,A.length-(arguments.length-1))}));return R};var I=function(){return u(p,w,arguments)};g?g(ne.exports,"apply",{value:I}):ne.exports.apply=I},60399:(ne,a,y)=>{"use strict";var p,C=SyntaxError,w=Function,M=TypeError,u=function(S){try{return w('"use strict"; return ('+S+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var g=function(){throw new M},b=v?function(){try{return arguments.callee,g}catch{try{return v(arguments,"callee").get}catch{return g}}}():g,I=y(92969)(),_=Object.getPrototypeOf||function(S){return S.__proto__},A={},R=typeof Uint8Array>"u"?p:_(Uint8Array),D={"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":I?_([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I?_(_([][Symbol.iterator]())):p,"%JSON%":"object"==typeof JSON?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I?p:_((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I?p:_((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I?_(""[Symbol.iterator]()):p,"%Symbol%":I?Symbol:p,"%SyntaxError%":C,"%ThrowTypeError%":b,"%TypedArray%":R,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet},T=function S(r){var s;if("%AsyncFunction%"===r)s=u("async function () {}");else if("%GeneratorFunction%"===r)s=u("function* () {}");else if("%AsyncGeneratorFunction%"===r)s=u("async function* () {}");else if("%AsyncGenerator%"===r){var d=S("%AsyncGeneratorFunction%");d&&(s=d.prototype)}else if("%AsyncIteratorPrototype%"===r){var h=S("%AsyncGenerator%");h&&(s=_(h.prototype))}return D[r]=s,s},F={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=y(84444),V=y(93164),j=L.call(Function.call,Array.prototype.concat),Z=L.call(Function.apply,Array.prototype.splice),Y=L.call(Function.call,String.prototype.replace),G=L.call(Function.call,String.prototype.slice),q=L.call(Function.call,RegExp.prototype.exec),X=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,z=function(r){var s=G(r,0,1),d=G(r,-1);if("%"===s&&"%"!==d)throw new C("invalid intrinsic syntax, expected closing `%`");if("%"===d&&"%"!==s)throw new C("invalid intrinsic syntax, expected opening `%`");var h=[];return Y(r,X,function(E,k,B,x){h[h.length]=B?Y(x,Q,"$1"):k||E}),h},$=function(r,s){var h,d=r;if(V(F,d)&&(d="%"+(h=F[d])[0]+"%"),V(D,d)){var E=D[d];if(E===A&&(E=T(d)),typeof E>"u"&&!s)throw new M("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:h,name:d,value:E}}throw new C("intrinsic "+r+" does not exist!")};ne.exports=function(r,s){if("string"!=typeof r||0===r.length)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof s)throw new M('"allowMissing" argument must be a boolean');if(null===q(/^%?[^%]*%?$/g,r))throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var d=z(r),h=d.length>0?d[0]:"",E=$("%"+h+"%",s),k=E.name,B=E.value,x=!1,f=E.alias;f&&(h=f[0],Z(d,j([0,1],f)));for(var P=1,se=!0;P=d.length){var Ce=v(B,te);B=(se=!!Ce)&&"get"in Ce&&!("originalValue"in Ce.get)?Ce.get:B[te]}else se=V(B,te),B=B[te];se&&!x&&(D[k]=B)}}return B}},53495:(ne,a,y)=>{y(37131).check("es5")},37131:(ne,a,y)=>{y(58690),ne.exports=y(21034)},27247:ne=>{var a=function(){this.tests={},this.cache={}};a.prototype={constructor:a,define:function(y,p){if("string"!=typeof y||!(p instanceof Function))throw new Error("Invalid capability definition.");if(this.tests[y])throw new Error('Duplicated capability definition by "'+y+'".');this.tests[y]=p},check:function(y){if(!this.test(y))throw new Error('The current environment does not support "'+y+'", therefore we cannot continue.')},test:function(y){if(void 0!==this.cache[y])return this.cache[y];if(!this.tests[y])throw new Error('Unknown capability with name "'+y+'".');var p=this.tests[y];return this.cache[y]=!!p(),this.cache[y]}},ne.exports=a},58690:(ne,a,y)=>{var p=y(21034),C=p.define,w=p.test;C("strict mode",function(){return void 0===this}),C("arguments.callee.caller",function(){try{return function(){return arguments.callee.caller}()===arguments.callee}catch{return!1}}),C("es5",function(){return w("Array.prototype.forEach")&&w("Array.prototype.map")&&w("Function.prototype.bind")&&w("Object.create")&&w("Object.defineProperties")&&w("Object.defineProperty")&&w("Object.prototype.hasOwnProperty")}),C("Array.prototype.forEach",function(){return Array.prototype.forEach}),C("Array.prototype.map",function(){return Array.prototype.map}),C("Function.prototype.bind",function(){return Function.prototype.bind}),C("Object.create",function(){return Object.create}),C("Object.defineProperties",function(){return Object.defineProperties}),C("Object.defineProperty",function(){return Object.defineProperty}),C("Object.prototype.hasOwnProperty",function(){return Object.prototype.hasOwnProperty}),C("Error.captureStackTrace",function(){return Error.captureStackTrace}),C("Error.prototype.stack",function(){try{throw new Error}catch(M){return M.stack||M.stacktrace}})},21034:(ne,a,y)=>{var C=new(y(27247)),w=function(M){return C.test(M)};w.define=function(M,u){C.define(M,u)},w.check=function(M){C.check(M)},w.test=w,ne.exports=w},83018:ne=>{var a={utf8:{stringToBytes:function(y){return a.bin.stringToBytes(unescape(encodeURIComponent(y)))},bytesToString:function(y){return decodeURIComponent(escape(a.bin.bytesToString(y)))}},bin:{stringToBytes:function(y){for(var p=[],C=0;C{var p=y(73502).Buffer,C=y(295).Transform,w=y(15453).s;function u(v){C.call(this),this.hashMode="string"==typeof v,this.hashMode?this[v]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}y(83894)(u,C),u.prototype.update=function(v,g,b){"string"==typeof v&&(v=p.from(v,g));var I=this._update(v);return this.hashMode?this:(b&&(I=this._toString(I,b)),I)},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(v,g,b){var I;try{this.hashMode?this._update(v):this.push(this._update(v))}catch(_){I=_}finally{b(I)}},u.prototype._flush=function(v){var g;try{this.push(this.__final())}catch(b){g=b}v(g)},u.prototype._finalOrDigest=function(v){var g=this.__final()||p.alloc(0);return v&&(g=this._toString(g,v,!0)),g},u.prototype._toString=function(v,g,b){if(this._decoder||(this._decoder=new w(g),this._encoding=g),this._encoding!==g)throw new Error("can't switch encodings");var I=this._decoder.write(v);return b&&(I+=this._decoder.end()),I},ne.exports=u},39448:(ne,a,y)=>{var p=y(72969).Writable,C=y(83894),w=y(58905);if(typeof Uint8Array>"u")var M=y(69830).U2;else M=Uint8Array;function u(D,T){if(!(this instanceof u))return new u(D,T);"function"==typeof D&&(T=D,D={}),D||(D={});var F=D.encoding,L=!1;F?("u8"===(F=String(F).toLowerCase())||"uint8"===F)&&(F="uint8array"):L=!0,p.call(this,{objectMode:!0}),this.encoding=F,this.shouldInferEncoding=L,T&&this.on("finish",function(){T(this.getBody())}),this.body=[]}ne.exports=u,C(u,p),u.prototype._write=function(D,T,F){this.body.push(D),F()},u.prototype.inferEncoding=function(D){var T=void 0===D?this.body[0]:D;return Buffer.isBuffer(T)?"buffer":typeof Uint8Array<"u"&&T instanceof Uint8Array?"uint8array":Array.isArray(T)?"array":"string"==typeof T?"string":"[object Object]"===Object.prototype.toString.call(T)?"object":"buffer"},u.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function A(D){for(var T=[],F=0;F{var a={}.toString;ne.exports=Array.isArray||function(y){return"[object Array]"==a.call(y)}},83308:(ne,a,y)=>{"use strict";var p=y(95857),C=Object.keys||function(R){var D=[];for(var T in R)D.push(T);return D};ne.exports=I;var w=Object.create(y(26156));w.inherits=y(83894);var M=y(58044),u=y(46615);w.inherits(I,M);for(var v=C(u.prototype),g=0;g{"use strict";ne.exports=w;var p=y(55446),C=Object.create(y(26156));function w(M){if(!(this instanceof w))return new w(M);p.call(this,M)}C.inherits=y(83894),C.inherits(w,p),w.prototype._transform=function(M,u,v){v(null,M)}},58044:(ne,a,y)=>{"use strict";var p=y(95857);ne.exports=Y;var w,C=y(77322);Y.ReadableState=Z;y(59069).EventEmitter;var u=function(ae,fe){return ae.listeners(fe).length},v=y(18228),g=y(11079).Buffer,b=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var A=Object.create(y(26156));A.inherits=y(83894);var R=y(53383),D=void 0;D=R&&R.debuglog?R.debuglog("stream"):function(){};var L,T=y(81054),F=y(8064);A.inherits(Y,v);var V=["error","close","destroy","pause","resume"];function Z(ae,fe){ae=ae||{};var pe=fe instanceof(w=w||y(83308));this.objectMode=!!ae.objectMode,pe&&(this.objectMode=this.objectMode||!!ae.readableObjectMode);var Ee=ae.highWaterMark,ce=ae.readableHighWaterMark,be=this.objectMode?16:16384;this.highWaterMark=Ee||0===Ee?Ee:pe&&(ce||0===ce)?ce:be,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,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=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(L||(L=y(95139).s),this.decoder=new L(ae.encoding),this.encoding=ae.encoding)}function Y(ae){if(w=w||y(83308),!(this instanceof Y))return new Y(ae);this._readableState=new Z(ae,this),this.readable=!0,ae&&("function"==typeof ae.read&&(this._read=ae.read),"function"==typeof ae.destroy&&(this._destroy=ae.destroy)),v.call(this)}function G(ae,fe,pe,Ee,ce){var Ne,be=ae._readableState;null===fe?(be.reading=!1,function r(ae,fe){if(!fe.ended){if(fe.decoder){var pe=fe.decoder.end();pe&&pe.length&&(fe.buffer.push(pe),fe.length+=fe.objectMode?1:pe.length)}fe.ended=!0,s(ae)}}(ae,be)):(ce||(Ne=function X(ae,fe){var pe;return!function _(ae){return g.isBuffer(ae)||ae instanceof b}(fe)&&"string"!=typeof fe&&void 0!==fe&&!ae.objectMode&&(pe=new TypeError("Invalid non-string/buffer chunk")),pe}(be,fe)),Ne?ae.emit("error",Ne):be.objectMode||fe&&fe.length>0?("string"!=typeof fe&&!be.objectMode&&Object.getPrototypeOf(fe)!==g.prototype&&(fe=function I(ae){return g.from(ae)}(fe)),Ee?be.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):q(ae,be,fe,!0):be.ended?ae.emit("error",new Error("stream.push() after EOF")):(be.reading=!1,be.decoder&&!pe?(fe=be.decoder.write(fe),be.objectMode||0!==fe.length?q(ae,be,fe,!1):h(ae,be)):q(ae,be,fe,!1))):Ee||(be.reading=!1));return function Q(ae){return!ae.ended&&(ae.needReadable||ae.lengthfe.highWaterMark&&(fe.highWaterMark=function $(ae){return ae>=z?ae=z:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}function s(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(D("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?p.nextTick(d,ae):d(ae))}function d(ae){D("emit readable"),ae.emit("readable"),P(ae)}function h(ae,fe){fe.readingMore||(fe.readingMore=!0,p.nextTick(E,ae,fe))}function E(ae,fe){for(var pe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length=fe.length?(pe=fe.decoder?fe.buffer.join(""):1===fe.buffer.length?fe.buffer.head.data:fe.buffer.concat(fe.length),fe.buffer.clear()):pe=function te(ae,fe,pe){var Ee;return aebe.length?be.length:ae;if(Ne===be.length?ce+=be:ce+=be.slice(0,ae),0===(ae-=Ne)){Ne===be.length?(++Ee,pe.next?fe.head=pe.next:fe.head=fe.tail=null):(fe.head=pe,pe.data=be.slice(Ne));break}++Ee}return fe.length-=Ee,ce}(ae,fe):function de(ae,fe){var pe=g.allocUnsafe(ae),Ee=fe.head,ce=1;for(Ee.data.copy(pe),ae-=Ee.data.length;Ee=Ee.next;){var be=Ee.data,Ne=ae>be.length?be.length:ae;if(be.copy(pe,pe.length-ae,0,Ne),0===(ae-=Ne)){Ne===be.length?(++ce,Ee.next?fe.head=Ee.next:fe.head=fe.tail=null):(fe.head=Ee,Ee.data=be.slice(Ne));break}++ce}return fe.length-=ce,pe}(ae,fe),Ee}(ae,fe.buffer,fe.decoder),pe);var pe}function Ce(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,p.nextTick(ye,fe,ae))}function ye(ae,fe){!ae.endEmitted&&0===ae.length&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function ve(ae,fe){for(var pe=0,Ee=ae.length;pe=fe.highWaterMark||fe.ended))return D("read: emitReadable",fe.length,fe.ended),0===fe.length&&fe.ended?Ce(this):s(this),null;if(0===(ae=S(ae,fe))&&fe.ended)return 0===fe.length&&Ce(this),null;var ce,Ee=fe.needReadable;return D("need readable",Ee),(0===fe.length||fe.length-ae0?se(ae,fe):null)?(fe.needReadable=!0,ae=0):fe.length-=ae,0===fe.length&&(fe.ended||(fe.needReadable=!0),pe!==ae&&fe.ended&&Ce(this)),null!==ce&&this.emit("data",ce),ce},Y.prototype._read=function(ae){this.emit("error",new Error("_read() is not implemented"))},Y.prototype.pipe=function(ae,fe){var pe=this,Ee=this._readableState;switch(Ee.pipesCount){case 0:Ee.pipes=ae;break;case 1:Ee.pipes=[Ee.pipes,ae];break;default:Ee.pipes.push(ae)}Ee.pipesCount+=1,D("pipe count=%d opts=%j",Ee.pipesCount,fe);var be=(!fe||!1!==fe.end)&&ae!==process.stdout&&ae!==process.stderr?Fe:st;function Ne($t,Pe){D("onunpipe"),$t===pe&&Pe&&!1===Pe.hasUnpiped&&(Pe.hasUnpiped=!0,function Ve(){D("cleanup"),ae.removeListener("close",Xt),ae.removeListener("finish",ot),ae.removeListener("drain",ct),ae.removeListener("error",tt),ae.removeListener("unpipe",Ne),pe.removeListener("end",Fe),pe.removeListener("end",st),pe.removeListener("data",$e),Ze=!0,Ee.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&&ct()}())}function Fe(){D("onend"),ae.end()}Ee.endEmitted?p.nextTick(be):pe.once("end",be),ae.on("unpipe",Ne);var ct=function k(ae){return function(){var fe=ae._readableState;D("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,0===fe.awaitDrain&&u(ae,"data")&&(fe.flowing=!0,P(ae))}}(pe);ae.on("drain",ct);var Ze=!1;var Ut=!1;function $e($t){D("ondata"),Ut=!1,!1===ae.write($t)&&!Ut&&((1===Ee.pipesCount&&Ee.pipes===ae||Ee.pipesCount>1&&-1!==ve(Ee.pipes,ae))&&!Ze&&(D("false write response, pause",Ee.awaitDrain),Ee.awaitDrain++,Ut=!0),pe.pause())}function tt($t){D("onerror",$t),st(),ae.removeListener("error",tt),0===u(ae,"error")&&ae.emit("error",$t)}function Xt(){ae.removeListener("finish",ot),st()}function ot(){D("onfinish"),ae.removeListener("close",Xt),st()}function st(){D("unpipe"),pe.unpipe(ae)}return pe.on("data",$e),function j(ae,fe,pe){if("function"==typeof ae.prependListener)return ae.prependListener(fe,pe);ae._events&&ae._events[fe]?C(ae._events[fe])?ae._events[fe].unshift(pe):ae._events[fe]=[pe,ae._events[fe]]:ae.on(fe,pe)}(ae,"error",tt),ae.once("close",Xt),ae.once("finish",ot),ae.emit("pipe",pe),Ee.flowing||(D("pipe resume"),pe.resume()),ae},Y.prototype.unpipe=function(ae){var fe=this._readableState,pe={hasUnpiped:!1};if(0===fe.pipesCount)return this;if(1===fe.pipesCount)return ae&&ae!==fe.pipes||(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,pe)),this;if(!ae){var Ee=fe.pipes,ce=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var be=0;be{"use strict";ne.exports=M;var p=y(83308),C=Object.create(y(26156));function w(g,b){var I=this._transformState;I.transforming=!1;var _=I.writecb;if(!_)return this.emit("error",new Error("write callback called multiple times"));I.writechunk=null,I.writecb=null,null!=b&&this.push(b),_(g);var A=this._readableState;A.reading=!1,(A.needReadable||A.length{"use strict";var p=y(95857);function w(x){var f=this;this.next=null,this.entry=null,this.finish=function(){!function B(x,f,P){var se=x.entry;for(x.entry=null;se;){var te=se.callback;f.pendingcb--,te(P),se=se.next}f.corkedRequestsFree.next=x}(f,x)}}ne.exports=V;var u,M=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:p.nextTick;V.WritableState=F;var v=Object.create(y(26156));v.inherits=y(83894);var g={deprecate:y(23532)},b=y(18228),I=y(11079).Buffer,_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var L,D=y(8064);function T(){}function F(x,f){u=u||y(83308),x=x||{};var P=f instanceof u;this.objectMode=!!x.objectMode,P&&(this.objectMode=this.objectMode||!!x.writableObjectMode);var se=x.highWaterMark,te=x.writableHighWaterMark,ie=this.objectMode?16:16384;this.highWaterMark=se||0===se?se:P&&(te||0===te)?te:ie,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 de=!1===x.decodeStrings;this.decodeStrings=!de,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ce){!function z(x,f){var P=x._writableState,se=P.sync,te=P.writecb;if(function Q(x){x.writing=!1,x.writecb=null,x.length-=x.writelen,x.writelen=0}(P),f)!function X(x,f,P,se,te){--f.pendingcb,P?(p.nextTick(te,se),p.nextTick(E,x,f),x._writableState.errorEmitted=!0,x.emit("error",se)):(te(se),x._writableState.errorEmitted=!0,x.emit("error",se),E(x,f))}(x,P,se,f,te);else{var ie=s(P);!ie&&!P.corked&&!P.bufferProcessing&&P.bufferedRequest&&r(x,P),se?M($,x,P,ie,te):$(x,P,ie,te)}}(f,Ce)},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 w(this)}function V(x){if(u=u||y(83308),!(L.call(V,this)||this instanceof u))return new V(x);this._writableState=new F(x,this),this.writable=!0,x&&("function"==typeof x.write&&(this._write=x.write),"function"==typeof x.writev&&(this._writev=x.writev),"function"==typeof x.destroy&&(this._destroy=x.destroy),"function"==typeof x.final&&(this._final=x.final)),b.call(this)}function q(x,f,P,se,te,ie,de){f.writelen=se,f.writecb=de,f.writing=!0,f.sync=!0,P?x._writev(te,f.onwrite):x._write(te,ie,f.onwrite),f.sync=!1}function $(x,f,P,se){P||function S(x,f){0===f.length&&f.needDrain&&(f.needDrain=!1,x.emit("drain"))}(x,f),f.pendingcb--,se(),E(x,f)}function r(x,f){f.bufferProcessing=!0;var P=f.bufferedRequest;if(x._writev&&P&&P.next){var se=f.bufferedRequestCount,te=new Array(se),ie=f.corkedRequestsFree;ie.entry=P;for(var de=0,Ce=!0;P;)te[de]=P,P.isBuf||(Ce=!1),P=P.next,de+=1;te.allBuffers=Ce,q(x,f,!0,f.length,te,"",ie.finish),f.pendingcb++,f.lastBufferedRequest=null,ie.next?(f.corkedRequestsFree=ie.next,ie.next=null):f.corkedRequestsFree=new w(f),f.bufferedRequestCount=0}else{for(;P;){var ye=P.chunk,ve=P.encoding,ae=P.callback;if(q(x,f,!1,f.objectMode?1:ye.length,ye,ve,ae),P=P.next,f.bufferedRequestCount--,f.writing)break}null===P&&(f.lastBufferedRequest=null)}f.bufferedRequest=P,f.bufferProcessing=!1}function s(x){return x.ending&&0===x.length&&null===x.bufferedRequest&&!x.finished&&!x.writing}function d(x,f){x._final(function(P){f.pendingcb--,P&&x.emit("error",P),f.prefinished=!0,x.emit("prefinish"),E(x,f)})}function E(x,f){var P=s(f);return P&&(function h(x,f){!f.prefinished&&!f.finalCalled&&("function"==typeof x._final?(f.pendingcb++,f.finalCalled=!0,p.nextTick(d,x,f)):(f.prefinished=!0,x.emit("prefinish")))}(x,f),0===f.pendingcb&&(f.finished=!0,x.emit("finish"))),P}v.inherits(V,b),F.prototype.getBuffer=function(){for(var f=this.bufferedRequest,P=[];f;)P.push(f),f=f.next;return P},function(){try{Object.defineProperty(F.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(x){return!!L.call(this,x)||this===V&&(x&&x._writableState instanceof F)}})):L=function(x){return x instanceof this},V.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},V.prototype.write=function(x,f,P){var se=this._writableState,te=!1,ie=!se.objectMode&&function R(x){return I.isBuffer(x)||x instanceof _}(x);return ie&&!I.isBuffer(x)&&(x=function A(x){return I.from(x)}(x)),"function"==typeof f&&(P=f,f=null),ie?f="buffer":f||(f=se.defaultEncoding),"function"!=typeof P&&(P=T),se.ended?function j(x,f){var P=new Error("write after end");x.emit("error",P),p.nextTick(f,P)}(this,P):(ie||function Z(x,f,P,se){var te=!0,ie=!1;return null===P?ie=new TypeError("May not write null values to stream"):"string"!=typeof P&&void 0!==P&&!f.objectMode&&(ie=new TypeError("Invalid non-string/buffer chunk")),ie&&(x.emit("error",ie),p.nextTick(se,ie),te=!1),te}(this,se,x,P))&&(se.pendingcb++,te=function G(x,f,P,se,te,ie){if(!P){var de=function Y(x,f,P){return!x.objectMode&&!1!==x.decodeStrings&&"string"==typeof f&&(f=I.from(f,P)),f}(f,se,te);se!==de&&(P=!0,te="buffer",se=de)}var Ce=f.objectMode?1:se.length;f.length+=Ce;var ye=f.length-1))throw new TypeError("Unknown encoding: "+f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),V.prototype._write=function(x,f,P){P(new Error("_write() is not implemented"))},V.prototype._writev=null,V.prototype.end=function(x,f,P){var se=this._writableState;"function"==typeof x?(P=x,x=null,f=null):"function"==typeof f&&(P=f,f=null),null!=x&&this.write(x,f),se.corked&&(se.corked=1,this.uncork()),se.ending||function k(x,f,P){f.ending=!0,E(x,f),P&&(f.finished?p.nextTick(P):x.once("finish",P)),f.ended=!0,x.writable=!1}(this,se,P)},Object.defineProperty(V.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(x){this._writableState&&(this._writableState.destroyed=x)}}),V.prototype.destroy=D.destroy,V.prototype._undestroy=D.undestroy,V.prototype._destroy=function(x,f){this.end(),f(x)}},81054:(ne,a,y)=>{"use strict";var C=y(11079).Buffer,w=y(7716);function M(u,v,g){u.copy(v,g)}ne.exports=function(){function u(){(function p(u,v){if(!(u instanceof v))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(g){var b={data:g,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},u.prototype.unshift=function(g){var b={data:g,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},u.prototype.shift=function(){if(0!==this.length){var g=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,g}},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(g){if(0===this.length)return"";for(var b=this.head,I=""+b.data;b=b.next;)I+=g+b.data;return I},u.prototype.concat=function(g){if(0===this.length)return C.alloc(0);for(var b=C.allocUnsafe(g>>>0),I=this.head,_=0;I;)M(I.data,b,_),_+=I.data.length,I=I.next;return b},u}(),w&&w.inspect&&w.inspect.custom&&(ne.exports.prototype[w.inspect.custom]=function(){var u=w.inspect({length:this.length});return this.constructor.name+" "+u})},8064:(ne,a,y)=>{"use strict";var p=y(95857);function M(u,v){u.emit("error",v)}ne.exports={destroy:function C(u,v){var g=this,b=this._readableState&&this._readableState.destroyed,I=this._writableState&&this._writableState.destroyed;return b||I?(v?v(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(M,this,u)):p.nextTick(M,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(_){!v&&_?g._writableState?g._writableState.errorEmitted||(g._writableState.errorEmitted=!0,p.nextTick(M,g,_)):p.nextTick(M,g,_):v&&v(_)}),this)},undestroy:function w(){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)}}},18228:(ne,a,y)=>{ne.exports=y(59069).EventEmitter},72969:(ne,a,y)=>{(a=ne.exports=y(58044)).Stream=a,a.Readable=a,a.Writable=y(46615),a.Duplex=y(83308),a.Transform=y(55446),a.PassThrough=y(60757)},11079:(ne,a,y)=>{var p=y(93172),C=p.Buffer;function w(u,v){for(var g in u)v[g]=u[g]}function M(u,v,g){return C(u,v,g)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?ne.exports=p:(w(p,a),a.Buffer=M),w(C,M),M.from=function(u,v,g){if("number"==typeof u)throw new TypeError("Argument must not be a number");return C(u,v,g)},M.alloc=function(u,v,g){if("number"!=typeof u)throw new TypeError("Argument must be a number");var b=C(u);return void 0!==v?"string"==typeof g?b.fill(v,g):b.fill(v):b.fill(0),b},M.allocUnsafe=function(u){if("number"!=typeof u)throw new TypeError("Argument must be a number");return C(u)},M.allocUnsafeSlow=function(u){if("number"!=typeof u)throw new TypeError("Argument must be a number");return p.SlowBuffer(u)}},95139:(ne,a,y)=>{"use strict";var p=y(11079).Buffer,C=p.isEncoding||function(j){switch((j=""+j)&&j.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(j){var Z;switch(this.encoding=function M(j){var Z=function w(j){if(!j)return"utf8";for(var Z;;)switch(j){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return j;default:if(Z)return;j=(""+j).toLowerCase(),Z=!0}}(j);if("string"!=typeof Z&&(p.isEncoding===C||!C(j)))throw new Error("Unknown encoding: "+j);return Z||j}(j),this.encoding){case"utf16le":this.text=R,this.end=D,Z=4;break;case"utf8":this.fillLast=I,Z=4;break;case"base64":this.text=T,this.end=F,Z=3;break;default:return this.write=L,void(this.end=V)}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(Z)}function v(j){return j<=127?0:j>>5==6?2:j>>4==14?3:j>>3==30?4:j>>6==2?-1:-2}function I(j){var Z=this.lastTotal-this.lastNeed,Y=function b(j,Z,Y){if(128!=(192&Z[0]))return j.lastNeed=0,"\ufffd";if(j.lastNeed>1&&Z.length>1){if(128!=(192&Z[1]))return j.lastNeed=1,"\ufffd";if(j.lastNeed>2&&Z.length>2&&128!=(192&Z[2]))return j.lastNeed=2,"\ufffd"}}(this,j);return void 0!==Y?Y:this.lastNeed<=j.length?(j.copy(this.lastChar,Z,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(j.copy(this.lastChar,Z,0,j.length),void(this.lastNeed-=j.length))}function R(j,Z){if((j.length-Z)%2==0){var Y=j.toString("utf16le",Z);if(Y){var G=Y.charCodeAt(Y.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1],Y.slice(0,-1)}return Y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=j[j.length-1],j.toString("utf16le",Z,j.length-1)}function D(j){var Z=j&&j.length?this.write(j):"";if(this.lastNeed){var Y=this.lastTotal-this.lastNeed;return Z+this.lastChar.toString("utf16le",0,Y)}return Z}function T(j,Z){var Y=(j.length-Z)%3;return 0===Y?j.toString("base64",Z):(this.lastNeed=3-Y,this.lastTotal=3,1===Y?this.lastChar[0]=j[j.length-1]:(this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1]),j.toString("base64",Z,j.length-Y))}function F(j){var Z=j&&j.length?this.write(j):"";return this.lastNeed?Z+this.lastChar.toString("base64",0,3-this.lastNeed):Z}function L(j){return j.toString(this.encoding)}function V(j){return j&&j.length?this.write(j):""}a.s=u,u.prototype.write=function(j){if(0===j.length)return"";var Z,Y;if(this.lastNeed){if(void 0===(Z=this.fillLast(j)))return"";Y=this.lastNeed,this.lastNeed=0}else Y=0;return Y=0?(q>0&&(j.lastNeed=q-1),q):--G=0?(q>0&&(j.lastNeed=q-2),q):--G=0?(q>0&&(2===q?q=0:j.lastNeed=q-3),q):0))}(this,j,Z);if(!this.lastNeed)return j.toString("utf8",Z);this.lastTotal=Y;var G=j.length-(Y-this.lastNeed);return j.copy(this.lastChar,0,G),j.toString("utf8",Z,G)},u.prototype.fillLast=function(j){if(this.lastNeed<=j.length)return j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,j.length),this.lastNeed-=j.length}},89093:(ne,a,y)=>{"use strict";var p=y(43675),C={"text/plain":"Text","text/html":"Url",default:"Text"},w="Copy to clipboard: #{key}, Enter";ne.exports=function u(v,g){var b,I,_,A,R,D,T=!1;g||(g={}),b=g.debug||!1;try{if(_=p(),A=document.createRange(),R=document.getSelection(),(D=document.createElement("span")).textContent=v,D.ariaHidden="true",D.style.all="unset",D.style.position="fixed",D.style.top=0,D.style.clip="rect(0, 0, 0, 0)",D.style.whiteSpace="pre",D.style.webkitUserSelect="text",D.style.MozUserSelect="text",D.style.msUserSelect="text",D.style.userSelect="text",D.addEventListener("copy",function(L){if(L.stopPropagation(),g.format)if(L.preventDefault(),typeof L.clipboardData>"u"){b&&console.warn("unable to use e.clipboardData"),b&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var V=C[g.format]||C.default;window.clipboardData.setData(V,v)}else L.clipboardData.clearData(),L.clipboardData.setData(g.format,v);g.onCopy&&(L.preventDefault(),g.onCopy(L.clipboardData))}),document.body.appendChild(D),A.selectNodeContents(D),R.addRange(A),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");T=!0}catch(L){b&&console.error("unable to copy using execCommand: ",L),b&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(g.format||"text",v),g.onCopy&&g.onCopy(window.clipboardData),T=!0}catch(V){b&&console.error("unable to copy using clipboardData: ",V),b&&console.error("falling back to prompt"),I=function M(v){var g=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return v.replace(/#{\s*key\s*}/g,g)}("message"in g?g.message:w),window.prompt(I,v)}}finally{R&&("function"==typeof R.removeRange?R.removeRange(A):R.removeAllRanges()),D&&document.body.removeChild(D),_()}return T}},26156:(ne,a,y)=>{function F(L){return Object.prototype.toString.call(L)}a.isArray=function p(L){return Array.isArray?Array.isArray(L):"[object Array]"===F(L)},a.isBoolean=function C(L){return"boolean"==typeof L},a.isNull=function w(L){return null===L},a.isNullOrUndefined=function M(L){return null==L},a.isNumber=function u(L){return"number"==typeof L},a.isString=function v(L){return"string"==typeof L},a.isSymbol=function g(L){return"symbol"==typeof L},a.isUndefined=function b(L){return void 0===L},a.isRegExp=function I(L){return"[object RegExp]"===F(L)},a.isObject=function _(L){return"object"==typeof L&&null!==L},a.isDate=function A(L){return"[object Date]"===F(L)},a.isError=function R(L){return"[object Error]"===F(L)||L instanceof Error},a.isFunction=function D(L){return"function"==typeof L},a.isPrimitive=function T(L){return null===L||"boolean"==typeof L||"number"==typeof L||"string"==typeof L||"symbol"==typeof L||typeof L>"u"},a.isBuffer=y(93172).Buffer.isBuffer},74746:(ne,a,y)=>{var p=y(57715),C=y(46422);ne.exports=function(g){return new M(g)};var w={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function M(v){this.curveType=w[v],this.curveType||(this.curveType={name:v}),this.curve=new p.ec(this.curveType.name),this.keys=void 0}function u(v,g,b){Array.isArray(v)||(v=v.toArray());var I=new Buffer(v);if(b&&I.length=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},96386:(ne,a,y)=>{"use strict";var p=y(83894),C=y(8095),w=y(75634),M=y(95244),u=y(61052);function v(g){u.call(this,"digest"),this._hash=g}p(v,u),v.prototype._update=function(g){this._hash.update(g)},v.prototype._final=function(){return this._hash.digest()},ne.exports=function(b){return"md5"===(b=b.toLowerCase())?new C:"rmd160"===b||"ripemd160"===b?new w:new v(M(b))}},55640:(ne,a,y)=>{var p=y(8095);ne.exports=function(C){return(new p).update(C).digest()}},74529:(ne,a,y)=>{"use strict";var p=y(83894),C=y(7309),w=y(61052),M=y(73502).Buffer,u=y(55640),v=y(75634),g=y(95244),b=M.alloc(128);function I(_,A){w.call(this,"digest"),"string"==typeof A&&(A=M.from(A));var R="sha512"===_||"sha384"===_?128:64;(this._alg=_,this._key=A,A.length>R)?A=("rmd160"===_?new v:g(_)).update(A).digest():A.length{"use strict";var p=y(83894),C=y(73502).Buffer,w=y(61052),M=C.alloc(128),u=64;function v(g,b){w.call(this,"digest"),"string"==typeof b&&(b=C.from(b)),this._alg=g,this._key=b,b.length>u?b=g(b):b.length{var a,y;a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y={rotl:function(p,C){return p<>>32-C},rotr:function(p,C){return p<<32-C|p>>>C},endian:function(p){if(p.constructor==Number)return 16711935&y.rotl(p,8)|4278255360&y.rotl(p,24);for(var C=0;C0;p--)C.push(Math.floor(256*Math.random()));return C},bytesToWords:function(p){for(var C=[],w=0,M=0;w>>5]|=p[w]<<24-M%32;return C},wordsToBytes:function(p){for(var C=[],w=0;w<32*p.length;w+=8)C.push(p[w>>>5]>>>24-w%32&255);return C},bytesToHex:function(p){for(var C=[],w=0;w>>4).toString(16)),C.push((15&p[w]).toString(16));return C.join("")},hexToBytes:function(p){for(var C=[],w=0;w>>6*(3-u)&63)):C.push("=");return C.join("")},base64ToBytes:function(p){p=p.replace(/[^A-Z0-9+\/]/gi,"");for(var C=[],w=0,M=0;w>>6-2*M);return C}},ne.exports=y},41348:(ne,a,y)=>{"use strict";a.randomBytes=a.rng=a.pseudoRandomBytes=a.prng=y(53753),a.createHash=a.Hash=y(96386),a.createHmac=a.Hmac=y(74529);var p=y(87793),C=Object.keys(p),w=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(C);a.getHashes=function(){return w};var M=y(99357);a.pbkdf2=M.pbkdf2,a.pbkdf2Sync=M.pbkdf2Sync;var u=y(55255);a.Cipher=u.Cipher,a.createCipher=u.createCipher,a.Cipheriv=u.Cipheriv,a.createCipheriv=u.createCipheriv,a.Decipher=u.Decipher,a.createDecipher=u.createDecipher,a.Decipheriv=u.Decipheriv,a.createDecipheriv=u.createDecipheriv,a.getCiphers=u.getCiphers,a.listCiphers=u.listCiphers;var v=y(98829);a.DiffieHellmanGroup=v.DiffieHellmanGroup,a.createDiffieHellmanGroup=v.createDiffieHellmanGroup,a.getDiffieHellman=v.getDiffieHellman,a.createDiffieHellman=v.createDiffieHellman,a.DiffieHellman=v.DiffieHellman;var g=y(3923);a.createSign=g.createSign,a.Sign=g.Sign,a.createVerify=g.createVerify,a.Verify=g.Verify,a.createECDH=y(74746);var b=y(63701);a.publicEncrypt=b.publicEncrypt,a.privateEncrypt=b.privateEncrypt,a.publicDecrypt=b.publicDecrypt,a.privateDecrypt=b.privateDecrypt;var I=y(14275);a.randomFill=I.randomFill,a.randomFillSync=I.randomFillSync,a.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},a.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},12761:ne=>{"use strict";var a="%[a-f0-9]{2}",y=new RegExp("("+a+")|([^%]+?)","gi"),p=new RegExp("("+a+")+","gi");function C(u,v){try{return[decodeURIComponent(u.join(""))]}catch{}if(1===u.length)return u;v=v||1;var g=u.slice(0,v),b=u.slice(v);return Array.prototype.concat.call([],C(g),C(b))}function w(u){try{return decodeURIComponent(u)}catch{for(var v=u.match(y)||[],g=1;g{var p=y(26788),C=y(30826).NI;function w(M){C.call(this,"string"==typeof M?M:""),this._db=void 0,this._operations=[]}p.inherits(w,C),w.prototype.setDb=function(M){this._db=M,this._operations.forEach(function(u){M[u.method].apply(M,u.args)})},w.prototype._open=function(M,u){return process.nextTick(u)},w.prototype._operation=function(M,u){if(this._db)return this._db[M].apply(this._db,u);this._operations.push({method:M,args:u})},"put get del batch approximateSize".split(" ").forEach(function(M){w.prototype["_"+M]=function(){this._operation(M,arguments)}}),w.prototype._isBuffer=function(M){return Buffer.isBuffer(M)},w.prototype._iterator=function(){throw new TypeError("not implemented")},ne.exports=w},89176:ne=>{"use strict";function y(C,w){if("function"!=typeof C)throw new TypeError("argument fn must be a function");return C}function p(C,w,M){if(!C||"object"!=typeof C&&"function"!=typeof C)throw new TypeError("argument obj must be object");var u=Object.getOwnPropertyDescriptor(C,w);if(!u)throw new TypeError("must call property on owner object");if(!u.configurable)throw new TypeError("property must be configurable")}ne.exports=function a(C){if(!C)throw new TypeError("argument namespace is required");function w(M){}return w._file=void 0,w._ignored=!0,w._namespace=C,w._traced=!1,w._warned=Object.create(null),w.function=y,w.property=p,w}},73684:(ne,a,y)=>{"use strict";a.utils=y(77451),a.Cipher=y(38170),a.DES=y(4631),a.CBC=y(79454),a.EDE=y(21862)},79454:(ne,a,y)=>{"use strict";var p=y(32391),C=y(83894),w={};function M(v){p.equal(v.length,8,"Invalid IV length"),this.iv=new Array(8);for(var g=0;g{"use strict";var p=y(32391);function C(w){this.options=w,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}ne.exports=C,C.prototype._init=function(){},C.prototype.update=function(M){return 0===M.length?[]:"decrypt"===this.type?this._updateDecrypt(M):this._updateEncrypt(M)},C.prototype._buffer=function(M,u){for(var v=Math.min(this.buffer.length-this.bufferOff,M.length-u),g=0;g0;g--)u+=this._buffer(M,u),v+=this._flushBuffer(b,v);return u+=this._buffer(M,u),b},C.prototype.final=function(M){var u,v;return M&&(u=this.update(M)),v="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),u?u.concat(v):v},C.prototype._pad=function(M,u){if(0===u)return!1;for(;u{"use strict";var p=y(32391),C=y(83894),w=y(77451),M=y(38170);function u(){this.tmp=new Array(2),this.keys=null}function v(b){M.call(this,b);var I=new u;this._desState=I,this.deriveKeys(I,b.key)}C(v,M),ne.exports=v,v.create=function(I){return new v(I)};var g=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];v.prototype.deriveKeys=function(I,_){I.keys=new Array(32),p.equal(_.length,this.blockSize,"Invalid key length");var A=w.readUInt32BE(_,0),R=w.readUInt32BE(_,4);w.pc1(A,R,I.tmp,0),A=I.tmp[0],R=I.tmp[1];for(var D=0;D>>1];A=w.r28shl(A,T),R=w.r28shl(R,T),w.pc2(A,R,I.keys,D)}},v.prototype._update=function(I,_,A,R){var D=this._desState,T=w.readUInt32BE(I,_),F=w.readUInt32BE(I,_+4);w.ip(T,F,D.tmp,0),T=D.tmp[0],F=D.tmp[1],"encrypt"===this.type?this._encrypt(D,T,F,D.tmp,0):this._decrypt(D,T,F,D.tmp,0),T=D.tmp[0],F=D.tmp[1],w.writeUInt32BE(A,T,R),w.writeUInt32BE(A,F,R+4)},v.prototype._pad=function(I,_){for(var A=I.length-_,R=_;R>>0,T=G}w.rip(F,T,R,D)},v.prototype._decrypt=function(I,_,A,R,D){for(var T=A,F=_,L=I.keys.length-2;L>=0;L-=2){var V=I.keys[L],j=I.keys[L+1];w.expand(T,I.tmp,0),V^=I.tmp[0],j^=I.tmp[1];var Z=w.substitute(V,j),G=T;T=(F^w.permute(Z))>>>0,F=G}w.rip(T,F,R,D)}},21862:(ne,a,y)=>{"use strict";var p=y(32391),C=y(83894),w=y(38170),M=y(4631);function u(g,b){p.equal(b.length,24,"Invalid key length");var I=b.slice(0,8),_=b.slice(8,16),A=b.slice(16,24);this.ciphers="encrypt"===g?[M.create({type:"encrypt",key:I}),M.create({type:"decrypt",key:_}),M.create({type:"encrypt",key:A})]:[M.create({type:"decrypt",key:A}),M.create({type:"encrypt",key:_}),M.create({type:"decrypt",key:I})]}function v(g){w.call(this,g);var b=new u(this.type,this.options.key);this._edeState=b}C(v,w),ne.exports=v,v.create=function(b){return new v(b)},v.prototype._update=function(b,I,_,A){var R=this._edeState;R.ciphers[0]._update(b,I,_,A),R.ciphers[1]._update(_,A,_,A),R.ciphers[2]._update(_,A,_,A)},v.prototype._pad=M.prototype._pad,v.prototype._unpad=M.prototype._unpad},77451:(ne,a)=>{"use strict";a.readUInt32BE=function(M,u){return(M[0+u]<<24|M[1+u]<<16|M[2+u]<<8|M[3+u])>>>0},a.writeUInt32BE=function(M,u,v){M[0+v]=u>>>24,M[1+v]=u>>>16&255,M[2+v]=u>>>8&255,M[3+v]=255&u},a.ip=function(M,u,v,g){for(var b=0,I=0,_=6;_>=0;_-=2){for(var A=0;A<=24;A+=8)b<<=1,b|=u>>>A+_&1;for(A=0;A<=24;A+=8)b<<=1,b|=M>>>A+_&1}for(_=6;_>=0;_-=2){for(A=1;A<=25;A+=8)I<<=1,I|=u>>>A+_&1;for(A=1;A<=25;A+=8)I<<=1,I|=M>>>A+_&1}v[g+0]=b>>>0,v[g+1]=I>>>0},a.rip=function(M,u,v,g){for(var b=0,I=0,_=0;_<4;_++)for(var A=24;A>=0;A-=8)b<<=1,b|=u>>>A+_&1,b<<=1,b|=M>>>A+_&1;for(_=4;_<8;_++)for(A=24;A>=0;A-=8)I<<=1,I|=u>>>A+_&1,I<<=1,I|=M>>>A+_&1;v[g+0]=b>>>0,v[g+1]=I>>>0},a.pc1=function(M,u,v,g){for(var b=0,I=0,_=7;_>=5;_--){for(var A=0;A<=24;A+=8)b<<=1,b|=u>>A+_&1;for(A=0;A<=24;A+=8)b<<=1,b|=M>>A+_&1}for(A=0;A<=24;A+=8)b<<=1,b|=u>>A+_&1;for(_=1;_<=3;_++){for(A=0;A<=24;A+=8)I<<=1,I|=u>>A+_&1;for(A=0;A<=24;A+=8)I<<=1,I|=M>>A+_&1}for(A=0;A<=24;A+=8)I<<=1,I|=M>>A+_&1;v[g+0]=b>>>0,v[g+1]=I>>>0},a.r28shl=function(M,u){return M<>>28-u};var y=[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];a.pc2=function(M,u,v,g){for(var b=0,I=0,_=y.length>>>1,A=0;A<_;A++)b<<=1,b|=M>>>y[A]&1;for(A=_;A>>y[A]&1;v[g+0]=b>>>0,v[g+1]=I>>>0},a.expand=function(M,u,v){var g=0,b=0;g=(1&M)<<5|M>>>27;for(var I=23;I>=15;I-=4)g<<=6,g|=M>>>I&63;for(I=11;I>=3;I-=4)b|=M>>>I&63,b<<=6;b|=(31&M)<<1|M>>>31,u[v+0]=g>>>0,u[v+1]=b>>>0};var p=[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];a.substitute=function(M,u){for(var v=0,g=0;g<4;g++){v<<=4,v|=p[64*g+(M>>>18-6*g&63)]}for(g=0;g<4;g++){v<<=4,v|=p[256+64*g+(u>>>18-6*g&63)]}return v>>>0};var C=[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];a.permute=function(M){for(var u=0,v=0;v>>C[v]&1;return u>>>0},a.padSplit=function(M,u,v){for(var g=M.toString(2);g.length{var p=y(85563),C=y(29799),w=y(21419);var u={binary:!0,hex:!0,base64:!0};a.DiffieHellmanGroup=a.createDiffieHellmanGroup=a.getDiffieHellman=function M(g){var b=new Buffer(C[g].prime,"hex"),I=new Buffer(C[g].gen,"hex");return new w(b,I)},a.createDiffieHellman=a.DiffieHellman=function v(g,b,I,_){return Buffer.isBuffer(b)||void 0===u[b]?v(g,"binary",b,I):(b=b||"binary",_=_||"binary",I=I||new Buffer([2]),Buffer.isBuffer(I)||(I=new Buffer(I,_)),"number"==typeof g?new w(p(g,I),I,!0):(Buffer.isBuffer(g)||(g=new Buffer(g,b)),new w(g,I,!0)))}},21419:(ne,a,y)=>{var p=y(88313),w=new(y(17079)),M=new p(24),u=new p(11),v=new p(10),g=new p(3),b=new p(7),I=y(85563),_=y(53753);function A(V,j){return j=j||"utf8",Buffer.isBuffer(V)||(V=new Buffer(V,j)),this._pub=new p(V),this}function R(V,j){return j=j||"utf8",Buffer.isBuffer(V)||(V=new Buffer(V,j)),this._priv=new p(V),this}ne.exports=F;var D={};function F(V,j,Z){this.setGenerator(j),this.__prime=new p(V),this._prime=p.mont(this.__prime),this._primeLen=V.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,Z?(this.setPublicKey=A,this.setPrivateKey=R):this._primeCode=8}function L(V,j){var Z=new Buffer(V.toArray());return j?Z.toString(j):Z}Object.defineProperty(F.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function T(V,j){var Z=j.toString("hex"),Y=[Z,V.toString(16)].join("_");if(Y in D)return D[Y];var q,G=0;if(V.isEven()||!I.simpleSieve||!I.fermatTest(V)||!w.test(V))return G+=1,G+="02"===Z||"05"===Z?8:4,D[Y]=G,G;switch(w.test(V.shrn(1))||(G+=2),Z){case"02":V.mod(M).cmp(u)&&(G+=8);break;case"05":(q=V.mod(v)).cmp(g)&&q.cmp(b)&&(G+=8);break;default:G+=4}return D[Y]=G,G}(this.__prime,this.__gen)),this._primeCode}}),F.prototype.generateKeys=function(){return this._priv||(this._priv=new p(_(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},F.prototype.computeSecret=function(V){var j=(V=(V=new p(V)).toRed(this._prime)).redPow(this._priv).fromRed(),Z=new Buffer(j.toArray()),Y=this.getPrime();if(Z.length{var p=y(53753);ne.exports=G,G.simpleSieve=Z,G.fermatTest=Y;var C=y(88313),w=new C(24),u=new(y(17079)),v=new C(1),g=new C(2),b=new C(5),A=(new C(16),new C(8),new C(10)),R=new C(3),T=(new C(7),new C(11)),F=new C(4),V=(new C(12),null);function Z(q){for(var X=function j(){if(null!==V)return V;var X=[];X[0]=2;for(var Q=1,z=3;z<1048576;z+=2){for(var $=Math.ceil(Math.sqrt(z)),S=0;Sq;)Q.ishrn(1);if(Q.isEven()&&Q.iadd(v),Q.testn(1)||Q.iadd(g),X.cmp(g)){if(!X.cmp(b))for(;Q.mod(A).cmp(R);)Q.iadd(F)}else for(;Q.mod(w).cmp(T);)Q.iadd(F);if(Z(z=Q.shrn(1))&&Z(Q)&&Y(z)&&Y(Q)&&u.test(z)&&u.test(Q))return Q}}},88313:function(ne,a,y){(function(p,C){"use strict";function w(S,r){if(!S)throw new Error(r||"Assertion failed")}function M(S,r){S.super_=r;var s=function(){};s.prototype=r.prototype,S.prototype=new s,S.prototype.constructor=S}function u(S,r,s){if(u.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,null!==S&&(("le"===r||"be"===r)&&(s=r,r=10),this._init(S||0,r||10,s||"be"))}var v;"object"==typeof p?p.exports=u:C.BN=u,u.BN=u,u.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:y(7748).Buffer}catch{}function g(S,r){var s=S.charCodeAt(r);return s>=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},74901:ne=>{"use strict";var a={single_source_shortest_paths:function(y,p,C){var w={},M={};M[p]=0;var v,g,b,I,_,R,D,u=a.PriorityQueue.make();for(u.push(p,0);!u.empty();)for(b in g=(v=u.pop()).value,I=v.cost,_=y[g]||{})_.hasOwnProperty(b)&&(R=I+_[b],D=M[b],(typeof M[b]>"u"||D>R)&&(M[b]=R,u.push(b,R),w[b]=g));if(typeof C<"u"&&typeof M[C]>"u"){var F=["Could not find a path from ",p," to ",C,"."].join("");throw new Error(F)}return w},extract_shortest_path_from_predecessor_list:function(y,p){for(var C=[],w=p;w;)C.push(w),y[w],w=y[w];return C.reverse(),C},find_path:function(y,p,C){var w=a.single_source_shortest_paths(y,p,C);return a.extract_shortest_path_from_predecessor_list(w,C)},PriorityQueue:{make:function(y){var w,p=a.PriorityQueue,C={};for(w in y=y||{},p)p.hasOwnProperty(w)&&(C[w]=p[w]);return C.queue=[],C.sorter=y.sorter||p.default_sorter,C},default_sorter:function(y,p){return y.cost-p.cost},push:function(y,p){var C={value:y,cost:p};this.queue.push(C),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};ne.exports=a},57715:(ne,a,y)=>{"use strict";var p=a;p.version=y(18597).i8,p.utils=y(61970),p.rand=y(37950),p.curve=y(46270),p.curves=y(52916),p.ec=y(67626),p.eddsa=y(81885)},97902:(ne,a,y)=>{"use strict";var p=y(17433),C=y(61970),w=C.getNAF,M=C.getJSF,u=C.assert;function v(b,I){this.type=b,this.p=new p(I.p,16),this.red=I.prime?p.red(I.prime):p.mont(this.p),this.zero=new p(0).toRed(this.red),this.one=new p(1).toRed(this.red),this.two=new p(2).toRed(this.red),this.n=I.n&&new p(I.n,16),this.g=I.g&&this.pointFromJSON(I.g,I.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 _=this.n&&this.p.div(this.n);!_||_.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function g(b,I){this.curve=b,this.type=I,this.precomputed=null}ne.exports=v,v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(I,_){u(I.precomputed);var A=I._getDoubles(),R=w(_,1,this._bitLength),D=(1<=F;V--)L=(L<<1)+R[V];T.push(L)}for(var j=this.jpoint(null,null,null),Z=this.jpoint(null,null,null),Y=D;Y>0;Y--){for(F=0;F=0;L--){for(var V=0;L>=0&&0===T[L];L--)V++;if(L>=0&&V++,F=F.dblp(V),L<0)break;var j=T[L];u(0!==j),F="affine"===I.type?j>0?F.mixedAdd(D[j-1>>1]):F.mixedAdd(D[-j-1>>1].neg()):j>0?F.add(D[j-1>>1]):F.add(D[-j-1>>1].neg())}return"affine"===I.type?F.toP():F},v.prototype._wnafMulAdd=function(I,_,A,R,D){var j,Z,Y,T=this._wnafT1,F=this._wnafT2,L=this._wnafT3,V=0;for(j=0;j=1;j-=2){var q=j-1,X=j;if(1===T[q]&&1===T[X]){var Q=[_[q],null,null,_[X]];0===_[q].y.cmp(_[X].y)?(Q[1]=_[q].add(_[X]),Q[2]=_[q].toJ().mixedAdd(_[X].neg())):0===_[q].y.cmp(_[X].y.redNeg())?(Q[1]=_[q].toJ().mixedAdd(_[X]),Q[2]=_[q].add(_[X].neg())):(Q[1]=_[q].toJ().mixedAdd(_[X]),Q[2]=_[q].toJ().mixedAdd(_[X].neg()));var z=[-3,-1,-5,-7,0,7,5,1,3],$=M(A[q],A[X]);for(V=Math.max($[0].length,V),L[q]=new Array(V),L[X]=new Array(V),Z=0;Z=0;j--){for(var h=0;j>=0;){var E=!0;for(Z=0;Z=0&&h++,s=s.dblp(h),j<0)break;for(Z=0;Z0?Y=F[Z][k-1>>1]:k<0&&(Y=F[Z][-k-1>>1].neg()),s="affine"===Y.type?s.mixedAdd(Y):s.add(Y))}}for(j=0;j=Math.ceil((I.bitLength()+1)/_.step)},g.prototype._getDoubles=function(I,_){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var A=[this],R=this,D=0;D<_;D+=I){for(var T=0;T{"use strict";var p=y(61970),C=y(17433),w=y(83894),M=y(97902),u=p.assert;function v(b){this.twisted=1!=(0|b.a),this.mOneA=this.twisted&&-1==(0|b.a),this.extended=this.mOneA,M.call(this,"edwards",b),this.a=new C(b.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new C(b.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new C(b.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|b.c)}function g(b,I,_,A,R){M.BasePoint.call(this,b,"projective"),null===I&&null===_&&null===A?(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 C(I,16),this.y=new C(_,16),this.z=A?new C(A,16):this.curve.one,this.t=R&&new C(R,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()))))}w(v,M),ne.exports=v,v.prototype._mulA=function(I){return this.mOneA?I.redNeg():this.a.redMul(I)},v.prototype._mulC=function(I){return this.oneC?I:this.c.redMul(I)},v.prototype.jpoint=function(I,_,A,R){return this.point(I,_,A,R)},v.prototype.pointFromX=function(I,_){(I=new C(I,16)).red||(I=I.toRed(this.red));var A=I.redSqr(),R=this.c2.redSub(this.a.redMul(A)),D=this.one.redSub(this.c2.redMul(this.d).redMul(A)),T=R.redMul(D.redInvm()),F=T.redSqrt();if(0!==F.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");var L=F.fromRed().isOdd();return(_&&!L||!_&&L)&&(F=F.redNeg()),this.point(I,F)},v.prototype.pointFromY=function(I,_){(I=new C(I,16)).red||(I=I.toRed(this.red));var A=I.redSqr(),R=A.redSub(this.c2),D=A.redMul(this.d).redMul(this.c2).redSub(this.a),T=R.redMul(D.redInvm());if(0===T.cmp(this.zero)){if(_)throw new Error("invalid point");return this.point(this.zero,I)}var F=T.redSqrt();if(0!==F.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");return F.fromRed().isOdd()!==_&&(F=F.redNeg()),this.point(F,I)},v.prototype.validate=function(I){if(I.isInfinity())return!0;I.normalize();var _=I.x.redSqr(),A=I.y.redSqr(),R=_.redMul(this.a).redAdd(A),D=this.c2.redMul(this.one.redAdd(this.d.redMul(_).redMul(A)));return 0===R.cmp(D)},w(g,M.BasePoint),v.prototype.pointFromJSON=function(I){return g.fromJSON(this,I)},v.prototype.point=function(I,_,A,R){return new g(this,I,_,A,R)},g.fromJSON=function(I,_){return new g(I,_[0],_[1],_[2])},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},g.prototype._extDbl=function(){var I=this.x.redSqr(),_=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var R=this.curve._mulA(I),D=this.x.redAdd(this.y).redSqr().redISub(I).redISub(_),T=R.redAdd(_),F=T.redSub(A),L=R.redSub(_),V=D.redMul(F),j=T.redMul(L),Z=D.redMul(L),Y=F.redMul(T);return this.curve.point(V,j,Y,Z)},g.prototype._projDbl=function(){var R,D,T,F,L,V,I=this.x.redAdd(this.y).redSqr(),_=this.x.redSqr(),A=this.y.redSqr();if(this.curve.twisted){var j=(F=this.curve._mulA(_)).redAdd(A);this.zOne?(R=I.redSub(_).redSub(A).redMul(j.redSub(this.curve.two)),D=j.redMul(F.redSub(A)),T=j.redSqr().redSub(j).redSub(j)):(L=this.z.redSqr(),V=j.redSub(L).redISub(L),R=I.redSub(_).redISub(A).redMul(V),D=j.redMul(F.redSub(A)),T=j.redMul(V))}else F=_.redAdd(A),L=this.curve._mulC(this.z).redSqr(),V=F.redSub(L).redSub(L),R=this.curve._mulC(I.redISub(F)).redMul(V),D=this.curve._mulC(F).redMul(_.redISub(A)),T=F.redMul(V);return this.curve.point(R,D,T)},g.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},g.prototype._extAdd=function(I){var _=this.y.redSub(this.x).redMul(I.y.redSub(I.x)),A=this.y.redAdd(this.x).redMul(I.y.redAdd(I.x)),R=this.t.redMul(this.curve.dd).redMul(I.t),D=this.z.redMul(I.z.redAdd(I.z)),T=A.redSub(_),F=D.redSub(R),L=D.redAdd(R),V=A.redAdd(_),j=T.redMul(F),Z=L.redMul(V),Y=T.redMul(V),G=F.redMul(L);return this.curve.point(j,Z,G,Y)},g.prototype._projAdd=function(I){var Z,Y,_=this.z.redMul(I.z),A=_.redSqr(),R=this.x.redMul(I.x),D=this.y.redMul(I.y),T=this.curve.d.redMul(R).redMul(D),F=A.redSub(T),L=A.redAdd(T),V=this.x.redAdd(this.y).redMul(I.x.redAdd(I.y)).redISub(R).redISub(D),j=_.redMul(F).redMul(V);return this.curve.twisted?(Z=_.redMul(L).redMul(D.redSub(this.curve._mulA(R))),Y=F.redMul(L)):(Z=_.redMul(L).redMul(D.redSub(R)),Y=this.curve._mulC(F).redMul(L)),this.curve.point(j,Z,Y)},g.prototype.add=function(I){return this.isInfinity()?I:I.isInfinity()?this:this.curve.extended?this._extAdd(I):this._projAdd(I)},g.prototype.mul=function(I){return this._hasDoubles(I)?this.curve._fixedNafMul(this,I):this.curve._wnafMul(this,I)},g.prototype.mulAdd=function(I,_,A){return this.curve._wnafMulAdd(1,[this,_],[I,A],2,!1)},g.prototype.jmulAdd=function(I,_,A){return this.curve._wnafMulAdd(1,[this,_],[I,A],2,!0)},g.prototype.normalize=function(){if(this.zOne)return this;var I=this.z.redInvm();return this.x=this.x.redMul(I),this.y=this.y.redMul(I),this.t&&(this.t=this.t.redMul(I)),this.z=this.curve.one,this.zOne=!0,this},g.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},g.prototype.getX=function(){return this.normalize(),this.x.fromRed()},g.prototype.getY=function(){return this.normalize(),this.y.fromRed()},g.prototype.eq=function(I){return this===I||0===this.getX().cmp(I.getX())&&0===this.getY().cmp(I.getY())},g.prototype.eqXToP=function(I){var _=I.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(_))return!0;for(var A=I.clone(),R=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(_.redIAdd(R),0===this.x.cmp(_))return!0}},g.prototype.toP=g.prototype.normalize,g.prototype.mixedAdd=g.prototype.add},46270:(ne,a,y)=>{"use strict";var p=a;p.base=y(97902),p.short=y(41781),p.mont=y(97064),p.edwards=y(13835)},97064:(ne,a,y)=>{"use strict";var p=y(17433),C=y(83894),w=y(97902),M=y(61970);function u(g){w.call(this,"mont",g),this.a=new p(g.a,16).toRed(this.red),this.b=new p(g.b,16).toRed(this.red),this.i4=new p(4).toRed(this.red).redInvm(),this.two=new p(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function v(g,b,I){w.BasePoint.call(this,g,"projective"),null===b&&null===I?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new p(b,16),this.z=new p(I,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}C(u,w),ne.exports=u,u.prototype.validate=function(b){var I=b.normalize().x,_=I.redSqr(),A=_.redMul(I).redAdd(_.redMul(this.a)).redAdd(I);return 0===A.redSqrt().redSqr().cmp(A)},C(v,w.BasePoint),u.prototype.decodePoint=function(b,I){return this.point(M.toArray(b,I),1)},u.prototype.point=function(b,I){return new v(this,b,I)},u.prototype.pointFromJSON=function(b){return v.fromJSON(this,b)},v.prototype.precompute=function(){},v.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},v.fromJSON=function(b,I){return new v(b,I[0],I[1]||b.one)},v.prototype.inspect=function(){return this.isInfinity()?"":""},v.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},v.prototype.dbl=function(){var I=this.x.redAdd(this.z).redSqr(),A=this.x.redSub(this.z).redSqr(),R=I.redSub(A),D=I.redMul(A),T=R.redMul(A.redAdd(this.curve.a24.redMul(R)));return this.curve.point(D,T)},v.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.diffAdd=function(b,I){var _=this.x.redAdd(this.z),A=this.x.redSub(this.z),R=b.x.redAdd(b.z),T=b.x.redSub(b.z).redMul(_),F=R.redMul(A),L=I.z.redMul(T.redAdd(F).redSqr()),V=I.x.redMul(T.redISub(F).redSqr());return this.curve.point(L,V)},v.prototype.mul=function(b){for(var I=b.clone(),_=this,A=this.curve.point(null,null),D=[];0!==I.cmpn(0);I.iushrn(1))D.push(I.andln(1));for(var T=D.length-1;T>=0;T--)0===D[T]?(_=_.diffAdd(A,this),A=A.dbl()):(A=_.diffAdd(A,this),_=_.dbl());return A},v.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.eq=function(b){return 0===this.getX().cmp(b.getX())},v.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},v.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},41781:(ne,a,y)=>{"use strict";var p=y(61970),C=y(17433),w=y(83894),M=y(97902),u=p.assert;function v(I){M.call(this,"short",I),this.a=new C(I.a,16).toRed(this.red),this.b=new C(I.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(I),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function g(I,_,A,R){M.BasePoint.call(this,I,"affine"),null===_&&null===A?(this.x=null,this.y=null,this.inf=!0):(this.x=new C(_,16),this.y=new C(A,16),R&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function b(I,_,A,R){M.BasePoint.call(this,I,"jacobian"),null===_&&null===A&&null===R?(this.x=this.curve.one,this.y=this.curve.one,this.z=new C(0)):(this.x=new C(_,16),this.y=new C(A,16),this.z=new C(R,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}w(v,M),ne.exports=v,v.prototype._getEndomorphism=function(_){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var A,R;if(_.beta)A=new C(_.beta,16).toRed(this.red);else{var D=this._getEndoRoots(this.p);A=(A=D[0].cmp(D[1])<0?D[0]:D[1]).toRed(this.red)}if(_.lambda)R=new C(_.lambda,16);else{var T=this._getEndoRoots(this.n);0===this.g.mul(T[0]).x.cmp(this.g.x.redMul(A))?R=T[0]:(R=T[1],u(0===this.g.mul(R).x.cmp(this.g.x.redMul(A))))}return{beta:A,lambda:R,basis:_.basis?_.basis.map(function(L){return{a:new C(L.a,16),b:new C(L.b,16)}}):this._getEndoBasis(R)}}},v.prototype._getEndoRoots=function(_){var A=_===this.p?this.red:C.mont(_),R=new C(2).toRed(A).redInvm(),D=R.redNeg(),T=new C(3).toRed(A).redNeg().redSqrt().redMul(R);return[D.redAdd(T).fromRed(),D.redSub(T).fromRed()]},v.prototype._getEndoBasis=function(_){for(var j,Z,Y,G,q,X,Q,$,S,A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),R=_,D=this.n.clone(),T=new C(1),F=new C(0),L=new C(0),V=new C(1),z=0;0!==R.cmpn(0);){var r=D.div(R);$=D.sub(r.mul(R)),S=L.sub(r.mul(T));var s=V.sub(r.mul(F));if(!Y&&$.cmp(A)<0)j=Q.neg(),Z=T,Y=$.neg(),G=S;else if(Y&&2==++z)break;Q=$,D=R,R=$,L=T,T=S,V=F,F=s}q=$.neg(),X=S;var d=Y.sqr().add(G.sqr());return q.sqr().add(X.sqr()).cmp(d)>=0&&(q=j,X=Z),Y.negative&&(Y=Y.neg(),G=G.neg()),q.negative&&(q=q.neg(),X=X.neg()),[{a:Y,b:G},{a:q,b:X}]},v.prototype._endoSplit=function(_){var A=this.endo.basis,R=A[0],D=A[1],T=D.b.mul(_).divRound(this.n),F=R.b.neg().mul(_).divRound(this.n),L=T.mul(R.a),V=F.mul(D.a),j=T.mul(R.b),Z=F.mul(D.b);return{k1:_.sub(L).sub(V),k2:j.add(Z).neg()}},v.prototype.pointFromX=function(_,A){(_=new C(_,16)).red||(_=_.toRed(this.red));var R=_.redSqr().redMul(_).redIAdd(_.redMul(this.a)).redIAdd(this.b),D=R.redSqrt();if(0!==D.redSqr().redSub(R).cmp(this.zero))throw new Error("invalid point");var T=D.fromRed().isOdd();return(A&&!T||!A&&T)&&(D=D.redNeg()),this.point(_,D)},v.prototype.validate=function(_){if(_.inf)return!0;var A=_.x,R=_.y,D=this.a.redMul(A),T=A.redSqr().redMul(A).redIAdd(D).redIAdd(this.b);return 0===R.redSqr().redISub(T).cmpn(0)},v.prototype._endoWnafMulAdd=function(_,A,R){for(var D=this._endoWnafT1,T=this._endoWnafT2,F=0;F<_.length;F++){var L=this._endoSplit(A[F]),V=_[F],j=V._getBeta();L.k1.negative&&(L.k1.ineg(),V=V.neg(!0)),L.k2.negative&&(L.k2.ineg(),j=j.neg(!0)),D[2*F]=V,D[2*F+1]=j,T[2*F]=L.k1,T[2*F+1]=L.k2}for(var Z=this._wnafMulAdd(1,D,T,2*F,R),Y=0;Y<2*F;Y++)D[Y]=null,T[Y]=null;return Z},w(g,M.BasePoint),v.prototype.point=function(_,A,R){return new g(this,_,A,R)},v.prototype.pointFromJSON=function(_,A){return g.fromJSON(this,_,A)},g.prototype._getBeta=function(){if(this.curve.endo){var _=this.precomputed;if(_&&_.beta)return _.beta;var A=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(_){var R=this.curve,D=function(T){return R.point(T.x.redMul(R.endo.beta),T.y)};_.beta=A,A.precomputed={beta:null,naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(D)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(D)}}}return A}},g.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]},g.fromJSON=function(_,A,R){"string"==typeof A&&(A=JSON.parse(A));var D=_.point(A[0],A[1],R);if(!A[2])return D;function T(L){return _.point(L[0],L[1],R)}var F=A[2];return D.precomputed={beta:null,doubles:F.doubles&&{step:F.doubles.step,points:[D].concat(F.doubles.points.map(T))},naf:F.naf&&{wnd:F.naf.wnd,points:[D].concat(F.naf.points.map(T))}},D},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return this.inf},g.prototype.add=function(_){if(this.inf)return _;if(_.inf)return this;if(this.eq(_))return this.dbl();if(this.neg().eq(_))return this.curve.point(null,null);if(0===this.x.cmp(_.x))return this.curve.point(null,null);var A=this.y.redSub(_.y);0!==A.cmpn(0)&&(A=A.redMul(this.x.redSub(_.x).redInvm()));var R=A.redSqr().redISub(this.x).redISub(_.x),D=A.redMul(this.x.redSub(R)).redISub(this.y);return this.curve.point(R,D)},g.prototype.dbl=function(){if(this.inf)return this;var _=this.y.redAdd(this.y);if(0===_.cmpn(0))return this.curve.point(null,null);var A=this.curve.a,R=this.x.redSqr(),D=_.redInvm(),T=R.redAdd(R).redIAdd(R).redIAdd(A).redMul(D),F=T.redSqr().redISub(this.x.redAdd(this.x)),L=T.redMul(this.x.redSub(F)).redISub(this.y);return this.curve.point(F,L)},g.prototype.getX=function(){return this.x.fromRed()},g.prototype.getY=function(){return this.y.fromRed()},g.prototype.mul=function(_){return _=new C(_,16),this.isInfinity()?this:this._hasDoubles(_)?this.curve._fixedNafMul(this,_):this.curve.endo?this.curve._endoWnafMulAdd([this],[_]):this.curve._wnafMul(this,_)},g.prototype.mulAdd=function(_,A,R){var D=[this,A],T=[_,R];return this.curve.endo?this.curve._endoWnafMulAdd(D,T):this.curve._wnafMulAdd(1,D,T,2)},g.prototype.jmulAdd=function(_,A,R){var D=[this,A],T=[_,R];return this.curve.endo?this.curve._endoWnafMulAdd(D,T,!0):this.curve._wnafMulAdd(1,D,T,2,!0)},g.prototype.eq=function(_){return this===_||this.inf===_.inf&&(this.inf||0===this.x.cmp(_.x)&&0===this.y.cmp(_.y))},g.prototype.neg=function(_){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(_&&this.precomputed){var R=this.precomputed,D=function(T){return T.neg()};A.precomputed={naf:R.naf&&{wnd:R.naf.wnd,points:R.naf.points.map(D)},doubles:R.doubles&&{step:R.doubles.step,points:R.doubles.points.map(D)}}}return A},g.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},w(b,M.BasePoint),v.prototype.jpoint=function(_,A,R){return new b(this,_,A,R)},b.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var _=this.z.redInvm(),A=_.redSqr(),R=this.x.redMul(A),D=this.y.redMul(A).redMul(_);return this.curve.point(R,D)},b.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},b.prototype.add=function(_){if(this.isInfinity())return _;if(_.isInfinity())return this;var A=_.z.redSqr(),R=this.z.redSqr(),D=this.x.redMul(A),T=_.x.redMul(R),F=this.y.redMul(A.redMul(_.z)),L=_.y.redMul(R.redMul(this.z)),V=D.redSub(T),j=F.redSub(L);if(0===V.cmpn(0))return 0!==j.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Z=V.redSqr(),Y=Z.redMul(V),G=D.redMul(Z),q=j.redSqr().redIAdd(Y).redISub(G).redISub(G),X=j.redMul(G.redISub(q)).redISub(F.redMul(Y)),Q=this.z.redMul(_.z).redMul(V);return this.curve.jpoint(q,X,Q)},b.prototype.mixedAdd=function(_){if(this.isInfinity())return _.toJ();if(_.isInfinity())return this;var A=this.z.redSqr(),R=this.x,D=_.x.redMul(A),T=this.y,F=_.y.redMul(A).redMul(this.z),L=R.redSub(D),V=T.redSub(F);if(0===L.cmpn(0))return 0!==V.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var j=L.redSqr(),Z=j.redMul(L),Y=R.redMul(j),G=V.redSqr().redIAdd(Z).redISub(Y).redISub(Y),q=V.redMul(Y.redISub(G)).redISub(T.redMul(Z)),X=this.z.redMul(L);return this.curve.jpoint(G,q,X)},b.prototype.dblp=function(_){if(0===_)return this;if(this.isInfinity())return this;if(!_)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var R=this;for(A=0;A<_;A++)R=R.dbl();return R}var D=this.curve.a,T=this.curve.tinv,F=this.x,L=this.y,V=this.z,j=V.redSqr().redSqr(),Z=L.redAdd(L);for(A=0;A<_;A++){var Y=F.redSqr(),G=Z.redSqr(),q=G.redSqr(),X=Y.redAdd(Y).redIAdd(Y).redIAdd(D.redMul(j)),Q=F.redMul(G),z=X.redSqr().redISub(Q.redAdd(Q)),$=Q.redISub(z),S=X.redMul($);S=S.redIAdd(S).redISub(q);var r=Z.redMul(V);A+1<_&&(j=j.redMul(q)),F=z,V=r,Z=S}return this.curve.jpoint(F,Z.redMul(T),V)},b.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},b.prototype._zeroDbl=function(){var _,A,R;if(this.zOne){var D=this.x.redSqr(),T=this.y.redSqr(),F=T.redSqr(),L=this.x.redAdd(T).redSqr().redISub(D).redISub(F);L=L.redIAdd(L);var V=D.redAdd(D).redIAdd(D),j=V.redSqr().redISub(L).redISub(L),Z=F.redIAdd(F);Z=(Z=Z.redIAdd(Z)).redIAdd(Z),_=j,A=V.redMul(L.redISub(j)).redISub(Z),R=this.y.redAdd(this.y)}else{var Y=this.x.redSqr(),G=this.y.redSqr(),q=G.redSqr(),X=this.x.redAdd(G).redSqr().redISub(Y).redISub(q);X=X.redIAdd(X);var Q=Y.redAdd(Y).redIAdd(Y),z=Q.redSqr(),$=q.redIAdd(q);$=($=$.redIAdd($)).redIAdd($),_=z.redISub(X).redISub(X),A=Q.redMul(X.redISub(_)).redISub($),R=(R=this.y.redMul(this.z)).redIAdd(R)}return this.curve.jpoint(_,A,R)},b.prototype._threeDbl=function(){var _,A,R;if(this.zOne){var D=this.x.redSqr(),T=this.y.redSqr(),F=T.redSqr(),L=this.x.redAdd(T).redSqr().redISub(D).redISub(F);L=L.redIAdd(L);var V=D.redAdd(D).redIAdd(D).redIAdd(this.curve.a),j=V.redSqr().redISub(L).redISub(L);_=j;var Z=F.redIAdd(F);Z=(Z=Z.redIAdd(Z)).redIAdd(Z),A=V.redMul(L.redISub(j)).redISub(Z),R=this.y.redAdd(this.y)}else{var Y=this.z.redSqr(),G=this.y.redSqr(),q=this.x.redMul(G),X=this.x.redSub(Y).redMul(this.x.redAdd(Y));X=X.redAdd(X).redIAdd(X);var Q=q.redIAdd(q),z=(Q=Q.redIAdd(Q)).redAdd(Q);_=X.redSqr().redISub(z),R=this.y.redAdd(this.z).redSqr().redISub(G).redISub(Y);var $=G.redSqr();$=($=($=$.redIAdd($)).redIAdd($)).redIAdd($),A=X.redMul(Q.redISub(_)).redISub($)}return this.curve.jpoint(_,A,R)},b.prototype._dbl=function(){var _=this.curve.a,A=this.x,R=this.y,D=this.z,T=D.redSqr().redSqr(),F=A.redSqr(),L=R.redSqr(),V=F.redAdd(F).redIAdd(F).redIAdd(_.redMul(T)),j=A.redAdd(A),Z=(j=j.redIAdd(j)).redMul(L),Y=V.redSqr().redISub(Z.redAdd(Z)),G=Z.redISub(Y),q=L.redSqr();q=(q=(q=q.redIAdd(q)).redIAdd(q)).redIAdd(q);var X=V.redMul(G).redISub(q),Q=R.redAdd(R).redMul(D);return this.curve.jpoint(Y,X,Q)},b.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var _=this.x.redSqr(),A=this.y.redSqr(),R=this.z.redSqr(),D=A.redSqr(),T=_.redAdd(_).redIAdd(_),F=T.redSqr(),L=this.x.redAdd(A).redSqr().redISub(_).redISub(D),V=(L=(L=(L=L.redIAdd(L)).redAdd(L).redIAdd(L)).redISub(F)).redSqr(),j=D.redIAdd(D);j=(j=(j=j.redIAdd(j)).redIAdd(j)).redIAdd(j);var Z=T.redIAdd(L).redSqr().redISub(F).redISub(V).redISub(j),Y=A.redMul(Z);Y=(Y=Y.redIAdd(Y)).redIAdd(Y);var G=this.x.redMul(V).redISub(Y);G=(G=G.redIAdd(G)).redIAdd(G);var q=this.y.redMul(Z.redMul(j.redISub(Z)).redISub(L.redMul(V)));q=(q=(q=q.redIAdd(q)).redIAdd(q)).redIAdd(q);var X=this.z.redAdd(L).redSqr().redISub(R).redISub(V);return this.curve.jpoint(G,q,X)},b.prototype.mul=function(_,A){return _=new C(_,A),this.curve._wnafMul(this,_)},b.prototype.eq=function(_){if("affine"===_.type)return this.eq(_.toJ());if(this===_)return!0;var A=this.z.redSqr(),R=_.z.redSqr();if(0!==this.x.redMul(R).redISub(_.x.redMul(A)).cmpn(0))return!1;var D=A.redMul(this.z),T=R.redMul(_.z);return 0===this.y.redMul(T).redISub(_.y.redMul(D)).cmpn(0)},b.prototype.eqXToP=function(_){var A=this.z.redSqr(),R=_.toRed(this.curve.red).redMul(A);if(0===this.x.cmp(R))return!0;for(var D=_.clone(),T=this.curve.redN.redMul(A);;){if(D.iadd(this.curve.n),D.cmp(this.curve.p)>=0)return!1;if(R.redIAdd(T),0===this.x.cmp(R))return!0}},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},52916:(ne,a,y)=>{"use strict";var b,p=a,C=y(37084),w=y(46270),u=y(61970).assert;function v(I){"short"===I.type?this.curve=new w.short(I):"edwards"===I.type?this.curve=new w.edwards(I):this.curve=new w.mont(I),this.g=this.curve.g,this.n=this.curve.n,this.hash=I.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function g(I,_){Object.defineProperty(p,I,{configurable:!0,enumerable:!0,get:function(){var A=new v(_);return Object.defineProperty(p,I,{configurable:!0,enumerable:!0,value:A}),A}})}p.PresetCurve=v,g("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:C.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),g("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:C.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),g("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:C.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),g("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:C.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"]}),g("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:C.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"]}),g("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:C.sha256,gRed:!1,g:["9"]}),g("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:C.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{b=y(25150)}catch{b=void 0}g("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:C.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})},67626:(ne,a,y)=>{"use strict";var p=y(17433),C=y(52438),w=y(61970),M=y(52916),u=y(37950),v=w.assert,g=y(91259),b=y(65957);function I(_){if(!(this instanceof I))return new I(_);"string"==typeof _&&(v(Object.prototype.hasOwnProperty.call(M,_),"Unknown curve "+_),_=M[_]),_ instanceof M.PresetCurve&&(_={curve:_}),this.curve=_.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=_.curve.g,this.g.precompute(_.curve.n.bitLength()+1),this.hash=_.hash||_.curve.hash}ne.exports=I,I.prototype.keyPair=function(A){return new g(this,A)},I.prototype.keyFromPrivate=function(A,R){return g.fromPrivate(this,A,R)},I.prototype.keyFromPublic=function(A,R){return g.fromPublic(this,A,R)},I.prototype.genKeyPair=function(A){A||(A={});for(var R=new C({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||u(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),D=this.n.byteLength(),T=this.n.sub(new p(2));;){var F=new p(R.generate(D));if(!(F.cmp(T)>0))return F.iaddn(1),this.keyFromPrivate(F)}},I.prototype._truncateToN=function(A,R){var D=8*A.byteLength()-this.n.bitLength();return D>0&&(A=A.ushrn(D)),!R&&A.cmp(this.n)>=0?A.sub(this.n):A},I.prototype.sign=function(A,R,D,T){"object"==typeof D&&(T=D,D=null),T||(T={}),R=this.keyFromPrivate(R,D),A=this._truncateToN(new p(A,16));for(var F=this.n.byteLength(),L=R.getPrivate().toArray("be",F),V=A.toArray("be",F),j=new C({hash:this.hash,entropy:L,nonce:V,pers:T.pers,persEnc:T.persEnc||"utf8"}),Z=this.n.sub(new p(1)),Y=0;;Y++){var G=T.k?T.k(Y):new p(j.generate(this.n.byteLength()));if(!((G=this._truncateToN(G,!0)).cmpn(1)<=0||G.cmp(Z)>=0)){var q=this.g.mul(G);if(!q.isInfinity()){var X=q.getX(),Q=X.umod(this.n);if(0!==Q.cmpn(0)){var z=G.invm(this.n).mul(Q.mul(R.getPrivate()).iadd(A));if(0!==(z=z.umod(this.n)).cmpn(0)){var $=(q.getY().isOdd()?1:0)|(0!==X.cmp(Q)?2:0);return T.canonical&&z.cmp(this.nh)>0&&(z=this.n.sub(z),$^=1),new b({r:Q,s:z,recoveryParam:$})}}}}}},I.prototype.verify=function(A,R,D,T){A=this._truncateToN(new p(A,16)),D=this.keyFromPublic(D,T);var F=(R=new b(R,"hex")).r,L=R.s;if(F.cmpn(1)<0||F.cmp(this.n)>=0||L.cmpn(1)<0||L.cmp(this.n)>=0)return!1;var Y,V=L.invm(this.n),j=V.mul(A).umod(this.n),Z=V.mul(F).umod(this.n);return this.curve._maxwellTrick?!(Y=this.g.jmulAdd(j,D.getPublic(),Z)).isInfinity()&&Y.eqXToP(F):!(Y=this.g.mulAdd(j,D.getPublic(),Z)).isInfinity()&&0===Y.getX().umod(this.n).cmp(F)},I.prototype.recoverPubKey=function(_,A,R,D){v((3&R)===R,"The recovery param is more than two bits"),A=new b(A,D);var T=this.n,F=new p(_),L=A.r,V=A.s,j=1&R,Z=R>>1;if(L.cmp(this.curve.p.umod(this.curve.n))>=0&&Z)throw new Error("Unable to find sencond key candinate");L=Z?this.curve.pointFromX(L.add(this.curve.n),j):this.curve.pointFromX(L,j);var Y=A.r.invm(T),G=T.sub(F).mul(Y).umod(T),q=V.mul(Y).umod(T);return this.g.mulAdd(G,L,q)},I.prototype.getKeyRecoveryParam=function(_,A,R,D){if(null!==(A=new b(A,D)).recoveryParam)return A.recoveryParam;for(var T=0;T<4;T++){var F;try{F=this.recoverPubKey(_,A,T)}catch{continue}if(F.eq(R))return T}throw new Error("Unable to find valid recovery factor")}},91259:(ne,a,y)=>{"use strict";var p=y(17433),w=y(61970).assert;function M(u,v){this.ec=u,this.priv=null,this.pub=null,v.priv&&this._importPrivate(v.priv,v.privEnc),v.pub&&this._importPublic(v.pub,v.pubEnc)}ne.exports=M,M.fromPublic=function(v,g,b){return g instanceof M?g:new M(v,{pub:g,pubEnc:b})},M.fromPrivate=function(v,g,b){return g instanceof M?g:new M(v,{priv:g,privEnc:b})},M.prototype.validate=function(){var v=this.getPublic();return v.isInfinity()?{result:!1,reason:"Invalid public key"}:v.validate()?v.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"}},M.prototype.getPublic=function(v,g){return"string"==typeof v&&(g=v,v=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),g?this.pub.encode(g,v):this.pub},M.prototype.getPrivate=function(v){return"hex"===v?this.priv.toString(16,2):this.priv},M.prototype._importPrivate=function(v,g){this.priv=new p(v,g||16),this.priv=this.priv.umod(this.ec.curve.n)},M.prototype._importPublic=function(v,g){if(v.x||v.y)return"mont"===this.ec.curve.type?w(v.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&w(v.x&&v.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(v.x,v.y));this.pub=this.ec.curve.decodePoint(v,g)},M.prototype.derive=function(v){return v.validate()||w(v.validate(),"public point not validated"),v.mul(this.priv).getX()},M.prototype.sign=function(v,g,b){return this.ec.sign(v,this,g,b)},M.prototype.verify=function(v,g){return this.ec.verify(v,g,this)},M.prototype.inspect=function(){return""}},65957:(ne,a,y)=>{"use strict";var p=y(17433),C=y(61970),w=C.assert;function M(I,_){if(I instanceof M)return I;this._importDER(I,_)||(w(I.r&&I.s,"Signature without r or s"),this.r=new p(I.r,16),this.s=new p(I.s,16),void 0===I.recoveryParam?this.recoveryParam=null:this.recoveryParam=I.recoveryParam)}function u(){this.place=0}function v(I,_){var A=I[_.place++];if(!(128&A))return A;var R=15&A;if(0===R||R>4)return!1;for(var D=0,T=0,F=_.place;T>>=0;return!(D<=127)&&(_.place=F,D)}function g(I){for(var _=0,A=I.length-1;!I[_]&&!(128&I[_+1])&&_>>3);for(I.push(128|A);--A;)I.push(_>>>(A<<3)&255);I.push(_)}}ne.exports=M,M.prototype._importDER=function(_,A){_=C.toArray(_,A);var R=new u;if(48!==_[R.place++])return!1;var D=v(_,R);if(!1===D||D+R.place!==_.length||2!==_[R.place++])return!1;var T=v(_,R);if(!1===T)return!1;var F=_.slice(R.place,T+R.place);if(R.place+=T,2!==_[R.place++])return!1;var L=v(_,R);if(!1===L||_.length!==L+R.place)return!1;var V=_.slice(R.place,L+R.place);if(0===F[0]){if(!(128&F[1]))return!1;F=F.slice(1)}if(0===V[0]){if(!(128&V[1]))return!1;V=V.slice(1)}return this.r=new p(F),this.s=new p(V),this.recoveryParam=null,!0},M.prototype.toDER=function(_){var A=this.r.toArray(),R=this.s.toArray();for(128&A[0]&&(A=[0].concat(A)),128&R[0]&&(R=[0].concat(R)),A=g(A),R=g(R);!(R[0]||128&R[1]);)R=R.slice(1);var D=[2];b(D,A.length),(D=D.concat(A)).push(2),b(D,R.length);var T=D.concat(R),F=[48];return b(F,T.length),F=F.concat(T),C.encode(F,_)}},81885:(ne,a,y)=>{"use strict";var p=y(37084),C=y(52916),w=y(61970),M=w.assert,u=w.parseBytes,v=y(97535),g=y(88241);function b(I){if(M("ed25519"===I,"only tested with ed25519 so far"),!(this instanceof b))return new b(I);I=C[I].curve,this.curve=I,this.g=I.g,this.g.precompute(I.n.bitLength()+1),this.pointClass=I.point().constructor,this.encodingLength=Math.ceil(I.n.bitLength()/8),this.hash=p.sha512}ne.exports=b,b.prototype.sign=function(_,A){_=u(_);var R=this.keyFromSecret(A),D=this.hashInt(R.messagePrefix(),_),T=this.g.mul(D),F=this.encodePoint(T),L=this.hashInt(F,R.pubBytes(),_).mul(R.priv()),V=D.add(L).umod(this.curve.n);return this.makeSignature({R:T,S:V,Rencoded:F})},b.prototype.verify=function(_,A,R){_=u(_),A=this.makeSignature(A);var D=this.keyFromPublic(R),T=this.hashInt(A.Rencoded(),D.pubBytes(),_),F=this.g.mul(A.S());return A.R().add(D.pub().mul(T)).eq(F)},b.prototype.hashInt=function(){for(var _=this.hash(),A=0;A{"use strict";var p=y(61970),C=p.assert,w=p.parseBytes,M=p.cachedProperty;function u(v,g){this.eddsa=v,this._secret=w(g.secret),v.isPoint(g.pub)?this._pub=g.pub:this._pubBytes=w(g.pub)}u.fromPublic=function(g,b){return b instanceof u?b:new u(g,{pub:b})},u.fromSecret=function(g,b){return b instanceof u?b:new u(g,{secret:b})},u.prototype.secret=function(){return this._secret},M(u,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),M(u,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),M(u,"privBytes",function(){var g=this.eddsa,b=this.hash(),I=g.encodingLength-1,_=b.slice(0,g.encodingLength);return _[0]&=248,_[I]&=127,_[I]|=64,_}),M(u,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),M(u,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),M(u,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),u.prototype.sign=function(g){return C(this._secret,"KeyPair can only verify"),this.eddsa.sign(g,this)},u.prototype.verify=function(g,b){return this.eddsa.verify(g,b,this)},u.prototype.getSecret=function(g){return C(this._secret,"KeyPair is public only"),p.encode(this.secret(),g)},u.prototype.getPublic=function(g){return p.encode(this.pubBytes(),g)},ne.exports=u},88241:(ne,a,y)=>{"use strict";var p=y(17433),C=y(61970),w=C.assert,M=C.cachedProperty,u=C.parseBytes;function v(g,b){this.eddsa=g,"object"!=typeof b&&(b=u(b)),Array.isArray(b)&&(b={R:b.slice(0,g.encodingLength),S:b.slice(g.encodingLength)}),w(b.R&&b.S,"Signature without R or S"),g.isPoint(b.R)&&(this._R=b.R),b.S instanceof p&&(this._S=b.S),this._Rencoded=Array.isArray(b.R)?b.R:b.Rencoded,this._Sencoded=Array.isArray(b.S)?b.S:b.Sencoded}M(v,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),M(v,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),M(v,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),M(v,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),v.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},v.prototype.toHex=function(){return C.encode(this.toBytes(),"hex").toUpperCase()},ne.exports=v},25150:ne=>{ne.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},61970:(ne,a,y)=>{"use strict";var p=a,C=y(17433),w=y(32391),M=y(58195);p.assert=w,p.toArray=M.toArray,p.zero2=M.zero2,p.toHex=M.toHex,p.encode=M.encode,p.getNAF=function u(_,A,R){var D=new Array(Math.max(_.bitLength(),R)+1);D.fill(0);for(var T=1<(T>>1)-1?(T>>1)-j:j,F.isubn(V)):V=0,D[L]=V,F.iushrn(1)}return D},p.getJSF=function v(_,A){var R=[[],[]];_=_.clone(),A=A.clone();for(var F,D=0,T=0;_.cmpn(-D)>0||A.cmpn(-T)>0;){var j,Z,L=_.andln(3)+D&3,V=A.andln(3)+T&3;3===L&&(L=-1),3===V&&(V=-1),1&L?j=3!==(F=_.andln(7)+D&7)&&5!==F||2!==V?L:-L:j=0,R[0].push(j),1&V?Z=3!==(F=A.andln(7)+T&7)&&5!==F||2!==L?V:-V:Z=0,R[1].push(Z),2*D===j+1&&(D=1-D),2*T===Z+1&&(T=1-T),_.iushrn(1),A.iushrn(1)}return R},p.cachedProperty=function g(_,A,R){var D="_"+A;_.prototype[A]=function(){return void 0!==this[D]?this[D]:this[D]=R.call(this)}},p.parseBytes=function b(_){return"string"==typeof _?p.toArray(_,"hex"):_},p.intFromLE=function I(_){return new C(_,"hex","le")}},17433:function(ne,a,y){(function(p,C){"use strict";function w(S,r){if(!S)throw new Error(r||"Assertion failed")}function M(S,r){S.super_=r;var s=function(){};s.prototype=r.prototype,S.prototype=new s,S.prototype.constructor=S}function u(S,r,s){if(u.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,null!==S&&(("le"===r||"be"===r)&&(s=r,r=10),this._init(S||0,r||10,s||"be"))}var v;"object"==typeof p?p.exports=u:C.BN=u,u.BN=u,u.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:y(85568).Buffer}catch{}function g(S,r){var s=S.charCodeAt(r);return s>=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},38419:ne=>{"use strict";ne.exports=function(y){for(var p=[],C=y.length,w=0;w=55296&&M<=56319&&C>w+1){var u=y.charCodeAt(w+1);u>=56320&&u<=57343&&(M=1024*(M-55296)+u-56320+65536,w+=1)}M<128?p.push(M):M<2048?(p.push(M>>6|192),p.push(63&M|128)):M<55296||M>=57344&&M<65536?(p.push(M>>12|224),p.push(M>>6&63|128),p.push(63&M|128)):M>=65536&&M<=1114111?(p.push(M>>18|240),p.push(M>>12&63|128),p.push(M>>6&63|128),p.push(63&M|128)):p.push(239,191,189)}return new Uint8Array(p).buffer}},69913:(ne,a,y)=>{var p=y(38739);function C(u,v,g){v&&"string"!=typeof v&&(v=v.message||v.name),p(this,{type:u,name:u,cause:"string"!=typeof v?v:g,message:v},"ewr")}function w(u,v){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),C.call(this,"CustomError",u,v)}w.prototype=new Error,ne.exports=function(u){var v=function(g,b){return function M(u,v,g){var b=function(I,_){C.call(this,v,I,_),"FilesystemError"==v&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(u.errno[this.cause.errno]?u.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,b)};return b.prototype=g?new g:new w,b}(u,g,b)};return{CustomError:w,FilesystemError:v("FilesystemError"),createError:v}}},3161:(ne,a,y)=>{var p=ne.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];ne.exports.errno={},ne.exports.code={},p.forEach(function(C){ne.exports.errno[C.errno]=C,ne.exports.code[C.code]=C}),ne.exports.custom=y(69913)(ne.exports),ne.exports.create=ne.exports.custom.createError},38739:function(ne){var y,p;y=this,p=function(){var a="function"==typeof Object.defineProperty?function(C,w,M){return Object.defineProperty(C,w,M),C}:function(C,w,M){return C[w]=M.value,C};return function(C,w,M,u){var v;if(u=function(C,w){var M="object"==typeof w,u=!M&&"string"==typeof w,v=function(g){return M?!!w[g]:!!u&&w.indexOf(g[0])>-1};return{enumerable:v("enumerable"),configurable:v("configurable"),writable:v("writable"),value:C}}(M,u),"object"==typeof w){for(v in w)Object.hasOwnProperty.call(w,v)&&(u.value=w[v],a(C,v,u));return C}return a(C,w,u)}},ne.exports?ne.exports=p():y.prr=p()},4073:(ne,a,y)=>{ne.exports=y(36766)},36766:(ne,a,y)=>{y(53495);var C,p=y(37131);C=p("Error.captureStackTrace")?y(56362):p("Error.prototype.stack")?y(56017):y(63998),ne.exports=C()},52047:(ne,a,y)=>{var p=y(90252).Class,C=y(90252).abstractMethod,w=p(Object,{prototype:{init:p.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:C,getTypeName:C,getFunction:function(){return this.functionValue},getFunctionName:C,getMethodName:C,getFileName:C,getLineNumber:C,getColumnNumber:C,getEvalOrigin:C,isTopLevel:C,isEval:C,isNative:C,isConstructor:C}});ne.exports=w},80916:(ne,a,y)=>{var p=y(90252).Class,C=y(52047),w=y(88074).cache,M=p(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(u){p.prototype.merge.call(this,u)},getFrames:function(u,v){for(var g=[],b=0,I=u.length;b{var p=y(90252).Class,C=y(90252).abstractMethod,w=y(88074).eachCombination,M=y(88074).cache,u=y(37131),v=p(Object,{prototype:{captureFrameStrings:function(b){var I=this.createError();b.unshift(this.captureFrameStrings),b.unshift(this.createError);var A=this.getFrameStrings(I).slice(b.length),R=[];if(u("arguments.callee.caller")){var D=[this.createError,this.captureFrameStrings];try{for(var T=arguments.callee;T=T.caller;)D.push(T)}catch{}R=D.slice(b.length)}return{frameStrings:A,functionValues:R}},getFrameStrings:function(b){var I=b.message||"",_=b.name||"",A=this.getStackString(b);if(void 0!==A){var R=A.split("\n"),D=0,T=R.length;return this.hasHeader&&(D+=_.split("\n").length+I.split("\n").length-1),this.hasFooter&&(T-=1),R.slice(D,T)}},createError:C,getStackString:C,hasHeader:void 0,hasFooter:void 0}}),g=p(Object,{prototype:{calibrateClass:function(b){return this.calibrateMethods(b)&&this.calibrateEnvelope(b)},calibrateMethods:function(b){try{w([[function(I){return new Error(I)},function(I){try{throw new Error(I)}catch(_){return _}}],[function(I){return I.stack},function(I){return I.stacktrace}]],function(I,_){if(_(I()))throw{getStackString:_,createError:I}})}catch(I){return p.merge.call(b,{prototype:I}),!0}return!1},calibrateEnvelope:function(b){var R=(0,b.prototype.getStackString)((0,b.prototype.createError)("marker")).split("\n");return p.merge.call(b,{prototype:{hasHeader:/marker/.test(R[0]),hasFooter:""===R[R.length-1]}}),!0}}});ne.exports={getClass:M(function(){var b;if(b)return b;if(b=p(v,{}),!(new g).calibrateClass(b))throw new Error("Cannot read Error.prototype.stack in this environment.");return b}),getInstance:M(function(){return new(this.getClass())})}},56017:(ne,a,y)=>{var p=y(31470),C=y(80916),w=y(88074).cache,M=y(52624);ne.exports=function(){return Error.captureStackTrace=function u(v,g){var I=[u];g&&I.push(g);var _=p.getInstance().captureFrameStrings(I);Object.defineProperties(v,{stack:{configurable:!0,get:w(function(){var A=C.getInstance().getFrames(_.frameStrings,_.functionValues);return(Error.prepareStackTrace||M)(v,A,undefined)})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(u){if(u.cachedStack)return u.stack;var b,v=p.getInstance().getFrameStrings(u),g=[];v?g=C.getInstance().getFrames(v,[]):b=["The stack is not readable by unthrown errors in this environment."];var I=(Error.prepareStackTrace||M)(u,g,b);if(v)try{Object.defineProperties(u,{stack:{configurable:!0,writable:!0,enumerable:!1,value:I},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return I},{prepareStackTrace:M}}},52624:ne=>{ne.exports=function(y,p,C){var w="";if(w+=y.name||"Error",w+=": "+(y.message||""),C instanceof Array)for(var M in C){w+="\n # "+C[M]}for(var v in p){w+="\n at "+p[v].toString()}return w}},63998:(ne,a,y)=>{var p=y(88074).cache,C=y(52624);ne.exports=function(){return Error.captureStackTrace=function(w,M){Object.defineProperties(w,{stack:{configurable:!0,get:p(function(){return(Error.prepareStackTrace||C)(w,[])})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(w){if(w.cachedStack)return w.stack;var M=(Error.prepareStackTrace||C)(w,[]);try{Object.defineProperties(w,{stack:{configurable:!0,writable:!0,enumerable:!1,value:M},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return M},{prepareStackTrace:C}}},56362:(ne,a,y)=>{var p=y(52624);ne.exports=function(){return Error.getStackTrace=function(C){return C.stack},{prepareStackTrace:p}}},59069:ne=>{"use strict";var p,a="object"==typeof Reflect?Reflect:null,y=a&&"function"==typeof a.apply?a.apply:function(Y,G,q){return Function.prototype.apply.call(Y,G,q)};p=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(Y){return Object.getOwnPropertyNames(Y).concat(Object.getOwnPropertySymbols(Y))}:function(Y){return Object.getOwnPropertyNames(Y)};var w=Number.isNaN||function(Y){return Y!=Y};function M(){M.init.call(this)}ne.exports=M,ne.exports.once=function L(Z,Y){return new Promise(function(G,q){function X(z){Z.removeListener(Y,Q),q(z)}function Q(){"function"==typeof Z.removeListener&&Z.removeListener("error",X),G([].slice.call(arguments))}j(Z,Y,Q,{once:!0}),"error"!==Y&&function V(Z,Y,G){"function"==typeof Z.on&&j(Z,"error",Y,G)}(Z,X,{once:!0})})},M.EventEmitter=M,M.prototype._events=void 0,M.prototype._eventsCount=0,M.prototype._maxListeners=void 0;var u=10;function v(Z){if("function"!=typeof Z)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Z)}function g(Z){return void 0===Z._maxListeners?M.defaultMaxListeners:Z._maxListeners}function b(Z,Y,G,q){var X,Q,z;if(v(G),void 0===(Q=Z._events)?(Q=Z._events=Object.create(null),Z._eventsCount=0):(void 0!==Q.newListener&&(Z.emit("newListener",Y,G.listener?G.listener:G),Q=Z._events),z=Q[Y]),void 0===z)z=Q[Y]=G,++Z._eventsCount;else if("function"==typeof z?z=Q[Y]=q?[G,z]:[z,G]:q?z.unshift(G):z.push(G),(X=g(Z))>0&&z.length>X&&!z.warned){z.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(Y)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=Z,$.type=Y,$.count=z.length,function C(Z){console&&console.warn&&console.warn(Z)}($)}return Z}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(Z,Y,G){var q={fired:!1,wrapFn:void 0,target:Z,type:Y,listener:G},X=I.bind(q);return X.listener=G,q.wrapFn=X,X}function A(Z,Y,G){var q=Z._events;if(void 0===q)return[];var X=q[Y];return void 0===X?[]:"function"==typeof X?G?[X.listener||X]:[X]:G?function F(Z){for(var Y=new Array(Z.length),G=0;G0&&(z=G[0]),z instanceof Error)throw z;var $=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw $.context=z,$}var S=Q[Y];if(void 0===S)return!1;if("function"==typeof S)y(S,this,G);else{var r=S.length,s=D(S,r);for(q=0;q=0;z--)if(q[z]===G||q[z].listener===G){$=q[z].listener,Q=z;break}if(Q<0)return this;0===Q?q.shift():function T(Z,Y){for(;Y+1=0;X--)this.removeListener(Y,G[X]);return this},M.prototype.listeners=function(Y){return A(this,Y,!0)},M.prototype.rawListeners=function(Y){return A(this,Y,!1)},M.listenerCount=function(Z,Y){return"function"==typeof Z.listenerCount?Z.listenerCount(Y):R.call(Z,Y)},M.prototype.listenerCount=R,M.prototype.eventNames=function(){return this._eventsCount>0?p(this._events):[]}},40347:(ne,a,y)=>{var p=y(73502).Buffer,C=y(8095);ne.exports=function w(M,u,v,g){if(p.isBuffer(M)||(M=p.from(M,"binary")),u&&(p.isBuffer(u)||(u=p.from(u,"binary")),8!==u.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var b=v/8,I=p.alloc(b),_=p.alloc(g||0),A=p.alloc(0);b>0||g>0;){var R=new C;R.update(A),R.update(M),u&&R.update(u),A=R.digest();var D=0;if(b>0){var T=I.length-b;D=Math.min(b,A.length),A.copy(I,T,0,D),b-=D}if(D0){var F=_.length-g,L=Math.min(g,A.length-D);A.copy(_,F,D,D+L),g-=L}}return A.fill(0),{key:I,iv:_}}},12559:ne=>{"use strict";ne.exports=function a(y,p){if(y===p)return!0;if(y&&p&&"object"==typeof y&&"object"==typeof p){if(y.constructor!==p.constructor)return!1;var C,w,M;if(Array.isArray(y)){if((C=y.length)!=p.length)return!1;for(w=C;0!=w--;)if(!a(y[w],p[w]))return!1;return!0}if(y.constructor===RegExp)return y.source===p.source&&y.flags===p.flags;if(y.valueOf!==Object.prototype.valueOf)return y.valueOf()===p.valueOf();if(y.toString!==Object.prototype.toString)return y.toString()===p.toString();if((C=(M=Object.keys(y)).length)!==Object.keys(p).length)return!1;for(w=C;0!=w--;)if(!Object.prototype.hasOwnProperty.call(p,M[w]))return!1;for(w=C;0!=w--;){var u=M[w];if(!a(y[u],p[u]))return!1}return!0}return y!=y&&p!=p}},44770:ne=>{"use strict";ne.exports=function(a,y){for(var p={},C=Object.keys(a),w=Array.isArray(y),M=0;M{"use strict";var p=y(64356),C=Object.prototype.toString,w=Object.prototype.hasOwnProperty,M=function(I,_,A){for(var R=0,D=I.length;R=3&&(R=A),"[object Array]"===C.call(I)?M(I,_,R):"string"==typeof I?u(I,_,R):v(I,_,R)}},64356:ne=>{"use strict";var p,C,a=Function.prototype.toString,y="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof y&&"function"==typeof Object.defineProperty)try{p=Object.defineProperty({},"length",{get:function(){throw C}}),C={},y(function(){throw 42},null,p)}catch(V){V!==C&&(y=null)}else y=null;var w=/^\s*class\b/,M=function(j){try{var Z=a.call(j);return w.test(Z)}catch{return!1}},u=function(j){try{return!M(j)&&(a.call(j),!0)}catch{return!1}},v=Object.prototype.toString,D="function"==typeof Symbol&&!!Symbol.toStringTag,T=!(0 in[,]),F=function(){return!1};if("object"==typeof document){var L=document.all;v.call(L)===v.call(document.all)&&(F=function(j){if((T||!j)&&(typeof j>"u"||"object"==typeof j))try{var Z=v.call(j);return("[object HTMLAllCollection]"===Z||"[object HTML document.all class]"===Z||"[object HTMLCollection]"===Z||"[object Object]"===Z)&&null==j("")}catch{}return!1})}ne.exports=y?function(j){if(F(j))return!0;if(!j||"function"!=typeof j&&"object"!=typeof j)return!1;try{y(j,null,p)}catch(Z){if(Z!==C)return!1}return!M(j)&&u(j)}:function(j){if(F(j))return!0;if(!j||"function"!=typeof j&&"object"!=typeof j)return!1;if(D)return u(j);if(M(j))return!1;var Z=v.call(j);return!("[object Function]"!==Z&&"[object GeneratorFunction]"!==Z&&!/^\[object HTML/.test(Z))&&u(j)}},7480:ne=>{var a=Object.prototype.hasOwnProperty,y=Object.prototype.toString;ne.exports=function(C,w,M){if("[object Function]"!==y.call(w))throw new TypeError("iterator must be a function");var u=C.length;if(u===+u)for(var v=0;v{"use strict";var a="Function.prototype.bind called on incompatible ",y=Array.prototype.slice,p=Object.prototype.toString,C="[object Function]";ne.exports=function(M){var u=this;if("function"!=typeof u||p.call(u)!==C)throw new TypeError(a+u);for(var g,v=y.call(arguments,1),I=Math.max(0,u.length-v.length),_=[],A=0;A{"use strict";var p=y(83457);ne.exports=Function.prototype.bind||p},2997:(ne,a,y)=>{var p=y(23874),C=y(14692),w=y(2313),M=new Buffer(0),u=function(){},v=function(I){return"function"==typeof I?I:function(_){_(null,I)}},g=function(I,_){var A=!1,R=!1;return I._read=function(){A=!0},I.destroy=function(){R=!0},_(function(D,T){if(D)return I.emit("error",D);var F=function(){for(var L;null!==(L=T.read());)A=!1,I.push(L)};if(T.on("readable",function(){A&&F()}),T.on("end",function(){F(),I.push(null)}),T.on("error",function(L){I.emit("error",L)}),T.on("close",function(){F(),process.nextTick(function(){I.emit("close")})}),I._read=function(){A=!0,F()},I.destroy=function(){R||(R=!0,T.destroy&&T.destroy())},R)return R=!1,void I.destroy();A&&F()}),I},b=function(I,_){var A=u,R=!1;return I._write=function(D,T,F){A=F},I.destroy=function(){R=!0},I.write(M),_(function(D,T){if(D)return I.emit("error",D);T.on("close",function(){I.emit("close")}),T.on("error",function(L){I.emit("error",L)}),I._write=function(L,V,j){if(L===M)return j();T.write(L,V,j)};var F=I.emit;if(T.on("finish",function(){F.call(I,"finish")}),I.destroy=function(){R||(R=!0,T.destroy&&T.destroy())},I.emit=function(L){if("finish"!==L)return F.apply(I,arguments);T.end()},R)return R=!1,void I.destroy();A()}),I};a.readable=function(I,_){return 1===arguments.length?a.readable(null,I):(I||(I={}),g(new C(I),v(_)))},a.writable=function(I,_){return 1===arguments.length?a.writable(null,I):(I||(I={}),b(new p(I),v(_)))},a.duplex=function(I,_,A){if(2===arguments.length)return a.duplex(null,I,_);I||(I={});var R=new w(I);return b(R,v(_)),g(R,v(A)),R}},2313:(ne,a,y)=>{ne.exports=y(52652)},52652:(ne,a,y)=>{ne.exports=u;var p=Object.keys||function(b){var I=[];for(var _ in b)I.push(_);return I},C=y(26156);C.inherits=y(83894);var w=y(15890),M=y(19859);function u(b){if(!(this instanceof u))return new u(b);w.call(this,b),M.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}C.inherits(u,w),function g(b,I){for(var _=0,A=b.length;_{ne.exports=w;var p=y(59735),C=y(26156);function w(M){if(!(this instanceof w))return new w(M);p.call(this,M)}C.inherits=y(83894),C.inherits(w,p),w.prototype._transform=function(M,u,v){v(null,M)}},15890:(ne,a,y)=>{ne.exports=b;var p=y(66425),C=y(93172).Buffer;b.ReadableState=g;var w=y(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(r,s){return r.listeners(s).length});var v,M=y(295),u=y(26156);function g(r,s){var d=(r=r||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!r.objectMode,this.defaultEncoding=r.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r.encoding&&(v||(v=y(15453).s),this.decoder=new v(r.encoding),this.encoding=r.encoding)}function b(r){if(!(this instanceof b))return new b(r);this._readableState=new g(r,this),this.readable=!0,M.call(this)}function I(r,s,d,h,E){var k=function T(r,s){var d=null;return!C.isBuffer(s)&&"string"!=typeof s&&null!=s&&!r.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(s,d);if(k)r.emit("error",k);else if(null==d)s.reading=!1,s.ended||function F(r,s){if(s.decoder&&!s.ended){var d=s.decoder.end();d&&d.length&&(s.buffer.push(d),s.length+=s.objectMode?1:d.length)}s.ended=!0,s.length>0?L(r):z(r)}(r,s);else if(s.objectMode||d&&d.length>0)if(s.ended&&!E){var B=new Error("stream.push() after EOF");r.emit("error",B)}else if(s.endEmitted&&E){B=new Error("stream.unshift() after end event");r.emit("error",B)}else s.decoder&&!E&&!h&&(d=s.decoder.write(d)),s.length+=s.objectMode?1:d.length,E?s.buffer.unshift(d):(s.reading=!1,s.buffer.push(d)),s.needReadable&&L(r),function j(r,s){s.readingMore||(s.readingMore=!0,process.nextTick(function(){!function Z(r,s){for(var d=s.length;!s.reading&&!s.flowing&&!s.ended&&s.lengths.highWaterMark&&(s.highWaterMark=function R(r){if(r>=A)r=A;else{r--;for(var s=1;s<32;s<<=1)r|=r>>s;r++}return r}(r)),r>s.length?s.ended?s.length:(s.needReadable=!0,0):r)}function L(r){var s=r._readableState;s.needReadable=!1,!s.emittedReadable&&(s.emittedReadable=!0,s.sync?process.nextTick(function(){V(r)}):V(r))}function V(r){r.emit("readable")}function G(r){var d,s=r._readableState;function h(E,k,B){!1===E.write(d)&&s.awaitDrain++}for(s.awaitDrain=0;s.pipesCount&&null!==(d=r.read());)if(1===s.pipesCount?h(s.pipes):$(s.pipes,h),r.emit("data",d),s.awaitDrain>0)return;if(0===s.pipesCount)return s.flowing=!1,void(w.listenerCount(r,"data")>0&&X(r));s.ranOut=!0}function q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,G(this))}function X(r,s){if(r._readableState.flowing)throw new Error("Cannot switch to old mode now.");var h=s||!1,E=!1;r.readable=!0,r.pipe=M.prototype.pipe,r.on=r.addListener=M.prototype.on,r.on("readable",function(){E=!0;for(var k;!h&&null!==(k=r.read());)r.emit("data",k);null===k&&(E=!1,r._readableState.needReadable=!0)}),r.pause=function(){h=!0,this.emit("pause")},r.resume=function(){h=!1,E?process.nextTick(function(){r.emit("readable")}):this.read(0),this.emit("resume")},r.emit("readable")}function Q(r,s){var B,d=s.buffer,h=s.length,E=!!s.decoder,k=!!s.objectMode;if(0===d.length)return null;if(0===h)B=null;else if(k)B=d.shift();else if(!r||r>=h)B=E?d.join(""):C.concat(d,h),d.length=0;else if(r0)throw new Error("endReadable called on non-empty stream");!s.endEmitted&&s.calledRead&&(s.ended=!0,process.nextTick(function(){!s.endEmitted&&0===s.length&&(s.endEmitted=!0,r.readable=!1,r.emit("end"))}))}function $(r,s){for(var d=0,h=r.length;d0)&&(s.emittedReadable=!1),0===r&&s.needReadable&&(s.length>=s.highWaterMark||s.ended))return L(this),null;if(0===(r=D(r,s))&&s.ended)return h=null,s.length>0&&s.decoder&&(h=Q(r,s),s.length-=h.length),0===s.length&&z(this),h;var E=s.needReadable;return s.length-r<=s.highWaterMark&&(E=!0),(s.ended||s.reading)&&(E=!1),E&&(s.reading=!0,s.sync=!0,0===s.length&&(s.needReadable=!0),this._read(s.highWaterMark),s.sync=!1),E&&!s.reading&&(r=D(d,s)),null===(h=r>0?Q(r,s):null)&&(s.needReadable=!0,r=0),s.length-=r,0===s.length&&!s.ended&&(s.needReadable=!0),s.ended&&!s.endEmitted&&0===s.length&&z(this),h},b.prototype._read=function(r){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(r,s){var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=r;break;case 1:h.pipes=[h.pipes,r];break;default:h.pipes.push(r)}h.pipesCount+=1;var k=(!s||!1!==s.end)&&r!==process.stdout&&r!==process.stderr?x:P;function B(Ce){Ce===d&&P()}function x(){r.end()}h.endEmitted?process.nextTick(k):d.once("end",k),r.on("unpipe",B);var f=function Y(r){return function(){var d=r._readableState;d.awaitDrain--,0===d.awaitDrain&&G(r)}}(d);function P(){r.removeListener("close",te),r.removeListener("finish",ie),r.removeListener("drain",f),r.removeListener("error",se),r.removeListener("unpipe",B),d.removeListener("end",x),d.removeListener("end",P),(!r._writableState||r._writableState.needDrain)&&f()}function se(Ce){de(),r.removeListener("error",se),0===w.listenerCount(r,"error")&&r.emit("error",Ce)}function te(){r.removeListener("finish",ie),de()}function ie(){r.removeListener("close",te),de()}function de(){d.unpipe(r)}return r.on("drain",f),r._events&&r._events.error?p(r._events.error)?r._events.error.unshift(se):r._events.error=[se,r._events.error]:r.on("error",se),r.once("close",te),r.once("finish",ie),r.emit("pipe",d),h.flowing||(this.on("readable",q),h.flowing=!0,process.nextTick(function(){G(d)})),r},b.prototype.unpipe=function(r){var s=this._readableState;if(0===s.pipesCount)return this;if(1===s.pipesCount)return r&&r!==s.pipes||(r||(r=s.pipes),s.pipes=null,s.pipesCount=0,this.removeListener("readable",q),s.flowing=!1,r&&r.emit("unpipe",this)),this;if(!r){var d=s.pipes,h=s.pipesCount;s.pipes=null,s.pipesCount=0,this.removeListener("readable",q),s.flowing=!1;for(var E=0;E"u"&&(this[E]=function(B){return function(){return r[B].apply(r,arguments)}}(E));return $(["error","close","destroy","pause","resume"],function(B){r.on(B,h.emit.bind(h,B))}),h._read=function(B){d&&(d=!1,r.resume())},h},b._fromList=Q},59735:(ne,a,y)=>{ne.exports=u;var p=y(52652),C=y(26156);function w(g,b){this.afterTransform=function(I,_){return function M(g,b,I){var _=g._transformState;_.transforming=!1;var A=_.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,null!=I&&g.push(I),A&&A(b);var R=g._readableState;R.reading=!1,(R.needReadable||R.length{ne.exports=v;var p=y(93172).Buffer;v.WritableState=u;var C=y(26156);C.inherits=y(83894);var w=y(295);function M(G,q,X){this.chunk=G,this.encoding=q,this.callback=X}function u(G,q){var X=(G=G||{}).highWaterMark;this.highWaterMark=X||0===X?X:16384,this.objectMode=!!G.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var Q=!1===G.decodeStrings;this.decodeStrings=!Q,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(z){!function T(G,q){var X=G._writableState,Q=X.sync,z=X.writecb;if(function D(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}(X),q)!function R(G,q,X,Q,z){X?process.nextTick(function(){z(Q)}):z(Q),G._writableState.errorEmitted=!0,G.emit("error",Q)}(G,0,Q,q,z);else{var $=j(G,X);!$&&!X.bufferProcessing&&X.buffer.length&&function V(G,q){q.bufferProcessing=!0;for(var X=0;X{var p=y(295);(a=ne.exports=y(15890)).Stream=p,a.Readable=a,a.Writable=y(19859),a.Duplex=y(52652),a.Transform=y(59735),a.PassThrough=y(72936),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=y(295))},23874:(ne,a,y)=>{ne.exports=y(19859)},95203:(ne,a,y)=>{"use strict";var p,C=SyntaxError,w=Function,M=TypeError,u=function(s){try{return w('"use strict"; return ('+s+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var g=function(){throw new M},b=v?function(){try{return arguments.callee,g}catch{try{return v(arguments,"callee").get}catch{return g}}}():g,I=y(92969)(),_=y(49757)(),A=Object.getPrototypeOf||(_?function(s){return s.__proto__}:null),R={},D=typeof Uint8Array>"u"||!A?p:A(Uint8Array),T={"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":I&&A?A([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&A?A(A([][Symbol.iterator]())):p,"%JSON%":"object"==typeof JSON?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!A?p:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!A?p:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&A?A(""[Symbol.iterator]()):p,"%Symbol%":I?Symbol:p,"%SyntaxError%":C,"%ThrowTypeError%":b,"%TypedArray%":D,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet};if(A)try{null.error}catch(s){var F=A(A(s));T["%Error.prototype%"]=F}var L=function s(d){var h;if("%AsyncFunction%"===d)h=u("async function () {}");else if("%GeneratorFunction%"===d)h=u("function* () {}");else if("%AsyncGeneratorFunction%"===d)h=u("async function* () {}");else if("%AsyncGenerator%"===d){var E=s("%AsyncGeneratorFunction%");E&&(h=E.prototype)}else if("%AsyncIteratorPrototype%"===d){var k=s("%AsyncGenerator%");k&&A&&(h=A(k.prototype))}return T[d]=h,h},V={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=y(84444),Z=y(93164),Y=j.call(Function.call,Array.prototype.concat),G=j.call(Function.apply,Array.prototype.splice),q=j.call(Function.call,String.prototype.replace),X=j.call(Function.call,String.prototype.slice),Q=j.call(Function.call,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,S=function(d){var h=X(d,0,1),E=X(d,-1);if("%"===h&&"%"!==E)throw new C("invalid intrinsic syntax, expected closing `%`");if("%"===E&&"%"!==h)throw new C("invalid intrinsic syntax, expected opening `%`");var k=[];return q(d,z,function(B,x,f,P){k[k.length]=f?q(P,$,"$1"):x||B}),k},r=function(d,h){var k,E=d;if(Z(V,E)&&(E="%"+(k=V[E])[0]+"%"),Z(T,E)){var B=T[E];if(B===R&&(B=L(E)),typeof B>"u"&&!h)throw new M("intrinsic "+d+" exists, but is not available. Please file an issue!");return{alias:k,name:E,value:B}}throw new C("intrinsic "+d+" does not exist!")};ne.exports=function(d,h){if("string"!=typeof d||0===d.length)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof h)throw new M('"allowMissing" argument must be a boolean');if(null===Q(/^%?[^%]*%?$/,d))throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var E=S(d),k=E.length>0?E[0]:"",B=r("%"+k+"%",h),x=B.name,f=B.value,P=!1,se=B.alias;se&&(k=se[0],G(E,Y([0,1],se)));for(var te=1,ie=!0;te=E.length){var ve=v(f,de);f=(ie=!!ve)&&"get"in ve&&!("originalValue"in ve.get)?ve.get:f[de]}else ie=Z(f,de),f=f[de];ie&&!P&&(T[x]=f)}}return f}},47378:(ne,a,y)=>{"use strict";var C=y(95203)("%Object.getOwnPropertyDescriptor%",!0);if(C)try{C([],"length")}catch{C=null}ne.exports=C},49757:ne=>{"use strict";var a={foo:{}},y=Object;ne.exports=function(){return{__proto__:a}.foo===a.foo&&!({__proto__:null}instanceof y)}},92969:(ne,a,y)=>{"use strict";var p=typeof Symbol<"u"&&Symbol,C=y(81983);ne.exports=function(){return"function"==typeof p&&"function"==typeof Symbol&&"symbol"==typeof p("foo")&&"symbol"==typeof Symbol("bar")&&C()}},81983:ne=>{"use strict";ne.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var y={},p=Symbol("test"),C=Object(p);if("string"==typeof p||"[object Symbol]"!==Object.prototype.toString.call(p)||"[object Symbol]"!==Object.prototype.toString.call(C))return!1;for(p in y[p]=42,y)return!1;if("function"==typeof Object.keys&&0!==Object.keys(y).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(y).length)return!1;var M=Object.getOwnPropertySymbols(y);if(1!==M.length||M[0]!==p||!Object.prototype.propertyIsEnumerable.call(y,p))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var u=Object.getOwnPropertyDescriptor(y,p);if(42!==u.value||!0!==u.enumerable)return!1}return!0}},46259:(ne,a,y)=>{"use strict";var p=y(81983);ne.exports=function(){return p()&&!!Symbol.toStringTag}},93164:(ne,a,y)=>{"use strict";var p=y(84444);ne.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},39650:(ne,a,y)=>{"use strict";var p=y(73502).Buffer,C=y(65685).Transform;function u(v){C.call(this),this._block=p.allocUnsafe(v),this._blockSize=v,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}y(83894)(u,C),u.prototype._transform=function(v,g,b){var I=null;try{this.update(v,g)}catch(_){I=_}b(I)},u.prototype._flush=function(v){var g=null;try{this.push(this.digest())}catch(b){g=b}v(g)},u.prototype.update=function(v,g){if(function M(v,g){if(!p.isBuffer(v)&&"string"!=typeof v)throw new TypeError(g+" must be a string or a buffer")}(v,"Data"),this._finalized)throw new Error("Digest already called");p.isBuffer(v)||(v=p.from(v,g));for(var b=this._block,I=0;this._blockOffset+v.length-I>=this._blockSize;){for(var _=this._blockOffset;_0;++A)this._length[A]+=R,(R=this._length[A]/4294967296|0)>0&&(this._length[A]-=4294967296*R);return this},u.prototype._update=function(){throw new Error("_update is not implemented")},u.prototype.digest=function(v){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var g=this._digest();void 0!==v&&(g=g.toString(v)),this._block.fill(0),this._blockOffset=0;for(var b=0;b<4;++b)this._length[b]=0;return g},u.prototype._digest=function(){throw new Error("_digest is not implemented")},ne.exports=u},37084:(ne,a,y)=>{var p=a;p.utils=y(29299),p.common=y(33800),p.sha=y(54962),p.ripemd=y(99458),p.hmac=y(12194),p.sha1=p.sha.sha1,p.sha256=p.sha.sha256,p.sha224=p.sha.sha224,p.sha384=p.sha.sha384,p.sha512=p.sha.sha512,p.ripemd160=p.ripemd.ripemd160},33800:(ne,a,y)=>{"use strict";var p=y(29299),C=y(32391);function w(){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}a.BlockHash=w,w.prototype.update=function(u,v){if(u=p.toArray(u,v),this.pending?this.pending=this.pending.concat(u):this.pending=u,this.pendingTotal+=u.length,this.pending.length>=this._delta8){var g=(u=this.pending).length%this._delta8;this.pending=u.slice(u.length-g,u.length),0===this.pending.length&&(this.pending=null),u=p.join32(u,0,u.length-g,this.endian);for(var b=0;b>>24&255,b[I++]=u>>>16&255,b[I++]=u>>>8&255,b[I++]=255&u}else for(b[I++]=255&u,b[I++]=u>>>8&255,b[I++]=u>>>16&255,b[I++]=u>>>24&255,b[I++]=0,b[I++]=0,b[I++]=0,b[I++]=0,_=8;_{"use strict";var p=y(29299),C=y(32391);function w(M,u,v){if(!(this instanceof w))return new w(M,u,v);this.Hash=M,this.blockSize=M.blockSize/8,this.outSize=M.outSize/8,this.inner=null,this.outer=null,this._init(p.toArray(u,v))}ne.exports=w,w.prototype._init=function(u){u.length>this.blockSize&&(u=(new this.Hash).update(u).digest()),C(u.length<=this.blockSize);for(var v=u.length;v{"use strict";var p=y(29299),C=y(33800),w=p.rotl32,M=p.sum32,u=p.sum32_3,v=p.sum32_4,g=C.BlockHash;function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function I(L,V,j,Z){return L<=15?V^j^Z:L<=31?V&j|~V&Z:L<=47?(V|~j)^Z:L<=63?V&Z|j&~Z:V^(j|~Z)}function A(L){return L<=15?1352829926:L<=31?1548603684:L<=47?1836072691:L<=63?2053994217:0}p.inherits(b,g),a.ripemd160=b,b.blockSize=512,b.outSize=160,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(V,j){for(var Z=this.h[0],Y=this.h[1],G=this.h[2],q=this.h[3],X=this.h[4],Q=Z,z=Y,$=G,S=q,r=X,s=0;s<80;s++){var d=M(w(v(Z,I(s,Y,G,q),V[R[s]+j],(L=s)<=15?0:L<=31?1518500249:L<=47?1859775393:L<=63?2400959708:2840853838),T[s]),X);Z=X,X=q,q=w(G,10),G=Y,Y=d,d=M(w(v(Q,I(79-s,z,$,S),V[D[s]+j],A(s)),F[s]),r),Q=r,r=S,S=w($,10),$=z,z=d}var L;d=u(this.h[1],G,S),this.h[1]=u(this.h[2],q,r),this.h[2]=u(this.h[3],X,Q),this.h[3]=u(this.h[4],Z,z),this.h[4]=u(this.h[0],Y,$),this.h[0]=d},b.prototype._digest=function(V){return"hex"===V?p.toHex32(this.h,"little"):p.split32(this.h,"little")};var R=[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],D=[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],T=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],F=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},54962:(ne,a,y)=>{"use strict";a.sha1=y(59007),a.sha224=y(10055),a.sha256=y(19342),a.sha384=y(88634),a.sha512=y(70039)},59007:(ne,a,y)=>{"use strict";var p=y(29299),C=y(33800),w=y(33113),M=p.rotl32,u=p.sum32,v=p.sum32_5,g=w.ft_1,b=C.BlockHash,I=[1518500249,1859775393,2400959708,3395469782];function _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}p.inherits(_,b),ne.exports=_,_.blockSize=512,_.outSize=160,_.hmacStrength=80,_.padLength=64,_.prototype._update=function(R,D){for(var T=this.W,F=0;F<16;F++)T[F]=R[D+F];for(;F{"use strict";var p=y(29299),C=y(19342);function w(){if(!(this instanceof w))return new w;C.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}p.inherits(w,C),ne.exports=w,w.blockSize=512,w.outSize=224,w.hmacStrength=192,w.padLength=64,w.prototype._digest=function(u){return"hex"===u?p.toHex32(this.h.slice(0,7),"big"):p.split32(this.h.slice(0,7),"big")}},19342:(ne,a,y)=>{"use strict";var p=y(29299),C=y(33800),w=y(33113),M=y(32391),u=p.sum32,v=p.sum32_4,g=p.sum32_5,b=w.ch32,I=w.maj32,_=w.s0_256,A=w.s1_256,R=w.g0_256,D=w.g1_256,T=C.BlockHash,F=[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 L(){if(!(this instanceof L))return new L;T.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=F,this.W=new Array(64)}p.inherits(L,T),ne.exports=L,L.blockSize=512,L.outSize=256,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(j,Z){for(var Y=this.W,G=0;G<16;G++)Y[G]=j[Z+G];for(;G{"use strict";var p=y(29299),C=y(70039);function w(){if(!(this instanceof w))return new w;C.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}p.inherits(w,C),ne.exports=w,w.blockSize=1024,w.outSize=384,w.hmacStrength=192,w.padLength=128,w.prototype._digest=function(u){return"hex"===u?p.toHex32(this.h.slice(0,12),"big"):p.split32(this.h.slice(0,12),"big")}},70039:(ne,a,y)=>{"use strict";var p=y(29299),C=y(33800),w=y(32391),M=p.rotr64_hi,u=p.rotr64_lo,v=p.shr64_hi,g=p.shr64_lo,b=p.sum64,I=p.sum64_hi,_=p.sum64_lo,A=p.sum64_4_hi,R=p.sum64_4_lo,D=p.sum64_5_hi,T=p.sum64_5_lo,F=C.BlockHash,L=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function V(){if(!(this instanceof V))return new V;F.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=L,this.W=new Array(160)}function j(d,h,E,k,B){var x=d&E^~d&B;return x<0&&(x+=4294967296),x}function Z(d,h,E,k,B,x){var f=h&k^~h&x;return f<0&&(f+=4294967296),f}function Y(d,h,E,k,B){var x=d&E^d&B^E&B;return x<0&&(x+=4294967296),x}function G(d,h,E,k,B,x){var f=h&k^h&x^k&x;return f<0&&(f+=4294967296),f}function q(d,h){var x=M(d,h,28)^M(h,d,2)^M(h,d,7);return x<0&&(x+=4294967296),x}function X(d,h){var x=u(d,h,28)^u(h,d,2)^u(h,d,7);return x<0&&(x+=4294967296),x}function Q(d,h){var x=M(d,h,14)^M(d,h,18)^M(h,d,9);return x<0&&(x+=4294967296),x}function z(d,h){var x=u(d,h,14)^u(d,h,18)^u(h,d,9);return x<0&&(x+=4294967296),x}function $(d,h){var x=M(d,h,1)^M(d,h,8)^v(d,h,7);return x<0&&(x+=4294967296),x}function S(d,h){var x=u(d,h,1)^u(d,h,8)^g(d,h,7);return x<0&&(x+=4294967296),x}function r(d,h){var x=M(d,h,19)^M(h,d,29)^v(d,h,6);return x<0&&(x+=4294967296),x}function s(d,h){var x=u(d,h,19)^u(h,d,29)^g(d,h,6);return x<0&&(x+=4294967296),x}p.inherits(V,F),ne.exports=V,V.blockSize=1024,V.outSize=512,V.hmacStrength=192,V.padLength=128,V.prototype._prepareBlock=function(h,E){for(var k=this.W,B=0;B<32;B++)k[B]=h[E+B];for(;B{"use strict";var C=y(29299).rotr32;function M(A,R,D){return A&R^~A&D}function u(A,R,D){return A&R^A&D^R&D}function v(A,R,D){return A^R^D}a.ft_1=function w(A,R,D,T){return 0===A?M(R,D,T):1===A||3===A?v(R,D,T):2===A?u(R,D,T):void 0},a.ch32=M,a.maj32=u,a.p32=v,a.s0_256=function g(A){return C(A,2)^C(A,13)^C(A,22)},a.s1_256=function b(A){return C(A,6)^C(A,11)^C(A,25)},a.g0_256=function I(A){return C(A,7)^C(A,18)^A>>>3},a.g1_256=function _(A){return C(A,17)^C(A,19)^A>>>10}},29299:(ne,a,y)=>{"use strict";var p=y(32391),C=y(83894);function w(s,d){return!(55296!=(64512&s.charCodeAt(d))||d<0||d+1>=s.length)&&56320==(64512&s.charCodeAt(d+1))}function v(s){return(s>>>24|s>>>8&65280|s<<8&16711680|(255&s)<<24)>>>0}function b(s){return 1===s.length?"0"+s:s}function I(s){return 7===s.length?"0"+s:6===s.length?"00"+s:5===s.length?"000"+s:4===s.length?"0000"+s:3===s.length?"00000"+s:2===s.length?"000000"+s:1===s.length?"0000000"+s:s}a.inherits=C,a.toArray=function M(s,d){if(Array.isArray(s))return s.slice();if(!s)return[];var h=[];if("string"==typeof s)if(d){if("hex"===d)for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),k=0;k>6|192,h[E++]=63&B|128):w(s,k)?(B=65536+((1023&B)<<10)+(1023&s.charCodeAt(++k)),h[E++]=B>>18|240,h[E++]=B>>12&63|128,h[E++]=B>>6&63|128,h[E++]=63&B|128):(h[E++]=B>>12|224,h[E++]=B>>6&63|128,h[E++]=63&B|128)}else for(k=0;k>>0}return B},a.split32=function A(s,d){for(var h=new Array(4*s.length),E=0,k=0;E>>24,h[k+1]=B>>>16&255,h[k+2]=B>>>8&255,h[k+3]=255&B):(h[k+3]=B>>>24,h[k+2]=B>>>16&255,h[k+1]=B>>>8&255,h[k]=255&B)}return h},a.rotr32=function R(s,d){return s>>>d|s<<32-d},a.rotl32=function D(s,d){return s<>>32-d},a.sum32=function T(s,d){return s+d>>>0},a.sum32_3=function F(s,d,h){return s+d+h>>>0},a.sum32_4=function L(s,d,h,E){return s+d+h+E>>>0},a.sum32_5=function V(s,d,h,E,k){return s+d+h+E+k>>>0},a.sum64=function j(s,d,h,E){var k=s[d],x=E+s[d+1]>>>0,f=(x>>0,s[d+1]=x},a.sum64_hi=function Z(s,d,h,E){return(d+E>>>0>>0},a.sum64_lo=function Y(s,d,h,E){return d+E>>>0},a.sum64_4_hi=function G(s,d,h,E,k,B,x,f){var P=0,se=d;return P+=(se=se+E>>>0)>>0)>>0)>>0},a.sum64_4_lo=function q(s,d,h,E,k,B,x,f){return d+E+B+f>>>0},a.sum64_5_hi=function X(s,d,h,E,k,B,x,f,P,se){var te=0,ie=d;return te+=(ie=ie+E>>>0)>>0)>>0)>>0)>>0},a.sum64_5_lo=function Q(s,d,h,E,k,B,x,f,P,se){return d+E+B+f+se>>>0},a.rotr64_hi=function z(s,d,h){return(d<<32-h|s>>>h)>>>0},a.rotr64_lo=function $(s,d,h){return(s<<32-h|d>>>h)>>>0},a.shr64_hi=function S(s,d,h){return s>>>h},a.shr64_lo=function r(s,d,h){return(s<<32-h|d>>>h)>>>0}},52438:(ne,a,y)=>{"use strict";var p=y(37084),C=y(58195),w=y(32391);function M(u){if(!(this instanceof M))return new M(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 v=C.toArray(u.entropy,u.entropyEnc||"hex"),g=C.toArray(u.nonce,u.nonceEnc||"hex"),b=C.toArray(u.pers,u.persEnc||"hex");w(v.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(v,g,b)}ne.exports=M,M.prototype._init=function(v,g,b){var I=v.concat(g).concat(b);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var _=0;_=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(v.concat(b||[])),this._reseed=1},M.prototype.generate=function(v,g,b,I){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof g&&(I=b,b=g,g=null),b&&(b=C.toArray(b,I||"hex"),this._update(b));for(var _=[];_.length{var p=y(74216),C=y(68762),w=ne.exports;for(var M in p)p.hasOwnProperty(M)&&(w[M]=p[M]);function u(v){if("string"==typeof v&&(v=C.parse(v)),v.protocol||(v.protocol="https:"),"https:"!==v.protocol)throw new Error('Protocol "'+v.protocol+'" not supported. Expected "https:"');return v}w.request=function(v,g){return v=u(v),p.request.call(this,v,g)},w.get=function(v,g){return v=u(v),p.get.call(this,v,g)}},17294:function(ne,a,y){var p,C;!function(w,M,u){"use strict";p=function(){var w=function(A){throw A},M=function(){},u={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:w,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},v=function(A,R){for(var D in typeof R>"u"&&"function"==typeof A&&(R=A),"[object Object]"!=Object.prototype.toString.call(A)&&(A={}),u)this[D]=typeof A[D]<"u"?A[D]:u[D];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,R&&(this.onStoreReady=R);var T="object"==typeof window?window:self,F=this.implementationPreference.filter(function(L){return L in T});this.implementation=F[0],this.idb=T[this.implementation],this.keyRange=T.IDBKeyRange||T.webkitIDBKeyRange||T.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},g={constructor:v,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var A=this.idb.open(this.dbName,this.dbVersion),R=!1;A.onerror=function(D){if(_(D))this.onError(new Error("The version number provided is lower than the existing one."));else{var T;if(D.target.error)T=D.target.error;else{var F="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in D.target&&(F+=" with error code "+D.target.errorCode),T=new Error(F)}this.onError(T)}}.bind(this),A.onsuccess=function(D){if(!R){if(this.db)return void this.onStoreReady();if(this.db=D.target.result,"string"==typeof this.db.version)return void this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));if(!this.db.objectStoreNames.contains(this.storeName))return void this.onError(new Error("Object store couldn't be created."));var T=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=T.objectStore(this.storeName);var F=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(L){var V=L.name;if(!V)return R=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(L),this.hasIndex(V)){var j=this.store.index(V);this.indexComplies(j,L)||(R=!0,this.onError(new Error('Cannot modify index "'+V+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),F.splice(F.indexOf(V),1)}else R=!0,this.onError(new Error('Cannot create new index "'+V+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))},this),F.length&&(R=!0,this.onError(new Error('Cannot delete index(es) "'+F.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),R||this.onStoreReady()}}.bind(this),A.onupgradeneeded=function(D){if(this.db=D.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=D.target.transaction.objectStore(this.storeName);else{var T={autoIncrement:this.autoIncrement};null!==this.keyPath&&(T.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,T)}var F=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(L){var V=L.name;if(V||(R=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(L),this.hasIndex(V)){var j=this.store.index(V);this.indexComplies(j,L)||(this.store.deleteIndex(V),this.store.createIndex(V,L.keyPath,{unique:L.unique,multiEntry:L.multiEntry})),F.splice(F.indexOf(V),1)}else this.store.createIndex(V,L.keyPath,{unique:L.unique,multiEntry:L.multiEntry})},this),F.length&&F.forEach(function(L){this.store.deleteIndex(L)},this)}.bind(this)},deleteDatabase:function(A,R){if(this.idb.deleteDatabase){this.db.close();var D=this.idb.deleteDatabase(this.dbName);D.onsuccess=A,D.onerror=R}else R(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(A,R,D,T){null!==this.keyPath&&(T=D,D=R,R=A),T||(T=w),D||(D=M);var V,F=!1,L=null,j=this.db.transaction([this.storeName],this.consts.READ_WRITE);return j.oncomplete=function(){(F?D:T)(L)},j.onabort=T,j.onerror=T,null!==this.keyPath?(this._addIdPropertyIfNeeded(R),V=j.objectStore(this.storeName).put(R)):V=j.objectStore(this.storeName).put(R,A),V.onsuccess=function(Z){F=!0,L=Z.target.result},V.onerror=T,j},get:function(A,R,D){D||(D=w),R||(R=M);var T=!1,F=null,L=this.db.transaction([this.storeName],this.consts.READ_ONLY);L.oncomplete=function(){(T?R:D)(F)},L.onabort=D,L.onerror=D;var V=L.objectStore(this.storeName).get(A);return V.onsuccess=function(j){T=!0,F=j.target.result},V.onerror=D,L},remove:function(A,R,D){D||(D=w),R||(R=M);var T=!1,F=null,L=this.db.transaction([this.storeName],this.consts.READ_WRITE);L.oncomplete=function(){(T?R:D)(F)},L.onabort=D,L.onerror=D;var V=L.objectStore(this.storeName).delete(A);return V.onsuccess=function(j){T=!0,F=j.target.result},V.onerror=D,L},batch:function(A,R,D){if(D||(D=w),R||(R=M),"[object Array]"!=Object.prototype.toString.call(A))D(new Error("dataArray argument must be of type Array."));else if(0===A.length)return R(!0);var T=A.length,F=!1,L=!1,V=this.db.transaction([this.storeName],this.consts.READ_WRITE);V.oncomplete=function(){(L?R:D)(L)},V.onabort=D,V.onerror=D;var j=function(){0===--T&&!F&&(F=!0,L=!0)};return A.forEach(function(Z){var Y=Z.type,G=Z.key,q=Z.value,X=function($){V.abort(),F||(F=!0,D($,Y,G))};if("remove"==Y){var Q=V.objectStore(this.storeName).delete(G);Q.onsuccess=j,Q.onerror=X}else if("put"==Y){var z;null!==this.keyPath?(this._addIdPropertyIfNeeded(q),z=V.objectStore(this.storeName).put(q)):z=V.objectStore(this.storeName).put(q,G),z.onsuccess=j,z.onerror=X}},this),V},putBatch:function(A,R,D){var T=A.map(function(F){return{type:"put",value:F}});return this.batch(T,R,D)},upsertBatch:function(A,R,D,T){"function"==typeof R&&(T=D=R,R={}),T||(T=w),D||(D=M),R||(R={}),"[object Array]"!=Object.prototype.toString.call(A)&&T(new Error("dataArray argument must be of type Array."));var F=R.keyField||this.keyPath,L=A.length,V=!1,j=!1,Z=0,Y=this.db.transaction([this.storeName],this.consts.READ_WRITE);Y.oncomplete=function(){j?D(A):T(!1)},Y.onabort=T,Y.onerror=T;var G=function(q){A[Z++][F]=q.target.result,0===--L&&!V&&(V=!0,j=!0)};return A.forEach(function(q){var z,X=q.key,Q=function($){Y.abort(),V||(V=!0,T($))};null!==this.keyPath?(this._addIdPropertyIfNeeded(q),z=Y.objectStore(this.storeName).put(q)):z=Y.objectStore(this.storeName).put(q,X),z.onsuccess=G,z.onerror=Q},this),Y},removeBatch:function(A,R,D){var T=A.map(function(F){return{type:"remove",key:F}});return this.batch(T,R,D)},getBatch:function(A,R,D,T){if(D||(D=w),R||(R=M),T||(T="sparse"),"[object Array]"!=Object.prototype.toString.call(A))D(new Error("keyArray argument must be of type Array."));else if(0===A.length)return R([]);var F=[],L=A.length,j=!1,Z=null,Y=this.db.transaction([this.storeName],this.consts.READ_ONLY);Y.oncomplete=function(){(j?R:D)(Z)},Y.onabort=D,Y.onerror=D;var G=function(q){q.target.result||"dense"==T?F.push(q.target.result):"sparse"==T&&F.length++,0===--L&&(!0,j=!0,Z=F)};return A.forEach(function(q){var X=function(z){!0,Z=z,D(z),Y.abort()},Q=Y.objectStore(this.storeName).get(q);Q.onsuccess=G,Q.onerror=X},this),Y},getAll:function(A,R){R||(R=w),A||(A=M);var D=this.db.transaction([this.storeName],this.consts.READ_ONLY),T=D.objectStore(this.storeName);return T.getAll?this._getAllNative(D,T,A,R):this._getAllCursor(D,T,A,R),D},_getAllNative:function(A,R,D,T){var F=!1,L=null;A.oncomplete=function(){(F?D:T)(L)},A.onabort=T,A.onerror=T;var V=R.getAll();V.onsuccess=function(j){F=!0,L=j.target.result},V.onerror=T},_getAllCursor:function(A,R,D,T){var F=[],L=!1,V=null;A.oncomplete=function(){(L?D:T)(V)},A.onabort=T,A.onerror=T;var j=R.openCursor();j.onsuccess=function(Z){var Y=Z.target.result;Y?(F.push(Y.value),Y.continue()):(L=!0,V=F)},j.onError=T},clear:function(A,R){R||(R=w),A||(A=M);var D=!1,T=null,F=this.db.transaction([this.storeName],this.consts.READ_WRITE);F.oncomplete=function(){(D?A:R)(T)},F.onabort=R,F.onerror=R;var L=F.objectStore(this.storeName).clear();return L.onsuccess=function(V){D=!0,T=V.target.result},L.onerror=R,F},_addIdPropertyIfNeeded:function(A){typeof A[this.keyPath]>"u"&&(A[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(A){return this.store.indexNames.contains(A)},normalizeIndexData:function(A){A.keyPath=A.keyPath||A.name,A.unique=!!A.unique,A.multiEntry=!!A.multiEntry},indexComplies:function(A,R){return["keyPath","unique","multiEntry"].every(function(T){if("multiEntry"==T&&void 0===A[T]&&!1===R[T])return!0;if("keyPath"==T&&"[object Array]"==Object.prototype.toString.call(R[T])){var F=R.keyPath,L=A.keyPath;if("string"==typeof L)return F.toString()==L;if("function"!=typeof L.contains&&"function"!=typeof L.indexOf||L.length!==F.length)return!1;for(var V=0,j=F.length;V{a.read=function(y,p,C,w,M){var u,v,g=8*M-w-1,b=(1<>1,_=-7,A=C?M-1:0,R=C?-1:1,D=y[p+A];for(A+=R,u=D&(1<<-_)-1,D>>=-_,_+=g;_>0;u=256*u+y[p+A],A+=R,_-=8);for(v=u&(1<<-_)-1,u>>=-_,_+=w;_>0;v=256*v+y[p+A],A+=R,_-=8);if(0===u)u=1-I;else{if(u===b)return v?NaN:1/0*(D?-1:1);v+=Math.pow(2,w),u-=I}return(D?-1:1)*v*Math.pow(2,u-w)},a.write=function(y,p,C,w,M,u){var v,g,b,I=8*u-M-1,_=(1<>1,R=23===M?Math.pow(2,-24)-Math.pow(2,-77):0,D=w?0:u-1,T=w?1:-1,F=p<0||0===p&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(g=isNaN(p)?1:0,v=_):(v=Math.floor(Math.log(p)/Math.LN2),p*(b=Math.pow(2,-v))<1&&(v--,b*=2),(p+=v+A>=1?R/b:R*Math.pow(2,1-A))*b>=2&&(v++,b/=2),v+A>=_?(g=0,v=_):v+A>=1?(g=(p*b-1)*Math.pow(2,M),v+=A):(g=p*Math.pow(2,A-1)*Math.pow(2,M),v=0));M>=8;y[C+D]=255&g,D+=T,g/=256,M-=8);for(v=v<0;y[C+D]=255&v,D+=T,v/=256,I-=8);y[C+D-T]|=128*F}},83894:ne=>{"function"==typeof Object.create?ne.exports=function(y,p){p&&(y.super_=p,y.prototype=Object.create(p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}))}:ne.exports=function(y,p){if(p){y.super_=p;var C=function(){};C.prototype=p.prototype,y.prototype=new C,y.prototype.constructor=y}}},13407:(ne,a,y)=>{"use strict";var p=y(46259)(),w=y(75834)("Object.prototype.toString"),M=function(b){return!(p&&b&&"object"==typeof b&&Symbol.toStringTag in b)&&"[object Arguments]"===w(b)},u=function(b){return!!M(b)||null!==b&&"object"==typeof b&&"number"==typeof b.length&&b.length>=0&&"[object Array]"!==w(b)&&"[object Function]"===w(b.callee)},v=function(){return M(arguments)}();M.isLegacyArguments=u,ne.exports=v?M:u},20110:(ne,a,y)=>{"use strict";var g,p=Object.prototype.toString,C=Function.prototype.toString,w=/^\s*(?:function)?\*/,M=y(46259)(),u=Object.getPrototypeOf;ne.exports=function(I){if("function"!=typeof I)return!1;if(w.test(C.call(I)))return!0;if(!M)return"[object GeneratorFunction]"===p.call(I);if(!u)return!1;if(typeof g>"u"){var A=function(){if(!M)return!1;try{return Function("return function*() {}")()}catch{}}();g=!!A&&u(A)}return u(I)===g}},48214:ne=>{"use strict";ne.exports=C,ne.exports.isMobile=C,ne.exports.default=C;const a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,y=/CrOS/,p=/android|ipad|playbook|silk/i;function C(w){w||(w={});let M=w.ua;if(!M&&typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&"string"==typeof M.headers["user-agent"]&&(M=M.headers["user-agent"]),"string"!=typeof M)return!1;let u=a.test(M)&&!y.test(M)||!!w.tablet&&p.test(M);return!u&&w.tablet&&w.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==M.indexOf("Macintosh")&&-1!==M.indexOf("Safari")&&(u=!0),u}},55782:ne=>{var a=Object.prototype,y=a.hasOwnProperty,p=a.toString,C=function(u){return u!=u},w={boolean:1,number:1,string:1,undefined:1},M=ne.exports={};M.a=M.type=function(u,v){return typeof u===v},M.defined=function(u){return void 0!==u},M.empty=function(u){var g,v=p.call(u);if("[object Array]"===v||"[object Arguments]"===v)return 0===u.length;if("[object Object]"===v){for(g in u)if(y.call(u,g))return!1;return!0}return"[object String]"===v&&""===u},M.equal=function(u,v){var b,g=p.call(u);if(g!==p.call(v))return!1;if("[object Object]"===g){for(b in u)if(!M.equal(u[b],v[b]))return!1;return!0}if("[object Array]"===g){if((b=u.length)!==v.length)return!1;for(;--b;)if(!M.equal(u[b],v[b]))return!1;return!0}return"[object Function]"===g?u.prototype===v.prototype:"[object Date]"===g?u.getTime()===v.getTime():u===v},M.hosted=function(u,v){var g=typeof v[u];return"object"===g?!!v[u]:!w[g]},M.instance=M.instanceof=function(u,v){return u instanceof v},M.null=function(u){return null===u},M.undefined=function(u){return void 0===u},M.arguments=function(u){var v="[object Arguments]"===p.call(u),g=!M.array(u)&&M.arraylike(u)&&M.object(u)&&M.fn(u.callee);return v||g},M.array=function(u){return"[object Array]"===p.call(u)},M.arguments.empty=function(u){return M.arguments(u)&&0===u.length},M.array.empty=function(u){return M.array(u)&&0===u.length},M.arraylike=function(u){return!!u&&!M.boolean(u)&&y.call(u,"length")&&isFinite(u.length)&&M.number(u.length)&&u.length>=0},M.boolean=function(u){return"[object Boolean]"===p.call(u)},M.false=function(u){return M.boolean(u)&&(!1===u||!1===u.valueOf())},M.true=function(u){return M.boolean(u)&&(!0===u||!0===u.valueOf())},M.date=function(u){return"[object Date]"===p.call(u)},M.element=function(u){return void 0!==u&&typeof HTMLElement<"u"&&u instanceof HTMLElement&&1===u.nodeType},M.error=function(u){return"[object Error]"===p.call(u)},M.fn=M.function=function(u){return typeof window<"u"&&u===window.alert||"[object Function]"===p.call(u)},M.number=function(u){return"[object Number]"===p.call(u)},M.infinite=function(u){return u===1/0||u===-1/0},M.decimal=function(u){return M.number(u)&&!C(u)&&!M.infinite(u)&&u%1!=0},M.divisibleBy=function(u,v){var g=M.infinite(u),b=M.infinite(v),I=M.number(u)&&!C(u)&&M.number(v)&&!C(v)&&0!==v;return g||b||I&&u%v==0},M.int=function(u){return M.number(u)&&!C(u)&&u%1==0},M.maximum=function(u,v){if(C(u))throw new TypeError("NaN is not a valid value");if(!M.arraylike(v))throw new TypeError("second argument must be array-like");for(var g=v.length;--g>=0;)if(u=0;)if(u>v[g])return!1;return!0},M.nan=function(u){return!M.number(u)||u!=u},M.even=function(u){return M.infinite(u)||M.number(u)&&u==u&&u%2==0},M.odd=function(u){return M.infinite(u)||M.number(u)&&u==u&&u%2!=0},M.ge=function(u,v){if(C(u)||C(v))throw new TypeError("NaN is not a valid value");return!M.infinite(u)&&!M.infinite(v)&&u>=v},M.gt=function(u,v){if(C(u)||C(v))throw new TypeError("NaN is not a valid value");return!M.infinite(u)&&!M.infinite(v)&&u>v},M.le=function(u,v){if(C(u)||C(v))throw new TypeError("NaN is not a valid value");return!M.infinite(u)&&!M.infinite(v)&&u<=v},M.lt=function(u,v){if(C(u)||C(v))throw new TypeError("NaN is not a valid value");return!M.infinite(u)&&!M.infinite(v)&&u=v&&u<=g},M.object=function(u){return u&&"[object Object]"===p.call(u)},M.hash=function(u){return M.object(u)&&u.constructor===Object&&!u.nodeType&&!u.setInterval},M.regexp=function(u){return"[object RegExp]"===p.call(u)},M.string=function(u){return"[object String]"===p.call(u)}},66425:ne=>{ne.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},40452:(ne,a,y)=>{var p=y(93172).Buffer;ne.exports=function C(w){return p.isBuffer(w)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(w))}},1520:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ne){return"[object Array]"===Object.prototype.toString.call(ne)}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ne){return"object"==typeof ne&&ne.buffer&&ne.buffer.constructor===ArrayBuffer});var createOutputMethod=function(ne,a){return function(y){return new Sha256(a,!0).update(y)[ne]()}},createMethod=function(ne){var a=createOutputMethod("hex",ne);NODE_JS&&(a=nodeWrap(a,ne)),a.create=function(){return new Sha256(ne)},a.update=function(C){return a.create().update(C)};for(var y=0;y>6,w[u++]=128|63&v):v<55296||v>=57344?(w[u++]=224|v>>12,w[u++]=128|v>>6&63,w[u++]=128|63&v):(v=65536+((1023&v)<<10|1023&ne.charCodeAt(++p)),w[u++]=240|v>>18,w[u++]=128|v>>12&63,w[u++]=128|v>>6&63,w[u++]=128|63&v);ne=w}else{if("object"!==C)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR)}ne.length>64&&(ne=new Sha256(a,!0).update(ne).array());var g=[],b=[];for(p=0;p<64;++p){var I=ne[p]||0;g[p]=92^I,b[p]=54^I}Sha256.call(this,a,y),this.update(b),this.oKeyPad=g,this.inner=!0,this.sharedMemory=y}Sha256.prototype.update=function(ne){if(!this.finalized){var a,y=typeof ne;if("string"!==y){if("object"!==y)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR);a=!0}for(var p,w,C=0,M=ne.length,u=this.blocks;C>2]|=ne[C]<>2]|=p<>2]|=(192|p>>6)<>2]|=(128|63&p)<=57344?(u[w>>2]|=(224|p>>12)<>2]|=(128|p>>6&63)<>2]|=(128|63&p)<>2]|=(240|p>>18)<>2]|=(128|p>>12&63)<>2]|=(128|p>>6&63)<>2]|=(128|63&p)<=64?(this.block=u[16],this.start=w-64,this.hash(),this.hashed=!0):this.start=w}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ne=this.blocks,a=this.lastByteIndex;ne[16]=this.block,ne[a>>2]|=EXTRA[3&a],this.block=ne[16],a>=56&&(this.hashed||this.hash(),ne[0]=this.block,ne[16]=ne[1]=ne[2]=ne[3]=ne[4]=ne[5]=ne[6]=ne[7]=ne[8]=ne[9]=ne[10]=ne[11]=ne[12]=ne[13]=ne[14]=ne[15]=0),ne[14]=this.hBytes<<3|this.bytes>>>29,ne[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var g,b,I,_,A,T,F,L,V,ne=this.h0,a=this.h1,y=this.h2,p=this.h3,C=this.h4,w=this.h5,M=this.h6,u=this.h7,v=this.blocks;for(g=16;g<64;++g)b=((A=v[g-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,I=((A=v[g-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,v[g]=v[g-16]+b+v[g-7]+I<<0;for(V=a&y,g=0;g<64;g+=4)this.first?(this.is224?(T=300032,u=(A=v[0]-1413257819)-150054599<<0,p=A+24177077<<0):(T=704751109,u=(A=v[0]-210244248)-1521486534<<0,p=A+143694565<<0),this.first=!1):(b=(ne>>>2|ne<<30)^(ne>>>13|ne<<19)^(ne>>>22|ne<<10),_=(T=ne&a)^ne&y^V,u=p+(A=u+(I=(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))+(C&w^~C&M)+K[g]+v[g])<<0,p=A+(b+_)<<0),b=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),_=(F=p&ne)^p&a^T,M=y+(A=M+(I=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&C^~u&w)+K[g+1]+v[g+1])<<0,b=((y=A+(b+_)<<0)>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),_=(L=y&p)^y&ne^F,w=a+(A=w+(I=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7))+(M&u^~M&C)+K[g+2]+v[g+2])<<0,b=((a=A+(b+_)<<0)>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10),_=(V=a&y)^a&p^L,C=ne+(A=C+(I=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&M^~w&u)+K[g+3]+v[g+3])<<0,ne=A+(b+_)<<0;this.h0=this.h0+ne<<0,this.h1=this.h1+a<<0,this.h2=this.h2+y<<0,this.h3=this.h3+p<<0,this.h4=this.h4+C<<0,this.h5=this.h5+w<<0,this.h6=this.h6+M<<0,this.h7=this.h7+u<<0},Sha256.prototype.hex=function(){this.finalize();var ne=this.h0,a=this.h1,y=this.h2,p=this.h3,C=this.h4,w=this.h5,M=this.h6,u=this.h7,v=HEX_CHARS[ne>>28&15]+HEX_CHARS[ne>>24&15]+HEX_CHARS[ne>>20&15]+HEX_CHARS[ne>>16&15]+HEX_CHARS[ne>>12&15]+HEX_CHARS[ne>>8&15]+HEX_CHARS[ne>>4&15]+HEX_CHARS[15&ne]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]+HEX_CHARS[y>>28&15]+HEX_CHARS[y>>24&15]+HEX_CHARS[y>>20&15]+HEX_CHARS[y>>16&15]+HEX_CHARS[y>>12&15]+HEX_CHARS[y>>8&15]+HEX_CHARS[y>>4&15]+HEX_CHARS[15&y]+HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[15&p]+HEX_CHARS[C>>28&15]+HEX_CHARS[C>>24&15]+HEX_CHARS[C>>20&15]+HEX_CHARS[C>>16&15]+HEX_CHARS[C>>12&15]+HEX_CHARS[C>>8&15]+HEX_CHARS[C>>4&15]+HEX_CHARS[15&C]+HEX_CHARS[w>>28&15]+HEX_CHARS[w>>24&15]+HEX_CHARS[w>>20&15]+HEX_CHARS[w>>16&15]+HEX_CHARS[w>>12&15]+HEX_CHARS[w>>8&15]+HEX_CHARS[w>>4&15]+HEX_CHARS[15&w]+HEX_CHARS[M>>28&15]+HEX_CHARS[M>>24&15]+HEX_CHARS[M>>20&15]+HEX_CHARS[M>>16&15]+HEX_CHARS[M>>12&15]+HEX_CHARS[M>>8&15]+HEX_CHARS[M>>4&15]+HEX_CHARS[15&M];return this.is224||(v+=HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[15&u]),v},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var ne=this.h0,a=this.h1,y=this.h2,p=this.h3,C=this.h4,w=this.h5,M=this.h6,u=this.h7,v=[ne>>24&255,ne>>16&255,ne>>8&255,255&ne,a>>24&255,a>>16&255,a>>8&255,255&a,y>>24&255,y>>16&255,y>>8&255,255&y,p>>24&255,p>>16&255,p>>8&255,255&p,C>>24&255,C>>16&255,C>>8&255,255&C,w>>24&255,w>>16&255,w>>8&255,255&w,M>>24&255,M>>16&255,M>>8&255,255&M];return this.is224||v.push(u>>24&255,u>>16&255,u>>8&255,255&u),v},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var ne=new ArrayBuffer(this.is224?28:32),a=new DataView(ne);return a.setUint32(0,this.h0),a.setUint32(4,this.h1),a.setUint32(8,this.h2),a.setUint32(12,this.h3),a.setUint32(16,this.h4),a.setUint32(20,this.h5),a.setUint32(24,this.h6),this.is224||a.setUint32(28,this.h7),ne},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var ne=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(ne),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},54237:(ne,a,y)=>{var p;!function(){"use strict";var C="input is invalid type",M="object"==typeof window,u=M?window:{};u.JS_SHA3_NO_WINDOW&&(M=!1);var v=!M&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?u=global:v&&(u=self);var b=!u.JS_SHA3_NO_COMMON_JS&&ne.exports,I=y.amdO,_=!u.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",A="0123456789abcdef".split(""),D=[4,1024,262144,67108864],L=[0,8,16,24],V=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],j=[224,256,384,512],Z=[128,256],Y=["hex","buffer","arrayBuffer","array","digest"],G={128:168,256:136};(u.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ye){return"[object Array]"===Object.prototype.toString.call(ye)}),_&&(u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ye){return"object"==typeof ye&&ye.buffer&&ye.buffer.constructor===ArrayBuffer});for(var q=function(ye,ve,ae){return function(fe){return new ie(ye,ve,ye).update(fe)[ae]()}},X=function(ye,ve,ae){return function(fe,pe){return new ie(ye,ve,pe).update(fe)[ae]()}},Q=function(ye,ve,ae){return function(fe,pe,Ee,ce){return E["cshake"+ye].update(fe,pe,Ee,ce)[ae]()}},z=function(ye,ve,ae){return function(fe,pe,Ee,ce){return E["kmac"+ye].update(fe,pe,Ee,ce)[ae]()}},$=function(ye,ve,ae,fe){for(var pe=0;pe>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var fe=0;fe<50;++fe)this.s[fe]=0}function de(ye,ve,ae){ie.call(this,ye,ve,ae)}ie.prototype.update=function(ye){if(this.finalized)throw new Error("finalize already called");var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(C);if(null===ye)throw new Error(C);if(_&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||_&&ArrayBuffer.isView(ye)))throw new Error(C);ve=!0}for(var Fe,ct,fe=this.blocks,pe=this.byteCount,Ee=ye.length,ce=this.blockCount,be=0,Ne=this.s;be>2]|=ye[be]<>2]|=ct<>2]|=(192|ct>>6)<>2]|=(128|63&ct)<=57344?(fe[Fe>>2]|=(224|ct>>12)<>2]|=(128|ct>>6&63)<>2]|=(128|63&ct)<>2]|=(240|ct>>18)<>2]|=(128|ct>>12&63)<>2]|=(128|ct>>6&63)<>2]|=(128|63&ct)<=pe){for(this.start=Fe-pe,this.block=fe[ce],Fe=0;Fe>=8);ae>0;)pe.unshift(ae),ae=255&(ye>>=8),++fe;return ve?pe.push(fe):pe.unshift(fe),this.update(pe),pe.length},ie.prototype.encodeString=function(ye){var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(C);if(null===ye)throw new Error(C);if(_&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||_&&ArrayBuffer.isView(ye)))throw new Error(C);ve=!0}var fe=0,pe=ye.length;if(ve)fe=pe;else for(var Ee=0;Ee=57344?fe+=3:(ce=65536+((1023&ce)<<10|1023&ye.charCodeAt(++Ee)),fe+=4)}return fe+=this.encode(8*fe),this.update(ye),fe},ie.prototype.bytepad=function(ye,ve){for(var ae=this.encode(ve),fe=0;fe>2]|=this.padding[3&ve],this.lastByteIndex===this.byteCount)for(ye[0]=ye[ae],ve=1;ve>4&15]+A[15&be]+A[be>>12&15]+A[be>>8&15]+A[be>>20&15]+A[be>>16&15]+A[be>>28&15]+A[be>>24&15];Ee%ye==0&&(Ce(ve),pe=0)}return fe&&(be=ve[pe],ce+=A[be>>4&15]+A[15&be],fe>1&&(ce+=A[be>>12&15]+A[be>>8&15]),fe>2&&(ce+=A[be>>20&15]+A[be>>16&15])),ce},ie.prototype.arrayBuffer=function(){this.finalize();var be,ye=this.blockCount,ve=this.s,ae=this.outputBlocks,fe=this.extraBytes,pe=0,Ee=0,ce=this.outputBits>>3;be=fe?new ArrayBuffer(ae+1<<2):new ArrayBuffer(ce);for(var Ne=new Uint32Array(be);Ee>8&255,ce[be+2]=Ne>>16&255,ce[be+3]=Ne>>24&255;Ee%ye==0&&Ce(ve)}return fe&&(be=Ee<<2,Ne=ve[pe],ce[be]=255&Ne,fe>1&&(ce[be+1]=Ne>>8&255),fe>2&&(ce[be+2]=Ne>>16&255)),ce},de.prototype=new ie,de.prototype.finalize=function(){return this.encode(this.outputBits,!0),ie.prototype.finalize.call(this)};var Ce=function(ye){var ve,ae,fe,pe,Ee,ce,be,Ne,Fe,ct,Ze,Ve,Ut,$e,tt,Xt,ot,st,$t,Pe,Ae,xe,Be,ze,mt,Ye,ut,ln,ft,wt,mn,We,Qe,Qt,ht,gt,on,dt,pt,yn,lt,vt,En,yt,At,Se,we,_e,me,De,Ke,it,Je,qe,Ht,Ct,Lt,Tt,Pt,Bt,Zt,qt,fn;for(fe=0;fe<48;fe+=2)pe=ye[0]^ye[10]^ye[20]^ye[30]^ye[40],Ee=ye[1]^ye[11]^ye[21]^ye[31]^ye[41],ce=ye[2]^ye[12]^ye[22]^ye[32]^ye[42],be=ye[3]^ye[13]^ye[23]^ye[33]^ye[43],Ne=ye[4]^ye[14]^ye[24]^ye[34]^ye[44],Fe=ye[5]^ye[15]^ye[25]^ye[35]^ye[45],ct=ye[6]^ye[16]^ye[26]^ye[36]^ye[46],Ze=ye[7]^ye[17]^ye[27]^ye[37]^ye[47],ve=(Ve=ye[8]^ye[18]^ye[28]^ye[38]^ye[48])^(ce<<1|be>>>31),ae=(Ut=ye[9]^ye[19]^ye[29]^ye[39]^ye[49])^(be<<1|ce>>>31),ye[0]^=ve,ye[1]^=ae,ye[10]^=ve,ye[11]^=ae,ye[20]^=ve,ye[21]^=ae,ye[30]^=ve,ye[31]^=ae,ye[40]^=ve,ye[41]^=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ye[24]=dt^~yn&vt,ye[25]=pt^~lt&En,ye[34]=_e^~De&it,ye[35]=me^~Ke&Je,ye[44]=Tt^~Bt&qt,ye[45]=Pt^~Zt&fn,ye[6]=Pe^~xe&$e,ye[7]=Ae^~Be&tt,ye[16]=wt^~We&ze,ye[17]=mn^~Qe&mt,ye[26]=yn^~vt&Qt,ye[27]=lt^~En&ht,ye[36]=De^~it&yt,ye[37]=Ke^~Je&At,ye[46]=Bt^~qt&qe,ye[47]=Zt^~fn&Ht,ye[8]=xe^~$e&Xt,ye[9]=Be^~tt&ot,ye[18]=We^~ze&Ye,ye[19]=Qe^~mt&ut,ye[28]=vt^~Qt>,ye[29]=En^~ht&on,ye[38]=it^~yt&Se,ye[39]=Je^~At&we,ye[48]=qt^~qe&Ct,ye[49]=fn^~Ht&Lt,ye[0]^=V[fe],ye[1]^=V[fe+1]};if(b)ne.exports=E;else{for(B=0;B{"use strict";var a=ne.exports=function(C,w,M){"function"==typeof w&&(M=w,w={}),y(w,"function"==typeof(M=w.cb||M)?M:M.pre||function(){},M.post||function(){},C,"",C)};function y(C,w,M,u,v,g,b,I,_,A){if(u&&"object"==typeof u&&!Array.isArray(u)){for(var R in w(u,v,g,b,I,_,A),u){var D=u[R];if(Array.isArray(D)){if(R in a.arrayKeywords)for(var T=0;T{var p=y(73669),C=y(91050),w=y(68429),M=y(26788),u=y(46389),v=new Buffer(0),g={encode:function(A){return"string"==typeof A?A=new Buffer(A):A},decode:function(A){return Buffer.isBuffer(A)?A:new Buffer(A)},buffer:!0,type:"raw"},b=function(){},I=function(A){return A=A.toString(16),"00000000".slice(0,-A.length)+A};ne.exports=function(A,R){R||(R={});var D={},T=R.blockSize||65536,F=R.batch||100,L=new Buffer(T);A.put("\0","ignore",b);var V={},j=function(G,q,X,Q,z){var $=function(){--V[G].locks||delete V[G]},S=function(r){if(r.locks++,!r.block&&!q)return r.block=X,void z(null,r.block,$);r.block||(r.block=new Buffer(T)),r.block.length$&&(z=G.slice($),G=G.slice(0,$)),this.bytesWritten+=G.length,this.blockLength+=G.length,this.blocks.push(G),G.length<$)return S();this._writeBlock(S)},Z.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,process.nextTick(this.emit.bind(this,"close")))},Z.prototype.end=function(G){var q=this,X=arguments;G&&"function"!=typeof G&&(this.write(G),G=v),this.write(v,function(){q._writeBlock(function(Q){if(Q)return q.emit("error",Q);q._flush(function(z){if(z)return q.emit("error",z);p.prototype.end.apply(q,X)})})})};var Y=function(G,q){q||(q={});var X=this,Q=q.start||0,z=Q/T|0,$=Q-z*T,S=G+"\xff"+I(z);this.name=G,this._missing=("number"==typeof q.end?q.end:1/0)-Q+1,this._paused=!1,this._destroyed=!1,this._reader=A.createReadStream({start:S,end:G+"\xff\xff",valueEncoding:g});var r=function(s){return S=G+"\xff"+I(++z),!!X._missing&&(!(!$||(s=s.slice($),$=0,s.length))||(s.length>X._missing&&(s=s.slice(0,X._missing)),X._missing-=s.length,X._pause(!X.push(s)),!!X._missing))};this._reader.on("data",function(s){for(;s.key>S;)if(!r(L))return;r(s.value)}),this._reader.on("error",function(s){X.emit("error",s)}),this._reader.on("end",function(){X.push(null)}),C.call(this)};return M.inherits(Y,C),Y.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._reader.destroy(),process.nextTick(this.emit.bind(this,"close")))},Y.prototype._pause=function(G){this._paused!==G&&(this._paused=G,this._paused?this._reader.pause():this._reader.resume())},Y.prototype._read=function(){this._pause(!1)},D.remove=function(G,q){q=u(q||b);var X=[],Q=A.createKeyStream({start:G+"\xff",end:G+"\xff\xff"});Q.on("error",q),Q.on("data",function(z){X.push({type:"del",key:z})}),Q.on("end",function(){A.batch(X,q)})},D.size=function(G,q){w.last(A,{start:G+"\xff",end:G+"\xff\xff",valueEncoding:g},function(X,Q,z){return X&&"range not found"===X.message?q(null,0):X?q(X):Q.slice(0,G.length+1)!==G+"\xff"?q(null,0):void q(null,parseInt(Q.toString().slice(G.length+1),16)*T+z.length)})},D.write=function(G,q,X,Q){if("function"==typeof X)return D.write(G,q,null,X);X||(X={}),Q||(Q=b);var z=D.createWriteStream(G,X);z.on("error",Q),z.on("finish",function(){Q()}),z.write(q),z.end()},D.read=function(G,q,X){if("function"==typeof q)return D.read(G,null,q);q||(q={});var Q=D.createReadStream(G,q),z=[];Q.on("error",X),Q.on("data",function($){z.push($)}),Q.on("end",function(){X(null,1===z.length?z[0]:Buffer.concat(z))})},D.createReadStream=function(G,q){return new Y(G,q)},D.createWriteStream=function(G,q){return new Z(G,q)},D}},60833:(ne,a,y)=>{ne.exports=u;var p=Object.keys||function(b){var I=[];for(var _ in b)I.push(_);return I},C=y(26156);C.inherits=y(83894);var w=y(28460),M=y(37067);function u(b){if(!(this instanceof u))return new u(b);w.call(this,b),M.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}C.inherits(u,w),function g(b,I){for(var _=0,A=b.length;_{ne.exports=w;var p=y(68081),C=y(26156);function w(M){if(!(this instanceof w))return new w(M);p.call(this,M)}C.inherits=y(83894),C.inherits(w,p),w.prototype._transform=function(M,u,v){v(null,M)}},28460:(ne,a,y)=>{ne.exports=I;var p=y(66425),C=y(93172).Buffer;I.ReadableState=b;var w=y(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(s,d){return s.listeners(d).length});var M=y(295),u=y(26156);u.inherits=y(83894);var v,g=y(6297);function b(s,d){var h=y(60833),E=(s=s||{}).highWaterMark,k=s.objectMode?16:16384;this.highWaterMark=E||0===E?E:k,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!s.objectMode,d instanceof h&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.defaultEncoding=s.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(v||(v=y(15453).s),this.decoder=new v(s.encoding),this.encoding=s.encoding)}function I(s){y(60833);if(!(this instanceof I))return new I(s);this._readableState=new b(s,this),this.readable=!0,M.call(this)}function _(s,d,h,E,k){var B=function F(s,d){var h=null;return!u.isBuffer(d)&&!u.isString(d)&&!u.isNullOrUndefined(d)&&!s.objectMode&&(h=new TypeError("Invalid non-string/buffer chunk")),h}(d,h);if(B)s.emit("error",B);else if(u.isNullOrUndefined(h))d.reading=!1,d.ended||function L(s,d){if(d.decoder&&!d.ended){var h=d.decoder.end();h&&h.length&&(d.buffer.push(h),d.length+=d.objectMode?1:h.length)}d.ended=!0,V(s)}(s,d);else if(d.objectMode||h&&h.length>0)if(d.ended&&!k){var x=new Error("stream.push() after EOF");s.emit("error",x)}else if(d.endEmitted&&k){x=new Error("stream.unshift() after end event");s.emit("error",x)}else d.decoder&&!k&&!E&&(h=d.decoder.write(h)),k||(d.reading=!1),d.flowing&&0===d.length&&!d.sync?(s.emit("data",h),s.read(0)):(d.length+=d.objectMode?1:h.length,k?d.buffer.unshift(h):d.buffer.push(h),d.needReadable&&V(s)),function Z(s,d){d.readingMore||(d.readingMore=!0,process.nextTick(function(){!function Y(s,d){for(var h=d.length;!d.reading&&!d.flowing&&!d.ended&&d.lengthd.highWaterMark&&(d.highWaterMark=function D(s){if(s>=R)s=R;else{s--;for(var d=1;d<32;d<<=1)s|=s>>d;s++}return s}(s)),s>d.length?d.ended?d.length:(d.needReadable=!0,0):s)}function V(s){var d=s._readableState;d.needReadable=!1,d.emittedReadable||(g("emitReadable",d.flowing),d.emittedReadable=!0,d.sync?process.nextTick(function(){j(s)}):j(s))}function j(s){g("emit readable"),s.emit("readable"),Q(s)}function Q(s){var d=s._readableState;if(g("flow",d.flowing),d.flowing)do{var h=s.read()}while(null!==h&&d.flowing)}function z(s,d){var x,h=d.buffer,E=d.length,k=!!d.decoder,B=!!d.objectMode;if(0===h.length)return null;if(0===E)x=null;else if(B)x=h.shift();else if(!s||s>=E)x=k?h.join(""):C.concat(h,E),h.length=0;else if(s0)throw new Error("endReadable called on non-empty stream");d.endEmitted||(d.ended=!0,process.nextTick(function(){!d.endEmitted&&0===d.length&&(d.endEmitted=!0,s.readable=!1,s.emit("end"))}))}I.prototype.read=function(s){g("read",s);var d=this._readableState,h=s;if((!u.isNumber(s)||s>0)&&(d.emittedReadable=!1),0===s&&d.needReadable&&(d.length>=d.highWaterMark||d.ended))return g("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?$(this):V(this),null;if(0===(s=T(s,d))&&d.ended)return 0===d.length&&$(this),null;var k,E=d.needReadable;return g("need readable",E),(0===d.length||d.length-s0?z(s,d):null,u.isNull(k)&&(d.needReadable=!0,s=0),d.length-=s,0===d.length&&!d.ended&&(d.needReadable=!0),h!==s&&d.ended&&0===d.length&&$(this),u.isNull(k)||this.emit("data",k),k},I.prototype._read=function(s){this.emit("error",new Error("not implemented"))},I.prototype.pipe=function(s,d){var h=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=s;break;case 1:E.pipes=[E.pipes,s];break;default:E.pipes.push(s)}E.pipesCount+=1,g("pipe count=%d opts=%j",E.pipesCount,d);var B=(!d||!1!==d.end)&&s!==process.stdout&&s!==process.stderr?f:se;function x(ve){g("onunpipe"),ve===h&&se()}function f(){g("onend"),s.end()}E.endEmitted?process.nextTick(B):h.once("end",B),s.on("unpipe",x);var P=function G(s){return function(){var d=s._readableState;g("pipeOnDrain",d.awaitDrain),d.awaitDrain&&d.awaitDrain--,0===d.awaitDrain&&w.listenerCount(s,"data")&&(d.flowing=!0,Q(s))}}(h);function se(){g("cleanup"),s.removeListener("close",de),s.removeListener("finish",Ce),s.removeListener("drain",P),s.removeListener("error",ie),s.removeListener("unpipe",x),h.removeListener("end",f),h.removeListener("end",se),h.removeListener("data",te),E.awaitDrain&&(!s._writableState||s._writableState.needDrain)&&P()}function te(ve){g("ondata"),!1===s.write(ve)&&(g("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function ie(ve){g("onerror",ve),ye(),s.removeListener("error",ie),0===w.listenerCount(s,"error")&&s.emit("error",ve)}function de(){s.removeListener("finish",Ce),ye()}function Ce(){g("onfinish"),s.removeListener("close",de),ye()}function ye(){g("unpipe"),h.unpipe(s)}return s.on("drain",P),h.on("data",te),s._events&&s._events.error?p(s._events.error)?s._events.error.unshift(ie):s._events.error=[ie,s._events.error]:s.on("error",ie),s.once("close",de),s.once("finish",Ce),s.emit("pipe",h),E.flowing||(g("pipe resume"),h.resume()),s},I.prototype.unpipe=function(s){var d=this._readableState;if(0===d.pipesCount)return this;if(1===d.pipesCount)return s&&s!==d.pipes||(s||(s=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,s&&s.emit("unpipe",this)),this;if(!s){var h=d.pipes,E=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var k=0;k{ne.exports=u;var p=y(60833),C=y(26156);function w(g,b){this.afterTransform=function(I,_){return function M(g,b,I){var _=g._transformState;_.transforming=!1;var A=_.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,C.isNullOrUndefined(I)||g.push(I),A&&A(b);var R=g._readableState;R.reading=!1,(R.needReadable||R.length{ne.exports=v;var p=y(93172).Buffer;v.WritableState=u;var C=y(26156);C.inherits=y(83894);var w=y(295);function M(q,X,Q){this.chunk=q,this.encoding=X,this.callback=Q}function u(q,X){var Q=y(60833),z=(q=q||{}).highWaterMark,$=q.objectMode?16:16384;this.highWaterMark=z||0===z?z:$,this.objectMode=!!q.objectMode,X instanceof Q&&(this.objectMode=this.objectMode||!!q.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var S=!1===q.decodeStrings;this.decodeStrings=!S,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(r){!function T(q,X){var Q=q._writableState,z=Q.sync,$=Q.writecb;if(function D(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}(Q),X)!function R(q,X,Q,z,$){Q?process.nextTick(function(){X.pendingcb--,$(z)}):(X.pendingcb--,$(z)),q._writableState.errorEmitted=!0,q.emit("error",z)}(q,Q,z,X,$);else{var S=j(q,Q);!S&&!Q.corked&&!Q.bufferProcessing&&Q.buffer.length&&V(q,Q),z?process.nextTick(function(){F(q,Q,S,$)}):F(q,Q,S,$)}}(X,r)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function v(q){var X=y(60833);if(!(this instanceof v||this instanceof X))return new v(q);this._writableState=new u(q,this),this.writable=!0,w.call(this)}function A(q,X,Q,z,$,S,r){X.writelen=z,X.writecb=r,X.writing=!0,X.sync=!0,Q?q._writev($,X.onwrite):q._write($,S,X.onwrite),X.sync=!1}function F(q,X,Q,z){Q||function L(q,X){0===X.length&&X.needDrain&&(X.needDrain=!1,q.emit("drain"))}(q,X),X.pendingcb--,z(),Y(q,X)}function V(q,X){if(X.bufferProcessing=!0,q._writev&&X.buffer.length>1){for(var Q=[],z=0;z{(a=ne.exports=y(28460)).Stream=y(295),a.Readable=a,a.Writable=y(37067),a.Duplex=y(60833),a.Transform=y(68081),a.PassThrough=y(43813),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=y(295))},73669:(ne,a,y)=>{ne.exports=y(37067)},37057:(ne,a,y)=>{var p=y(3161);Object.keys(p.code).forEach(function(C){var w=p.code[C];a[C]=function(M){var u=new Error(C+", "+w.description+(M?" '"+M+"'":""));return u.errno=w.errno,u.code=C,u.path=M,u}})},94115:(ne,a,y)=>{var p=y(2997),C=y(74162),w=y(95882),M=y(68429),u=y(46389),v=y(39199),g=y(37057),b=y(74514),I=y(1077),_=function(R,D,T){process.nextTick(function(){R(D,T)})},A=function(){};ne.exports=function(R,D){var T={};R=C(R);var F=w(R.sublevel("blobs"),D),L=b(R.sublevel("stats")),V=R.sublevel("links"),j=I(),Z=[],Y=Date.now();T.mkdir=function(z,$,S){if("function"==typeof $)return T.mkdir(z,null,$);$||($=v(777)),S||(S=A),L.follow(z,function(r,s,d){return r&&"ENOENT"!==r.code?S(r):s?S(g.EEXIST(d)):void L.put(d,{type:"directory",mode:$,size:4096},j.cb(d,S))})},T.rmdir=function(z,$){$||($=A),L.follow(z,function(S,r,s){if(S)return $(S);T.readdir(s,function(d,h){return d?$(d):h.length?$(g.ENOTEMPTY(s)):void L.del(s,j.cb(s,$))})})},T.readdir=function(z,$){L.follow(z,function(S,r,s){return S?$(S):r?r.isDirectory()?void L.list(s,$):$(g.ENOTDIR(s)):$(g.ENOENT(s))})};var q=function(z,$,S){$(z,function(r,s,d){if(r)return S(r);if(!s.isFile())return S(null,s);var h=s&&s.blob||d;F.size(h,function(E,k){if(E)return S(E);s.size=k,S(null,s)})})};T.stat=function(z,$){q(z,L.follow,$)},T.lstat=function(z,$){q(z,L.get,$)},T.exists=function(z,$){L.follow(z,function(S){$(!S)})};var X=function(z,$,S,r){r||(r=A),$(z,function(s,d,h){if(s)return r(s);L.update(h,{mode:S},j.cb(h,r))})};T.chmod=function(z,$,S){X(z,L.follow,$,S)},T.lchmod=function(z,$,S){X(z,L.get,$,S)};var Q=function(z,$,S,r,s){s||(s=A),$(z,function(d,h,E){if(d)return s(d);L.update(E,{uid:S,gid:r},j.cb(E,s))})};return T.chown=function(z,$,S,r){Q(z,L.follow,$,S,r)},T.lchown=function(z,$,S,r){Q(z,L.get,$,S,r)},T.utimes=function(z,$,S,r){r||(r=A),L.follow(z,function(s,d,h){if(s)return r(s);var E={};$&&(E.atime=$),S&&(E.mtime=S),L.update(h,E,j.cb(h,r))})},T.rename=function(z,$,S){S||(S=A),L.follow(z,function(r,s,d){if(r)return S(r);var h=function(){S=j.cb($,j.cb(d,S)),L.put($,s,function(E){if(E)return S(E);L.del(d,S)})};L.follow($,function(E,k,B){return E&&"ENOENT"!==E.code?S(E):k?s.isDirectory()!==k.isDirectory()?S(g.EISDIR(d)):void(k.isDirectory()?T.readdir(B,function(x,f){return x?S(x):f.length?S(g.ENOTEMPTY(d)):void h()}):h()):h()})})},T.realpath=function(z,$,S){if("function"==typeof $)return T.realpath(z,null,$);L.follow(z,function(r,s,d){if(r)return S(r);S(null,d)})},T.writeFile=function(z,$,S,r){if("function"==typeof S)return T.writeFile(z,$,null,S);"string"==typeof S&&(S={encoding:S}),S||(S={}),r||(r=A),Buffer.isBuffer($)||($=new Buffer($,S.encoding||"utf-8"));var s=S.flags||"w";S.append="w"!==s[0],L.follow(z,function(d,h,E){if(d&&"ENOENT"!==d.code)return r(d);if(h&&h.isDirectory())return r(g.EISDIR(E));if(h&&"x"===s[1])return r(g.EEXIST(E));var k=h&&h.blob||E;L.writable(E,function(B){if(B)return r(B);F.write(k,$,S,function(x){if(x)return r(x);L.put(E,{ctime:h&&h.ctime,mtime:new Date,mode:S.mode||v(666),type:"file"},j.cb(E,r))})})})},T.appendFile=function(z,$,S,r){if("function"==typeof S)return T.appendFile(z,$,null,S);"string"==typeof S&&(S={encoding:S}),S||(S={}),S.flags="a",T.writeFile(z,$,S,r)},T.unlink=function(z,$){$||($=A),L.get(z,function(S,r,s){if(S)return $(S);if(r.isDirectory())return $(g.EISDIR(s));var d=function(E){M(V,{start:E+"\xff",end:E+"\xff\xff"},function(k){if(k)return F.remove(E,$);$()})};L.del(s,j.cb(s,function(E){return E?$(E):r.link?function(){var E=r.link.slice(0,r.link.indexOf("\xff"));V.del(r.link,function(k){if(k)return $(k);d(E)})}():void V.del(s+"\xff",function(k){if(k)return $(k);d(s)})}))})},T.readFile=function(z,$,S){if("function"==typeof $)return T.readFile(z,null,$);"string"==typeof $&&($={encoding:$}),$||($={});$.encoding,$.flag;L.follow(z,function(d,h,E){if(d)return S(d);if(h.isDirectory())return S(g.EISDIR(E));var k=h&&h.blob||E;F.read(k,function(B,x){if(B)return S(B);S(null,$.encoding?x.toString($.encoding):x)})})},T.createReadStream=function(z,$){$||($={});var S=!1,r=p.readable(function(s){L.follow(z,function(d,h,E){if(d)return s(d);if(h.isDirectory())return s(g.EISDIR(E));var k=h&&h.blob||E,B=F.createReadStream(k,$);r.emit("open"),B.on("end",function(){process.nextTick(function(){S||r.emit("close")})}),s(null,B)})});return r.on("close",function(){S=!0}),r},T.createWriteStream=function(z,$){$||($={});var S=$.flags||"w",r=!1,s=$.mode||v(666);$.append="a"===S[0];var d=p.writable(function(h){L.follow(z,function(E,k,B){if(E&&"ENOENT"!==E.code)return h(E);if(k&&k.isDirectory())return h(g.EISDIR(B));if(k&&"x"===S[1])return h(g.EEXIST(B));var x=k&&k.blob||B;L.writable(x,function(f){if(f)return h(f);var se={ctime:k?k.ctime:new Date,mtime:new Date,mode:s,type:"file"};L.put(B,se,function(te){if(te)return h(te);var ie=F.createWriteStream(x,$);d.emit("open"),ie.on("finish",function(){se.mtime=new Date,L.put(B,se,function(){j.change(B),r||d.emit("close")})}),h(null,ie)})})})});return d.on("close",function(){r=!0}),d},T.truncate=function(z,$,S){L.follow(z,function(r,s,d){if(r)return S(r);var h=s&&s.blob||d;F.size(h,function(E,k){if(E)return S(E);L.writable(d,function(B){if(B)return S(B);if(S=u(j.cb(d,S)),!$)return F.remove(h,S);var x=F.createWriteStream(h,{start:k<$?$-1:$});x.on("error",S),x.on("finish",S),k<$&&x.write(new Buffer([0])),x.end()})})})},T.watchFile=function(z,$,S){return"function"==typeof $?T.watchFile(z,null,$):j.watch(L.normalize(z),S)},T.unwatchFile=function(z,$){j.unwatch(L.normalize(z),$)},T.watch=function(z,$,S){return"function"==typeof $?T.watch(z,null,$):j.watcher(L.normalize(z),S)},T.notify=function(z){j.on("change",z)},T.open=function(z,$,S,r){if("function"==typeof S)return T.open(z,$,null,S);L.follow(z,function(s,d,h){if(s&&"ENOENT"!==s.code)return r(s);var E=$[0],k="+"===$[1]||"+"===$[2],B=d&&d.blob||h,x={key:h,blob:B,mode:S||v(666),readable:"r"===E||("w"===E||"a"===E)&&k,writable:"w"===E||"a"===E||"r"===E&&k,append:"a"===E};return"r"===E&&s?r(s):"x"===$[1]&&d?r(g.EEXIST(h)):d&&d.isDirectory()?r(g.EISDIR(h)):void F.size(B,function(f,P){if(f)return r(f);x.append&&(x.writePos=P),L.writable(h,function(se){if(se)return r(se);var te=function(de){if(de)return r(de);var Ce=Z.indexOf(null);-1===Ce&&(Ce=10+Z.push(Z.length+10)-1),x.fd=Ce,Z[Ce]=x,j.change(h),r(null,x.fd)},ie=function(de){return de?r(de):d?te():void L.put(B,{ctime:d&&d.ctime,type:"file"},te)};if(!x.append&&x.writable)return F.remove(B,ie);ie()})})})},T.close=function(z,$){var S=Z[z];if(!S)return _($,g.EBADF());Z[z]=null,_(j.cb(S.key,$))},T.write=function(z,$,S,r,s,d){var h=Z[z];if(d||(d=A),!h||!h.writable)return _(d,g.EBADF());null===s&&(s=h.writePos||0);var E=$.slice(S,S+r);h.writePos=s+E.length,F.write(h.blob,E,{start:s,append:!0},function(k){if(k)return d(k);d(null,r,$)})},T.read=function(z,$,S,r,s,d){var h=Z[z];if(d||(d=A),!h||!h.readable)return _(d,g.EBADF());null===s&&(s=T.readPos||0),F.read(h.blob,{start:s,end:s+r-1},function(E,k){if(E)return d(E);var B=k.slice(0,r);B.copy($,S),T.readPos=s+B.length,d(null,B.length,$)})},T.fsync=function(z,$){var S=Z[z];if($||($=A),!S||!S.writable)return _($,g.EBADF());_($)},T.ftruncate=function(z,$,S){var r=Z[z];if(S||(S=A),!r)return _(S,g.EBADF());T.truncate(r.blob,$,S)},T.fchown=function(z,$,S,r){var s=Z[z];if(r||(r=A),!s)return _(r,g.EBADF());T.chown(s.key,$,S,r)},T.fchmod=function(z,$,S){var r=Z[z];if(S||(S=A),!r)return _(S,g.EBADF());T.chmod(r.key,$,S)},T.futimes=function(z,$,S,r){var s=Z[z];if(r||(r=A),!s)return _(r,g.EBADF());T.utimes(s.key,$,S,r)},T.fstat=function(z,$){var S=Z[z];if(!S)return _($,g.EBADF());T.stat(S.key,$)},T.symlink=function(z,$,S){S||(S=A),L.follow(z,function(r,s,d){if(r)return S(r);L.get($,function(h,E){return h&&"ENOENT"!==h.code?S(h):E?S(g.EEXIST($)):void L.put($,{type:"symlink",target:d,mode:v(777)},S)})})},T.readlink=function(z,$){L.get(z,function(S,r){return S?$(S):r.target?void $(null,r.target):$(g.EINVAL(z))})},T.link=function(z,$,S){S||(S=A),L.follow(z,function(r,s,d){return r?S(r):s.isFile()?void L.get($,function(h,E){if(h&&"ENOENT"!==h.code)return S(h);if(E)return S(g.EEXIST($));var k=d+"\xff"+ ++Y;V.put(d+"\xff",d,function(B){if(B)return S(B);V.put(k,d,function(x){if(x)return S(x);L.put($,{type:"file",link:k,blob:d,mode:s.mode},S)})})}):S(g.EINVAL(d))})},T}},78170:ne=>{ne.exports=function a(y){return null!==y&&("object"==typeof y||"function"==typeof y)}},48505:(ne,a,y)=>{var p=y(78170);ne.exports=function C(){for(var w={},M=0;M{var p=y(63928),C=y(46389),w=y(39448),M=y(39199),u=y(90163),v=y(48505),g=y(37057),b=u({type:"directory",mode:M(777),size:4096}),I=function(A){return A="/"===A[0]?A:"/"+A,"/"===(A=p.normalize(A))?A:"/"===A[A.length-1]?A.slice(0,-1):A},_=function(A){var R=A.split("/").length.toString(36);return"0000000000".slice(R.length)+R+A};ne.exports=function(A){var R={};R.normalize=I,R.get=function(T,F){if("/"===(T=I(T)))return process.nextTick(F.bind(null,null,b,"/"));A.get(_(T),{valueEncoding:"json"},function(L,V){return L&&L.notFound?F(g.ENOENT(T),null,T):L?F(L,null,T):void F(null,u(V),T)})},R.writable=function(T,F){if("/"===(T=I(T)))return process.nextTick(F.bind(null,g.EPERM(T)));R.follow(p.dirname(T),function(L,V){return L?F(L):V.isDirectory()?void F(null,T):F(g.ENOTDIR(T))})},R.list=function(T,F){T=I(T);var L=_("/"===T?T:T+"/"),V=A.createKeyStream({start:L,end:L+"\xff"});F=C(F),V.on("error",F),V.pipe(w({encoding:"object"},function(j){j=j.map(function(Z){return Z.split("/").pop()}),F(null,j)}))};return R.follow=function(T,F){!function(T,F){var L="/",V=T.split("/").slice(1),j=function(){R.get(p.join(L,V.shift()),function(Z,Y,G){return Z?F(Z,Y,T):(L=Y.target||G,V.length?void j():F(null,Y,G))})};j()}(I(T),function L(V,j,Z){return V?F(V,null,Z):j.target?R.get(j.target,L):void F(null,u(j),Z)})},R.update=function(T,F,L){R.get(T,function(V,j,Z){return V?L(V):"/"===Z?L(g.EPERM(Z)):void R.put(Z,v(j,F),L)})},R.put=function(T,F,L){R.writable(T,function(V,j){if(V)return L(V);A.put(_(j),u(F),{valueEncoding:"json"},L)})},R.del=function(T,F){if("/"===(T=I(T)))return process.nextTick(F.bind(null,g.EPERM(T)));A.del(_(T),F)},R}},90163:ne=>{var a=function(p){return p?"string"==typeof p?new Date(p):p:new Date},y=function(p){this.uid=p.uid||0,this.gid=p.gid||0,this.mode=p.mode||0,this.size=p.size||0,this.mtime=a(p.mtime),this.atime=a(p.atime),this.ctime=a(p.ctime),this.type=p.type,this.target=p.target,this.link=p.link,this.blob=p.blob};y.prototype.isDirectory=function(){return"directory"===this.type},y.prototype.isFile=function(){return"file"===this.type},y.prototype.isBlockDevice=function(){return!1},y.prototype.isCharacterDevice=function(){return!1},y.prototype.isSymbolicLink=function(){return"symlink"===this.type},y.prototype.isFIFO=function(){return!1},y.prototype.isSocket=function(){return!1},ne.exports=function(p){return new y(p)}},1077:(ne,a,y)=>{var p=y(59069);ne.exports=function(){var C={},w=new p.EventEmitter;return w.watch=function(M,u){return C[M]||(C[M]=new p.EventEmitter,C[M].setMaxListeners(0)),u&&C[M].on("change",u),C[M]},w.watcher=function(M,u){var v=new p.EventEmitter,g=function(){v.emit("change","change",M)};return w.watch(M,g),u&&v.on("change",u),v.close=function(){w.unwatch(M,g)},v},w.unwatch=function(M,u){C[M]&&(u?C[M].removeListener("change",u):C[M].removeAllListeners("change"),C[M].listeners("change").length||delete C[M])},w.change=function(M){C[M]&&C[M].emit("change"),w.emit("change",M)},w.cb=function(M,u){return function(v,g){M&&w.change(M),u&&u(v,g)}},w}},55860:(ne,a,y)=>{var p=y(87241);ne.exports=function(w){var M=(w=p(w)).reverse,u=w.max||w.end,v=w.min||w.start,g=[v,u];return null!=v&&null!=u&&g.sort(),M&&(g=g.reverse()),w.start=g[0],w.end=g[1],delete w.min,delete w.max,w}},87241:ne=>{"use strict";function a(C){return Object.prototype.toString.call(C)}var y={isArray:function(C){return Array.isArray(C)||"object"==typeof C&&"[object Array]"===a(C)},isDate:function(C){return"object"==typeof C&&"[object Date]"===a(C)},isRegExp:function(C){return"object"==typeof C&&"[object RegExp]"===a(C)},getRegExpFlags:function(C){var w="";return C.global&&(w+="g"),C.ignoreCase&&(w+="i"),C.multiline&&(w+="m"),w}};function p(C,w,M,u){var v=[],g=[],b=typeof Buffer<"u";return typeof w>"u"&&(w=!0),typeof M>"u"&&(M=1/0),function I(_,A){if(null===_)return null;if(0==A)return _;var R,D;if("object"!=typeof _)return _;if(y.isArray(_))R=[];else if(y.isRegExp(_))R=new RegExp(_.source,y.getRegExpFlags(_)),_.lastIndex&&(R.lastIndex=_.lastIndex);else if(y.isDate(_))R=new Date(_.getTime());else{if(b&&Buffer.isBuffer(_))return R=new Buffer(_.length),_.copy(R),R;typeof u>"u"?(D=Object.getPrototypeOf(_),R=Object.create(D)):(R=Object.create(u),D=u)}if(w){var T=v.indexOf(_);if(-1!=T)return g[T];v.push(_),g.push(R)}for(var F in _){var L;D&&(L=Object.getOwnPropertyDescriptor(D,F)),(!L||null!=L.set)&&(R[F]=I(_[F],A-1))}return R}(C,M)}ne.exports=p,p.clonePrototype=function(C){if(null===C)return null;var w=function(){};return w.prototype=C,new w}},71175:(ne,a,y)=>{var p=y(77826);ne.exports=function(C){if(!C.hooks){var w=[],M=[];C.hooks={post:function(T,F){F||(F=T,T="");var L={test:p.checker(T),hook:F};return w.push(L),b(w,L)},pre:function(T,F){F||(F=T,T="");var L={test:p.checker(T),hook:F,safe:!1!==T.safe};return M.push(L),b(M,L)},posthooks:w,prehooks:M},C.on("put",function(T,F){I({type:"put",key:T,value:F})}),C.on("del",function(T,F){I({type:"del",key:T,value:F})}),C.on("batch",function(F){F.forEach(I)});var _=C.put,A=C.del,R=C.batch;C.put=function(T,F,L,V){return D(!1,[{key:T,value:F,type:"put"}],L,V)},C.del=function(T,F,L){return D(!1,[{key:T,type:"del"}],F,L)},C.batch=function(T,F,L){return D(!0,T,F,L)}}function u(T){return T&&("string"==typeof T?T:"string"==typeof T.prefix?T.prefix:"function"==typeof T.prefix?T.prefix():"")}function b(T,F){return function(){var L=T.indexOf(F);return!!~L&&(T.splice(L,1),!0)}}function I(T){T&&T.type&&w.forEach(function(F){F.test(T.key)&&F.hook(T)})}function D(T,F,L,V){try{F.forEach(function Z(Y,G){M.forEach(function(q){if(q.test(String(Y.key))){var X={add:function(Q,z){if(typeof Q>"u")return this;if(!1===Q)return delete F[G];var $=u(Q.prefix)||u(z)||q.prefix||"";if($&&(Q.prefix=$),Q.key=$+Q.key,q.safe&&q.test(String(Q.key)))throw new Error("prehook cannot insert into own range");var S=Q.keyEncoding||function v(T){if(T&&T._getKeyEncoding)return T._getKeyEncoding(T)}(Q.prefix),r=Q.valueEncoding||function g(T){if(T&&T._getValueEncoding)return T._getValueEncoding(T)}(Q.prefix);return S&&(Q.keyEncoding=S),r&&(Q.valueEncoding=r),F.push(Q),Z(Q,F.length-1),this},put:function(Q,z){return"object"==typeof Q&&(Q.type="put"),this.add(Q,z)},del:function(Q,z){return"object"==typeof Q&&(Q.type="del"),this.add(Q,z)},veto:function(){return this.add(!1)}};q.hook.call(X,Y,X.add,F)}})})}catch(Z){return(V||L)(Z)}if(1==(F=F.filter(function(Z){return Z&&Z.type})).length&&!T){var j=F[0];return"put"==j.type?_.call(C,j.key,j.value,L,V):A.call(C,j.key,L,V)}return R.call(C,F,L,V)}}},77105:(ne,a,y)=>{ne.exports=b;var p=y(17294),C=y(30826).NI,w=y(26788),M=y(74148),u=y(40452),v=y(4205),g=y(28517);function b(_){if(!(this instanceof b))return new b(_);if(!_)throw new Error("constructor requires at least a location argument");this.IDBOptions={},this.location=_}w.inherits(b,C),b.prototype._open=function(_,A){var R=this,D={storeName:this.location,autoIncrement:!1,keyPath:null,onStoreReady:function(){A&&A(null,R.idb)},onError:function(T){A&&A(T)}};v(D,_),this.IDBOptions=D,this.idb=new p(D)},b.prototype._get=function(_,A,R){this.idb.get(_,function(D){if(void 0===D)return R(new Error("NotFound"));var T=!0;return!1===A.asBuffer&&(T=!1),A.raw&&(T=!1),T&&(D=D instanceof Uint8Array?g(D):new Buffer(String(D))),R(null,D,_)},R)},b.prototype._del=function(_,A,R){this.idb.remove(_,R,R)},b.prototype._put=function(_,A,R,D){A instanceof ArrayBuffer&&(A=g(new Uint8Array(A)));var T=this.convertEncoding(_,A,R);Buffer.isBuffer(T.value)&&("function"==typeof A.toArrayBuffer?T.value=new Uint8Array(A.toArrayBuffer()):T.value=new Uint8Array(A)),this.idb.put(T.key,T.value,function(){D()},D)},b.prototype.convertEncoding=function(_,A,R){if(R.raw)return{key:_,value:A};if(A){var D=A.toString();"NaN"===D&&(A="NaN")}var T=R.valueEncoding,F={key:_,value:A};return A&&(!T||"binary"!==T)&&"object"!=typeof F.value&&(F.value=D),F},b.prototype.iterator=function(_){return"object"!=typeof _&&(_={}),new M(this.idb,_)},b.prototype._batch=function(_,A,R){var T,F,L,V,j=[];if(0===_.length)return setTimeout(R,0);for(T=0;T<_.length;T++){L={},V=_[T],j[T]=L;var Z=this.convertEncoding(V.key,V.value,A);for(F in V.key=Z.key,V.value=Z.value,V)"type"===F&&"del"==V[F]?L[F]="remove":L[F]=V[F]}return this.idb.batch(j,function(){R()},R)},b.prototype._close=function(_){this.idb.db.close(),_()},b.prototype._approximateSize=function(_,A,R){var D=new Error("Not implemented");if(R)return R(D);throw D},b.prototype._isBuffer=function(_){return Buffer.isBuffer(_)},b.destroy=function(_,A){if("object"==typeof _)var R=_.IDBOptions.storePrefix||"IDBWrapper-",D=_.location;else R="IDBWrapper-",D=_;var T=indexedDB.deleteDatabase(R+D);T.onsuccess=function(){A()},T.onerror=function(F){A(F)}};b.prototype._checkKeyValue=function(_,A){return null==_||null==_?new Error(A+" cannot be `null` or `undefined`"):u(_)&&0===_.byteLength?new Error(A+" cannot be an empty ArrayBuffer"):""===String(_)?new Error(A+" cannot be an empty String"):0===_.length?new Error(A+" cannot be an empty Array"):void 0}},74148:(ne,a,y)=>{var p=y(26788),C=y(30826).YI,w=y(52820);function M(u,v){v||(v={}),this.options=v,C.call(this,u),this._order=v.reverse?"DESC":"ASC",this._limit=v.limit,this._count=0,this._done=!1;var g=w.lowerBound(v),b=w.upperBound(v);try{this._keyRange=g||b?this.db.makeKeyRange({lower:g,upper:b,excludeLower:w.lowerBoundExclusive(v),excludeUpper:w.upperBoundExclusive(v)}):null}catch{this._keyRangeError=!0}this.callback=null}ne.exports=M,p.inherits(M,C),M.prototype.createIterator=function(){var u=this;u.iterator=u.db.iterate(function(){u.onItem.apply(u,arguments)},{keyRange:u._keyRange,autoContinue:!1,order:u._order,onError:function(v){console.log("horrible error",v)}})},M.prototype.onItem=function(u,v,g){if(!v&&this.callback)return this.callback(),void(this.callback=!1);var b=!0;this._limit&&this._limit>0&&this._count++>=this._limit&&(b=!1),b&&this.callback(!1,v.key,v.value),v&&v.continue()},M.prototype._next=function(u){return u?this._keyRangeError?u():(this._started||(this.createIterator(),this._started=!0),void(this.callback=u)):new Error("next() requires a callback argument")}},94442:ne=>{var a=Object.prototype.hasOwnProperty,y=Object.prototype.toString,p=function(C){var w="function"==typeof C&&!(C instanceof RegExp)||"[object Function]"===y.call(C);return!w&&typeof window<"u"&&(w=C===window.setTimeout||C===window.alert||C===window.confirm||C===window.prompt),w};ne.exports=function(w,M){if(!p(M))throw new TypeError("iterator must be a function");var u,v,g="string"==typeof w,b=w.length,I=arguments.length>2?arguments[2]:null;if(b===+b)for(u=0;u{ne.exports=Object.keys||y(5741)},71133:ne=>{var a=Object.prototype.toString;ne.exports=function(p){var C=a.call(p),w="[object Arguments]"===C;return w||(w="[object Array]"!==C&&null!==p&&"object"==typeof p&&"number"==typeof p.length&&p.length>=0&&"[object Function]"===a.call(p.callee)),w}},5741:(ne,a,y)=>{!function(){"use strict";var b,p=Object.prototype.hasOwnProperty,C=Object.prototype.toString,w=y(94442),M=y(71133),u=!{toString:null}.propertyIsEnumerable("toString"),v=function(){}.propertyIsEnumerable("prototype"),g=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];b=function(_){var A=null!==_&&"object"==typeof _,R="[object Function]"===C.call(_),D=M(_),T=[];if(!A&&!R&&!D)throw new TypeError("Object.keys called on a non-object");if(D)w(_,function(Z){T.push(Z)});else{var F,L=v&&R;for(F in _)(!L||"prototype"!==F)&&p.call(_,F)&&T.push(F)}if(u){var V=_.constructor,j=V&&V.prototype===_;w(g,function(Z){(!j||"constructor"!==Z)&&p.call(_,Z)&&T.push(Z)})}return T},ne.exports=b}()},2968:ne=>{ne.exports=function a(y){return null!==y&&("object"==typeof y||"function"==typeof y)}},4205:(ne,a,y)=>{var p=y(41638),C=y(2968);ne.exports=function w(){for(var M={},u=0;u{var p=y(72426);function w(v,g,b){g.limit=g.reverse?2:1;(function C(v,g,b){var I=[];return g.forEach(function(_){function A(R){!1!==b(_,R)&&I.forEach(function(D){D()})}v.on(_,A),I.push(function(){v.removeListener(_,A)})}),v})(v.createReadStream(g),["data","error","end"],function(_,A){if(g.reverse&&A&&g.start&&A.key.toString()>g.start)return!1;"error"==_?b(A):"end"==_?b(new Error("range not found"),null,null):b(null,A.key,A.value)})}(a=ne.exports=w).first=function M(v,g,b){return b||(b=g,g={}),g.reverse=!1,w(v,p(g),b)},a.last=function u(v,g,b){b||(b=g,g={});g.start;return g.reverse=!0,w(v,p(g),function(_,A,R){if(_){var D=g.start;g.start=null,w(v,g,function(T,F,L){if(!F)return b(_,null,null);var V=F.toString();V<=D&&(!g.end||V>=g.end)?b(T,F,L):b(_,null,null)})}else b(_,A,R)})}},72426:ne=>{ne.exports=function(y){var p=y.reverse,C=y.end,w=y.start,M=[w,C];return null!=w&&null!=C&&M.sort(),p&&(M=M.reverse()),y.start=M[0],y.end=M[1],y}},25904:ne=>{function a(C,w,M,u){var v={type:C,key:w,value:M,options:u};return u&&u.prefix&&(v.prefix=u.prefix,delete u.prefix),this._operations.push(v),this}function y(C){this._operations=[],this._sdb=C,this.put=a.bind(this,"put"),this.del=a.bind(this,"del")}var p=y.prototype;p.clear=function(){this._operations=[]},p.write=function(C){this._sdb.batch(this._operations,C)},ne.exports=y},74162:(ne,a,y)=>{y(59069).EventEmitter,process.nextTick;var w=y(91399),M=y(25904),u=y(55860),v=y(71175);ne.exports=function(g,b){function I(){}I.prototype=g;var _=new I;if(_.sublevel)return _;var A=(b=b||{}).sep=b.sep||"\xff";function R(T){return function(F){return(F=u(F=F||{})).reverse?F.start=F.start||A:F.end=F.end||A,T.call(_,F)}}_._options=b,v(_),_.sublevels={},_.sublevel=function(T,F){return _.sublevels[T]?_.sublevels[T]:new w(_,T,F||this._options)},_.methods={},_.prefix=function(T){return""+(T||"")},_.pre=function(T,F){return F||(F=T,T={max:A}),_.hooks.pre(T,F)},_.post=function(T,F){return F||(F=T,T={max:A}),_.hooks.post(T,F)},_.readStream=_.createReadStream=R(_.createReadStream),_.keyStream=_.createKeyStream=R(_.createKeyStream),_.valuesStream=_.createValueStream=R(_.createValueStream);var D=_.batch;return _.batch=function(T,F,L){if(!Array.isArray(T))return new M(_);T.forEach(function(V){V.prefix&&("function"==typeof V.prefix.prefix?V.key=V.prefix.prefix(V.key):"string"==typeof V.prefix&&(V.key=V.prefix+V.key))}),D.call(_,T,F,L)},_}},35510:(ne,a,y)=>{ne.exports=Object.keys||y(21079)},21079:(ne,a,y)=>{!function(){"use strict";var v,p=Object.prototype.hasOwnProperty,C=y(55782),w=y(7480),M=!{toString:null}.propertyIsEnumerable("toString"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];v=function(b){if(!C.object(b)&&!C.array(b))throw new TypeError("Object.keys called on a non-object");var I,_=[];for(I in b)p.call(b,I)&&_.push(I);return M&&w(u,function(A){p.call(b,A)&&_.push(A)}),_},ne.exports=v}()},41698:ne=>{ne.exports=function a(y){return null!==y&&("object"==typeof y||"function"==typeof y)}},34432:(ne,a,y)=>{var p=y(35510),C=y(41698);ne.exports=function w(){for(var M={},u=0;u{var p=y(59069).EventEmitter,C=y(26788).inherits,w=y(77826),M=y(55860),u=y(34432),v=y(25904);function g(R,D,T){if("string"==typeof T&&(console.error("db.sublevel(name, seperator) is depreciated"),console.error("use db.sublevel(name, {sep: separator})) if you must"),T={sep:T}),!(this instanceof g))return new g(R,D,T);if(!R)throw new Error("must provide db");if(!D)throw new Error("must provide prefix");(T=T||{}).sep=T.sep||"\xff",this._parent=R,this._options=T,this.options=T,this._prefix=D,this._root=_(this),R.sublevels[D]=this,this.sublevels={},this.methods={};var F=this;this.hooks={pre:function(){return F.pre.apply(F,arguments)},post:function(){return F.post.apply(F,arguments)}}}C(g,p);var b=g.prototype;function _(R){return R._parent?_(R._parent):R}b._key=function(R){var D=this._options.sep;return D+this._prefix+D+R},b._getOptsAndCb=function(R,D){return"function"==typeof R&&(D=R,R={}),{opts:u(R,this._options),cb:D}},b.sublevel=function(R,D){return this.sublevels[R]?this.sublevels[R]:new g(this,R,D||this._options)},b.put=function(R,D,T,F){var L=this._getOptsAndCb(T,F);this._root.put(this.prefix(R),D,L.opts,L.cb)},b.get=function(R,D,T){var F=this._getOptsAndCb(D,T);this._root.get(this.prefix(R),F.opts,F.cb)},b.del=function(R,D,T){var F=this._getOptsAndCb(D,T);this._root.del(this.prefix(R),F.opts,F.cb)},b.batch=function(R,D,T){if(!Array.isArray(R))return new v(this);var F=this,L=this._getOptsAndCb(D,T);R.forEach(function(V){"string"==typeof V.prefix?V.key=V.prefix+V.key:V.key=(V.prefix||F).prefix(V.key),V.prefix&&(V.prefix=null)}),this._root.batch(R,L.opts,L.cb)},b._getKeyEncoding=function(){return this.options.keyEncoding?this.options.keyEncoding:this._parent&&this._parent._getKeyEncoding?this._parent._getKeyEncoding():void 0},b._getValueEncoding=function(){return this.options.valueEncoding?this.options.valueEncoding:this._parent&&this._parent._getValueEncoding?this._parent._getValueEncoding():void 0},b.prefix=function(R){var D=this._options.sep;return this._parent.prefix()+D+this._prefix+D+(R||"")},b.keyStream=b.createKeyStream=function(R){return(R=R||{}).keys=!0,R.values=!1,this.createReadStream(R)},b.valueStream=b.createValueStream=function(R){return(R=R||{}).keys=!1,R.values=!0,R.keys=!1,this.createReadStream(R)},b.readStream=b.createReadStream=function(R){R=R||{};var D=_(this),T=this.prefix(),F=w.prefix(R,T);!function I(R,D){["valueEncoding","encoding","keyEncoding","reverse","values","keys","limit","fillCache"].forEach(function(T){D.hasOwnProperty(T)&&(R[T]=D[T])})}(F,u(R,this._options));var L=D.createReadStream(F);if(!1===F.values){var V;if(V=L.read)L.read=function(Z){var Y=V.call(this,Z);return Y&&(Y=Y.substring(T.length)),Y};else{var j=L.emit;L.emit=function(Z,Y){"data"===Z?j.call(this,"data",Y.substring(T.length)):j.call(this,Z,Y)}}return L}return!1===F.keys||((V=L.read)?L.read=function(Y){var G=V.call(this,Y);return G&&(G.key=G.key.substring(T.length)),G}:L.on("data",function(Y){Y.key=Y.key.substring(T.length)})),L},b.writeStream=b.createWriteStream=function(){var R=_(this),D=this.prefix(),T=R.createWriteStream.apply(R,arguments),F=T.write,L=this._options.encoding,V=this._options.valueEncoding,j=this._options.keyEncoding,Z=!L&&!V&&!j;return T.write=Z?function(Y){return Y.key=D+Y.key,F.call(T,Y)}:function(Y){return Y.key=D+Y.key,L&&typeof Y.encoding>"u"&&(Y.encoding=L),V&&typeof Y.valueEncoding>"u"&&(Y.valueEncoding=V),j&&typeof Y.keyEncoding>"u"&&(Y.keyEncoding=j),F.call(T,Y)},T},b.approximateSize=function(){var R=_(db);return R.approximateSize.apply(R,arguments)},b.pre=function(R,D){D||(D=R,R=null),R=w.prefix(R,this.prefix(),this._options.sep);var T=_(this._parent),F=this.prefix();return T.hooks.pre(M(R),function(L,V,j){D({key:L.key.substring(F.length),value:L.value,type:L.type},function(Z,Y){V(Z,Z.prefix?Y:Y||F)},j)})},b.post=function(R,D){D||(D=R,R=null);var T=_(this._parent),F=this.prefix();return R=w.prefix(R,F,this._options.sep),T.hooks.post(M(R),function(L){D({key:L.key.substring(F.length),value:L.value,type:L.type})})};ne.exports=g},31238:(ne,a,y)=>{var p=y(31404),C=y(24062).WriteError,w=p.getOptions,M=p.dispatchError;function u(v){this._levelup=v,this.batch=v.db.batch(),this.ops=[]}u.prototype.put=function(v,g,b){b=w(this._levelup,b);var I=p.encodeKey(v,b),_=p.encodeValue(g,b);try{this.batch.put(I,_)}catch(A){throw new C(A)}return this.ops.push({type:"put",key:I,value:_}),this},u.prototype.del=function(v,g){g=w(this._levelup,g);var b=p.encodeKey(v,g);try{this.batch.del(b)}catch(I){throw new C(I)}return this.ops.push({type:"del",key:b}),this},u.prototype.clear=function(){try{this.batch.clear()}catch(v){throw new C(v)}return this.ops=[],this},u.prototype.write=function(v){var g=this._levelup,b=this.ops;try{this.batch.write(function(I){if(I)return M(g,new C(I),v);g.emit("batch",b),v&&v()})}catch(I){throw new C(I)}},ne.exports=u},24062:(ne,a,y)=>{var p=y(3161).create,C=p("LevelUPError"),w=p("NotFoundError",C);w.prototype.notFound=!0,w.prototype.status=404,ne.exports={LevelUPError:C,InitializationError:p("InitializationError",C),OpenError:p("OpenError",C),ReadError:p("ReadError",C),WriteError:p("WriteError",C),NotFoundError:w,EncodingError:p("EncodingError",C)}},4427:(ne,a,y)=>{var p=y(59069).EventEmitter,C=y(26788).inherits,w=y(78677),M=y(3218),u=y(67125),v=y(24062).WriteError,g=y(24062).ReadError,b=y(24062).NotFoundError,I=y(24062).OpenError,_=y(24062).EncodingError,A=y(24062).InitializationError,R=y(31022),D=y(95011),T=y(31404),F=y(31238),L=T.getOptions,V=T.defaultOptions,j=T.getLevelDOWN,Z=T.dispatchError;function Y(X,Q){return"function"==typeof X?X:Q}function G(X,Q,z){if(!(this instanceof G))return new G(X,Q,z);var $;if(p.call(this),this.setMaxListeners(1/0),"function"==typeof X?((Q="object"==typeof Q?Q:{}).db=X,X=null):"object"==typeof X&&"function"==typeof X.db&&(Q=X,X=null),"function"==typeof Q&&(z=Q,Q={}),(!Q||"function"!=typeof Q.db)&&"string"!=typeof X){if($=new A("Must provide a location for the database"),z)return process.nextTick(function(){z($)});throw $}Q=L(this,Q),this.options=w(V,Q),this._status="new",M(this,"location",X,"e"),this.open(z)}function q(X){return function(Q,z){j()[X](Q,z||function(){})}}C(G,p),G.prototype.open=function(X){var z,$,Q=this;return this.isOpen()?(X&&process.nextTick(function(){X(null,Q)}),this):this._isOpening()?X&&this.once("open",function(){X(null,Q)}):(this.emit("opening"),this._status="opening",this.db=new u(this.location),z=this.options.db||j(),void($=z(this.location)).open(this.options,function(S){if(S)return Z(Q,new I(S),X);Q.db.setDb($),Q.db=$,Q._status="open",X&&X(null,Q),Q.emit("open"),Q.emit("ready")}))},G.prototype.close=function(X){var Q=this;if(this.isOpen())this._status="closing",this.db.close(function(){Q._status="closed",Q.emit("closed"),X&&X.apply(null,arguments)}),this.emit("closing"),this.db=null;else{if("closed"==this._status&&X)return process.nextTick(X);"closing"==this._status&&X?this.once("closed",X):this._isOpening()&&this.once("open",function(){Q.close(X)})}},G.prototype.isOpen=function(){return"open"==this._status},G.prototype._isOpening=function(){return"opening"==this._status},G.prototype.isClosed=function(){return/^clos/.test(this._status)},G.prototype.get=function(X,Q,z){var S,$=this;return"function"!=typeof(z=Y(Q,z))?Z(this,new g("get() requires key and callback arguments")):this._isOpening()||this.isOpen()?(Q=T.getOptions(this,Q),S=T.encodeKey(X,Q),Q.asBuffer=T.isValueAsBuffer(Q),void this.db.get(S,Q,function(r,s){if(r)return r=/notfound/i.test(r)?new b("Key not found in database ["+X+"]",r):new g(r),Z($,r,z);if(z){try{s=T.decodeValue(s,Q)}catch(d){return z(new _(d))}z(null,s)}})):Z(this,new g("Database is not open"),z)},G.prototype.put=function(X,Q,z,$){var r,s,S=this;return $=Y(z,$),null==X||null==Q?Z(this,new v("put() requires key and value arguments"),$):this._isOpening()||this.isOpen()?(z=L(this,z),r=T.encodeKey(X,z),s=T.encodeValue(Q,z),void this.db.put(r,s,z,function(d){if(d)return Z(S,new v(d),$);S.emit("put",X,Q),$&&$()})):Z(this,new v("Database is not open"),$)},G.prototype.del=function(X,Q,z){var S,$=this;return z=Y(Q,z),null==X?Z(this,new v("del() requires a key argument"),z):this._isOpening()||this.isOpen()?(Q=L(this,Q),S=T.encodeKey(X,Q),void this.db.del(S,Q,function(r){if(r)return Z($,new v(r),z);$.emit("del",X),z&&z()})):Z(this,new v("Database is not open"),z)},G.prototype.batch=function(X,Q,z){var S,r,s,$=this;return arguments.length?(z=Y(Q,z),Array.isArray(X)?this._isOpening()||this.isOpen()?(Q=L(this,Q),S=Q.keyEncoding,r=Q.valueEncoding,s=X.map(function(d){if(void 0===d.type||void 0===d.key)return{};var k,h=d.keyEncoding||S,E=d.valueEncoding||d.encoding||r;return"utf8"!=h&&"binary"!=h||"utf8"!=E&&"binary"!=E?(k={type:d.type,key:T.encodeKey(d.key,Q,d)},void 0!==d.value&&(k.value=T.encodeValue(d.value,Q,d)),k):d}),void this.db.batch(s,Q,function(d){if(d)return Z($,new v(d),z);$.emit("batch",X),z&&z()})):Z(this,new v("Database is not open"),z):Z(this,new v("batch() requires an array argument"),z)):new F(this)},G.prototype.approximateSize=function(X,Q,z){var S,r,$=this;return null==X||null==Q||"function"!=typeof z?Z(this,new g("approximateSize() requires start, end and callback arguments"),z):(S=T.encodeKey(X,this.options),r=T.encodeKey(Q,this.options),this._isOpening()||this.isOpen()?void this.db.approximateSize(S,r,function(s,d){if(s)return Z($,new I(s),z);z&&z(null,d)}):Z(this,new v("Database is not open"),z))},G.prototype.readStream=G.prototype.createReadStream=function(X){var Q=this;return X=w(this.options,X),new R(X,this,function(z){return Q.db.iterator(z)})},G.prototype.keyStream=G.prototype.createKeyStream=function(X){return this.createReadStream(w(X,{keys:!0,values:!1}))},G.prototype.valueStream=G.prototype.createValueStream=function(X){return this.createReadStream(w(X,{keys:!1,values:!0}))},G.prototype.writeStream=G.prototype.createWriteStream=function(X){return new D(w(X),this)},G.prototype.toString=function(){return"LevelUP"},ne.exports=G,ne.exports.copy=T.copy,ne.exports.destroy=q("destroy"),ne.exports.repair=q("repair")},31022:(ne,a,y)=>{var p=y(55717).Readable,C=y(26788).inherits,w=y(78677),M=y(24062).EncodingError,u=y(31404),v={keys:!0,values:!0},g=function(R,D){return{key:u.decodeKey(R,this._options),value:u.decodeValue(D,this._options)}},b=function(R){return u.decodeKey(R,this._options)},I=function(R,D){return u.decodeValue(D,this._options)},_=function(){return null};function A(R,D,T){if(!(this instanceof A))return new A(R,D,T);p.call(this,{objectMode:!0,highWaterMark:R.highWaterMark}),this._db=D,R=this._options=w(v,R),this._keyEncoding=R.keyEncoding||R.encoding,this._valueEncoding=R.valueEncoding||R.encoding,typeof this._options.start<"u"&&(this._options.start=u.encodeKey(this._options.start,this._options)),typeof this._options.end<"u"&&(this._options.end=u.encodeKey(this._options.end,this._options)),"number"!=typeof this._options.limit&&(this._options.limit=-1),this._options.keyAsBuffer=u.isKeyAsBuffer(this._options),this._options.valueAsBuffer=u.isValueAsBuffer(this._options),this._makeData=this._options.keys&&this._options.values?g:this._options.keys?b:this._options.values?I:_;var F=this;this._db.isOpen()?this._iterator=T(this._options):this._db.once("ready",function(){F._destroyed||(F._iterator=T(F._options))})}C(A,p),A.prototype._read=function R(){var D=this;if(!D._db.isOpen())return D._db.once("ready",function(){R.call(D)});D._destroyed||D._iterator.next(function(T,F,L){if(T||void 0===F&&void 0===L)return!T&&!D._destroyed&&D.push(null),D._cleanup(T);try{L=D._makeData(F,L)}catch(V){return D._cleanup(new M(V))}D._destroyed||D.push(L)})},A.prototype._cleanup=function(R){if(!this._destroyed){this._destroyed=!0;var D=this;R&&D.emit("error",R),D._iterator?D._iterator.end(function(){D._iterator=null,D.emit("close")}):D.emit("close")}},A.prototype.destroy=function(){this._cleanup()},A.prototype.toString=function(){return"LevelUP.ReadStream"},ne.exports=A},31404:(ne,a,y)=>{var u,Y,p=y(78677),C=y(24062).LevelUPError,w=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"],M={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},v=function(){function Y(q){return null==q||Buffer.isBuffer(q)}var G={};return G.utf8=G["utf-8"]={encode:function(q){return Y(q)?q:String(q)},decode:function(q){return q},buffer:!1,type:"utf8"},G.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},w.forEach(function(q){G[q]||(G[q]={encode:function(X){return Y(X)?X:new Buffer(X,q)},decode:function(X){return process.browser?X.toString(q):X},buffer:!0,type:q})}),G}(),g=(Y={},w.forEach(function(G){Y[G]={valueEncoding:G}}),Y);function R(Y,G){var q=G&&G.keyEncoding||Y.keyEncoding||"utf8";return v[q]||q}function D(Y,G){var q=G&&(G.valueEncoding||G.encoding)||Y.valueEncoding||Y.encoding||"utf8";return v[q]||q}ne.exports={defaultOptions:M,copy:function b(Y,G,q){Y.readStream().pipe(G.writeStream()).on("close",q||function(){}).on("error",q||function(X){throw X})},getOptions:function I(Y,G){var q="string"==typeof G;return!q&&G&&G.encoding&&!G.valueEncoding&&(G.valueEncoding=G.encoding),p(Y&&Y.options||{},q?g[G]||g[M.valueEncoding]:G)},getLevelDOWN:function _(){if(u)return u;var q,Y=y(73619).v6.ct,G="Could not locate LevelDOWN, try `npm install leveldown`";try{q=y(94093).version}catch{throw new C(G)}if(!y(61695).satisfies(q,Y))throw new C("Installed version of LevelDOWN ("+q+") does not match required version ("+Y+")");try{return u=y(70131)}catch{throw new C(G)}},dispatchError:function A(Y,G,q){return"function"==typeof q?q(G):Y.emit("error",G)},encodeKey:function T(Y,G,q){return R(G,q).encode(Y)},encodeValue:function F(Y,G,q){return D(G,q).encode(Y)},isValueAsBuffer:function j(Y,G){return D(Y,G).buffer},isKeyAsBuffer:function Z(Y,G){return R(Y,G).buffer},decodeValue:function V(Y,G){return D(G).decode(Y)},decodeKey:function L(Y,G){return R(G).decode(Y)}}},95011:(ne,a,y)=>{var p=y(295).Stream,C=y(26788).inherits,w=y(78677),M=y(5259),u=global.setImmediate||process.nextTick,v=y(31404).getOptions,g={type:"put"};function b(I,_){if(!(this instanceof b))return new b(I,_);p.call(this),this._options=w(g,v(_,I)),this._db=_,this._buffer=[],this._status="init",this._end=!1,this.writable=!0,this.readable=!1;var A=this,R=function(){A.writable&&(A._status="ready",A.emit("ready"),A._process())};_.isOpen()?u(R):_.once("ready",R)}C(b,p),b.prototype.write=function(I){return!!this.writable&&(this._buffer.push(I),"init"!=this._status&&this._processDelayed(),!(this._options.maxBufferLength&&this._buffer.length>this._options.maxBufferLength)||(this._writeBlock=!0,!1))},b.prototype.end=function(I){var _=this;I&&this.write(I),u(function(){_._end=!0,_._process()})},b.prototype.destroy=function(){this.writable=!1,this.end()},b.prototype.destroySoon=function(){this.end()},b.prototype.add=function(I){if(I.props)return I.props.Directory?I.pipe(this._db.writeStream(this._options)):(I.props.File||I.File||"File"==I.type)&&this._write(I),!0},b.prototype._processDelayed=function(){var I=this;u(function(){I._process()})},b.prototype._process=function(){var I,_=this;if("ready"==_._status||!_.writable)return _._buffer.length&&_.writable?(_._status="writing",I=_._buffer,_._buffer=[],_._db.batch(I.map(function(R){return{type:R.type||_._options.type,key:R.key,value:R.value,keyEncoding:R.keyEncoding||_._options.keyEncoding,valueEncoding:R.valueEncoding||R.encoding||_._options.valueEncoding}}),function(R){if(_.writable){if("closed"!=_._status&&(_._status="ready"),R)return _.writable=!1,_.emit("error",R);_._process()}}),void(_._writeBlock&&(_._writeBlock=!1,_.emit("drain")))):void(_._end&&"closed"!=_._status&&(_._status="closed",_.writable=!1,_.emit("close")));_._buffer.length&&"closed"!=_._status&&_._processDelayed()},b.prototype._write=function(I){var _=I.path||I.props.path,A=this;_&&I.pipe(M(function(R,D){if(R)return A.writable=!1,A.emit("error",R);A._options.fstreamRoot&&_.indexOf(A._options.fstreamRoot)>-1&&(_=_.substr(A._options.fstreamRoot.length+1)),A.write({key:_,value:D.slice(0)})}))},b.prototype.toString=function(){return"LevelUP.WriteStream"},ne.exports=b},5259:(ne,a,y)=>{var p=y(55717).Duplex;function w(M){if(!(this instanceof w))return new w(M);if(this._bufs=[],this.length=0,"function"==typeof M){this._callback=M;var u=function(v){this._callback&&(this._callback(v),this._callback=null)}.bind(this);this.on("pipe",function(v){v.on("error",u)}),this.on("unpipe",function(v){v.removeListener("error",u)})}else Buffer.isBuffer(M)?this.append(M):Array.isArray(M)&&M.forEach(function(v){Buffer.isBuffer(v)&&this.append(v)}.bind(this));p.call(this)}y(26788).inherits(w,p),w.prototype._offset=function(M){for(var g,u=0,v=0;vthis.length)&&(g=this.length),v>=this.length)return M||new Buffer(0);if(g<=0)return M||new Buffer(0);var T,F,b=!!M,I=this._offset(v),_=g-v,A=_,R=b&&u||0,D=I[1];if(0===v&&g==this.length){if(!b)return Buffer.concat(this._bufs);for(F=0;F(T=this._bufs[F].length-D))){this._bufs[F].copy(M,R,D,D+A);break}this._bufs[F].copy(M,R,D),R+=T,A-=T,D&&(D=0)}return M},w.prototype.toString=function(M,u,v){return this.slice(u,v).toString(M)},w.prototype.consume=function(M){for(;this._bufs.length;){if(!(M>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(M),this.length-=M;break}M-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},w.prototype.duplicate=function(){for(var M=0,u=new w;M{ne.exports=u;var p=Object.keys||function(b){var I=[];for(var _ in b)I.push(_);return I},C=y(26156);C.inherits=y(83894);var w=y(94515),M=y(23699);function u(b){if(!(this instanceof u))return new u(b);w.call(this,b),M.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}C.inherits(u,w),function g(b,I){for(var _=0,A=b.length;_{ne.exports=w;var p=y(50596),C=y(26156);function w(M){if(!(this instanceof w))return new w(M);p.call(this,M)}C.inherits=y(83894),C.inherits(w,p),w.prototype._transform=function(M,u,v){v(null,M)}},94515:(ne,a,y)=>{ne.exports=b;var p=y(66425),C=y(93172).Buffer;b.ReadableState=g;var w=y(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(r,s){return r.listeners(s).length});var v,M=y(295),u=y(26156);function g(r,s){var d=(r=r||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!r.objectMode,this.defaultEncoding=r.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r.encoding&&(v||(v=y(15453).s),this.decoder=new v(r.encoding),this.encoding=r.encoding)}function b(r){if(!(this instanceof b))return new b(r);this._readableState=new g(r,this),this.readable=!0,M.call(this)}function I(r,s,d,h,E){var k=function T(r,s){var d=null;return!C.isBuffer(s)&&"string"!=typeof s&&null!=s&&!r.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(s,d);if(k)r.emit("error",k);else if(null==d)s.reading=!1,s.ended||function F(r,s){if(s.decoder&&!s.ended){var d=s.decoder.end();d&&d.length&&(s.buffer.push(d),s.length+=s.objectMode?1:d.length)}s.ended=!0,s.length>0?L(r):z(r)}(r,s);else if(s.objectMode||d&&d.length>0)if(s.ended&&!E){var B=new Error("stream.push() after EOF");r.emit("error",B)}else if(s.endEmitted&&E){B=new Error("stream.unshift() after end event");r.emit("error",B)}else s.decoder&&!E&&!h&&(d=s.decoder.write(d)),s.length+=s.objectMode?1:d.length,E?s.buffer.unshift(d):(s.reading=!1,s.buffer.push(d)),s.needReadable&&L(r),function j(r,s){s.readingMore||(s.readingMore=!0,process.nextTick(function(){!function Z(r,s){for(var d=s.length;!s.reading&&!s.flowing&&!s.ended&&s.lengths.highWaterMark&&(s.highWaterMark=function R(r){if(r>=A)r=A;else{r--;for(var s=1;s<32;s<<=1)r|=r>>s;r++}return r}(r)),r>s.length?s.ended?s.length:(s.needReadable=!0,0):r)}function L(r){var s=r._readableState;s.needReadable=!1,!s.emittedReadable&&(s.emittedReadable=!0,s.sync?process.nextTick(function(){V(r)}):V(r))}function V(r){r.emit("readable")}function G(r){var d,s=r._readableState;function h(E,k,B){!1===E.write(d)&&s.awaitDrain++}for(s.awaitDrain=0;s.pipesCount&&null!==(d=r.read());)if(1===s.pipesCount?h(s.pipes):$(s.pipes,h),r.emit("data",d),s.awaitDrain>0)return;if(0===s.pipesCount)return s.flowing=!1,void(w.listenerCount(r,"data")>0&&X(r));s.ranOut=!0}function q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,G(this))}function X(r,s){if(r._readableState.flowing)throw new Error("Cannot switch to old mode now.");var h=s||!1,E=!1;r.readable=!0,r.pipe=M.prototype.pipe,r.on=r.addListener=M.prototype.on,r.on("readable",function(){E=!0;for(var k;!h&&null!==(k=r.read());)r.emit("data",k);null===k&&(E=!1,r._readableState.needReadable=!0)}),r.pause=function(){h=!0,this.emit("pause")},r.resume=function(){h=!1,E?process.nextTick(function(){r.emit("readable")}):this.read(0),this.emit("resume")},r.emit("readable")}function Q(r,s){var B,d=s.buffer,h=s.length,E=!!s.decoder,k=!!s.objectMode;if(0===d.length)return null;if(0===h)B=null;else if(k)B=d.shift();else if(!r||r>=h)B=E?d.join(""):C.concat(d,h),d.length=0;else if(r0)throw new Error("endReadable called on non-empty stream");!s.endEmitted&&s.calledRead&&(s.ended=!0,process.nextTick(function(){!s.endEmitted&&0===s.length&&(s.endEmitted=!0,r.readable=!1,r.emit("end"))}))}function $(r,s){for(var d=0,h=r.length;d0)&&(s.emittedReadable=!1),0===r&&s.needReadable&&(s.length>=s.highWaterMark||s.ended))return L(this),null;if(0===(r=D(r,s))&&s.ended)return h=null,s.length>0&&s.decoder&&(h=Q(r,s),s.length-=h.length),0===s.length&&z(this),h;var E=s.needReadable;return s.length-r<=s.highWaterMark&&(E=!0),(s.ended||s.reading)&&(E=!1),E&&(s.reading=!0,s.sync=!0,0===s.length&&(s.needReadable=!0),this._read(s.highWaterMark),s.sync=!1),E&&!s.reading&&(r=D(d,s)),null===(h=r>0?Q(r,s):null)&&(s.needReadable=!0,r=0),s.length-=r,0===s.length&&!s.ended&&(s.needReadable=!0),s.ended&&!s.endEmitted&&0===s.length&&z(this),h},b.prototype._read=function(r){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(r,s){var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=r;break;case 1:h.pipes=[h.pipes,r];break;default:h.pipes.push(r)}h.pipesCount+=1;var k=(!s||!1!==s.end)&&r!==process.stdout&&r!==process.stderr?x:P;function B(Ce){Ce===d&&P()}function x(){r.end()}h.endEmitted?process.nextTick(k):d.once("end",k),r.on("unpipe",B);var f=function Y(r){return function(){var d=r._readableState;d.awaitDrain--,0===d.awaitDrain&&G(r)}}(d);function P(){r.removeListener("close",te),r.removeListener("finish",ie),r.removeListener("drain",f),r.removeListener("error",se),r.removeListener("unpipe",B),d.removeListener("end",x),d.removeListener("end",P),(!r._writableState||r._writableState.needDrain)&&f()}function se(Ce){de(),r.removeListener("error",se),0===w.listenerCount(r,"error")&&r.emit("error",Ce)}function te(){r.removeListener("finish",ie),de()}function ie(){r.removeListener("close",te),de()}function de(){d.unpipe(r)}return r.on("drain",f),r._events&&r._events.error?p(r._events.error)?r._events.error.unshift(se):r._events.error=[se,r._events.error]:r.on("error",se),r.once("close",te),r.once("finish",ie),r.emit("pipe",d),h.flowing||(this.on("readable",q),h.flowing=!0,process.nextTick(function(){G(d)})),r},b.prototype.unpipe=function(r){var s=this._readableState;if(0===s.pipesCount)return this;if(1===s.pipesCount)return r&&r!==s.pipes||(r||(r=s.pipes),s.pipes=null,s.pipesCount=0,this.removeListener("readable",q),s.flowing=!1,r&&r.emit("unpipe",this)),this;if(!r){var d=s.pipes,h=s.pipesCount;s.pipes=null,s.pipesCount=0,this.removeListener("readable",q),s.flowing=!1;for(var E=0;E"u"&&(this[E]=function(B){return function(){return r[B].apply(r,arguments)}}(E));return $(["error","close","destroy","pause","resume"],function(B){r.on(B,h.emit.bind(h,B))}),h._read=function(B){d&&(d=!1,r.resume())},h},b._fromList=Q},50596:(ne,a,y)=>{ne.exports=u;var p=y(66958),C=y(26156);function w(g,b){this.afterTransform=function(I,_){return function M(g,b,I){var _=g._transformState;_.transforming=!1;var A=_.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,null!=I&&g.push(I),A&&A(b);var R=g._readableState;R.reading=!1,(R.needReadable||R.length{ne.exports=v;var p=y(93172).Buffer;v.WritableState=u;var C=y(26156);C.inherits=y(83894);var w=y(295);function M(G,q,X){this.chunk=G,this.encoding=q,this.callback=X}function u(G,q){var X=(G=G||{}).highWaterMark;this.highWaterMark=X||0===X?X:16384,this.objectMode=!!G.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var Q=!1===G.decodeStrings;this.decodeStrings=!Q,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(z){!function T(G,q){var X=G._writableState,Q=X.sync,z=X.writecb;if(function D(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}(X),q)!function R(G,q,X,Q,z){X?process.nextTick(function(){z(Q)}):z(Q),G._writableState.errorEmitted=!0,G.emit("error",Q)}(G,0,Q,q,z);else{var $=j(G,X);!$&&!X.bufferProcessing&&X.buffer.length&&function V(G,q){q.bufferProcessing=!0;for(var X=0;X{var p=y(295);(a=ne.exports=y(94515)).Stream=p,a.Readable=a,a.Writable=y(23699),a.Duplex=y(66958),a.Transform=y(50596),a.PassThrough=y(44467),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=y(295))},88222:(ne,a,y)=>{ne=y.nmd(ne);var p=200,C="__lodash_hash_undefined__",w=1,M=2,u=9007199254740991,v="[object Arguments]",g="[object Array]",b="[object AsyncFunction]",I="[object Boolean]",_="[object Date]",A="[object Error]",R="[object Function]",D="[object GeneratorFunction]",T="[object Map]",F="[object Number]",L="[object Null]",V="[object Object]",j="[object Promise]",Z="[object Proxy]",Y="[object RegExp]",G="[object Set]",q="[object String]",X="[object Symbol]",Q="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",S="[object DataView]",se=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,ie={};ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie[v]=ie[g]=ie[$]=ie[I]=ie[S]=ie[_]=ie[A]=ie[R]=ie[T]=ie[F]=ie[V]=ie[Y]=ie[G]=ie[q]=ie[z]=!1;var de="object"==typeof global&&global&&global.Object===Object&&global,Ce="object"==typeof self&&self&&self.Object===Object&&self,ye=de||Ce||Function("return this")(),ve=a&&!a.nodeType&&a,ae=ve&&ne&&!ne.nodeType&&ne,fe=ae&&ae.exports===ve,pe=fe&&de.process,Ee=function(){try{return pe&&pe.binding&&pe.binding("util")}catch{}}(),ce=Ee&&Ee.isTypedArray;function Fe(et,It){for(var rn=-1,wn=null==et?0:et.length;++rnbi))return!1;var ii=dr.get(et);if(ii&&dr.get(It))return ii==It;var wi=-1,Ko=!0,Nr=rn&M?new Rt:void 0;for(dr.set(et,It),dr.set(It,et);++wi-1},qe.prototype.set=function Pt(et,It){var rn=this.__data__,wn=Wt(rn,et);return wn<0?(++this.size,rn.push([et,It])):rn[wn][1]=It,this},Bt.prototype.clear=function Zt(){this.size=0,this.__data__={hash:new _e,map:new(gt||qe),string:new _e}},Bt.prototype.delete=function qt(et){var It=Lr(this,et).delete(et);return this.size-=It?1:0,It},Bt.prototype.get=function fn(et){return Lr(this,et).get(et)},Bt.prototype.has=function xt(et){return Lr(this,et).has(et)},Bt.prototype.set=function Kt(et,It){var rn=Lr(this,et),wn=rn.size;return rn.set(et,It),this.size+=rn.size==wn?0:1,this},Rt.prototype.add=Rt.prototype.push=function Yt(et){return this.__data__.set(et,C),this},Rt.prototype.has=function zt(et){return this.__data__.has(et)},Vt.prototype.clear=function nn(){this.__data__=new qe,this.size=0},Vt.prototype.delete=function Gt(et){var It=this.__data__,rn=It.delete(et);return this.size=It.size,rn},Vt.prototype.get=function Mt(et){return this.__data__.get(et)},Vt.prototype.has=function _t(et){return this.__data__.has(et)},Vt.prototype.set=function en(et,It){var rn=this.__data__;if(rn instanceof qe){var wn=rn.__data__;if(!gt||wn.length-1&&et%1==0&&et-1&&et%1==0&&et<=u}function Er(et){var It=typeof et;return null!=et&&("object"==It||"function"==It)}function Au(et){return null!=et&&"object"==typeof et}var xh=ce?function Ze(et){return function(It){return et(It)}}(ce):function er(et){return Au(et)&&Yn(et.length)&&!!ie[Dn(et)]};function El(et){return function hc(et){return null!=et&&Yn(et.length)&&!to(et)}(et)?jt(et):ur(et)}ne.exports=function dn(et,It){return Bn(et,It)}},52820:(ne,a)=>{function y(R){return void 0!==R&&""!==R}function p(R,D){return Object.hasOwnProperty.call(R,D)}function C(R,D){return Object.hasOwnProperty.call(R,D)&&D}a.compare=function(R,D){if(Buffer.isBuffer(R)){for(var T=Math.min(R.length,D.length),F=0;FD?1:0};var w=a.lowerBoundKey=function(R){return C(R,"gt")||C(R,"gte")||C(R,"min")||(R.reverse?C(R,"end"):C(R,"start"))||void 0},M=a.lowerBound=function(R,D){var T=w(R);return T?R[T]:D},u=a.lowerBoundInclusive=function(R){return!p(R,"gt")},v=a.upperBoundInclusive=function(R){return!p(R,"lt")},g=a.lowerBoundExclusive=function(R){return!u(R)},b=a.upperBoundExclusive=function(R){return!v(R)},I=a.upperBoundKey=function(R){return C(R,"lt")||C(R,"lte")||C(R,"max")||(R.reverse?C(R,"start"):C(R,"end"))||void 0},_=a.upperBound=function(R,D){var T=I(R);return T?R[T]:D};function A(R){return R}a.start=function(R,D){return R.reverse?_(R,D):M(R,D)},a.end=function(R,D){return R.reverse?M(R,D):_(R,D)},a.startInclusive=function(R){return R.reverse?v(R):u(R)},a.endInclusive=function(R){return R.reverse?u(R):v(R)},a.toLtgt=function(R,D,T,F,L){D=D||{},T=T||A;var V=arguments.length>3,j=a.lowerBoundKey(R),Z=a.upperBoundKey(R);return j?"gt"===j?D.gt=T(R.gt,!1):D.gte=T(R[j],!1):V&&(D.gte=T(F,!1)),Z?"lt"===Z?D.lt=T(R.lt,!0):D.lte=T(R[Z],!0):V&&(D.lte=T(L,!0)),null!=R.reverse&&(D.reverse=!!R.reverse),p(D,"max")&&delete D.max,p(D,"min")&&delete D.min,p(D,"start")&&delete D.start,p(D,"end")&&delete D.end,D},a.contains=function(R,D,T){T=T||a.compare;var F=M(R);if(y(F)&&((L=T(D,F))<0||0===L&&g(R)))return!1;var L,V=_(R);if(y(V)&&((L=T(D,V))>0||0===L&&b(R)))return!1;return!0},a.filter=function(R,D){return function(T){return a.contains(R,T,D)}}},8095:(ne,a,y)=>{"use strict";var p=y(83894),C=y(39650),w=y(73502).Buffer,M=new Array(16);function u(){C.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function v(A,R){return A<>>32-R}function g(A,R,D,T,F,L,V){return v(A+(R&D|~R&T)+F+L|0,V)+R|0}function b(A,R,D,T,F,L,V){return v(A+(R&T|D&~T)+F+L|0,V)+R|0}function I(A,R,D,T,F,L,V){return v(A+(R^D^T)+F+L|0,V)+R|0}function _(A,R,D,T,F,L,V){return v(A+(D^(R|~T))+F+L|0,V)+R|0}p(u,C),u.prototype._update=function(){for(var A=M,R=0;R<16;++R)A[R]=this._block.readInt32LE(4*R);var D=this._a,T=this._b,F=this._c,L=this._d;D=g(D,T,F,L,A[0],3614090360,7),L=g(L,D,T,F,A[1],3905402710,12),F=g(F,L,D,T,A[2],606105819,17),T=g(T,F,L,D,A[3],3250441966,22),D=g(D,T,F,L,A[4],4118548399,7),L=g(L,D,T,F,A[5],1200080426,12),F=g(F,L,D,T,A[6],2821735955,17),T=g(T,F,L,D,A[7],4249261313,22),D=g(D,T,F,L,A[8],1770035416,7),L=g(L,D,T,F,A[9],2336552879,12),F=g(F,L,D,T,A[10],4294925233,17),T=g(T,F,L,D,A[11],2304563134,22),D=g(D,T,F,L,A[12],1804603682,7),L=g(L,D,T,F,A[13],4254626195,12),F=g(F,L,D,T,A[14],2792965006,17),D=b(D,T=g(T,F,L,D,A[15],1236535329,22),F,L,A[1],4129170786,5),L=b(L,D,T,F,A[6],3225465664,9),F=b(F,L,D,T,A[11],643717713,14),T=b(T,F,L,D,A[0],3921069994,20),D=b(D,T,F,L,A[5],3593408605,5),L=b(L,D,T,F,A[10],38016083,9),F=b(F,L,D,T,A[15],3634488961,14),T=b(T,F,L,D,A[4],3889429448,20),D=b(D,T,F,L,A[9],568446438,5),L=b(L,D,T,F,A[14],3275163606,9),F=b(F,L,D,T,A[3],4107603335,14),T=b(T,F,L,D,A[8],1163531501,20),D=b(D,T,F,L,A[13],2850285829,5),L=b(L,D,T,F,A[2],4243563512,9),F=b(F,L,D,T,A[7],1735328473,14),D=I(D,T=b(T,F,L,D,A[12],2368359562,20),F,L,A[5],4294588738,4),L=I(L,D,T,F,A[8],2272392833,11),F=I(F,L,D,T,A[11],1839030562,16),T=I(T,F,L,D,A[14],4259657740,23),D=I(D,T,F,L,A[1],2763975236,4),L=I(L,D,T,F,A[4],1272893353,11),F=I(F,L,D,T,A[7],4139469664,16),T=I(T,F,L,D,A[10],3200236656,23),D=I(D,T,F,L,A[13],681279174,4),L=I(L,D,T,F,A[0],3936430074,11),F=I(F,L,D,T,A[3],3572445317,16),T=I(T,F,L,D,A[6],76029189,23),D=I(D,T,F,L,A[9],3654602809,4),L=I(L,D,T,F,A[12],3873151461,11),F=I(F,L,D,T,A[15],530742520,16),D=_(D,T=I(T,F,L,D,A[2],3299628645,23),F,L,A[0],4096336452,6),L=_(L,D,T,F,A[7],1126891415,10),F=_(F,L,D,T,A[14],2878612391,15),T=_(T,F,L,D,A[5],4237533241,21),D=_(D,T,F,L,A[12],1700485571,6),L=_(L,D,T,F,A[3],2399980690,10),F=_(F,L,D,T,A[10],4293915773,15),T=_(T,F,L,D,A[1],2240044497,21),D=_(D,T,F,L,A[8],1873313359,6),L=_(L,D,T,F,A[15],4264355552,10),F=_(F,L,D,T,A[6],2734768916,15),T=_(T,F,L,D,A[13],1309151649,21),D=_(D,T,F,L,A[4],4149444226,6),L=_(L,D,T,F,A[11],3174756917,10),F=_(F,L,D,T,A[2],718787259,15),T=_(T,F,L,D,A[9],3951481745,21),this._a=this._a+D|0,this._b=this._b+T|0,this._c=this._c+F|0,this._d=this._d+L|0},u.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 A=w.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},ne.exports=u},17079:(ne,a,y)=>{var p=y(1378),C=y(37950);function w(M){this.rand=M||new C.Rand}ne.exports=w,w.create=function(u){return new w(u)},w.prototype._randbelow=function(u){var v=u.bitLength(),g=Math.ceil(v/8);do{var b=new p(this.rand.generate(g))}while(b.cmp(u)>=0);return b},w.prototype._randrange=function(u,v){var g=v.sub(u);return u.add(this._randbelow(g))},w.prototype.test=function(u,v,g){var b=u.bitLength(),I=p.mont(u),_=new p(1).toRed(I);v||(v=Math.max(1,b/48|0));for(var A=u.subn(1),R=0;!A.testn(R);R++);for(var D=u.shrn(R),T=A.toRed(I);v>0;v--){var L=this._randrange(new p(2),A);g&&g(L);var V=L.toRed(I).redPow(D);if(0!==V.cmp(_)&&0!==V.cmp(T)){for(var j=1;j0;v--){var T=this._randrange(new p(2),_),F=u.gcd(T);if(0!==F.cmpn(1))return F;var L=T.toRed(b).redPow(R);if(0!==L.cmp(I)&&0!==L.cmp(D)){for(var V=1;V=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},32391:ne=>{function a(y,p){if(!y)throw new Error(p||"Assertion failed")}ne.exports=a,a.equal=function(p,C,w){if(p!=C)throw new Error(w||"Assertion failed: "+p+" != "+C)}},58195:(ne,a)=>{"use strict";var y=a;function C(M){return 1===M.length?"0"+M:M}function w(M){for(var u="",v=0;v>8,_=255&b;I?v.push(I,_):v.push(_)}return v},y.zero2=C,y.toHex=w,y.encode=function(u,v){return"hex"===v?w(u):u}},11346:function(ne){ne.exports=function(){"use strict";var a=Object.prototype.toString,y=Array.isArray||function($){return"[object Array]"===a.call($)};function p(z){return"function"==typeof z}function C(z){return y(z)?"array":typeof z}function w(z){return z.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function M(z,$){return null!=z&&"object"==typeof z&&$ in z}function u(z,$){return null!=z&&"object"!=typeof z&&z.hasOwnProperty&&z.hasOwnProperty($)}var v=RegExp.prototype.test;function g(z,$){return v.call(z,$)}var b=/\S/;function I(z){return!g(b,z)}var _={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(z){return String(z).replace(/[&<>"'`=\/]/g,function(S){return _[S]})}var R=/\s*/,D=/\s+/,T=/\s*=/,F=/\s*\}/,L=/#|\^|\/|>|\{|&|=|!/;function V(z,$){if(!z)return[];var f,P,se,S=!1,r=[],s=[],d=[],h=!1,E=!1,k="",B=0;function x(){if(h&&!E)for(;d.length;)delete s[d.pop()];else d=[];h=!1,E=!1}function te(ce){if("string"==typeof ce&&(ce=ce.split(D,2)),!y(ce)||2!==ce.length)throw new Error("Invalid tags: "+ce);f=new RegExp(w(ce[0])+"\\s*"),P=new RegExp("\\s*"+w(ce[1])),se=new RegExp("\\s*"+w("}"+ce[1]))}te($||X.tags);for(var de,Ce,ye,ve,ae,fe,ie=new Y(z);!ie.eos();){if(de=ie.pos,ye=ie.scanUntil(f))for(var pe=0,Ee=ye.length;pe0?r[r.length-1][4]:$;break;default:S.push(s)}return $}function Y(z){this.string=z,this.tail=z,this.pos=0}function G(z,$){this.view=z,this.cache={".":this.view},this.parent=$}function q(){this.templateCache={_cache:{},set:function($,S){this._cache[$]=S},get:function($){return this._cache[$]},clear:function(){this._cache={}}}}Y.prototype.eos=function(){return""===this.tail},Y.prototype.scan=function($){var S=this.tail.match($);if(!S||0!==S.index)return"";var r=S[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},Y.prototype.scanUntil=function($){var r,S=this.tail.search($);switch(S){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,S),this.tail=this.tail.substring(S)}return this.pos+=r.length,r},G.prototype.push=function($){return new G($,this)},G.prototype.lookup=function($){var r,S=this.cache;if(S.hasOwnProperty($))r=S[$];else{for(var d,h,E,s=this,k=!1;s;){if($.indexOf(".")>0)for(d=s.view,h=$.split("."),E=0;null!=d&&E"===k?B=this.renderPartial(E,S,r,d):"&"===k?B=this.unescapedValue(E,S):"name"===k?B=this.escapedValue(E,S,d):"text"===k&&(B=this.rawValue(E)),void 0!==B&&(h+=B);return h},q.prototype.renderSection=function($,S,r,s,d){var h=this,E="",k=S.lookup($[1]);function B(P){return h.render(P,S,r,d)}if(k){if(y(k))for(var x=0,f=k.length;x0||!r)&&(d[h]=s+d[h]);return d.join("\n")},q.prototype.renderPartial=function($,S,r,s){if(r){var d=this.getConfigTags(s),h=p(r)?r($[1]):r[$[1]];if(null!=h){var E=$[6],k=$[5],B=$[4],x=h;0==k&&B&&(x=this.indentPartial(h,B,E));var f=this.parse(x,d);return this.renderTokens(f,S,r,x,s)}}},q.prototype.unescapedValue=function($,S){var r=S.lookup($[1]);if(null!=r)return r},q.prototype.escapedValue=function($,S,r){var s=this.getConfigEscape(r)||X.escape,d=S.lookup($[1]);if(null!=d)return"number"==typeof d&&s===X.escape?String(d):s(d)},q.prototype.rawValue=function($){return $[1]},q.prototype.getConfigTags=function($){return y($)?$:$&&"object"==typeof $?$.tags:void 0},q.prototype.getConfigEscape=function($){if($&&"object"==typeof $&&!y($))return $.escape};var X={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(z){Q.templateCache=z},get templateCache(){return Q.templateCache}},Q=new q;return X.clearCache=function(){return Q.clearCache()},X.parse=function($,S){return Q.parse($,S)},X.render=function($,S,r,s){if("string"!=typeof $)throw new TypeError('Invalid template! Template should be a "string" but "'+C($)+'" was given as the first argument for mustache#render(template, view, partials)');return Q.render($,S,r,s)},X.escape=A,X.Scanner=Y,X.Context=G,X.Writer=q,X}()},84778:(ne,a)=>{"use strict";var w;Object.defineProperty(a,"__esModule",{value:!0}),a.AbiSerializationType=a.AbiFunctionModifier=a.AbiFunctionKind=a.SCHEMA_VERSION=void 0,a.SCHEMA_VERSION="0.3.0",(w=a.AbiFunctionKind||(a.AbiFunctionKind={})).View="view",w.Call="call",function(w){w.Init="init",w.Private="private",w.Payable="payable"}(a.AbiFunctionModifier||(a.AbiFunctionModifier={})),function(w){w.Json="json",w.Borsh="borsh"}(a.AbiSerializationType||(a.AbiSerializationType={}))},81818:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Account=void 0;var p=y(74931);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return p.Account}})},73648:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UrlAccountCreator=a.LocalAccountCreator=a.AccountCreator=void 0;var p=y(74931);Object.defineProperty(a,"AccountCreator",{enumerable:!0,get:function(){return p.AccountCreator}}),Object.defineProperty(a,"LocalAccountCreator",{enumerable:!0,get:function(){return p.LocalAccountCreator}}),Object.defineProperty(a,"UrlAccountCreator",{enumerable:!0,get:function(){return p.UrlAccountCreator}})},73369:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MultisigStateStatus=a.MultisigDeleteRequestRejectionError=a.MULTISIG_CONFIRM_METHODS=a.MULTISIG_CHANGE_METHODS=a.MULTISIG_DEPOSIT=a.MULTISIG_GAS=a.MULTISIG_ALLOWANCE=a.MULTISIG_STORAGE_KEY=a.AccountMultisig=a.Account2FA=void 0;var p=y(74931);Object.defineProperty(a,"Account2FA",{enumerable:!0,get:function(){return p.Account2FA}}),Object.defineProperty(a,"AccountMultisig",{enumerable:!0,get:function(){return p.AccountMultisig}}),Object.defineProperty(a,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return p.MULTISIG_STORAGE_KEY}}),Object.defineProperty(a,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return p.MULTISIG_ALLOWANCE}}),Object.defineProperty(a,"MULTISIG_GAS",{enumerable:!0,get:function(){return p.MULTISIG_GAS}}),Object.defineProperty(a,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return p.MULTISIG_DEPOSIT}}),Object.defineProperty(a,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(a,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(a,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return p.MultisigDeleteRequestRejectionError}}),Object.defineProperty(a,"MultisigStateStatus",{enumerable:!0,get:function(){return p.MultisigStateStatus}})},33759:function(ne,a,y){"use strict";var p=this&&this.__awaiter||function(M,u,v,g){return new(v||(v=Promise))(function(I,_){function A(T){try{D(g.next(T))}catch(F){_(F)}}function R(T){try{D(g.throw(T))}catch(F){_(F)}}function D(T){T.done?I(T.value):function b(I){return I instanceof v?I:new v(function(_){_(I)})}(T.value).then(A,R)}D((g=g.apply(M,u||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.connect=void 0;const C=y(58010);a.connect=function w(M){return p(this,void 0,void 0,function*(){return new C.Near(M)})}},71836:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(u,v,g,b){void 0===b&&(b=g);var I=Object.getOwnPropertyDescriptor(v,g);(!I||("get"in I?!v.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return v[g]}}),Object.defineProperty(u,b,I)}:function(u,v,g,b){void 0===b&&(b=g),u[b]=v[g]}),C=this&&this.__setModuleDefault||(Object.create?function(u,v){Object.defineProperty(u,"default",{enumerable:!0,value:v})}:function(u,v){u.default=v}),w=this&&this.__importStar||function(u){if(u&&u.__esModule)return u;var v={};if(null!=u)for(var g in u)"default"!==g&&Object.prototype.hasOwnProperty.call(u,g)&&p(v,u,g);return C(v,u),v},M=this&&this.__exportStar||function(u,v){for(var g in u)"default"!==g&&!Object.prototype.hasOwnProperty.call(v,g)&&p(v,u,g)};Object.defineProperty(a,"__esModule",{value:!0}),a.keyStores=void 0,a.keyStores=w(y(57372)),M(y(45957),a),M(y(33759),a),y(4073)},45957:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(V,j,Z,Y){void 0===Y&&(Y=Z);var G=Object.getOwnPropertyDescriptor(j,Z);(!G||("get"in G?!j.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return j[Z]}}),Object.defineProperty(V,Y,G)}:function(V,j,Z,Y){void 0===Y&&(Y=Z),V[Y]=j[Z]}),C=this&&this.__setModuleDefault||(Object.create?function(V,j){Object.defineProperty(V,"default",{enumerable:!0,value:j})}:function(V,j){V.default=j}),w=this&&this.__importStar||function(V){if(V&&V.__esModule)return V;var j={};if(null!=V)for(var Z in V)"default"!==Z&&Object.prototype.hasOwnProperty.call(V,Z)&&p(j,V,Z);return C(j,V),j};Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=a.Near=a.KeyPair=a.Signer=a.InMemorySigner=a.Contract=a.Connection=a.Account=a.multisig=a.validators=a.transactions=a.utils=a.providers=a.accountCreator=void 0;const M=w(y(91311));a.providers=M;const u=w(y(8127));a.utils=u;const v=w(y(45733));a.transactions=v;const g=w(y(51631));a.validators=g;const b=y(81818);Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return b.Account}});const I=w(y(73369));a.multisig=I;const _=w(y(73648));a.accountCreator=_;const A=y(12592);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return A.Connection}});const R=y(60351);Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return R.Signer}}),Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return R.InMemorySigner}});const D=y(99676);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return D.Contract}});const T=y(46358);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const F=y(58010);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return F.Near}});const L=y(47601);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return L.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return L.WalletConnection}})},12592:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Connection=void 0;var p=y(74931);Object.defineProperty(a,"Connection",{enumerable:!0,get:function(){return p.Connection}})},99676:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=void 0;var p=y(74931);Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return p.Contract}})},57372:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=a.BrowserLocalStorageKeyStore=a.InMemoryKeyStore=a.KeyStore=void 0;const p=y(35598);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const C=y(56724);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return C.InMemoryKeyStore}});const w=y(82869);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const M=y(7221);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},82869:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserLocalStorageKeyStore=void 0;var p=y(93271);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},56724:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.InMemoryKeyStore=void 0;var p=y(69170);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}})},91001:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=a.UnencryptedFileSystemKeyStore=a.BrowserLocalStorageKeyStore=a.InMemoryKeyStore=a.KeyStore=void 0;const p=y(35598);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const C=y(56724);Object.defineProperty(a,"InMemoryKeyStore",{enumerable:!0,get:function(){return C.InMemoryKeyStore}});const w=y(82869);Object.defineProperty(a,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const M=y(57324);Object.defineProperty(a,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return M.UnencryptedFileSystemKeyStore}});const u=y(7221);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return u.MergeKeyStore}})},35598:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.KeyStore=void 0;var p=y(69170);Object.defineProperty(a,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}})},7221:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MergeKeyStore=void 0;var p=y(69170);Object.defineProperty(a,"MergeKeyStore",{enumerable:!0,get:function(){return p.MergeKeyStore}})},57324:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UnencryptedFileSystemKeyStore=a.readKeyFile=void 0;var p=y(55738);Object.defineProperty(a,"readKeyFile",{enumerable:!0,get:function(){return p.readKeyFile}}),Object.defineProperty(a,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return p.UnencryptedFileSystemKeyStore}})},58010:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Near=void 0;var p=y(9855);Object.defineProperty(a,"Near",{enumerable:!0,get:function(){return p.Near}})},91311:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorContext=a.TypedError=a.getTransactionLastResult=a.FinalExecutionStatusBasic=a.JsonRpcProvider=a.Provider=void 0;const p=y(5754);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return p.Provider}}),Object.defineProperty(a,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}}),Object.defineProperty(a,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return p.FinalExecutionStatusBasic}});const C=y(72952);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return C.TypedError}}),Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return C.ErrorContext}})},72952:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.JsonRpcProvider=a.TypedError=a.ErrorContext=void 0;var p=y(17527);Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return p.ErrorContext}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return p.TypedError}});var C=y(1656);Object.defineProperty(a,"JsonRpcProvider",{enumerable:!0,get:function(){return C.JsonRpcProvider}})},5754:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FinalExecutionStatusBasic=a.ExecutionStatusBasic=a.IdType=a.Provider=a.getTransactionLastResult=void 0;var p=y(41166);Object.defineProperty(a,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}});var C=y(1656);Object.defineProperty(a,"Provider",{enumerable:!0,get:function(){return C.Provider}});var w=y(17527);Object.defineProperty(a,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(a,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(a,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},60351:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Signer=a.InMemorySigner=void 0;var p=y(82613);Object.defineProperty(a,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}}),Object.defineProperty(a,"Signer",{enumerable:!0,get:function(){return p.Signer}})},45733:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.transfer=a.stake=a.functionCallAccessKey=a.functionCall=a.fullAccessKey=a.deployContract=a.deleteKey=a.deleteAccount=a.createAccount=a.addKey=a.encodeDelegateAction=a.encodeSignedDelegate=a.Transaction=a.SignedTransaction=a.Signature=a.signTransaction=a.createTransaction=a.SCHEMA=a.Transfer=a.Stake=a.FunctionCallPermission=a.FunctionCall=a.FullAccessPermission=a.DeployContract=a.DeleteKey=a.DeleteAccount=a.CreateAccount=a.AddKey=a.AccessKeyPermission=a.AccessKey=a.Action=a.stringifyJsonOrBytes=void 0;var p=y(38445);Object.defineProperty(a,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return p.stringifyJsonOrBytes}}),Object.defineProperty(a,"Action",{enumerable:!0,get:function(){return p.Action}}),Object.defineProperty(a,"AccessKey",{enumerable:!0,get:function(){return p.AccessKey}}),Object.defineProperty(a,"AccessKeyPermission",{enumerable:!0,get:function(){return p.AccessKeyPermission}}),Object.defineProperty(a,"AddKey",{enumerable:!0,get:function(){return p.AddKey}}),Object.defineProperty(a,"CreateAccount",{enumerable:!0,get:function(){return p.CreateAccount}}),Object.defineProperty(a,"DeleteAccount",{enumerable:!0,get:function(){return p.DeleteAccount}}),Object.defineProperty(a,"DeleteKey",{enumerable:!0,get:function(){return p.DeleteKey}}),Object.defineProperty(a,"DeployContract",{enumerable:!0,get:function(){return p.DeployContract}}),Object.defineProperty(a,"FullAccessPermission",{enumerable:!0,get:function(){return p.FullAccessPermission}}),Object.defineProperty(a,"FunctionCall",{enumerable:!0,get:function(){return p.FunctionCall}}),Object.defineProperty(a,"FunctionCallPermission",{enumerable:!0,get:function(){return p.FunctionCallPermission}}),Object.defineProperty(a,"Stake",{enumerable:!0,get:function(){return p.Stake}}),Object.defineProperty(a,"Transfer",{enumerable:!0,get:function(){return p.Transfer}}),Object.defineProperty(a,"SCHEMA",{enumerable:!0,get:function(){return p.SCHEMA}}),Object.defineProperty(a,"createTransaction",{enumerable:!0,get:function(){return p.createTransaction}}),Object.defineProperty(a,"signTransaction",{enumerable:!0,get:function(){return p.signTransaction}}),Object.defineProperty(a,"Signature",{enumerable:!0,get:function(){return p.Signature}}),Object.defineProperty(a,"SignedTransaction",{enumerable:!0,get:function(){return p.SignedTransaction}}),Object.defineProperty(a,"Transaction",{enumerable:!0,get:function(){return p.Transaction}}),Object.defineProperty(a,"encodeSignedDelegate",{enumerable:!0,get:function(){return p.encodeSignedDelegate}}),Object.defineProperty(a,"encodeDelegateAction",{enumerable:!0,get:function(){return p.encodeDelegateAction}});const C=y(38445);a.addKey=(D,T)=>C.actionCreators.addKey(D,T);a.createAccount=()=>C.actionCreators.createAccount();a.deleteAccount=D=>C.actionCreators.deleteAccount(D);a.deleteKey=D=>C.actionCreators.deleteKey(D);a.deployContract=D=>C.actionCreators.deployContract(D);a.fullAccessKey=()=>C.actionCreators.fullAccessKey();a.functionCall=(D,T,F,L,V,j)=>C.actionCreators.functionCall(D,T,F,L,V,j);a.functionCallAccessKey=(D,T,F)=>C.actionCreators.functionCallAccessKey(D,T,F);a.stake=(D,T)=>C.actionCreators.stake(D,T);a.transfer=D=>C.actionCreators.transfer(D)},89867:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Enum=a.Assignable=void 0;var p=y(17527);Object.defineProperty(a,"Assignable",{enumerable:!0,get:function(){return p.Assignable}});a.Enum=class C{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(u=>{this[u]=M[u],this.enum=u})}}},84528:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.logWarning=a.TypedError=a.PositionalArgsError=a.ErrorContext=a.ArgumentTypeError=a.UnsupportedSerializationError=a.UnknownArgumentError=a.ConflictingOptions=a.ArgumentSchemaError=void 0;var p=y(74931);Object.defineProperty(a,"ArgumentSchemaError",{enumerable:!0,get:function(){return p.ArgumentSchemaError}}),Object.defineProperty(a,"ConflictingOptions",{enumerable:!0,get:function(){return p.ConflictingOptions}}),Object.defineProperty(a,"UnknownArgumentError",{enumerable:!0,get:function(){return p.UnknownArgumentError}}),Object.defineProperty(a,"UnsupportedSerializationError",{enumerable:!0,get:function(){return p.UnsupportedSerializationError}});var C=y(17527);Object.defineProperty(a,"ArgumentTypeError",{enumerable:!0,get:function(){return C.ArgumentTypeError}}),Object.defineProperty(a,"ErrorContext",{enumerable:!0,get:function(){return C.ErrorContext}}),Object.defineProperty(a,"PositionalArgsError",{enumerable:!0,get:function(){return C.PositionalArgsError}}),Object.defineProperty(a,"TypedError",{enumerable:!0,get:function(){return C.TypedError}});var w=y(41166);Object.defineProperty(a,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},29110:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.parseNearAmount=a.formatNearAmount=a.NEAR_NOMINATION_EXP=a.NEAR_NOMINATION=void 0;var p=y(41166);Object.defineProperty(a,"NEAR_NOMINATION",{enumerable:!0,get:function(){return p.NEAR_NOMINATION}}),Object.defineProperty(a,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return p.NEAR_NOMINATION_EXP}}),Object.defineProperty(a,"formatNearAmount",{enumerable:!0,get:function(){return p.formatNearAmount}}),Object.defineProperty(a,"parseNearAmount",{enumerable:!0,get:function(){return p.parseNearAmount}})},8127:function(ne,a,y){"use strict";var p=this&&this.__createBinding||(Object.create?function(R,D,T,F){void 0===F&&(F=T);var L=Object.getOwnPropertyDescriptor(D,T);(!L||("get"in L?!D.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return D[T]}}),Object.defineProperty(R,F,L)}:function(R,D,T,F){void 0===F&&(F=T),R[F]=D[T]}),C=this&&this.__setModuleDefault||(Object.create?function(R,D){Object.defineProperty(R,"default",{enumerable:!0,value:D})}:function(R,D){R.default=D}),w=this&&this.__importStar||function(R){if(R&&R.__esModule)return R;var D={};if(null!=R)for(var T in R)"default"!==T&&Object.prototype.hasOwnProperty.call(R,T)&&p(D,R,T);return C(D,R),D};Object.defineProperty(a,"__esModule",{value:!0}),a.logWarning=a.rpc_errors=a.KeyPairEd25519=a.KeyPair=a.PublicKey=a.format=a.enums=a.web=a.serialize=a.key_pair=void 0;const M=w(y(46358));a.key_pair=M;const u=w(y(7123));a.serialize=u;const v=w(y(36360));a.web=v;const g=w(y(89867));a.enums=g;const b=w(y(29110));a.format=b;const I=w(y(88414));a.rpc_errors=I;const _=y(46358);Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}}),Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}}),Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return _.KeyPairEd25519}});const A=y(84528);Object.defineProperty(a,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},46358:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PublicKey=a.KeyType=a.KeyPairEd25519=a.KeyPair=void 0;var p=y(29761);Object.defineProperty(a,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(a,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}}),Object.defineProperty(a,"KeyType",{enumerable:!0,get:function(){return p.KeyType}}),Object.defineProperty(a,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}})},88414:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ServerError=a.getErrorTypeFromErrorMessage=a.formatError=a.parseResultError=a.parseRpcError=void 0;var p=y(41166);Object.defineProperty(a,"parseRpcError",{enumerable:!0,get:function(){return p.parseRpcError}}),Object.defineProperty(a,"parseResultError",{enumerable:!0,get:function(){return p.parseResultError}}),Object.defineProperty(a,"formatError",{enumerable:!0,get:function(){return p.formatError}}),Object.defineProperty(a,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return p.getErrorTypeFromErrorMessage}}),Object.defineProperty(a,"ServerError",{enumerable:!0,get:function(){return p.ServerError}})},7123:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BinaryReader=a.BinaryWriter=a.BorshError=a.deserialize=a.serialize=a.base_decode=a.base_encode=void 0;var p=y(21531);Object.defineProperty(a,"base_encode",{enumerable:!0,get:function(){return p.baseEncode}}),Object.defineProperty(a,"base_decode",{enumerable:!0,get:function(){return p.baseDecode}}),Object.defineProperty(a,"serialize",{enumerable:!0,get:function(){return p.serialize}}),Object.defineProperty(a,"deserialize",{enumerable:!0,get:function(){return p.deserialize}}),Object.defineProperty(a,"BorshError",{enumerable:!0,get:function(){return p.BorshError}}),Object.defineProperty(a,"BinaryWriter",{enumerable:!0,get:function(){return p.BinaryWriter}}),Object.defineProperty(a,"BinaryReader",{enumerable:!0,get:function(){return p.BinaryReader}})},36360:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fetchJson=void 0;var p=y(1656);Object.defineProperty(a,"fetchJson",{enumerable:!0,get:function(){return p.fetchJson}})},51631:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.findSeatPrice=a.diffEpochValidators=void 0;var p=y(41166);Object.defineProperty(a,"diffEpochValidators",{enumerable:!0,get:function(){return p.diffEpochValidators}}),Object.defineProperty(a,"findSeatPrice",{enumerable:!0,get:function(){return p.findSeatPrice}})},47601:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WalletConnection=a.ConnectedWalletAccount=void 0;var p=y(9855);Object.defineProperty(a,"ConnectedWalletAccount",{enumerable:!0,get:function(){return p.ConnectedWalletAccount}}),Object.defineProperty(a,"WalletConnection",{enumerable:!0,get:function(){return p.WalletConnection}})},46789:(ne,a,y)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.derivePath=a.isValidPath=a.getPublicKey=a.getMasterKeyFromSeed=void 0;const p=y(74529),C=y(40489),w=y(25076);a.getMasterKeyFromSeed=g=>{const I=p("sha512","ed25519 seed").update(Buffer.from(g,"hex")).digest();return{key:I.slice(0,32),chainCode:I.slice(32)}};a.getPublicKey=(g,b=!0)=>{const _=C.sign.keyPair.fromSeed(g).secretKey.subarray(32),A=Buffer.alloc(1,0);return b?Buffer.concat([A,Buffer.from(_)]):Buffer.from(_)},a.isValidPath=g=>!!w.pathRegex.test(g)&&!g.split("/").slice(1).map(w.replaceDerive).some(isNaN),a.derivePath=(g,b,I=2147483648)=>{if(!a.isValidPath(g))throw new Error("Invalid derivation path");const{key:_,chainCode:A}=a.getMasterKeyFromSeed(b);return g.split("/").slice(1).map(w.replaceDerive).map(D=>parseInt(D,10)).reduce((D,T)=>(({key:g,chainCode:b},I)=>{const _=Buffer.allocUnsafe(4);_.writeUInt32BE(I,0);const A=Buffer.concat([Buffer.alloc(1,0),g,_]),R=p("sha512",b).update(A).digest();return{key:R.slice(0,32),chainCode:R.slice(32)}})(D,T+I),{key:_,chainCode:A})}},25076:(ne,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.replaceDerive=a.pathRegex=void 0,a.pathRegex=new RegExp("^m(\\/[0-9]+')+$"),a.replaceDerive=y=>y.replace("'","")},21087:(ne,a,y)=>{const p=y(48670),{derivePath:C}=y(46789),w=y(78141),M=y(40489),u="m/44'/397'/0'",g=_=>_.trim().split(/\s+/).map(A=>A.toLowerCase()).join(" "),b=(_,A)=>{const R=p.mnemonicToSeed(g(_)),{key:D}=C(A||u,R.toString("hex")),T=M.sign.keyPair.fromSeed(D),F="ed25519:"+w.encode(Buffer.from(T.publicKey));return{seedPhrase:_,secretKey:"ed25519:"+w.encode(Buffer.from(T.secretKey)),publicKey:F}};ne.exports={KEY_DERIVATION_PATH:u,generateSeedPhrase:_=>b(void 0!==_?p.entropyToMnemonic(_):p.generateMnemonic()),normalizeSeedPhrase:g,parseSeedPhrase:b,findSeedPhraseKey:(_,A)=>{const R=b(_);return A.indexOf(R.publicKey)<0?{}:R}}},78141:(ne,a,y)=>{var p=y(21082);ne.exports=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69637:(ne,a)=>{"use strict";var p=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();ne.exports=a=p.fetch,p.fetch&&(a.default=p.fetch.bind(p)),a.Headers=p.Headers,a.Request=p.Request,a.Response=p.Response},90252:(ne,a,y)=>{y(53495),ne.exports=y(6258)},46974:ne=>{var a=function(){var y=Object.create({Source:Object,config:{},buildArgs:[]});function p(g){var b="config";if(g instanceof Function)b="Source";else if(g instanceof Array)b="buildArgs";else{if(!(g instanceof Object))throw new Error("Invalid configuration option.");b="config"}if(y.hasOwnProperty(b))throw new Error("Duplicated configuration option: "+b+".");y[b]=g}for(var C=0,w=arguments.length;C{ne.exports=function(){throw new Error("Not implemented.")}},6258:(ne,a,y)=>{ne.exports={Class:y(46974),abstractMethod:y(93765)}},39199:ne=>{ne.exports=function(a,y){return parseInt(a.toString(),y||8)}},46389:(ne,a,y)=>{var p=y(99136);function C(M){var u=function(){return u.called?u.value:(u.called=!0,u.value=M.apply(this,arguments))};return u.called=!1,u}function w(M){var u=function(){if(u.called)throw new Error(u.onceError);return u.called=!0,u.value=M.apply(this,arguments)},v=M.name||"Function wrapped with `once`";return u.onceError=v+" shouldn't be called more than once",u.called=!1,u}ne.exports=p(C),ne.exports.strict=p(w),C.proto=C(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return C(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return w(this)},configurable:!0})})},52999:(ne,a,y)=>{"use strict";var p=y(87977);a.certificate=y(12390);var C=p.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});a.RSAPrivateKey=C;var w=p.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});a.RSAPublicKey=w;var M=p.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())});a.PublicKey=M;var u=p.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),v=p.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(u),this.key("subjectPrivateKey").octstr())});a.PrivateKey=v;var g=p.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});a.EncryptedPrivateKey=g;var b=p.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});a.DSAPrivateKey=b,a.DSAparam=p.define("DSAparam",function(){this.int()});var I=p.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(_),this.key("publicKey").optional().explicit(1).bitstr())});a.ECPrivateKey=I;var _=p.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});a.signature=p.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},12390:(ne,a,y)=>{"use strict";var p=y(87977),C=p.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),w=p.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),M=p.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),u=p.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(M),this.key("subjectPublicKey").bitstr())}),v=p.define("RelativeDistinguishedName",function(){this.setof(w)}),g=p.define("RDNSequence",function(){this.seqof(v)}),b=p.define("Name",function(){this.choice({rdnSequence:this.use(g)})}),I=p.define("Validity",function(){this.seq().obj(this.key("notBefore").use(C),this.key("notAfter").use(C))}),_=p.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),A=p.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(M),this.key("issuer").use(b),this.key("validity").use(I),this.key("subject").use(b),this.key("subjectPublicKeyInfo").use(u),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(_).optional())}),R=p.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(A),this.key("signatureAlgorithm").use(M),this.key("signatureValue").bitstr())});ne.exports=R},65269:(ne,a,y)=>{var p=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,C=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,w=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,M=y(40347),u=y(84330),v=y(73502).Buffer;ne.exports=function(g,b){var A,I=g.toString(),_=I.match(p);if(_){var D="aes"+_[1],T=v.from(_[2],"hex"),F=v.from(_[3].replace(/[\r\n]/g,""),"base64"),L=M(b,T.slice(0,8),parseInt(_[1],10)).key,V=[],j=u.createDecipheriv(D,L,T);V.push(j.update(F)),V.push(j.final()),A=v.concat(V)}else{var R=I.match(w);A=v.from(R[2].replace(/[\r\n]/g,""),"base64")}return{tag:I.match(C)[1],data:A}}},22772:(ne,a,y)=>{var p=y(52999),C=y(22562),w=y(65269),M=y(84330),u=y(99357),v=y(73502).Buffer;function g(I){var _;"object"==typeof I&&!v.isBuffer(I)&&(_=I.passphrase,I=I.key),"string"==typeof I&&(I=v.from(I));var T,F,A=w(I,_),R=A.tag,D=A.data;switch(R){case"CERTIFICATE":F=p.certificate.decode(D,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(F||(F=p.PublicKey.decode(D,"der")),T=F.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return p.RSAPublicKey.decode(F.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return F.subjectPrivateKey=F.subjectPublicKey,{type:"ec",data:F};case"1.2.840.10040.4.1":return F.algorithm.params.pub_key=p.DSAparam.decode(F.subjectPublicKey.data,"der"),{type:"dsa",data:F.algorithm.params};default:throw new Error("unknown key id "+T)}case"ENCRYPTED PRIVATE KEY":D=function b(I,_){var A=I.algorithm.decrypt.kde.kdeparams.salt,R=parseInt(I.algorithm.decrypt.kde.kdeparams.iters.toString(),10),D=C[I.algorithm.decrypt.cipher.algo.join(".")],T=I.algorithm.decrypt.cipher.iv,F=I.subjectPrivateKey,L=parseInt(D.split("-")[1],10)/8,V=u.pbkdf2Sync(_,A,R,L,"sha1"),j=M.createDecipheriv(D,V,T),Z=[];return Z.push(j.update(F)),Z.push(j.final()),v.concat(Z)}(D=p.EncryptedPrivateKey.decode(D,"der"),_);case"PRIVATE KEY":switch(T=(F=p.PrivateKey.decode(D,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return p.RSAPrivateKey.decode(F.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:F.algorithm.curve,privateKey:p.ECPrivateKey.decode(F.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return F.algorithm.params.priv_key=p.DSAparam.decode(F.subjectPrivateKey,"der"),{type:"dsa",params:F.algorithm.params};default:throw new Error("unknown key id "+T)}case"RSA PUBLIC KEY":return p.RSAPublicKey.decode(D,"der");case"RSA PRIVATE KEY":return p.RSAPrivateKey.decode(D,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:p.DSAPrivateKey.decode(D,"der")};case"EC PRIVATE KEY":return{curve:(D=p.ECPrivateKey.decode(D,"der")).parameters.value,privateKey:D.privateKey};default:throw new Error("unknown key type "+R)}}ne.exports=g,g.signature=p.signature},63928:ne=>{"use strict";function a(w){if("string"!=typeof w)throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function y(w,M){for(var I,u="",v=0,g=-1,b=0,_=0;_<=w.length;++_){if(_2){var A=u.lastIndexOf("/");if(A!==u.length-1){-1===A?(u="",v=0):v=(u=u.slice(0,A)).length-1-u.lastIndexOf("/"),g=_,b=0;continue}}else if(2===u.length||1===u.length){u="",v=0,g=_,b=0;continue}M&&(u.length>0?u+="/..":u="..",v=2)}else u.length>0?u+="/"+w.slice(g+1,_):u=w.slice(g+1,_),v=_-g-1;g=_,b=0}else 46===I&&-1!==b?++b:b=-1}return u}var C={resolve:function(){for(var v,M="",u=!1,g=arguments.length-1;g>=-1&&!u;g--){var b;g>=0?b=arguments[g]:(void 0===v&&(v=process.cwd()),b=v),a(b),0!==b.length&&(M=b+"/"+M,u=47===b.charCodeAt(0))}return M=y(M,!u),u?M.length>0?"/"+M:"/":M.length>0?M:"."},normalize:function(M){if(a(M),0===M.length)return".";var u=47===M.charCodeAt(0),v=47===M.charCodeAt(M.length-1);return 0===(M=y(M,!u)).length&&!u&&(M="."),M.length>0&&v&&(M+="/"),u?"/"+M:M},isAbsolute:function(M){return a(M),M.length>0&&47===M.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var M,u=0;u0&&(void 0===M?M=v:M+="/"+v)}return void 0===M?".":C.normalize(M)},relative:function(M,u){if(a(M),a(u),M===u||(M=C.resolve(M))===(u=C.resolve(u)))return"";for(var v=1;vR){if(47===u.charCodeAt(I+T))return u.slice(I+T+1);if(0===T)return u.slice(I+T)}else b>R&&(47===M.charCodeAt(v+T)?D=T:0===T&&(D=0));break}var F=M.charCodeAt(v+T);if(F!==u.charCodeAt(I+T))break;47===F&&(D=T)}var V="";for(T=v+D+1;T<=g;++T)(T===g||47===M.charCodeAt(T))&&(0===V.length?V+="..":V+="/..");return V.length>0?V+u.slice(I+D):(I+=D,47===u.charCodeAt(I)&&++I,u.slice(I))},_makeLong:function(M){return M},dirname:function(M){if(a(M),0===M.length)return".";for(var u=M.charCodeAt(0),v=47===u,g=-1,b=!0,I=M.length-1;I>=1;--I)if(47===(u=M.charCodeAt(I))){if(!b){g=I;break}}else b=!1;return-1===g?v?"/":".":v&&1===g?"//":M.slice(0,g)},basename:function(M,u){if(void 0!==u&&"string"!=typeof u)throw new TypeError('"ext" argument must be a string');a(M);var I,v=0,g=-1,b=!0;if(void 0!==u&&u.length>0&&u.length<=M.length){if(u.length===M.length&&u===M)return"";var _=u.length-1,A=-1;for(I=M.length-1;I>=0;--I){var R=M.charCodeAt(I);if(47===R){if(!b){v=I+1;break}}else-1===A&&(b=!1,A=I+1),_>=0&&(R===u.charCodeAt(_)?-1==--_&&(g=I):(_=-1,g=A))}return v===g?g=A:-1===g&&(g=M.length),M.slice(v,g)}for(I=M.length-1;I>=0;--I)if(47===M.charCodeAt(I)){if(!b){v=I+1;break}}else-1===g&&(b=!1,g=I+1);return-1===g?"":M.slice(v,g)},extname:function(M){a(M);for(var u=-1,v=0,g=-1,b=!0,I=0,_=M.length-1;_>=0;--_){var A=M.charCodeAt(_);if(47!==A)-1===g&&(b=!1,g=_+1),46===A?-1===u?u=_:1!==I&&(I=1):-1!==u&&(I=-1);else if(!b){v=_+1;break}}return-1===u||-1===g||0===I||1===I&&u===g-1&&u===v+1?"":M.slice(u,g)},format:function(M){if(null===M||"object"!=typeof M)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof M);return function p(w,M){var u=M.dir||M.root,v=M.base||(M.name||"")+(M.ext||"");return u?u===M.root?u+v:u+w+v:v}("/",M)},parse:function(M){a(M);var u={root:"",dir:"",base:"",ext:"",name:""};if(0===M.length)return u;var b,v=M.charCodeAt(0),g=47===v;g?(u.root="/",b=1):b=0;for(var I=-1,_=0,A=-1,R=!0,D=M.length-1,T=0;D>=b;--D)if(47!==(v=M.charCodeAt(D)))-1===A&&(R=!1,A=D+1),46===v?-1===I?I=D:1!==T&&(T=1):-1!==I&&(T=-1);else if(!R){_=D+1;break}return-1===I||-1===A||0===T||1===T&&I===A-1&&I===_+1?-1!==A&&(u.base=u.name=0===_&&g?M.slice(1,A):M.slice(_,A)):(0===_&&g?(u.name=M.slice(1,I),u.base=M.slice(1,A)):(u.name=M.slice(_,I),u.base=M.slice(_,A)),u.ext=M.slice(I,A)),_>0?u.dir=M.slice(0,_-1):g&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};C.posix=C,ne.exports=C},99357:(ne,a,y)=>{a.pbkdf2=y(90415),a.pbkdf2Sync=y(77472)},90415:(ne,a,y)=>{var v,A,p=y(73502).Buffer,C=y(62697),w=y(78867),M=y(77472),u=y(94566),g=global.crypto&&global.crypto.subtle,b={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"},I=[];function R(){return A||(A=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function D(F,L,V,j,Z){return g.importKey("raw",F,{name:"PBKDF2"},!1,["deriveBits"]).then(function(Y){return g.deriveBits({name:"PBKDF2",salt:L,iterations:V,hash:{name:Z}},Y,j<<3)}).then(function(Y){return p.from(Y)})}ne.exports=function(F,L,V,j,Z,Y){"function"==typeof Z&&(Y=Z,Z=void 0);var G=b[(Z=Z||"sha1").toLowerCase()];if(G&&"function"==typeof global.Promise){if(C(V,j),F=u(F,w,"Password"),L=u(L,w,"Salt"),"function"!=typeof Y)throw new Error("No callback provided to pbkdf2");!function T(F,L){F.then(function(V){R()(function(){L(null,V)})},function(V){R()(function(){L(V)})})}(function _(F){if(global.process&&!global.process.browser||!g||!g.importKey||!g.deriveBits)return Promise.resolve(!1);if(void 0!==I[F])return I[F];var L=D(v=v||p.alloc(8),v,10,128,F).then(function(){return!0}).catch(function(){return!1});return I[F]=L,L}(G).then(function(q){return q?D(F,L,V,j,G):M(F,L,V,j,Z)}),Y)}else R()(function(){var q;try{q=M(F,L,V,j,Z)}catch(X){return Y(X)}Y(null,q)})}},78867:ne=>{var a;if(global.process&&global.process.browser)a="utf-8";else if(global.process&&global.process.version){a=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else a="utf-8";ne.exports=a},62697:ne=>{var a=Math.pow(2,30)-1;ne.exports=function(y,p){if("number"!=typeof y)throw new TypeError("Iterations not a number");if(y<0)throw new TypeError("Bad iterations");if("number"!=typeof p)throw new TypeError("Key length not a number");if(p<0||p>a||p!=p)throw new TypeError("Bad key length")}},77472:(ne,a,y)=>{var p=y(55640),C=y(75634),w=y(95244),M=y(73502).Buffer,u=y(62697),v=y(78867),g=y(94566),b=M.alloc(128),I={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _(D,T,F){var L=function A(D){function T(L){return w(D).update(L).digest()}function F(L){return(new C).update(L).digest()}return"rmd160"===D||"ripemd160"===D?F:"md5"===D?p:T}(D),V="sha512"===D||"sha384"===D?128:64;T.length>V?T=L(T):T.length{var p=y(73502).Buffer;ne.exports=function(C,w,M){if(p.isBuffer(C))return C;if("string"==typeof C)return p.from(C,w);if(ArrayBuffer.isView(C))return p.from(C.buffer);throw new TypeError(M+" must be a string, a Buffer, a typed array or a DataView")}},95857:ne=>{"use strict";typeof process>"u"||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?ne.exports={nextTick:function a(y,p,C,w){if("function"!=typeof y)throw new TypeError('"callback" argument must be a function');var u,v,M=arguments.length;switch(M){case 0:case 1:return process.nextTick(y);case 2:return process.nextTick(function(){y.call(null,p)});case 3:return process.nextTick(function(){y.call(null,p,C)});case 4:return process.nextTick(function(){y.call(null,p,C,w)});default:for(u=new Array(M-1),v=0;v-1};return{enumerable:v("enumerable"),configurable:v("configurable"),writable:v("writable"),value:C}}(M,u),"object"==typeof w){for(v in w)Object.hasOwnProperty.call(w,v)&&(u.value=w[v],a(C,v,u));return C}return a(C,w,u)}},ne.exports?ne.exports=p():y.prr=p()},63701:(ne,a,y)=>{a.publicEncrypt=y(16562),a.privateDecrypt=y(36705),a.privateEncrypt=function(C,w){return a.publicEncrypt(C,w,!0)},a.publicDecrypt=function(C,w){return a.privateDecrypt(C,w,!0)}},86945:(ne,a,y)=>{var p=y(96386),C=y(73502).Buffer;function w(M){var u=C.allocUnsafe(4);return u.writeUInt32BE(M,0),u}ne.exports=function(M,u){for(var b,v=C.alloc(0),g=0;v.length=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(S,r,s){var d=g(S,s);return s-1>=r&&(d|=g(S,s-1)<<4),d}function I(S,r,s,d){for(var h=0,E=Math.min(S.length,s),k=r;k=49?B-49+10:B>=17?B-17+10:B}return h}u.isBN=function(r){return r instanceof u||null!==r&&"object"==typeof r&&r.constructor.wordSize===u.wordSize&&Array.isArray(r.words)},u.max=function(r,s){return r.cmp(s)>0?r:s},u.min=function(r,s){return r.cmp(s)<0?r:s},u.prototype._init=function(r,s,d){if("number"==typeof r)return this._initNumber(r,s,d);if("object"==typeof r)return this._initArray(r,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=r[h]|r[h-1]<<8|r[h-2]<<16,this.words[E]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);else if("le"===d)for(h=0,E=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,E++);return this.strip()},u.prototype._parseHex=function(r,s,d){this.length=Math.ceil((r.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(r,s,h)<=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;else for(h=(r.length-s)%2==0?s+1:s;h=18?(E-=18,k+=1,this.words[k]|=B>>>26):E+=8;this.strip()},u.prototype._parseBase=function(r,s,d){this.words=[0],this.length=1;for(var h=0,E=1;E<=67108863;E*=s)h++;h--,E=E/s|0;for(var k=r.length-d,B=k%h,x=Math.min(k,k-B)+d,f=0,P=d;P1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(S,r,s){s.negative=r.negative^S.negative;var d=S.length+r.length|0;s.length=d,d=d-1|0;var h=0|S.words[0],E=0|r.words[0],k=h*E,B=67108863&k,x=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&x,te=Math.min(f,r.length-1),ie=Math.max(0,f-S.length+1);ie<=te;ie++){var de=f-ie|0;P+=(k=(h=0|S.words[de])*(E=0|r.words[ie])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,x=0|P}return 0!==x?s.words[f]=0|x:s.length--,s.strip()}u.prototype.toString=function(r,s){var d;if(s=0|s||1,16===(r=r||10)||"hex"===r){d="";for(var h=0,E=0,k=0;k>>24-h&16777215)||k!==this.length-1?_[6-x.length]+x+d:x+d,(h+=2)>=26&&(h-=26,k--)}for(0!==E&&(d=E.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(r===(0|r)&&r>=2&&r<=36){var f=A[r],P=R[r];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(P).toString(r);d=(se=se.idivn(P)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(r,s){return w(typeof v<"u"),this.toArrayLike(v,r,s)},u.prototype.toArray=function(r,s){return this.toArrayLike(Array,r,s)},u.prototype.toArrayLike=function(r,s,d){var h=this.byteLength(),E=d||Math.max(1,h);w(h<=E,"byte array longer than desired length"),w(E>0,"Requested array length <= 0"),this.strip();var x,f,k="le"===s,B=new r(E),P=this.clone();if(k){for(f=0;!P.isZero();f++)x=P.andln(255),P.iushrn(8),B[f]=x;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},u.prototype._zeroBits=function(r){if(0===r)return 26;var s=r,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},u.prototype.bitLength=function(){var r=this.words[this.length-1],s=this._countBits(r);return 26*(this.length-1)+s},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,s=0;sr.length?this.clone().ior(r):r.clone().ior(this)},u.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},u.prototype.iuand=function(r){var s;s=this.length>r.length?r:this;for(var d=0;dr.length?this.clone().iand(r):r.clone().iand(this)},u.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},u.prototype.iuxor=function(r){var s,d;this.length>r.length?(s=this,d=r):(s=r,d=this);for(var h=0;hr.length?this.clone().ixor(r):r.clone().ixor(this)},u.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},u.prototype.inotn=function(r){w("number"==typeof r&&r>=0);var s=0|Math.ceil(r/26),d=r%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},u.prototype.notn=function(r){return this.clone().inotn(r)},u.prototype.setn=function(r,s){w("number"==typeof r&&r>=0);var d=r/26|0,h=r%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<r.length?(d=this,h=r):(d=r,h=this);for(var E=0,k=0;k>>26;for(;0!==E&&k>>26;if(this.length=d.length,0!==E)this.words[this.length]=E,this.length++;else if(d!==this)for(;kr.length?this.clone().iadd(r):r.clone().iadd(this)},u.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var s=this.iadd(r);return r.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var h,E,d=this.cmp(r);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,E=r):(h=r,E=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Ee=8191&pe,ce=pe>>>13,be=0|h[4],Ne=8191&be,Fe=be>>>13,ct=0|h[5],Ze=8191&ct,Ve=ct>>>13,Ut=0|h[6],$e=8191&Ut,tt=Ut>>>13,Xt=0|h[7],ot=8191&Xt,st=Xt>>>13,$t=0|h[8],Pe=8191&$t,Ae=$t>>>13,xe=0|h[9],Be=8191&xe,ze=xe>>>13,mt=0|E[0],Ye=8191&mt,ut=mt>>>13,ln=0|E[1],ft=8191&ln,wt=ln>>>13,mn=0|E[2],We=8191&mn,Qe=mn>>>13,Qt=0|E[3],ht=8191&Qt,gt=Qt>>>13,on=0|E[4],dt=8191&on,pt=on>>>13,yn=0|E[5],lt=8191&yn,vt=yn>>>13,En=0|E[6],yt=8191&En,At=En>>>13,Se=0|E[7],we=8191&Se,_e=Se>>>13,me=0|E[8],De=8191&me,Ke=me>>>13,it=0|E[9],Je=8191&it,qe=it>>>13;d.negative=r.negative^s.negative,d.length=19;var Ht=(B+(x=Math.imul(te,Ye))|0)+((8191&(f=(f=Math.imul(te,ut))+Math.imul(ie,Ye)|0))<<13)|0;B=((P=Math.imul(ie,ut))+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ce,Ye),f=(f=Math.imul(Ce,ut))+Math.imul(ye,Ye)|0,P=Math.imul(ye,ut);var Ct=(B+(x=x+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(ie,ft)|0))<<13)|0;B=((P=P+Math.imul(ie,wt)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,x=Math.imul(ae,Ye),f=(f=Math.imul(ae,ut))+Math.imul(fe,Ye)|0,P=Math.imul(fe,ut),x=x+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ft)|0,P=P+Math.imul(ye,wt)|0;var Lt=(B+(x=x+Math.imul(te,We)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(ie,We)|0))<<13)|0;B=((P=P+Math.imul(ie,Qe)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x=Math.imul(Ee,Ye),f=(f=Math.imul(Ee,ut))+Math.imul(ce,Ye)|0,P=Math.imul(ce,ut),x=x+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ft)|0,P=P+Math.imul(fe,wt)|0,x=x+Math.imul(Ce,We)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,We)|0,P=P+Math.imul(ye,Qe)|0;var Tt=(B+(x=x+Math.imul(te,ht)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(ie,ht)|0))<<13)|0;B=((P=P+Math.imul(ie,gt)|0)+(f>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,x=Math.imul(Ne,Ye),f=(f=Math.imul(Ne,ut))+Math.imul(Fe,Ye)|0,P=Math.imul(Fe,ut),x=x+Math.imul(Ee,ft)|0,f=(f=f+Math.imul(Ee,wt)|0)+Math.imul(ce,ft)|0,P=P+Math.imul(ce,wt)|0,x=x+Math.imul(ae,We)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,We)|0,P=P+Math.imul(fe,Qe)|0,x=x+Math.imul(Ce,ht)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,ht)|0,P=P+Math.imul(ye,gt)|0;var Pt=(B+(x=x+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,pt)|0)+Math.imul(ie,dt)|0))<<13)|0;B=((P=P+Math.imul(ie,pt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,x=Math.imul(Ze,Ye),f=(f=Math.imul(Ze,ut))+Math.imul(Ve,Ye)|0,P=Math.imul(Ve,ut),x=x+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ft)|0,P=P+Math.imul(Fe,wt)|0,x=x+Math.imul(Ee,We)|0,f=(f=f+Math.imul(Ee,Qe)|0)+Math.imul(ce,We)|0,P=P+Math.imul(ce,Qe)|0,x=x+Math.imul(ae,ht)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,ht)|0,P=P+Math.imul(fe,gt)|0,x=x+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,pt)|0)+Math.imul(ye,dt)|0,P=P+Math.imul(ye,pt)|0;var Bt=(B+(x=x+Math.imul(te,lt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(ie,lt)|0))<<13)|0;B=((P=P+Math.imul(ie,vt)|0)+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul($e,Ye),f=(f=Math.imul($e,ut))+Math.imul(tt,Ye)|0,P=Math.imul(tt,ut),x=x+Math.imul(Ze,ft)|0,f=(f=f+Math.imul(Ze,wt)|0)+Math.imul(Ve,ft)|0,P=P+Math.imul(Ve,wt)|0,x=x+Math.imul(Ne,We)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,We)|0,P=P+Math.imul(Fe,Qe)|0,x=x+Math.imul(Ee,ht)|0,f=(f=f+Math.imul(Ee,gt)|0)+Math.imul(ce,ht)|0,P=P+Math.imul(ce,gt)|0,x=x+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,pt)|0)+Math.imul(fe,dt)|0,P=P+Math.imul(fe,pt)|0,x=x+Math.imul(Ce,lt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,lt)|0,P=P+Math.imul(ye,vt)|0;var Zt=(B+(x=x+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(ie,yt)|0))<<13)|0;B=((P=P+Math.imul(ie,At)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(ot,Ye),f=(f=Math.imul(ot,ut))+Math.imul(st,Ye)|0,P=Math.imul(st,ut),x=x+Math.imul($e,ft)|0,f=(f=f+Math.imul($e,wt)|0)+Math.imul(tt,ft)|0,P=P+Math.imul(tt,wt)|0,x=x+Math.imul(Ze,We)|0,f=(f=f+Math.imul(Ze,Qe)|0)+Math.imul(Ve,We)|0,P=P+Math.imul(Ve,Qe)|0,x=x+Math.imul(Ne,ht)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,ht)|0,P=P+Math.imul(Fe,gt)|0,x=x+Math.imul(Ee,dt)|0,f=(f=f+Math.imul(Ee,pt)|0)+Math.imul(ce,dt)|0,P=P+Math.imul(ce,pt)|0,x=x+Math.imul(ae,lt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,lt)|0,P=P+Math.imul(fe,vt)|0,x=x+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,yt)|0,P=P+Math.imul(ye,At)|0;var qt=(B+(x=x+Math.imul(te,we)|0)|0)+((8191&(f=(f=f+Math.imul(te,_e)|0)+Math.imul(ie,we)|0))<<13)|0;B=((P=P+Math.imul(ie,_e)|0)+(f>>>13)|0)+(qt>>>26)|0,qt&=67108863,x=Math.imul(Pe,Ye),f=(f=Math.imul(Pe,ut))+Math.imul(Ae,Ye)|0,P=Math.imul(Ae,ut),x=x+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(st,ft)|0,P=P+Math.imul(st,wt)|0,x=x+Math.imul($e,We)|0,f=(f=f+Math.imul($e,Qe)|0)+Math.imul(tt,We)|0,P=P+Math.imul(tt,Qe)|0,x=x+Math.imul(Ze,ht)|0,f=(f=f+Math.imul(Ze,gt)|0)+Math.imul(Ve,ht)|0,P=P+Math.imul(Ve,gt)|0,x=x+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,pt)|0)+Math.imul(Fe,dt)|0,P=P+Math.imul(Fe,pt)|0,x=x+Math.imul(Ee,lt)|0,f=(f=f+Math.imul(Ee,vt)|0)+Math.imul(ce,lt)|0,P=P+Math.imul(ce,vt)|0,x=x+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,yt)|0,P=P+Math.imul(fe,At)|0,x=x+Math.imul(Ce,we)|0,f=(f=f+Math.imul(Ce,_e)|0)+Math.imul(ye,we)|0,P=P+Math.imul(ye,_e)|0;var fn=(B+(x=x+Math.imul(te,De)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(ie,De)|0))<<13)|0;B=((P=P+Math.imul(ie,Ke)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,x=Math.imul(Be,Ye),f=(f=Math.imul(Be,ut))+Math.imul(ze,Ye)|0,P=Math.imul(ze,ut),x=x+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Ae,ft)|0,P=P+Math.imul(Ae,wt)|0,x=x+Math.imul(ot,We)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(st,We)|0,P=P+Math.imul(st,Qe)|0,x=x+Math.imul($e,ht)|0,f=(f=f+Math.imul($e,gt)|0)+Math.imul(tt,ht)|0,P=P+Math.imul(tt,gt)|0,x=x+Math.imul(Ze,dt)|0,f=(f=f+Math.imul(Ze,pt)|0)+Math.imul(Ve,dt)|0,P=P+Math.imul(Ve,pt)|0,x=x+Math.imul(Ne,lt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,lt)|0,P=P+Math.imul(Fe,vt)|0,x=x+Math.imul(Ee,yt)|0,f=(f=f+Math.imul(Ee,At)|0)+Math.imul(ce,yt)|0,P=P+Math.imul(ce,At)|0,x=x+Math.imul(ae,we)|0,f=(f=f+Math.imul(ae,_e)|0)+Math.imul(fe,we)|0,P=P+Math.imul(fe,_e)|0,x=x+Math.imul(Ce,De)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0;var xt=(B+(x=x+Math.imul(te,Je)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(ie,Je)|0))<<13)|0;B=((P=P+Math.imul(ie,qe)|0)+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Be,ft),f=(f=Math.imul(Be,wt))+Math.imul(ze,ft)|0,P=Math.imul(ze,wt),x=x+Math.imul(Pe,We)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Ae,We)|0,P=P+Math.imul(Ae,Qe)|0,x=x+Math.imul(ot,ht)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(st,ht)|0,P=P+Math.imul(st,gt)|0,x=x+Math.imul($e,dt)|0,f=(f=f+Math.imul($e,pt)|0)+Math.imul(tt,dt)|0,P=P+Math.imul(tt,pt)|0,x=x+Math.imul(Ze,lt)|0,f=(f=f+Math.imul(Ze,vt)|0)+Math.imul(Ve,lt)|0,P=P+Math.imul(Ve,vt)|0,x=x+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,yt)|0,P=P+Math.imul(Fe,At)|0,x=x+Math.imul(Ee,we)|0,f=(f=f+Math.imul(Ee,_e)|0)+Math.imul(ce,we)|0,P=P+Math.imul(ce,_e)|0,x=x+Math.imul(ae,De)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,De)|0,P=P+Math.imul(fe,Ke)|0;var Kt=(B+(x=x+Math.imul(Ce,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Je)|0))<<13)|0;B=((P=P+Math.imul(ye,qe)|0)+(f>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,x=Math.imul(Be,We),f=(f=Math.imul(Be,Qe))+Math.imul(ze,We)|0,P=Math.imul(ze,Qe),x=x+Math.imul(Pe,ht)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Ae,ht)|0,P=P+Math.imul(Ae,gt)|0,x=x+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,pt)|0)+Math.imul(st,dt)|0,P=P+Math.imul(st,pt)|0,x=x+Math.imul($e,lt)|0,f=(f=f+Math.imul($e,vt)|0)+Math.imul(tt,lt)|0,P=P+Math.imul(tt,vt)|0,x=x+Math.imul(Ze,yt)|0,f=(f=f+Math.imul(Ze,At)|0)+Math.imul(Ve,yt)|0,P=P+Math.imul(Ve,At)|0,x=x+Math.imul(Ne,we)|0,f=(f=f+Math.imul(Ne,_e)|0)+Math.imul(Fe,we)|0,P=P+Math.imul(Fe,_e)|0,x=x+Math.imul(Ee,De)|0,f=(f=f+Math.imul(Ee,Ke)|0)+Math.imul(ce,De)|0,P=P+Math.imul(ce,Ke)|0;var Rt=(B+(x=x+Math.imul(ae,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Je)|0))<<13)|0;B=((P=P+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Be,ht),f=(f=Math.imul(Be,gt))+Math.imul(ze,ht)|0,P=Math.imul(ze,gt),x=x+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,pt)|0)+Math.imul(Ae,dt)|0,P=P+Math.imul(Ae,pt)|0,x=x+Math.imul(ot,lt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(st,lt)|0,P=P+Math.imul(st,vt)|0,x=x+Math.imul($e,yt)|0,f=(f=f+Math.imul($e,At)|0)+Math.imul(tt,yt)|0,P=P+Math.imul(tt,At)|0,x=x+Math.imul(Ze,we)|0,f=(f=f+Math.imul(Ze,_e)|0)+Math.imul(Ve,we)|0,P=P+Math.imul(Ve,_e)|0,x=x+Math.imul(Ne,De)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,De)|0,P=P+Math.imul(Fe,Ke)|0;var Yt=(B+(x=x+Math.imul(Ee,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ee,qe)|0)+Math.imul(ce,Je)|0))<<13)|0;B=((P=P+Math.imul(ce,qe)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,x=Math.imul(Be,dt),f=(f=Math.imul(Be,pt))+Math.imul(ze,dt)|0,P=Math.imul(ze,pt),x=x+Math.imul(Pe,lt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Ae,lt)|0,P=P+Math.imul(Ae,vt)|0,x=x+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(st,yt)|0,P=P+Math.imul(st,At)|0,x=x+Math.imul($e,we)|0,f=(f=f+Math.imul($e,_e)|0)+Math.imul(tt,we)|0,P=P+Math.imul(tt,_e)|0,x=x+Math.imul(Ze,De)|0,f=(f=f+Math.imul(Ze,Ke)|0)+Math.imul(Ve,De)|0,P=P+Math.imul(Ve,Ke)|0;var zt=(B+(x=x+Math.imul(Ne,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Je)|0))<<13)|0;B=((P=P+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,x=Math.imul(Be,lt),f=(f=Math.imul(Be,vt))+Math.imul(ze,lt)|0,P=Math.imul(ze,vt),x=x+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Ae,yt)|0,P=P+Math.imul(Ae,At)|0,x=x+Math.imul(ot,we)|0,f=(f=f+Math.imul(ot,_e)|0)+Math.imul(st,we)|0,P=P+Math.imul(st,_e)|0,x=x+Math.imul($e,De)|0,f=(f=f+Math.imul($e,Ke)|0)+Math.imul(tt,De)|0,P=P+Math.imul(tt,Ke)|0;var Vt=(B+(x=x+Math.imul(Ze,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Ze,qe)|0)+Math.imul(Ve,Je)|0))<<13)|0;B=((P=P+Math.imul(Ve,qe)|0)+(f>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,x=Math.imul(Be,yt),f=(f=Math.imul(Be,At))+Math.imul(ze,yt)|0,P=Math.imul(ze,At),x=x+Math.imul(Pe,we)|0,f=(f=f+Math.imul(Pe,_e)|0)+Math.imul(Ae,we)|0,P=P+Math.imul(Ae,_e)|0,x=x+Math.imul(ot,De)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(st,De)|0,P=P+Math.imul(st,Ke)|0;var nn=(B+(x=x+Math.imul($e,Je)|0)|0)+((8191&(f=(f=f+Math.imul($e,qe)|0)+Math.imul(tt,Je)|0))<<13)|0;B=((P=P+Math.imul(tt,qe)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,x=Math.imul(Be,we),f=(f=Math.imul(Be,_e))+Math.imul(ze,we)|0,P=Math.imul(ze,_e),x=x+Math.imul(Pe,De)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Ae,De)|0,P=P+Math.imul(Ae,Ke)|0;var Gt=(B+(x=x+Math.imul(ot,Je)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(st,Je)|0))<<13)|0;B=((P=P+Math.imul(st,qe)|0)+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,x=Math.imul(Be,De),f=(f=Math.imul(Be,Ke))+Math.imul(ze,De)|0,P=Math.imul(ze,Ke);var Mt=(B+(x=x+Math.imul(Pe,Je)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Ae,Je)|0))<<13)|0;B=((P=P+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var _t=(B+(x=Math.imul(Be,Je))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(ze,Je)|0))<<13)|0;return B=((P=Math.imul(ze,qe))+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,k[0]=Ht,k[1]=Ct,k[2]=Lt,k[3]=Tt,k[4]=Pt,k[5]=Bt,k[6]=Zt,k[7]=qt,k[8]=fn,k[9]=xt,k[10]=Kt,k[11]=Rt,k[12]=Yt,k[13]=zt,k[14]=Vt,k[15]=nn,k[16]=Gt,k[17]=Mt,k[18]=_t,0!==B&&(k[19]=B,d.length++),d};function V(S,r,s){return(new j).mulp(S,r,s)}function j(S,r){this.x=S,this.y=r}Math.imul||(F=T),u.prototype.mulTo=function(r,s){var d,h=this.length+r.length;return d=10===this.length&&10===r.length?F(this,r,s):h<63?T(this,r,s):h<1024?function L(S,r,s){s.negative=r.negative^S.negative,s.length=S.length+r.length;for(var d=0,h=0,E=0;E>>26)|0)>>>26,k&=67108863}s.words[E]=B,d=k,k=h}return 0!==d?s.words[E]=d:s.length--,s.strip()}(this,r,s):V(this,r,s),d},j.prototype.makeRBT=function(r){for(var s=new Array(r),d=u.prototype._countBits(r)-1,h=0;h>=1;return h},j.prototype.permute=function(r,s,d,h,E,k){for(var B=0;B>>=1)E++;return 1<>>=13,d[2*k+1]=8191&E,E>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=E>>>26,this.words[d]=67108863&E}return 0!==s&&(this.words[d]=s,this.length++),this},u.prototype.muln=function(r){return this.clone().imuln(r)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(r){var s=function D(S){for(var r=new Array(S.bitLength()),s=0;s>>h}return r}(r);if(0===s.length)return new u(1);for(var d=this,h=0;h=0);var E,s=r%26,d=(r-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(E=0;E>>26-s}k&&(this.words[E]=k,this.length++)}if(0!==d){for(E=this.length-1;E>=0;E--)this.words[E+d]=this.words[E];for(E=0;E=0),h=s?(s-s%26)/26:0;var E=r%26,k=Math.min((r-E)/26,this.length),B=67108863^67108863>>>E<k)for(this.length-=k,f=0;f=0&&(0!==P||f>=h);f--){var se=0|this.words[f];this.words[f]=P<<26-E|se>>>E,P=se&B}return x&&0!==P&&(x.words[x.length++]=P),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(r,s,d){return w(0===this.negative),this.iushrn(r,s,d)},u.prototype.shln=function(r){return this.clone().ishln(r)},u.prototype.ushln=function(r){return this.clone().iushln(r)},u.prototype.shrn=function(r){return this.clone().ishrn(r)},u.prototype.ushrn=function(r){return this.clone().iushrn(r)},u.prototype.testn=function(r){w("number"==typeof r&&r>=0);var s=r%26,d=(r-s)/26,h=1<=0);var s=r%26,d=(r-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},u.prototype.isubn=function(r){if(w("number"==typeof r),w(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(x/67108864|0),this.words[E+d]=67108863&k}for(;E>26,this.words[E+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(r,s){var d=(this.length,r.length),h=this.clone(),E=r,k=0|E.words[E.length-1];0!==(d=26-this._countBits(k))&&(E=E.ushln(d),h.iushln(d),k=0|E.words[E.length-1]);var f,x=h.length-E.length;if("mod"!==s){(f=new u(null)).length=x+1,f.words=new Array(f.length);for(var P=0;P=0;te--){var ie=67108864*(0|h.words[E.length+te])+(0|h.words[E.length+te-1]);for(ie=Math.min(ie/k|0,67108863),h._ishlnsubmul(E,ie,te);0!==h.negative;)ie--,h.negative=0,h._ishlnsubmul(E,1,te),h.isZero()||(h.negative^=1);f&&(f.words[te]=ie)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},u.prototype.divmod=function(r,s,d){return w(!r.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===r.negative?(k=this.neg().divmod(r,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.iadd(r)),{div:h,mod:E}):0===this.negative&&0!==r.negative?(k=this.divmod(r.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&r.negative?(k=this.neg().divmod(r.neg(),s),"div"!==s&&(E=k.mod.neg(),d&&0!==E.negative&&E.isub(r)),{div:k.div,mod:E}):r.length>this.length||this.cmp(r)<0?{div:new u(0),mod:this}:1===r.length?"div"===s?{div:this.divn(r.words[0]),mod:null}:"mod"===s?{div:null,mod:new u(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new u(this.modn(r.words[0]))}:this._wordDiv(r,s);var h,E,k},u.prototype.div=function(r){return this.divmod(r,"div",!1).div},u.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},u.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},u.prototype.divRound=function(r){var s=this.divmod(r);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(r):s.mod,h=r.ushrn(1),E=r.andln(1),k=d.cmp(h);return k<0||1===E&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},u.prototype.modn=function(r){w(r<=67108863);for(var s=(1<<26)%r,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%r;return d},u.prototype.idivn=function(r){w(r<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/r|0,s=h%r}return this.strip()},u.prototype.divn=function(r){return this.clone().idivn(r)},u.prototype.egcd=function(r){w(0===r.negative),w(!r.isZero());var s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=new u(0),B=new u(1),x=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++x;for(var f=d.clone(),P=s.clone();!s.isZero();){for(var se=0,te=1;!(s.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||E.isOdd())&&(h.iadd(f),E.isub(P)),h.iushrn(1),E.iushrn(1);for(var ie=0,de=1;!(d.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(P)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),E.isub(B)):(d.isub(s),k.isub(h),B.isub(E))}return{a:k,b:B,gcd:d.iushln(x)}},u.prototype._invmp=function(r){w(0===r.negative),w(!r.isZero());var se,s=this,d=r.clone();s=0!==s.negative?s.umod(r):s.clone();for(var h=new u(1),E=new u(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,x=1;!(s.words[0]&x)&&B<26;++B,x<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,P=1;!(d.words[0]&P)&&f<26;++f,P<<=1);if(f>0)for(d.iushrn(f);f-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(E)):(d.isub(s),E.isub(h))}return(se=0===s.cmpn(1)?h:E).cmpn(0)<0&&se.iadd(r),se},u.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var s=this.clone(),d=r.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var E=s.cmp(d);if(E<0){var k=s;s=d,d=k}else if(0===E||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},u.prototype.invm=function(r){return this.egcd(r).a.umod(r)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(r){return this.words[0]&r},u.prototype.bincn=function(r){w("number"==typeof r);var s=r%26,d=(r-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==E&&(this.words[k]=E,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(r){var d,s=r<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(r=-r),w(r<=67108863,"Number is too big");var h=0|this.words[0];d=h===r?0:hr.length)return 1;if(this.length=0;d--){var h=0|this.words[d],E=0|r.words[d];if(h!==E){hE&&(s=1);break}}return s},u.prototype.gtn=function(r){return 1===this.cmpn(r)},u.prototype.gt=function(r){return 1===this.cmp(r)},u.prototype.gten=function(r){return this.cmpn(r)>=0},u.prototype.gte=function(r){return this.cmp(r)>=0},u.prototype.ltn=function(r){return-1===this.cmpn(r)},u.prototype.lt=function(r){return-1===this.cmp(r)},u.prototype.lten=function(r){return this.cmpn(r)<=0},u.prototype.lte=function(r){return this.cmp(r)<=0},u.prototype.eqn=function(r){return 0===this.cmpn(r)},u.prototype.eq=function(r){return 0===this.cmp(r)},u.red=function(r){return new z(r)},u.prototype.toRed=function(r){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},u.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(r){return this.red=r,this},u.prototype.forceRed=function(r){return w(!this.red,"Already a number in reduction context"),this._forceRed(r)},u.prototype.redAdd=function(r){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},u.prototype.redIAdd=function(r){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},u.prototype.redSub=function(r){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},u.prototype.redISub=function(r){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},u.prototype.redShl=function(r){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},u.prototype.redMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},u.prototype.redIMul=function(r){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},u.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(r){return w(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(S,r){this.name=S,this.p=new u(r,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function X(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(S){if("string"==typeof S){var r=u._prime(S);this.m=r.p,this.prime=r}else w(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function $(S){z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var r=new u(null);return r.words=new Array(Math.ceil(this.n/13)),r},Y.prototype.ireduce=function(r){var d,s=r;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(r,s){r.iushrn(this.n,0,s)},Y.prototype.imulK=function(r){return r.imul(this.k)},M(G,Y),G.prototype.split=function(r,s){for(var d=4194303,h=Math.min(r.length,9),E=0;E>>22,k=B}k>>>=22,r.words[E-10]=k,0===k&&r.length>10?r.length-=10:r.length-=9},G.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var s=0,d=0;d>>=26,r.words[d]=E,s=h}return 0!==s&&(r.words[r.length++]=s),r},u._prime=function(r){if(Z[r])return Z[r];var s;if("k256"===r)s=new G;else if("p224"===r)s=new q;else if("p192"===r)s=new X;else{if("p25519"!==r)throw new Error("Unknown prime "+r);s=new Q}return Z[r]=s,s},z.prototype._verify1=function(r){w(0===r.negative,"red works only with positives"),w(r.red,"red works only with red numbers")},z.prototype._verify2=function(r,s){w(0==(r.negative|s.negative),"red works only with positives"),w(r.red&&r.red===s.red,"red works only with red numbers")},z.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},z.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},z.prototype.add=function(r,s){this._verify2(r,s);var d=r.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},z.prototype.iadd=function(r,s){this._verify2(r,s);var d=r.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},z.prototype.sub=function(r,s){this._verify2(r,s);var d=r.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},z.prototype.isub=function(r,s){this._verify2(r,s);var d=r.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},z.prototype.shl=function(r,s){return this._verify1(r),this.imod(r.ushln(s))},z.prototype.imul=function(r,s){return this._verify2(r,s),this.imod(r.imul(s))},z.prototype.mul=function(r,s){return this._verify2(r,s),this.imod(r.mul(s))},z.prototype.isqr=function(r){return this.imul(r,r.clone())},z.prototype.sqr=function(r){return this.mul(r,r)},z.prototype.sqrt=function(r){if(r.isZero())return r.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new u(1)).iushrn(2);return this.pow(r,d)}for(var h=this.m.subn(1),E=0;!h.isZero()&&0===h.andln(1);)E++,h.iushrn(1);w(!h.isZero());var k=new u(1).toRed(this),B=k.redNeg(),x=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new u(2*f*f).toRed(this);0!==this.pow(f,x).cmp(B);)f.redIAdd(B);for(var P=this.pow(f,h),se=this.pow(r,h.addn(1).iushrn(1)),te=this.pow(r,h),ie=E;0!==te.cmp(k);){for(var de=te,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;E--){for(var P=s.words[E],se=f-1;se>=0;se--){var te=P>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==te||0!==B)?(B<<=1,B|=te,(4===++x||0===E&&0===se)&&(k=this.mul(k,h[B]),x=0,B=0)):x=0}f=26}return k},z.prototype.convertTo=function(r){var s=r.umod(this.m);return s===r?s.clone():s},z.prototype.convertFrom=function(r){var s=r.clone();return s.red=null,s},u.mont=function(r){return new $(r)},M($,z),$.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},$.prototype.convertFrom=function(r){var s=this.imod(r.mul(this.rinv));return s.red=null,s},$.prototype.imul=function(r,s){if(r.isZero()||s.isZero())return r.words[0]=0,r.length=1,r;var d=r.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.mul=function(r,s){if(r.isZero()||s.isZero())return new u(0)._forceRed(this);var d=r.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=d.isub(h).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},$.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=y.nmd(ne),this)},36705:(ne,a,y)=>{var p=y(22772),C=y(86945),w=y(79401),M=y(82057),u=y(8466),v=y(96386),g=y(38651),b=y(73502).Buffer;ne.exports=function(D,T,F){var L;L=D.padding?D.padding:F?1:4;var Z,V=p(D),j=V.modulus.byteLength();if(T.length>j||new M(T).cmp(V.modulus)>=0)throw new Error("decryption error");Z=F?g(new M(T),V):u(T,V);var Y=b.alloc(j-Z.length);if(Z=b.concat([Y,Z],j),4===L)return function I(R,D){var T=R.modulus.byteLength(),F=v("sha1").update(b.alloc(0)).digest(),L=F.length;if(0!==D[0])throw new Error("decryption error");var V=D.slice(1,L+1),j=D.slice(L+1),Z=w(V,C(j,L)),Y=w(j,C(Z,T-L-1));if(function A(R,D){R=b.from(R),D=b.from(D);var T=0,F=R.length;R.length!==D.length&&(T++,F=Math.min(R.length,D.length));for(var L=-1;++L=D.length){V++;break}var j=D.slice(2,L-1);if(("0002"!==F.toString("hex")&&!T||"0001"!==F.toString("hex")&&T)&&V++,j.length<8&&V++,V)throw new Error("decryption error");return D.slice(L)}(0,Z,F);if(3===L)return Z;throw new Error("unknown padding")}},16562:(ne,a,y)=>{var p=y(22772),C=y(53753),w=y(96386),M=y(86945),u=y(79401),v=y(82057),g=y(38651),b=y(8466),I=y(73502).Buffer;ne.exports=function(T,F,L){var V;V=T.padding?T.padding:L?1:4;var Z,j=p(T);if(4===V)Z=function _(D,T){var F=D.modulus.byteLength(),L=T.length,V=w("sha1").update(I.alloc(0)).digest(),j=V.length,Z=2*j;if(L>F-Z-2)throw new Error("message too long");var Y=I.alloc(F-L-Z-2),G=F-j-1,q=C(j),X=u(I.concat([V,Y,I.alloc(1,1),T],G),M(q,G)),Q=u(q,M(X,j));return new v(I.concat([I.alloc(1),Q,X],F))}(j,F);else if(1===V)Z=function A(D,T,F){var j,L=T.length,V=D.modulus.byteLength();if(L>V-11)throw new Error("message too long");return j=F?I.alloc(V-L-3,255):function R(D){for(var j,T=I.allocUnsafe(D),F=0,L=C(2*D),V=0;F=0)throw new Error("data too long for modulus")}return L?b(Z,j):g(Z,j)}},38651:(ne,a,y)=>{var p=y(82057),C=y(73502).Buffer;ne.exports=function w(M,u){return C.from(M.toRed(p.mont(u.modulus)).redPow(new p(u.publicExponent)).fromRed().toArray())}},79401:ne=>{ne.exports=function(y,p){for(var C=y.length,w=-1;++w{const p=y(88695),C=y(71465),w=y(23210),M=y(22334);function u(v,g,b,I,_){const A=[].slice.call(arguments,1),R=A.length,D="function"==typeof A[R-1];if(!D&&!p())throw new Error("Callback required as last argument");if(!D){if(R<1)throw new Error("Too few arguments provided");return 1===R?(b=g,g=I=void 0):2===R&&!g.getContext&&(I=b,b=g,g=void 0),new Promise(function(T,F){try{const L=C.create(b,I);T(v(L,g,I))}catch(L){F(L)}})}if(R<2)throw new Error("Too few arguments provided");2===R?(_=b,b=g,g=I=void 0):3===R&&(g.getContext&&typeof _>"u"?(_=I,I=void 0):(_=I,I=b,b=g,g=void 0));try{const T=C.create(b,I);_(null,v(T,g,I))}catch(T){_(T)}}a.create=C.create,a.toCanvas=u.bind(null,w.render),a.toDataURL=u.bind(null,w.renderToDataURL),a.toString=u.bind(null,function(v,g,b){return M.render(v,b)})},88695:ne=>{ne.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},46221:(ne,a,y)=>{const p=y(34792).getSymbolSize;a.getRowColCoords=function(w){if(1===w)return[];const M=Math.floor(w/7)+2,u=p(w),v=145===u?26:2*Math.ceil((u-13)/(2*M-2)),g=[u-7];for(let b=1;b{const p=y(64016),C=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function w(M){this.mode=p.ALPHANUMERIC,this.data=M}w.getBitsLength=function(u){return 11*Math.floor(u/2)+u%2*6},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(u){let v;for(v=0;v+2<=this.data.length;v+=2){let g=45*C.indexOf(this.data[v]);g+=C.indexOf(this.data[v+1]),u.put(g,11)}this.data.length%2&&u.put(C.indexOf(this.data[v]),6)},ne.exports=w},52118:ne=>{function a(){this.buffer=[],this.length=0}a.prototype={get:function(y){const p=Math.floor(y/8);return 1==(this.buffer[p]>>>7-y%8&1)},put:function(y,p){for(let C=0;C>>p-C-1&1))},getLengthInBits:function(){return this.length},putBit:function(y){const p=Math.floor(this.length/8);this.buffer.length<=p&&this.buffer.push(0),y&&(this.buffer[p]|=128>>>this.length%8),this.length++}},ne.exports=a},34425:ne=>{function a(y){if(!y||y<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=y,this.data=new Uint8Array(y*y),this.reservedBit=new Uint8Array(y*y)}a.prototype.set=function(y,p,C,w){const M=y*this.size+p;this.data[M]=C,w&&(this.reservedBit[M]=!0)},a.prototype.get=function(y,p){return this.data[y*this.size+p]},a.prototype.xor=function(y,p,C){this.data[y*this.size+p]^=C},a.prototype.isReserved=function(y,p){return this.reservedBit[y*this.size+p]},ne.exports=a},85663:(ne,a,y)=>{const p=y(38419),C=y(64016);function w(M){this.mode=C.BYTE,"string"==typeof M&&(M=p(M)),this.data=new Uint8Array(M)}w.getBitsLength=function(u){return 8*u},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(M){for(let u=0,v=this.data.length;u{const p=y(82259),C=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],w=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];a.getBlocksCount=function(u,v){switch(v){case p.L:return C[4*(u-1)+0];case p.M:return C[4*(u-1)+1];case p.Q:return C[4*(u-1)+2];case p.H:return C[4*(u-1)+3];default:return}},a.getTotalCodewordsCount=function(u,v){switch(v){case p.L:return w[4*(u-1)+0];case p.M:return w[4*(u-1)+1];case p.Q:return w[4*(u-1)+2];case p.H:return w[4*(u-1)+3];default:return}}},82259:(ne,a)=>{a.L={bit:1},a.M={bit:0},a.Q={bit:3},a.H={bit:2},a.isValid=function(C){return C&&typeof C.bit<"u"&&C.bit>=0&&C.bit<4},a.from=function(C,w){if(a.isValid(C))return C;try{return function y(p){if("string"!=typeof p)throw new Error("Param is not a string");switch(p.toLowerCase()){case"l":case"low":return a.L;case"m":case"medium":return a.M;case"q":case"quartile":return a.Q;case"h":case"high":return a.H;default:throw new Error("Unknown EC Level: "+p)}}(C)}catch{return w}}},43114:(ne,a,y)=>{const p=y(34792).getSymbolSize;a.getPositions=function(M){const u=p(M);return[[0,0],[u-7,0],[0,u-7]]}},17078:(ne,a,y)=>{const p=y(34792),M=p.getBCHDigit(1335);a.getEncodedBits=function(v,g){const b=v.bit<<3|g;let I=b<<10;for(;p.getBCHDigit(I)-M>=0;)I^=1335<{const y=new Uint8Array(512),p=new Uint8Array(256);(function(){let w=1;for(let M=0;M<255;M++)y[M]=w,p[w]=M,w<<=1,256&w&&(w^=285);for(let M=255;M<512;M++)y[M]=y[M-255]})(),a.log=function(w){if(w<1)throw new Error("log("+w+")");return p[w]},a.exp=function(w){return y[w]},a.mul=function(w,M){return 0===w||0===M?0:y[p[w]+p[M]]}},80449:(ne,a,y)=>{const p=y(64016),C=y(34792);function w(M){this.mode=p.KANJI,this.data=M}w.getBitsLength=function(u){return 13*u},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(M){let u;for(u=0;u=33088&&v<=40956)v-=33088;else{if(!(v>=57408&&v<=60351))throw new Error("Invalid SJIS character: "+this.data[u]+"\nMake sure your charset is UTF-8");v-=49472}v=192*(v>>>8&255)+(255&v),M.put(v,13)}},ne.exports=w},33667:(ne,a)=>{a.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const y_N1=3,y_N2=3,y_N3=40,y_N4=10;function p(C,w,M){switch(C){case a.Patterns.PATTERN000:return(w+M)%2==0;case a.Patterns.PATTERN001:return w%2==0;case a.Patterns.PATTERN010:return M%3==0;case a.Patterns.PATTERN011:return(w+M)%3==0;case a.Patterns.PATTERN100:return(Math.floor(w/2)+Math.floor(M/3))%2==0;case a.Patterns.PATTERN101:return w*M%2+w*M%3==0;case a.Patterns.PATTERN110:return(w*M%2+w*M%3)%2==0;case a.Patterns.PATTERN111:return(w*M%3+(w+M)%2)%2==0;default:throw new Error("bad maskPattern:"+C)}}a.isValid=function(w){return null!=w&&""!==w&&!isNaN(w)&&w>=0&&w<=7},a.from=function(w){return a.isValid(w)?parseInt(w,10):void 0},a.getPenaltyN1=function(w){const M=w.size;let u=0,v=0,g=0,b=null,I=null;for(let _=0;_=5&&(u+=y_N1+(v-5)),b=R,v=1),R=w.get(A,_),R===I?g++:(g>=5&&(u+=y_N1+(g-5)),I=R,g=1)}v>=5&&(u+=y_N1+(v-5)),g>=5&&(u+=y_N1+(g-5))}return u},a.getPenaltyN2=function(w){const M=w.size;let u=0;for(let v=0;v=10&&(1488===v||93===v)&&u++,g=g<<1&2047|w.get(I,b),I>=10&&(1488===g||93===g)&&u++}return u*y_N3},a.getPenaltyN4=function(w){let M=0;const u=w.data.length;for(let g=0;g{const p=y(94406),C=y(2699);a.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},a.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},a.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},a.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},a.MIXED={bit:-1},a.getCharCountIndicator=function(u,v){if(!u.ccBits)throw new Error("Invalid mode: "+u);if(!p.isValid(v))throw new Error("Invalid version: "+v);return v>=1&&v<10?u.ccBits[0]:v<27?u.ccBits[1]:u.ccBits[2]},a.getBestModeForData=function(u){return C.testNumeric(u)?a.NUMERIC:C.testAlphanumeric(u)?a.ALPHANUMERIC:C.testKanji(u)?a.KANJI:a.BYTE},a.toString=function(u){if(u&&u.id)return u.id;throw new Error("Invalid mode")},a.isValid=function(u){return u&&u.bit&&u.ccBits},a.from=function(u,v){if(a.isValid(u))return u;try{return function w(M){if("string"!=typeof M)throw new Error("Param is not a string");switch(M.toLowerCase()){case"numeric":return a.NUMERIC;case"alphanumeric":return a.ALPHANUMERIC;case"kanji":return a.KANJI;case"byte":return a.BYTE;default:throw new Error("Unknown mode: "+M)}}(u)}catch{return v}}},97783:(ne,a,y)=>{const p=y(64016);function C(w){this.mode=p.NUMERIC,this.data=w.toString()}C.getBitsLength=function(M){return 10*Math.floor(M/3)+(M%3?M%3*3+1:0)},C.prototype.getLength=function(){return this.data.length},C.prototype.getBitsLength=function(){return C.getBitsLength(this.data.length)},C.prototype.write=function(M){let u,v,g;for(u=0;u+3<=this.data.length;u+=3)v=this.data.substr(u,3),g=parseInt(v,10),M.put(g,10);const b=this.data.length-u;b>0&&(v=this.data.substr(u),g=parseInt(v,10),M.put(g,3*b+1))},ne.exports=C},61106:(ne,a,y)=>{const p=y(45339);a.mul=function(w,M){const u=new Uint8Array(w.length+M.length-1);for(let v=0;v=0;){const v=u[0];for(let b=0;b{const p=y(34792),C=y(82259),w=y(52118),M=y(34425),u=y(46221),v=y(43114),g=y(33667),b=y(14655),I=y(12636),_=y(42088),A=y(17078),R=y(64016),D=y(62033);function j(X,Q,z){const $=X.size,S=A.getEncodedBits(Q,z);let r,s;for(r=0;r<15;r++)s=1==(S>>r&1),r<6?X.set(r,8,s,!0):r<8?X.set(r+1,8,s,!0):X.set($-15+r,8,s,!0),r<8?X.set(8,$-r-1,s,!0):r<9?X.set(8,15-r-1+1,s,!0):X.set(8,15-r-1,s,!0);X.set($-8,8,1,!0)}function Y(X,Q,z){const $=new w;z.forEach(function(h){$.put(h.mode.bit,4),$.put(h.getLength(),R.getCharCountIndicator(h.mode,X)),h.write($)});const s=8*(p.getSymbolTotalCodewords(X)-b.getTotalCodewordsCount(X,Q));for($.getLengthInBits()+4<=s&&$.put(0,4);$.getLengthInBits()%8!=0;)$.putBit(0);const d=(s-$.getLengthInBits())/8;for(let h=0;h=0&&d<=6&&(0===h||6===h)||h>=0&&h<=6&&(0===d||6===d)||d>=2&&d<=4&&h>=2&&h<=4?X.set(r+d,s+h,!0,!0):X.set(r+d,s+h,!1,!0))}}(h,Q),function F(X){const Q=X.size;for(let z=8;z=7&&function V(X,Q){const z=X.size,$=_.getEncodedBits(Q);let S,r,s;for(let d=0;d<18;d++)S=Math.floor(d/3),r=d%3+z-8-3,s=1==($>>d&1),X.set(S,r,s,!0),X.set(r,S,s,!0)}(h,Q),function Z(X,Q){const z=X.size;let $=-1,S=z-1,r=7,s=0;for(let d=z-1;d>0;d-=2)for(6===d&&d--;;){for(let h=0;h<2;h++)if(!X.isReserved(S,d-h)){let E=!1;s>>r&1)),X.set(S,d-h,E),r--,-1===r&&(s++,r=7)}if(S+=$,S<0||z<=S){S-=$,$=-$;break}}}(h,s),isNaN($)&&($=g.getBestMask(h,j.bind(null,h,z))),g.applyMask($,h),j(h,z,$),{modules:h,version:Q,errorCorrectionLevel:z,maskPattern:$,segments:S}}a.create=function(Q,z){if(typeof Q>"u"||""===Q)throw new Error("No input text");let S,r,$=C.M;return typeof z<"u"&&($=C.from(z.errorCorrectionLevel,C.M),S=_.from(z.version),r=g.from(z.maskPattern),z.toSJISFunc&&p.setToSJISFunction(z.toSJISFunc)),q(Q,S,$,r)}},12636:(ne,a,y)=>{const p=y(61106);function C(w){this.genPoly=void 0,this.degree=w,this.degree&&this.initialize(this.degree)}C.prototype.initialize=function(M){this.degree=M,this.genPoly=p.generateECPolynomial(this.degree)},C.prototype.encode=function(M){if(!this.genPoly)throw new Error("Encoder not initialized");const u=new Uint8Array(M.length+this.degree);u.set(M);const v=p.mod(u,this.genPoly),g=this.degree-v.length;if(g>0){const b=new Uint8Array(this.degree);return b.set(v,g),b}return v},ne.exports=C},2699:(ne,a)=>{const y="[0-9]+";let C="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";C=C.replace(/u/g,"\\u");const w="(?:(?![A-Z0-9 $%*+\\-./:]|"+C+")(?:.|[\r\n]))+";a.KANJI=new RegExp(C,"g"),a.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),a.BYTE=new RegExp(w,"g"),a.NUMERIC=new RegExp(y,"g"),a.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const M=new RegExp("^"+C+"$"),u=new RegExp("^"+y+"$"),v=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");a.testKanji=function(b){return M.test(b)},a.testNumeric=function(b){return u.test(b)},a.testAlphanumeric=function(b){return v.test(b)}},62033:(ne,a,y)=>{const p=y(64016),C=y(97783),w=y(32424),M=y(85663),u=y(80449),v=y(2699),g=y(34792),b=y(74901);function I(V){return unescape(encodeURIComponent(V)).length}function _(V,j,Z){const Y=[];let G;for(;null!==(G=V.exec(Z));)Y.push({data:G[0],index:G.index,mode:j,length:G[0].length});return Y}function A(V){const j=_(v.NUMERIC,p.NUMERIC,V),Z=_(v.ALPHANUMERIC,p.ALPHANUMERIC,V);let Y,G;return g.isKanjiModeEnabled()?(Y=_(v.BYTE,p.BYTE,V),G=_(v.KANJI,p.KANJI,V)):(Y=_(v.BYTE_KANJI,p.BYTE,V),G=[]),j.concat(Z,Y,G).sort(function(X,Q){return X.index-Q.index}).map(function(X){return{data:X.data,mode:X.mode,length:X.length}})}function R(V,j){switch(j){case p.NUMERIC:return C.getBitsLength(V);case p.ALPHANUMERIC:return w.getBitsLength(V);case p.KANJI:return u.getBitsLength(V);case p.BYTE:return M.getBitsLength(V)}}function L(V,j){let Z;const Y=p.getBestModeForData(V);if(Z=p.from(j,Y),Z!==p.BYTE&&Z.bit=0?j[j.length-1]:null;return Y&&Y.mode===Z.mode?(j[j.length-1].data+=Z.data,j):(j.push(Z),j)},[])}(Q))},a.rawSplit=function(j){return a.fromArray(A(j,g.isKanjiModeEnabled()))}},34792:(ne,a)=>{let y;const p=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];a.getSymbolSize=function(w){if(!w)throw new Error('"version" cannot be null or undefined');if(w<1||w>40)throw new Error('"version" should be in range from 1 to 40');return 4*w+17},a.getSymbolTotalCodewords=function(w){return p[w]},a.getBCHDigit=function(C){let w=0;for(;0!==C;)w++,C>>>=1;return w},a.setToSJISFunction=function(w){if("function"!=typeof w)throw new Error('"toSJISFunc" is not a valid function.');y=w},a.isKanjiModeEnabled=function(){return typeof y<"u"},a.toSJIS=function(w){return y(w)}},94406:(ne,a)=>{a.isValid=function(p){return!isNaN(p)&&p>=1&&p<=40}},42088:(ne,a,y)=>{const p=y(34792),C=y(14655),w=y(82259),M=y(64016),u=y(94406),g=p.getBCHDigit(7973);function I(R,D){return M.getCharCountIndicator(R,D)+4}function _(R,D){let T=0;return R.forEach(function(F){const L=I(F.mode,D);T+=L+F.getBitsLength()}),T}a.from=function(D,T){return u.isValid(D)?parseInt(D,10):T},a.getCapacity=function(D,T,F){if(!u.isValid(D))throw new Error("Invalid QR Code version");typeof F>"u"&&(F=M.BYTE);const j=8*(p.getSymbolTotalCodewords(D)-C.getTotalCodewordsCount(D,T));if(F===M.MIXED)return j;const Z=j-I(F,D);switch(F){case M.NUMERIC:return Math.floor(Z/10*3);case M.ALPHANUMERIC:return Math.floor(Z/11*2);case M.KANJI:return Math.floor(Z/13);case M.BYTE:default:return Math.floor(Z/8)}},a.getBestVersionForData=function(D,T){let F;const L=w.from(T,w.M);if(Array.isArray(D)){if(D.length>1)return function A(R,D){for(let T=1;T<=40;T++)if(_(R,T)<=a.getCapacity(T,D,M.MIXED))return T}(D,L);if(0===D.length)return 1;F=D[0]}else F=D;return function b(R,D,T){for(let F=1;F<=40;F++)if(D<=a.getCapacity(F,T,R))return F}(F.mode,F.getLength(),L)},a.getEncodedBits=function(D){if(!u.isValid(D)||D<7)throw new Error("Invalid QR Code version");let T=D<<12;for(;p.getBCHDigit(T)-g>=0;)T^=7973<{const p=y(36355);a.render=function(u,v,g){let b=g,I=v;typeof b>"u"&&(!v||!v.getContext)&&(b=v,v=void 0),v||(I=function w(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),b=p.getOptions(b);const _=p.getImageWidth(u.modules.size,b),A=I.getContext("2d"),R=A.createImageData(_,_);return p.qrToImageData(R.data,u,b),function C(M,u,v){M.clearRect(0,0,u.width,u.height),u.style||(u.style={}),u.height=v,u.width=v,u.style.height=v+"px",u.style.width=v+"px"}(A,I,_),A.putImageData(R,0,0),I},a.renderToDataURL=function(u,v,g){let b=g;typeof b>"u"&&(!v||!v.getContext)&&(b=v,v=void 0),b||(b={});const I=a.render(u,v,b),_=b.type||"image/png",A=b.rendererOpts||{};return I.toDataURL(_,A.quality)}},22334:(ne,a,y)=>{const p=y(36355);function C(u,v){const g=u.a/255,b=v+'="'+u.hex+'"';return g<1?b+" "+v+'-opacity="'+g.toFixed(2).slice(1)+'"':b}function w(u,v,g){let b=u+v;return typeof g<"u"&&(b+=" "+g),b}a.render=function(v,g,b){const I=p.getOptions(g),_=v.modules.size,A=v.modules.data,R=_+2*I.margin,D=I.color.light.a?"':"",T="0&&D>0&&u[R-1]||(b+=_?w("M",D+g,.5+T+g):w("m",I,0),I=0,_=!1),D+1',F='viewBox="0 0 '+R+" "+R+'"',V=''+D+T+"\n";return"function"==typeof b&&b(null,V),V}},36355:(ne,a)=>{function y(p){if("number"==typeof p&&(p=p.toString()),"string"!=typeof p)throw new Error("Color should be defined as hex string");let C=p.slice().replace("#","").split("");if(C.length<3||5===C.length||C.length>8)throw new Error("Invalid hex color: "+p);(3===C.length||4===C.length)&&(C=Array.prototype.concat.apply([],C.map(function(M){return[M,M]}))),6===C.length&&C.push("F","F");const w=parseInt(C.join(""),16);return{r:w>>24&255,g:w>>16&255,b:w>>8&255,a:255&w,hex:"#"+C.slice(0,6).join("")}}a.getOptions=function(C){C||(C={}),C.color||(C.color={});const w=typeof C.margin>"u"||null===C.margin||C.margin<0?4:C.margin,M=C.width&&C.width>=21?C.width:void 0,u=C.scale||4;return{width:M,scale:M?4:u,margin:w,color:{dark:y(C.color.dark||"#000000ff"),light:y(C.color.light||"#ffffffff")},type:C.type,rendererOpts:C.rendererOpts||{}}},a.getScale=function(C,w){return w.width&&w.width>=C+2*w.margin?w.width/(C+2*w.margin):w.scale},a.getImageWidth=function(C,w){const M=a.getScale(C,w);return Math.floor((C+2*w.margin)*M)},a.qrToImageData=function(C,w,M){const u=w.modules.size,v=w.modules.data,g=a.getScale(u,M),b=Math.floor((u+2*M.margin)*g),I=M.margin*g,_=[M.color.light,M.color.dark];for(let A=0;A=I&&R>=I&&A{"use strict";const p=y(18372),C=y(12761),w=y(78951),M=y(44770),v=Symbol("encodeFragmentIdentifier");function I(j){if("string"!=typeof j||1!==j.length)throw new TypeError("arrayFormatSeparator must be single character string")}function _(j,Z){return Z.encode?Z.strict?p(j):encodeURIComponent(j):j}function A(j,Z){return Z.decode?C(j):j}function R(j){return Array.isArray(j)?j.sort():"object"==typeof j?R(Object.keys(j)).sort((Z,Y)=>Number(Z)-Number(Y)).map(Z=>j[Z]):j}function D(j){const Z=j.indexOf("#");return-1!==Z&&(j=j.slice(0,Z)),j}function F(j){const Z=(j=D(j)).indexOf("?");return-1===Z?"":j.slice(Z+1)}function L(j,Z){return Z.parseNumbers&&!Number.isNaN(Number(j))&&"string"==typeof j&&""!==j.trim()?j=Number(j):Z.parseBooleans&&null!==j&&("true"===j.toLowerCase()||"false"===j.toLowerCase())&&(j="true"===j.toLowerCase()),j}function V(j,Z){I((Z=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},Z)).arrayFormatSeparator);const Y=function b(j){let Z;switch(j.arrayFormat){case"index":return(Y,G,q)=>{Z=/\[(\d*)\]$/.exec(Y),Y=Y.replace(/\[\d*\]$/,""),Z?(void 0===q[Y]&&(q[Y]={}),q[Y][Z[1]]=G):q[Y]=G};case"bracket":return(Y,G,q)=>{Z=/(\[\])$/.exec(Y),Y=Y.replace(/\[\]$/,""),Z?void 0!==q[Y]?q[Y]=[].concat(q[Y],G):q[Y]=[G]:q[Y]=G};case"colon-list-separator":return(Y,G,q)=>{Z=/(:list)$/.exec(Y),Y=Y.replace(/:list$/,""),Z?void 0!==q[Y]?q[Y]=[].concat(q[Y],G):q[Y]=[G]:q[Y]=G};case"comma":case"separator":return(Y,G,q)=>{const X="string"==typeof G&&G.includes(j.arrayFormatSeparator),Q="string"==typeof G&&!X&&A(G,j).includes(j.arrayFormatSeparator);G=Q?A(G,j):G;const z=X||Q?G.split(j.arrayFormatSeparator).map($=>A($,j)):null===G?G:A(G,j);q[Y]=z};case"bracket-separator":return(Y,G,q)=>{const X=/(\[\])$/.test(Y);if(Y=Y.replace(/\[\]$/,""),!X)return void(q[Y]=G&&A(G,j));const Q=null===G?[]:G.split(j.arrayFormatSeparator).map(z=>A(z,j));void 0!==q[Y]?q[Y]=[].concat(q[Y],Q):q[Y]=Q};default:return(Y,G,q)=>{void 0!==q[Y]?q[Y]=[].concat(q[Y],G):q[Y]=G}}}(Z),G=Object.create(null);if("string"!=typeof j||!(j=j.trim().replace(/^[?#&]/,"")))return G;for(const q of j.split("&")){if(""===q)continue;let[X,Q]=w(Z.decode?q.replace(/\+/g," "):q,"=");Q=void 0===Q?null:["comma","separator","bracket-separator"].includes(Z.arrayFormat)?Q:A(Q,Z),Y(A(X,Z),Q,G)}for(const q of Object.keys(G)){const X=G[q];if("object"==typeof X&&null!==X)for(const Q of Object.keys(X))X[Q]=L(X[Q],Z);else G[q]=L(X,Z)}return!1===Z.sort?G:(!0===Z.sort?Object.keys(G).sort():Object.keys(G).sort(Z.sort)).reduce((q,X)=>{const Q=G[X];return Boolean(Q)&&"object"==typeof Q&&!Array.isArray(Q)?q[X]=R(Q):q[X]=Q,q},Object.create(null))}a.extract=F,a.parse=V,a.stringify=(j,Z)=>{if(!j)return"";I((Z=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},Z)).arrayFormatSeparator);const Y=Q=>Z.skipNull&&(j=>null==j)(j[Q])||Z.skipEmptyString&&""===j[Q],G=function g(j){switch(j.arrayFormat){case"index":return Z=>(Y,G)=>{const q=Y.length;return void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[_(Z,j),"[",q,"]"].join("")]:[...Y,[_(Z,j),"[",_(q,j),"]=",_(G,j)].join("")]};case"bracket":return Z=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[_(Z,j),"[]"].join("")]:[...Y,[_(Z,j),"[]=",_(G,j)].join("")];case"colon-list-separator":return Z=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[_(Z,j),":list="].join("")]:[...Y,[_(Z,j),":list=",_(G,j)].join("")];case"comma":case"separator":case"bracket-separator":{const Z="bracket-separator"===j.arrayFormat?"[]=":"=";return Y=>(G,q)=>void 0===q||j.skipNull&&null===q||j.skipEmptyString&&""===q?G:(q=null===q?"":q,0===G.length?[[_(Y,j),Z,_(q,j)].join("")]:[[G,_(q,j)].join(j.arrayFormatSeparator)])}default:return Z=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,_(Z,j)]:[...Y,[_(Z,j),"=",_(G,j)].join("")]}}(Z),q={};for(const Q of Object.keys(j))Y(Q)||(q[Q]=j[Q]);const X=Object.keys(q);return!1!==Z.sort&&X.sort(Z.sort),X.map(Q=>{const z=j[Q];return void 0===z?"":null===z?_(Q,Z):Array.isArray(z)?0===z.length&&"bracket-separator"===Z.arrayFormat?_(Q,Z)+"[]":z.reduce(G(Q),[]).join("&"):_(Q,Z)+"="+_(z,Z)}).filter(Q=>Q.length>0).join("&")},a.parseUrl=(j,Z)=>{Z=Object.assign({decode:!0},Z);const[Y,G]=w(j,"#");return Object.assign({url:Y.split("?")[0]||"",query:V(F(j),Z)},Z&&Z.parseFragmentIdentifier&&G?{fragmentIdentifier:A(G,Z)}:{})},a.stringifyUrl=(j,Z)=>{Z=Object.assign({encode:!0,strict:!0,[v]:!0},Z);const Y=D(j.url).split("?")[0]||"",G=a.extract(j.url),q=a.parse(G,{sort:!1}),X=Object.assign(q,j.query);let Q=a.stringify(X,Z);Q&&(Q=`?${Q}`);let z=function T(j){let Z="";const Y=j.indexOf("#");return-1!==Y&&(Z=j.slice(Y)),Z}(j.url);return j.fragmentIdentifier&&(z=`#${Z[v]?_(j.fragmentIdentifier,Z):j.fragmentIdentifier}`),`${Y}${Q}${z}`},a.pick=(j,Z,Y)=>{Y=Object.assign({parseFragmentIdentifier:!0,[v]:!1},Y);const{url:G,query:q,fragmentIdentifier:X}=a.parseUrl(j,Y);return a.stringifyUrl({url:G,query:M(q,Z),fragmentIdentifier:X},Y)},a.exclude=(j,Z,Y)=>{const G=Array.isArray(Z)?q=>!Z.includes(q):(q,X)=>!Z(q,X);return a.pick(j,G,Y)}},90516:ne=>{"use strict";function a(y,p){return Object.prototype.hasOwnProperty.call(y,p)}ne.exports=function(y,p,C,w){p=p||"&",C=C||"=";var M={};if("string"!=typeof y||0===y.length)return M;var u=/\+/g;y=y.split(p);var v=1e3;w&&"number"==typeof w.maxKeys&&(v=w.maxKeys);var g=y.length;v>0&&g>v&&(g=v);for(var b=0;b=0?(A=I.substr(0,_),R=I.substr(_+1)):(A=I,R=""),D=decodeURIComponent(A),T=decodeURIComponent(R),a(M,D)?Array.isArray(M[D])?M[D].push(T):M[D]=[M[D],T]:M[D]=T}return M}},75776:ne=>{"use strict";var a=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};ne.exports=function(y,p,C,w){return p=p||"&",C=C||"=",null===y&&(y=void 0),"object"==typeof y?Object.keys(y).map(function(M){var u=encodeURIComponent(a(M))+C;return Array.isArray(y[M])?y[M].map(function(v){return u+encodeURIComponent(a(v))}).join(p):u+encodeURIComponent(a(y[M]))}).join(p):w?encodeURIComponent(a(w))+C+encodeURIComponent(a(y)):""}},17137:(ne,a,y)=>{"use strict";a.decode=a.parse=y(90516),a.encode=a.stringify=y(75776)},18958:ne=>{"use strict";function a(p){try{return JSON.stringify(p)}catch{return'"[Circular]"'}}ne.exports=function y(p,C,w){var M=w&&w.stringify||a;if("object"==typeof p&&null!==p){var v=C.length+1;if(1===v)return p;var g=new Array(v);g[0]=M(p);for(var b=1;b-1?R:0,p.charCodeAt(T+1)){case 100:case 102:if(A>=I||null==C[A])break;R=I||null==C[A])break;R=I||void 0===C[A])break;R",R=T+2,T++;break}_+=M(C[A]),R=T+2,T++;break;case 115:if(A>=I)break;R{"use strict";var p=65536,C=4294967295;var M=y(73502).Buffer,u=global.crypto||global.msCrypto;u&&u.getRandomValues?ne.exports=function v(g,b){if(g>C)throw new RangeError("requested too many random bytes");var I=M.allocUnsafe(g);if(g>0)if(g>p)for(var _=0;_{"use strict";function p(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var C=y(73502),w=y(53753),M=C.Buffer,u=C.kMaxLength,v=global.crypto||global.msCrypto,g=Math.pow(2,32)-1;function b(D,T){if("number"!=typeof D||D!=D)throw new TypeError("offset must be a number");if(D>g||D<0)throw new TypeError("offset must be a uint32");if(D>u||D>T)throw new RangeError("offset out of range")}function I(D,T,F){if("number"!=typeof D||D!=D)throw new TypeError("size must be a number");if(D>g||D<0)throw new TypeError("size must be a uint32");if(D+T>F||D>u)throw new RangeError("buffer too small")}function A(D,T,F,L){if(process.browser){var V=D.buffer,j=new Uint8Array(V,T,F);return v.getRandomValues(j),L?void process.nextTick(function(){L(null,D)}):D}if(!L)return w(F).copy(D,T),D;w(F,function(Y,G){if(Y)return L(Y);G.copy(D,T),L(null,D)})}v&&v.getRandomValues||!process.browser?(a.randomFill=function _(D,T,F,L){if(!(M.isBuffer(D)||D instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof T)L=T,T=0,F=D.length;else if("function"==typeof F)L=F,F=D.length-T;else if("function"!=typeof L)throw new TypeError('"cb" argument must be a function');return b(T,D.length),I(F,T,D.length),A(D,T,F,L)},a.randomFillSync=function R(D,T,F){if(typeof T>"u"&&(T=0),!(M.isBuffer(D)||D instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return b(T,D.length),void 0===F&&(F=D.length-T),I(F,T,D.length),A(D,T,F)}):(a.randomFill=p,a.randomFillSync=p)},66509:(ne,a,y)=>{"use strict";var p=y(54284),C=y(44854);function w(O){for(var H="https://reactjs.org/docs/error-decoder.html?invariant="+O,re=1;re"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),I=Object.prototype.hasOwnProperty,_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A={},R={};function L(O,H,re,le,Me,Oe,He){this.acceptsBooleans=2===H||3===H||4===H,this.attributeName=le,this.attributeNamespace=Me,this.mustUseProperty=re,this.propertyName=O,this.type=H,this.sanitizeURL=Oe,this.removeEmptyString=He}var V={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){V[O]=new L(O,0,!1,O,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var H=O[0];V[H]=new L(H,1,!1,O[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(O){V[O]=new L(O,2,!1,O.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){V[O]=new L(O,2,!1,O,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(O){V[O]=new L(O,3,!1,O.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(O){V[O]=new L(O,3,!0,O,null,!1,!1)}),["capture","download"].forEach(function(O){V[O]=new L(O,4,!1,O,null,!1,!1)}),["cols","rows","size","span"].forEach(function(O){V[O]=new L(O,6,!1,O,null,!1,!1)}),["rowSpan","start"].forEach(function(O){V[O]=new L(O,5,!1,O.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function Z(O){return O[1].toUpperCase()}function Y(O,H,re,le){var Me=V.hasOwnProperty(H)?V[H]:null;(null!==Me?0!==Me.type:le||!(2"u"||function T(O,H,re,le){if(null!==re&&0===re.type)return!1;switch(typeof H){case"function":case"symbol":return!0;case"boolean":return!le&&(null!==re?!re.acceptsBooleans:"data-"!==(O=O.toLowerCase().slice(0,5))&&"aria-"!==O);default:return!1}}(O,H,re,le))return!0;if(le)return!1;if(null!==re)switch(re.type){case 3:return!H;case 4:return!1===H;case 5:return isNaN(H);case 6:return isNaN(H)||1>H}return!1}(H,re,Me,le)&&(re=null),le||null===Me?function D(O){return!!I.call(R,O)||!I.call(A,O)&&(_.test(O)?R[O]=!0:(A[O]=!0,!1))}(H)&&(null===re?O.removeAttribute(H):O.setAttribute(H,""+re)):Me.mustUseProperty?O[Me.propertyName]=null===re?3!==Me.type&&"":re:(H=Me.attributeName,le=Me.attributeNamespace,null===re?O.removeAttribute(H):(re=3===(Me=Me.type)||4===Me&&!0===re?"":""+re,le?O.setAttributeNS(le,H,re):O.setAttribute(H,re))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(O){var H=O.replace(j,Z);V[H]=new L(H,1,!1,O,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var H=O.replace(j,Z);V[H]=new L(H,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(O){var H=O.replace(j,Z);V[H]=new L(H,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(O){V[O]=new L(O,1,!1,O.toLowerCase(),null,!1,!1)}),V.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(O){V[O]=new L(O,1,!1,O.toLowerCase(),null,!0,!0)});var G=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),X=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),r=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),k=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var B=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var x=Symbol.iterator;function f(O){return null===O||"object"!=typeof O?null:"function"==typeof(O=x&&O[x]||O["@@iterator"])?O:null}var se,P=Object.assign;function te(O){if(void 0===se)try{throw Error()}catch(re){var H=re.stack.trim().match(/\n( *(at )?)/);se=H&&H[1]||""}return"\n"+se+O}var ie=!1;function de(O,H){if(!O||ie)return"";ie=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(H)if(H=function(){throw Error()},Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(H,[])}catch(Ft){var le=Ft}Reflect.construct(O,[],H)}else{try{H.call()}catch(Ft){le=Ft}O.call(H.prototype)}else{try{throw Error()}catch(Ft){le=Ft}O()}}catch(Ft){if(Ft&&le&&"string"==typeof Ft.stack){for(var Me=Ft.stack.split("\n"),Oe=le.stack.split("\n"),He=Me.length-1,rt=Oe.length-1;1<=He&&0<=rt&&Me[He]!==Oe[rt];)rt--;for(;1<=He&&0<=rt;He--,rt--)if(Me[He]!==Oe[rt]){if(1!==He||1!==rt)do{if(He--,0>--rt||Me[He]!==Oe[rt]){var bt="\n"+Me[He].replace(" at new "," at ");return O.displayName&&bt.includes("")&&(bt=bt.replace("",O.displayName)),bt}}while(1<=He&&0<=rt);break}}}finally{ie=!1,Error.prepareStackTrace=re}return(O=O?O.displayName||O.name:"")?te(O):""}function Ce(O){switch(O.tag){case 5:return te(O.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("SuspenseList");case 0:case 2:case 15:return O=de(O.type,!1);case 11:return O=de(O.type.render,!1);case 1:return O=de(O.type,!0);default:return""}}function ye(O){if(null==O)return null;if("function"==typeof O)return O.displayName||O.name||null;if("string"==typeof O)return O;switch(O){case Q:return"Fragment";case X:return"Portal";case $:return"Profiler";case z:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof O)switch(O.$$typeof){case r:return(O.displayName||"Context")+".Consumer";case S:return(O._context.displayName||"Context")+".Provider";case s:var H=O.render;return(O=O.displayName)||(O=""!==(O=H.displayName||H.name||"")?"ForwardRef("+O+")":"ForwardRef"),O;case E:return null!==(H=O.displayName||null)?H:ye(O.type)||"Memo";case k:H=O._payload,O=O._init;try{return ye(O(H))}catch{}}return null}function ve(O){var H=O.type;switch(O.tag){case 24:return"Cache";case 9:return(H.displayName||"Context")+".Consumer";case 10:return(H._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return O=(O=H.render).displayName||O.name||"",H.displayName||(""!==O?"ForwardRef("+O+")":"ForwardRef");case 7:return"Fragment";case 5:return H;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(H);case 8:return H===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof H)return H.displayName||H.name||null;if("string"==typeof H)return H}return null}function ae(O){switch(typeof O){case"boolean":case"number":case"string":case"undefined":case"object":return O;default:return""}}function fe(O){var H=O.type;return(O=O.nodeName)&&"input"===O.toLowerCase()&&("checkbox"===H||"radio"===H)}function Ee(O){O._valueTracker||(O._valueTracker=function pe(O){var H=fe(O)?"checked":"value",re=Object.getOwnPropertyDescriptor(O.constructor.prototype,H),le=""+O[H];if(!O.hasOwnProperty(H)&&typeof re<"u"&&"function"==typeof re.get&&"function"==typeof re.set){var Me=re.get,Oe=re.set;return Object.defineProperty(O,H,{configurable:!0,get:function(){return Me.call(this)},set:function(He){le=""+He,Oe.call(this,He)}}),Object.defineProperty(O,H,{enumerable:re.enumerable}),{getValue:function(){return le},setValue:function(He){le=""+He},stopTracking:function(){O._valueTracker=null,delete O[H]}}}}(O))}function ce(O){if(!O)return!1;var H=O._valueTracker;if(!H)return!0;var re=H.getValue(),le="";return O&&(le=fe(O)?O.checked?"true":"false":O.value),(O=le)!==re&&(H.setValue(O),!0)}function be(O){if(typeof(O=O||(typeof document<"u"?document:void 0))>"u")return null;try{return O.activeElement||O.body}catch{return O.body}}function Ne(O,H){var re=H.checked;return P({},H,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:re??O._wrapperState.initialChecked})}function Fe(O,H){var re=null==H.defaultValue?"":H.defaultValue,le=null!=H.checked?H.checked:H.defaultChecked;re=ae(null!=H.value?H.value:re),O._wrapperState={initialChecked:le,initialValue:re,controlled:"checkbox"===H.type||"radio"===H.type?null!=H.checked:null!=H.value}}function ct(O,H){null!=(H=H.checked)&&Y(O,"checked",H,!1)}function Ze(O,H){ct(O,H);var re=ae(H.value),le=H.type;if(null!=re)"number"===le?(0===re&&""===O.value||O.value!=re)&&(O.value=""+re):O.value!==""+re&&(O.value=""+re);else if("submit"===le||"reset"===le)return void O.removeAttribute("value");H.hasOwnProperty("value")?Ut(O,H.type,re):H.hasOwnProperty("defaultValue")&&Ut(O,H.type,ae(H.defaultValue)),null==H.checked&&null!=H.defaultChecked&&(O.defaultChecked=!!H.defaultChecked)}function Ve(O,H,re){if(H.hasOwnProperty("value")||H.hasOwnProperty("defaultValue")){var le=H.type;if(!("submit"!==le&&"reset"!==le||void 0!==H.value&&null!==H.value))return;H=""+O._wrapperState.initialValue,re||H===O.value||(O.value=H),O.defaultValue=H}""!==(re=O.name)&&(O.name=""),O.defaultChecked=!!O._wrapperState.initialChecked,""!==re&&(O.name=re)}function Ut(O,H,re){("number"!==H||be(O.ownerDocument)!==O)&&(null==re?O.defaultValue=""+O._wrapperState.initialValue:O.defaultValue!==""+re&&(O.defaultValue=""+re))}var $e=Array.isArray;function tt(O,H,re,le){if(O=O.options,H){H={};for(var Me=0;Me"+H.valueOf().toString()+"",H=xe.firstChild;O.firstChild;)O.removeChild(O.firstChild);for(;H.firstChild;)O.appendChild(H.firstChild)}},typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(H,re,le,Me){MSApp.execUnsafeLocalFunction(function(){return O(H,re)})}:O);function ze(O,H){if(H){var re=O.firstChild;if(re&&re===O.lastChild&&3===re.nodeType)return void(re.nodeValue=H)}O.textContent=H}var mt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ye=["Webkit","ms","Moz","O"];function ut(O,H,re){return null==H||"boolean"==typeof H||""===H?"":re||"number"!=typeof H||0===H||mt.hasOwnProperty(O)&&mt[O]?(""+H).trim():H+"px"}function ln(O,H){for(var re in O=O.style,H)if(H.hasOwnProperty(re)){var le=0===re.indexOf("--"),Me=ut(re,H[re],le);"float"===re&&(re="cssFloat"),le?O.setProperty(re,Me):O[re]=Me}}Object.keys(mt).forEach(function(O){Ye.forEach(function(H){H=H+O.charAt(0).toUpperCase()+O.substring(1),mt[H]=mt[O]})});var ft=P({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(O,H){if(H){if(ft[O]&&(null!=H.children||null!=H.dangerouslySetInnerHTML))throw Error(w(137,O));if(null!=H.dangerouslySetInnerHTML){if(null!=H.children)throw Error(w(60));if("object"!=typeof H.dangerouslySetInnerHTML||!("__html"in H.dangerouslySetInnerHTML))throw Error(w(61))}if(null!=H.style&&"object"!=typeof H.style)throw Error(w(62))}}function mn(O,H){if(-1===O.indexOf("-"))return"string"==typeof H.is;switch(O){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var We=null;function Qe(O){return(O=O.target||O.srcElement||window).correspondingUseElement&&(O=O.correspondingUseElement),3===O.nodeType?O.parentNode:O}var Qt=null,ht=null,gt=null;function on(O){if(O=Nl(O)){if("function"!=typeof Qt)throw Error(w(280));var H=O.stateNode;H&&(H=Fh(H),Qt(O.stateNode,O.type,H))}}function dt(O){ht?gt?gt.push(O):gt=[O]:ht=O}function pt(){if(ht){var O=ht,H=gt;if(gt=ht=null,on(O),H)for(O=0;O>>=0,0===O?32:31-(Wt(O)/sn|0)|0},Wt=Math.log,sn=Math.LN2;var Kn=64,Bn=4194304;function Hn(O){switch(O&-O){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&O;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&O;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return O}}function at(O,H){var re=O.pendingLanes;if(0===re)return 0;var le=0,Me=O.suspendedLanes,Oe=O.pingedLanes,He=268435455&re;if(0!==He){var rt=He&~Me;0!==rt?le=Hn(rt):0!==(Oe&=He)&&(le=Hn(Oe))}else 0!==(He=re&~Me)?le=Hn(He):0!==Oe&&(le=Hn(Oe));if(0===le)return 0;if(0!==H&&H!==le&&!(H&Me)&&((Me=le&-le)>=(Oe=H&-H)||16===Me&&0!=(4194240&Oe)))return H;if(4&le&&(le|=16&re),0!==(H=O.entangledLanes))for(O=O.entanglements,H&=le;0re;re++)H.push(O);return H}function rr(O,H,re){O.pendingLanes|=H,536870912!==H&&(O.suspendedLanes=0,O.pingedLanes=0),(O=O.eventTimes)[H=31-jt(H)]=re}function cr(O,H){var re=O.entangledLanes|=H;for(O=O.entanglements;re;){var le=31-jt(re),Me=1<=Ka),Om=String.fromCharCode(32),ca=!1;function yc(O,H){switch(O){case"keyup":return-1!==Oh.indexOf(H.keyCode);case"keydown":return 229!==H.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function la(O){return"object"==typeof(O=O.detail)&&"data"in O?O.data:null}var Vo=!1;var zp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ph(O){var H=O&&O.nodeName&&O.nodeName.toLowerCase();return"input"===H?!!zp[O.type]:"textarea"===H}function Wp(O,H,re,le){dt(le),0<(H=kh(H,"onChange")).length&&(re=new Ri("onChange","change",null,re,le),O.push({event:re,listeners:H}))}var us=null,Va=null;function Wb(O){ho(O,0)}function xs(O){if(ce(Sc(O)))return O}function Gb(O,H){if("change"===O)return H}var Nm=!1;if(b){var Gp;if(b){var cs="oninput"in document;if(!cs){var Pm=document.createElement("div");Pm.setAttribute("oninput","return;"),cs="function"==typeof Pm.oninput}Gp=cs}else Gp=!1;Nm=Gp&&(!document.documentMode||9=H)return{node:re,offset:H-O};O=le}e:{for(;re;){if(re.nextSibling){re=re.nextSibling;break e}re=re.parentNode}re=void 0}re=Yp(re)}}function fa(O,H){return!(!O||!H)&&(O===H||(!O||3!==O.nodeType)&&(H&&3===H.nodeType?fa(O,H.parentNode):"contains"in O?O.contains(H):!!O.compareDocumentPosition&&!!(16&O.compareDocumentPosition(H))))}function In(){for(var O=window,H=be();H instanceof O.HTMLIFrameElement;){try{var re="string"==typeof H.contentWindow.location.href}catch{re=!1}if(!re)break;H=be((O=H.contentWindow).document)}return H}function lr(O){var H=O&&O.nodeName&&O.nodeName.toLowerCase();return H&&("input"===H&&("text"===O.type||"search"===O.type||"tel"===O.type||"url"===O.type||"password"===O.type)||"textarea"===H||"true"===O.contentEditable)}function Ai(O){var H=In(),re=O.focusedElem,le=O.selectionRange;if(H!==re&&re&&re.ownerDocument&&fa(re.ownerDocument.documentElement,re)){if(null!==le&&lr(re))if(H=le.start,void 0===(O=le.end)&&(O=H),"selectionStart"in re)re.selectionStart=H,re.selectionEnd=Math.min(O,re.value.length);else if((O=(H=re.ownerDocument||document)&&H.defaultView||window).getSelection){O=O.getSelection();var Me=re.textContent.length,Oe=Math.min(le.start,Me);le=void 0===le.end?Oe:Math.min(le.end,Me),!O.extend&&Oe>le&&(Me=le,le=Oe,Oe=Me),Me=Hf(re,Oe);var He=Hf(re,le);Me&&He&&(1!==O.rangeCount||O.anchorNode!==Me.node||O.anchorOffset!==Me.offset||O.focusNode!==He.node||O.focusOffset!==He.offset)&&((H=H.createRange()).setStart(Me.node,Me.offset),O.removeAllRanges(),Oe>le?(O.addRange(H),O.extend(He.node,He.offset)):(H.setEnd(He.node,He.offset),O.addRange(H)))}for(H=[],O=re;O=O.parentNode;)1===O.nodeType&&H.push({element:O,left:O.scrollLeft,top:O.scrollTop});for("function"==typeof re.focus&&re.focus(),re=0;re=document.documentMode,Ds=null,Vi=null,da=null,gi=!1;function zf(O,H,re){var le=re.window===re?re.document:9===re.nodeType?re:re.ownerDocument;gi||null==Ds||Ds!==be(le)||("selectionStart"in(le=Ds)&&lr(le)?le={start:le.selectionStart,end:le.selectionEnd}:le={anchorNode:(le=(le.ownerDocument&&le.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:le.anchorOffset,focusNode:le.focusNode,focusOffset:le.focusOffset},da&&Il(da,le)||(da=le,0<(le=kh(Vi,"onSelect")).length&&(H=new Ri("onSelect","select",null,H,re),O.push({event:H,listeners:le}),H.target=Ds)))}function mc(O,H){var re={};return re[O.toLowerCase()]=H.toLowerCase(),re["Webkit"+O]="webkit"+H,re["Moz"+O]="moz"+H,re}var ir={animationend:mc("Animation","AnimationEnd"),animationiteration:mc("Animation","AnimationIteration"),animationstart:mc("Animation","AnimationStart"),transitionend:mc("Transition","TransitionEnd")},Wf={},Cl={};function Gf(O){if(Wf[O])return Wf[O];if(!ir[O])return O;var re,H=ir[O];for(re in H)if(H.hasOwnProperty(re)&&re in Cl)return Wf[O]=H[re];return O}b&&(Cl=document.createElement("div").style,"AnimationEvent"in window||(delete ir.animationend.animation,delete ir.animationiteration.animation,delete ir.animationstart.animation),"TransitionEvent"in window||delete ir.transitionend.transition);var vc=Gf("animationend"),no=Gf("animationiteration"),xl=Gf("animationstart"),bc=Gf("transitionend"),Ws=new Map,Dl="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ha(O,H){Ws.set(O,H),v(H,[O])}for(var Zr=0;ZrPl||(O.current=Jf[Pl],Jf[Pl]=null,Pl--)}function Yr(O,H){Pl++,Jf[Pl]=O.current,O.current=H}var ci={},po=Li(ci),ro=Li(!1),Fi=ci;function Rl(O,H){var re=O.type.contextTypes;if(!re)return ci;var le=O.stateNode;if(le&&le.__reactInternalMemoizedUnmaskedChildContext===H)return le.__reactInternalMemoizedMaskedChildContext;var Oe,Me={};for(Oe in re)Me[Oe]=H[Oe];return le&&((O=O.stateNode).__reactInternalMemoizedUnmaskedChildContext=H,O.__reactInternalMemoizedMaskedChildContext=Me),Me}function Co(O){return null!=(O=O.childContextTypes)}function Za(){ei(ro),ei(po)}function xo(O,H,re){if(po.current!==ci)throw Error(w(168));Yr(po,H),Yr(ro,re)}function Vm(O,H,re){var le=O.stateNode;if(H=H.childContextTypes,"function"!=typeof le.getChildContext)return re;for(var Me in le=le.getChildContext())if(!(Me in H))throw Error(w(108,ve(O)||"Unknown",Me));return P({},re,le)}function _c(O){return O=(O=O.stateNode)&&O.__reactInternalMemoizedMergedChildContext||ci,Fi=po.current,Yr(po,O),Yr(ro,ro.current),!0}function Hm(O,H,re){var le=O.stateNode;if(!le)throw Error(w(169));re?(O=Vm(O,H,Fi),le.__reactInternalMemoizedMergedChildContext=O,ei(ro),ei(po),Yr(po,O)):ei(ro),Yr(ro,re)}var go=null,Qf=!1,qf=!1;function or(O){null===go?go=[O]:go.push(O)}function Mc(){if(!qf&&null!==go){qf=!0;var O=0,H=Pn;try{var re=go;for(Pn=1;O>=He,Me-=He,hr=1<<32-jt(H)+Me|re<Qn?(Ji=Wn,Wn=null):Ji=Wn.sibling;var Rr=an(Dt,Wn,Nt[Qn],hn);if(null===Rr){null===Wn&&(Wn=Ji);break}O&&Wn&&null===Rr.alternate&&H(Dt,Wn),Et=Oe(Rr,Et,Qn),null===zn?Rn=Rr:zn.sibling=Rr,zn=Rr,Wn=Ji}if(Qn===Nt.length)return re(Dt,Wn),ti&&Do(Dt,Qn),Rn;if(null===Wn){for(;QnQn?(Ji=Wn,Wn=null):Ji=Wn.sibling;var zu=an(Dt,Wn,Rr.value,hn);if(null===zu){null===Wn&&(Wn=Ji);break}O&&Wn&&null===zu.alternate&&H(Dt,Wn),Et=Oe(zu,Et,Qn),null===zn?Rn=zu:zn.sibling=zu,zn=zu,Wn=Ji}if(Rr.done)return re(Dt,Wn),ti&&Do(Dt,Qn),Rn;if(null===Wn){for(;!Rr.done;Qn++,Rr=Nt.next())null!==(Rr=gn(Dt,Rr.value,hn))&&(Et=Oe(Rr,Et,Qn),null===zn?Rn=Rr:zn.sibling=Rr,zn=Rr);return ti&&Do(Dt,Qn),Rn}for(Wn=le(Dt,Wn);!Rr.done;Qn++,Rr=Nt.next())null!==(Rr=Mn(Wn,Dt,Qn,Rr.value,hn))&&(O&&null!==Rr.alternate&&Wn.delete(null===Rr.key?Qn:Rr.key),Et=Oe(Rr,Et,Qn),null===zn?Rn=Rr:zn.sibling=Rr,zn=Rr);return O&&Wn.forEach(function(Pg){return H(Dt,Pg)}),ti&&Do(Dt,Qn),Rn}(Dt,Et,Nt,hn);Du(Dt,Nt)}return"string"==typeof Nt&&""!==Nt||"number"==typeof Nt?(Nt=""+Nt,null!==Et&&6===Et.tag?(re(Dt,Et.sibling),(Et=Me(Et,Nt)).return=Dt,Dt=Et):(re(Dt,Et),(Et=vd(Nt,Dt.mode,hn)).return=Dt,Dt=Et),He(Dt)):re(Dt,Et)}}var Tu=ew(!0),tw=ew(!1),nd={},ga=Li(nd),Zh=Li(nd),Yh=Li(nd);function Qa(O){if(O===nd)throw Error(w(174));return O}function Jh(O,H){switch(Yr(Yh,H),Yr(Zh,O),Yr(ga,nd),O=H.nodeType){case 9:case 11:H=(H=H.documentElement)?H.namespaceURI:Ae(null,"");break;default:H=Ae(H=(O=8===O?H.parentNode:H).namespaceURI||null,O=O.tagName)}ei(ga),Yr(ga,H)}function Tc(){ei(ga),ei(Zh),ei(Yh)}function Kl(O){Qa(Yh.current);var H=Qa(ga.current),re=Ae(H,O.type);H!==re&&(Yr(Zh,O),Yr(ga,re))}function Qh(O){Zh.current===O&&(ei(ga),ei(Zh))}var li=Li(0);function Oc(O){for(var H=O;null!==H;){if(13===H.tag){var re=H.memoizedState;if(null!==re&&(null===(re=re.dehydrated)||"$?"===re.data||"$!"===re.data))return H}else if(19===H.tag&&void 0!==H.memoizedProps.revealOrder){if(128&H.flags)return H}else if(null!==H.child){H.child.return=H,H=H.child;continue}if(H===O)break;for(;null===H.sibling;){if(null===H.return||H.return===O)return null;H=H.return}H.sibling.return=H.return,H=H.sibling}return null}var rg=[];function Vl(){for(var O=0;Ore?re:4,O(!0);var le=zl.transition;zl.transition={};try{O(!1),H()}finally{Pn=re,zl.transition=le}}function ud(){return ds().memoizedState}function X3(O,H,re){var le=Uu(O);if(re={lane:le,action:re,hasEagerState:!1,eagerState:null,next:null},rw(O))iw(H,re);else if(null!==(re=Hh(O,H,re,le))){gs(re,O,le,No()),Ru(re,H,le)}}function $3(O,H,re){var le=Uu(O),Me={lane:le,action:re,hasEagerState:!1,eagerState:null,next:null};if(rw(O))iw(H,Me);else{var Oe=O.alternate;if(0===O.lanes&&(null===Oe||0===Oe.lanes)&&null!==(Oe=H.lastRenderedReducer))try{var He=H.lastRenderedState,rt=Oe(He,re);if(Me.hasEagerState=!0,Me.eagerState=rt,pi(rt,He)){var bt=H.interleaved;return null===bt?(Me.next=Me,Vh(H)):(Me.next=bt.next,bt.next=Me),void(H.interleaved=Me)}}catch{}null!==(re=Hh(O,H,Me,le))&&(gs(re,O,le,Me=No()),Ru(re,H,le))}}function rw(O){var H=O.alternate;return O===fi||null!==H&&H===fi}function iw(O,H){rd=fs=!0;var re=O.pending;null===re?H.next=H:(H.next=re.next,re.next=H),O.pending=H}function Ru(O,H,re){if(4194240&re){var le=H.lanes;re|=le&=O.pendingLanes,H.lanes=re,cr(O,re)}}var cd={readContext:ls,useCallback:ao,useContext:ao,useEffect:ao,useImperativeHandle:ao,useInsertionEffect:ao,useLayoutEffect:ao,useMemo:ao,useReducer:ao,useRef:ao,useState:ao,useDebugValue:ao,useDeferredValue:ao,useTransition:ao,useMutableSource:ao,useSyncExternalStore:ao,useId:ao,unstable_isNewReconciler:!1},ev={readContext:ls,useCallback:function(O,H){return Qs().memoizedState=[O,void 0===H?null:H],O},useContext:ls,useEffect:Rc,useImperativeHandle:function(O,H,re){return re=null!=re?re.concat([O]):null,ad(4194308,4,Xh.bind(null,H,O),re)},useLayoutEffect:function(O,H){return ad(4194308,4,O,H)},useInsertionEffect:function(O,H){return ad(4,2,O,H)},useMemo:function(O,H){var re=Qs();return H=void 0===H?null:H,O=O(),re.memoizedState=[O,H],O},useReducer:function(O,H,re){var le=Qs();return H=void 0!==re?re(H):H,le.memoizedState=le.baseState=H,O={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:O,lastRenderedState:H},le.queue=O,O=O.dispatch=X3.bind(null,fi,O),[le.memoizedState,O]},useRef:function(O){return O={current:O},Qs().memoizedState=O},useState:Wi,useDebugValue:ya,useDeferredValue:function(O){return Qs().memoizedState=O},useTransition:function(){var O=Wi(!1),H=O[0];return O=$m.bind(null,O[1]),Qs().memoizedState=O,[H,O]},useMutableSource:function(){},useSyncExternalStore:function(O,H,re){var le=fi,Me=Qs();if(ti){if(void 0===re)throw Error(w(407));re=re()}else{if(re=H(),null===Gi)throw Error(w(349));30&Wl||Jm(le,H,re)}Me.memoizedState=re;var Oe={value:re,getSnapshot:H};return Me.queue=Oe,Rc(ug.bind(null,le,Oe,O),[O]),le.flags|=2048,Pc(9,ag.bind(null,le,Oe,re,H),void 0,null),re},useId:function(){var O=Qs(),H=Gi.identifierPrefix;if(ti){var re=io;H=":"+H+"R"+(re=(hr&~(1<<32-jt(hr)-1)).toString(32)+re),0<(re=Ou++)&&(H+="H"+re.toString(32)),H+=":"}else H=":"+H+"r"+(re=ig++).toString(32)+":";return O.memoizedState=H},unstable_isNewReconciler:!1},Bi={readContext:ls,useCallback:Xm,useContext:ls,useEffect:Pu,useImperativeHandle:Lc,useInsertionEffect:kc,useLayoutEffect:Yl,useMemo:$n,useReducer:qh,useRef:qm,useState:function(){return qh(Gl)},useDebugValue:ya,useDeferredValue:function(O){return nw(ds(),Di.memoizedState,O)},useTransition:function(){return[qh(Gl)[0],ds().memoizedState]},useMutableSource:sd,useSyncExternalStore:Nu,useId:ud,unstable_isNewReconciler:!1},cg={readContext:ls,useCallback:Xm,useContext:ls,useEffect:Pu,useImperativeHandle:Lc,useInsertionEffect:kc,useLayoutEffect:Yl,useMemo:$n,useReducer:sg,useRef:qm,useState:function(){return sg(Gl)},useDebugValue:ya,useDeferredValue:function(O){var H=ds();return null===Di?H.memoizedState=O:nw(H,Di.memoizedState,O)},useTransition:function(){return[sg(Gl)[0],ds().memoizedState]},useMutableSource:sd,useSyncExternalStore:Nu,useId:ud,unstable_isNewReconciler:!1};function ma(O,H){try{var re="",le=H;do{re+=Ce(le),le=le.return}while(le);var Me=re}catch(Oe){Me="\nError generating stack: "+Oe.message+"\n"+Oe.stack}return{value:O,source:H,stack:Me,digest:null}}function lg(O,H,re){return{value:O,source:null,stack:re??null,digest:H??null}}function Go(O,H){try{console.error(H.value)}catch(re){setTimeout(function(){throw re})}}var Fc="function"==typeof WeakMap?WeakMap:Map;function fg(O,H,re){(re=Br(-1,re)).tag=3,re.payload={element:null};var le=H.value;return re.callback=function(){u0||(u0=!0,c0=le),Go(0,H)},re}function ld(O,H,re){(re=Br(-1,re)).tag=3;var le=O.type.getDerivedStateFromError;if("function"==typeof le){var Me=H.value;re.payload=function(){return le(Me)},re.callback=function(){Go(0,H)}}var Oe=O.stateNode;return null!==Oe&&"function"==typeof Oe.componentDidCatch&&(re.callback=function(){Go(0,H),"function"!=typeof le&&(null===Fu?Fu=new Set([this]):Fu.add(this));var He=H.stack;this.componentDidCatch(H.value,{componentStack:null!==He?He:""})}),re}function Jl(O,H,re){var le=O.pingCache;if(null===le){le=O.pingCache=new Fc;var Me=new Set;le.set(H,Me)}else void 0===(Me=le.get(H))&&(Me=new Set,le.set(H,Me));Me.has(re)||(Me.add(re),O=gw.bind(null,O,H,re),H.then(O,O))}function tv(O){do{var H;if((H=13===O.tag)&&(H=null===(H=O.memoizedState)||null!==H.dehydrated),H)return O;O=O.return}while(null!==O);return null}function ow(O,H,re,le,Me){return 1&O.mode?(O.flags|=65536,O.lanes=Me,O):(O===H?O.flags|=65536:(O.flags|=128,re.flags|=131072,re.flags&=-52805,1===re.tag&&(null===re.alternate?re.tag=17:((H=Br(-1,1)).tag=2,xu(re,H,1))),re.lanes|=1),O)}var sw=G.ReactCurrentOwner,hs=!1;function Jr(O,H,re,le){H.child=null===O?tw(H,null,re,le):Tu(H,O.child,re,le)}function $h(O,H,re,le,Me){re=re.render;var Oe=H.ref;return xc(H,Me),le=od(O,H,re,le,Oe,Me),re=og(),null===O||hs?(ti&&re&&jh(H),H.flags|=1,Jr(O,H,le,Me),H.child):(H.updateQueue=O.updateQueue,H.flags&=-2053,O.lanes&=~Me,va(O,H,Me))}function Bc(O,H,re,le,Me){if(null===O){var Oe=re.type;return"function"!=typeof Oe||g0(Oe)||void 0!==Oe.defaultProps||null!==re.compare||void 0!==re.defaultProps?((O=md(re.type,null,le,H,H.mode,Me)).ref=H.ref,O.return=H,H.child=O):(H.tag=15,H.type=Oe,aw(O,H,Oe,le,Me))}if(Oe=O.child,!(O.lanes&Me)){var He=Oe.memoizedProps;if((re=null!==(re=re.compare)?re:Il)(He,le)&&O.ref===H.ref)return va(O,H,Me)}return H.flags|=1,(O=Xs(Oe,le)).ref=H.ref,O.return=H,H.child=O}function aw(O,H,re,le,Me){if(null!==O){var Oe=O.memoizedProps;if(Il(Oe,le)&&O.ref===H.ref){if(hs=!1,H.pendingProps=le=Oe,0==(O.lanes&Me))return H.lanes=O.lanes,va(O,H,Me);131072&O.flags&&(hs=!0)}}return hg(O,H,re,le,Me)}function dg(O,H,re){var le=H.pendingProps,Me=le.children,Oe=null!==O?O.memoizedState:null;if("hidden"===le.mode)if(1&H.mode){if(!(1073741824&re))return O=null!==Oe?Oe.baseLanes|re:re,H.lanes=H.childLanes=1073741824,H.memoizedState={baseLanes:O,cachePool:null,transitions:null},H.updateQueue=null,Yr(tf,ps),ps|=O,null;H.memoizedState={baseLanes:0,cachePool:null,transitions:null},le=null!==Oe?Oe.baseLanes:re,Yr(tf,ps),ps|=le}else H.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yr(tf,ps),ps|=re;else null!==Oe?(le=Oe.baseLanes|re,H.memoizedState=null):le=re,Yr(tf,ps),ps|=le;return Jr(O,H,Me,re),H.child}function nv(O,H){var re=H.ref;(null===O&&null!==re||null!==O&&O.ref!==re)&&(H.flags|=512,H.flags|=2097152)}function hg(O,H,re,le,Me){var Oe=Co(re)?Fi:po.current;return Oe=Rl(H,Oe),xc(H,Me),re=od(O,H,re,le,Oe,Me),le=og(),null===O||hs?(ti&&le&&jh(H),H.flags|=1,Jr(O,H,re,Me),H.child):(H.updateQueue=O.updateQueue,H.flags&=-2053,O.lanes&=~Me,va(O,H,Me))}function rv(O,H,re,le,Me){if(Co(re)){var Oe=!0;_c(H)}else Oe=!1;if(xc(H,Me),null===H.stateNode)Uc(O,H),Gh(H,re,le),ng(H,re,le,Me),le=!0;else if(null===O){var He=H.stateNode,rt=H.memoizedProps;He.props=rt;var bt=He.context,Ft=re.contextType;"object"==typeof Ft&&null!==Ft?Ft=ls(Ft):Ft=Rl(H,Ft=Co(re)?Fi:po.current);var cn=re.getDerivedStateFromProps,gn="function"==typeof cn||"function"==typeof He.getSnapshotBeforeUpdate;gn||"function"!=typeof He.UNSAFE_componentWillReceiveProps&&"function"!=typeof He.componentWillReceiveProps||(rt!==le||bt!==Ft)&&tg(H,He,le,Ft),Iu=!1;var an=H.memoizedState;He.state=an,Wh(H,le,He,Me),bt=H.memoizedState,rt!==le||an!==bt||ro.current||Iu?("function"==typeof cn&&(Ul(H,re,cn,le),bt=H.memoizedState),(rt=Iu||td(H,re,rt,le,an,bt,Ft))?(gn||"function"!=typeof He.UNSAFE_componentWillMount&&"function"!=typeof He.componentWillMount||("function"==typeof He.componentWillMount&&He.componentWillMount(),"function"==typeof He.UNSAFE_componentWillMount&&He.UNSAFE_componentWillMount()),"function"==typeof He.componentDidMount&&(H.flags|=4194308)):("function"==typeof He.componentDidMount&&(H.flags|=4194308),H.memoizedProps=le,H.memoizedState=bt),He.props=le,He.state=bt,He.context=Ft,le=rt):("function"==typeof He.componentDidMount&&(H.flags|=4194308),le=!1)}else{He=H.stateNode,Cu(O,H),rt=H.memoizedProps,Ft=H.type===H.elementType?rt:Js(H.type,rt),He.props=Ft,gn=H.pendingProps,an=He.context,"object"==typeof(bt=re.contextType)&&null!==bt?bt=ls(bt):bt=Rl(H,bt=Co(re)?Fi:po.current);var Mn=re.getDerivedStateFromProps;(cn="function"==typeof Mn||"function"==typeof He.getSnapshotBeforeUpdate)||"function"!=typeof He.UNSAFE_componentWillReceiveProps&&"function"!=typeof He.componentWillReceiveProps||(rt!==gn||an!==bt)&&tg(H,He,le,bt),Iu=!1,an=H.memoizedState,He.state=an,Wh(H,le,He,Me);var On=H.memoizedState;rt!==gn||an!==On||ro.current||Iu?("function"==typeof Mn&&(Ul(H,re,Mn,le),On=H.memoizedState),(Ft=Iu||td(H,re,Ft,le,an,On,bt)||!1)?(cn||"function"!=typeof He.UNSAFE_componentWillUpdate&&"function"!=typeof He.componentWillUpdate||("function"==typeof He.componentWillUpdate&&He.componentWillUpdate(le,On,bt),"function"==typeof He.UNSAFE_componentWillUpdate&&He.UNSAFE_componentWillUpdate(le,On,bt)),"function"==typeof He.componentDidUpdate&&(H.flags|=4),"function"==typeof He.getSnapshotBeforeUpdate&&(H.flags|=1024)):("function"!=typeof He.componentDidUpdate||rt===O.memoizedProps&&an===O.memoizedState||(H.flags|=4),"function"!=typeof He.getSnapshotBeforeUpdate||rt===O.memoizedProps&&an===O.memoizedState||(H.flags|=1024),H.memoizedProps=le,H.memoizedState=On),He.props=le,He.state=On,He.context=bt,le=Ft):("function"!=typeof He.componentDidUpdate||rt===O.memoizedProps&&an===O.memoizedState||(H.flags|=4),"function"!=typeof He.getSnapshotBeforeUpdate||rt===O.memoizedProps&&an===O.memoizedState||(H.flags|=1024),le=!1)}return pg(O,H,re,le,Oe,Me)}function pg(O,H,re,le,Me,Oe){nv(O,H);var He=0!=(128&H.flags);if(!le&&!He)return Me&&Hm(H,re,!1),va(O,H,Oe);le=H.stateNode,sw.current=H;var rt=He&&"function"!=typeof re.getDerivedStateFromError?null:le.render();return H.flags|=1,null!==O&&He?(H.child=Tu(H,O.child,null,Oe),H.child=Tu(H,null,rt,Oe)):Jr(O,H,rt,Oe),H.memoizedState=le.state,Me&&Hm(H,re,!0),H.child}function iv(O){var H=O.stateNode;H.pendingContext?xo(0,H.pendingContext,H.pendingContext!==H.context):H.context&&xo(0,H.context,!1),Jh(O,H.containerInfo)}function ov(O,H,re,le,Me){return Fl(),Uh(Me),H.flags|=256,Jr(O,H,re,le),H.child}var av,ku,$l,uv,fd={dehydrated:null,treeContext:null,retryLane:0};function Ql(O){return{baseLanes:O,cachePool:null,transitions:null}}function e0(O,H,re){var rt,le=H.pendingProps,Me=li.current,Oe=!1,He=0!=(128&H.flags);if((rt=He)||(rt=(null===O||null!==O.memoizedState)&&0!=(2&Me)),rt?(Oe=!0,H.flags&=-129):(null===O||null!==O.memoizedState)&&(Me|=1),Yr(li,1&Me),null===O)return Ys(H),null!==(O=H.memoizedState)&&null!==(O=O.dehydrated)?(1&H.mode?"$!"===O.data?H.lanes=8:H.lanes=1073741824:H.lanes=1,null):(He=le.children,O=le.fallback,Oe?(le=H.mode,Oe=H.child,He={mode:"hidden",children:He},1&le||null===Oe?Oe=sf(He,le,0,null):(Oe.childLanes=0,Oe.pendingProps=He),O=Xa(O,le,re,null),Oe.return=H,O.return=H,Oe.sibling=O,H.child=Oe,H.child.memoizedState=Ql(re),H.memoizedState=fd,O):jc(H,He));if(null!==(Me=O.memoizedState)&&null!==(rt=Me.dehydrated))return function dd(O,H,re,le,Me,Oe,He){if(re)return 256&H.flags?(H.flags&=-257,le=lg(Error(w(422))),ql(O,H,He,le)):null!==H.memoizedState?(H.child=O.child,H.flags|=128,null):(Oe=le.fallback,Me=H.mode,le=sf({mode:"visible",children:le.children},Me,0,null),Oe=Xa(Oe,Me,He,null),Oe.flags|=2,le.return=H,Oe.return=H,le.sibling=Oe,H.child=le,1&H.mode&&Tu(H,O.child,null,He),H.child.memoizedState=Ql(He),H.memoizedState=fd,Oe);if(!(1&H.mode))return ql(O,H,He,null);if("$!"===Me.data){if(le=Me.nextSibling&&Me.nextSibling.dataset)var rt=le.dgst;return le=rt,ql(O,H,He,le=lg(Oe=Error(w(419)),le,void 0))}if(rt=0!=(He&O.childLanes),hs||rt){if(null!==(le=Gi)){switch(He&-He){case 4:Me=2;break;case 16:Me=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:Me=32;break;case 536870912:Me=268435456;break;default:Me=0}0!==(Me=Me&(le.suspendedLanes|He)?0:Me)&&Me!==Oe.retryLane&&(Oe.retryLane=Me,Ja(O,Me),gs(le,O,Me,-1))}return h0(),ql(O,H,He,le=lg(Error(w(421))))}return"$?"===Me.data?(H.flags|=128,H.child=O.child,H=p0.bind(null,O),Me._reactRetry=H,null):(O=Oe.treeContext,To=za(Me.nextSibling),Ei=H,ti=!0,Zs=null,null!==O&&(Os[Ns++]=hr,Os[Ns++]=io,Os[Ns++]=tn,hr=O.id,io=O.overflow,tn=H),H=jc(H,le.children),H.flags|=4096,H)}(O,H,He,le,rt,Me,re);if(Oe){Oe=le.fallback,He=H.mode,rt=(Me=O.child).sibling;var bt={mode:"hidden",children:le.children};return 1&He||H.child===Me?(le=Xs(Me,bt)).subtreeFlags=14680064&Me.subtreeFlags:((le=H.child).childLanes=0,le.pendingProps=bt,H.deletions=null),null!==rt?Oe=Xs(rt,Oe):(Oe=Xa(Oe,He,re,null)).flags|=2,Oe.return=H,le.return=H,le.sibling=Oe,H.child=le,le=Oe,Oe=H.child,He=null===(He=O.child.memoizedState)?Ql(re):{baseLanes:He.baseLanes|re,cachePool:null,transitions:He.transitions},Oe.memoizedState=He,Oe.childLanes=O.childLanes&~re,H.memoizedState=fd,le}return O=(Oe=O.child).sibling,le=Xs(Oe,{mode:"visible",children:le.children}),!(1&H.mode)&&(le.lanes=re),le.return=H,le.sibling=null,null!==O&&(null===(re=H.deletions)?(H.deletions=[O],H.flags|=16):re.push(O)),H.child=le,H.memoizedState=null,le}function jc(O,H){return(H=sf({mode:"visible",children:H},O.mode,0,null)).return=O,O.child=H}function ql(O,H,re,le){return null!==le&&Uh(le),Tu(H,O.child,null,re),(O=jc(H,H.pendingProps.children)).flags|=2,H.memoizedState=null,O}function sv(O,H,re){O.lanes|=H;var le=O.alternate;null!==le&&(le.lanes|=H),ed(O.return,H,re)}function t0(O,H,re,le,Me){var Oe=O.memoizedState;null===Oe?O.memoizedState={isBackwards:H,rendering:null,renderingStartTime:0,last:le,tail:re,tailMode:Me}:(Oe.isBackwards=H,Oe.rendering=null,Oe.renderingStartTime=0,Oe.last=le,Oe.tail=re,Oe.tailMode=Me)}function Xl(O,H,re){var le=H.pendingProps,Me=le.revealOrder,Oe=le.tail;if(Jr(O,H,le.children,re),2&(le=li.current))le=1&le|2,H.flags|=128;else{if(null!==O&&128&O.flags)e:for(O=H.child;null!==O;){if(13===O.tag)null!==O.memoizedState&&sv(O,re,H);else if(19===O.tag)sv(O,re,H);else if(null!==O.child){O.child.return=O,O=O.child;continue}if(O===H)break e;for(;null===O.sibling;){if(null===O.return||O.return===H)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}le&=1}if(Yr(li,le),1&H.mode)switch(Me){case"forwards":for(re=H.child,Me=null;null!==re;)null!==(O=re.alternate)&&null===Oc(O)&&(Me=re),re=re.sibling;null===(re=Me)?(Me=H.child,H.child=null):(Me=re.sibling,re.sibling=null),t0(H,!1,Me,re,Oe);break;case"backwards":for(re=null,Me=H.child,H.child=null;null!==Me;){if(null!==(O=Me.alternate)&&null===Oc(O)){H.child=Me;break}O=Me.sibling,Me.sibling=re,re=Me,Me=O}t0(H,!0,re,null,Oe);break;case"together":t0(H,!1,null,null,void 0);break;default:H.memoizedState=null}else H.memoizedState=null;return H.child}function Uc(O,H){!(1&H.mode)&&null!==O&&(O.alternate=null,H.alternate=null,H.flags|=2)}function va(O,H,re){if(null!==O&&(H.dependencies=O.dependencies),Lu|=H.lanes,!(re&H.childLanes))return null;if(null!==O&&H.child!==O.child)throw Error(w(153));if(null!==H.child){for(re=Xs(O=H.child,O.pendingProps),H.child=re,re.return=H;null!==O.sibling;)O=O.sibling,(re=re.sibling=Xs(O,O.pendingProps)).return=H;re.sibling=null}return H.child}function n0(O,H){if(!ti)switch(O.tailMode){case"hidden":H=O.tail;for(var re=null;null!==H;)null!==H.alternate&&(re=H),H=H.sibling;null===re?O.tail=null:re.sibling=null;break;case"collapsed":re=O.tail;for(var le=null;null!==re;)null!==re.alternate&&(le=re),re=re.sibling;null===le?H||null===O.tail?O.tail=null:O.tail.sibling=null:le.sibling=null}}function uo(O){var H=null!==O.alternate&&O.alternate.child===O.child,re=0,le=0;if(H)for(var Me=O.child;null!==Me;)re|=Me.lanes|Me.childLanes,le|=14680064&Me.subtreeFlags,le|=14680064&Me.flags,Me.return=O,Me=Me.sibling;else for(Me=O.child;null!==Me;)re|=Me.lanes|Me.childLanes,le|=Me.subtreeFlags,le|=Me.flags,Me.return=O,Me=Me.sibling;return O.subtreeFlags|=le,O.childLanes=re,H}function cw(O,H,re){var le=H.pendingProps;switch(Ic(H),H.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return uo(H),null;case 1:case 17:return Co(H.type)&&Za(),uo(H),null;case 3:return le=H.stateNode,Tc(),ei(ro),ei(po),Vl(),le.pendingContext&&(le.context=le.pendingContext,le.pendingContext=null),(null===O||null===O.child)&&(Ya(H)?H.flags|=4:null===O||O.memoizedState.isDehydrated&&!(256&H.flags)||(H.flags|=1024,null!==Zs&&(yd(Zs),Zs=null))),ku(O,H),uo(H),null;case 5:Qh(H);var Me=Qa(Yh.current);if(re=H.type,null!==O&&null!=H.stateNode)$l(O,H,re,le,Me),O.ref!==H.ref&&(H.flags|=512,H.flags|=2097152);else{if(!le){if(null===H.stateNode)throw Error(w(166));return uo(H),null}if(O=Qa(ga.current),Ya(H)){le=H.stateNode,re=H.type;var Oe=H.memoizedProps;switch(le[Wa]=H,le[Gs]=Oe,O=0!=(1&H.mode),re){case"dialog":ui("cancel",le),ui("close",le);break;case"iframe":case"object":case"embed":ui("load",le);break;case"video":case"audio":for(Me=0;Me<_u.length;Me++)ui(_u[Me],le);break;case"source":ui("error",le);break;case"img":case"image":case"link":ui("error",le),ui("load",le);break;case"details":ui("toggle",le);break;case"input":Fe(le,Oe),ui("invalid",le);break;case"select":le._wrapperState={wasMultiple:!!Oe.multiple},ui("invalid",le);break;case"textarea":ot(le,Oe),ui("invalid",le)}for(var He in wt(re,Oe),Me=null,Oe)if(Oe.hasOwnProperty(He)){var rt=Oe[He];"children"===He?"string"==typeof rt?le.textContent!==rt&&(!0!==Oe.suppressHydrationWarning&&Qp(le.textContent,rt,O),Me=["children",rt]):"number"==typeof rt&&le.textContent!==""+rt&&(!0!==Oe.suppressHydrationWarning&&Qp(le.textContent,rt,O),Me=["children",""+rt]):u.hasOwnProperty(He)&&null!=rt&&"onScroll"===He&&ui("scroll",le)}switch(re){case"input":Ee(le),Ve(le,Oe,!0);break;case"textarea":Ee(le),$t(le);break;case"select":case"option":break;default:"function"==typeof Oe.onClick&&(le.onclick=qp)}le=Me,H.updateQueue=le,null!==le&&(H.flags|=4)}else{He=9===Me.nodeType?Me:Me.ownerDocument,"http://www.w3.org/1999/xhtml"===O&&(O=Pe(re)),"http://www.w3.org/1999/xhtml"===O?"script"===re?((O=He.createElement("div")).innerHTML="