@frak-labs/components 0.0.11 → 0.0.12
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 +17 -2
- package/cdn/364.js +2 -2
- package/cdn/413.js +1 -1
- package/cdn/button-share.js +1 -1
- package/cdn/button-wallet.js +1 -1
- package/cdn/loader.js +1 -1
- package/dist/buttonShare.js +1 -1
- package/dist/buttonWallet.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ They are built as [Web Components](https://developer.mozilla.org/en-US/docs/Web/
|
|
|
7
7
|
Checkout our documentation for more information's about the usage:
|
|
8
8
|
- [Components](https://docs.frak.id/components)
|
|
9
9
|
- [Share Button usage](https://docs.frak.id/components/share-button)
|
|
10
|
+
- [Wallet Button usage](https://docs.frak.id/components/wallet-button)
|
|
10
11
|
|
|
11
12
|
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)
|
|
12
13
|
|
|
@@ -15,7 +16,7 @@ To have more info about how does it works under the hood, you can check [this](h
|
|
|
15
16
|
Add the following script tag to your HTML file:
|
|
16
17
|
|
|
17
18
|
```html
|
|
18
|
-
<script src="https://cdn.jsdelivr.net/npm/@frak-labs/components" defer="defer"></script>
|
|
19
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@frak-labs/components" defer="defer"></script>
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
## Quick start
|
|
@@ -32,7 +33,7 @@ window.FrakSetup = {
|
|
|
32
33
|
};
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
## Sample usage
|
|
36
|
+
## Sample usage for Share button
|
|
36
37
|
|
|
37
38
|
Sample code to use share button:
|
|
38
39
|
|
|
@@ -51,3 +52,17 @@ Button with custom class:
|
|
|
51
52
|
```html
|
|
52
53
|
<frak-button-share classname="button button-primary"></frak-button-share>
|
|
53
54
|
```
|
|
55
|
+
|
|
56
|
+
## Sample usage for Wallet button
|
|
57
|
+
|
|
58
|
+
Sample code to use wallet button:
|
|
59
|
+
|
|
60
|
+
```html
|
|
61
|
+
<frak-button-wallet></frak-button-wallet>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Button with custom class:
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<frak-button-wallet classname="button button-primary"></frak-button-wallet>
|
|
68
|
+
```
|
package/cdn/364.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const ids=["364"];export const modules={"./src/hooks/useClientReady.ts":function(e,t,n){n.d(t,{t:()=>o});var r=n("./src/utils/clientReady.ts"),a=n("../../node_modules/preact/hooks/dist/hooks.module.js");function o(){let[e,t]=(0,a.eJ)(!0),n=(0,a.I4)(()=>{t(!1)},[]);return(0,a.d4)(()=>((0,r.D)("add",n),()=>(0,r.D)("remove",n)),[n]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,n){n.d(t,{w:()=>i});var r=n("../core/dist/actions.js");async function a(e){let t=window.FrakSetup?.client;if(!t){console.warn("Frak client not ready yet");return}let n=await (0,r.pO)(t);if(!n?.estimatedEurReward)return;let a=n.estimatedEurReward;if(e){let t=n.rewards.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer.eurAmount).reduce((e,t)=>t>e?t:e,0);t>0&&(a=Math.ceil(t).toString())}return a}var o=n("../../node_modules/preact/hooks/dist/hooks.module.js");function i(e,t){let[n,r]=(0,o.eJ)(void 0);return(0,o.d4)(()=>{e&&a(t).then(e=>{e&&r(`${e}€`)})},[e,t]),{reward:n}}},"./src/utils/clientReady.ts":function(e,t,n){n.d(t,{D:()=>o,f:()=>a});let r="frakClientReady";function a(){let e=new CustomEvent(r);window.dispatchEvent(e)}function o(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(r,t,!1)}},"./src/utils/registerWebComponent.ts":function(e,t,n){n.d(t,{A:()=>l});var r=n("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),a=n("../core/dist/index.js"),o=n("./src/utils/clientReady.ts"),i=n("./src/utils/setup.ts");async function s(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0;let e=await (0,a.lD)({config:{...window.FrakSetup.config,metadata:{name:"Frak SDK"}}});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),(0,o.f)(),(0,i.N3)(e),(0,i.zK)(e),window.frakSetupInProgress=!1}function l(e,t,n=[],a={shadow:!1}){if("undefined"!=typeof window){var o;o=async function(){await s()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(o,1):document.addEventListener?document.addEventListener("DOMContentLoaded",o):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&o()}),customElements.get(t)||(0,r.Z)(e,t,n,a)}}},"./src/utils/setup.ts":function(e,t,n){n.d(t,{Gt:()=>i,N3:()=>a,zK:()=>o});var r=n("../core/dist/actions.js");function a(e){window.modalBuilderSteps=(0,r.jy)(e,window.FrakSetup?.modalConfig??{})}async function o(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,r.KS)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}function i(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}},"?2fd0":function(){},"?81fa":function(){},"../core/dist/actions.js":function(e,t,n){n.d(t,{Hq:()=>u,KS:()=>E,jy:()=>w,pO:()=>f});var r=n("../../node_modules/viem/_esm/utils/hash/keccak256.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toHex.js"),o=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),i=n("../../node_modules/viem/_esm/utils/data/concat.js"),s=n("../../node_modules/viem/_esm/utils/data/pad.js"),l=n("../../node_modules/viem/_esm/utils/address/isAddressEqual.js");async function c(e,{productId:t,interaction:n,validation:o}){let i=t??function({domain:e}){let t=e??window.location.host;return(0,r.w)((0,a.NC)(t))}(e.config);return await e.request({method:"frak_sendInteraction",params:[i,n,o]})}async function d(e,{steps:t,metadata:n}){return await e.request({method:"frak_displayModal",params:[t,e.config.metadata.name,n]})}async function u(e,t){await e.request({method:"frak_displayEmbededWallet",params:[t,e.config.metadata.name]})}async function f(e){return await e.request({method:"frak_getProductInformation"})}function w(e,{metadata:t,login:n,openSession:r}){return function e(t,n){async function r(e){return e&&(n.metadata=e(n.metadata??{})),await d(t,n)}return{params:n,sendTx:function(r){return e(t,{...n,steps:{...n.steps,sendTransaction:r}})},reward:function(r){return e(t,{...n,steps:{...n.steps,final:{...r,action:{key:"reward"}}}})},sharing:function(r,a){return e(t,{...n,steps:{...n.steps,final:{...a,action:{key:"sharing",options:r}}}})},display:r}}(e,{steps:{login:n??{},openSession:r??{}},metadata:t})}let m="fCtx";function p({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(m);return t?function(e){if(e&&0!==e.length)try{let t;let n=(t=e.length%4,Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(0===t?0:4-t),"=")),e=>e.charCodeAt(0)));return{r:(0,a.ci)(n,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}(t):null}let g={parse:p,replaceUrl:function({url:e,context:t}){let n,r;if(!window.location?.href||"undefined"==typeof window){console.error("No window found, can't update context");return}let a=e??window.location.href;(n=null!==t?function({url:e,context:t}){if(!e)return null;let n=p({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let a=function(e){if(e?.r)try{var t;return t=(0,o.nr)(e.r),btoa(Array.from(t,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}(r);if(!a)return null;let i=new URL(e);return i.searchParams.set(m,a),i.toString()}({url:a,context:t}):((r=new URL(a)).searchParams.delete(m),r.toString()))&&window.history.replaceState(null,"",n.toString())}},h={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31};Object.entries(h).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{});let y={createLink:()=>({handlerTypeDenominator:(0,a.NC)(h.referral),interactionData:"0xb2c0f17c"}),referred({referrer:e}){let t=(0,i.SM)(["0x010cc3b9",(0,s.vk)(e,{size:32})]);return{handlerTypeDenominator:(0,a.NC)(h.referral),interactionData:t}}};class v extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}let S={walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};async function k(e,{walletStatus:t,frakContext:n,modalConfig:r,productId:a,options:o}){let i=!1;async function s(){if(!i)return i=!0,b(e,{modalConfig:r,walletStatus:t})}async function l(t){let n=y.referred({referrer:t});await c(e,{productId:a,interaction:n})}try{let{status:e,currentWallet:r}=await C({initialWalletStatus:t,getFreshWalletStatus:s,pushReferralInteraction:l,frakContext:n});return g.replaceUrl({url:window.location?.href,context:o?.alwaysAppendUrl?{r:r}:null}),e}catch(e){return console.log("Error processing referral",{error:e}),g.replaceUrl({url:window.location?.href,context:o?.alwaysAppendUrl?{r:t?.wallet}:null}),function(e){if(e instanceof v)switch(e.code){case S.walletNotConnected:return"no-wallet";case S.serverErrorForInteractionDelegation:return"no-session"}return"error"}(e)}}async function C({initialWalletStatus:e,getFreshWalletStatus:t,pushReferralInteraction:n,frakContext:r}){let a=e?.wallet;return r?.r?(a||(a=await t()),a&&(0,l.E)(r.r,a))?{status:"self-referral",currentWallet:a}:(e?.interactionSession||(a=await t()),await n(r.r),{status:"success",currentWallet:a}):{status:"no-referrer",currentWallet:a}}async function b(e,{modalConfig:t,walletStatus:n}){if(!n?.interactionSession){if(!t)return;let n=await d(e,t);return n?.login?.wallet??void 0}return n.wallet??void 0}async function E(e,{productId:t,modalConfig:n,options:r}={}){var a;let o=g.parse({url:window.location.href}),i=await e.request({method:"frak_listenToWalletStatus"}).then(e=>{var t;return t=e.interactionToken,"undefined"!=typeof window&&(t?window.sessionStorage.setItem("frak-wallet-interaction-token",t):window.sessionStorage.removeItem("frak.interaction-token")),e});try{return await k(e,{walletStatus:i,frakContext:o,modalConfig:n,productId:t,options:r})}catch(e){console.warn("Error processing referral",{error:e})}}},"../core/dist/index.js":function(e,t,n){n.d(t,{lD:()=>y,oC:()=>l,ss:()=>s,u:()=>o});var r=n("../../node_modules/async-lz-string/libs/async-lz-string.js"),a=n("../../node_modules/js-sha256/src/sha256.js");class o extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}class i extends o{constructor(e){super(s.internalError,e)}}let s={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};class l{config;iframe;isSetupDone=!1;lastResponse=null;lastRequest=null;constructor(e,t){this.config=e,this.iframe=t,this.lastRequest=null,this.lastResponse=null}setLastResponse(e){this.lastResponse={event:e.data,origin:e.origin,timestamp:Date.now()}}setLastRequest(e,t){this.lastRequest={event:e,target:t,timestamp:Date.now()}}updateSetupStatus(e){this.isSetupDone=e}base64Encode(e){try{return btoa(JSON.stringify(e))}catch(e){return console.warn("Failed to encode debug data",e),btoa("Failed to encode data")}}getIframeStatus(){return this.iframe?{loading:this.iframe.hasAttribute("loading"),url:this.iframe.src,readyState:this.iframe.contentDocument?.readyState?+("complete"===this.iframe.contentDocument.readyState):-1,contentWindow:!!this.iframe.contentWindow,isConnected:this.iframe.isConnected}:null}getNavigatorInfo(){return navigator?{userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio}:null}gatherDebugInfo(e){let t=this.getIframeStatus(),n=this.getNavigatorInfo(),r="Unknown";return e instanceof o?r=`FrakRpcError: ${e.code} '${e.message}'`:e instanceof Error?r=e.message:"string"==typeof e&&(r=e),{timestamp:new Date().toISOString(),encodedUrl:btoa(window.location.href),encodedConfig:this.config?this.base64Encode(this.config):"no-config",navigatorInfo:n?this.base64Encode(n):"no-navigator",iframeStatus:t?this.base64Encode(t):"not-iframe",lastRequest:this.lastRequest?this.base64Encode(this.lastRequest):"No Frak request logged",lastResponse:this.lastResponse?this.base64Encode(this.lastResponse):"No Frak response logged",clientStatus:this.isSetupDone?"setup":"not-setup",error:r}}static empty(){return new l}formatDebugInfo(e){let t=this.gatherDebugInfo(e);return`
|
|
1
|
+
export const __webpack_ids__=["364"];export const __webpack_modules__={"./src/hooks/useClientReady.ts":function(e,t,n){n.d(t,{t:()=>o});var r=n("./src/utils/clientReady.ts"),a=n("../../node_modules/preact/hooks/dist/hooks.module.js");function o(){let[e,t]=(0,a.eJ)(!0),n=(0,a.I4)(()=>{t(!1)},[]);return(0,a.d4)(()=>((0,r.D)("add",n),()=>(0,r.D)("remove",n)),[n]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,n){n.d(t,{w:()=>s});var r=n("../core/dist/index.js"),a=n("../core/dist/actions.js");async function o({targetInteraction:e}){let t=window.FrakSetup?.client;if(!t){console.warn("Frak client not ready yet");return}let{maxReferrer:n,rewards:o}=await (0,a.pO)(t);if(!n)return;let i=(0,r.Up)(t.config.metadata?.currency),s=Math.ceil(n[i]);if(e){let t=o.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(s=Math.ceil(t))}return(0,r.dN)(s,t.config.metadata?.currency)}var i=n("../../node_modules/preact/hooks/dist/hooks.module.js");function s(e,t){let[n,r]=(0,i.eJ)(void 0);return(0,i.d4)(()=>{e&&o({targetInteraction:t}).then(e=>{e&&r(e)})},[e,t]),{reward:n}}},"./src/utils/clientReady.ts":function(e,t,n){n.d(t,{D:()=>o,f:()=>a});let r="frakClientReady";function a(){let e=new CustomEvent(r);window.dispatchEvent(e)}function o(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(r,t,!1)}},"./src/utils/registerWebComponent.ts":function(e,t,n){n.d(t,{A:()=>c});var r=n("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),a=n("../core/dist/index.js"),o=n("./src/utils/clientReady.ts"),i=n("./src/utils/setup.ts");async function s(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,a.lD)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),(0,o.f)(),(0,i.N3)(e),(0,i.zK)(e),window.frakSetupInProgress=!1}function c(e,t,n=[],a={shadow:!1}){if("undefined"!=typeof window){var o;o=async function(){await s()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(o,1):document.addEventListener?document.addEventListener("DOMContentLoaded",o):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&o()}),customElements.get(t)||(0,r.Z)(e,t,n,a)}}},"./src/utils/setup.ts":function(e,t,n){n.d(t,{Gt:()=>i,N3:()=>a,zK:()=>o});var r=n("../core/dist/actions.js");function a(e){window.modalBuilderSteps=(0,r.jy)(e,window.FrakSetup?.modalConfig??{})}async function o(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,r.KS)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}function i(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}},"?2fd0":function(){},"?81fa":function(){},"../core/dist/actions.js":function(e,t,n){n.d(t,{Hq:()=>u,KS:()=>I,jy:()=>w,pO:()=>f});var r=n("../../node_modules/viem/_esm/utils/hash/keccak256.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toHex.js"),o=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),i=n("../../node_modules/viem/_esm/utils/data/concat.js"),s=n("../../node_modules/viem/_esm/utils/data/pad.js"),c=n("../../node_modules/viem/_esm/utils/address/isAddressEqual.js");async function l(e,{productId:t,interaction:n,validation:o}){let i=t??function({domain:e}){let t=e??window.location.host;return(0,r.w)((0,a.NC)(t))}(e.config);return await e.request({method:"frak_sendInteraction",params:[i,n,o]})}async function d(e,{steps:t,metadata:n}){return await e.request({method:"frak_displayModal",params:[t,{...n,...e.config.metadata}]})}async function u(e,t){await e.request({method:"frak_displayEmbededWallet",params:[t,e.config.metadata]})}async function f(e){return await e.request({method:"frak_getProductInformation"})}function w(e,{metadata:t,login:n,openSession:r}){return function e(t,n){async function r(e){return e&&(n.metadata=e(n.metadata??{})),await d(t,n)}return{params:n,sendTx:function(r){return e(t,{...n,steps:{...n.steps,sendTransaction:r}})},reward:function(r){return e(t,{...n,steps:{...n.steps,final:{...r,action:{key:"reward"}}}})},sharing:function(r,a){return e(t,{...n,steps:{...n.steps,final:{...a,action:{key:"sharing",options:r}}}})},display:r}}(e,{steps:{login:n??{},openSession:r??{}},metadata:t})}let m="fCtx";function p({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(m);return t?function(e){if(e&&0!==e.length)try{let t;let n=(t=e.length%4,Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(0===t?0:4-t),"=")),e=>e.charCodeAt(0)));return{r:(0,a.ci)(n,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}(t):null}let g={parse:p,replaceUrl:function({url:e,context:t}){let n,r;if(!window.location?.href||"undefined"==typeof window){console.error("No window found, can't update context");return}let a=e??window.location.href;(n=null!==t?function({url:e,context:t}){if(!e)return null;let n=p({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let a=function(e){if(e?.r)try{var t;return t=(0,o.nr)(e.r),btoa(Array.from(t,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}(r);if(!a)return null;let i=new URL(e);return i.searchParams.set(m,a),i.toString()}({url:a,context:t}):((r=new URL(a)).searchParams.delete(m),r.toString()))&&window.history.replaceState(null,"",n.toString())}},h={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31};Object.entries(h).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{});let y={createLink:()=>({handlerTypeDenominator:(0,a.NC)(h.referral),interactionData:"0xb2c0f17c"}),referred({referrer:e}){let t=(0,i.SM)(["0x010cc3b9",(0,s.vk)(e,{size:32})]);return{handlerTypeDenominator:(0,a.NC)(h.referral),interactionData:t}}};class v extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}let S={walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};async function k(e,{walletStatus:t,frakContext:n,modalConfig:r,productId:a,options:o}){let i=!1;async function s(){if(!i)return i=!0,C(e,{modalConfig:r,walletStatus:t})}async function c(t){let n=y.referred({referrer:t});await l(e,{productId:a,interaction:n})}try{let{status:e,currentWallet:r}=await b({initialWalletStatus:t,getFreshWalletStatus:s,pushReferralInteraction:c,frakContext:n});return g.replaceUrl({url:window.location?.href,context:o?.alwaysAppendUrl?{r:r}:null}),e}catch(e){return console.log("Error processing referral",{error:e}),g.replaceUrl({url:window.location?.href,context:o?.alwaysAppendUrl?{r:t?.wallet}:null}),function(e){if(e instanceof v)switch(e.code){case S.walletNotConnected:return"no-wallet";case S.serverErrorForInteractionDelegation:return"no-session"}return"error"}(e)}}async function b({initialWalletStatus:e,getFreshWalletStatus:t,pushReferralInteraction:n,frakContext:r}){let a=e?.wallet;return r?.r?(a||(a=await t()),a&&(0,c.E)(r.r,a))?{status:"self-referral",currentWallet:a}:(e?.interactionSession||(a=await t()),await n(r.r),{status:"success",currentWallet:a}):{status:"no-referrer",currentWallet:a}}async function C(e,{modalConfig:t,walletStatus:n}){if(!n?.interactionSession){if(!t)return;let n=await d(e,t);return n?.login?.wallet??void 0}return n.wallet??void 0}async function I(e,{productId:t,modalConfig:n,options:r}={}){var a;let o=g.parse({url:window.location.href}),i=await e.request({method:"frak_listenToWalletStatus"}).then(e=>{var t;return t=e.interactionToken,"undefined"!=typeof window&&(t?window.sessionStorage.setItem("frak-wallet-interaction-token",t):window.sessionStorage.removeItem("frak.interaction-token")),e});try{return await k(e,{walletStatus:i,frakContext:o,modalConfig:n,productId:t,options:r})}catch(e){console.warn("Error processing referral",{error:e})}}},"../core/dist/index.js":function(e,t,n){n.d(t,{Up:()=>b,dN:()=>k,lD:()=>S,oC:()=>c,ss:()=>s,u:()=>o});var r=n("../../node_modules/async-lz-string/libs/async-lz-string.js"),a=n("../../node_modules/js-sha256/src/sha256.js");class o extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}class i extends o{constructor(e){super(s.internalError,e)}}let s={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};class c{config;iframe;isSetupDone=!1;lastResponse=null;lastRequest=null;constructor(e,t){this.config=e,this.iframe=t,this.lastRequest=null,this.lastResponse=null}setLastResponse(e){this.lastResponse={event:e.data,origin:e.origin,timestamp:Date.now()}}setLastRequest(e,t){this.lastRequest={event:e,target:t,timestamp:Date.now()}}updateSetupStatus(e){this.isSetupDone=e}base64Encode(e){try{return btoa(JSON.stringify(e))}catch(e){return console.warn("Failed to encode debug data",e),btoa("Failed to encode data")}}getIframeStatus(){return this.iframe?{loading:this.iframe.hasAttribute("loading"),url:this.iframe.src,readyState:this.iframe.contentDocument?.readyState?+("complete"===this.iframe.contentDocument.readyState):-1,contentWindow:!!this.iframe.contentWindow,isConnected:this.iframe.isConnected}:null}getNavigatorInfo(){return navigator?{userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio}:null}gatherDebugInfo(e){let t=this.getIframeStatus(),n=this.getNavigatorInfo(),r="Unknown";return e instanceof o?r=`FrakRpcError: ${e.code} '${e.message}'`:e instanceof Error?r=e.message:"string"==typeof e&&(r=e),{timestamp:new Date().toISOString(),encodedUrl:btoa(window.location.href),encodedConfig:this.config?this.base64Encode(this.config):"no-config",navigatorInfo:n?this.base64Encode(n):"no-navigator",iframeStatus:t?this.base64Encode(t):"not-iframe",lastRequest:this.lastRequest?this.base64Encode(this.lastRequest):"No Frak request logged",lastResponse:this.lastResponse?this.base64Encode(this.lastResponse):"No Frak response logged",clientStatus:this.isSetupDone?"setup":"not-setup",error:r}}static empty(){return new c}formatDebugInfo(e){let t=this.gatherDebugInfo(e);return`
|
|
2
2
|
Debug Information:
|
|
3
3
|
-----------------
|
|
4
4
|
Timestamp: ${t.timestamp}
|
|
@@ -10,4 +10,4 @@ export const ids=["364"];export const modules={"./src/hooks/useClientReady.ts":f
|
|
|
10
10
|
Last Response: ${t.lastResponse}
|
|
11
11
|
Client Status: ${t.clientStatus}
|
|
12
12
|
Error: ${t.error}
|
|
13
|
-
`.trim()}}class
|
|
13
|
+
`.trim()}}class l{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve=e=>{this._resolve?.(e)};reject=e=>{this._reject?.(e)}}async function d(e){if(!(e?.compressed&&e?.compressedHash))throw new o(s.corruptedResponse,"Missing compressed data");let t=await u(e.compressed);if(!t)throw new o(s.corruptedResponse,"Invalid compressed data");if(!t?.validationHash)throw new o(s.corruptedResponse,"Missing validation hash");if((0,a.sha256)(e.compressed)!==e.compressedHash)throw new o(s.corruptedResponse,"Invalid compressed hash");let{validationHash:n,...r}=t;if((0,a.sha256)(JSON.stringify(r))!==t.validationHash)throw new o(s.corruptedResponse,"Invalid data validation hash");return t}async function u(e){let t=await (0,r.decompressFromBase64)(e);try{return JSON.parse(t)}catch(e){return console.error("Invalid compressed data",{e,decompressed:t}),null}}async function f(e){let t=(0,a.sha256)(JSON.stringify(e)),n={...e,validationHash:t},r=await w(n),o=(0,a.sha256)(r);return{compressed:r,compressedHash:o}}async function w(e){return(0,r.compressToBase64)(JSON.stringify(e))}let m="nexus-wallet-backup",p=2000001;function g({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"}async function h({config:e,messageHandler:t,lifecycleManager:n}){await n.isConnected;let r=async()=>{let n=e.metadata.css;n&&t.sendEvent({clientLifecycle:"modal-css",data:{cssLink:n}})},a=async()=>{if("undefined"==typeof window)return;let e=window.localStorage.getItem(m);e&&t.sendEvent({clientLifecycle:"restore-backup",data:{backup:e}})};await Promise.all([r(),a()])}let y={eur:"fr-FR",usd:"en-US",gbp:"en-GB"};function v(e){return e&&e in y?e:"eur"}async function S({config:e}){let t;let n=(t=v(e.metadata?.currency),{...e,metadata:{...e.metadata,currency:t}}),r=await function({walletBaseUrl:e,config:t}){let n=document.querySelector("#nexus-wallet");n&&n.remove();let r=document.createElement("iframe");return r.id="nexus-wallet",r.name="nexus-wallet",r.allow="publickey-credentials-get *; clipboard-write; web-share *",r.style.zIndex=p.toString(),g({iframe:r,isVisible:!1}),document.body.appendChild(r),new Promise(n=>{r?.addEventListener("load",()=>n(r)),r.src=`${t?.walletUrl??e??"https://wallet.frak.id"}/listener`})}({config:n});if(!r){console.error("Failed to create iframe");return}let a=function({config:e,iframe:t}){let n;let r=(n=new Map,{createChannel:e=>{let t=Math.random().toString(36).substring(7);return n.set(t,e),t},getRpcResolver:e=>n.get(e),removeChannel:e=>n.delete(e),destroy:()=>n.clear()}),a=function({iframe:e}){let t=new l;return{handleEvent:async n=>{switch(n.iframeLifecycle){case"connected":t.resolve(!0);break;case"do-backup":n.data.backup?localStorage.setItem(m,n.data.backup):localStorage.removeItem(m);break;case"remove-backup":localStorage.removeItem(m);break;case"show":case"hide":g({iframe:e,isVisible:"show"===n.iframeLifecycle});break;case"handshake":e.contentWindow?.postMessage({clientLifecycle:"handshake-response",data:{token:n.data.token,currentUrl:window.location.href}},"*")}},isConnected:t.promise}}({iframe:t}),u=new c(e,t),w=function({frakWalletUrl:e,iframe:t,channelManager:n,iframeLifecycleManager:r,debugInfo:a}){if("undefined"==typeof window)throw new o(s.configError,"iframe client should be used in the browser");if(!t.contentWindow)throw new o(s.configError,"The iframe does not have a product window");let i=t.contentWindow;async function c(t){if(!t.origin)return;try{if(new URL(t.origin).origin.toLowerCase()!==new URL(e).origin.toLowerCase())return}catch(e){console.log("Unable to check frak msg origin",e);return}if("object"!=typeof t.data)return;if(a.setLastResponse(t),"iframeLifecycle"in t.data){await r.handleEvent(t.data);return}if("clientLifecycle"in t.data){console.error("Client lifecycle event received on the client side, dismissing it");return}let o=t.data.id,i=n.getRpcResolver(o);i&&await i(t.data)}return window.addEventListener("message",c),{sendEvent:function(t){i.postMessage(t,{targetOrigin:e}),a.setLastRequest(t,e)},cleanup:function(){window.removeEventListener("message",c)}}}({frakWalletUrl:e?.walletUrl??"https://wallet.frak.id",iframe:t,channelManager:r,iframeLifecycleManager:a,debugInfo:u}),p=async e=>{if(!await a.isConnected)throw new o(s.clientNotConnected,"The iframe provider isn't connected yet");let t=new l,n=r.createChannel(async e=>{let a=await d(e.data);a.error?t.reject(new o(a.error.code,a.error.message,a.error?.data)):t.resolve(a.result),r.removeChannel(n)}),i=await f(e);return w.sendEvent({id:n,topic:e.method,data:i}),t.promise},y=async(e,t)=>{if(!await a.isConnected)throw new o(s.clientNotConnected,"The iframe provider isn't connected yet");let n=r.createChannel(async e=>{let n=await d(e.data);if(n.result)t(n.result);else throw new i("No valid result in the response")}),c=await f(e);w.sendEvent({id:n,topic:e.method,data:c})},v=function(e,t){let n,r;let a=()=>e.sendEvent({clientLifecycle:"heartbeat"});function o(){n&&clearInterval(n),r&&clearTimeout(r)}return async function(){a(),n=setInterval(a,100),r=setTimeout(()=>{o(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,o()}(),o}(w,a),S=async()=>{v(),r.destroy(),w.cleanup(),t.remove()},k=h({config:e,messageHandler:w,lifecycleManager:a}).then(()=>u.updateSetupStatus(!0));return{config:e,debugInfo:u,waitForConnection:a.isConnected,waitForSetup:k,request:p,listenerRequest:y,destroy:S}}({config:n,iframe:r});if(await a.waitForSetup,!await a.waitForConnection){console.error("Failed to connect to client");return}return a}function k(e,t){let n=t?y[t]??y.eur:y.eur,r=v(t);return e.toLocaleString(n,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2})}function b(e){return e?`${e}Amount`:"eurAmount"}Object.entries({dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31}).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{})}};
|
package/cdn/413.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 413.js.LICENSE.txt */
|
|
2
|
-
export const ids=["413"];export const modules={"../../node_modules/async-lz-string/libs/async-lz-string.js":function(e){var t;t=()=>{var e,t;return e={48:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.decompressFromUTF16=t.compressToUTF16=t.decompressFromBase64=t.compressToBase64=void 0;var o=n(304),s=n(134),a=new o.CompressorImpl,u=new s.DecompressorImpl,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c={};t.compressToBase64=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return null===e?[2,""]:[4,a.compress(e,6,function(e){return l.charAt(e)})];case 1:switch((t=n.sent()).length%4){default:case 0:return[2,t];case 1:return[2,t+"==="];case 2:return[2,t+"=="];case 3:return[2,t+"="]}return[2]}})})},t.decompressFromBase64=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:""===e?[2,null]:[4,u.decompress(e.length,32,function(t){return function(e,t){if(!c[e]){c[e]={};for(var n=0;n<e.length;n++)c[e][e.charAt(n)]=n}return c[e][t]}(l,e.charAt(t))})];case 1:return[2,t.sent()]}})})},t.compressToUTF16=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:[4,a.compress(e,15,function(e){return String.fromCharCode(e+32)})];case 1:return[2,t.sent()+" "]}})})},t.decompressFromUTF16=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:""===e?[2,null]:[4,u.decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})];case 1:return[2,t.sent()]}})})}},304:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompressorImpl=void 0;var o=n(658),s=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],a=function(){function e(){}return e.writeValueToData=function(e,t,n,r,i){if(n%4!=0||e.dataPosition+n>r-1)for(var o=0;o<n;o++)e.dataVal=e.dataVal<<1|1&t,e.dataPosition==r-1?(e.dataPosition=0,e.data.push(i(e.dataVal)),e.dataVal=0):e.dataPosition++,t>>=1;else e.dataVal<<=n,e.dataVal|=function(e,t){for(var n=0,r=0;r<t;++r)n<<=4,n|=s[15&e],e>>=4;return n}(t,n/4),e.dataPosition+=n},e.writeWToDataVal=function(t,n,r){t.dictionaryToCreate.has(t.w)?(256>t.w.charCodeAt(0)?(e.writeValueToData(t,0,t.numBits,n,r),e.writeValueToData(t,t.w.charCodeAt(0),8,n,r)):(e.writeValueToData(t,1,t.numBits,n,r),e.writeValueToData(t,t.w.charCodeAt(0),16,n,r)),t.enlargeIn--,0==t.enlargeIn&&(t.enlargeIn=Math.pow(2,t.numBits),t.numBits++),t.dictionaryToCreate.delete(t.w)):e.writeValueToData(t,t.dictionary.get(t.w),t.numBits,n,r),t.enlargeIn--,0==t.enlargeIn&&(t.enlargeIn=Math.pow(2,t.numBits),t.numBits++)},e.loopIteration=function(e,t,n,r,i){var o=e.charAt(t);i.dictionary.has(o)||(i.dictionary.set(o,i.dictSize++),i.dictionaryToCreate.set(o,!0));var s=i.w+o;i.dictionary.has(s)?i.w=s:(this.writeWToDataVal(i,n,r),i.dictionary.set(s,i.dictSize++),i.w=String(o))},e.prototype.compress=function(t,n,s){var a=this;return new Promise(function(u){return r(a,void 0,void 0,function(){var r,a;return i(this,function(i){switch(i.label){case 0:if(null==t)return u(""),[2];r={data:[],dataPosition:0,dataVal:0,dictionary:new Map,dictionaryToCreate:new Map,dictSize:3,enlargeIn:2,numBits:2,w:""},a=0,i.label=1;case 1:return a<t.length?(e.loopIteration(t,a,n,s,r),a%1e4!=0?[3,3]:[4,(0,o.wait)()]):[3,4];case 2:i.sent(),i.label=3;case 3:return a+=1,[3,1];case 4:return""!==r.w&&e.writeWToDataVal(r,n,s),e.writeValueToData(r,2,r.numBits,n,s),r.dataVal<<=n-r.dataPosition,r.data.push(s(r.dataVal)),u(r.data.join("")),[2]}})})})},e}();t.CompressorImpl=a},134:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecompressorImpl=void 0;var o=n(658),s=function(){function e(){}return e.prototype.decompress=function(e,t,n){var s=this;return new Promise(function(a){return r(s,void 0,void 0,function(){var r,s,u;return i(this,function(i){switch(i.label){case 0:for(r={bits:0,c:null,dataIndex:1,dataPosition:t,dataVal:n(0),dictionary:new Map,dictSize:4,enlargeIn:4,entry:"",maxPower:4,numBits:3,power:1,resb:null,result:[],w:null},s=0;s<3;s+=1)r.dictionary.set(s,s);for(;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;switch(r.bits){case 0:for(r.bits=0,r.maxPower=256,r.power=1;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.c=String.fromCharCode(r.bits);break;case 1:for(r.bits=0,r.maxPower=65536,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0===r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.c=String.fromCharCode(r.bits);break;case 2:return a(""),[2]}r.dictionary[3]=r.c,r.w=r.c,r.result.push(r.c),u=1,i.label=1;case 1:return u%2e4!=0?[3,3]:[4,(0,o.wait)()];case 2:i.sent(),i.label=3;case 3:if(r.dataIndex>e)return a(""),[2];for(r.bits=0,r.maxPower=Math.pow(2,r.numBits),r.power=1;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;switch(r.c=r.bits){case 0:for(r.bits=0,r.maxPower=256,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.dictionary[r.dictSize++]=String.fromCharCode(r.bits),r.c=r.dictSize-1,r.enlargeIn--;break;case 1:for(r.bits=0,r.maxPower=65536,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.dictionary[r.dictSize++]=String.fromCharCode(r.bits),r.c=r.dictSize-1,r.enlargeIn--;break;case 2:return a(r.result.join("")),[2]}if(0==r.enlargeIn&&(r.enlargeIn=Math.pow(2,r.numBits),r.numBits++),r.dictionary[r.c])r.entry=r.dictionary[r.c];else{if(r.c!==r.dictSize)return a(null),[2];r.entry=r.w+r.w.charAt(0)}return r.result.push(r.entry),r.dictionary[r.dictSize++]=r.w+r.entry.charAt(0),r.enlargeIn--,r.w=r.entry,0==r.enlargeIn&&(r.enlargeIn=Math.pow(2,r.numBits),r.numBits++),u++,[3,1];case 4:return[2]}})})})},e}();t.DecompressorImpl=s},658:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0,t.wait=function(){return n(this,void 0,void 0,function(){return r(this,function(e){return[2,new Promise(function(e){setTimeout(e,0)})]})})}}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(48)},e.exports=t()},"../../node_modules/js-sha256/src/sha256.js":function(e,t,n){!function(){"use strict";var t="input is invalid type",r="object"==typeof window,i=r?window:{};i.JS_SHA256_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self,s=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?i=n.g:o&&(i=self);var a=!i.JS_SHA256_NO_COMMON_JS&&e.exports,u="function"==typeof define&&define.amd,l=!i.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,c="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],_=[24,16,8,0],h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],d=["hex","array","digest","arrayBuffer"],p=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var m=function(e,t){return function(n){return new g(t,!0).update(n)[e]()}},v=function(e){var t=m("hex",e);s&&(t=y(t,e)),t.create=function(){return new g(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=m(r,e)}return t},y=function(e,r){var o,s=n("?81fa"),a=n("?2fd0").Buffer,u=r?"sha224":"sha256";return o=a.from&&!i.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(n){if("string"==typeof n)return s.createHash(u).update(n,"utf8").digest("hex");if(null==n)throw Error(t);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===a?s.createHash(u).update(o(n)).digest("hex"):e(n)}},b=function(e,t){return function(n,r){return new x(n,t,!0).update(r)[e]()}},w=function(e){var t=b("hex",e);t.create=function(t){return new x(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=b(r,e)}return t};function g(e,t){t?(p[0]=p[16]=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]=0,this.blocks=p):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function x(e,n,r){var i,o=typeof e;if("string"===o){var s,a=[],u=e.length,c=0;for(i=0;i<u;++i)(s=e.charCodeAt(i))<128?a[c++]=s:(s<2048?a[c++]=192|s>>>6:(s<55296||s>=57344?a[c++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),a[c++]=240|s>>>18,a[c++]=128|s>>>12&63),a[c++]=128|s>>>6&63),a[c++]=128|63&s);e=a}else if("object"===o){if(null===e)throw Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new g(n,!0).update(e).array());var f=[],_=[];for(i=0;i<64;++i){var h=e[i]||0;f[i]=92^h,_[i]=54^h}g.call(this,n,r),this.update(_),this.oKeyPad=f,this.inner=!0,this.sharedMemory=r}g.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);n=!0}for(var i,o,s=0,a=e.length,u=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=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),n)for(o=this.start;s<a&&o<64;++s)u[o>>>2]|=e[s]<<_[3&o++];else for(o=this.start;s<a&&o<64;++s)(i=e.charCodeAt(s))<128?u[o>>>2]|=i<<_[3&o++]:(i<2048?u[o>>>2]|=(192|i>>>6)<<_[3&o++]:(i<55296||i>=57344?u[o>>>2]|=(224|i>>>12)<<_[3&o++]:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),u[o>>>2]|=(240|i>>>18)<<_[3&o++],u[o>>>2]|=(128|i>>>12&63)<<_[3&o++]),u[o>>>2]|=(128|i>>>6&63)<<_[3&o++]),u[o>>>2]|=(128|63&i)<<_[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=u[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000<<0,this.bytes=this.bytes%0x100000000),this}},g.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=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]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},g.prototype.hash=function(){var e,t,n,r,i,o,s,a,u,l,c,f=this.h0,_=this.h1,d=this.h2,p=this.h3,m=this.h4,v=this.h5,y=this.h6,b=this.h7,w=this.blocks;for(e=16;e<64;++e)t=((i=w[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=w[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,w[e]=w[e-16]+t+w[e-7]+n<<0;for(e=0,c=_&d;e<64;e+=4)this.first?(this.is224?(a=300032,b=(i=w[0]-0x543c9a5b)-0x8f1a6c7<<0,p=i+0x170e9b5<<0):(a=0x2a01a605,b=(i=w[0]-0xc881298)-0x5ab00ac6<<0,p=i+0x8909ae5<<0),this.first=!1):(t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),r=(a=f&_)^f&d^c,i=b+n+(m&v^~m&y)+h[e]+w[e],o=t+r,b=p+i<<0,p=i+o<<0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),r=(u=p&f)^p&_^a,i=y+n+(b&m^~b&v)+h[e+1]+w[e+1],o=t+r,y=d+i<<0,t=((d=i+o<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),r=(l=d&p)^d&f^u,i=v+n+(y&b^~y&m)+h[e+2]+w[e+2],o=t+r,v=_+i<<0,t=((_=i+o<<0)>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),r=(c=_&d)^_&p^l,i=m+n+(v&y^~v&b)+h[e+3]+w[e+3],o=t+r,m=f+i<<0,f=i+o<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+f<<0,this.h1=this.h1+_<<0,this.h2=this.h2+d<<0,this.h3=this.h3+p<<0,this.h4=this.h4+m<<0,this.h5=this.h5+v<<0,this.h6=this.h6+y<<0,this.h7=this.h7+b<<0},g.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=c[e>>>28&15]+c[e>>>24&15]+c[e>>>20&15]+c[e>>>16&15]+c[e>>>12&15]+c[e>>>8&15]+c[e>>>4&15]+c[15&e]+c[t>>>28&15]+c[t>>>24&15]+c[t>>>20&15]+c[t>>>16&15]+c[t>>>12&15]+c[t>>>8&15]+c[t>>>4&15]+c[15&t]+c[n>>>28&15]+c[n>>>24&15]+c[n>>>20&15]+c[n>>>16&15]+c[n>>>12&15]+c[n>>>8&15]+c[n>>>4&15]+c[15&n]+c[r>>>28&15]+c[r>>>24&15]+c[r>>>20&15]+c[r>>>16&15]+c[r>>>12&15]+c[r>>>8&15]+c[r>>>4&15]+c[15&r]+c[i>>>28&15]+c[i>>>24&15]+c[i>>>20&15]+c[i>>>16&15]+c[i>>>12&15]+c[i>>>8&15]+c[i>>>4&15]+c[15&i]+c[o>>>28&15]+c[o>>>24&15]+c[o>>>20&15]+c[o>>>16&15]+c[o>>>12&15]+c[o>>>8&15]+c[o>>>4&15]+c[15&o]+c[s>>>28&15]+c[s>>>24&15]+c[s>>>20&15]+c[s>>>16&15]+c[s>>>12&15]+c[s>>>8&15]+c[s>>>4&15]+c[15&s];return this.is224||(u+=c[a>>>28&15]+c[a>>>24&15]+c[a>>>20&15]+c[a>>>16&15]+c[a>>>12&15]+c[a>>>8&15]+c[a>>>4&15]+c[15&a]),u},g.prototype.toString=g.prototype.hex,g.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||u.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),u},g.prototype.array=g.prototype.digest,g.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},x.prototype=new g,x.prototype.finalize=function(){if(g.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();g.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),g.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=w(),k.sha224.hmac=w(!0),a?e.exports=k:(i.sha256=k.sha256,i.sha224=k.sha224,u&&define(function(){return k}))}()},"../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js":function(e,t,n){n.d(t,{Z:()=>_});var r=n("../../node_modules/preact/dist/preact.module.js");function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=["context","children"];function s(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,o);return(0,r.Tm)(t,n)}function a(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,r.h)(s,i({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],o={},s=0,a=t.attributes,l=t.childNodes;for(s=a.length;s--;)"slot"!==a[s].name&&(o[a[s].name]=a[s].value,o[u(a[s].name)]=a[s].value);for(s=l.length;s--;){var c=e(l[s],null),_=l[s].slot;_?o[_]=(0,r.h)(f,{name:_},c):i[s]=c}var h=n?(0,r.h)(f,null,i):i;return(0,r.h)(n||t.nodeName.toLowerCase(),o,h)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?r.ZB:r.sY)(this._vdom,this._root)}function u(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function l(e,t,n){if(this._vdom){var i={};i[e]=n=null==n?void 0:n,i[u(e)]=n,this._vdom=(0,r.Tm)(this._vdom,i),(0,r.sY)(this._vdom,this._root)}}function c(){(0,r.sY)(this._vdom=null,this._root)}function f(e,t){var n=this;return(0,r.h)("slot",i({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function _(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=a,i.prototype.attributeChangedCallback=l,i.prototype.disconnectedCallback=c,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i)}},"../../node_modules/preact/dist/preact.module.js":function(e,t,n){n.d(t,{HY:()=>x,Tm:()=>H,YM:()=>i,ZB:()=>$,az:()=>w,bR:()=>function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(v(t)?t.some(function(t){e(t,n)}):n.push(t)),n},h:()=>w,sY:()=>T,wA:()=>k});var r,i,o,s,a,u,l,c,f,_,h,d={},p=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,n){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return g(e,a,i,o,null)}function g(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++o:s,__i:-1,__u:0};return null==s&&null!=i.vnode&&i.vnode(a),a}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?A(e):null}function P(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!S.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||u)(S)}function S(){for(var e,t,n,r,o,a,u=1;s.length;)s.length>u&&s.sort(l),e=s.shift(),u=s.length,e.__d&&(t=void 0,r=(n=e.__v).__e,o=[],a=[],e.__P&&((t=y({},n)).__v=n.__v+1,i.vnode&&i.vnode(t),B(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?A(n):r,!!(32&n.__u),a),t.__v=n.__v,t.__.__k[t.__i]=t,E(o,t,a),t.__e!=r&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(t)));S.__r=0}function C(e,t,n,r,o,s,a,u,l,c,f){var _,h,m,y,w,k,P=r&&r.__k||p,S=t.length;for(l=function(e,t,n,r,o){var s,a,u,l,c,f=n.length,_=f,h=0;for(e.__k=Array(o),s=0;s<o;s++)null!=(a=t[s])&&"boolean"!=typeof a&&"function"!=typeof a?(l=s+h,(a=e.__k[s]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?g(null,a,null,null,null):v(a)?g(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?g(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,u=null,-1!==(c=a.__i=function(e,t,n,r){var i,o,s=e.key,a=e.type,u=t[n];if(null===u&&null==e.key||u&&s==u.key&&a===u.type&&0==(2&u.__u))return n;if(r>+(null!=u&&0==(2&u.__u)))for(i=n-1,o=n+1;i>=0||o<t.length;){if(i>=0){if((u=t[i])&&0==(2&u.__u)&&s==u.key&&a===u.type)return i;i--}if(o<t.length){if((u=t[o])&&0==(2&u.__u)&&s==u.key&&a===u.type)return o;o++}}return -1}(a,n,l,_))&&(_--,(u=n[c])&&(u.__u|=2)),null==u||null===u.__v?(-1==c&&(o>f?h--:o<f&&h++),"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[s]=null;if(_)for(s=0;s<f;s++)null!=(u=n[s])&&0==(2&u.__u)&&(u.__e==r&&(r=A(u)),function e(t,n,r){var o,s;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||U(o,null,n)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){i.__e(e,n)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&e(o[s],n,r||"function"!=typeof t.type);r||b(t.__e),t.__c=t.__=t.__e=void 0}(u,u));return r}(n,t,P,l,S),_=0;_<S;_++)null!=(m=n.__k[_])&&(h=-1===m.__i?d:P[m.__i]||d,m.__i=_,k=B(e,m,h,o,s,a,u,l,c,f),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&U(h.ref,null,m),f.push(m.ref,m.__c||y,m)),null==w&&null!=y&&(w=y),4&m.__u||h.__k===m.__k?l=function e(t,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,n=e(i[o],n,r));return n}t.__e!=n&&(n&&t.type&&!r.contains(n)&&(n=A(t)),r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8==n.nodeType);return n}(m,l,e):"function"==typeof m.type&&void 0!==k?l=k:y&&(l=y.nextSibling),m.__u&=-7);return n.__e=w,l}function I(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||m.test(t)?n:n+"px"}function j(e,t,n,r,i){var o;e:if("style"==t){if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||I(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||I(e.style,t,n[t])}}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(c,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=f,e.addEventListener(t,o?h:_,o)):e.removeEventListener(t,o?h:_,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function z(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function B(e,t,n,o,s,a,u,l,c,f){var _,h,p,m,w,g,P,S,I,z,B,E,U,T,$,H,M,N,V=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=t.__e=n.__e]),(_=i.__b)&&_(t);e:if("function"==typeof V)try{if(S=t.props,I="prototype"in V&&V.prototype.render,z=(_=V.contextType)&&o[_.__c],B=_?z?z.props.value:_.__:o,n.__c?P=(h=t.__c=n.__c).__=h.__E:(I?t.__c=h=new V(S,B):(t.__c=h=new k(S,B),h.constructor=V,h.render=O),z&&z.sub(h),h.props=S,h.state||(h.state={}),h.context=B,h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),I&&null==h.__s&&(h.__s=h.state),I&&null!=V.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=y({},h.__s)),y(h.__s,V.getDerivedStateFromProps(S,h.__s))),m=h.props,w=h.state,h.__v=t,p)I&&null==V.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),I&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(I&&null==V.getDerivedStateFromProps&&S!==m&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,B),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,B)||t.__v==n.__v)){for(t.__v!=n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&u.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,B),I&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(m,w,g)})}if(h.context=B,h.props=S,h.__P=e,h.__e=!1,U=i.__r,T=0,I){for(h.state=h.__s,h.__d=!1,U&&U(t),_=h.render(h.props,h.state,h.context),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[]}else do h.__d=!1,U&&U(t),_=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++T<25);h.state=h.__s,null!=h.getChildContext&&(o=y(y({},o),h.getChildContext())),I&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(m,w)),M=(H=null!=_&&_.type===x&&null==_.key)?_.props.children:_,H&&(_.props.children=null),l=C(e,v(M)?M:[M],t,n,o,s,a,u,l,c,f),h.base=t.__e,t.__u&=-161,h.__h.length&&u.push(h),P&&(h.__E=h.__=null)}catch(e){if(t.__v=null,c||null!=a){if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,t.__e=l}else for(N=a.length;N--;)b(a[N])}else t.__e=n.__e,t.__k=n.__k;i.__e(e,t,n)}else null==a&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=function(e,t,n,o,s,a,u,l,c){var f,_,h,p,m,y,w,g=n.props,x=t.props,k=t.type;if("svg"==k?s="http://www.w3.org/2000/svg":"math"==k?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a){for(f=0;f<a.length;f++)if((m=a[f])&&"setAttribute"in m==!!k&&(k?m.localName==k:3==m.nodeType)){e=m,a[f]=null;break}}if(null==e){if(null==k)return document.createTextNode(x);e=document.createElementNS(s,k,x.is&&x),l&&(i.__m&&i.__m(t,a),l=!1),a=null}if(null===k)g===x||l&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),g=n.props||d,!l&&null!=a)for(g={},f=0;f<e.attributes.length;f++)g[(m=e.attributes[f]).name]=m.value;for(f in g)if(m=g[f],"children"==f);else if("dangerouslySetInnerHTML"==f)h=m;else if(!(f in x)){if("value"==f&&"defaultValue"in x||"checked"==f&&"defaultChecked"in x)continue;j(e,f,null,m,s)}for(f in x)m=x[f],"children"==f?p=m:"dangerouslySetInnerHTML"==f?_=m:"value"==f?y=m:"checked"==f?w=m:l&&"function"!=typeof m||g[f]===m||j(e,f,m,g[f],s);if(_)l||h&&(_.__html===h.__html||_.__html===e.innerHTML)||(e.innerHTML=_.__html),t.__k=[];else if(h&&(e.innerHTML=""),C("template"===t.type?e.content:e,v(p)?p:[p],t,n,o,"foreignObject"==k?"http://www.w3.org/1999/xhtml":s,a,u,a?a[0]:n.__k&&A(n,0),l,c),null!=a)for(f=a.length;f--;)b(a[f]);l||(f="value","progress"==k&&null==y?e.removeAttribute("value"):void 0===y||y===e[f]&&("progress"!=k||y)&&("option"!=k||y===g[f])||j(e,f,y,g[f],s),f="checked",void 0!==w&&w!==e[f]&&j(e,f,w,g[f],s))}return e}(n.__e,t,n,o,s,a,u,c,f);return(_=i.diffed)&&_(t),128&t.__u?void 0:l}function E(e,t,n){for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function U(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function O(e,t,n){return this.constructor(e,n)}function T(e,t,n){var o,s,a,u;t==document&&(t=document.documentElement),i.__&&i.__(e,t),s=(o="function"==typeof n)?null:n&&n.__k||t.__k,a=[],u=[],B(t,e=(!o&&n||t).__k=w(x,null,[e]),s||d,d,t.namespaceURI,!o&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!o&&n?n:s?s.__e:t.firstChild,o,u),E(a,e,u)}function $(e,t){T(e,t,$)}function H(e,t,n){var i,o,s,a,u=y({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?i=t[s]:"ref"==s?o=t[s]:u[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(u.children=arguments.length>3?r.call(arguments,2):n),g(e.type,u,i||e.key,o||e.ref,null)}r=p.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},k.prototype.render=x,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,c=/(PointerCapture)$|Capture$/i,f=0,_=z(!1),h=z(!0)},"../../node_modules/preact/hooks/dist/hooks.module.js":function(e,t,n){n.d(t,{I4:()=>x,Ye:()=>g,d4:()=>b,eJ:()=>y,sO:()=>w});var r,i,o,s,a=n("../../node_modules/preact/dist/preact.module.js"),u=0,l=[],c=a.YM,f=c.__b,_=c.__r,h=c.diffed,d=c.__c,p=c.unmount,m=c.__;function v(e,t){c.__h&&c.__h(i,e,u||t),u=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return u=1,function(e,t,n){var o=v(r++,2);if(o.t=e,!o.__c&&(o.__=[I(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.__f)){var s=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return!!e.__c});if(r.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var i=o.__c.props!==e;return r.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),a&&a.call(this,e,t,n)||i};i.__f=!0;var a=i.shouldComponentUpdate,u=i.componentWillUpdate;i.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}u&&u.call(this,e,t,n)},i.shouldComponentUpdate=s}return o.__N||o.__}(I,e)}function b(e,t){var n=v(r++,3);!c.__s&&C(n.__H,t)&&(n.__=e,n.u=t,i.__H.__h.push(n))}function w(e){return u=5,g(function(){return{current:e}},[])}function g(e,t){var n=v(r++,7);return C(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function x(e,t){return u=8,g(function(){return e},t)}function k(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(S),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){i=null,f&&f(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),m&&m(e,t)},c.__r=function(e){_&&_(e),r=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(P),t.__h.forEach(S),t.__h=[],r=0)),o=i},c.diffed=function(e){h&&h(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),A&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);A&&(t=requestAnimationFrame(n))})(k)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),o=i=null},c.__c=function(e,t){t.some(function(e){try{e.__h.forEach(P),e.__h=e.__h.filter(function(e){return!e.__||S(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],c.__e(n,e.__v)}}),d&&d(e,t)},c.unmount=function(e){p&&p(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{P(e)}catch(e){t=e}}),n.__H=void 0,t&&c.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function P(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function S(e){var t=i;e.__c=e.__(),i=t}function C(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function I(e,t){return"function"==typeof t?t(e):t}},"../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js":function(e,t,n){n.d(t,{BX:()=>o,HY:()=>r.HY,tZ:()=>o});var r=n("../../node_modules/preact/dist/preact.module.js"),i=0;function o(e,t,n,o,s,a){t||(t={});var u,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?u=t[l]:c[l]=t[l];var f={type:e,props:c,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--i,__i:-1,__u:0,__source:s,__self:a};if("function"==typeof e&&(u=e.defaultProps))for(l in u)void 0===c[l]&&(c[l]=u[l]);return r.YM.vnode&&r.YM.vnode(f),f}},"../../node_modules/viem/_esm/errors/base.js":function(e,t,n){n.d(t,{G:()=>o});let r="2.22.23",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${r}`};class o extends Error{constructor(e,t={}){let n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof o&&t.cause.docsPath||t.docsPath,a=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.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=n,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=r}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}}},"../../node_modules/viem/_esm/errors/encoding.js":function(e,t,n){n.d(t,{J5:()=>i,M6:()=>o});var r=n("../../node_modules/viem/_esm/errors/base.js");class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}r.G,r.G,r.G;class o extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},"../../node_modules/viem/_esm/utils/address/isAddressEqual.js":function(e,t,n){n.d(t,{E:()=>_});var r=n("../../node_modules/viem/_esm/errors/base.js");class i extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class o extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}var s=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),a=n("../../node_modules/viem/_esm/utils/hash/keccak256.js");let u=new o(8192),l=/^0x[a-fA-F0-9]{40}$/,c=new o(8192);function f(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(c.has(r))return c.get(r);let i=!!l.test(e)&&(e.toLowerCase()===e||!n||function(e,t){if(u.has(`${e}.undefined`))return u.get(`${e}.${void 0}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,s.qX)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&r[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let o=`0x${i.join("")}`;return u.set(`${e}.${t}`,o),o}(e)===e);return c.set(r,i),i}function _(e,t){if(!f(e,{strict:!1}))throw new i({address:e});if(!f(t,{strict:!1}))throw new i({address:t});return e.toLowerCase()===t.toLowerCase()}},"../../node_modules/viem/_esm/utils/data/concat.js":function(e,t,n){n.d(t,{SM:()=>r});function r(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}},"../../node_modules/viem/_esm/utils/data/isHex.js":function(e,t,n){n.d(t,{v:()=>r});function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},"../../node_modules/viem/_esm/utils/data/pad.js":function(e,t,n){n.d(t,{vk:()=>o});var r=n("../../node_modules/viem/_esm/errors/base.js");r.G;class i extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function o(e,{dir:t,size:n=32}={}){return"string"==typeof e?function(e,{dir:t,size:n=32}={}){if(null===n)return e;let r=e.replace("0x","");if(r.length>2*n)throw new i({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new i({size:e.length,targetSize:n,type:"bytes"});let r=new Uint8Array(n);for(let i=0;i<n;i++){let o="right"===t;r[o?i:n-i-1]=e[o?i:e.length-i-1]}return r}(e,{dir:t,size:n})}r.G},"../../node_modules/viem/_esm/utils/encoding/fromHex.js":function(e,t,n){n.d(t,{Yf:()=>s});var r=n("../../node_modules/viem/_esm/errors/encoding.js"),i=n("../../node_modules/viem/_esm/utils/data/isHex.js");function o(e){return(0,i.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function s(e,{size:t}){if(o(e)>t)throw new r.M6({givenSize:o(e),maxSize:t})}},"../../node_modules/viem/_esm/utils/encoding/toBytes.js":function(e,t,n){n.d(t,{O0:()=>l,nr:()=>_,qX:()=>h});var r=n("../../node_modules/viem/_esm/errors/base.js"),i=n("../../node_modules/viem/_esm/utils/data/isHex.js"),o=n("../../node_modules/viem/_esm/utils/data/pad.js"),s=n("../../node_modules/viem/_esm/utils/encoding/fromHex.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toHex.js");let u=new TextEncoder;function l(e,t={}){var n,r;return"number"==typeof e||"bigint"==typeof e?(n=e,r=t,_((0,a.eC)(n,r))):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,s.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?_(e,t):h(e,t)}let c={zero:48,nine:57,A:65,F:70,a:97,f:102};function f(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function _(e,t={}){let n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,o.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,u=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let n=f(i.charCodeAt(t++)),o=f(i.charCodeAt(t++));if(void 0===n||void 0===o)throw new r.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);u[e]=16*n+o}return u}function h(e,t={}){let n=u.encode(e);return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,o.vk)(n,{dir:"right",size:t.size})):n}},"../../node_modules/viem/_esm/utils/encoding/toHex.js":function(e,t,n){n.d(t,{NC:()=>a,ci:()=>u,eC:()=>l});var r=n("../../node_modules/viem/_esm/errors/encoding.js"),i=n("../../node_modules/viem/_esm/utils/data/pad.js"),o=n("../../node_modules/viem/_esm/utils/encoding/fromHex.js");let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?function(e,t={}){return u(c.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}(e,t):u(e,t)}function u(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=s[e[t]];let r=`0x${n}`;return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,i.vk)(r,{dir:"right",size:t.size})):r}function l(e,t={}){let n;let{signed:o,size:s}=t,a=BigInt(e);s?n=o?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let u="bigint"==typeof n&&o?-n-1n:0;if(n&&a>n||a<u){let t="bigint"==typeof e?"n":"";throw new r.J5({max:n?`${n}${t}`:void 0,min:`${u}${t}`,signed:o,size:s,value:`${e}${t}`})}let c=`0x${(o&&a<0?(1n<<BigInt(8*s))+BigInt(a):a).toString(16)}`;return s?(0,i.vk)(c,{size:s}):c}let c=new TextEncoder},"../../node_modules/viem/_esm/utils/hash/keccak256.js":function(e,t,n){function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function i(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}n.d(t,{w:()=>O});let s=BigInt(0x100000000-1),a=BigInt(32),u=(e,t,n)=>e<<n|t>>>32-n,l=(e,t,n)=>t<<n|e>>>32-n,c=(e,t,n)=>t<<n-32|e>>>64-n,f=(e,t,n)=>e<<n-32|t>>>64-n,_=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function h(e){for(let n=0;n<e.length;n++){var t;e[n]=(t=e[n])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}}function d(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),i(e),e}class p{clone(){return this._cloneInto()}}let m=[],v=[],y=[],b=BigInt(0),w=BigInt(1),g=BigInt(2),x=BigInt(7),k=BigInt(256),A=BigInt(113);for(let e=0,t=w,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],m.push(2*(5*r+n)),v.push((e+1)*(e+2)/2%64);let i=b;for(let e=0;e<7;e++)(t=(t<<w^(t>>x)*A)%k)&g&&(i^=w<<(w<<BigInt(e))-w);y.push(i)}let[P,S]=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:u}=function(e,t=!1){return t?{h:Number(e&s),l:Number(e>>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}(e[i],t);[n[i],r[i]]=[o,u]}return[n,r]}(y,!0),C=(e,t,n)=>n>32?c(e,t,n):u(e,t,n),I=(e,t,n)=>n>32?f(e,t,n):l(e,t,n);class j extends p{constructor(e,t,n,i=!1,o=24){var s;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=new Uint32Array((s=this.state).buffer,s.byteOffset,Math.floor(s.byteLength/4))}keccak(){_||h(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,o=n[i],s=n[i+1],a=C(o,s,1)^n[r],u=I(o,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=v[n],o=C(t,i,r),s=I(t,i,r),a=m[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=P[r],e[1]^=S[r]}n.fill(0)}(this.state32,this.rounds),_||h(this.state32),this.posOut=0,this.pos=0}update(e){o(this);let{blockLen:t,state:n}=this,r=(e=d(e)).length;for(let i=0;i<r;){let o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){o(this,!1),i(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(!function(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new j(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}let z=function(e){let t=t=>e().update(d(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new j(136,1,32));var B=n("../../node_modules/viem/_esm/utils/data/isHex.js"),E=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),U=n("../../node_modules/viem/_esm/utils/encoding/toHex.js");function O(e,t){let n=z((0,B.v)(e,{strict:!1})?(0,E.O0)(e):e);return"bytes"===(t||"hex")?n:(0,U.NC)(n)}}};
|
|
2
|
+
export const __webpack_ids__=["413"];export const __webpack_modules__={"../../node_modules/async-lz-string/libs/async-lz-string.js":function(e){var t;t=()=>{var e,t;return e={48:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.decompressFromUTF16=t.compressToUTF16=t.decompressFromBase64=t.compressToBase64=void 0;var o=n(304),s=n(134),a=new o.CompressorImpl,u=new s.DecompressorImpl,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c={};t.compressToBase64=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return null===e?[2,""]:[4,a.compress(e,6,function(e){return l.charAt(e)})];case 1:switch((t=n.sent()).length%4){default:case 0:return[2,t];case 1:return[2,t+"==="];case 2:return[2,t+"=="];case 3:return[2,t+"="]}return[2]}})})},t.decompressFromBase64=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:""===e?[2,null]:[4,u.decompress(e.length,32,function(t){return function(e,t){if(!c[e]){c[e]={};for(var n=0;n<e.length;n++)c[e][e.charAt(n)]=n}return c[e][t]}(l,e.charAt(t))})];case 1:return[2,t.sent()]}})})},t.compressToUTF16=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:[4,a.compress(e,15,function(e){return String.fromCharCode(e+32)})];case 1:return[2,t.sent()+" "]}})})},t.decompressFromUTF16=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return null===e?[2,""]:""===e?[2,null]:[4,u.decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})];case 1:return[2,t.sent()]}})})}},304:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompressorImpl=void 0;var o=n(658),s=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],a=function(){function e(){}return e.writeValueToData=function(e,t,n,r,i){if(n%4!=0||e.dataPosition+n>r-1)for(var o=0;o<n;o++)e.dataVal=e.dataVal<<1|1&t,e.dataPosition==r-1?(e.dataPosition=0,e.data.push(i(e.dataVal)),e.dataVal=0):e.dataPosition++,t>>=1;else e.dataVal<<=n,e.dataVal|=function(e,t){for(var n=0,r=0;r<t;++r)n<<=4,n|=s[15&e],e>>=4;return n}(t,n/4),e.dataPosition+=n},e.writeWToDataVal=function(t,n,r){t.dictionaryToCreate.has(t.w)?(256>t.w.charCodeAt(0)?(e.writeValueToData(t,0,t.numBits,n,r),e.writeValueToData(t,t.w.charCodeAt(0),8,n,r)):(e.writeValueToData(t,1,t.numBits,n,r),e.writeValueToData(t,t.w.charCodeAt(0),16,n,r)),t.enlargeIn--,0==t.enlargeIn&&(t.enlargeIn=Math.pow(2,t.numBits),t.numBits++),t.dictionaryToCreate.delete(t.w)):e.writeValueToData(t,t.dictionary.get(t.w),t.numBits,n,r),t.enlargeIn--,0==t.enlargeIn&&(t.enlargeIn=Math.pow(2,t.numBits),t.numBits++)},e.loopIteration=function(e,t,n,r,i){var o=e.charAt(t);i.dictionary.has(o)||(i.dictionary.set(o,i.dictSize++),i.dictionaryToCreate.set(o,!0));var s=i.w+o;i.dictionary.has(s)?i.w=s:(this.writeWToDataVal(i,n,r),i.dictionary.set(s,i.dictSize++),i.w=String(o))},e.prototype.compress=function(t,n,s){var a=this;return new Promise(function(u){return r(a,void 0,void 0,function(){var r,a;return i(this,function(i){switch(i.label){case 0:if(null==t)return u(""),[2];r={data:[],dataPosition:0,dataVal:0,dictionary:new Map,dictionaryToCreate:new Map,dictSize:3,enlargeIn:2,numBits:2,w:""},a=0,i.label=1;case 1:return a<t.length?(e.loopIteration(t,a,n,s,r),a%1e4!=0?[3,3]:[4,(0,o.wait)()]):[3,4];case 2:i.sent(),i.label=3;case 3:return a+=1,[3,1];case 4:return""!==r.w&&e.writeWToDataVal(r,n,s),e.writeValueToData(r,2,r.numBits,n,s),r.dataVal<<=n-r.dataPosition,r.data.push(s(r.dataVal)),u(r.data.join("")),[2]}})})})},e}();t.CompressorImpl=a},134:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecompressorImpl=void 0;var o=n(658),s=function(){function e(){}return e.prototype.decompress=function(e,t,n){var s=this;return new Promise(function(a){return r(s,void 0,void 0,function(){var r,s,u;return i(this,function(i){switch(i.label){case 0:for(r={bits:0,c:null,dataIndex:1,dataPosition:t,dataVal:n(0),dictionary:new Map,dictSize:4,enlargeIn:4,entry:"",maxPower:4,numBits:3,power:1,resb:null,result:[],w:null},s=0;s<3;s+=1)r.dictionary.set(s,s);for(;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;switch(r.bits){case 0:for(r.bits=0,r.maxPower=256,r.power=1;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.c=String.fromCharCode(r.bits);break;case 1:for(r.bits=0,r.maxPower=65536,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0===r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.c=String.fromCharCode(r.bits);break;case 2:return a(""),[2]}r.dictionary[3]=r.c,r.w=r.c,r.result.push(r.c),u=1,i.label=1;case 1:return u%2e4!=0?[3,3]:[4,(0,o.wait)()];case 2:i.sent(),i.label=3;case 3:if(r.dataIndex>e)return a(""),[2];for(r.bits=0,r.maxPower=Math.pow(2,r.numBits),r.power=1;r.power!=r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;switch(r.c=r.bits){case 0:for(r.bits=0,r.maxPower=256,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.dictionary[r.dictSize++]=String.fromCharCode(r.bits),r.c=r.dictSize-1,r.enlargeIn--;break;case 1:for(r.bits=0,r.maxPower=65536,r.power=1;r.power!==r.maxPower;)r.resb=r.dataVal&r.dataPosition,r.dataPosition>>=1,0==r.dataPosition&&(r.dataPosition=t,r.dataVal=n(r.dataIndex++)),r.bits|=+(r.resb>0)*r.power,r.power<<=1;r.dictionary[r.dictSize++]=String.fromCharCode(r.bits),r.c=r.dictSize-1,r.enlargeIn--;break;case 2:return a(r.result.join("")),[2]}if(0==r.enlargeIn&&(r.enlargeIn=Math.pow(2,r.numBits),r.numBits++),r.dictionary[r.c])r.entry=r.dictionary[r.c];else{if(r.c!==r.dictSize)return a(null),[2];r.entry=r.w+r.w.charAt(0)}return r.result.push(r.entry),r.dictionary[r.dictSize++]=r.w+r.entry.charAt(0),r.enlargeIn--,r.w=r.entry,0==r.enlargeIn&&(r.enlargeIn=Math.pow(2,r.numBits),r.numBits++),u++,[3,1];case 4:return[2]}})})})},e}();t.DecompressorImpl=s},658:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0,t.wait=function(){return n(this,void 0,void 0,function(){return r(this,function(e){return[2,new Promise(function(e){setTimeout(e,0)})]})})}}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(48)},e.exports=t()},"../../node_modules/js-sha256/src/sha256.js":function(e,t,n){!function(){"use strict";var t="input is invalid type",r="object"==typeof window,i=r?window:{};i.JS_SHA256_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self,s=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?i=n.g:o&&(i=self);var a=!i.JS_SHA256_NO_COMMON_JS&&e.exports,u="function"==typeof define&&define.amd,l=!i.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,c="0123456789abcdef".split(""),_=[-0x80000000,8388608,32768,128],f=[24,16,8,0],h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],d=["hex","array","digest","arrayBuffer"],p=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var m=function(e,t){return function(n){return new g(t,!0).update(n)[e]()}},v=function(e){var t=m("hex",e);s&&(t=y(t,e)),t.create=function(){return new g(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=m(r,e)}return t},y=function(e,r){var o,s=n("?81fa"),a=n("?2fd0").Buffer,u=r?"sha224":"sha256";return o=a.from&&!i.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(n){if("string"==typeof n)return s.createHash(u).update(n,"utf8").digest("hex");if(null==n)throw Error(t);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===a?s.createHash(u).update(o(n)).digest("hex"):e(n)}},b=function(e,t){return function(n,r){return new x(n,t,!0).update(r)[e]()}},w=function(e){var t=b("hex",e);t.create=function(t){return new x(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=b(r,e)}return t};function g(e,t){t?(p[0]=p[16]=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]=0,this.blocks=p):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function x(e,n,r){var i,o=typeof e;if("string"===o){var s,a=[],u=e.length,c=0;for(i=0;i<u;++i)(s=e.charCodeAt(i))<128?a[c++]=s:(s<2048?a[c++]=192|s>>>6:(s<55296||s>=57344?a[c++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),a[c++]=240|s>>>18,a[c++]=128|s>>>12&63),a[c++]=128|s>>>6&63),a[c++]=128|63&s);e=a}else if("object"===o){if(null===e)throw Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new g(n,!0).update(e).array());var _=[],f=[];for(i=0;i<64;++i){var h=e[i]||0;_[i]=92^h,f[i]=54^h}g.call(this,n,r),this.update(f),this.oKeyPad=_,this.inner=!0,this.sharedMemory=r}g.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);n=!0}for(var i,o,s=0,a=e.length,u=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=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),n)for(o=this.start;s<a&&o<64;++s)u[o>>>2]|=e[s]<<f[3&o++];else for(o=this.start;s<a&&o<64;++s)(i=e.charCodeAt(s))<128?u[o>>>2]|=i<<f[3&o++]:(i<2048?u[o>>>2]|=(192|i>>>6)<<f[3&o++]:(i<55296||i>=57344?u[o>>>2]|=(224|i>>>12)<<f[3&o++]:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),u[o>>>2]|=(240|i>>>18)<<f[3&o++],u[o>>>2]|=(128|i>>>12&63)<<f[3&o++]),u[o>>>2]|=(128|i>>>6&63)<<f[3&o++]),u[o>>>2]|=(128|63&i)<<f[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=u[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000<<0,this.bytes=this.bytes%0x100000000),this}},g.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=_[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=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]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},g.prototype.hash=function(){var e,t,n,r,i,o,s,a,u,l,c,_=this.h0,f=this.h1,d=this.h2,p=this.h3,m=this.h4,v=this.h5,y=this.h6,b=this.h7,w=this.blocks;for(e=16;e<64;++e)t=((i=w[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=w[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,w[e]=w[e-16]+t+w[e-7]+n<<0;for(e=0,c=f&d;e<64;e+=4)this.first?(this.is224?(a=300032,b=(i=w[0]-0x543c9a5b)-0x8f1a6c7<<0,p=i+0x170e9b5<<0):(a=0x2a01a605,b=(i=w[0]-0xc881298)-0x5ab00ac6<<0,p=i+0x8909ae5<<0),this.first=!1):(t=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),r=(a=_&f)^_&d^c,i=b+n+(m&v^~m&y)+h[e]+w[e],o=t+r,b=p+i<<0,p=i+o<<0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),r=(u=p&_)^p&f^a,i=y+n+(b&m^~b&v)+h[e+1]+w[e+1],o=t+r,y=d+i<<0,t=((d=i+o<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),r=(l=d&p)^d&_^u,i=v+n+(y&b^~y&m)+h[e+2]+w[e+2],o=t+r,v=f+i<<0,t=((f=i+o<<0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),r=(c=f&d)^f&p^l,i=m+n+(v&y^~v&b)+h[e+3]+w[e+3],o=t+r,m=_+i<<0,_=i+o<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+_<<0,this.h1=this.h1+f<<0,this.h2=this.h2+d<<0,this.h3=this.h3+p<<0,this.h4=this.h4+m<<0,this.h5=this.h5+v<<0,this.h6=this.h6+y<<0,this.h7=this.h7+b<<0},g.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=c[e>>>28&15]+c[e>>>24&15]+c[e>>>20&15]+c[e>>>16&15]+c[e>>>12&15]+c[e>>>8&15]+c[e>>>4&15]+c[15&e]+c[t>>>28&15]+c[t>>>24&15]+c[t>>>20&15]+c[t>>>16&15]+c[t>>>12&15]+c[t>>>8&15]+c[t>>>4&15]+c[15&t]+c[n>>>28&15]+c[n>>>24&15]+c[n>>>20&15]+c[n>>>16&15]+c[n>>>12&15]+c[n>>>8&15]+c[n>>>4&15]+c[15&n]+c[r>>>28&15]+c[r>>>24&15]+c[r>>>20&15]+c[r>>>16&15]+c[r>>>12&15]+c[r>>>8&15]+c[r>>>4&15]+c[15&r]+c[i>>>28&15]+c[i>>>24&15]+c[i>>>20&15]+c[i>>>16&15]+c[i>>>12&15]+c[i>>>8&15]+c[i>>>4&15]+c[15&i]+c[o>>>28&15]+c[o>>>24&15]+c[o>>>20&15]+c[o>>>16&15]+c[o>>>12&15]+c[o>>>8&15]+c[o>>>4&15]+c[15&o]+c[s>>>28&15]+c[s>>>24&15]+c[s>>>20&15]+c[s>>>16&15]+c[s>>>12&15]+c[s>>>8&15]+c[s>>>4&15]+c[15&s];return this.is224||(u+=c[a>>>28&15]+c[a>>>24&15]+c[a>>>20&15]+c[a>>>16&15]+c[a>>>12&15]+c[a>>>8&15]+c[a>>>4&15]+c[15&a]),u},g.prototype.toString=g.prototype.hex,g.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||u.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),u},g.prototype.array=g.prototype.digest,g.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},x.prototype=new g,x.prototype.finalize=function(){if(g.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();g.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),g.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=w(),k.sha224.hmac=w(!0),a?e.exports=k:(i.sha256=k.sha256,i.sha224=k.sha224,u&&define(function(){return k}))}()},"../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js":function(e,t,n){n.d(t,{Z:()=>f});var r=n("../../node_modules/preact/dist/preact.module.js");function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=["context","children"];function s(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,o);return(0,r.Tm)(t,n)}function a(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,r.h)(s,i({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],o={},s=0,a=t.attributes,l=t.childNodes;for(s=a.length;s--;)"slot"!==a[s].name&&(o[a[s].name]=a[s].value,o[u(a[s].name)]=a[s].value);for(s=l.length;s--;){var c=e(l[s],null),f=l[s].slot;f?o[f]=(0,r.h)(_,{name:f},c):i[s]=c}var h=n?(0,r.h)(_,null,i):i;return(0,r.h)(n||t.nodeName.toLowerCase(),o,h)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?r.ZB:r.sY)(this._vdom,this._root)}function u(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function l(e,t,n){if(this._vdom){var i={};i[e]=n=null==n?void 0:n,i[u(e)]=n,this._vdom=(0,r.Tm)(this._vdom,i),(0,r.sY)(this._vdom,this._root)}}function c(){(0,r.sY)(this._vdom=null,this._root)}function _(e,t){var n=this;return(0,r.h)("slot",i({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function f(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=a,i.prototype.attributeChangedCallback=l,i.prototype.disconnectedCallback=c,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i)}},"../../node_modules/preact/dist/preact.module.js":function(e,t,n){n.d(t,{HY:()=>x,Tm:()=>H,YM:()=>i,ZB:()=>$,az:()=>w,bR:()=>function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(v(t)?t.some(function(t){e(t,n)}):n.push(t)),n},h:()=>w,sY:()=>T,wA:()=>k});var r,i,o,s,a,u,l,c,_,f,h,d={},p=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,n){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return g(e,a,i,o,null)}function g(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++o:s,__i:-1,__u:0};return null==s&&null!=i.vnode&&i.vnode(a),a}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?A(e):null}function P(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!S.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||u)(S)}function S(){for(var e,t,n,r,o,a,u=1;s.length;)s.length>u&&s.sort(l),e=s.shift(),u=s.length,e.__d&&(t=void 0,r=(n=e.__v).__e,o=[],a=[],e.__P&&((t=y({},n)).__v=n.__v+1,i.vnode&&i.vnode(t),B(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?A(n):r,!!(32&n.__u),a),t.__v=n.__v,t.__.__k[t.__i]=t,E(o,t,a),t.__e!=r&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(t)));S.__r=0}function j(e,t,n,r,o,s,a,u,l,c,_){var f,h,m,y,w,k,P=r&&r.__k||p,S=t.length;for(l=function(e,t,n,r,o){var s,a,u,l,c,_=n.length,f=_,h=0;for(e.__k=Array(o),s=0;s<o;s++)null!=(a=t[s])&&"boolean"!=typeof a&&"function"!=typeof a?(l=s+h,(a=e.__k[s]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?g(null,a,null,null,null):v(a)?g(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?g(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,u=null,-1!==(c=a.__i=function(e,t,n,r){var i,o,s=e.key,a=e.type,u=t[n];if(null===u&&null==e.key||u&&s==u.key&&a===u.type&&0==(2&u.__u))return n;if(r>+(null!=u&&0==(2&u.__u)))for(i=n-1,o=n+1;i>=0||o<t.length;){if(i>=0){if((u=t[i])&&0==(2&u.__u)&&s==u.key&&a===u.type)return i;i--}if(o<t.length){if((u=t[o])&&0==(2&u.__u)&&s==u.key&&a===u.type)return o;o++}}return -1}(a,n,l,f))&&(f--,(u=n[c])&&(u.__u|=2)),null==u||null===u.__v?(-1==c&&(o>_?h--:o<_&&h++),"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[s]=null;if(f)for(s=0;s<_;s++)null!=(u=n[s])&&0==(2&u.__u)&&(u.__e==r&&(r=A(u)),function e(t,n,r){var o,s;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||U(o,null,n)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){i.__e(e,n)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&e(o[s],n,r||"function"!=typeof t.type);r||b(t.__e),t.__c=t.__=t.__e=void 0}(u,u));return r}(n,t,P,l,S),f=0;f<S;f++)null!=(m=n.__k[f])&&(h=-1===m.__i?d:P[m.__i]||d,m.__i=f,k=B(e,m,h,o,s,a,u,l,c,_),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&U(h.ref,null,m),_.push(m.ref,m.__c||y,m)),null==w&&null!=y&&(w=y),4&m.__u||h.__k===m.__k?l=function e(t,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,n=e(i[o],n,r));return n}t.__e!=n&&(n&&t.type&&!r.contains(n)&&(n=A(t)),r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8==n.nodeType);return n}(m,l,e):"function"==typeof m.type&&void 0!==k?l=k:y&&(l=y.nextSibling),m.__u&=-7);return n.__e=w,l}function C(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||m.test(t)?n:n+"px"}function I(e,t,n,r,i){var o;e:if("style"==t){if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||C(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||C(e.style,t,n[t])}}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(c,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.t=r.t:(n.t=_,e.addEventListener(t,o?h:f,o)):e.removeEventListener(t,o?h:f,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function z(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.u)t.u=_++;else if(t.u<n.t)return;return n(i.event?i.event(t):t)}}}function B(e,t,n,o,s,a,u,l,c,_){var f,h,p,m,w,g,P,S,C,z,B,E,U,T,$,H,M,N=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=t.__e=n.__e]),(f=i.__b)&&f(t);e:if("function"==typeof N)try{if(S=t.props,C="prototype"in N&&N.prototype.render,z=(f=N.contextType)&&o[f.__c],B=f?z?z.props.value:f.__:o,n.__c?P=(h=t.__c=n.__c).__=h.__E:(C?t.__c=h=new N(S,B):(t.__c=h=new k(S,B),h.constructor=N,h.render=O),z&&z.sub(h),h.props=S,h.state||(h.state={}),h.context=B,h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=N.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=y({},h.__s)),y(h.__s,N.getDerivedStateFromProps(S,h.__s))),m=h.props,w=h.state,h.__v=t,p)C&&null==N.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==N.getDerivedStateFromProps&&S!==m&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,B),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,B)||t.__v==n.__v)){for(t.__v!=n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&u.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,B),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(m,w,g)})}if(h.context=B,h.props=S,h.__P=e,h.__e=!1,U=i.__r,T=0,C){for(h.state=h.__s,h.__d=!1,U&&U(t),f=h.render(h.props,h.state,h.context),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[]}else do h.__d=!1,U&&U(t),f=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++T<25);h.state=h.__s,null!=h.getChildContext&&(o=y(y({},o),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(m,w)),H=f,null!=f&&f.type===x&&null==f.key&&(H=function e(t){return"object"!=typeof t||null==t?t:v(t)?t.map(e):y({},t)}(f.props.children)),l=j(e,v(H)?H:[H],t,n,o,s,a,u,l,c,_),h.base=t.__e,t.__u&=-161,h.__h.length&&u.push(h),P&&(h.__E=h.__=null)}catch(e){if(t.__v=null,c||null!=a){if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,t.__e=l}else for(M=a.length;M--;)b(a[M])}else t.__e=n.__e,t.__k=n.__k;i.__e(e,t,n)}else null==a&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=function(e,t,n,o,s,a,u,l,c){var _,f,h,p,m,y,w,g=n.props,x=t.props,k=t.type;if("svg"==k?s="http://www.w3.org/2000/svg":"math"==k?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a){for(_=0;_<a.length;_++)if((m=a[_])&&"setAttribute"in m==!!k&&(k?m.localName==k:3==m.nodeType)){e=m,a[_]=null;break}}if(null==e){if(null==k)return document.createTextNode(x);e=document.createElementNS(s,k,x.is&&x),l&&(i.__m&&i.__m(t,a),l=!1),a=null}if(null===k)g===x||l&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),g=n.props||d,!l&&null!=a)for(g={},_=0;_<e.attributes.length;_++)g[(m=e.attributes[_]).name]=m.value;for(_ in g)if(m=g[_],"children"==_);else if("dangerouslySetInnerHTML"==_)h=m;else if(!(_ in x)){if("value"==_&&"defaultValue"in x||"checked"==_&&"defaultChecked"in x)continue;I(e,_,null,m,s)}for(_ in x)m=x[_],"children"==_?p=m:"dangerouslySetInnerHTML"==_?f=m:"value"==_?y=m:"checked"==_?w=m:l&&"function"!=typeof m||g[_]===m||I(e,_,m,g[_],s);if(f)l||h&&(f.__html===h.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(h&&(e.innerHTML=""),j("template"===t.type?e.content:e,v(p)?p:[p],t,n,o,"foreignObject"==k?"http://www.w3.org/1999/xhtml":s,a,u,a?a[0]:n.__k&&A(n,0),l,c),null!=a)for(_=a.length;_--;)b(a[_]);l||(_="value","progress"==k&&null==y?e.removeAttribute("value"):void 0===y||y===e[_]&&("progress"!=k||y)&&("option"!=k||y===g[_])||I(e,_,y,g[_],s),_="checked",void 0!==w&&w!==e[_]&&I(e,_,w,g[_],s))}return e}(n.__e,t,n,o,s,a,u,c,_);return(f=i.diffed)&&f(t),128&t.__u?void 0:l}function E(e,t,n){for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function U(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function O(e,t,n){return this.constructor(e,n)}function T(e,t,n){var o,s,a,u;t==document&&(t=document.documentElement),i.__&&i.__(e,t),s=(o="function"==typeof n)?null:n&&n.__k||t.__k,a=[],u=[],B(t,e=(!o&&n||t).__k=w(x,null,[e]),s||d,d,t.namespaceURI,!o&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!o&&n?n:s?s.__e:t.firstChild,o,u),E(a,e,u)}function $(e,t){T(e,t,$)}function H(e,t,n){var i,o,s,a,u=y({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?i=t[s]:"ref"==s?o=t[s]:u[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(u.children=arguments.length>3?r.call(arguments,2):n),g(e.type,u,i||e.key,o||e.ref,null)}r=p.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},k.prototype.render=x,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,c=/(PointerCapture)$|Capture$/i,_=0,f=z(!1),h=z(!0)},"../../node_modules/preact/hooks/dist/hooks.module.js":function(e,t,n){n.d(t,{I4:()=>x,Ye:()=>g,d4:()=>b,eJ:()=>y,sO:()=>w});var r,i,o,s,a=n("../../node_modules/preact/dist/preact.module.js"),u=0,l=[],c=a.YM,_=c.__b,f=c.__r,h=c.diffed,d=c.__c,p=c.unmount,m=c.__;function v(e,t){c.__h&&c.__h(i,e,u||t),u=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return u=1,function(e,t,n){var o=v(r++,2);if(o.t=e,!o.__c&&(o.__=[C(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.__f)){var s=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return!!e.__c});if(r.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var i=o.__c.props!==e;return r.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),a&&a.call(this,e,t,n)||i};i.__f=!0;var a=i.shouldComponentUpdate,u=i.componentWillUpdate;i.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}u&&u.call(this,e,t,n)},i.shouldComponentUpdate=s}return o.__N||o.__}(C,e)}function b(e,t){var n=v(r++,3);!c.__s&&j(n.__H,t)&&(n.__=e,n.u=t,i.__H.__h.push(n))}function w(e){return u=5,g(function(){return{current:e}},[])}function g(e,t){var n=v(r++,7);return j(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function x(e,t){return u=8,g(function(){return e},t)}function k(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(S),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){i=null,_&&_(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),m&&m(e,t)},c.__r=function(e){f&&f(e),r=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(P),t.__h.forEach(S),t.__h=[],r=0)),o=i},c.diffed=function(e){h&&h(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),A&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);A&&(t=requestAnimationFrame(n))})(k)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),o=i=null},c.__c=function(e,t){t.some(function(e){try{e.__h.forEach(P),e.__h=e.__h.filter(function(e){return!e.__||S(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],c.__e(n,e.__v)}}),d&&d(e,t)},c.unmount=function(e){p&&p(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{P(e)}catch(e){t=e}}),n.__H=void 0,t&&c.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function P(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function S(e){var t=i;e.__c=e.__(),i=t}function j(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function C(e,t){return"function"==typeof t?t(e):t}},"../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js":function(e,t,n){n.d(t,{BX:()=>o,HY:()=>r.HY,tZ:()=>o});var r=n("../../node_modules/preact/dist/preact.module.js"),i=0;function o(e,t,n,o,s,a){t||(t={});var u,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?u=t[l]:c[l]=t[l];var _={type:e,props:c,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--i,__i:-1,__u:0,__source:s,__self:a};if("function"==typeof e&&(u=e.defaultProps))for(l in u)void 0===c[l]&&(c[l]=u[l]);return r.YM.vnode&&r.YM.vnode(_),_}},"../../node_modules/viem/_esm/errors/base.js":function(e,t,n){n.d(t,{G:()=>o});let r="2.23.9",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${r}`};class o extends Error{constructor(e,t={}){let n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof o&&t.cause.docsPath||t.docsPath,a=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.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=n,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=r}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}}},"../../node_modules/viem/_esm/errors/encoding.js":function(e,t,n){n.d(t,{J5:()=>i,M6:()=>o});var r=n("../../node_modules/viem/_esm/errors/base.js");class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}r.G,r.G,r.G;class o extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},"../../node_modules/viem/_esm/utils/address/isAddressEqual.js":function(e,t,n){n.d(t,{E:()=>f});var r=n("../../node_modules/viem/_esm/errors/base.js");class i extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class o extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}var s=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),a=n("../../node_modules/viem/_esm/utils/hash/keccak256.js");let u=new o(8192),l=/^0x[a-fA-F0-9]{40}$/,c=new o(8192);function _(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(c.has(r))return c.get(r);let i=!!l.test(e)&&(e.toLowerCase()===e||!n||function(e,t){if(u.has(`${e}.undefined`))return u.get(`${e}.${void 0}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,s.qX)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&r[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let o=`0x${i.join("")}`;return u.set(`${e}.${t}`,o),o}(e)===e);return c.set(r,i),i}function f(e,t){if(!_(e,{strict:!1}))throw new i({address:e});if(!_(t,{strict:!1}))throw new i({address:t});return e.toLowerCase()===t.toLowerCase()}},"../../node_modules/viem/_esm/utils/data/concat.js":function(e,t,n){n.d(t,{SM:()=>r});function r(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}},"../../node_modules/viem/_esm/utils/data/isHex.js":function(e,t,n){n.d(t,{v:()=>r});function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},"../../node_modules/viem/_esm/utils/data/pad.js":function(e,t,n){n.d(t,{vk:()=>o});var r=n("../../node_modules/viem/_esm/errors/base.js");r.G;class i extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function o(e,{dir:t,size:n=32}={}){return"string"==typeof e?function(e,{dir:t,size:n=32}={}){if(null===n)return e;let r=e.replace("0x","");if(r.length>2*n)throw new i({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new i({size:e.length,targetSize:n,type:"bytes"});let r=new Uint8Array(n);for(let i=0;i<n;i++){let o="right"===t;r[o?i:n-i-1]=e[o?i:e.length-i-1]}return r}(e,{dir:t,size:n})}r.G},"../../node_modules/viem/_esm/utils/encoding/fromHex.js":function(e,t,n){n.d(t,{Yf:()=>s});var r=n("../../node_modules/viem/_esm/errors/encoding.js"),i=n("../../node_modules/viem/_esm/utils/data/isHex.js");function o(e){return(0,i.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function s(e,{size:t}){if(o(e)>t)throw new r.M6({givenSize:o(e),maxSize:t})}},"../../node_modules/viem/_esm/utils/encoding/toBytes.js":function(e,t,n){n.d(t,{O0:()=>l,nr:()=>f,qX:()=>h});var r=n("../../node_modules/viem/_esm/errors/base.js"),i=n("../../node_modules/viem/_esm/utils/data/isHex.js"),o=n("../../node_modules/viem/_esm/utils/data/pad.js"),s=n("../../node_modules/viem/_esm/utils/encoding/fromHex.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toHex.js");let u=new TextEncoder;function l(e,t={}){var n,r;return"number"==typeof e||"bigint"==typeof e?(n=e,r=t,f((0,a.eC)(n,r))):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,s.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?f(e,t):h(e,t)}let c={zero:48,nine:57,A:65,F:70,a:97,f:102};function _(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function f(e,t={}){let n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,o.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,u=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let n=_(i.charCodeAt(t++)),o=_(i.charCodeAt(t++));if(void 0===n||void 0===o)throw new r.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);u[e]=16*n+o}return u}function h(e,t={}){let n=u.encode(e);return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,o.vk)(n,{dir:"right",size:t.size})):n}},"../../node_modules/viem/_esm/utils/encoding/toHex.js":function(e,t,n){n.d(t,{NC:()=>a,ci:()=>u,eC:()=>l});var r=n("../../node_modules/viem/_esm/errors/encoding.js"),i=n("../../node_modules/viem/_esm/utils/data/pad.js"),o=n("../../node_modules/viem/_esm/utils/encoding/fromHex.js");let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?function(e,t={}){return u(c.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}(e,t):u(e,t)}function u(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=s[e[t]];let r=`0x${n}`;return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,i.vk)(r,{dir:"right",size:t.size})):r}function l(e,t={}){let n;let{signed:o,size:s}=t,a=BigInt(e);s?n=o?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let u="bigint"==typeof n&&o?-n-1n:0;if(n&&a>n||a<u){let t="bigint"==typeof e?"n":"";throw new r.J5({max:n?`${n}${t}`:void 0,min:`${u}${t}`,signed:o,size:s,value:`${e}${t}`})}let c=`0x${(o&&a<0?(1n<<BigInt(8*s))+BigInt(a):a).toString(16)}`;return s?(0,i.vk)(c,{size:s}):c}let c=new TextEncoder},"../../node_modules/viem/_esm/utils/hash/keccak256.js":function(e,t,n){function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function i(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}n.d(t,{w:()=>O});let s=BigInt(0x100000000-1),a=BigInt(32),u=(e,t,n)=>e<<n|t>>>32-n,l=(e,t,n)=>t<<n|e>>>32-n,c=(e,t,n)=>t<<n-32|e>>>64-n,_=(e,t,n)=>e<<n-32|t>>>64-n,f=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function h(e){for(let n=0;n<e.length;n++){var t;e[n]=(t=e[n])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}}function d(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),i(e),e}class p{clone(){return this._cloneInto()}}let m=[],v=[],y=[],b=BigInt(0),w=BigInt(1),g=BigInt(2),x=BigInt(7),k=BigInt(256),A=BigInt(113);for(let e=0,t=w,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],m.push(2*(5*r+n)),v.push((e+1)*(e+2)/2%64);let i=b;for(let e=0;e<7;e++)(t=(t<<w^(t>>x)*A)%k)&g&&(i^=w<<(w<<BigInt(e))-w);y.push(i)}let[P,S]=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:u}=function(e,t=!1){return t?{h:Number(e&s),l:Number(e>>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}(e[i],t);[n[i],r[i]]=[o,u]}return[n,r]}(y,!0),j=(e,t,n)=>n>32?c(e,t,n):u(e,t,n),C=(e,t,n)=>n>32?_(e,t,n):l(e,t,n);class I extends p{constructor(e,t,n,i=!1,o=24){var s;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=new Uint32Array((s=this.state).buffer,s.byteOffset,Math.floor(s.byteLength/4))}keccak(){f||h(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,o=n[i],s=n[i+1],a=j(o,s,1)^n[r],u=C(o,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=v[n],o=j(t,i,r),s=C(t,i,r),a=m[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=P[r],e[1]^=S[r]}n.fill(0)}(this.state32,this.rounds),f||h(this.state32),this.posOut=0,this.pos=0}update(e){o(this);let{blockLen:t,state:n}=this,r=(e=d(e)).length;for(let i=0;i<r;){let o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){o(this,!1),i(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(!function(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new I(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}let z=function(e){let t=t=>e().update(d(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new I(136,1,32));var B=n("../../node_modules/viem/_esm/utils/data/isHex.js"),E=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),U=n("../../node_modules/viem/_esm/utils/encoding/toHex.js");function O(e,t){let n=z((0,B.v)(e,{strict:!1})?(0,E.O0)(e):e);return"bytes"===(t||"hex")?n:(0,U.NC)(n)}}};
|
package/cdn/button-share.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_ids__=["766"];export const __webpack_modules__={"./src/components/ButtonShare/index.ts":function(e,t,o){o.r(t),o.d(t,{ButtonShare:()=>S});var n=o("./src/utils/registerWebComponent.ts"),r=o("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js");let a=function(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=function e(t){var o,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t){if(Array.isArray(t)){var a=t.length;for(o=0;o<a;o++)t[o]&&(n=e(t[o]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n)}return r}(e))&&(n&&(n+=" "),n+=t);return n},i="spinner__leaf-xtOJmT",s=({ref:e,className:t,...o})=>(0,r.BX)("span",{...o,ref:e,className:a("spinner-KHk8mw"),children:[(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i})]});s.displayName="Spinner";var l=o("./src/hooks/useClientReady.ts"),c=o("./src/hooks/useReward.ts"),d=o("../core/dist/actions.js"),p=o("../../node_modules/preact/hooks/dist/hooks.module.js");let u={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},m={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},f={margin:0,fontSize:"16px",fontWeight:500},h={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},b={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},x={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function y({debugInfo:e}){let[t,o]=(0,p.eJ)(!1);return(0,r.BX)("div",{children:[(0,r.tZ)("button",{type:"button",style:x,onClick:()=>o(!t),children:"Ouvrir les informations"}),t&&(0,r.tZ)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function g({debugInfo:e}){let{copied:t,copy:o}=function(e={}){let{successDuration:t=2e3}=e,[o,n]=(0,p.eJ)(!1);return{copy:(0,p.I4)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),n(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),n(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{n(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:o}}();return(0,r.BX)("div",{style:u,children:[(0,r.tZ)("div",{style:m,children:(0,r.tZ)("h3",{style:f,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,r.BX)("p",{style:h,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,r.tZ)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:b,children:"help@frak-labs.com"})," ",(0,r.tZ)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,r.tZ)("button",{type:"button",onClick:()=>o(e??""),style:x,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,r.tZ)(y,{debugInfo:e})]})}var w=o("./src/utils/setup.ts"),k=o("../core/dist/index.js");async function v(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,d.Hq)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function S({text:e="Share and earn!",classname:t="",useReward:o,noRewardText:n,targetInteraction:i,showWallet:d}){let u=(0,p.Ye)(()=>void 0!==o,[o]),m=(0,p.Ye)(()=>void 0!==d,[d]),{isClientReady:f}=(0,l.t)(),{reward:h}=(0,c.w)(u&&f,i),{handleShare:b,isError:x,debugInfo:y}=function(e){let[t,o]=(0,p.eJ)(void 0),[n,r]=(0,p.eJ)(!1);return{handleShare:(0,p.I4)(async()=>{if(!window.FrakSetup?.client){console.error("Frak client not found"),o(k.oC.empty().formatDebugInfo("Frak client not found")),r(!0);return}let t=(0,w.Gt)();if(!t)throw Error("modalBuilderSteps not found");try{await t.sharing(window.FrakSetup?.modalShareConfig??{}).display(t=>({...t,targetInteraction:e}))}catch(e){if(e instanceof k.u&&e.code===k.ss.clientAborted){console.debug("User aborted the modal");return}o(window.FrakSetup.client.debugInfo.formatDebugInfo(e)),r(!0),console.error("Error while opening the modal",e)}},[e]),isError:n,debugInfo:t}}(i),S=(0,p.Ye)(()=>u?h?e.includes("{REWARD}")?e.replace("{REWARD}",h):`${e} ${h}`:n??e.replace("{REWARD}",""):e,[u,e,n,h]),Z=(0,p.I4)(async()=>await (m?v():b()),[m,b]);return(0,r.BX)(r.HY,{children:[(0,r.BX)("button",{type:"button",className:a("buttonShare-F23Y9m",t),onClick:Z,children:[!f&&(0,r.tZ)(s,{})," ",S]}),x&&(0,r.tZ)(g,{debugInfo:y})]})}(0,n.A)(S,"frak-button-share",["text"],{shadow:!1})}};
|
package/cdn/button-wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_ids__=["438"];export const __webpack_modules__={"./src/components/ButtonWallet/index.ts":function(e,t,n){n.r(t),n.d(t,{ButtonWallet:()=>W});var o=n("./src/utils/registerWebComponent.ts"),r=n("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"),i=n("./src/hooks/useClientReady.ts"),l=n("./src/hooks/useReward.ts"),_=n("../../node_modules/preact/hooks/dist/hooks.module.js"),a=n("../../node_modules/preact/dist/preact.module.js");function u(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function c(e,t){this.props=e,this.context=t}(c.prototype=new a.wA).isPureReactComponent=!0,c.prototype.shouldComponentUpdate=function(e,t){return u(this.props,e)||u(this.state,t)};var s=a.YM.__b;a.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),s&&s(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var p=a.YM.__e;a.YM.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}p(e,t,n,o)};var f=a.YM.unmount;function d(){this.__u=0,this.o=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function h(){this.i=null,this.l=null}a.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),f&&f(e)},(d.prototype=new a.wA).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=v(o.__v),i=!1,l=function(){i||(i=!0,n.__R=null,r?r(_):_())};n.__R=l;var _=function(){if(!--o.__u){if(o.state.__a){var e,t=o.state.__a;o.__v.__k[0]=function e(t,n,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)}),t.__c&&t.__c.__P===n&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}(t,t.__c.__P,t.__c.__O)}for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(l,l)},d.prototype.componentWillUnmount=function(){this.o=[]},d.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)})),t}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&(0,a.az)(a.HY,null,e.fallback);return r&&(r.__u&=-33),[(0,a.az)(a.HY,null,t.__a?null:e.children),r]};var m=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(h.prototype=new a.wA).__a=function(e){var t=this,n=v(t.__v),o=t.l.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),m(t,e,o)):r()};n?n(i):i()}},h.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,a.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},h.prototype.componentDidUpdate=h.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){m(e,n,t)})};var b="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,y=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,w=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,k=/[A-Z0-9]/g,g="undefined"!=typeof document;a.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(a.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var M=a.YM.event;function S(){}function Y(){return this.cancelBubble}function x(){return this.defaultPrevented}a.YM.event=function(e){return M&&(e=M(e)),e.persist=S,e.isPropagationStopped=Y,e.isDefaultPrevented=x,e.nativeEvent=e};var P={enumerable:!1,configurable:!0,get:function(){return this.class}},R=a.YM.vnode;a.YM.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1===n.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||g&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var _,u=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===u&&"no"===l?l=!1:"o"===u[0]&&"n"===u[1]?"ondoubleclick"===u?i="ondblclick":"onchange"!==u||"input"!==n&&"textarea"!==n||(_=t.type,("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(_))?"onfocus"===u?i="onfocusin":"onblur"===u?i="onfocusout":w.test(i)&&(i=u):u=i="oninput":r&&y.test(i)?i=i.replace(k,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===u&&o[i=u]&&(i="oninputCapture"),o[i]=l}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,a.bR)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=(0,a.bR)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",P)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=b,R&&R(e)};var C=a.YM.__r;a.YM.__r=function(e){C&&C(e),e.__c};var O=a.YM.diffed;a.YM.diffed=function(e){O&&O(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};let A=e=>(0,r.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 28 28",...e,children:(0,r.tZ)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M23.143 14v11.428H4.857V14M14 25.428V8.286m0 0H8.857a2.857 2.857 0 0 1 0-5.715c4 0 5.143 5.715 5.143 5.715m0 0h5.143a2.857 2.857 0 1 0 0-5.715c-4 0-5.143 5.715-5.143 5.715m-11.429 0h22.857V14H2.571z"})});var j=n("../core/dist/actions.js");function H(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,j.Hq)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function W({classname:e="",useReward:t,targetInteraction:n}){let o=(0,_.Ye)(()=>void 0!==t,[t]),a=(0,_.sO)(null),{isClientReady:u}=(0,i.t)(),{reward:c}=(0,l.w)(o&&u,n);return(0,_.d4)(()=>{let e=window.FrakSetup?.modalWalletConfig?.metadata?.position;a.current?.parentElement?.classList.add(e??"right")},[]),(0,r.BX)("button",{ref:a,type:"button",class:e,disabled:!u,onClick:H,children:[(0,r.tZ)(A,{}),c&&(0,r.tZ)("span",{children:c})]})}(0,o.A)(W,"frak-button-wallet",[],{shadow:!1})}};
|
package/cdn/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,r={},
|
|
1
|
+
var e,t,r={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e].call(i.exports,i,i.exports,n),i.exports}n.m=r,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>""+(({438:"button-wallet",766:"button-share"})[e]||e)+".js",n.miniCssF=e=>""+({438:"button-wallet",766:"button-share"})[e]+".css",(()=>{n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{if("undefined"!=typeof document){var e=function(e,t,r,o,i){var a=document.createElement("link");return a.rel="stylesheet",a.type="text/css",n.nc&&(a.nonce=n.nc),a.onerror=a.onload=function(r){if(a.onerror=a.onload=null,"load"===r.type)o();else{var n=r&&("load"===r.type?"missing":r.type),l=r&&r.target&&r.target.href||t,s=Error("Loading CSS chunk "+e+" failed.\\n("+l+")");s.code="CSS_CHUNK_LOAD_FAILED",s.type=n,s.request=l,a.parentNode&&a.parentNode.removeChild(a),i(s)}},a.href=t,r?r.parentNode.insertBefore(a,r.nextSibling):document.head.appendChild(a),a},t=function(e,t){for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],i=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(i===e||i===t))return n}for(var a=document.getElementsByTagName("style"),o=0;o<a.length;o++){var n=a[o],i=n.getAttribute("data-href");if(i===e||i===t)return n}},r={276:0};n.f.miniCss=function(o,i){if(r[o])i.push(r[o]);else if(0!==r[o]&&({438:1,766:1})[o])i.push(r[o]=new Promise(function(r,i){var a=n.miniCssF(o),l=n.p+a;if(t(a,l))return r();e(o,l,null,r,i)}).then(function(){r[o]=0},function(e){throw delete r[o],e}))}}})(),e={276:0},t=t=>{var r,o,i=t.__webpack_ids__,a=t.__webpack_modules__,l=t.__webpack_runtime__,s=0;for(r in a)n.o(a,r)&&(n.m[r]=a[r]);for(l&&l(n);s<i.length;s++)o=i[s],n.o(e,o)&&e[o]&&e[o][0](),e[i[s]]=0},n.f.j=function(r,o){var i=n.o(e,r)?e[r]:void 0;if(0!==i){if(i)o.push(i[1]);else{var a=import("./"+n.u(r)).then(t,t=>{throw 0!==e[r]&&(e[r]=void 0),t}),a=Promise.race([a,new Promise(t=>{i=e[r]=[t]})]);o.push(i[1]=a)}}};const i={"button-share":()=>Promise.all([n.e("413"),n.e("364"),n.e("766")]).then(n.bind(n,"./src/components/ButtonShare/index.ts")),"button-wallet":()=>Promise.all([n.e("413"),n.e("364"),n.e("438")]).then(n.bind(n,"./src/components/ButtonWallet/index.ts"))},a=new MutationObserver(e=>{for(let{addedNodes:t}of e)for(let e of Array.from(t))e.nodeType===Node.ELEMENT_NODE&&l(e)});async function l(e){let t=e instanceof Element?e.tagName.toLowerCase():"",r=t?.startsWith("frak-"),o=Array.from(e.querySelectorAll(":not(:defined)")).map(e=>e.tagName.toLowerCase()).filter(e=>e.startsWith("frak-"));r&&!customElements.get(t)&&o.push(t);let n=[...new Set(o)];await Promise.allSettled(n.map(e=>s(e)))}async function s(e){if(customElements.get(e))return Promise.resolve();try{let t=e.replace(/^frak-/i,"");if(!(t in i))throw Error(`Component ${e} is not supported.`);await i[t]()}catch(e){console.error(e)}}l(document.body),a.observe(document.documentElement,{subtree:!0,childList:!0});
|
package/dist/buttonShare.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as
|
|
1
|
+
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"preact/hooks";let a="frakClientReady";function i(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(a,t,!1)}async function s(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,n.referralInteraction)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}async function l(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,t.setupClient)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),function(){let e=new CustomEvent(a);window.dispatchEvent(e)}(),window.modalBuilderSteps=(0,n.modalBuilder)(e,window.FrakSetup?.modalConfig??{}),s(e),window.frakSetupInProgress=!1}let d=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=function e(t){var n,o,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t){if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(o=e(t[n]))&&(r&&(r+=" "),r+=o)}else for(o in t)t[o]&&(r&&(r+=" "),r+=o)}return r}(e))&&(o&&(o+=" "),o+=t);return o},c="spinner__leaf-xtOJmT",u=({ref:e,className:t,...n})=>(0,o.jsxs)("span",{...n,ref:e,className:d("spinner-KHk8mw"),children:[(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c})]});async function p({targetInteraction:e}){let o=window.FrakSetup?.client;if(!o){console.warn("Frak client not ready yet");return}let{maxReferrer:r,rewards:a}=await (0,n.getProductInformation)(o);if(!r)return;let i=(0,t.getCurrencyAmountKey)(o.config.metadata?.currency),s=Math.ceil(r[i]);if(e){let t=a.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(s=Math.ceil(t))}return(0,t.formatAmount)(s,o.config.metadata?.currency)}u.displayName="Spinner";let f={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},m={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},w={margin:0,fontSize:"16px",fontWeight:500},g={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},y={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},x={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function S({debugInfo:e}){let[t,n]=(0,r.useState)(!1);return(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{type:"button",style:x,onClick:()=>n(!t),children:"Ouvrir les informations"}),t&&(0,o.jsx)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function h({debugInfo:e}){let{copied:t,copy:n}=function(e={}){let{successDuration:t=2e3}=e,[n,o]=(0,r.useState)(!1);return{copy:(0,r.useCallback)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),o(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),o(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{o(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:n}}();return(0,o.jsxs)("div",{style:f,children:[(0,o.jsx)("div",{style:m,children:(0,o.jsx)("h3",{style:w,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,o.jsxs)("p",{style:g,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,o.jsx)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:y,children:"help@frak-labs.com"})," ",(0,o.jsx)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,o.jsx)("button",{type:"button",onClick:()=>n(e??""),style:x,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,o.jsx)(S,{debugInfo:e})]})}async function k(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,n.displayEmbededWallet)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function b({text:e="Share and earn!",classname:n="",useReward:a,noRewardText:s,targetInteraction:l,showWallet:c}){let f=(0,r.useMemo)(()=>void 0!==a,[a]),m=(0,r.useMemo)(()=>void 0!==c,[c]),{isClientReady:w}=function(){let[e,t]=(0,r.useState)(!0),n=(0,r.useCallback)(()=>{t(!1)},[]);return(0,r.useEffect)(()=>(i("add",n),()=>i("remove",n)),[n]),{isClientReady:!e}}(),{reward:g}=function(e,t){let[n,o]=(0,r.useState)(void 0);return(0,r.useEffect)(()=>{e&&p({targetInteraction:t}).then(e=>{e&&o(e)})},[e,t]),{reward:n}}(f&&w,l),{handleShare:y,isError:x,debugInfo:S}=function(e){let[n,o]=(0,r.useState)(void 0),[a,i]=(0,r.useState)(!1);return{handleShare:(0,r.useCallback)(async()=>{if(!window.FrakSetup?.client){console.error("Frak client not found"),o(t.DebugInfoGatherer.empty().formatDebugInfo("Frak client not found")),i(!0);return}let n=function(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}();if(!n)throw Error("modalBuilderSteps not found");try{await n.sharing(window.FrakSetup?.modalShareConfig??{}).display(t=>({...t,targetInteraction:e}))}catch(e){if(e instanceof t.FrakRpcError&&e.code===t.RpcErrorCodes.clientAborted){console.debug("User aborted the modal");return}o(window.FrakSetup.client.debugInfo.formatDebugInfo(e)),i(!0),console.error("Error while opening the modal",e)}},[e]),isError:a,debugInfo:n}}(l),b=(0,r.useMemo)(()=>f?g?e.includes("{REWARD}")?e.replace("{REWARD}",g):`${e} ${g}`:s??e.replace("{REWARD}",""):e,[f,e,s,g]),F=(0,r.useCallback)(async()=>await (m?k():y()),[m,y]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button",className:d("buttonShare-F23Y9m",n),onClick:F,children:[!w&&(0,o.jsx)(u,{})," ",b]}),x&&(0,o.jsx)(h,{debugInfo:S})]})}!function(t,n,o=[],r={shadow:!1}){if("undefined"!=typeof window){var a;a=async function(){await l()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(a,1):document.addEventListener?document.addEventListener("DOMContentLoaded",a):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&a()}),customElements.get(n)||(0,e.default)(t,n,o,r)}}(b,"frak-button-share",["text"],{shadow:!1});export{b as ButtonShare};
|
package/dist/buttonWallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"preact/hooks";import*as i from"preact";let a="frakClientReady";function l(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(a,t,!1)}async function u(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,n.referralInteraction)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}async function
|
|
1
|
+
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"preact/hooks";import*as i from"preact";let a="frakClientReady";function l(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(a,t,!1)}async function u(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,n.referralInteraction)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}async function c(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,t.setupClient)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),function(){let e=new CustomEvent(a);window.dispatchEvent(e)}(),window.modalBuilderSteps=(0,n.modalBuilder)(e,window.FrakSetup?.modalConfig??{}),u(e),window.frakSetupInProgress=!1}async function s({targetInteraction:e}){let o=window.FrakSetup?.client;if(!o){console.warn("Frak client not ready yet");return}let{maxReferrer:r,rewards:i}=await (0,n.getProductInformation)(o);if(!r)return;let a=(0,t.getCurrencyAmountKey)(o.config.metadata?.currency),l=Math.ceil(r[a]);if(e){let t=i.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[a]).reduce((e,t)=>t>e?t:e,0);t>0&&(l=Math.ceil(t))}return(0,t.formatAmount)(l,o.config.metadata?.currency)}function _(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function f(e,t){this.props=e,this.context=t}(f.prototype=new i.Component).isPureReactComponent=!0,f.prototype.shouldComponentUpdate=function(e,t){return _(this.props,e)||_(this.state,t)};var p=i.options.__b;i.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),p&&p(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var d=i.options.__e;i.options.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}d(e,t,n,o)};var m=i.options.unmount;function v(){this.__u=0,this.o=null,this.__b=null}function h(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function w(){this.i=null,this.l=null}i.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),m&&m(e)},(v.prototype=new i.Component).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=h(o.__v),i=!1,a=function(){i||(i=!0,n.__R=null,r?r(l):l())};n.__R=a;var l=function(){if(!--o.__u){if(o.state.__a){var e,t=o.state.__a;o.__v.__k[0]=function e(t,n,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)}),t.__c&&t.__c.__P===n&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}(t,t.__c.__P,t.__c.__O)}for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},v.prototype.componentWillUnmount=function(){this.o=[]},v.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)})),t}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&(0,i.createElement)(i.Fragment,null,e.fallback);return r&&(r.__u&=-33),[(0,i.createElement)(i.Fragment,null,t.__a?null:e.children),r]};var y=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(w.prototype=new i.Component).__a=function(e){var t=this,n=h(t.__v),o=t.l.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),y(t,e,o)):r()};n?n(i):i()}},w.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,i.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},w.prototype.componentDidUpdate=w.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){y(e,n,t)})};var k="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,S=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,b=/[A-Z0-9]/g,C="undefined"!=typeof document;i.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(i.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var F=i.options.event;function E(){}function P(){return this.cancelBubble}function x(){return this.defaultPrevented}i.options.event=function(e){return F&&(e=F(e)),e.persist=E,e.isPropagationStopped=P,e.isDefaultPrevented=x,e.nativeEvent=e};var O={enumerable:!1,configurable:!0,get:function(){return this.class}},R=i.options.vnode;i.options.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1===n.indexOf("-");for(var a in t){var l=t[a];if(!("value"===a&&"defaultValue"in t&&null==l||C&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var u,c=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===l?l="":"translate"===c&&"no"===l?l=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?a="ondblclick":"onchange"!==c||"input"!==n&&"textarea"!==n||(u=t.type,("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(u))?"onfocus"===c?a="onfocusin":"onblur"===c?a="onfocusout":S.test(a)&&(a=c):c=a="oninput":r&&g.test(a)?a=a.replace(b,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===c&&o[a=c]&&(a="oninputCapture"),o[a]=l}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,i.toChildArray)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=(0,i.toChildArray)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",O)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=k,R&&R(e)};var A=i.options.__r;i.options.__r=function(e){A&&A(e),e.__c};var D=i.options.diffed;i.options.diffed=function(e){D&&D(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};let L=e=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 28 28",...e,children:(0,o.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M23.143 14v11.428H4.857V14M14 25.428V8.286m0 0H8.857a2.857 2.857 0 0 1 0-5.715c4 0 5.143 5.715 5.143 5.715m0 0h5.143a2.857 2.857 0 1 0 0-5.715c-4 0-5.143 5.715-5.143 5.715m-11.429 0h22.857V14H2.571z"})});function j(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,n.displayEmbededWallet)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function B({classname:e="",useReward:t,targetInteraction:n}){let i=(0,r.useMemo)(()=>void 0!==t,[t]),a=(0,r.useRef)(null),{isClientReady:u}=function(){let[e,t]=(0,r.useState)(!0),n=(0,r.useCallback)(()=>{t(!1)},[]);return(0,r.useEffect)(()=>(l("add",n),()=>l("remove",n)),[n]),{isClientReady:!e}}(),{reward:c}=function(e,t){let[n,o]=(0,r.useState)(void 0);return(0,r.useEffect)(()=>{e&&s({targetInteraction:t}).then(e=>{e&&o(e)})},[e,t]),{reward:n}}(i&&u,n);return(0,r.useEffect)(()=>{let e=window.FrakSetup?.modalWalletConfig?.metadata?.position;a.current?.parentElement?.classList.add(e??"right")},[]),(0,o.jsxs)("button",{ref:a,type:"button",class:e,disabled:!u,onClick:j,children:[(0,o.jsx)(L,{}),c&&(0,o.jsx)("span",{children:c})]})}!function(t,n,o=[],r={shadow:!1}){if("undefined"!=typeof window){var i;i=async function(){await c()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(i,1):document.addEventListener?document.addEventListener("DOMContentLoaded",i):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&i()}),customElements.get(n)||(0,e.default)(t,n,o,r)}}(B,"frak-button-wallet",[],{shadow:!1});export{B as ButtonWallet};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.12",
|
|
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",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"publish": "echo 'Publishing components...'"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@frak-labs/core-sdk": "0.0.
|
|
56
|
-
"preact": "^10.
|
|
55
|
+
"@frak-labs/core-sdk": "0.0.8",
|
|
56
|
+
"preact": "^10.26.4",
|
|
57
57
|
"preact-custom-element": "^4.3.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@rsbuild/plugin-preact": "^1.3.1",
|
|
61
61
|
"@rsbuild/plugin-svgr": "^1.0.7",
|
|
62
|
-
"@rslib/core": "^0.5.
|
|
62
|
+
"@rslib/core": "^0.5.4",
|
|
63
63
|
"@types/node": "^22",
|
|
64
64
|
"@types/preact-custom-element": "^4.0.4",
|
|
65
65
|
"ts-checker-rspack-plugin": "^1.1.1",
|