@frak-labs/components 0.0.3 → 0.0.5
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 +19 -4
- package/cdn/components.js +17 -0
- package/package.json +17 -11
- package/dist/components.js +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ Those components are meant to be used to interact with the [Frak Wallet](https:/
|
|
|
5
5
|
They are built as [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components), so you can use them in any web project, no matter the framework you are using.
|
|
6
6
|
|
|
7
7
|
Checkout our documentation for more information's about the usage:
|
|
8
|
-
- [
|
|
8
|
+
- [Components](https://docs.frak.id/components)
|
|
9
|
+
- [Share Button usage](https://docs.frak.id/components/share-button)
|
|
9
10
|
|
|
10
11
|
To have more info about how does it works under the hood, you can check [this](https://docs.frak.id/wallet-sdk/under-the-hood)
|
|
11
12
|
|
|
@@ -14,7 +15,21 @@ To have more info about how does it works under the hood, you can check [this](h
|
|
|
14
15
|
Add the following script tag to your HTML file:
|
|
15
16
|
|
|
16
17
|
```html
|
|
17
|
-
<script src="https://cdn.jsdelivr.net/npm/@frak-labs/components
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/npm/@frak-labs/components" defer="defer"></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
Add a minimal configuration:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
window.FrakSetup = {
|
|
27
|
+
config: {
|
|
28
|
+
metadata: {
|
|
29
|
+
name: "Your App Name",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
18
33
|
```
|
|
19
34
|
|
|
20
35
|
## Sample usage
|
|
@@ -28,11 +43,11 @@ Sample code to use share button:
|
|
|
28
43
|
Button with custom text:
|
|
29
44
|
|
|
30
45
|
```html
|
|
31
|
-
<frak-button-share text="Share
|
|
46
|
+
<frak-button-share text="Share and earn!"></frak-button-share>
|
|
32
47
|
```
|
|
33
48
|
|
|
34
49
|
Button with custom class:
|
|
35
50
|
|
|
36
51
|
```html
|
|
37
|
-
<frak-button-share classname="button"></frak-button-share>
|
|
52
|
+
<frak-button-share classname="button button-primary"></frak-button-share>
|
|
38
53
|
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";var FrakComponents=(()=>{var Ho=Object.create;var Se=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var Yt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var B=(e,t)=>()=>(e&&(t=e(e=0)),t);var Zt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zo=(e,t)=>{for(var r in t)Se(e,r,{get:t[r],enumerable:!0})},Qt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Uo(t))!Oo.call(e,n)&&n!==r&&Se(e,n,{get:()=>t[n],enumerable:!(o=Lo(t,n))||o.enumerable});return e};var Fe=(e,t,r)=>(r=e!=null?Ho(Do(e)):{},Qt(t||!e||!e.__esModule?Se(r,"default",{value:e,enumerable:!0}):r,e)),No=e=>Qt(Se({},"__esModule",{value:!0}),e);var rt=Zt((se,tt)=>{"use strict";(function(e,t){if(typeof se=="object"&&typeof tt=="object")tt.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var r=t();for(var o in r)(typeof se=="object"?se:e)[o]=r[o]}})(se,()=>(()=>{"use strict";var e={48:function(r,o,n){var a=this&&this.__awaiter||function(u,y,i,p){return new(i||(i=Promise))(function(b,F){function g(h){try{R(p.next(h))}catch(_){F(_)}}function T(h){try{R(p.throw(h))}catch(_){F(_)}}function R(h){var _;h.done?b(h.value):(_=h.value,_ instanceof i?_:new i(function(E){E(_)})).then(g,T)}R((p=p.apply(u,y||[])).next())})},c=this&&this.__generator||function(u,y){var i,p,b,F,g={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return F={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function T(R){return function(h){return function(_){if(i)throw new TypeError("Generator is already executing.");for(;F&&(F=0,_[0]&&(g=0)),g;)try{if(i=1,p&&(b=2&_[0]?p.return:_[0]?p.throw||((b=p.return)&&b.call(p),0):p.next)&&!(b=b.call(p,_[1])).done)return b;switch(p=0,b&&(_=[2&_[0],b.value]),_[0]){case 0:case 1:b=_;break;case 4:return g.label++,{value:_[1],done:!1};case 5:g.label++,p=_[1],_=[0];continue;case 7:_=g.ops.pop(),g.trys.pop();continue;default:if(!((b=(b=g.trys).length>0&&b[b.length-1])||_[0]!==6&&_[0]!==2)){g=0;continue}if(_[0]===3&&(!b||_[1]>b[0]&&_[1]<b[3])){g.label=_[1];break}if(_[0]===6&&g.label<b[1]){g.label=b[1],b=_;break}if(b&&g.label<b[2]){g.label=b[2],g.ops.push(_);break}b[2]&&g.ops.pop(),g.trys.pop();continue}_=y.call(u,g)}catch(E){_=[6,E],p=0}finally{i=b=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([R,h])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFromUTF16=o.compressToUTF16=o.decompressFromBase64=o.compressToBase64=void 0;var f=n(304),l=n(134),x=new f.CompressorImpl,d=new l.DecompressorImpl,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m={};o.compressToBase64=function(u){return a(this,void 0,void 0,function(){var y;return c(this,function(i){switch(i.label){case 0:return u===null?[2,""]:[4,x.compress(u,6,function(p){return s.charAt(p)})];case 1:switch((y=i.sent()).length%4){default:case 0:return[2,y];case 1:return[2,y+"==="];case 2:return[2,y+"=="];case 3:return[2,y+"="]}return[2]}})})},o.decompressFromBase64=function(u){return a(this,void 0,void 0,function(){return c(this,function(y){switch(y.label){case 0:return u===null?[2,""]:u===""?[2,null]:[4,d.decompress(u.length,32,function(i){return function(p,b){if(!m[p]){m[p]={};for(var F=0;F<p.length;F++)m[p][p.charAt(F)]=F}return m[p][b]}(s,u.charAt(i))})];case 1:return[2,y.sent()]}})})},o.compressToUTF16=function(u){return a(this,void 0,void 0,function(){return c(this,function(y){switch(y.label){case 0:return u===null?[2,""]:[4,x.compress(u,15,function(i){return String.fromCharCode(i+32)})];case 1:return[2,y.sent()+" "]}})})},o.decompressFromUTF16=function(u){return a(this,void 0,void 0,function(){return c(this,function(y){switch(y.label){case 0:return u===null?[2,""]:u===""?[2,null]:[4,d.decompress(u.length,16384,function(i){return u.charCodeAt(i)-32})];case 1:return[2,y.sent()]}})})}},304:function(r,o,n){var a=this&&this.__awaiter||function(d,s,m,u){return new(m||(m=Promise))(function(y,i){function p(g){try{F(u.next(g))}catch(T){i(T)}}function b(g){try{F(u.throw(g))}catch(T){i(T)}}function F(g){var T;g.done?y(g.value):(T=g.value,T instanceof m?T:new m(function(R){R(T)})).then(p,b)}F((u=u.apply(d,s||[])).next())})},c=this&&this.__generator||function(d,s){var m,u,y,i,p={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return i={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function b(F){return function(g){return function(T){if(m)throw new TypeError("Generator is already executing.");for(;i&&(i=0,T[0]&&(p=0)),p;)try{if(m=1,u&&(y=2&T[0]?u.return:T[0]?u.throw||((y=u.return)&&y.call(u),0):u.next)&&!(y=y.call(u,T[1])).done)return y;switch(u=0,y&&(T=[2&T[0],y.value]),T[0]){case 0:case 1:y=T;break;case 4:return p.label++,{value:T[1],done:!1};case 5:p.label++,u=T[1],T=[0];continue;case 7:T=p.ops.pop(),p.trys.pop();continue;default:if(!((y=(y=p.trys).length>0&&y[y.length-1])||T[0]!==6&&T[0]!==2)){p=0;continue}if(T[0]===3&&(!y||T[1]>y[0]&&T[1]<y[3])){p.label=T[1];break}if(T[0]===6&&p.label<y[1]){p.label=y[1],y=T;break}if(y&&p.label<y[2]){p.label=y[2],p.ops.push(T);break}y[2]&&p.ops.pop(),p.trys.pop();continue}T=s.call(d,p)}catch(R){T=[6,R],u=0}finally{m=y=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}([F,g])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompressorImpl=void 0;var f=n(658),l=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],x=function(){function d(){}return d.writeValueToData=function(s,m,u,y,i){if(u%4!=0||s.dataPosition+u>y-1)for(var p=0;p<u;p++)s.dataVal=s.dataVal<<1|1&m,s.dataPosition==y-1?(s.dataPosition=0,s.data.push(i(s.dataVal)),s.dataVal=0):s.dataPosition++,m>>=1;else s.dataVal<<=u,s.dataVal|=function(b,F){for(var g=0,T=0;T<F;++T)g<<=4,g|=l[15&b],b>>=4;return g}(m,u/4),s.dataPosition+=u},d.writeWToDataVal=function(s,m,u){s.dictionaryToCreate.has(s.w)?(s.w.charCodeAt(0)<256?(d.writeValueToData(s,0,s.numBits,m,u),d.writeValueToData(s,s.w.charCodeAt(0),8,m,u)):(d.writeValueToData(s,1,s.numBits,m,u),d.writeValueToData(s,s.w.charCodeAt(0),16,m,u)),s.enlargeIn--,s.enlargeIn==0&&(s.enlargeIn=Math.pow(2,s.numBits),s.numBits++),s.dictionaryToCreate.delete(s.w)):d.writeValueToData(s,s.dictionary.get(s.w),s.numBits,m,u),s.enlargeIn--,s.enlargeIn==0&&(s.enlargeIn=Math.pow(2,s.numBits),s.numBits++)},d.loopIteration=function(s,m,u,y,i){var p=s.charAt(m);i.dictionary.has(p)||(i.dictionary.set(p,i.dictSize++),i.dictionaryToCreate.set(p,!0));var b=i.w+p;i.dictionary.has(b)?i.w=b:(this.writeWToDataVal(i,u,y),i.dictionary.set(b,i.dictSize++),i.w=String(p))},d.prototype.compress=function(s,m,u){var y=this;return new Promise(function(i){return a(y,void 0,void 0,function(){var p,b;return c(this,function(F){switch(F.label){case 0:if(s==null)return i(""),[2];p={data:[],dataPosition:0,dataVal:0,dictionary:new Map,dictionaryToCreate:new Map,dictSize:3,enlargeIn:2,numBits:2,w:""},b=0,F.label=1;case 1:return b<s.length?(d.loopIteration(s,b,m,u,p),b%1e4!=0?[3,3]:[4,(0,f.wait)()]):[3,4];case 2:F.sent(),F.label=3;case 3:return b+=1,[3,1];case 4:return p.w!==""&&d.writeWToDataVal(p,m,u),d.writeValueToData(p,2,p.numBits,m,u),p.dataVal<<=m-p.dataPosition,p.data.push(u(p.dataVal)),i(p.data.join("")),[2]}})})})},d}();o.CompressorImpl=x},134:function(r,o,n){var a=this&&this.__awaiter||function(x,d,s,m){return new(s||(s=Promise))(function(u,y){function i(F){try{b(m.next(F))}catch(g){y(g)}}function p(F){try{b(m.throw(F))}catch(g){y(g)}}function b(F){var g;F.done?u(F.value):(g=F.value,g instanceof s?g:new s(function(T){T(g)})).then(i,p)}b((m=m.apply(x,d||[])).next())})},c=this&&this.__generator||function(x,d){var s,m,u,y,i={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return y={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function p(b){return function(F){return function(g){if(s)throw new TypeError("Generator is already executing.");for(;y&&(y=0,g[0]&&(i=0)),i;)try{if(s=1,m&&(u=2&g[0]?m.return:g[0]?m.throw||((u=m.return)&&u.call(m),0):m.next)&&!(u=u.call(m,g[1])).done)return u;switch(m=0,u&&(g=[2&g[0],u.value]),g[0]){case 0:case 1:u=g;break;case 4:return i.label++,{value:g[1],done:!1};case 5:i.label++,m=g[1],g=[0];continue;case 7:g=i.ops.pop(),i.trys.pop();continue;default:if(!((u=(u=i.trys).length>0&&u[u.length-1])||g[0]!==6&&g[0]!==2)){i=0;continue}if(g[0]===3&&(!u||g[1]>u[0]&&g[1]<u[3])){i.label=g[1];break}if(g[0]===6&&i.label<u[1]){i.label=u[1],u=g;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(g);break}u[2]&&i.ops.pop(),i.trys.pop();continue}g=d.call(x,i)}catch(T){g=[6,T],m=0}finally{s=u=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}([b,F])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.DecompressorImpl=void 0;var f=n(658),l=function(){function x(){}return x.prototype.decompress=function(d,s,m){var u=this;return new Promise(function(y){return a(u,void 0,void 0,function(){var i,p,b;return c(this,function(F){switch(F.label){case 0:for(i={bits:0,c:null,dataIndex:1,dataPosition:s,dataVal:m(0),dictionary:new Map,dictSize:4,enlargeIn:4,entry:"",maxPower:Math.pow(2,2),numBits:3,power:1,resb:null,result:[],w:null},p=0;p<3;p+=1)i.dictionary.set(p,p);for(;i.power!=i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition==0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;switch(i.bits){case 0:for(i.bits=0,i.maxPower=Math.pow(2,8),i.power=1;i.power!=i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition==0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;i.c=String.fromCharCode(i.bits);break;case 1:for(i.bits=0,i.maxPower=Math.pow(2,16),i.power=1;i.power!==i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition===0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;i.c=String.fromCharCode(i.bits);break;case 2:return y(""),[2]}i.dictionary[3]=i.c,i.w=i.c,i.result.push(i.c),b=1,F.label=1;case 1:return b%2e4!=0?[3,3]:[4,(0,f.wait)()];case 2:F.sent(),F.label=3;case 3:if(i.dataIndex>d)return y(""),[2];for(i.bits=0,i.maxPower=Math.pow(2,i.numBits),i.power=1;i.power!=i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition==0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;switch(i.c=i.bits){case 0:for(i.bits=0,i.maxPower=Math.pow(2,8),i.power=1;i.power!==i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition==0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;i.dictionary[i.dictSize++]=String.fromCharCode(i.bits),i.c=i.dictSize-1,i.enlargeIn--;break;case 1:for(i.bits=0,i.maxPower=Math.pow(2,16),i.power=1;i.power!==i.maxPower;)i.resb=i.dataVal&i.dataPosition,i.dataPosition>>=1,i.dataPosition==0&&(i.dataPosition=s,i.dataVal=m(i.dataIndex++)),i.bits|=(i.resb>0?1:0)*i.power,i.power<<=1;i.dictionary[i.dictSize++]=String.fromCharCode(i.bits),i.c=i.dictSize-1,i.enlargeIn--;break;case 2:return y(i.result.join("")),[2]}if(i.enlargeIn==0&&(i.enlargeIn=Math.pow(2,i.numBits),i.numBits++),i.dictionary[i.c])i.entry=i.dictionary[i.c];else{if(i.c!==i.dictSize)return y(null),[2];i.entry=i.w+i.w.charAt(0)}return i.result.push(i.entry),i.dictionary[i.dictSize++]=i.w+i.entry.charAt(0),i.enlargeIn--,i.w=i.entry,i.enlargeIn==0&&(i.enlargeIn=Math.pow(2,i.numBits),i.numBits++),b++,[3,1];case 4:return[2]}})})})},x}();o.DecompressorImpl=l},658:function(r,o){var n=this&&this.__awaiter||function(c,f,l,x){return new(l||(l=Promise))(function(d,s){function m(i){try{y(x.next(i))}catch(p){s(p)}}function u(i){try{y(x.throw(i))}catch(p){s(p)}}function y(i){var p;i.done?d(i.value):(p=i.value,p instanceof l?p:new l(function(b){b(p)})).then(m,u)}y((x=x.apply(c,f||[])).next())})},a=this&&this.__generator||function(c,f){var l,x,d,s,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(y){return function(i){return function(p){if(l)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(m=0)),m;)try{if(l=1,x&&(d=2&p[0]?x.return:p[0]?x.throw||((d=x.return)&&d.call(x),0):x.next)&&!(d=d.call(x,p[1])).done)return d;switch(x=0,d&&(p=[2&p[0],d.value]),p[0]){case 0:case 1:d=p;break;case 4:return m.label++,{value:p[1],done:!1};case 5:m.label++,x=p[1],p=[0];continue;case 7:p=m.ops.pop(),m.trys.pop();continue;default:if(!((d=(d=m.trys).length>0&&d[d.length-1])||p[0]!==6&&p[0]!==2)){m=0;continue}if(p[0]===3&&(!d||p[1]>d[0]&&p[1]<d[3])){m.label=p[1];break}if(p[0]===6&&m.label<d[1]){m.label=d[1],d=p;break}if(d&&m.label<d[2]){m.label=d[2],m.ops.push(p);break}d[2]&&m.ops.pop(),m.trys.pop();continue}p=f.call(c,m)}catch(b){p=[6,b],x=0}finally{l=d=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([y,i])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.wait=void 0,o.wait=function(){return n(this,void 0,void 0,function(){return a(this,function(c){return[2,new Promise(function(f){setTimeout(f,0)})]})})}}},t={};return function r(o){var n=t[o];if(n!==void 0)return n.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,r),a.exports}(48)})())});var ot=Zt((Un,Ee)=>{"use strict";(function(){"use strict";var e="input is invalid type",t=typeof window=="object",r=t?window:{};r.JS_SHA256_NO_WINDOW&&(t=!1);var o=!t&&typeof self=="object",n=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;n?r=global:o&&(r=self);var a=!r.JS_SHA256_NO_COMMON_JS&&typeof Ee=="object"&&Ee.exports,c=typeof define=="function"&&define.amd,f=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),x=[-2147483648,8388608,32768,128],d=[24,16,8,0],s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=["hex","array","digest","arrayBuffer"],u=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"}),f&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(h){return typeof h=="object"&&h.buffer&&h.buffer.constructor===ArrayBuffer});var y=function(h,_){return function(E){return new g(_,!0).update(E)[h]()}},i=function(h){var _=y("hex",h);n&&(_=p(_,h)),_.create=function(){return new g(h)},_.update=function(I){return _.create().update(I)};for(var E=0;E<m.length;++E){var S=m[E];_[S]=y(S,h)}return _},p=function(h,_){var E=Yt("crypto"),S=Yt("buffer").Buffer,I=_?"sha224":"sha256",w;S.from&&!r.JS_SHA256_NO_BUFFER_FROM?w=S.from:w=function(v){return new S(v)};var C=function(v){if(typeof v=="string")return E.createHash(I).update(v,"utf8").digest("hex");if(v==null)throw new Error(e);return v.constructor===ArrayBuffer&&(v=new Uint8Array(v)),Array.isArray(v)||ArrayBuffer.isView(v)||v.constructor===S?E.createHash(I).update(w(v)).digest("hex"):h(v)};return C},b=function(h,_){return function(E,S){return new T(E,_,!0).update(S)[h]()}},F=function(h){var _=b("hex",h);_.create=function(I){return new T(I,h)},_.update=function(I,w){return _.create(I).update(w)};for(var E=0;E<m.length;++E){var S=m[E];_[S]=b(S,h)}return _};function g(h,_){_?(u[0]=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0,this.blocks=u):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=h}g.prototype.update=function(h){if(!this.finalized){var _,E=typeof h;if(E!=="string"){if(E==="object"){if(h===null)throw new Error(e);if(f&&h.constructor===ArrayBuffer)h=new Uint8Array(h);else if(!Array.isArray(h)&&(!f||!ArrayBuffer.isView(h)))throw new Error(e)}else throw new Error(e);_=!0}for(var S,I=0,w,C=h.length,v=this.blocks;I<C;){if(this.hashed&&(this.hashed=!1,v[0]=this.block,this.block=v[16]=v[1]=v[2]=v[3]=v[4]=v[5]=v[6]=v[7]=v[8]=v[9]=v[10]=v[11]=v[12]=v[13]=v[14]=v[15]=0),_)for(w=this.start;I<C&&w<64;++I)v[w>>>2]|=h[I]<<d[w++&3];else for(w=this.start;I<C&&w<64;++I)S=h.charCodeAt(I),S<128?v[w>>>2]|=S<<d[w++&3]:S<2048?(v[w>>>2]|=(192|S>>>6)<<d[w++&3],v[w>>>2]|=(128|S&63)<<d[w++&3]):S<55296||S>=57344?(v[w>>>2]|=(224|S>>>12)<<d[w++&3],v[w>>>2]|=(128|S>>>6&63)<<d[w++&3],v[w>>>2]|=(128|S&63)<<d[w++&3]):(S=65536+((S&1023)<<10|h.charCodeAt(++I)&1023),v[w>>>2]|=(240|S>>>18)<<d[w++&3],v[w>>>2]|=(128|S>>>12&63)<<d[w++&3],v[w>>>2]|=(128|S>>>6&63)<<d[w++&3],v[w>>>2]|=(128|S&63)<<d[w++&3]);this.lastByteIndex=w,this.bytes+=w-this.start,w>=64?(this.block=v[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}},g.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var h=this.blocks,_=this.lastByteIndex;h[16]=this.block,h[_>>>2]|=x[_&3],this.block=h[16],_>=56&&(this.hashed||this.hash(),h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),h[14]=this.hBytes<<3|this.bytes>>>29,h[15]=this.bytes<<3,this.hash()}},g.prototype.hash=function(){var h=this.h0,_=this.h1,E=this.h2,S=this.h3,I=this.h4,w=this.h5,C=this.h6,v=this.h7,k=this.blocks,M,O,z,q,A,K,J,ae,Qe,et,ve;for(M=16;M<64;++M)A=k[M-15],O=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,A=k[M-2],z=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,k[M]=k[M-16]+O+k[M-7]+z<<0;for(ve=_&E,M=0;M<64;M+=4)this.first?(this.is224?(ae=300032,A=k[0]-1413257819,v=A-150054599<<0,S=A+24177077<<0):(ae=704751109,A=k[0]-210244248,v=A-1521486534<<0,S=A+143694565<<0),this.first=!1):(O=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),z=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),ae=h&_,q=ae^h&E^ve,J=I&w^~I&C,A=v+z+J+s[M]+k[M],K=O+q,v=S+A<<0,S=A+K<<0),O=(S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10),z=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),Qe=S&h,q=Qe^S&_^ae,J=v&I^~v&w,A=C+z+J+s[M+1]+k[M+1],K=O+q,C=E+A<<0,E=A+K<<0,O=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),z=(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7),et=E&S,q=et^E&h^Qe,J=C&v^~C&I,A=w+z+J+s[M+2]+k[M+2],K=O+q,w=_+A<<0,_=A+K<<0,O=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),z=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7),ve=_&E,q=ve^_&S^et,J=w&C^~w&v,A=I+z+J+s[M+3]+k[M+3],K=O+q,I=h+A<<0,h=A+K<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+h<<0,this.h1=this.h1+_<<0,this.h2=this.h2+E<<0,this.h3=this.h3+S<<0,this.h4=this.h4+I<<0,this.h5=this.h5+w<<0,this.h6=this.h6+C<<0,this.h7=this.h7+v<<0},g.prototype.hex=function(){this.finalize();var h=this.h0,_=this.h1,E=this.h2,S=this.h3,I=this.h4,w=this.h5,C=this.h6,v=this.h7,k=l[h>>>28&15]+l[h>>>24&15]+l[h>>>20&15]+l[h>>>16&15]+l[h>>>12&15]+l[h>>>8&15]+l[h>>>4&15]+l[h&15]+l[_>>>28&15]+l[_>>>24&15]+l[_>>>20&15]+l[_>>>16&15]+l[_>>>12&15]+l[_>>>8&15]+l[_>>>4&15]+l[_&15]+l[E>>>28&15]+l[E>>>24&15]+l[E>>>20&15]+l[E>>>16&15]+l[E>>>12&15]+l[E>>>8&15]+l[E>>>4&15]+l[E&15]+l[S>>>28&15]+l[S>>>24&15]+l[S>>>20&15]+l[S>>>16&15]+l[S>>>12&15]+l[S>>>8&15]+l[S>>>4&15]+l[S&15]+l[I>>>28&15]+l[I>>>24&15]+l[I>>>20&15]+l[I>>>16&15]+l[I>>>12&15]+l[I>>>8&15]+l[I>>>4&15]+l[I&15]+l[w>>>28&15]+l[w>>>24&15]+l[w>>>20&15]+l[w>>>16&15]+l[w>>>12&15]+l[w>>>8&15]+l[w>>>4&15]+l[w&15]+l[C>>>28&15]+l[C>>>24&15]+l[C>>>20&15]+l[C>>>16&15]+l[C>>>12&15]+l[C>>>8&15]+l[C>>>4&15]+l[C&15];return this.is224||(k+=l[v>>>28&15]+l[v>>>24&15]+l[v>>>20&15]+l[v>>>16&15]+l[v>>>12&15]+l[v>>>8&15]+l[v>>>4&15]+l[v&15]),k},g.prototype.toString=g.prototype.hex,g.prototype.digest=function(){this.finalize();var h=this.h0,_=this.h1,E=this.h2,S=this.h3,I=this.h4,w=this.h5,C=this.h6,v=this.h7,k=[h>>>24&255,h>>>16&255,h>>>8&255,h&255,_>>>24&255,_>>>16&255,_>>>8&255,_&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255];return this.is224||k.push(v>>>24&255,v>>>16&255,v>>>8&255,v&255),k},g.prototype.array=g.prototype.digest,g.prototype.arrayBuffer=function(){this.finalize();var h=new ArrayBuffer(this.is224?28:32),_=new DataView(h);return _.setUint32(0,this.h0),_.setUint32(4,this.h1),_.setUint32(8,this.h2),_.setUint32(12,this.h3),_.setUint32(16,this.h4),_.setUint32(20,this.h5),_.setUint32(24,this.h6),this.is224||_.setUint32(28,this.h7),h};function T(h,_,E){var S,I=typeof h;if(I==="string"){var w=[],C=h.length,v=0,k;for(S=0;S<C;++S)k=h.charCodeAt(S),k<128?w[v++]=k:k<2048?(w[v++]=192|k>>>6,w[v++]=128|k&63):k<55296||k>=57344?(w[v++]=224|k>>>12,w[v++]=128|k>>>6&63,w[v++]=128|k&63):(k=65536+((k&1023)<<10|h.charCodeAt(++S)&1023),w[v++]=240|k>>>18,w[v++]=128|k>>>12&63,w[v++]=128|k>>>6&63,w[v++]=128|k&63);h=w}else if(I==="object"){if(h===null)throw new Error(e);if(f&&h.constructor===ArrayBuffer)h=new Uint8Array(h);else if(!Array.isArray(h)&&(!f||!ArrayBuffer.isView(h)))throw new Error(e)}else throw new Error(e);h.length>64&&(h=new g(_,!0).update(h).array());var M=[],O=[];for(S=0;S<64;++S){var z=h[S]||0;M[S]=92^z,O[S]=54^z}g.call(this,_,E),this.update(O),this.oKeyPad=M,this.inner=!0,this.sharedMemory=E}T.prototype=new g,T.prototype.finalize=function(){if(g.prototype.finalize.call(this),this.inner){this.inner=!1;var h=this.array();g.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(h),g.prototype.finalize.call(this)}};var R=i();R.sha256=R,R.sha224=i(!0),R.sha256.hmac=F(),R.sha224.hmac=F(!0),a?Ee.exports=R:(r.sha256=R.sha256,r.sha224=R.sha224,c&&define(function(){return R}))})()});function te(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var Ae=B(()=>{"use strict"});function lt(e){return te(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var sr=B(()=>{"use strict";Ae()});var ut,cr=B(()=>{"use strict";ut="2.21.55"});function lr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?lr(e.cause,t):t?null:e}var pt,N,ce=B(()=>{"use strict";cr();pt={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${ut}`},N=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,a=pt.getDocsUrl?.({...r,docsPath:n}),c=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...o?[`Details: ${o}`]:[],...pt.version?[`Version: ${pt.version}`]:[]].join(`
|
|
2
|
+
`);super(c,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=ut}walk(t){return lr(this,t)}}});var le,ur=B(()=>{"use strict";ce();le=class extends N{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}}});function V(e,{dir:t,size:r=32}={}){return typeof e=="string"?pr(e,{dir:t,size:r}):fr(e,{dir:t,size:r})}function pr(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new le({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function fr(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new le({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let a=t==="right";o[a?n:r-n-1]=e[a?n:e.length-n-1]}return o}var Pe=B(()=>{"use strict";ur()});var Re,Me,ft=B(()=>{"use strict";ce();Re=class extends N{constructor({max:t,min:r,signed:o,size:n,value:a}){super(`Number "${a}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Me=class extends N{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}});function Y(e,{size:t}){if(lt(e)>t)throw new Me({givenSize:lt(e),maxSize:t})}var dt=B(()=>{"use strict";ft();sr()});function G(e,t={}){return typeof e=="number"||typeof e=="bigint"?Be(e,t):typeof e=="string"?mr(e,t):typeof e=="boolean"?dr(e,t):ue(e,t)}function dr(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(Y(r,{size:t.size}),V(r,{size:t.size})):r}function ue(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=Wo[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(Y(o,{size:t.size}),V(o,{dir:"right",size:t.size})):o}function Be(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),a;o?r?a=(1n<<BigInt(o)*8n-1n)-1n:a=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));let c=typeof a=="bigint"&&r?-a-1n:0;if(a&&n>a||n<c){let l=typeof e=="bigint"?"n":"";throw new Re({max:a?`${a}${l}`:void 0,min:`${c}${l}`,signed:r,size:o,value:`${e}${l}`})}let f=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?V(f,{size:o}):f}function mr(e,t={}){let r=jo.encode(e);return ue(r,t)}var Wo,jo,He=B(()=>{"use strict";ft();Pe();dt();Wo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));jo=new TextEncoder});function mt(e,t={}){return typeof e=="number"||typeof e=="bigint"?_r(e,t):typeof e=="boolean"?xr(e,t):te(e)?pe(e,t):Le(e,t)}function xr(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Y(r,{size:t.size}),V(r,{size:t.size})):r}function hr(e){if(e>=W.zero&&e<=W.nine)return e-W.zero;if(e>=W.A&&e<=W.F)return e-(W.A-10);if(e>=W.a&&e<=W.f)return e-(W.a-10)}function pe(e,t={}){let r=e;t.size&&(Y(r,{size:t.size}),r=V(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,a=new Uint8Array(n);for(let c=0,f=0;c<n;c++){let l=hr(o.charCodeAt(f++)),x=hr(o.charCodeAt(f++));if(l===void 0||x===void 0)throw new N(`Invalid byte sequence ("${o[f-2]}${o[f-1]}" in "${o}").`);a[c]=l*16+x}return a}function _r(e,t){let r=Be(e,t);return pe(r)}function Le(e,t={}){let r=qo.encode(e);return typeof t.size=="number"?(Y(r,{size:t.size}),V(r,{dir:"right",size:t.size})):r}var qo,W,Ue=B(()=>{"use strict";ce();Ae();Pe();dt();He();qo=new TextEncoder;W={zero:48,nine:57,A:65,F:70,a:97,f:102}});function ht(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ko(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fe(e,...t){if(!Ko(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function xt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yr(e,t){fe(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}var _t=B(()=>{"use strict"});function Jo(e,t=!1){return t?{h:Number(e&De),l:Number(e>>gr&De)}:{h:Number(e>>gr&De)|0,l:Number(e&De)|0}}function br(e,t=!1){let r=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:a,l:c}=Jo(e[n],t);[r[n],o[n]]=[a,c]}return[r,o]}var De,gr,wr,vr,Sr,Fr,Tr=B(()=>{"use strict";De=BigInt(4294967295),gr=BigInt(32);wr=(e,t,r)=>e<<r|t>>>32-r,vr=(e,t,r)=>t<<r|e>>>32-r,Sr=(e,t,r)=>t<<r-32|e>>>64-r,Fr=(e,t,r)=>e<<r-32|t>>>64-r});function gt(e){for(let t=0;t<e.length;t++)e[t]=Go(e[t])}function Xo(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function ze(e){return typeof e=="string"&&(e=Xo(e)),fe(e),e}function Ir(e){let t=o=>e().update(ze(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Cr(e){let t=(o,n)=>e(n).update(ze(o)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=o=>e(o),t}var Er,yt,Go,Oe,kr=B(()=>{"use strict";_t();Er=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),yt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,Go=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;Oe=class{clone(){return this._cloneInto()}}});function nn(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let c=0;c<10;c++)r[c]=e[c]^e[c+10]^e[c+20]^e[c+30]^e[c+40];for(let c=0;c<10;c+=2){let f=(c+8)%10,l=(c+2)%10,x=r[l],d=r[l+1],s=Ar(x,d,1)^r[f],m=Pr(x,d,1)^r[f+1];for(let u=0;u<50;u+=10)e[c+u]^=s,e[c+u+1]^=m}let n=e[2],a=e[3];for(let c=0;c<24;c++){let f=Mr[c],l=Ar(n,a,f),x=Pr(n,a,f),d=Rr[c];n=e[d],a=e[d+1],e[d]=l,e[d+1]=x}for(let c=0;c<50;c+=10){for(let f=0;f<10;f++)r[f]=e[c+f];for(let f=0;f<10;f++)e[c+f]^=~r[(f+2)%10]&r[(f+4)%10]}e[0]^=rn[o],e[1]^=on[o]}r.fill(0)}var Rr,Mr,Br,Yo,de,Zo,Qo,en,tn,rn,on,Ar,Pr,Ne,X,Vi,$i,Wi,ji,qi,Hr,Ki,Ji,Lr,Gi,Xi,Ur=B(()=>{"use strict";_t();Tr();kr();Rr=[],Mr=[],Br=[],Yo=BigInt(0),de=BigInt(1),Zo=BigInt(2),Qo=BigInt(7),en=BigInt(256),tn=BigInt(113);for(let e=0,t=de,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Rr.push(2*(5*o+r)),Mr.push((e+1)*(e+2)/2%64);let n=Yo;for(let a=0;a<7;a++)t=(t<<de^(t>>Qo)*tn)%en,t&Zo&&(n^=de<<(de<<BigInt(a))-de);Br.push(n)}[rn,on]=br(Br,!0),Ar=(e,t,r)=>r>32?Sr(e,t,r):wr(e,t,r),Pr=(e,t,r)=>r>32?Fr(e,t,r):vr(e,t,r);Ne=class e extends Oe{constructor(t,r,o,n=!1,a=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ht(o),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Er(this.state)}keccak(){yt||gt(this.state32),nn(this.state32,this.rounds),yt||gt(this.state32),this.posOut=0,this.pos=0}update(t){xt(this);let{blockLen:r,state:o}=this;t=ze(t);let n=t.length;for(let a=0;a<n;){let c=Math.min(r-this.pos,n-a);for(let f=0;f<c;f++)o[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,r&128&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){xt(this,!1),fe(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,a=t.length;n<a;){this.posOut>=o&&this.keccak();let c=Math.min(o-this.posOut,a-n);t.set(r.subarray(this.posOut,this.posOut+c),n),this.posOut+=c,n+=c}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ht(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(yr(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:a,enableXOF:c}=this;return t||(t=new e(r,o,n,c,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=o,t.outputLen=n,t.enableXOF=c,t.destroyed=this.destroyed,t}},X=(e,t,r)=>Ir(()=>new Ne(t,e,r)),Vi=X(6,144,224/8),$i=X(6,136,256/8),Wi=X(6,104,384/8),ji=X(6,72,512/8),qi=X(1,144,224/8),Hr=X(1,136,256/8),Ki=X(1,104,384/8),Ji=X(1,72,512/8),Lr=(e,t,r)=>Cr((o={})=>new Ne(t,e,o.dkLen===void 0?r:o.dkLen,!0)),Gi=Lr(31,168,128/8),Xi=Lr(31,136,256/8)});function me(e,t){let r=t||"hex",o=Hr(te(e,{strict:!1})?mt(e):e);return r==="bytes"?o:G(o)}var bt=B(()=>{"use strict";Ur();Ae();Ue();He()});var he,Dr=B(()=>{"use strict";ce();he=class extends N{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}});var re,wt=B(()=>{"use strict";re=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o)}return this}}});function Or(e,t){if(vt.has(`${e}.${t}`))return vt.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),o=me(Le(r),"bytes"),n=(t?r.substring(`${t}0x`.length):r).split("");for(let c=0;c<40;c+=2)o[c>>1]>>4>=8&&n[c]&&(n[c]=n[c].toUpperCase()),(o[c>>1]&15)>=8&&n[c+1]&&(n[c+1]=n[c+1].toUpperCase());let a=`0x${n.join("")}`;return vt.set(`${e}.${t}`,a),a}var vt,zr=B(()=>{"use strict";Ue();bt();wt();vt=new re(8192)});function Ft(e,t){let{strict:r=!0}=t??{},o=`${e}.${r}`;if(St.has(o))return St.get(o);let n=an.test(e)?e.toLowerCase()===e?!0:r?Or(e)===e:!0:!1;return St.set(o,n),n}var an,St,Nr=B(()=>{"use strict";wt();zr();an=/^0x[a-fA-F0-9]{40}$/,St=new re(8192)});function Ve(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var Vr=B(()=>{"use strict"});function Tt(e,t){if(!Ft(e,{strict:!1}))throw new he({address:e});if(!Ft(t,{strict:!1}))throw new he({address:t});return e.toLowerCase()===t.toLowerCase()}var $r=B(()=>{"use strict";Dr();Nr()});var An={};zo(An,{ButtonShare:()=>Ze});var U=class extends Error{constructor(r,o,n){super(o);this.code=r;this.data=n}};var Te=class extends U{constructor(t){super(D.internalError,t)}};var D={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};var $=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,r)=>{this._resolve=t,this._reject=r})}get promise(){return this._promise}resolve=t=>{this._resolve?.(t)};reject=t=>{this._reject?.(t)}};var er=Fe(rt(),1),nt=Fe(ot(),1);async function Ie(e){let t=(0,nt.sha256)(JSON.stringify(e)),r={...e,validationHash:t},o=await tr(r),n=(0,nt.sha256)(o);return{compressed:o,compressedHash:n}}async function tr(e){return(0,er.compressToBase64)(JSON.stringify(e))}var rr=Fe(rt(),1),it=Fe(ot(),1);async function Ce(e){if(!(e?.compressed&&e?.compressedHash))throw new U(D.corruptedResponse,"Missing compressed data");let t=await or(e.compressed);if(!t)throw new U(D.corruptedResponse,"Invalid compressed data");if(!t?.validationHash)throw new U(D.corruptedResponse,"Missing validation hash");if((0,it.sha256)(e.compressed)!==e.compressedHash)throw new U(D.corruptedResponse,"Invalid compressed hash");let{validationHash:o,...n}=t;if((0,it.sha256)(JSON.stringify(n))!==t.validationHash)throw new U(D.corruptedResponse,"Invalid data validation hash");return t}async function or(e){let t=await(0,rr.decompressFromBase64)(e);try{return JSON.parse(t)}catch(r){return console.error("Invalid compressed data",{e:r,decompressed:t}),null}}var ee="nexus-wallet-backup";function nr(){let e=new Map;return{createChannel:t=>{let r=Math.random().toString(36).substring(7);return e.set(r,t),r},getRpcResolver:t=>e.get(t),removeChannel:t=>e.delete(t),destroy:()=>e.clear()}}var ke={id:"nexus-wallet",name:"nexus-wallet",allow:"publickey-credentials-get *; clipboard-write; web-share *",style:{width:"0",height:"0",border:"0",position:"absolute",zIndex:1e3,top:"-1000px",left:"-1000px"}};function at({walletBaseUrl:e,config:t}){let r=document.querySelector("#nexus-wallet");r&&r.remove();let o=document.createElement("iframe");return o.id=ke.id,o.name=ke.name,o.allow=ke.allow,o.style.zIndex=ke.style.zIndex.toString(),st({iframe:o,isVisible:!1}),document.body.appendChild(o),new Promise(n=>{o?.addEventListener("load",()=>n(o)),o.src=`${t?.walletUrl??e??"https://wallet.frak.id"}/listener`})}function st({iframe:e,isVisible:t}){if(!t){e.style.width="0",e.style.height="0",e.style.border="0",e.style.position="fixed",e.style.top="-1000px",e.style.left="-1000px";return}e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="auto"}function ir({iframe:e}){let t=new $;return{handleEvent:async o=>{switch(o.iframeLifecycle){case"connected":t.resolve(!0);break;case"do-backup":o.data.backup?localStorage.setItem(ee,o.data.backup):localStorage.removeItem(ee);break;case"remove-backup":localStorage.removeItem(ee);break;case"show":case"hide":st({iframe:e,isVisible:o.iframeLifecycle==="show"});break}},isConnected:t.promise}}function ar({frakWalletUrl:e,iframe:t,channelManager:r,iframeLifecycleManager:o}){if(typeof window>"u")throw new U(D.configError,"iframe client should be used in the browser");if(!t.contentWindow)throw new U(D.configError,"The iframe does not have a product window");let n=t.contentWindow,a=async l=>{if(!(l.origin&&URL.canParse(l.origin))||new URL(l.origin).origin.toLowerCase()!==new URL(e).origin.toLowerCase()||typeof l.data!="object")return;if("iframeLifecycle"in l.data){await o.handleEvent(l.data);return}if("clientLifecycle"in l.data){console.error("Client lifecycle event received on the client side, dismissing it");return}let x=l.data.id,d=r.getRpcResolver(x);d&&await d(l.data)};return window.addEventListener("message",a),{sendEvent:l=>{n.postMessage(l,{targetOrigin:e})},cleanup:()=>{window.removeEventListener("message",a)}}}function ct({config:e,iframe:t}){let r=nr(),o=ir({iframe:t}),n=ar({frakWalletUrl:e?.walletUrl??"https://wallet.frak.id",iframe:t,channelManager:r,iframeLifecycleManager:o}),a=async d=>{if(!await o.isConnected)throw new U(D.clientNotConnected,"The iframe provider isn't connected yet");let m=new $,u=r.createChannel(async i=>{let p=await Ce(i.data);p.error?m.reject(new U(p.error.code,p.error.message,p.error?.data)):m.resolve(p.result),r.removeChannel(u)}),y=await Ie(d);return n.sendEvent({id:u,topic:d.method,data:y}),m.promise},c=async(d,s)=>{if(!await o.isConnected)throw new U(D.clientNotConnected,"The iframe provider isn't connected yet");let u=r.createChannel(async i=>{let p=await Ce(i.data);if(p.result)s(p.result);else throw new Te("No valid result in the response")}),y=await Ie(d);n.sendEvent({id:u,topic:d.method,data:y})},f=Vo(n,o),l=async()=>{f(),r.destroy(),n.cleanup(),t.remove()},x=$o({config:e,messageHandler:n,lifecycleManager:o});return{config:e,waitForConnection:o.isConnected,waitForSetup:x,request:a,listenerRequest:c,destroy:l}}function Vo(e,t){let n,a,c=()=>e.sendEvent({iframeLifecycle:"heartbeat"});async function f(){c(),n=setInterval(c,100),a=setTimeout(()=>{l(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,l()}function l(){n&&clearInterval(n),a&&clearTimeout(a)}return f(),l}async function $o({config:e,messageHandler:t,lifecycleManager:r}){await r.isConnected;let o=async()=>{let a=e.metadata.css;a&&t.sendEvent({clientLifecycle:"modal-css",data:{cssLink:a}})},n=async()=>{if(typeof window>"u")return;let a=window.localStorage.getItem(ee);a&&t.sendEvent({clientLifecycle:"restore-backup",data:{backup:a}})};await Promise.all([o(),n()])}Ue();He();Vr();$r();bt();Pe();var Et="fCtx";function sn(e){return btoa(Array.from(e,t=>String.fromCharCode(t)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function cn(e){let t=e.length%4;return Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(t===0?0:4-t),"=")),r=>r.charCodeAt(0))}function Wr(e){if(e?.r)try{let t=pe(e.r);return sn(t)}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}function jr(e){if(!(!e||e.length===0))try{let t=cn(e);return{r:ue(t,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}function qr({url:e}){if(!e)return null;let r=new URL(e).searchParams.get(Et);return r?jr(r):null}function Kr({url:e,context:t}){if(!e)return null;let r=qr({url:e}),o=r?{...r,...t}:t;if(!o.r)return null;let n=Wr(o);if(!n)return null;let a=new URL(e);return a.searchParams.set(Et,n),a.toString()}function Jr(e){let t=new URL(e);return t.searchParams.delete(Et),t.toString()}function ln({url:e,context:t}){if(!window.location?.href||typeof window>"u"){console.error("No window found, can't update context");return}let r=e??window.location.href,o;t!==null?o=Kr({url:r,context:t}):o=Jr(r),o&&window.history.replaceState(null,"",o.toString())}var oe={compress:Wr,decompress:jr,parse:qr,update:Kr,remove:Jr,replaceUrl:ln};async function It({config:e}){let t=await at({config:e});if(!t){console.error("Failed to create iframe");return}let r=ct({config:e,iframe:t});if(await r.waitForSetup,!await r.waitForConnection){console.error("Failed to connect to client");return}return r}function Gr(e){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(e,1):document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&e()})}function Ct(e,t){if(!t)return e.request({method:"frak_listenToWalletStatus"}).then(n=>(Xr(n.interactionToken),n));let r=new $,o=!1;return e.listenerRequest({method:"frak_listenToWalletStatus"},n=>{t(n),Xr(n.interactionToken),o||(r.resolve(n),o=!0)}).then(()=>r.promise)}function Xr(e){typeof window>"u"||(e?window.sessionStorage.setItem("frak-wallet-interaction-token",e):window.sessionStorage.removeItem("frak.interaction-token"))}function Yr({domain:e}){let t=e??window.location.host;return me(G(t))}async function kt(e,{productId:t,interaction:r,validation:o}){let n=t??Yr(e.config);return await e.request({method:"frak_sendInteraction",params:[n,r,o]})}async function xe(e,{steps:t,metadata:r}){return await e.request({method:"frak_displayModal",params:[t,e.config.metadata.name,r]})}async function At(e){return await e.request({method:"frak_getProductInformation"})}function Pt(e,{metadata:t,login:r,openSession:o}){return $e(e,{steps:{login:r??{},openSession:o??{}},metadata:t})}function $e(e,t){function r(c){return $e(e,{...t,steps:{...t.steps,sendTransaction:c}})}function o(c){return $e(e,{...t,steps:{...t.steps,final:{...c,action:{key:"reward"}}}})}function n(c,f){return $e(e,{...t,steps:{...t.steps,final:{...f,action:{key:"sharing",options:c}}}})}async function a(){return await xe(e,t)}return{params:t,sendTx:r,reward:o,sharing:n,display:a}}var Rt={press:{openArticle:"0xc0a24ffb",readArticle:"0xd5bd0fbe"},dapp:{proofVerifiableStorageUpdate:"0x2ab2aeef",callableVerifiableStorageUpdate:"0xa07da986"},webshop:{open:"0xb311798f"},referral:{referred:"0x010cc3b9",createLink:"0xb2c0f17c"},purchase:{started:"0xd87e90c3",completed:"0x8403aeb4"}};var We={dapp:1,press:2,webshop:3,referral:30,purchase:31},Xa=Object.entries(We).reduce((e,[t,r])=>(e[t]=BigInt(1)<<BigInt(r),e),{});var Mt={createLink(){let e=Ve([Rt.referral.createLink,"0x"]);return{handlerTypeDenominator:G(We.referral),interactionData:e}},referred({referrer:e}){let t=Ve([Rt.referral.referred,V(e,{size:32})]);return{handlerTypeDenominator:G(We.referral),interactionData:t}}};async function Zr(e,{walletStatus:t,frakContext:r,modalConfig:o,productId:n,options:a}){let c=!1;async function f(){if(!c)return c=!0,pn(e,{modalConfig:o,walletStatus:t})}async function l(x){let d=Mt.referred({referrer:x});await kt(e,{productId:n,interaction:d})}try{let{status:x,currentWallet:d}=await un({initialWalletStatus:t,getFreshWalletStatus:f,pushReferralInteraction:l,frakContext:r});return oe.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:d}:null}),x}catch(x){return console.log("Error processing referral",{error:x}),oe.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:t?.wallet}:null}),fn(x)}}async function un({initialWalletStatus:e,getFreshWalletStatus:t,pushReferralInteraction:r,frakContext:o}){let n=e?.wallet;return o?.r?(n||(n=await t()),n&&Tt(o.r,n)?{status:"self-referral",currentWallet:n}:(e?.interactionSession||(n=await t()),await r(o.r),{status:"success",currentWallet:n})):{status:"no-referrer",currentWallet:n}}async function pn(e,{modalConfig:t,walletStatus:r}){return r?.interactionSession?r.wallet??void 0:t?(await xe(e,t))?.login?.wallet??void 0:void 0}function fn(e){if(e instanceof U)switch(e.code){case D.walletNotConnected:return"no-wallet";case D.serverErrorForInteractionDelegation:return"no-session";default:return"error"}return"error"}async function Bt(e,{productId:t,modalConfig:r,options:o}={}){let n=oe.parse({url:window.location.href}),a=await Ct(e);try{return await Zr(e,{walletStatus:a,frakContext:n,modalConfig:r,productId:t,options:o})}catch(c){console.warn("Error processing referral",{error:c})}}var Qr="frakClientReady",je;function eo(){let e=new CustomEvent(Qr);window.dispatchEvent(e)}function Ht(e,t){if(window.FrakSetup?.client&&e==="add"){t();return}(e==="add"?window.addEventListener:window.removeEventListener)(Qr,t,!1)}function to(e){je=Pt(e,window.FrakSetup?.modalConfig??{})}async function ro(e){if(!je){console.error("modalBuilderSteps not found");return}let t=await Bt(e,{modalConfig:je.reward().params});console.log("referral",t)}function oo(){return je}var ge,P,co,dn,Z,no,lo,Lt,uo,Ot,Ut,Dt,mn,ye={},po=[],hn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zt=Array.isArray;function j(e,t){for(var r in t)e[r]=t[r];return e}function Nt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Q(e,t,r){var o,n,a,c={};for(a in t)a=="key"?o=t[a]:a=="ref"?n=t[a]:c[a]=t[a];if(arguments.length>2&&(c.children=arguments.length>3?ge.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)c[a]===void 0&&(c[a]=e.defaultProps[a]);return _e(e,c,o,n,null)}function _e(e,t,r,o,n){var a={type:e,props:t,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++co,__i:-1,__u:0};return n==null&&P.vnode!=null&&P.vnode(a),a}function ie(e){return e.children}function Ke(e,t){this.props=e,this.context=t}function ne(e,t){if(t==null)return e.__?ne(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ne(e):null}function fo(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return fo(e)}}function io(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!Je.__r++||no!==P.debounceRendering)&&((no=P.debounceRendering)||lo)(Je)}function Je(){var e,t,r,o,n,a,c,f;for(Z.sort(Lt);e=Z.shift();)e.__d&&(t=Z.length,o=void 0,a=(n=(r=e).__v).__e,c=[],f=[],r.__P&&((o=j({},n)).__v=n.__v+1,P.vnode&&P.vnode(o),Vt(r.__P,o,n,r.__n,r.__P.namespaceURI,32&n.__u?[a]:null,c,a??ne(n),!!(32&n.__u),f),o.__v=n.__v,o.__.__k[o.__i]=o,xo(c,o,f),o.__e!=a&&fo(o)),Z.length>t&&Z.sort(Lt));Je.__r=0}function mo(e,t,r,o,n,a,c,f,l,x,d){var s,m,u,y,i,p,b=o&&o.__k||po,F=t.length;for(l=xn(r,t,b,l,F),s=0;s<F;s++)(u=r.__k[s])!=null&&(m=u.__i===-1?ye:b[u.__i]||ye,u.__i=s,p=Vt(e,u,m,n,a,c,f,l,x,d),y=u.__e,u.ref&&m.ref!=u.ref&&(m.ref&&$t(m.ref,null,u),d.push(u.ref,u.__c||y,u)),i==null&&y!=null&&(i=y),4&u.__u||m.__k===u.__k?l=ho(u,l,e):typeof u.type=="function"&&p!==void 0?l=p:y&&(l=y.nextSibling),u.__u&=-7);return r.__e=i,l}function xn(e,t,r,o,n){var a,c,f,l,x,d=r.length,s=d,m=0;for(e.__k=new Array(n),a=0;a<n;a++)(c=t[a])!=null&&typeof c!="boolean"&&typeof c!="function"?(l=a+m,(c=e.__k[a]=typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?_e(null,c,null,null,null):zt(c)?_e(ie,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?_e(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):c).__=e,c.__b=e.__b+1,f=null,(x=c.__i=_n(c,r,l,s))!==-1&&(s--,(f=r[x])&&(f.__u|=2)),f==null||f.__v===null?(x==-1&&m--,typeof c.type!="function"&&(c.__u|=4)):x!=l&&(x==l-1?m--:x==l+1?m++:(x>l?m--:m++,c.__u|=4))):e.__k[a]=null;if(s)for(a=0;a<d;a++)(f=r[a])!=null&&!(2&f.__u)&&(f.__e==o&&(o=ne(f)),_o(f,f));return o}function ho(e,t,r){var o,n;if(typeof e.type=="function"){for(o=e.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=e,t=ho(o[n],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=ne(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function _n(e,t,r,o){var n,a,c=e.key,f=e.type,l=t[r];if(l===null||l&&c==l.key&&f===l.type&&!(2&l.__u))return r;if(o>(l!=null&&!(2&l.__u)?1:0))for(n=r-1,a=r+1;n>=0||a<t.length;){if(n>=0){if((l=t[n])&&!(2&l.__u)&&c==l.key&&f===l.type)return n;n--}if(a<t.length){if((l=t[a])&&!(2&l.__u)&&c==l.key&&f===l.type)return a;a++}}return-1}function ao(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||hn.test(t)?r:r+"px"}function qe(e,t,r,o,n){var a;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)r&&t in r||ao(e.style,t,"");if(r)for(t in r)o&&r[t]===o[t]||ao(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(uo,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?o?r.u=o.u:(r.u=Ot,e.addEventListener(t,a?Dt:Ut,a)):e.removeEventListener(t,a?Dt:Ut,a);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function so(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Ot++;else if(t.t<r.u)return;return r(P.event?P.event(t):t)}}}function Vt(e,t,r,o,n,a,c,f,l,x){var d,s,m,u,y,i,p,b,F,g,T,R,h,_,E,S,I,w=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),a=[f=t.__e=r.__e]),(d=P.__b)&&d(t);e:if(typeof w=="function")try{if(b=t.props,F="prototype"in w&&w.prototype.render,g=(d=w.contextType)&&o[d.__c],T=d?g?g.props.value:d.__:o,r.__c?p=(s=t.__c=r.__c).__=s.__E:(F?t.__c=s=new w(b,T):(t.__c=s=new Ke(b,T),s.constructor=w,s.render=gn),g&&g.sub(s),s.props=b,s.state||(s.state={}),s.context=T,s.__n=o,m=s.__d=!0,s.__h=[],s._sb=[]),F&&s.__s==null&&(s.__s=s.state),F&&w.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=j({},s.__s)),j(s.__s,w.getDerivedStateFromProps(b,s.__s))),u=s.props,y=s.state,s.__v=t,m)F&&w.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),F&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(F&&w.getDerivedStateFromProps==null&&b!==u&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(b,T),!s.__e&&(s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(b,s.__s,T)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(s.props=b,s.state=s.__s,s.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(C){C&&(C.__=t)}),R=0;R<s._sb.length;R++)s.__h.push(s._sb[R]);s._sb=[],s.__h.length&&c.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(b,s.__s,T),F&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(u,y,i)})}if(s.context=T,s.props=b,s.__P=e,s.__e=!1,h=P.__r,_=0,F){for(s.state=s.__s,s.__d=!1,h&&h(t),d=s.render(s.props,s.state,s.context),E=0;E<s._sb.length;E++)s.__h.push(s._sb[E]);s._sb=[]}else do s.__d=!1,h&&h(t),d=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++_<25);s.state=s.__s,s.getChildContext!=null&&(o=j(j({},o),s.getChildContext())),F&&!m&&s.getSnapshotBeforeUpdate!=null&&(i=s.getSnapshotBeforeUpdate(u,y)),f=mo(e,zt(S=d!=null&&d.type===ie&&d.key==null?d.props.children:d)?S:[S],t,r,o,n,a,c,f,l,x),s.base=t.__e,t.__u&=-161,s.__h.length&&c.push(s),p&&(s.__E=s.__=null)}catch(C){if(t.__v=null,l||a!=null)if(C.then){for(t.__u|=l?160:128;f&&f.nodeType==8&&f.nextSibling;)f=f.nextSibling;a[a.indexOf(f)]=null,t.__e=f}else for(I=a.length;I--;)Nt(a[I]);else t.__e=r.__e,t.__k=r.__k;P.__e(C,t,r)}else a==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):f=t.__e=yn(r.__e,t,r,o,n,a,c,l,x);return(d=P.diffed)&&d(t),128&t.__u?void 0:f}function xo(e,t,r){for(var o=0;o<r.length;o++)$t(r[o],r[++o],r[++o]);P.__c&&P.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){P.__e(a,n.__v)}})}function yn(e,t,r,o,n,a,c,f,l){var x,d,s,m,u,y,i,p=r.props,b=t.props,F=t.type;if(F=="svg"?n="http://www.w3.org/2000/svg":F=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(x=0;x<a.length;x++)if((u=a[x])&&"setAttribute"in u==!!F&&(F?u.localName==F:u.nodeType==3)){e=u,a[x]=null;break}}if(e==null){if(F==null)return document.createTextNode(b);e=document.createElementNS(n,F,b.is&&b),f&&(P.__m&&P.__m(t,a),f=!1),a=null}if(F===null)p===b||f&&e.data===b||(e.data=b);else{if(a=a&&ge.call(e.childNodes),p=r.props||ye,!f&&a!=null)for(p={},x=0;x<e.attributes.length;x++)p[(u=e.attributes[x]).name]=u.value;for(x in p)if(u=p[x],x!="children"){if(x=="dangerouslySetInnerHTML")s=u;else if(!(x in b)){if(x=="value"&&"defaultValue"in b||x=="checked"&&"defaultChecked"in b)continue;qe(e,x,null,u,n)}}for(x in b)u=b[x],x=="children"?m=u:x=="dangerouslySetInnerHTML"?d=u:x=="value"?y=u:x=="checked"?i=u:f&&typeof u!="function"||p[x]===u||qe(e,x,u,p[x],n);if(d)f||s&&(d.__html===s.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(s&&(e.innerHTML=""),mo(e,zt(m)?m:[m],t,r,o,F=="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,c,a?a[0]:r.__k&&ne(r,0),f,l),a!=null)for(x=a.length;x--;)Nt(a[x]);f||(x="value",F=="progress"&&y==null?e.removeAttribute("value"):y!==void 0&&(y!==e[x]||F=="progress"&&!y||F=="option"&&y!==p[x])&&qe(e,x,y,p[x],n),x="checked",i!==void 0&&i!==e[x]&&qe(e,x,i,p[x],n))}return e}function $t(e,t,r){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(n){P.__e(n,r)}}function _o(e,t,r){var o,n;if(P.unmount&&P.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||$t(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){P.__e(a,t)}o.base=o.__P=null}if(o=e.__k)for(n=0;n<o.length;n++)o[n]&&_o(o[n],t,r||typeof e.type!="function");r||Nt(e.__e),e.__c=e.__=e.__e=void 0}function gn(e,t,r){return this.constructor(e,r)}function be(e,t,r){var o,n,a,c;t==document&&(t=document.documentElement),P.__&&P.__(e,t),n=(o=typeof r=="function")?null:r&&r.__k||t.__k,a=[],c=[],Vt(t,e=(!o&&r||t).__k=Q(ie,null,[e]),n||ye,ye,t.namespaceURI,!o&&r?[r]:n?null:t.firstChild?ge.call(t.childNodes):null,a,!o&&r?r:n?n.__e:t.firstChild,o,c),xo(a,e,c)}function Wt(e,t){be(e,t,Wt)}function jt(e,t,r){var o,n,a,c,f=j({},e.props);for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)a=="key"?o=t[a]:a=="ref"?n=t[a]:f[a]=t[a]===void 0&&c!==void 0?c[a]:t[a];return arguments.length>2&&(f.children=arguments.length>3?ge.call(arguments,2):r),_e(e.type,f,o||e.key,n||e.ref,null)}ge=po.slice,P={__e:function(e,t,r,o){for(var n,a,c;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),c=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,o||{}),c=n.__d),c)return n.__E=n}catch(f){e=f}throw e}},co=0,dn=function(e){return e!=null&&e.constructor==null},Ke.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=j({},this.state),typeof e=="function"&&(e=e(j({},r),this.props)),e&&j(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),io(this))},Ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),io(this))},Ke.prototype.render=ie,Z=[],lo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Lt=function(e,t){return e.__v.__b-t.__v.__b},Je.__r=0,uo=/(PointerCapture)$|Capture$/i,Ot=0,Ut=so(!1),Dt=so(!0),mn=0;function qt(){return(qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}var bn=["context","children"];function wn(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(o,n){if(o==null)return{};var a,c,f={},l=Object.keys(o);for(c=0;c<l.length;c++)n.indexOf(a=l[c])>=0||(f[a]=o[a]);return f}(e,bn);return jt(t,r)}function vn(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=Q(wn,qt({},this._props,{context:e.detail.context}),function t(r,o){if(r.nodeType===3)return r.data;if(r.nodeType!==1)return null;var n=[],a={},c=0,f=r.attributes,l=r.childNodes;for(c=f.length;c--;)f[c].name!=="slot"&&(a[f[c].name]=f[c].value,a[go(f[c].name)]=f[c].value);for(c=l.length;c--;){var x=t(l[c],null),d=l[c].slot;d?a[d]=Q(yo,{name:d},x):n[c]=x}var s=o?Q(yo,null,n):n;return Q(o||r.nodeName.toLowerCase(),a,s)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Wt:be)(this._vdom,this._root)}function go(e){return e.replace(/-(\w)/g,function(t,r){return r?r.toUpperCase():""})}function Sn(e,t,r){if(this._vdom){var o={};o[e]=r=r??void 0,o[go(e)]=r,this._vdom=jt(this._vdom,o),be(this._vdom,this._root)}}function Fn(){be(this._vdom=null,this._root)}function yo(e,t){var r=this;return Q("slot",qt({},e,{ref:function(o){o?(r.ref=o,r._listener||(r._listener=function(n){n.stopPropagation(),n.detail.context=t},o.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}function bo(e,t,r,o){function n(){var a=Reflect.construct(HTMLElement,[],n);return a._vdomComponent=e,a._root=o&&o.shadow?a.attachShadow({mode:o.mode||"open"}):a,a}return(n.prototype=Object.create(HTMLElement.prototype)).constructor=n,n.prototype.connectedCallback=vn,n.prototype.attributeChangedCallback=Sn,n.prototype.disconnectedCallback=Fn,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),n.observedAttributes=r,r.forEach(function(a){Object.defineProperty(n.prototype,a,{get:function(){return this._vdom.props[a]},set:function(c){this._vdom?this.attributeChangedCallback(a,null,c):(this._props||(this._props={}),this._props[a]=c,this.connectedCallback());var f=typeof c;c!=null&&f!=="string"&&f!=="boolean"&&f!=="number"||this.setAttribute(a,c)}})}),customElements.define(t||e.tagName||e.displayName||e.name,n)}var we,H,Kt,wo,Xe=0,ko=[],L=P,vo=L.__b,So=L.__r,Fo=L.diffed,To=L.__c,Eo=L.unmount,Io=L.__;function Gt(e,t){L.__h&&L.__h(H,e,Xe||t),Xe=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Xt(e){return Xe=1,Tn(Mo,e)}function Tn(e,t,r){var o=Gt(we++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):Mo(void 0,t),function(f){var l=o.__N?o.__N[0]:o.__[0],x=o.t(l,f);l!==x&&(o.__N=[x,o.__[1]],o.__c.setState({}))}],o.__c=H,!H.u)){var n=function(f,l,x){if(!o.__c.__H)return!0;var d=o.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!a||a.call(this,f,l,x);var s=o.__c.props!==f;return d.forEach(function(m){if(m.__N){var u=m.__[0];m.__=m.__N,m.__N=void 0,u!==m.__[0]&&(s=!0)}}),a&&a.call(this,f,l,x)||s};H.u=!0;var a=H.shouldComponentUpdate,c=H.componentWillUpdate;H.componentWillUpdate=function(f,l,x){if(this.__e){var d=a;a=void 0,n(f,l,x),a=d}c&&c.call(this,f,l,x)},H.shouldComponentUpdate=n}return o.__N||o.__}function Ao(e,t){var r=Gt(we++,3);!L.__s&&Ro(r.__H,t)&&(r.__=e,r.i=t,H.__H.__h.push(r))}function Ye(e,t){var r=Gt(we++,7);return Ro(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Po(e,t){return Xe=8,Ye(function(){return e},t)}function En(){for(var e;e=ko.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ge),e.__H.__h.forEach(Jt),e.__H.__h=[]}catch(t){e.__H.__h=[],L.__e(t,e.__v)}}L.__b=function(e){H=null,vo&&vo(e)},L.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Io&&Io(e,t)},L.__r=function(e){So&&So(e),we=0;var t=(H=e.__c).__H;t&&(Kt===H?(t.__h=[],H.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(Ge),t.__h.forEach(Jt),t.__h=[],we=0)),Kt=H},L.diffed=function(e){Fo&&Fo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ko.push(t)!==1&&wo===L.requestAnimationFrame||((wo=L.requestAnimationFrame)||In)(En)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Kt=H=null},L.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Ge),r.__h=r.__h.filter(function(o){return!o.__||Jt(o)})}catch(o){t.some(function(n){n.__h&&(n.__h=[])}),t=[],L.__e(o,r.__v)}}),To&&To(e,t)},L.unmount=function(e){Eo&&Eo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{Ge(o)}catch(n){t=n}}),r.__H=void 0,t&&L.__e(t,r.__v))};var Co=typeof requestAnimationFrame=="function";function In(e){var t,r=function(){clearTimeout(o),Co&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(r,100);Co&&(t=requestAnimationFrame(r))}function Ge(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function Jt(e){var t=H;e.__c=e.__(),H=t}function Ro(e,t){return!e||e.length!==t.length||t.some(function(r,o){return r!==e[o]})}function Mo(e,t){return typeof t=="function"?t(e):t}var Cn=0,ks=Array.isArray;function Bo(e,t,r,o,n,a){t||(t={});var c,f,l=t;"ref"in t&&(c=t.ref,delete t.ref);var x={type:e,props:l,key:r,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Cn,__i:-1,__u:0,__source:n,__self:a};if(typeof e=="function"&&(c=e.defaultProps))for(f in c)l[f]===void 0&&(l[f]=c[f]);return P.vnode&&P.vnode(x),x}function kn(){let e=oo();if(!e){console.error("modalBuilderSteps not found");return}e.sharing(window.FrakSetup?.modalShareConfig??{}).display()}function Ze({text:e="Share and earn!",classname:t="",useReward:r,noRewardText:o}){let n=Ye(()=>r!==void 0,[r]),[a,c]=Xt(!0),[f,l]=Xt(void 0),x=Po(()=>{if(c(!1),!n)return;let s=window.FrakSetup?.client;if(!s){console.warn("Frak client not ready yet");return}At(s).then(m=>{m?.estimatedEurReward&&l(`${m.estimatedEurReward} \u20AC`)})},[n]);Ao(()=>(Ht("add",x),()=>Ht("remove",x)),[x]);let d=Ye(()=>n?f?e.includes("{REWARD}")?e.replace("{REWARD}",f):`${e} ${f}`:o??e.replace("{REWARD}",""):e,[n,e,o,f]);return Bo("button",{type:"button",class:t,disabled:a,onClick:kn,children:d})}customElements.get("frak-button-share")||bo(Ze,"frak-button-share",["text"],{shadow:!1});Gr(async function(){if(!window.FrakSetup?.config){console.error("window.FrakSetup.config not found");return}let t=await It({config:window.FrakSetup.config});if(!t){console.error("Failed to create Frak client");return}window.FrakSetup.client=t,eo(),to(t),ro(t)});return No(An);})();
|
|
3
|
+
/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
js-sha256/src/sha256.js:
|
|
6
|
+
(**
|
|
7
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
8
|
+
*
|
|
9
|
+
* @version 0.11.0
|
|
10
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
11
|
+
* @copyright Chen, Yi-Cyuan 2014-2024
|
|
12
|
+
* @license MIT
|
|
13
|
+
*)
|
|
14
|
+
|
|
15
|
+
@noble/hashes/esm/utils.js:
|
|
16
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
17
|
+
*/
|
package/package.json
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.5",
|
|
15
15
|
"description": "Frak Wallet components, helping any person to interact with the Frak wallet.",
|
|
16
16
|
"repository": {
|
|
17
17
|
"url": "https://github.com/frak-id/wallet",
|
|
18
|
-
"directory": "
|
|
18
|
+
"directory": "sdk/components"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://docs.frak.id/
|
|
20
|
+
"homepage": "https://docs.frak.id/components",
|
|
21
21
|
"keywords": [
|
|
22
22
|
"frak-labs",
|
|
23
23
|
"nexus-wallet",
|
|
24
|
-
"erc-
|
|
24
|
+
"erc-frak",
|
|
25
25
|
"eip-4337",
|
|
26
26
|
"smart-wallet",
|
|
27
27
|
"components",
|
|
@@ -30,28 +30,34 @@
|
|
|
30
30
|
"license": "GNU GPL 3.0",
|
|
31
31
|
"sideEffects": false,
|
|
32
32
|
"private": false,
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
33
36
|
"type": "module",
|
|
34
|
-
"main": "dist/components.js",
|
|
35
37
|
"files": [
|
|
36
|
-
"/
|
|
38
|
+
"/cdn"
|
|
37
39
|
],
|
|
40
|
+
"main": "./cdn/components.js",
|
|
41
|
+
"browser": "./cdn/components.js",
|
|
38
42
|
"scripts": {
|
|
39
43
|
"lint": "biome lint .",
|
|
40
44
|
"format:check": "biome check .",
|
|
41
45
|
"format": "biome check --write .",
|
|
42
|
-
"clean": "rimraf
|
|
46
|
+
"clean": "rimraf cdn",
|
|
43
47
|
"build": "tsup",
|
|
44
|
-
"build:watch": "tsup --watch"
|
|
48
|
+
"build:watch": "tsup --watch",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"prepublish": "bun run lint && bun run build",
|
|
51
|
+
"publish": "bun publish"
|
|
45
52
|
},
|
|
46
53
|
"dependencies": {
|
|
47
|
-
"preact": "^10.25.
|
|
54
|
+
"preact": "^10.25.2",
|
|
48
55
|
"preact-custom-element": "^4.3.0"
|
|
49
56
|
},
|
|
50
57
|
"devDependencies": {
|
|
51
|
-
"@total-typescript/tsconfig": "^1.0.4",
|
|
52
58
|
"@types/node": "^22",
|
|
53
59
|
"@types/preact-custom-element": "^4.0.4",
|
|
54
60
|
"tsup": "^8.3.5",
|
|
55
61
|
"typescript": "^5"
|
|
56
62
|
}
|
|
57
|
-
}
|
|
63
|
+
}
|
package/dist/components.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var FrakComponents=(()=>{var K=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Ze=(t,e)=>{for(var n in e)K(t,n,{get:e[n],enumerable:!0})},Qe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let _ of Ge(e))!Je.call(t,_)&&_!==n&&K(t,_,{get:()=>e[_],enumerable:!(r=Ke(e,_))||r.enumerable});return t};var Xe=t=>Qe(K({},"__esModule",{value:!0}),t);var gt={};Ze(gt,{ButtonShare:()=>V});async function se(t,e){return document.getElementById(t)?Promise.resolve(!0):new Promise((n,r)=>{let _=document.createElement("script");_.id=t,_.src=e,_.async=!0,_.onload=()=>n(!0),_.onerror=()=>r(new Error(`Script load error for ${e}`)),document.head.appendChild(_)})}function ce(t){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(t,1):document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&t()})}var fe="frakClientReady";function Ye(){let t=new CustomEvent(fe);window.dispatchEvent(t)}function G(t,e){(t==="add"?window.addEventListener:window.removeEventListener)(fe,e,!1)}async function pe(){if(!window?.FrakSetup.config){console.error("window.FrakSetup.config not found");return}let t=await window.NexusSDK.createIframe({walletBaseUrl:window.FrakSetup.config.walletUrl??"https://wallet.frak.id"});if(!t){console.error("Failed to create iframe");return}let e=window.NexusSDK.createIFrameNexusClient({config:window.FrakSetup.config,iframe:t});if(!await e.waitForConnection){console.error("Failed to connect to Frak client");return}return window.FrakSetup.client=e,Ye(),e}function de(t){if(!window.FrakSetup.modalConfig){console.error("window.FrakSetup.modalConfig not found");return}window.FrakSetup.modalBuilderSteps=window.NexusSDK.modalBuilder(t,window.FrakSetup.modalConfig)}async function he(t){let e=await window.NexusSDK.referralInteraction(t,{modalConfig:window.FrakSetup.modalBuilderSteps?.reward().params,options:{alwaysAppendUrl:!0}});console.log("referral",e)}var L,d,we,et,S,me,be,J,ke,X,Z,Q,tt,A={},Ce=[],nt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y=Array.isArray;function C(t,e){for(var n in e)t[n]=e[n];return t}function ee(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function E(t,e,n){var r,_,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?_=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?L.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return D(t,a,r,_,null)}function D(t,e,n,r,_){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:_??++we,__i:-1,__u:0};return _==null&&d.vnode!=null&&d.vnode(o),o}function F(t){return t.children}function O(t,e){this.props=t,this.context=e}function H(t,e){if(e==null)return t.__?H(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?H(t):null}function xe(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return xe(t)}}function ve(t){(!t.__d&&(t.__d=!0)&&S.push(t)&&!I.__r++||me!==d.debounceRendering)&&((me=d.debounceRendering)||be)(I)}function I(){var t,e,n,r,_,o,a,u;for(S.sort(J);t=S.shift();)t.__d&&(e=S.length,r=void 0,o=(_=(n=t).__v).__e,a=[],u=[],n.__P&&((r=C({},_)).__v=_.__v+1,d.vnode&&d.vnode(r),te(n.__P,r,_,n.__n,n.__P.namespaceURI,32&_.__u?[o]:null,a,o??H(_),!!(32&_.__u),u),r.__v=_.__v,r.__.__k[r.__i]=r,Fe(a,r,u),r.__e!=o&&xe(r)),S.length>e&&S.sort(J));I.__r=0}function Se(t,e,n,r,_,o,a,u,l,s,f){var i,p,c,g,b,w,h=r&&r.__k||Ce,m=e.length;for(l=rt(n,e,h,l),i=0;i<m;i++)(c=n.__k[i])!=null&&(p=c.__i===-1?A:h[c.__i]||A,c.__i=i,w=te(t,c,p,_,o,a,u,l,s,f),g=c.__e,c.ref&&p.ref!=c.ref&&(p.ref&&ne(p.ref,null,c),f.push(c.ref,c.__c||g,c)),b==null&&g!=null&&(b=g),4&c.__u||p.__k===c.__k?l=Ee(c,l,t):typeof c.type=="function"&&w!==void 0?l=w:g&&(l=g.nextSibling),c.__u&=-7);return n.__e=b,l}function rt(t,e,n,r){var _,o,a,u,l,s=e.length,f=n.length,i=f,p=0;for(t.__k=[],_=0;_<s;_++)(o=e[_])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=_+p,(o=t.__k[_]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?D(null,o,null,null,null):Y(o)?D(F,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?D(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,a=null,(l=o.__i=ot(o,n,u,i))!==-1&&(i--,(a=n[l])&&(a.__u|=2)),a==null||a.__v===null?(l==-1&&p--,typeof o.type!="function"&&(o.__u|=4)):l!==u&&(l==u-1?p--:l==u+1?p++:(l>u?p--:p++,o.__u|=4))):o=t.__k[_]=null;if(i)for(_=0;_<f;_++)(a=n[_])!=null&&!(2&a.__u)&&(a.__e==r&&(r=H(a)),He(a,a));return r}function Ee(t,e,n){var r,_;if(typeof t.type=="function"){for(r=t.__k,_=0;r&&_<r.length;_++)r[_]&&(r[_].__=t,e=Ee(r[_],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=H(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ot(t,e,n,r){var _=t.key,o=t.type,a=n-1,u=n+1,l=e[n];if(l===null||l&&_==l.key&&o===l.type&&!(2&l.__u))return n;if((typeof o!="function"||o===F||_)&&r>(l!=null&&!(2&l.__u)?1:0))for(;a>=0||u<e.length;){if(a>=0){if((l=e[a])&&!(2&l.__u)&&_==l.key&&o===l.type)return a;a--}if(u<e.length){if((l=e[u])&&!(2&l.__u)&&_==l.key&&o===l.type)return u;u++}}return-1}function ye(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||nt.test(e)?n:n+"px"}function R(t,e,n,r,_){var o;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ye(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||ye(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")o=e!==(e=e.replace(ke,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=X,t.addEventListener(e,o?Q:Z,o)):t.removeEventListener(e,o?Q:Z,o);else{if(_=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ge(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=X++;else if(e.t<n.u)return;return n(d.event?d.event(e):e)}}}function te(t,e,n,r,_,o,a,u,l,s){var f,i,p,c,g,b,w,h,m,P,x,j,N,le,B,q,z,k=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[u=e.__e=n.__e]),(f=d.__b)&&f(e);e:if(typeof k=="function")try{if(h=e.props,m="prototype"in k&&k.prototype.render,P=(f=k.contextType)&&r[f.__c],x=f?P?P.props.value:f.__:r,n.__c?w=(i=e.__c=n.__c).__=i.__E:(m?e.__c=i=new k(h,x):(e.__c=i=new O(h,x),i.constructor=k,i.render=it),P&&P.sub(i),i.props=h,i.state||(i.state={}),i.context=x,i.__n=r,p=i.__d=!0,i.__h=[],i._sb=[]),m&&i.__s==null&&(i.__s=i.state),m&&k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=C({},i.__s)),C(i.__s,k.getDerivedStateFromProps(h,i.__s))),c=i.props,g=i.state,i.__v=e,p)m&&k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),m&&i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m&&k.getDerivedStateFromProps==null&&h!==c&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,x),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,x)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(i.props=h,i.state=i.__s,i.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),j=0;j<i._sb.length;j++)i.__h.push(i._sb[j]);i._sb=[],i.__h.length&&a.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,x),m&&i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(c,g,b)})}if(i.context=x,i.props=h,i.__P=t,i.__e=!1,N=d.__r,le=0,m){for(i.state=i.__s,i.__d=!1,N&&N(e),f=i.render(i.props,i.state,i.context),B=0;B<i._sb.length;B++)i.__h.push(i._sb[B]);i._sb=[]}else do i.__d=!1,N&&N(e),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++le<25);i.state=i.__s,i.getChildContext!=null&&(r=C(C({},r),i.getChildContext())),m&&!p&&i.getSnapshotBeforeUpdate!=null&&(b=i.getSnapshotBeforeUpdate(c,g)),u=Se(t,Y(q=f!=null&&f.type===F&&f.key==null?f.props.children:f)?q:[q],e,n,r,_,o,a,u,l,s),i.base=e.__e,e.__u&=-161,i.__h.length&&a.push(i),w&&(i.__E=i.__=null)}catch(T){if(e.__v=null,l||o!=null)if(T.then){for(e.__u|=l?160:128;u&&u.nodeType===8&&u.nextSibling;)u=u.nextSibling;o[o.indexOf(u)]=null,e.__e=u}else for(z=o.length;z--;)ee(o[z]);else e.__e=n.__e,e.__k=n.__k;d.__e(T,e,n)}else o==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):u=e.__e=_t(n.__e,e,n,r,_,o,a,l,s);return(f=d.diffed)&&f(e),128&e.__u?void 0:u}function Fe(t,e,n){for(var r=0;r<n.length;r++)ne(n[r],n[++r],n[++r]);d.__c&&d.__c(e,t),t.some(function(_){try{t=_.__h,_.__h=[],t.some(function(o){o.call(_)})}catch(o){d.__e(o,_.__v)}})}function _t(t,e,n,r,_,o,a,u,l){var s,f,i,p,c,g,b,w=n.props,h=e.props,m=e.type;if(m==="svg"?_="http://www.w3.org/2000/svg":m==="math"?_="http://www.w3.org/1998/Math/MathML":_||(_="http://www.w3.org/1999/xhtml"),o!=null){for(s=0;s<o.length;s++)if((c=o[s])&&"setAttribute"in c==!!m&&(m?c.localName===m:c.nodeType===3)){t=c,o[s]=null;break}}if(t==null){if(m===null)return document.createTextNode(h);t=document.createElementNS(_,m,h.is&&h),u&&(d.__m&&d.__m(e,o),u=!1),o=null}if(m===null)w===h||u&&t.data===h||(t.data=h);else{if(o=o&&L.call(t.childNodes),w=n.props||A,!u&&o!=null)for(w={},s=0;s<t.attributes.length;s++)w[(c=t.attributes[s]).name]=c.value;for(s in w)if(c=w[s],s!="children"){if(s=="dangerouslySetInnerHTML")i=c;else if(!(s in h)){if(s=="value"&&"defaultValue"in h||s=="checked"&&"defaultChecked"in h)continue;R(t,s,null,c,_)}}for(s in h)c=h[s],s=="children"?p=c:s=="dangerouslySetInnerHTML"?f=c:s=="value"?g=c:s=="checked"?b=c:u&&typeof c!="function"||w[s]===c||R(t,s,c,w[s],_);if(f)u||i&&(f.__html===i.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(i&&(t.innerHTML=""),Se(t,Y(p)?p:[p],e,n,r,m==="foreignObject"?"http://www.w3.org/1999/xhtml":_,o,a,o?o[0]:n.__k&&H(n,0),u,l),o!=null)for(s=o.length;s--;)ee(o[s]);u||(s="value",m==="progress"&&g==null?t.removeAttribute("value"):g!==void 0&&(g!==t[s]||m==="progress"&&!g||m==="option"&&g!==w[s])&&R(t,s,g,w[s],_),s="checked",b!==void 0&&b!==t[s]&&R(t,s,b,w[s],_))}return t}function ne(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(_){d.__e(_,n)}}function He(t,e,n){var r,_;if(d.unmount&&d.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ne(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){d.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(_=0;_<r.length;_++)r[_]&&He(r[_],e,n||typeof t.type!="function");n||ee(t.__e),t.__c=t.__=t.__e=void 0}function it(t,e,n){return this.constructor(t,n)}function U(t,e,n){var r,_,o,a;e===document&&(e=document.documentElement),d.__&&d.__(t,e),_=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],a=[],te(e,t=(!r&&n||e).__k=E(F,null,[t]),_||A,A,e.namespaceURI,!r&&n?[n]:_?null:e.firstChild?L.call(e.childNodes):null,o,!r&&n?n:_?_.__e:e.firstChild,r,a),Fe(o,t,a)}function re(t,e){U(t,e,re)}function oe(t,e,n){var r,_,o,a,u=C({},t.props);for(o in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?_=e[o]:u[o]=e[o]===void 0&&a!==void 0?a[o]:e[o];return arguments.length>2&&(u.children=arguments.length>3?L.call(arguments,2):n),D(t.type,u,r||t.key,_||t.ref,null)}L=Ce.slice,d={__e:function(t,e,n,r){for(var _,o,a;e=e.__;)if((_=e.__c)&&!_.__)try{if((o=_.constructor)&&o.getDerivedStateFromError!=null&&(_.setState(o.getDerivedStateFromError(t)),a=_.__d),_.componentDidCatch!=null&&(_.componentDidCatch(t,r||{}),a=_.__d),a)return _.__E=_}catch(u){t=u}throw t}},we=0,et=function(t){return t!=null&&t.constructor==null},O.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof t=="function"&&(t=t(C({},n),this.props)),t&&C(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ve(this))},O.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ve(this))},O.prototype.render=F,S=[],be=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,J=function(t,e){return t.__v.__b-e.__v.__b},I.__r=0,ke=/(PointerCapture)$|Capture$/i,X=0,Z=ge(!1),Q=ge(!0),tt=0;function _e(){return(_e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var at=["context","children"];function ut(t){this.getChildContext=function(){return t.context};var e=t.children,n=function(r,_){if(r==null)return{};var o,a,u={},l=Object.keys(r);for(a=0;a<l.length;a++)_.indexOf(o=l[a])>=0||(u[o]=r[o]);return u}(t,at);return oe(e,n)}function lt(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=E(ut,_e({},this._props,{context:t.detail.context}),function e(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var _=[],o={},a=0,u=n.attributes,l=n.childNodes;for(a=u.length;a--;)u[a].name!=="slot"&&(o[u[a].name]=u[a].value,o[Ne(u[a].name)]=u[a].value);for(a=l.length;a--;){var s=e(l[a],null),f=l[a].slot;f?o[f]=E(Pe,{name:f},s):_[a]=s}var i=r?E(Pe,null,_):_;return E(r||n.nodeName.toLowerCase(),o,i)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?re:U)(this._vdom,this._root)}function Ne(t){return t.replace(/-(\w)/g,function(e,n){return n?n.toUpperCase():""})}function st(t,e,n){if(this._vdom){var r={};r[t]=n=n??void 0,r[Ne(t)]=n,this._vdom=oe(this._vdom,r),U(this._vdom,this._root)}}function ct(){U(this._vdom=null,this._root)}function Pe(t,e){var n=this;return E("slot",_e({},t,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(_){_.stopPropagation(),_.detail.context=e},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Te(t,e,n,r){function _(){var o=Reflect.construct(HTMLElement,[],_);return o._vdomComponent=t,o._root=r&&r.shadow?o.attachShadow({mode:r.mode||"open"}):o,o}return(_.prototype=Object.create(HTMLElement.prototype)).constructor=_,_.prototype.connectedCallback=lt,_.prototype.attributeChangedCallback=st,_.prototype.disconnectedCallback=ct,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),_.observedAttributes=n,n.forEach(function(o){Object.defineProperty(_.prototype,o,{get:function(){return this._vdom.props[o]},set:function(a){this._vdom?this.attributeChangedCallback(o,null,a):(this._props||(this._props={}),this._props[o]=a,this.connectedCallback());var u=typeof a;a!=null&&u!=="string"&&u!=="boolean"&&u!=="number"||this.setAttribute(o,a)}})}),customElements.define(e||t.tagName||t.displayName||t.name,_)}var M,v,ie,De,$=0,Oe=[],y=d,Ae=y.__b,Le=y.__r,Ue=y.diffed,Me=y.__c,je=y.unmount,Be=y.__;function ue(t,e){y.__h&&y.__h(v,t,$||e),$=0;var n=v.__H||(v.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ie(t){return $=1,ft(qe,t)}function ft(t,e,n){var r=ue(M++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):qe(void 0,e),function(u){var l=r.__N?r.__N[0]:r.__[0],s=r.t(l,u);l!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=v,!v.u)){var _=function(u,l,s){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,u,l,s);var i=r.__c.props!==u;return f.forEach(function(p){if(p.__N){var c=p.__[0];p.__=p.__N,p.__N=void 0,c!==p.__[0]&&(i=!0)}}),o&&o.call(this,u,l,s)||i};v.u=!0;var o=v.shouldComponentUpdate,a=v.componentWillUpdate;v.componentWillUpdate=function(u,l,s){if(this.__e){var f=o;o=void 0,_(u,l,s),o=f}a&&a.call(this,u,l,s)},v.shouldComponentUpdate=_}return r.__N||r.__}function We(t,e){var n=ue(M++,3);!y.__s&&Ve(n.__H,e)&&(n.__=t,n.i=e,v.__H.__h.push(n))}function pt(t,e){var n=ue(M++,7);return Ve(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function $e(t,e){return $=8,pt(function(){return t},e)}function dt(){for(var t;t=Oe.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(W),t.__H.__h.forEach(ae),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){v=null,Ae&&Ae(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Be&&Be(t,e)},y.__r=function(t){Le&&Le(t),M=0;var e=(v=t.__c).__H;e&&(ie===v?(e.__h=[],v.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(W),e.__h.forEach(ae),e.__h=[],M=0)),ie=v},y.diffed=function(t){Ue&&Ue(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Oe.push(e)!==1&&De===y.requestAnimationFrame||((De=y.requestAnimationFrame)||ht)(dt)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),ie=v=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(W),n.__h=n.__h.filter(function(r){return!r.__||ae(r)})}catch(r){e.some(function(_){_.__h&&(_.__h=[])}),e=[],y.__e(r,n.__v)}}),Me&&Me(t,e)},y.unmount=function(t){je&&je(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{W(r)}catch(_){e=_}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Re=typeof requestAnimationFrame=="function";function ht(t){var e,n=function(){clearTimeout(r),Re&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Re&&(e=requestAnimationFrame(n))}function W(t){var e=v,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),v=e}function ae(t){var e=v;t.__c=t.__(),v=e}function Ve(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function qe(t,e){return typeof e=="function"?e(t):e}var mt=0,Nt=Array.isArray;function ze(t,e,n,r,_,o){e||(e={});var a,u,l=e;"ref"in e&&(a=e.ref,delete e.ref);var s={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--mt,__i:-1,__u:0,__source:_,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(u in a)l[u]===void 0&&(l[u]=a[u]);return d.vnode&&d.vnode(s),s}function vt(){if(!window.FrakSetup.modalShareConfig){console.error("window.FrakSetup.modalShareConfig not found");return}window.FrakSetup.modalBuilderSteps.sharing(window.FrakSetup.modalShareConfig).display()}function V({text:t="Share and earn!",classname:e=""}){let[n,r]=Ie(!0),_=$e(()=>{r(!1)},[]);return We(()=>(G("add",_),()=>G("remove",_)),[_]),ze("button",{type:"button",class:e,disabled:n,onClick:vt,children:t})}customElements.get("frak-button-share")||Te(V,"frak-button-share",["text"],{shadow:!1});var yt=se("frak-sdk","https://cdn.jsdelivr.net/npm/@frak-labs/nexus-sdk@latest/dist/bundle/bundle.js");ce(async function(){await yt;let e=await pe();if(!e){console.error("Failed to create Frak client");return}de(e),he(e)});return Xe(gt);})();
|