@txnlab/use-wallet-ui-react 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/cjs/chunks/floating-ui.react-Hg8yTXAw.cjs +5 -0
- package/dist/cjs/chunks/floating-ui.react-Hg8yTXAw.cjs.map +1 -0
- package/dist/cjs/index.cjs +15 -18
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/plugins/export-key.cjs +9 -0
- package/dist/cjs/plugins/export-key.cjs.map +1 -0
- package/dist/esm/chunks/floating-ui.react-BBJf3vGf.js +2599 -0
- package/dist/esm/chunks/floating-ui.react-BBJf3vGf.js.map +1 -0
- package/dist/esm/index.js +4780 -7744
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugins/export-key.js +3030 -0
- package/dist/esm/plugins/export-key.js.map +1 -0
- package/dist/style.css +112 -1
- package/dist/types/components/AlgoSymbol.d.ts +11 -0
- package/dist/types/components/AlgoSymbol.d.ts.map +1 -0
- package/dist/types/components/ConnectWalletButton.d.ts +9 -0
- package/dist/types/components/ConnectWalletButton.d.ts.map +1 -0
- package/dist/types/components/ConnectWalletMenu.d.ts +10 -0
- package/dist/types/components/ConnectWalletMenu.d.ts.map +1 -0
- package/dist/types/components/ConnectedWalletButton.d.ts +9 -0
- package/dist/types/components/ConnectedWalletButton.d.ts.map +1 -0
- package/dist/types/components/ConnectedWalletMenu.d.ts +10 -0
- package/dist/types/components/ConnectedWalletMenu.d.ts.map +1 -0
- package/dist/types/components/NfdAvatar.d.ts +24 -0
- package/dist/types/components/NfdAvatar.d.ts.map +1 -0
- package/dist/types/components/WalletButton.d.ts +12 -0
- package/dist/types/components/WalletButton.d.ts.map +1 -0
- package/dist/types/components/WalletList.d.ts +7 -0
- package/dist/types/components/WalletList.d.ts.map +1 -0
- package/dist/types/hooks/useAccountInfo.d.ts +12 -0
- package/dist/types/hooks/useAccountInfo.d.ts.map +1 -0
- package/dist/types/hooks/useNfd.d.ts +32 -0
- package/dist/types/hooks/useNfd.d.ts.map +1 -0
- package/dist/types/hooks/useResolvedTheme.d.ts +11 -0
- package/dist/types/hooks/useResolvedTheme.d.ts.map +1 -0
- package/dist/types/index.d.cts +17 -197
- package/dist/types/index.d.ts +17 -197
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugins/PluginContext.d.ts +29 -0
- package/dist/types/plugins/PluginContext.d.ts.map +1 -0
- package/dist/types/plugins/PluginDialogRenderer.d.ts +10 -0
- package/dist/types/plugins/PluginDialogRenderer.d.ts.map +1 -0
- package/dist/types/plugins/PluginLifecycleManager.d.ts +9 -0
- package/dist/types/plugins/PluginLifecycleManager.d.ts.map +1 -0
- package/dist/types/plugins/PluginSlot.d.ts +10 -0
- package/dist/types/plugins/PluginSlot.d.ts.map +1 -0
- package/dist/types/plugins/export-key/ExportKeyDialog.d.ts +6 -0
- package/dist/types/plugins/export-key/ExportKeyDialog.d.ts.map +1 -0
- package/dist/types/plugins/export-key/ExportKeyMenuButton.d.ts +5 -0
- package/dist/types/plugins/export-key/ExportKeyMenuButton.d.ts.map +1 -0
- package/dist/types/plugins/export-key/constants.d.ts +2 -0
- package/dist/types/plugins/export-key/constants.d.ts.map +1 -0
- package/dist/types/plugins/export-key/index.d.cts +12 -0
- package/dist/types/plugins/export-key/index.d.ts +12 -0
- package/dist/types/plugins/export-key/index.d.ts.map +1 -0
- package/dist/types/plugins/index.d.ts +6 -0
- package/dist/types/plugins/index.d.ts.map +1 -0
- package/dist/types/plugins/types.d.ts +109 -0
- package/dist/types/plugins/types.d.ts.map +1 -0
- package/dist/types/providers/WalletUIProvider.d.ts +58 -0
- package/dist/types/providers/WalletUIProvider.d.ts.map +1 -0
- package/dist/types/test/setup.d.ts +2 -0
- package/dist/types/test/setup.d.ts.map +1 -0
- package/dist/types/utils/cn.d.ts +16 -0
- package/dist/types/utils/cn.d.ts.map +1 -0
- package/dist/types/utils/fontLoader.d.ts +8 -0
- package/dist/types/utils/fontLoader.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/ipfs.d.ts +10 -0
- package/dist/types/utils/ipfs.d.ts.map +1 -0
- package/dist/types/utils/ipfs.test.d.ts +2 -0
- package/dist/types/utils/ipfs.test.d.ts.map +1 -0
- package/package.json +21 -11
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),ve=require("../chunks/floating-ui.react-Hg8yTXAw.cjs"),Me=require("@txnlab/use-wallet-react"),he=require("react");var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}const ze="export-key-dialog";var De={exports:{}};/*
|
|
2
|
+
* [js-sha512]{@link https://github.com/emn178/js-sha512}
|
|
3
|
+
*
|
|
4
|
+
* @version 0.8.0
|
|
5
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
6
|
+
* @copyright Chen, Yi-Cyuan 2014-2018
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/var Re;function Te(){return Re||(Re=1,(function(g){(function(){var y="input is invalid type",A="finalize already called",B=typeof window=="object",j=B?window:{};j.JS_SHA512_NO_WINDOW&&(B=!1);var re=!B&&typeof self=="object",ce=!j.JS_SHA512_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;ce?j=Oe:re&&(j=self);var pe=!j.JS_SHA512_NO_COMMON_JS&&!0&&g.exports,ue=!j.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",t="0123456789abcdef".split(""),ye=[-2147483648,8388608,32768,128],ae=[24,16,8,0],Fe=[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],de=["hex","array","digest","arrayBuffer"],p=[];(j.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ue&&(j.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var ie=function(e,n){return function(h){return new E(n,!0).update(h)[e]()}},me=function(e){var n=ie("hex",e);n.create=function(){return new E(e)},n.update=function(m){return n.create().update(m)};for(var h=0;h<de.length;++h){var x=de[h];n[x]=ie(x,e)}return n},fe=function(e,n){return function(h,x){return new xe(h,n,!0).update(x)[e]()}},ge=function(e){var n=fe("hex",e);n.create=function(m){return new xe(m,e)},n.update=function(m,l){return n.create(m).update(l)};for(var h=0;h<de.length;++h){var x=de[h];n[x]=fe(x,e)}return n};function E(e,n){n?(p[0]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=p[16]=p[17]=p[18]=p[19]=p[20]=p[21]=p[22]=p[23]=p[24]=p[25]=p[26]=p[27]=p[28]=p[29]=p[30]=p[31]=p[32]=0,this.blocks=p):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e==384?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):e==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):e==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=e,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}E.prototype.update=function(e){if(this.finalized)throw new Error(A);var n,h=typeof e;if(h!=="string"){if(h==="object"){if(e===null)throw new Error(y);if(ue&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ue||!ArrayBuffer.isView(e)))throw new Error(y)}else throw new Error(y);n=!0}for(var x,m=0,l,f=e.length,a=this.blocks;m<f;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=a[16]=a[17]=a[18]=a[19]=a[20]=a[21]=a[22]=a[23]=a[24]=a[25]=a[26]=a[27]=a[28]=a[29]=a[30]=a[31]=a[32]=0),n)for(l=this.start;m<f&&l<128;++m)a[l>>2]|=e[m]<<ae[l++&3];else for(l=this.start;m<f&&l<128;++m)x=e.charCodeAt(m),x<128?a[l>>2]|=x<<ae[l++&3]:x<2048?(a[l>>2]|=(192|x>>6)<<ae[l++&3],a[l>>2]|=(128|x&63)<<ae[l++&3]):x<55296||x>=57344?(a[l>>2]|=(224|x>>12)<<ae[l++&3],a[l>>2]|=(128|x>>6&63)<<ae[l++&3],a[l>>2]|=(128|x&63)<<ae[l++&3]):(x=65536+((x&1023)<<10|e.charCodeAt(++m)&1023),a[l>>2]|=(240|x>>18)<<ae[l++&3],a[l>>2]|=(128|x>>12&63)<<ae[l++&3],a[l>>2]|=(128|x>>6&63)<<ae[l++&3],a[l>>2]|=(128|x&63)<<ae[l++&3]);this.lastByteIndex=l,this.bytes+=l-this.start,l>=128?(this.block=a[32],this.start=l-128,this.hash(),this.hashed=!0):this.start=l}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,n=this.lastByteIndex;e[32]=this.block,e[n>>2]|=ye[n&3],this.block=e[32],n>=112&&(this.hashed||this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},E.prototype.hash=function(){var e=this.h0h,n=this.h0l,h=this.h1h,x=this.h1l,m=this.h2h,l=this.h2l,f=this.h3h,a=this.h3l,v=this.h4h,b=this.h4l,D=this.h5h,N=this.h5l,z=this.h6h,S=this.h6l,_=this.h7h,M=this.h7l,k=this.blocks,d,q,L,H,I,i,s,o,F,Ce,ke,Be,Ae,Ee,je,be,we,se,oe,c,u,w,C,le,ne;for(d=32;d<160;d+=2)c=k[d-30],u=k[d-29],q=(c>>>1|u<<31)^(c>>>8|u<<24)^c>>>7,L=(u>>>1|c<<31)^(u>>>8|c<<24)^(u>>>7|c<<25),c=k[d-4],u=k[d-3],H=(c>>>19|u<<13)^(u>>>29|c<<3)^c>>>6,I=(u>>>19|c<<13)^(c>>>29|u<<3)^(u>>>6|c<<26),c=k[d-32],u=k[d-31],w=k[d-14],C=k[d-13],i=(C&65535)+(u&65535)+(L&65535)+(I&65535),s=(C>>>16)+(u>>>16)+(L>>>16)+(I>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(q&65535)+(H&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(q>>>16)+(H>>>16)+(o>>>16),k[d]=F<<16|o&65535,k[d+1]=s<<16|i&65535;var K=e,W=n,O=h,P=x,T=m,U=l,J=f,V=a,Y=v,$=b,G=D,X=N,Z=z,Q=S,ee=_,te=M;for(be=O&T,we=P&U,d=0;d<160;d+=8)q=(K>>>28|W<<4)^(W>>>2|K<<30)^(W>>>7|K<<25),L=(W>>>28|K<<4)^(K>>>2|W<<30)^(K>>>7|W<<25),H=(Y>>>14|$<<18)^(Y>>>18|$<<14)^($>>>9|Y<<23),I=($>>>14|Y<<18)^($>>>18|Y<<14)^(Y>>>9|$<<23),Ce=K&O,ke=W&P,se=Ce^K&T^be,oe=ke^W&U^we,le=Y&G^~Y&Z,ne=$&X^~$&Q,c=k[d],u=k[d+1],w=Fe[d],C=Fe[d+1],i=(C&65535)+(u&65535)+(ne&65535)+(I&65535)+(te&65535),s=(C>>>16)+(u>>>16)+(ne>>>16)+(I>>>16)+(te>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(le&65535)+(H&65535)+(ee&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(le>>>16)+(H>>>16)+(ee>>>16)+(o>>>16),c=F<<16|o&65535,u=s<<16|i&65535,i=(oe&65535)+(L&65535),s=(oe>>>16)+(L>>>16)+(i>>>16),o=(se&65535)+(q&65535)+(s>>>16),F=(se>>>16)+(q>>>16)+(o>>>16),w=F<<16|o&65535,C=s<<16|i&65535,i=(V&65535)+(u&65535),s=(V>>>16)+(u>>>16)+(i>>>16),o=(J&65535)+(c&65535)+(s>>>16),F=(J>>>16)+(c>>>16)+(o>>>16),ee=F<<16|o&65535,te=s<<16|i&65535,i=(C&65535)+(u&65535),s=(C>>>16)+(u>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(o>>>16),J=F<<16|o&65535,V=s<<16|i&65535,q=(J>>>28|V<<4)^(V>>>2|J<<30)^(V>>>7|J<<25),L=(V>>>28|J<<4)^(J>>>2|V<<30)^(J>>>7|V<<25),H=(ee>>>14|te<<18)^(ee>>>18|te<<14)^(te>>>9|ee<<23),I=(te>>>14|ee<<18)^(te>>>18|ee<<14)^(ee>>>9|te<<23),Be=J&K,Ae=V&W,se=Be^J&O^Ce,oe=Ae^V&P^ke,le=ee&Y^~ee&G,ne=te&$^~te&X,c=k[d+2],u=k[d+3],w=Fe[d+2],C=Fe[d+3],i=(C&65535)+(u&65535)+(ne&65535)+(I&65535)+(Q&65535),s=(C>>>16)+(u>>>16)+(ne>>>16)+(I>>>16)+(Q>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(le&65535)+(H&65535)+(Z&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(le>>>16)+(H>>>16)+(Z>>>16)+(o>>>16),c=F<<16|o&65535,u=s<<16|i&65535,i=(oe&65535)+(L&65535),s=(oe>>>16)+(L>>>16)+(i>>>16),o=(se&65535)+(q&65535)+(s>>>16),F=(se>>>16)+(q>>>16)+(o>>>16),w=F<<16|o&65535,C=s<<16|i&65535,i=(U&65535)+(u&65535),s=(U>>>16)+(u>>>16)+(i>>>16),o=(T&65535)+(c&65535)+(s>>>16),F=(T>>>16)+(c>>>16)+(o>>>16),Z=F<<16|o&65535,Q=s<<16|i&65535,i=(C&65535)+(u&65535),s=(C>>>16)+(u>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(o>>>16),T=F<<16|o&65535,U=s<<16|i&65535,q=(T>>>28|U<<4)^(U>>>2|T<<30)^(U>>>7|T<<25),L=(U>>>28|T<<4)^(T>>>2|U<<30)^(T>>>7|U<<25),H=(Z>>>14|Q<<18)^(Z>>>18|Q<<14)^(Q>>>9|Z<<23),I=(Q>>>14|Z<<18)^(Q>>>18|Z<<14)^(Z>>>9|Q<<23),Ee=T&J,je=U&V,se=Ee^T&K^Be,oe=je^U&W^Ae,le=Z&ee^~Z&Y,ne=Q&te^~Q&$,c=k[d+4],u=k[d+5],w=Fe[d+4],C=Fe[d+5],i=(C&65535)+(u&65535)+(ne&65535)+(I&65535)+(X&65535),s=(C>>>16)+(u>>>16)+(ne>>>16)+(I>>>16)+(X>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(le&65535)+(H&65535)+(G&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(le>>>16)+(H>>>16)+(G>>>16)+(o>>>16),c=F<<16|o&65535,u=s<<16|i&65535,i=(oe&65535)+(L&65535),s=(oe>>>16)+(L>>>16)+(i>>>16),o=(se&65535)+(q&65535)+(s>>>16),F=(se>>>16)+(q>>>16)+(o>>>16),w=F<<16|o&65535,C=s<<16|i&65535,i=(P&65535)+(u&65535),s=(P>>>16)+(u>>>16)+(i>>>16),o=(O&65535)+(c&65535)+(s>>>16),F=(O>>>16)+(c>>>16)+(o>>>16),G=F<<16|o&65535,X=s<<16|i&65535,i=(C&65535)+(u&65535),s=(C>>>16)+(u>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(o>>>16),O=F<<16|o&65535,P=s<<16|i&65535,q=(O>>>28|P<<4)^(P>>>2|O<<30)^(P>>>7|O<<25),L=(P>>>28|O<<4)^(O>>>2|P<<30)^(O>>>7|P<<25),H=(G>>>14|X<<18)^(G>>>18|X<<14)^(X>>>9|G<<23),I=(X>>>14|G<<18)^(X>>>18|G<<14)^(G>>>9|X<<23),be=O&T,we=P&U,se=be^O&J^Ee,oe=we^P&V^je,le=G&Z^~G&ee,ne=X&Q^~X&te,c=k[d+6],u=k[d+7],w=Fe[d+6],C=Fe[d+7],i=(C&65535)+(u&65535)+(ne&65535)+(I&65535)+($&65535),s=(C>>>16)+(u>>>16)+(ne>>>16)+(I>>>16)+($>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(le&65535)+(H&65535)+(Y&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(le>>>16)+(H>>>16)+(Y>>>16)+(o>>>16),c=F<<16|o&65535,u=s<<16|i&65535,i=(oe&65535)+(L&65535),s=(oe>>>16)+(L>>>16)+(i>>>16),o=(se&65535)+(q&65535)+(s>>>16),F=(se>>>16)+(q>>>16)+(o>>>16),w=F<<16|o&65535,C=s<<16|i&65535,i=(W&65535)+(u&65535),s=(W>>>16)+(u>>>16)+(i>>>16),o=(K&65535)+(c&65535)+(s>>>16),F=(K>>>16)+(c>>>16)+(o>>>16),Y=F<<16|o&65535,$=s<<16|i&65535,i=(C&65535)+(u&65535),s=(C>>>16)+(u>>>16)+(i>>>16),o=(w&65535)+(c&65535)+(s>>>16),F=(w>>>16)+(c>>>16)+(o>>>16),K=F<<16|o&65535,W=s<<16|i&65535;i=(n&65535)+(W&65535),s=(n>>>16)+(W>>>16)+(i>>>16),o=(e&65535)+(K&65535)+(s>>>16),F=(e>>>16)+(K>>>16)+(o>>>16),this.h0h=F<<16|o&65535,this.h0l=s<<16|i&65535,i=(x&65535)+(P&65535),s=(x>>>16)+(P>>>16)+(i>>>16),o=(h&65535)+(O&65535)+(s>>>16),F=(h>>>16)+(O>>>16)+(o>>>16),this.h1h=F<<16|o&65535,this.h1l=s<<16|i&65535,i=(l&65535)+(U&65535),s=(l>>>16)+(U>>>16)+(i>>>16),o=(m&65535)+(T&65535)+(s>>>16),F=(m>>>16)+(T>>>16)+(o>>>16),this.h2h=F<<16|o&65535,this.h2l=s<<16|i&65535,i=(a&65535)+(V&65535),s=(a>>>16)+(V>>>16)+(i>>>16),o=(f&65535)+(J&65535)+(s>>>16),F=(f>>>16)+(J>>>16)+(o>>>16),this.h3h=F<<16|o&65535,this.h3l=s<<16|i&65535,i=(b&65535)+($&65535),s=(b>>>16)+($>>>16)+(i>>>16),o=(v&65535)+(Y&65535)+(s>>>16),F=(v>>>16)+(Y>>>16)+(o>>>16),this.h4h=F<<16|o&65535,this.h4l=s<<16|i&65535,i=(N&65535)+(X&65535),s=(N>>>16)+(X>>>16)+(i>>>16),o=(D&65535)+(G&65535)+(s>>>16),F=(D>>>16)+(G>>>16)+(o>>>16),this.h5h=F<<16|o&65535,this.h5l=s<<16|i&65535,i=(S&65535)+(Q&65535),s=(S>>>16)+(Q>>>16)+(i>>>16),o=(z&65535)+(Z&65535)+(s>>>16),F=(z>>>16)+(Z>>>16)+(o>>>16),this.h6h=F<<16|o&65535,this.h6l=s<<16|i&65535,i=(M&65535)+(te&65535),s=(M>>>16)+(te>>>16)+(i>>>16),o=(_&65535)+(ee&65535)+(s>>>16),F=(_>>>16)+(ee>>>16)+(o>>>16),this.h7h=F<<16|o&65535,this.h7l=s<<16|i&65535},E.prototype.hex=function(){this.finalize();var e=this.h0h,n=this.h0l,h=this.h1h,x=this.h1l,m=this.h2h,l=this.h2l,f=this.h3h,a=this.h3l,v=this.h4h,b=this.h4l,D=this.h5h,N=this.h5l,z=this.h6h,S=this.h6l,_=this.h7h,M=this.h7l,k=this.bits,d=t[e>>28&15]+t[e>>24&15]+t[e>>20&15]+t[e>>16&15]+t[e>>12&15]+t[e>>8&15]+t[e>>4&15]+t[e&15]+t[n>>28&15]+t[n>>24&15]+t[n>>20&15]+t[n>>16&15]+t[n>>12&15]+t[n>>8&15]+t[n>>4&15]+t[n&15]+t[h>>28&15]+t[h>>24&15]+t[h>>20&15]+t[h>>16&15]+t[h>>12&15]+t[h>>8&15]+t[h>>4&15]+t[h&15]+t[x>>28&15]+t[x>>24&15]+t[x>>20&15]+t[x>>16&15]+t[x>>12&15]+t[x>>8&15]+t[x>>4&15]+t[x&15]+t[m>>28&15]+t[m>>24&15]+t[m>>20&15]+t[m>>16&15]+t[m>>12&15]+t[m>>8&15]+t[m>>4&15]+t[m&15]+t[l>>28&15]+t[l>>24&15]+t[l>>20&15]+t[l>>16&15]+t[l>>12&15]+t[l>>8&15]+t[l>>4&15]+t[l&15]+t[f>>28&15]+t[f>>24&15]+t[f>>20&15]+t[f>>16&15]+t[f>>12&15]+t[f>>8&15]+t[f>>4&15]+t[f&15];return k>=256&&(d+=t[a>>28&15]+t[a>>24&15]+t[a>>20&15]+t[a>>16&15]+t[a>>12&15]+t[a>>8&15]+t[a>>4&15]+t[a&15]),k>=384&&(d+=t[v>>28&15]+t[v>>24&15]+t[v>>20&15]+t[v>>16&15]+t[v>>12&15]+t[v>>8&15]+t[v>>4&15]+t[v&15]+t[b>>28&15]+t[b>>24&15]+t[b>>20&15]+t[b>>16&15]+t[b>>12&15]+t[b>>8&15]+t[b>>4&15]+t[b&15]+t[D>>28&15]+t[D>>24&15]+t[D>>20&15]+t[D>>16&15]+t[D>>12&15]+t[D>>8&15]+t[D>>4&15]+t[D&15]+t[N>>28&15]+t[N>>24&15]+t[N>>20&15]+t[N>>16&15]+t[N>>12&15]+t[N>>8&15]+t[N>>4&15]+t[N&15]),k==512&&(d+=t[z>>28&15]+t[z>>24&15]+t[z>>20&15]+t[z>>16&15]+t[z>>12&15]+t[z>>8&15]+t[z>>4&15]+t[z&15]+t[S>>28&15]+t[S>>24&15]+t[S>>20&15]+t[S>>16&15]+t[S>>12&15]+t[S>>8&15]+t[S>>4&15]+t[S&15]+t[_>>28&15]+t[_>>24&15]+t[_>>20&15]+t[_>>16&15]+t[_>>12&15]+t[_>>8&15]+t[_>>4&15]+t[_&15]+t[M>>28&15]+t[M>>24&15]+t[M>>20&15]+t[M>>16&15]+t[M>>12&15]+t[M>>8&15]+t[M>>4&15]+t[M&15]),d},E.prototype.toString=E.prototype.hex,E.prototype.digest=function(){this.finalize();var e=this.h0h,n=this.h0l,h=this.h1h,x=this.h1l,m=this.h2h,l=this.h2l,f=this.h3h,a=this.h3l,v=this.h4h,b=this.h4l,D=this.h5h,N=this.h5l,z=this.h6h,S=this.h6l,_=this.h7h,M=this.h7l,k=this.bits,d=[e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,h>>24&255,h>>16&255,h>>8&255,h&255,x>>24&255,x>>16&255,x>>8&255,x&255,m>>24&255,m>>16&255,m>>8&255,m&255,l>>24&255,l>>16&255,l>>8&255,l&255,f>>24&255,f>>16&255,f>>8&255,f&255];return k>=256&&d.push(a>>24&255,a>>16&255,a>>8&255,a&255),k>=384&&d.push(v>>24&255,v>>16&255,v>>8&255,v&255,b>>24&255,b>>16&255,b>>8&255,b&255,D>>24&255,D>>16&255,D>>8&255,D&255,N>>24&255,N>>16&255,N>>8&255,N&255),k==512&&d.push(z>>24&255,z>>16&255,z>>8&255,z&255,S>>24&255,S>>16&255,S>>8&255,S&255,_>>24&255,_>>16&255,_>>8&255,_&255,M>>24&255,M>>16&255,M>>8&255,M&255),d},E.prototype.array=E.prototype.digest,E.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,n=new ArrayBuffer(e/8),h=new DataView(n);return h.setUint32(0,this.h0h),h.setUint32(4,this.h0l),h.setUint32(8,this.h1h),h.setUint32(12,this.h1l),h.setUint32(16,this.h2h),h.setUint32(20,this.h2l),h.setUint32(24,this.h3h),e>=256&&h.setUint32(28,this.h3l),e>=384&&(h.setUint32(32,this.h4h),h.setUint32(36,this.h4l),h.setUint32(40,this.h5h),h.setUint32(44,this.h5l)),e==512&&(h.setUint32(48,this.h6h),h.setUint32(52,this.h6l),h.setUint32(56,this.h7h),h.setUint32(60,this.h7l)),n},E.prototype.clone=function(){var e=new E(this.bits,!1);return this.copyTo(e),e},E.prototype.copyTo=function(e){var n=0,h=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(n=0;n<h.length;++n)e[h[n]]=this[h[n]];for(n=0;n<this.blocks.length;++n)e.blocks[n]=this.blocks[n]};function xe(e,n,h){var x,m=typeof e;if(m!=="string"){if(m==="object"){if(e===null)throw new Error(y);if(ue&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ue||!ArrayBuffer.isView(e)))throw new Error(y)}else throw new Error(y);x=!0}var l=e.length;if(!x){for(var f=[],l=e.length,a=0,v,b=0;b<l;++b)v=e.charCodeAt(b),v<128?f[a++]=v:v<2048?(f[a++]=192|v>>6,f[a++]=128|v&63):v<55296||v>=57344?(f[a++]=224|v>>12,f[a++]=128|v>>6&63,f[a++]=128|v&63):(v=65536+((v&1023)<<10|e.charCodeAt(++b)&1023),f[a++]=240|v>>18,f[a++]=128|v>>12&63,f[a++]=128|v>>6&63,f[a++]=128|v&63);e=f}e.length>128&&(e=new E(n,!0).update(e).array());for(var D=[],N=[],b=0;b<128;++b){var z=e[b]||0;D[b]=92^z,N[b]=54^z}E.call(this,n,h),this.update(N),this.oKeyPad=D,this.inner=!0,this.sharedMemory=h}xe.prototype=new E,xe.prototype.finalize=function(){if(E.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();E.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(e),E.prototype.finalize.call(this)}},xe.prototype.clone=function(){var e=new xe([],this.bits,!1);this.copyTo(e),e.inner=this.inner;for(var n=0;n<this.oKeyPad.length;++n)e.oKeyPad[n]=this.oKeyPad[n];return e};var R=me(512);R.sha512=R,R.sha384=me(384),R.sha512_256=me(256),R.sha512_224=me(224),R.sha512.hmac=ge(512),R.sha384.hmac=ge(384),R.sha512_256.hmac=ge(256),R.sha512_224.hmac=ge(224),pe?g.exports=R:(j.sha512=R.sha512,j.sha384=R.sha384,j.sha512_256=R.sha512_256,j.sha512_224=R.sha512_224)})()})(De)),De.exports}var Ue=Te();const qe=Pe(Ue);function Le(g){return qe.sha512_256.array(g)}const Ne=32,He=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function Se(g){const y=[];let A=0,B=0;function j(ce){A|=ce<<B,B+=8,B>=11&&(y.push(A&2047),A>>=11,B-=11)}function re(){B&&y.push(A)}return g.forEach(j),re(),y}function _e(g){return g.map(y=>He[y])}function Ie(g){const y=Le(g),A=Se(y);return _e(A)[0]}function Ke(g){if(g.length!==Ne)throw new RangeError(`Seed length must be ${Ne}`);const y=Se(g),A=_e(y),B=Ie(g);return`${A.join(" ")} ${B}`}function We(g){const y=g.slice(0,Ne);return Ke(y)}const Je=120;function Ve({onClose:g,displayTimeout:y=Je}){const{withPrivateKey:A}=Me.useWallet(),[B,j]=he.useState("warning"),[re,ce]=he.useState(null),[pe,ue]=he.useState(y),[t,ye]=he.useState(!1),[ae,Fe]=he.useState(null),[de,p]=he.useState("starting"),ie=he.useRef(null),{refs:me,context:fe}=ve.useFloating({open:!0,onOpenChange:l=>{l||e()}}),ge=ve.useDismiss(fe,{outsidePressEvent:"mousedown"}),E=ve.useRole(fe,{role:"dialog"}),{getFloatingProps:xe}=ve.useInteractions([ge,E]);he.useEffect(()=>{requestAnimationFrame(()=>{p("entered")})},[]);const R=he.useCallback(()=>{ce(null),t&&navigator.clipboard.writeText("").catch(()=>{}),ie.current&&(clearInterval(ie.current),ie.current=null)},[t]),e=he.useCallback(()=>{R(),p("exiting"),setTimeout(()=>{g()},150)},[R,g]);he.useEffect(()=>{if(!(B!=="display"||!re))return ie.current=setInterval(()=>{ue(l=>l<=1?(e(),0):l-1)},1e3),()=>{ie.current&&(clearInterval(ie.current),ie.current=null)}},[B,re,e]),he.useEffect(()=>()=>{ce(null),ie.current&&clearInterval(ie.current)},[]);const n=async()=>{j("loading");try{await A(async l=>{const f=We(l);ce(f.split(" ")),j("display")})}catch(l){Fe(l instanceof Error?l.message:"Failed to export key"),j("error")}},h=()=>{re&&(navigator.clipboard.writeText(re.join(" ")),ye(!0),setTimeout(()=>ye(!1),2e3))},x=()=>{Fe(null),j("warning")},m=l=>{const f=Math.floor(l/60),a=l%60;return`${f}:${a.toString().padStart(2,"0")}`};return r.jsx(ve.FloatingOverlay,{className:"grid place-items-center px-4 z-50 transition-opacity duration-150 ease-in-out bg-[var(--wui-color-overlay)] data-[state=starting]:opacity-0 data-[state=exiting]:opacity-0 data-[state=entered]:opacity-100","data-state":de,lockScroll:!0,children:r.jsx(ve.FloatingFocusManager,{context:fe,modal:!0,children:r.jsxs("div",{ref:me.setFloating,...xe(),role:"dialog","aria-label":B==="display"?"Recovery Phrase":"Export Recovery Phrase","data-state":de,className:"w-full max-w-sm rounded-3xl bg-[var(--wui-color-bg)] shadow-xl transform transition-all duration-150 ease-in-out data-[state=starting]:opacity-0 data-[state=starting]:scale-90 data-[state=exiting]:opacity-0 data-[state=exiting]:scale-90 data-[state=entered]:opacity-100 data-[state=entered]:scale-100",style:{marginTop:"-0.5rem"},children:[B==="warning"&&r.jsx(Ye,{onReveal:n,onClose:e}),B==="loading"&&r.jsx($e,{}),B==="display"&&re&&r.jsx(Ge,{words:re,timeRemaining:pe,formatTime:m,hasCopied:t,onCopy:h,onClose:e}),B==="error"&&r.jsx(Xe,{message:ae,onRetry:x,onClose:e})]})})})}function Ye({onReveal:g,onClose:y}){return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"relative flex items-center px-6 pt-5 pb-4",children:[r.jsx("h2",{className:"text-xl font-bold text-[var(--wui-color-text)] wallet-custom-font",children:"Export Recovery Phrase"}),r.jsx("button",{onClick:y,className:"absolute right-4 rounded-full bg-[var(--wui-color-bg-tertiary)] p-2 text-[var(--wui-color-text-secondary)] hover:brightness-90 transition-all","aria-label":"Close dialog",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),r.jsx("div",{className:"px-6 pb-4",children:r.jsx("div",{className:"bg-[var(--wui-color-danger-bg)] rounded-xl p-4",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-[var(--wui-color-danger-text)] shrink-0 mt-0.5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M10 1.944A11.954 11.954 0 012.166 5C2.056 5.649 2 6.319 2 7c0 5.225 3.34 9.67 8 11.317C14.66 16.67 18 12.225 18 7c0-.682-.057-1.35-.166-2.001A11.954 11.954 0 0110 1.944zM11 14a1 1 0 11-2 0 1 1 0 012 0zm0-7a1 1 0 10-2 0v3a1 1 0 102 0V7z",clipRule:"evenodd"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-[var(--wui-color-danger-text)] mb-2",children:"Your recovery phrase gives full access to your account and funds."}),r.jsxs("ul",{className:"text-sm text-[var(--wui-color-danger-text)] space-y-1.5",children:[r.jsxs("li",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"shrink-0 mt-1",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3",viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("circle",{cx:"6",cy:"6",r:"2"})})}),"Never share it with anyone"]}),r.jsxs("li",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"shrink-0 mt-1",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3",viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("circle",{cx:"6",cy:"6",r:"2"})})}),"Never enter it on unverified websites"]}),r.jsxs("li",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"shrink-0 mt-1",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3",viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("circle",{cx:"6",cy:"6",r:"2"})})}),"Write it down and store it securely"]})]})]})]})})}),r.jsxs("div",{className:"px-6 pb-5 flex gap-2",children:[r.jsx("button",{onClick:y,className:"flex-1 py-2.5 px-4 bg-[var(--wui-color-bg-tertiary)] text-[var(--wui-color-text-secondary)] font-medium rounded-xl hover:brightness-90 transition-all text-sm",children:"Cancel"}),r.jsx("button",{onClick:g,className:"flex-1 py-2.5 px-4 bg-[var(--wui-color-danger-bg)] text-[var(--wui-color-danger-text)] font-medium rounded-xl hover:bg-[var(--wui-color-danger-bg-hover)] transition-colors text-sm",children:"Reveal Recovery Phrase"})]})]})}function $e(){return r.jsxs("div",{className:"px-6 py-12 flex flex-col items-center gap-3",children:[r.jsxs("svg",{className:"h-8 w-8 text-[var(--wui-color-text-tertiary)] animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r.jsx("p",{className:"text-sm text-[var(--wui-color-text-secondary)]",children:"Retrieving key..."})]})}function Ge({words:g,timeRemaining:y,formatTime:A,hasCopied:B,onCopy:j,onClose:re}){return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"relative flex items-center justify-between px-6 pt-5 pb-3",children:[r.jsx("h2",{className:"text-xl font-bold text-[var(--wui-color-text)] wallet-custom-font",children:"Recovery Phrase"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm font-medium tabular-nums text-[var(--wui-color-text-secondary)]","aria-label":`${y} seconds remaining`,children:A(y)}),r.jsx("button",{onClick:re,className:"rounded-full bg-[var(--wui-color-bg-tertiary)] p-2 text-[var(--wui-color-text-secondary)] hover:brightness-90 transition-all","aria-label":"Close dialog",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})]}),r.jsx("div",{className:"px-6 pb-4",children:r.jsx("div",{className:"bg-[var(--wui-color-bg-secondary)] rounded-xl p-3",style:{userSelect:"none"},children:r.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:g.map((ce,pe)=>r.jsxs("div",{className:"text-center py-1.5 px-1 rounded-lg bg-[var(--wui-color-bg)] border border-[var(--wui-color-border)]",children:[r.jsx("span",{className:"text-[10px] leading-none text-[var(--wui-color-text-tertiary)] block mb-0.5",children:pe+1}),r.jsx("span",{className:"text-xs font-medium text-[var(--wui-color-text)]",children:ce})]},pe))})})}),r.jsxs("div",{className:"px-6 pb-2 flex gap-2",children:[r.jsx("button",{onClick:j,className:"flex-1 py-2 px-4 bg-[var(--wui-color-bg-tertiary)] text-[var(--wui-color-text-secondary)] font-medium rounded-xl hover:brightness-90 transition-all text-sm flex items-center justify-center",title:"Copy recovery phrase",children:B?r.jsxs(r.Fragment,{children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-green-500 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Copied"]}):r.jsxs(r.Fragment,{children:[r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:[r.jsx("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),r.jsx("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"})]}),"Copy"]})}),r.jsx("button",{onClick:re,className:"flex-1 py-2 px-4 bg-[var(--wui-color-primary)] text-[var(--wui-color-primary-text)] font-medium rounded-xl hover:bg-[var(--wui-color-primary-hover)] transition-colors text-sm",children:"Done"})]}),r.jsx("div",{className:"px-6 pb-5",children:r.jsx("p",{className:"text-xs text-[var(--wui-color-text-tertiary)] text-center",children:"Remember to clear your clipboard after use"})})]})}function Xe({message:g,onRetry:y,onClose:A}){return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"relative flex items-center px-6 pt-5 pb-4",children:[r.jsx("h2",{className:"text-xl font-bold text-[var(--wui-color-text)] wallet-custom-font",children:"Export Recovery Phrase"}),r.jsx("button",{onClick:A,className:"absolute right-4 rounded-full bg-[var(--wui-color-bg-tertiary)] p-2 text-[var(--wui-color-text-secondary)] hover:brightness-90 transition-all","aria-label":"Close dialog",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),r.jsx("div",{className:"px-6 pb-4",children:r.jsx("div",{className:"bg-[var(--wui-color-danger-bg)] rounded-xl p-4",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-[var(--wui-color-danger-text)] shrink-0 mt-0.5",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),r.jsx("p",{className:"text-sm text-[var(--wui-color-danger-text)]",children:g||"An unexpected error occurred."})]})})}),r.jsxs("div",{className:"px-6 pb-5 flex gap-2",children:[r.jsx("button",{onClick:A,className:"flex-1 py-2.5 px-4 bg-[var(--wui-color-bg-tertiary)] text-[var(--wui-color-text-secondary)] font-medium rounded-xl hover:brightness-90 transition-all text-sm",children:"Cancel"}),r.jsx("button",{onClick:y,className:"flex-1 py-2.5 px-4 bg-[var(--wui-color-primary)] text-[var(--wui-color-primary-text)] font-medium rounded-xl hover:bg-[var(--wui-color-primary-hover)] transition-colors text-sm",children:"Try Again"})]})]})}function Ze({ctx:g}){const y=()=>{g.closeMenu(),g.openDialog(ze)};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"border-t border-[var(--wui-color-border)] mt-2 mb-2"}),r.jsxs("button",{onClick:y,className:"w-full flex items-center gap-2 px-2 py-2 rounded-lg text-sm text-[var(--wui-color-text-secondary)] hover:bg-[var(--wui-color-bg-hover)] transition-colors",children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",clipRule:"evenodd"})}),r.jsx("span",{className:"flex-1 text-left",children:"Export Recovery Phrase"}),r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 shrink-0 opacity-50",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})]})]})}function Qe(g={}){const{displayTimeout:y}=g;return{id:"export-key",name:"Export Recovery Phrase",menuItems:[{key:"export-key-trigger",slot:"after-wallet-info",order:10,enabled:A=>{var B;return!!((B=A.activeWallet)!=null&&B.canUsePrivateKey)},render:A=>r.jsx(Ze,{ctx:A})}],dialogs:[{key:ze,render:({onClose:A})=>r.jsx(Ve,{onClose:A,displayTimeout:y})}]}}exports.EXPORT_KEY_DIALOG=ze;exports.exportKeyPlugin=Qe;
|
|
9
|
+
//# sourceMappingURL=export-key.cjs.map
|