PageSourceSearch

https://arcpay.finance/_next/static/chunks/6161.7fda5da0dc7e5fe4.js

js arcpay.finance collected 2026-10-02 01:55:58 UTC 82,998 bytes, 1,175 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6161],{6161:function(e,t,o){o.r(t),o.d(t,{AppKitModal:function(){return eH},W3mListWallet:function(){return eK},W3mModal:function(){return eM},W3mModalBase:function(){return ej},W3mRouterContainer:function(){return eY}});var r=o(31133),i=o(19848),a=o(32801),n=o(70910),s=o(88400),l=o(85613),c=o(82849),d=o(32008),u=o(21028),p=o(45297),w=o(2723),h=o(14140),m=o(7544);let g={isUnsupportedChainView:()=>"UnsupportedChain"===w.RouterController.state.view||"SwitchNetwork"===w.RouterController.state.view&&w.RouterController.state.history.includes("UnsupportedChain"),async safeClose(){if(this.isUnsupportedChainView()||await m.w.isSIWXCloseDisabled()){c.I.shake();return}("DataCapture"===w.RouterController.state.view||"DataCaptureOtpConfirm"===w.RouterController.state.view)&&h.ConnectionController.disconnect(),c.I.close()}};var y=o(94201),b=o(51618),v=o(70859),f=o(1422),k=o(13932),C=o(90155),x=o(87044),T=o(59254),S=o(77538),A=o(40118),P=o(34224);let $={getGasPriceInEther:(e,t)=>Number(t*e)/1e18,getGasPriceInUSD(e,t,o){let r=$.getGasPriceInEther(t,o);return C.C.bigNumber(e).times(r).toNumber()},getPriceImpact({sourceTokenAmount:e,sourceTokenPriceInUSD:t,toTokenPriceInUSD:o,toTokenAmount:r}){let i=C.C.bigNumber(e).times(t),a=C.C.bigNumber(r).times(o);return i.minus(a).div(i).times(100).toNumber()},getMaxSlippage(e,t){let o=C.C.bigNumber(e).div(100);return C.C.multiply(t,o).toNumber()},getProviderFee:(e,t=.0085)=>C.C.bigNumber(e).times(t).toString(),isInsufficientNetworkTokenForGas:(e,t)=>!!C.C.bigNumber(e).eq(0)||C.C.bigNumber(C.C.bigNumber(t||"0")).gt(e),isInsufficientSourceTokenForSwap(e,t,o){let r=o?.find(e=>e.address===t)?.quantity?.numeric;return C.C.bigNumber(r||"0").lt(e)}};var R=o(47365),I=o(20323),E=o(62446),N=o(88367);let O={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:A.bq.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},W=(0,f.sj)({...O}),B={state:W,subscribe:e=>(0,f.Ld)(W,()=>e(W)),subscribeKey:(e,t)=>(0,k.VW)(W,e,t),getParams(){let e=d.R.state.activeChain,t=d.R.getAccountData(e)?.caipAddress??d.R.state.activeCaipAddress,o=v.j.getPlainAddress(t),r=(0,S.EO)(),i=u.ConnectorController.getConnectorId(d.R.state.activeChain);if(!o)throw Error("No address found to swap the tokens from.");let a=!W.toToken?.address||!W.toToken?.decimals,n=!W.sourceToken?.address||!W.sourceToken?.decimals||!C.C.bigNumber(W.sourceTokenAmount).gt(0),l=!W.sourceTokenAmount;return{networkAddress:r,fromAddress:o,fromCaipAddress:t,sourceTokenAddress:W.sourceToken?.address,toTokenAddress:W.toToken?.address,toTokenAmount:W.toTokenAmount,toTokenDecimals:W.toToken?.decimals,sourceTokenAmount:W.sourceTokenAmount,sourceTokenDecimals:W.sourceToken?.decimals,invalidToToken:a,invalidSourceToken:n,invalidSourceTokenAmount:l,availableToSwap:t&&!a&&!n&&!l,isAuthConnector:i===s.b.CONNECTOR_ID.AUTH}},async setSourceToken(e){if(!e){W.sourceToken=e,W.sourceTokenAmount="",W.sourceTokenPriceInUSD=0;return}W.sourceToken=e,await D.setTokenPrice(e.address,"sourceToken")},setSourceTokenAmount(e){W.sourceTokenAmount=e},async setToToken(e){if(!e){W.toToken=e,W.toTokenAmount="",W.toTokenPriceInUSD=0;return}W.toToken=e,await D.setTokenPrice(e.address,"toToken")},setToTokenAmount(e){W.toTokenAmount=e?C.C.toFixed(e,6):""},async setTokenPrice(e,t){let o=W.tokensPriceMap[e]||0;o||(W.loadingPrices=!0,o=await D.getAddressPrice(e)),"sourceToken"===t?W.sourceTokenPriceInUSD=o:"toToken"===t&&(W.toTokenPriceInUSD=o),W.loadingPrices&&(W.loadingPrices=!1),D.getParams().availableToSwap&&!W.switchingTokens&&D.swapTokens()},async switchTokens(){if(!W.initializing&&W.initialized&&!W.switchingTokens){W.switchingTokens=!0;try{let e=W.toToken?{...W.toToken}
1:void 0,t=W.sourceToken?{...W.sourceToken}:void 0,o=e&&""===W.toTokenAmount?"1":W.toTokenAmount;D.setSourceTokenAmount(o),D.setToTokenAmount(""),await D.setSourceToken(e),await D.setToToken(t),W.switchingTokens=!1,D.swapTokens()}catch(e){throw W.switchingTokens=!1,e}}},resetState(){W.myTokensWithBalance=O.myTokensWithBalance,W.tokensPriceMap=O.tokensPriceMap,W.initialized=O.initialized,W.initializing=O.initializing,W.switchingTokens=O.switchingTokens,W.sourceToken=O.sourceToken,W.sourceTokenAmount=O.sourceTokenAmount,W.sourceTokenPriceInUSD=O.sourceTokenPriceInUSD,W.toToken=O.toToken,W.toTokenAmount=O.toTokenAmount,W.toTokenPriceInUSD=O.toTokenPriceInUSD,W.networkPrice=O.networkPrice,W.networkTokenSymbol=O.networkTokenSymbol,W.networkBalanceInUSD=O.networkBalanceInUSD,W.inputError=O.inputError},resetValues(){let{networkAddress:e}=D.getParams(),t=W.tokens?.find(t=>t.address===e);D.setSourceToken(t),D.setToToken(void 0)},getApprovalLoadingState:()=>W.loadingApprovalTransaction,clearError(){W.transactionError=void 0},async initializeState(){if(!W.initializing){if(W.initializing=!0,!W.initialized)try{await D.fetchTokens(),W.initialized=!0}catch(e){W.initialized=!1,b.SnackController.showError("Failed to initialize swap"),w.RouterController.goBack()}W.initializing=!1}},async fetchTokens(){let{networkAddress:e}=D.getParams();await D.getNetworkTokenPrice(),await D.getMyTokensWithBalance();let t=W.myTokensWithBalance?.find(t=>t.address===e);t&&(W.networkTokenSymbol=t.symbol,D.setSourceToken(t),D.setSourceTokenAmount("0"))},async getTokenList(){let e=d.R.state.activeCaipNetwork?.caipNetworkId;if(W.caipNetworkId!==e||!W.tokens)try{W.tokensLoading=!0;let t=await P.n.getTokenList(e);W.tokens=t,W.caipNetworkId=e,W.popularTokens=t.sort((e,t)=>e.symbol<t.symbol?-1:e.symbol>t.symbol?1:0),W.suggestedTokens=t.filter(e=>!!A.bq.SWAP_SUGGESTED_TOKENS.includes(e.symbol))}catch(e){W.tokens=[],W.popularTokens=[],W.suggestedTokens=[]}finally{W.tokensLoading=!1}},async getAddressPrice(e){let t=W.tokensPriceMap[e];if(t)return t;let o=await E.L.fetchTokenPrice({addresses:[e]}),r=o?.fungibles||[],i=[...W.tokens||[],...W.myTokensWithBalance||[]],a=i?.find(t=>t.address===e)?.symbol,n=parseFloat((r.find(e=>e.symbol.toLowerCase()===a?.toLowerCase())?.price||0).toString());return W.tokensPriceMap[e]=n,n},async getNetworkTokenPrice(){let{networkAddress:e}=D.getParams(),t=await E.L.fetchTokenPrice({addresses:[e]}).catch(()=>(b.SnackController.showError("Failed to fetch network token price"),{fungibles:[]})),o=t.fungibles?.[0],r=o?.price.toString()||"0";W.tokensPriceMap[e]=parseFloat(r),W.networkTokenSymbol=o?.symbol||"",W.networkPrice=r},async getMyTokensWithBalance(e){let t=await T.Q.getMyTokensWithBalance(e),o=P.n.mapBalancesToSwapTokens(t);o&&(await D.getInitialGasPrice(),D.setBalances(o))},setBalances(e){let{networkAddress:t}=D.getParams(),o=d.R.state.activeCaipNetwork;if(!o)return;let r=e.find(e=>e.address===t);e.forEach(e=>{W.tokensPriceMap[e.address]=e.price||0}),W.myTokensWithBalance=e.filter(e=>e.address.startsWith(o.caipNetworkId)),W.networkBalanceInUSD=r?C.C.multiply(r.quantity.numeric,r.price).toString():"0"},async getInitialGasPrice(){let e=await P.n.fetchGasPrice();if(!e)return{gasPrice:null,gasPriceInUSD:null};switch(d.R.state?.activeCaipNetwork?.chainNamespace){case s.b.CHAIN.SOLANA:return W.gasFee=e.standard??"0",W.gasPriceInUSD=C.C.multiply(e.standard,W.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(W.gasFee),gasPriceInUSD:Number(W.gasPriceInUSD)};case s.b.CHAIN.EVM:default:let t=e.standard??"0",o=BigInt(t),r=BigInt(15e4),i=$.getGasPriceInUSD(W.networkPrice,r,o);return W.gasFee=t,W.gasPriceInUSD=i,{gasPrice:o,gasPriceInUSD:i}}},async swapTokens(){let e=d.R.getAccountData()?.address,t=W.sourceToken,o=W.toToken,r=C.C.bigNumber(W.sourceTokenAmount).gt(0);if(r||D.setToTokenAmount(""),!o||!t||W.loadingPrices||!r||!e)return;W.loadingQuote=!0;let i=C.C.bigNumber(W.sourceTokenAmount).times(10**t.decimals).round(0);try{let r=await E.L.fetchSwapQuote({userAddress:e,from:t.address,to:o.address,gasPrice:W.gasFee,amount:i.toString()});W.loadingQuote=!1;let a=r?.quotes?.[0]?.toAmount;if(!a){I.AlertController.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}let n=C.C.bigNumber(a).div(10**o.decimals).toString();D.setToTokenAmount(n),D.hasInsufficientToken(W.sourceTokenAmount,t.address)?W.inputError="Insufficient balance":(W.inputError=void 0,D.setTransactionDetail
1s())}catch(t){let e=await P.n.handleSwapError(t);W.loadingQuote=!1,W.inputError=e||"Insufficient balance"}},async getTransaction(){let{fromCaipAddress:e,availableToSwap:t}=D.getParams(),o=W.sourceToken,r=W.toToken;if(e&&t&&o&&r&&!W.loadingQuote)try{let t;return W.loadingBuildTransaction=!0,t=await P.n.fetchSwapAllowance({userAddress:e,tokenAddress:o.address,sourceTokenAmount:W.sourceTokenAmount,sourceTokenDecimals:o.decimals})?await D.createSwapTransaction():await D.createAllowanceTransaction(),W.loadingBuildTransaction=!1,W.fetchError=!1,t}catch(e){w.RouterController.goBack(),b.SnackController.showError("Failed to check allowance"),W.loadingBuildTransaction=!1,W.approvalTransaction=void 0,W.swapTransaction=void 0,W.fetchError=!0;return}},async createAllowanceTransaction(){let{fromCaipAddress:e,sourceTokenAddress:t,toTokenAddress:o}=D.getParams();if(e&&o){if(!t)throw Error("createAllowanceTransaction - No source token address found.");try{let r=await E.L.generateApproveCalldata({from:t,to:o,userAddress:e}),i=v.j.getPlainAddress(r.tx.from);if(!i)throw Error("SwapController:createAllowanceTransaction - address is required");let a={data:r.tx.data,to:i,gasPrice:BigInt(r.tx.eip155.gasPrice),value:BigInt(r.tx.value),toAmount:W.toTokenAmount};return W.swapTransaction=void 0,W.approvalTransaction={data:a.data,to:a.to,gasPrice:a.gasPrice,value:a.value,toAmount:a.toAmount},{data:a.data,to:a.to,gasPrice:a.gasPrice,value:a.value,toAmount:a.toAmount}}catch(e){w.RouterController.goBack(),b.SnackController.showError("Failed to create approval transaction"),W.approvalTransaction=void 0,W.swapTransaction=void 0,W.fetchError=!0;return}}},async createSwapTransaction(){let{networkAddress:e,fromCaipAddress:t,sourceTokenAmount:o}=D.getParams(),r=W.sourceToken,i=W.toToken;if(!t||!o||!r||!i)return;let a=h.ConnectionController.parseUnits(o,r.decimals)?.toString();try{let o=await E.L.generateSwapCalldata({userAddress:t,from:r.address,to:i.address,amount:a,disableEstimate:!0}),n=r.address===e,s=BigInt(o.tx.eip155.gas),l=BigInt(o.tx.eip155.gasPrice),c=v.j.getPlainAddress(o.tx.to);if(!c)throw Error("SwapController:createSwapTransaction - address is required");let d={data:o.tx.data,to:c,gas:s,gasPrice:l,value:n?BigInt(a??"0"):BigInt("0"),toAmount:W.toTokenAmount};return W.gasPriceInUSD=$.getGasPriceInUSD(W.networkPrice,s,l),W.approvalTransaction=void 0,W.swapTransaction=d,d}catch(e){w.RouterController.goBack(),b.SnackController.showError("Failed to create transaction"),W.approvalTransaction=void 0,W.swapTransaction=void 0,W.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){b.SnackController.showLoading("Approve limit increase in your wallet"),w.RouterController.replace("SwapPreview")},async sendTransactionForApproval(e){let{fromAddress:t,isAuthConnector:o}=D.getParams();W.loadingApprovalTransaction=!0,o?w.RouterController.pushTransactionStack({onSuccess:D.onEmbeddedWalletApprovalSuccess}):b.SnackController.showLoading("Approve limit increase in your wallet");try{await h.ConnectionController.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:s.b.CHAIN.EVM}),await D.swapTokens(),await D.getTransaction(),W.approvalTransaction=void 0,W.loadingApprovalTransaction=!1}catch(e){W.transactionError=e?.displayMessage,W.loadingApprovalTransaction=!1,b.SnackController.showError(e?.displayMessage||"Transaction error"),N.X.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:e?.displayMessage||e?.message||"Unknown",network:d.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:D.state.sourceToken?.symbol||"",swapToToken:D.state.toToken?.symbol||"",swapFromAmount:D.state.sourceTokenAmount||"",swapToAmount:D.state.toTokenAmount||"",isSmartAccount:(0,S.r9)(s.b.CHAIN.EVM)===x.y_.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(e){if(!e)return;let{fromAddress:t,toTokenAmount:o,isAuthConnector:r}=D.getParams();W.loadingTransaction=!0;let i=`Swapping ${W.sourceToken?.symbol} to ${C.C.formatNumberToLocalString(o,3)} ${W.toToken?.symbol}`,a=`Swapped ${W.sourceToken?.symbol} to ${C.C.formatNumberToLocalString(o,3)} ${W.toToken?.symbol}`;r?w.RouterController.pushTransactionStack({onSuccess(){w.RouterController.replace("Account"),b.SnackController.showLoading(i),B.resetState()}}
1):b.SnackController.showLoading("Confirm transaction in your wallet");try{let o=[W.sourceToken?.address,W.toToken?.address].join(","),i=await h.ConnectionController.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:s.b.CHAIN.EVM});return W.loadingTransaction=!1,b.SnackController.showSuccess(a),N.X.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:d.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:D.state.sourceToken?.symbol||"",swapToToken:D.state.toToken?.symbol||"",swapFromAmount:D.state.sourceTokenAmount||"",swapToAmount:D.state.toTokenAmount||"",isSmartAccount:(0,S.r9)(s.b.CHAIN.EVM)===x.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),B.resetState(),r||w.RouterController.replace("Account"),B.getMyTokensWithBalance(o),i}catch(e){W.transactionError=e?.displayMessage,W.loadingTransaction=!1,b.SnackController.showError(e?.displayMessage||"Transaction error"),N.X.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:e?.displayMessage||e?.message||"Unknown",network:d.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:D.state.sourceToken?.symbol||"",swapToToken:D.state.toToken?.symbol||"",swapFromAmount:D.state.sourceTokenAmount||"",swapToAmount:D.state.toTokenAmount||"",isSmartAccount:(0,S.r9)(s.b.CHAIN.EVM)===x.y_.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken:(e,t)=>$.isInsufficientSourceTokenForSwap(e,t,W.myTokensWithBalance),setTransactionDetails(){let{toTokenAddress:e,toTokenDecimals:t}=D.getParams();e&&t&&(W.gasPriceInUSD=$.getGasPriceInUSD(W.networkPrice,BigInt(W.gasFee),BigInt(15e4)),W.priceImpact=$.getPriceImpact({sourceTokenAmount:W.sourceTokenAmount,sourceTokenPriceInUSD:W.sourceTokenPriceInUSD,toTokenPriceInUSD:W.toTokenPriceInUSD,toTokenAmount:W.toTokenAmount}),W.maxSlippage=$.getMaxSlippage(W.slippage,W.toTokenAmount),W.providerFee=$.getProviderFee(W.sourceTokenAmount))}},D=(0,R.P)(B);var z=o(9362),F=o(62999),U=o(77813),L=o(35536),j=(0,L.iv)`
2  :host {
3    display: block;
4    border-radius: clamp(0px, ${({borderRadius:e})=>e["8"]}, 44px);
5    box-shadow: 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary};
6    overflow: hidden;
7  }
8`;let M=class extends r.oi{render(){return(0,r.dy)`<slot></slot>`}};M.styles=[F.ET,j],M=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}([(0,U.M)("wui-card")],M),o(9790),o(3255),o(99363),o(5321);var H=(0,L.iv)`
9  :host {
10    width: 100%;
11  }
12
13  :host > wui-flex {
14    width: 100%;
15    display: flex;
16    align-items: center;
17    justify-content: center;
18    gap: ${({spacing:e})=>e[2]};
19    padding: ${({spacing:e})=>e[3]};
20    border-radius: ${({borderRadius:e})=>e[6]};
21    border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
22    box-sizing: border-box;
23    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
24    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
25    color: ${({tokens:e})=>e.theme.textPrimary};
26  }
27
28  :host > wui-flex[data-type='info'] {
29    .icon-box {
30      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
31
32      wui-icon {
33        color: ${({tokens:e})=>e.theme.iconDefault};
34      }
35    }
36  }
37  :host > wui-flex[data-type='success'] {
38    .icon-box {
39      background-color: ${({tokens:e})=>e.core.backgroundSuccess};
40
41      wui-icon {
42        color: ${({tokens:e})=>e.core.borderSuccess};
43      }
44    }
45  }
46  :host > wui-flex[data-type='warning'] {
47    .icon-box {
48      background-color: ${({tokens:e})=>e.core.backgroundWarning};
49
50      wui-icon {
51        color: ${({tokens:e})=>e.core.borderWarning};
52      }
53    }
54  }
55  :host > wui-flex[data-type='error'] {
56    .icon-box {
57      background-color: ${({tokens:e})=>e.core.backgroundError};
58
59      wui-icon {
60        color: ${({tokens:e})=>e.core.borderError};
61      }
62    }
63  }
64
65  wui-flex {
66    width: 100%;
67  }
68
69  wui-text {
70    word-break: break-word;
71    flex: 1;
72  }
73
74  .close {
75    cursor: pointer;
76    color: ${({tokens:e})=>e.theme.iconDefault};
77  }
78
79  .icon-box {
80    height: 40px;
81    width: 40px;
82    border-radius: ${({borderRadius:e})=>e["2"]};
83    background-color: var(--local-icon-bg-value);
84  }
85`,_=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let V={info:"info",success:"checkmark",warning:"warningCircle",error:"warning"},K=class extends r.oi{constructor(){super(...arguments),this.message="",this.type="info"}render(){return(0,r.dy)`
86      <wui-flex
87        data-type=${(0,a.o)(this.type)}
88        flexDirection="row"
89        justifyContent="space-between"
90        alignItems="center"
91        gap="2"
92      >
93        <wui-flex columnGap="2" flexDirection="row" alignItems="center">
94          <wui-flex
95            flexDirection="row"
96            alignItems="center"
97            justifyContent="center"
98            class="icon-box"
99          >
100            <wui-icon color="inherit" size="md" name=${V[this.type]}></wui-icon>
101          </wui-flex>
102          <wui-text variant="md-medium" color="inherit" data-testid="wui-alertbar-text"
103            >${this.message}</wui-text
104          >
105        </wui-flex>
106        <wui-icon
107          class="close"
108          color="inherit"
109          size="sm"
110          name="close"
111          @click=${this.onClose}
112        ></wui-icon>
113      </wui-flex>
114    `}onClose(){I.AlertController.close()}};K.styles=[F.ET,H],_([(0,i.Cb)()],K.prototype,"message",void 0),_([(0,i.Cb)()],K.prototype,"type",void 0),K=_([(0,U.M)("wui-alertbar")],K);var X=(0,z.iv)`
115  :host {
116    display: block;
117    position: absolute;
118    top: ${({spacing:e})=>e["3"]};
119    left: ${({spacing:e})=>e["4"]};
120    right: ${({spacing:e})=>e["4"]};
121    opacity: 0;
122    pointer-events: none;
123  }
124`,G=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let Y={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"warning"}},q=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.open=I.AlertController.state.open,this.onOpen(!0),this.unsubscribe.push(I.AlertController.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}
124disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=I.AlertController.state,o=Y[t];return(0,r.dy)`
125      <wui-alertbar
126        message=${e}
127        backgroundColor=${o?.backgroundColor}
128        iconColor=${o?.iconColor}
129        icon=${o?.icon}
130        type=${t}
131      ></wui-alertbar>
132    `}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};q.styles=X,G([(0,i.SB)()],q.prototype,"open",void 0),q=G([(0,z.Mo)("w3m-alertbar")],q);var Q=o(9335),Z=o(71731),J=(0,L.iv)`
133  :host {
134    position: relative;
135  }
136
137  button {
138    display: flex;
139    justify-content: center;
140    align-items: center;
141    background-color: transparent;
142    padding: ${({spacing:e})=>e[1]};
143  }
144
145  /* -- Colors --------------------------------------------------- */
146  button[data-type='accent'] wui-icon {
147    color: ${({tokens:e})=>e.core.iconAccentPrimary};
148  }
149
150  button[data-type='neutral'][data-variant='primary'] wui-icon {
151    color: ${({tokens:e})=>e.theme.iconInverse};
152  }
153
154  button[data-type='neutral'][data-variant='secondary'] wui-icon {
155    color: ${({tokens:e})=>e.theme.iconDefault};
156  }
157
158  button[data-type='success'] wui-icon {
159    color: ${({tokens:e})=>e.core.iconSuccess};
160  }
161
162  button[data-type='error'] wui-icon {
163    color: ${({tokens:e})=>e.core.iconError};
164  }
165
166  /* -- Sizes --------------------------------------------------- */
167  button[data-size='xs'] {
168    width: 16px;
169    height: 16px;
170
171    border-radius: ${({borderRadius:e})=>e[1]};
172  }
173
174  button[data-size='sm'] {
175    width: 20px;
176    height: 20px;
177    border-radius: ${({borderRadius:e})=>e[1]};
178  }
179
180  button[data-size='md'] {
181    width: 24px;
182    height: 24px;
183    border-radius: ${({borderRadius:e})=>e[2]};
184  }
185
186  button[data-size='lg'] {
187    width: 28px;
188    height: 28px;
189    border-radius: ${({borderRadius:e})=>e[2]};
190  }
191
192  button[data-size='xs'] wui-icon {
193    width: 8px;
194    height: 8px;
195  }
196
197  button[data-size='sm'] wui-icon {
198    width: 12px;
199    height: 12px;
200  }
201
202  button[data-size='md'] wui-icon {
203    width: 16px;
204    height: 16px;
205  }
206
207  button[data-size='lg'] wui-icon {
208    width: 20px;
209    height: 20px;
210  }
211
212  /* -- Hover --------------------------------------------------- */
213  @media (hover: hover) {
214    button[data-type='accent']:hover:enabled {
215      background-color: ${({tokens:e})=>e.core.foregroundAccent010};
216    }
217
218    button[data-variant='primary'][data-type='neutral']:hover:enabled {
219      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
220    }
221
222    button[data-variant='secondary'][data-type='neutral']:hover:enabled {
223      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
224    }
225
226    button[data-type='success']:hover:enabled {
227      background-color: ${({tokens:e})=>e.core.backgroundSuccess};
228    }
229
230    button[data-type='error']:hover:enabled {
231      background-color: ${({tokens:e})=>e.core.backgroundError};
232    }
233  }
234
235  /* -- Focus --------------------------------------------------- */
236  button:focus-visible {
237    box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020};
238  }
239
240  /* -- Properties --------------------------------------------------- */
241  button[data-full-width='true'] {
242    width: 100%;
243  }
244
245  :host([fullWidth]) {
246    width: 100%;
247  }
248
249  button[disabled] {
250    opacity: 0.5;
251    cursor: not-allowed;
252  }
253`,ee=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let et=class extends r.oi{constructor(){super(...arguments),this.icon="card",this.variant="primary",this.type="accent",this.size="md",this.iconSize=void 0,this.fullWidth=!1,this.disabled=!1}render(){return(0,r.dy)`<button
254      data-variant=${this.variant}
255      data-type=${this.type}
256      data-size=${this.size}
257      data-full-width=${this.fullWidth}
258      ?disabled=${this.disabled}
259    >
260      <wui-icon color="inherit" name=${this.icon} size=${(0,a.o)(this.iconSize)}></wui-icon>
261    </button>`}}
261;et.styles=[F.ET,F.ZM,J],ee([(0,i.Cb)()],et.prototype,"icon",void 0),ee([(0,i.Cb)()],et.prototype,"variant",void 0),ee([(0,i.Cb)()],et.prototype,"type",void 0),ee([(0,i.Cb)()],et.prototype,"size",void 0),ee([(0,i.Cb)()],et.prototype,"iconSize",void 0),ee([(0,i.Cb)({type:Boolean})],et.prototype,"fullWidth",void 0),ee([(0,i.Cb)({type:Boolean})],et.prototype,"disabled",void 0),et=ee([(0,U.M)("wui-icon-button")],et),o(41338);var eo=(0,L.iv)`
262  button {
263    display: block;
264    display: flex;
265    align-items: center;
266    padding: ${({spacing:e})=>e[1]};
267    transition: background-color ${({durations:e})=>e.lg}
268      ${({easings:e})=>e["ease-out-power-2"]};
269    will-change: background-color;
270    border-radius: ${({borderRadius:e})=>e[32]};
271  }
272
273  wui-image {
274    border-radius: 100%;
275  }
276
277  wui-text {
278    padding-left: ${({spacing:e})=>e[1]};
279  }
280
281  .left-icon-container,
282  .right-icon-container {
283    width: 24px;
284    height: 24px;
285    justify-content: center;
286    align-items: center;
287  }
288
289  wui-icon {
290    color: ${({tokens:e})=>e.theme.iconDefault};
291  }
292
293  /* -- Sizes --------------------------------------------------- */
294  button[data-size='lg'] {
295    height: 32px;
296  }
297
298  button[data-size='md'] {
299    height: 28px;
300  }
301
302  button[data-size='sm'] {
303    height: 24px;
304  }
305
306  button[data-size='lg'] wui-image {
307    width: 24px;
308    height: 24px;
309  }
310
311  button[data-size='md'] wui-image {
312    width: 20px;
313    height: 20px;
314  }
315
316  button[data-size='sm'] wui-image {
317    width: 16px;
318    height: 16px;
319  }
320
321  button[data-size='lg'] .left-icon-container {
322    width: 24px;
323    height: 24px;
324  }
325
326  button[data-size='md'] .left-icon-container {
327    width: 20px;
328    height: 20px;
329  }
330
331  button[data-size='sm'] .left-icon-container {
332    width: 16px;
333    height: 16px;
334  }
335
336  /* -- Variants --------------------------------------------------------- */
337  button[data-type='filled-dropdown'] {
338    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
339  }
340
341  button[data-type='text-dropdown'] {
342    background-color: transparent;
343  }
344
345  /* -- Focus states --------------------------------------------------- */
346  button:focus-visible:enabled {
347    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
348    box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040};
349  }
350
351  /* -- Hover & Active states ----------------------------------------------------------- */
352  @media (hover: hover) and (pointer: fine) {
353    button:hover:enabled,
354    button:active:enabled {
355      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
356    }
357  }
358
359  /* -- Disabled states --------------------------------------------------- */
360  button:disabled {
361    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
362    opacity: 0.5;
363  }
364`,er=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let ei={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},ea={lg:"lg",md:"md",sm:"sm"},en=class extends r.oi{constructor(){super(...arguments),this.imageSrc="",this.text="",this.size="lg",this.type="text-dropdown",this.disabled=!1}render(){return(0,r.dy)`<button ?disabled=${this.disabled} data-size=${this.size} data-type=${this.type}>
365      ${this.imageTemplate()} ${this.textTemplate()}
366      <wui-flex class="right-icon-container">
367        <wui-icon name="chevronBottom"></wui-icon>
368      </wui-flex>
369    </button>`}textTemplate(){let e=ei[this.size];return this.text?(0,r.dy)`<wui-text color="primary" variant=${e}>${this.text}</wui-text>`:null}imageTemplate(){if(this.imageSrc)return(0,r.dy)`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`;let e=ea[this.size];return(0,r.dy)` <wui-flex class="left-icon-container">
370      <wui-icon size=${e} name="networkPlaceholder"></wui-icon>
371    </wui-flex>`}};en.styles=[F.ET,F.ZM,eo],er([(0,i.Cb)()],en.prototype,"imageSrc",void 0),er([(0,i.Cb)()],en.prototype,"text",void 0),er([(0,i.Cb)()],en.prototype,"size",void 0),er([(0,i.Cb)()],en.prototype,"type",void 0),er([(0,i.Cb)({type:Boolean}
371)],en.prototype,"disabled",void 0),en=er([(0,U.M)("wui-select")],en),o(10570),o(43078);var es=o(7956),el=(0,z.iv)`
372  :host {
373    height: 60px;
374  }
375
376  :host > wui-flex {
377    box-sizing: border-box;
378    background-color: var(--local-header-background-color);
379  }
380
381  wui-text {
382    background-color: var(--local-header-background-color);
383  }
384
385  wui-flex.w3m-header-title {
386    transform: translateY(0);
387    opacity: 1;
388  }
389
390  wui-flex.w3m-header-title[view-direction='prev'] {
391    animation:
392      slide-down-out 120ms forwards ${({easings:e})=>e["ease-out-power-2"]},
393      slide-down-in 120ms forwards ${({easings:e})=>e["ease-out-power-2"]};
394    animation-delay: 0ms, 200ms;
395  }
396
397  wui-flex.w3m-header-title[view-direction='next'] {
398    animation:
399      slide-up-out 120ms forwards ${({easings:e})=>e["ease-out-power-2"]},
400      slide-up-in 120ms forwards ${({easings:e})=>e["ease-out-power-2"]};
401    animation-delay: 0ms, 200ms;
402  }
403
404  wui-icon-button[data-hidden='true'] {
405    opacity: 0 !important;
406    pointer-events: none;
407  }
408
409  @keyframes slide-up-out {
410    from {
411      transform: translateY(0px);
412      opacity: 1;
413    }
414    to {
415      transform: translateY(3px);
416      opacity: 0;
417    }
418  }
419
420  @keyframes slide-up-in {
421    from {
422      transform: translateY(-3px);
423      opacity: 0;
424    }
425    to {
426      transform: translateY(0);
427      opacity: 1;
428    }
429  }
430
431  @keyframes slide-down-out {
432    from {
433      transform: translateY(0px);
434      opacity: 1;
435    }
436    to {
437      transform: translateY(-3px);
438      opacity: 0;
439    }
440  }
441
442  @keyframes slide-down-in {
443    from {
444      transform: translateY(3px);
445      opacity: 0;
446    }
447    to {
448      transform: translateY(0);
449      opacity: 1;
450    }
451  }
452`,ec=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let ed=["SmartSessionList"],eu={PayWithExchange:z.gR.tokens.theme.foregroundPrimary};function ep(){let e=w.RouterController.state.data?.connector?.name,t=w.RouterController.state.data?.wallet?.name,o=w.RouterController.state.data?.network?.name,r=t??e,i=u.ConnectorController.getConnectors(),a=1===i.length&&i[0]?.id==="w3m-email",n=d.R.getAccountData()?.socialProvider;return{Connect:`Connect ${a?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:r??"Connect Wallet",ConnectingWalletConnect:r??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview Convert",Downloads:r?`Get ${r}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a Wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",ProfileWallets:"Wallets",SwitchNetwork:o??"Switch Network",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade Your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose Name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select Token",SwapPreview:"Preview Swap",WalletSend:"Send",WalletSendPreview:"Review Send",WalletSendSelectToken:"Select Token",WalletSendConfirmed:"Confirmed",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a Wallet?",ConnectWallets:"Connect Wallet",ConnectSocials:"All Socials",ConnectingSocial:n?n.charAt(0).toUpperCase()+n.slice(1):"Connect Social",ConnectingMultiChain:"Select Chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch Chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in Progress",DataCapture:"Profile",DataCaptureOtpConfirm:"Confirm Email",FundWallet:"Fund Wallet",PayWithExchange:"Deposit from Exchange",PayWithExchangeSelectAsset:"Select Asset"}}let ew=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.heading=ep()[w.RouterController.state.view],this.network=d.R.state.activeCaipNetwork,this.networkImage=Q.f.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=w.RouterController.state.view,this.viewDirection="",this.unsubscribe.push(Z.W.subscribeNetworkImages(()=>{this.networkImage=Q.f.getNetworkImage(this.network)}),w.RouterController.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.heading=ep()[e]},es.b.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),d.R.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=Q.f.getNetworkImage(this.network)}))}
452disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=eu[w.RouterController.state.view]??z.gR.tokens.theme.backgroundPrimary;return this.style.setProperty("--local-header-background-color",e),(0,r.dy)`
453      <wui-flex
454        .padding=${["0","4","0","4"]}
455        justifyContent="space-between"
456        alignItems="center"
457      >
458        ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
459      </wui-flex>
460    `}onWalletHelp(){N.X.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),w.RouterController.push("WhatIsAWallet")}async onClose(){await g.safeClose()}rightHeaderTemplate(){let e=l.OptionsController?.state?.features?.smartSessions;return"Account"===w.RouterController.state.view&&e?(0,r.dy)`<wui-flex>
461      <wui-icon-button
462        icon="clock"
463        size="lg"
464        iconSize="lg"
465        type="neutral"
466        variant="primary"
467        @click=${()=>w.RouterController.push("SmartSessionList")}
468        data-testid="w3m-header-smart-sessions"
469      ></wui-icon-button>
470      ${this.closeButtonTemplate()}
471    </wui-flex> `:this.closeButtonTemplate()}closeButtonTemplate(){return(0,r.dy)`
472      <wui-icon-button
473        icon="close"
474        size="lg"
475        type="neutral"
476        variant="primary"
477        iconSize="lg"
478        @click=${this.onClose.bind(this)}
479        data-testid="w3m-header-close"
480      ></wui-icon-button>
481    `}titleTemplate(){let e=ed.includes(this.view);return(0,r.dy)`
482      <wui-flex
483        view-direction="${this.viewDirection}"
484        class="w3m-header-title"
485        alignItems="center"
486        gap="2"
487      >
488        <wui-text
489          display="inline"
490          variant="lg-regular"
491          color="primary"
492          data-testid="w3m-header-text"
493        >
494          ${this.heading}
495        </wui-text>
496        ${e?(0,r.dy)`<wui-tag variant="accent" size="md">Beta</wui-tag>`:null}
497      </wui-flex>
498    `}leftHeaderTemplate(){let{view:e}=w.RouterController.state,t="Connect"===e,o=l.OptionsController.state.enableEmbedded,i=l.OptionsController.state.enableNetworkSwitch;return"Account"===e&&i?(0,r.dy)`<wui-select
499        id="dynamic"
500        data-testid="w3m-account-select-network"
501        active-network=${(0,a.o)(this.network?.name)}
502        @click=${this.onNetworks.bind(this)}
503        imageSrc=${(0,a.o)(this.networkImage)}
504      ></wui-select>`:this.showBack&&!("ApproveTransaction"===e||"ConnectingSiwe"===e||t&&o)?(0,r.dy)`<wui-icon-button
505        data-testid="header-back"
506        id="dynamic"
507        icon="chevronLeft"
508        size="lg"
509        iconSize="lg"
510        type="neutral"
511        variant="primary"
512        @click=${this.onGoBack.bind(this)}
513      ></wui-icon-button>`:(0,r.dy)`<wui-icon-button
514      data-hidden=${!t}
515      id="dynamic"
516      icon="helpCircle"
517      size="lg"
518      iconSize="lg"
519      type="neutral"
520      variant="primary"
521      @click=${this.onWalletHelp.bind(this)}
522    ></wui-icon-button>`}onNetworks(){this.isAllowedNetworkSwitch()&&(N.X.sendEvent({type:"track",event:"CLICK_NETWORKS"}),w.RouterController.push("Networks"))}isAllowedNetworkSwitch(){let e=d.R.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,o=e?.find(({id:e})=>e===this.network?.id);return t||!o}onViewChange(){let{history:e}=w.RouterController.state,t=es.b.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=es.b.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){let{history:e}=w.RouterController.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){w.RouterController.goBack()}};ew.styles=el,ec([(0,i.SB)()],ew.prototype,"heading",void 0),ec([(0,i.SB)()],ew.prototype,"network",void 0),ec([(0,i.SB)()],ew.prototype,"networkImage",void 0),ec([(0,i.SB)()],ew.prototype,"showBack",void 0),ec([(0,i.SB)()],ew.prototype,"prevHistoryLength",void 0),ec([(0,i.SB)()],ew.prototype,"view",void 0),ec([(0,i.SB)()],ew.prototype,"viewDirection",void 0),ew=ec([(0,z.Mo)("w3m-header")],ew),o(5551),o(93461);var eh=(0,L.iv)`
523  :host {
524    display: flex;
525    align-items: center;
526    gap: ${({spacing:e})=>e[1]};
527    padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]}
528      ${({spacing:e})=>e[2]} ${({spacing:e})=>e[2]};
529    border-radius: ${({borderRadius:e})=>e[20]};
530    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
531    box-shadow:
532      0px 0px 8px 0px rgba(0, 0, 0, 0.1),
533      inset 0 0 0 1px ${({tokens:e})=>e.theme.borderPrimary};
534    max-width: 320px;
535  }
536
537  wui-icon-box {
538    border-radius: ${({borderRadius:e})=>e.round} !important;
539    overflow: hidden;
540  }
541
542  wui-loading-spinner {
543    padding: ${({spacing:e})=>e[1]};
544    background-color: ${({tokens:e})=>e.core.foregroundAccent010};
545    border-radius: ${({borderRadius:e})=>e.round} !important;
546  }
547`,em=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eg=class extends r.oi{constructor(){super(...arguments),this.message="",this.variant="success"}render(){return(0,r.dy)`
548      ${this.templateIcon()}
549      <wui-text variant="lg-regular" color="primary" data-testid="wui-snackbar-message"
550        >${this.message}</wui-text
551      >
552    `}templateIcon(){return"loading"===this.variant?(0,r.dy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,r.dy)`<wui-icon-box
553      size="md"
554      color=${({success:"success",error:"error",warning:"warning",info:"default"})[this.variant]}
555      icon=${({success:"checkmark",error:"warning",warning:"warningCircle",info:"info"})[this.variant]}
556    ></wui-icon-box>`}};eg.styles=[F.ET,eh],em([(0,i.Cb)()],eg.prototype,"message",void 0),em([(0,i.Cb)()],eg.prototype,"variant",void 0),eg=em([(0,U.M)("wui-snackbar")],eg);var ey=(0,r.iv)`
557  :host {
558    display: block;
559    position: absolute;
560    opacity: 0;
561    pointer-events: none;
562    top: 11px;
563    left: 50%;
564    width: max-content;
565  }
566`,eb=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let ev=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=b.SnackController.state.open,this.unsubscribe.push(b.SnackController.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=b.SnackController.state;return(0,r.dy)` <wui-snackbar message=${e} variant=${t}></wui-snackbar> `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),b.SnackController.state.autoClose&&(this.timeout=setTimeout(()=>b.SnackController.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};ev.styles=ey,eb([(0,i.SB)()],ev.prototype,"open",void 0),ev=eb([(0,z.Mo)("w3m-snackbar")],ev);let ef=(0,f.sj)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),ek=(0,R.P)({state:ef,subscribe:e=>(0,f.Ld)(ef,()=>e(ef)),subscribeKey:(e,t)=>(0,k.VW)(ef,e,t),showTooltip({message:e,triggerRect:t,variant:o}){ef.open=!0,ef.message=e,ef.triggerRect=t,ef.variant=o},hide(){ef.open=!1,ef.message="",ef.triggerRect={width:0,height:0,top:0,left:0}}});o(42479);var eC=(0,z.iv)`
567  :host {
568    pointer-events: none;
569  }
570
571  :host > wui-flex {
572    display: var(--w3m-tooltip-display);
573    opacity: var(--w3m-tooltip-opacity);
574    padding: 9px ${({spacing:e})=>e["3"]} 10px ${({spacing:e})=>e["3"]};
575    border-radius: ${({borderRadius:e})=>e["3"]};
576    color: ${({tokens:e})=>e.theme.backgroundPrimary};
577    position: absolute;
578    top: var(--w3m-tooltip-top);
579    left: var(--w3m-tooltip-left);
580    transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
581    max-width: calc(var(--apkt-modal-width) - ${({spacing:e})=>e["5"]});
582    transition: opacity ${({durations:e})=>e.lg}
583      ${({easings:e})=>e["ease-out-power-2"]};
584    will-change: opacity;
585    opacity: 0;
586    animation-duration: ${({durations:e})=>e.xl};
587    animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
588    animation-name: fade-in;
589    animation-fill-mode: forwards;
590  }
591
592  :host([data-variant='shade']) > wui-flex {
593    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
594  }
595
596  :host([data-variant='shade']) > wui-flex > wui-text {
597    color: ${({tokens:e})=>e.theme.textSecondary};
598  }
599
600  :host([data-variant='fill']) > wui-flex {
601    background-color: ${({tokens:e})=>e.theme.textPrimary};
602    border: none;
603  }
604
605  wui-icon {
606    position: absolute;
607    width: 12px !important;
608    height: 4px !important;
609    color: ${({tokens:e})=>e.theme.foregroundPrimary};
610  }
611
612  wui-icon[data-placement='top'] {
613    bottom: 0px;
614    left: 50%;
615    transform: translate(-50%, 95%);
616  }
617
618  wui-icon[data-placement='bottom'] {
619    top: 0;
620    left: 50%;
621    transform: translate(-50%, -95%) rotate(180deg);
622  }
623
624  wui-icon[data-placement='right'] {
625    top: 50%;
626    left: 0;
627    transform: translate(-65%, -50%) rotate(90deg);
628  }
629
630  wui-icon[data-placement='left'] {
631    top: 50%;
632    right: 0%;
633    transform: translate(65%, -50%) rotate(270deg);
634  }
635
636  @keyframes fade-in {
637    from {
638      opacity: 0;
639    }
640    to {
641      opacity: 1;
642    }
643  }
644`,ex=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eT=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.open=ek.state.open,this.message=ek.state.message,this.triggerRect=ek.state.triggerRect,this.variant=ek.state.variant,this.unsubscribe.push(ek.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}
644disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=`
645    --w3m-tooltip-top: ${e}px;
646    --w3m-tooltip-left: ${t}px;
647    --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;
648    --w3m-tooltip-display: ${this.open?"flex":"none"};
649    --w3m-tooltip-opacity: ${this.open?1:0};
650    `,(0,r.dy)`<wui-flex>
651      <wui-icon data-placement="top" size="inherit" name="cursor"></wui-icon>
652      <wui-text color="primary" variant="sm-regular">${this.message}</wui-text>
653    </wui-flex>`}};eT.styles=[eC],ex([(0,i.SB)()],eT.prototype,"open",void 0),ex([(0,i.SB)()],eT.prototype,"message",void 0),ex([(0,i.SB)()],eT.prototype,"triggerRect",void 0),ex([(0,i.SB)()],eT.prototype,"variant",void 0),eT=ex([(0,z.Mo)("w3m-tooltip")],eT);let eS={getTabsByNamespace:e=>e&&e===s.b.CHAIN.EVM?l.OptionsController.state.remoteFeatures?.activity===!1?es.b.ACCOUNT_TABS.filter(e=>"Activity"!==e.label):es.b.ACCOUNT_TABS:[],isValidReownName:e=>/^[a-zA-Z0-9]+$/gu.test(e),isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/gu.test(e),validateReownName:e=>e.replace(/\^/gu,"").toLowerCase().replace(/[^a-zA-Z0-9]/gu,""),hasFooter(){let e=w.RouterController.state.view;if(es.b.VIEWS_WITH_LEGAL_FOOTER.includes(e)){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state,o=l.OptionsController.state.features?.legalCheckbox;return(!!e||!!t)&&!o}return es.b.VIEWS_WITH_DEFAULT_FOOTER.includes(e)}};o(86534);var eA=(0,z.iv)`
654  :host wui-ux-by-reown {
655    padding-top: 0;
656  }
657
658  :host wui-ux-by-reown.branding-only {
659    padding-top: ${({spacing:e})=>e["3"]};
660  }
661
662  a {
663    text-decoration: none;
664    color: ${({tokens:e})=>e.core.textAccentPrimary};
665    font-weight: 500;
666  }
667`,eP=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let e$=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.remoteFeatures=l.OptionsController.state.remoteFeatures,this.unsubscribe.push(l.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state,o=l.OptionsController.state.features?.legalCheckbox;return(e||t)&&!o?(0,r.dy)`
668      <wui-flex flexDirection="column">
669        <wui-flex .padding=${["4","3","3","3"]} justifyContent="center">
670          <wui-text color="secondary" variant="md-regular" align="center">
671            By connecting your wallet, you agree to our <br />
672            ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
673          </wui-text>
674        </wui-flex>
675        ${this.reownBrandingTemplate()}
676      </wui-flex>
677    `:(0,r.dy)`
678        <wui-flex flexDirection="column"> ${this.reownBrandingTemplate(!0)} </wui-flex>
679      `}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=l.OptionsController.state;return e?(0,r.dy)`<a href=${e} target="_blank" rel="noopener noreferrer"
680      >Terms of Service</a
681    >`:null}privacyTemplate(){let{privacyPolicyUrl:e}=l.OptionsController.state;return e?(0,r.dy)`<a href=${e} target="_blank" rel="noopener noreferrer"
682      >Privacy Policy</a
683    >`:null}reownBrandingTemplate(e=!1){return this.remoteFeatures?.reownBranding?e?(0,r.dy)`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>`:(0,r.dy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}};e$.styles=[eA],eP([(0,i.SB)()],e$.prototype,"remoteFeatures",void 0),e$=eP([(0,z.Mo)("w3m-legal-footer")],e$),o(57196);var eR=(0,r.iv)``;let eI=class extends r.oi{render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state;return e||t?(0,r.dy)`
684      <wui-flex
685        .padding=${["4","3","3","3"]}
686        flexDirection="column"
687        alignItems="center"
688        justifyContent="center"
689        gap="3"
690      >
691        <wui-text color="secondary" variant="md-regular" align="center">
692          We work with the best providers to give you the lowest fees and best support. More options
693          coming soon!
694        </wui-text>
695
696        ${this.howDoesItWorkTemplate()}
697      </wui-flex>
698    `:null}howDoesItWorkTemplate(){return(0,r.dy)` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
699      <wui-icon size="xs" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon>
700      How does it work?
701    </wui-link>`}onWhatIsBuy(){N.X.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:(0,S.r9)(d.R.state.activeChain)===x.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),w.RouterController.push("WhatIsABuy")}};eI.styles=[eR],eI=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}([(0,z.Mo)("w3m-onramp-providers-footer")],eI);var eE=(0,z.iv)`
702  :host {
703    display: block;
704  }
705
706  div.container {
707    position: absolute;
708    bottom: 0;
709    left: 0;
710    right: 0;
711    overflow: hidden;
712    height: auto;
713    display: block;
714  }
715
716  div.container[status='hide'] {
717    animation: fade-out;
718    animation-duration: var(--apkt-duration-dynamic);
719    animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
720    animation-fill-mode: both;
721    animation-delay: 0s;
722  }
723
724  div.container[status='show'] {
725    animation: fade-in;
726    animation-duration: var(--apkt-duration-dynamic);
727    animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
728    animation-fill-mode: both;
729    animation-delay: var(--apkt-duration-dynamic);
730  }
731
732  @keyframes fade-in {
733    from {
734      opacity: 0;
735      filter: blur(6px);
736    }
737    to {
738      opacity: 1;
739      filter: blur(0px);
740    }
741  }
742
743  @keyframes fade-out {
744    from {
745      opacity: 1;
746      filter: blur(0px);
747    }
748    to {
749      opacity: 0;
750      filter: blur(6px);
751    }
752  }
753`,eN=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eO=class extends r.oi{constructor(){super(...arguments),this.resizeObserver=void 0,this.unsubscribe=[],this.status="hide",this.view=w.RouterController.state.view}firstUpdated(){this.status=eS.hasFooter()?"show":"hide",this.unsubscribe.push(w.RouterController.subscribeKey("view",e=>{this.view=e,this.status=eS.hasFooter()?"show":"hide","hide"===this.status&&document.documentElement.style.setProperty("--apkt-footer-height","0px")})),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this.getWrapper()){let e=`${t.contentRect.height}px`;document.documentElement.style.setProperty("--apkt-footer-height",e)}}),this.resizeObserver.observe(this.getWrapper())}render(){return(0,r.dy)`
754      <div class="container" status=${this.status}>${this.templatePageContainer()}</div>
755    `}templatePageContainer(){return eS.hasFooter()?(0,r.dy)` ${this.templateFooter()}`:null}templateFooter(){switch(this.view){case"Networks":return this.templateNetworksFooter();case"Connect":case"ConnectWallets":case"OnRampFiatSelect":case"OnRampTokenSelect":return(0,r.dy)`<w3m-legal-footer></w3m-legal-footer>`;case"OnRampProviders":return(0,r.dy)`<w3m-onramp-providers-footer></w3m-onramp-providers-footer>`;default:return null}}templateNetworksFooter(){return(0,r.dy)` <wui-flex
756      class="footer-in"
757      padding="3"
758      flexDirection="column"
759      gap="3"
760      alignItems="center"
761    >
762      <wui-text variant="md-regular" color="secondary" align="center">
763        Your connected wallet may not support some of the networks available for this dApp
764      </wui-text>
765      <wui-link @click=${this.onNetworkHelp.bind(this)}>
766        <wui-icon size="sm" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon>
767        What is a network
768      </wui-link>
769    </wui-flex>`}onNetworkHelp(){N.X.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),w.RouterController.push("WhatIsANetwork")}getWrapper(){return this.shadowRoot?.querySelector("div.container")}};eO.styles=[eE],eN([(0,i.SB)()],eO.prototype,"status",void 0),eN([(0,i.SB)()],eO.prototype,"view",void 0),eO=eN([(0,z.Mo)("w3m-footer")],eO);var eW=(0,z.iv)`
770  :host {
771    display: block;
772    width: inherit;
773  }
774`,eB=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eD=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.viewState=w.RouterController.state.view,this.history=w.RouterController.state.history.join(","),this.unsubscribe.push(w.RouterController.subscribeKey("view",()=>{this.history=w.RouterController.state.history.join(","),document.documentElement.style.setProperty("--apkt-duration-dynamic","var(--apkt-durations-lg)")}))}
774disconnectedCallback(){this.unsubscribe.forEach(e=>e()),document.documentElement.style.setProperty("--apkt-duration-dynamic","0s")}render(){return(0,r.dy)`${this.templatePageContainer()}`}templatePageContainer(){return(0,r.dy)`<w3m-router-container
775      history=${this.history}
776      .setView=${()=>{this.viewState=w.RouterController.state.view}}
777    >
778      ${this.viewTemplate(this.viewState)}
779    </w3m-router-container>`}viewTemplate(e){switch(e){case"AccountSettings":return(0,r.dy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,r.dy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,r.dy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,r.dy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,r.dy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,r.dy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return(0,r.dy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,r.dy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,r.dy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,r.dy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return(0,r.dy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,r.dy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,r.dy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,r.dy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,r.dy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"DataCapture":return(0,r.dy)`<w3m-data-capture-view></w3m-data-capture-view>`;case"DataCaptureOtpConfirm":return(0,r.dy)`<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;case"Downloads":return(0,r.dy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,r.dy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,r.dy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,r.dy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,r.dy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,r.dy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,r.dy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"ProfileWallets":return(0,r.dy)`<w3m-profile-wallets-view></w3m-profile-wallets-view>`;case"Transactions":return(0,r.dy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,r.dy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampTokenSelect":return(0,r.dy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,r.dy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,r.dy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,r.dy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,r.dy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,r.dy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,r.dy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,r.dy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,r.dy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,r.dy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,r.dy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,r.dy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,r.dy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WalletSendConfirmed":return(0,r.dy)`<w3m-send-confirmed-view></w3m-send-confirmed-view>`;case"WhatIsABuy":return(0,r.dy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,r.dy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,r.dy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,r.dy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,r.dy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,r.dy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,r.dy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,r.dy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,r.dy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,r.dy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,r.dy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,r.dy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,r.dy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,r.dy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,r.dy)`<w3m-pay-loading-view></w3m-pay-loading-view>`;case"FundWallet":return(0,r.dy)`<w3m-fund-wallet-view></w3m-fund-wallet-view>`;case"PayWithExchange":return(0,r.dy)`<w3m-deposit-from-exchange-view></w3m-deposit-from-exchange-view>`;case"PayWithExchangeSelectAsset":return(0,r.dy)`<w3m-deposit-from-exchange-select-asset-view></w3m-deposit-from-exchange-select-asset-view>`}}};eD.styles=[eW],eB([(0,i.SB)()],eD.prototype,"viewState",void 0),eB([(0,i.SB)()],eD.prototype,"history",void 0),eD=eB([(0,z.Mo)("w3m-router")],eD);var ez=(0,z.iv)`
780  :host {
781    z-index: ${({tokens:e})=>e.core.zIndex};
782    display: block;
783    backface-visibility: hidden;
784    will-change: opacity;
785    position: fixed;
786    top: 0;
787    left: 0;
788    right: 0;
789    bottom: 0;
790    pointer-events: none;
791    opacity: 0;
792    background-color: ${({tokens:e})=>e.theme.overlay};
793    backdrop-filter: blur(0px);
794    transition:
795      opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
796      backdrop-filter ${({durations:e})=>e.lg}
797        ${({easings:e})=>e["ease-out-power-2"]};
798    will-change: opacity;
799  }
800
801  :host(.open) {
802    opacity: 1;
803    backdrop-filter: blur(8px);
804  }
805
806  :host(.appkit-modal) {
807    position: relative;
808    pointer-events: unset;
809    background: none;
810    width: 100%;
811    opacity: 1;
812  }
813
814  wui-card {
815    max-width: var(--apkt-modal-width);
816    width: 100%;
817    position: relative;
818    outline: none;
819    transform: translateY(4px);
820    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
821    transition:
822      transform ${({durations:e})=>e.lg}
823        ${({easings:e})=>e["ease-out-power-2"]},
824      border-radius ${({durations:e})=>e.lg}
825        ${({easings:e})=>e["ease-out-power-1"]},
826      background-color ${({durations:e})=>e.lg}
827        ${({easings:e})=>e["ease-out-power-1"]},
828      box-shadow ${({durations:e})=>e.lg}
829        ${({easings:e})=>e["ease-out-power-1"]};
830    will-change: border-radius, background-color, transform, box-shadow;
831    background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
832    padding: var(--local-modal-padding);
833    box-sizing: border-box;
834  }
835
836  :host(.open) wui-card {
837    transform: translateY(0px);
838  }
839
840  wui-card::before {
841    z-index: 1;
842    pointer-events: none;
843    content: '';
844    position: absolute;
845    inset: 0;
846    border-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
847    transition: box-shadow ${({durations:e})=>e.lg}
848      ${({easings:e})=>e["ease-out-power-2"]};
849    transition-delay: ${({durations:e})=>e.md};
850    will-change: box-shadow;
851  }
852
853  :host([data-mobile-fullscreen='true']) wui-card::before {
854    border-radius: 0px;
855  }
856
857  :host([data-border='true']) wui-card::before {
858    box-shadow: inset 0px 0px 0px 4px ${({tokens:e})=>e.theme.foregroundSecondary};
859  }
860
861  :host([data-border='false']) wui-card::before {
862    box-shadow: inset 0px 0px 0px 1px ${({tokens:e})=>e.theme.borderPrimaryDark};
863  }
864
865  :host([data-border='true']) wui-card {
866    animation:
867      fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
868      card-background-border var(--apkt-duration-dynamic)
869        ${({easings:e})=>e["ease-out-power-2"]};
870    animation-fill-mode: backwards, both;
871    animation-delay: var(--apkt-duration-dynamic);
872  }
873
874  :host([data-border='false']) wui-card {
875    animation:
876      fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
877      card-background-default var(--apkt-duration-dynamic)
878        ${({easings:e})=>e["ease-out-power-2"]};
879    animation-fill-mode: backwards, both;
880    animation-delay: 0s;
881  }
882
883  :host(.appkit-modal) wui-card {
884    max-width: var(--apkt-modal-width);
885  }
886
887  wui-card[shake='true'] {
888    animation:
889      fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
890      w3m-shake ${({durations:e})=>e.xl}
891        ${({easings:e})=>e["ease-out-power-2"]};
892  }
893
894  wui-flex {
895    overflow-x: hidden;
896    overflow-y: auto;
897    display: flex;
898    align-items: center;
899    justify-content: center;
900    width: 100%;
901    height: 100%;
902  }
903
904  @media (max-height: 700px) and (min-width: 431px) {
905    wui-flex {
906      align-items: flex-start;
907    }
908
909    wui-card {
910      margin: var(--apkt-spacing-6) 0px;
911    }
912  }
913
914  @media (max-width: 430px) {
915    :host([data-mobile-fullscreen='true']) {
916      height: 100dvh;
917    }
918    :host([data-mobile-fullscreen='true']) wui-flex {
919      align-items: stretch;
920    }
921    :host([data-mobile-fullscreen='true']) wui-card {
922      max-width: 100%;
923      height: 100%;
924      border-radius: 0;
925      border: none;
926    }
927    :host(:not([data-mobile-fullscreen='true'])) wui-flex {
928      align-items: flex-end;
929    }
930
931    :host(:not([data-mobile-fullscreen='true'])) wui-card {
932      max-width: 100%;
933      border-bottom: none;
934    }
935
936    :host(:not([data-mobile-fullscreen='true'])) wui-card[data-embedded='true'] {
937      border-bottom-left-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
938      border-bottom-right-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
939    }
940
941    :host(:not([data-mobile-fullscreen='true'])) wui-card:not([data-embedded='true']) {
942      border-bottom-left-radius: 0px;
943      border-bottom-right-radius: 0px;
944    }
945
946    wui-card[shake='true'] {
947      animation: w3m-shake 0.5s ${({easings:e})=>e["ease-out-power-2"]};
948    }
949  }
950
951  @keyframes fade-in {
952    0% {
953      transform: scale(0.99) translateY(4px);
954    }
955    100% {
956      transform: scale(1) translateY(0);
957    }
958  }
959
960  @keyframes w3m-shake {
961    0% {
962      transform: scale(1) rotate(0deg);
963    }
964    20% {
965      transform: scale(1) rotate(-1deg);
966    }
967    40% {
968      transform: scale(1) rotate(1.5deg);
969    }
970    60% {
971      transform: scale(1) rotate(-1.5deg);
972    }
973    80% {
974      transform: scale(1) rotate(1deg);
975    }
976    100% {
977      transform: scale(1) rotate(0deg);
978    }
979  }
980
981  @keyframes card-background-border {
982    from {
983      background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
984    }
985    to {
986      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
987    }
988  }
989
990  @keyframes card-background-default {
991    from {
992      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
993    }
994    to {
995      background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
996    }
997  }
998`,eF=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eU="scroll-lock",eL={PayWithExchange:"0",PayWithExchangeSelectAsset:"0"};class ej extends r.oi{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=l.OptionsController.state.enableEmbedded,this.open=c.I.state.open,this.caipAddress=d.R.state.activeCaipAddress,this.caipNetwork=d.R.state.activeCaipNetwork,this.shake=c.I.state.shake,this.filterByNamespace=u.ConnectorController.state.filterByNamespace,this.padding=z.gR.spacing[1],this.mobileFullScreen=l.OptionsController.state.enableMobileFullScreen,this.initializeTheming(),p.ApiController.prefetchAnalyticsConfig(),this.unsubscribe.push(c.I.subscribeKey("open",e=>e?this.onOpen():this.onClose()),c.I.subscribeKey("shake",e=>this.shake=e),d.R.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),d.R.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),l.OptionsController.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),u.ConnectorController.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||d.R.getAccountData(e)?.caipAddress||(p.ApiController.fetchRecommendedWallets(),this.filterByNamespace=e)}),w.RouterController.subscribeKey("view",()=>{this.dataset.border=eS.hasFooter()?"true":"false",this.padding=eL[w.RouterController.state.view]??z.gR.spacing[1]}))}firstUpdated(){if(this.dataset.border=eS.hasFooter()?"true":"false",this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.caipAddress){if(this.enableEmbedded){c.I.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}
998disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return(this.style.setProperty("--local-modal-padding",this.padding),this.enableEmbedded)?(0,r.dy)`${this.contentTemplate()}
999        <w3m-tooltip></w3m-tooltip> `:this.open?(0,r.dy)`
1000          <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
1001            ${this.contentTemplate()}
1002          </wui-flex>
1003          <w3m-tooltip></w3m-tooltip>
1004        `:null}contentTemplate(){return(0,r.dy)` <wui-card
1005      shake="${this.shake}"
1006      data-embedded="${(0,a.o)(this.enableEmbedded)}"
1007      role="alertdialog"
1008      aria-modal="true"
1009      tabindex="0"
1010      data-testid="w3m-modal-card"
1011    >
1012      <w3m-header></w3m-header>
1013      <w3m-router></w3m-router>
1014      <w3m-footer></w3m-footer>
1015      <w3m-snackbar></w3m-snackbar>
1016      <w3m-alertbar></w3m-alertbar>
1017    </wui-card>`}async onOverlayClick(e){e.target!==e.currentTarget||this.mobileFullScreen||await this.handleClose()}async handleClose(){await g.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:t}=y.ThemeController.state,o=z.Hg.getColorTheme(t);(0,z.n)(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),b.SnackController.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement("style");e.dataset.w3m=eU,e.textContent=`
1018      body {
1019        touch-action: none;
1020        overflow: hidden;
1021        overscroll-behavior: contain;
1022      }
1023      w3m-modal {
1024        pointer-events: auto;
1025      }
1026    `,document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m="${eU}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){let{tagName:o}=t.target;!o||o.includes("W3M-")||o.includes("WUI-")||e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){let t=d.R.state.isSwitchingNamespace,o="ProfileWallets"===w.RouterController.state.view;e?await this.onConnected({caipAddress:e,isSwitchingNamespace:t,isInProfileView:o}):t||this.enableEmbedded||o||c.I.close(),await m.w.initializeIfEnabled(e),this.caipAddress=e,d.R.setIsSwitchingNamespace(!1)}async onConnected(e){if(e.isInProfileView)return;let{chainNamespace:t,chainId:o,address:r}=n.u.parseCaipAddress(e.caipAddress),i=`${t}:${o}`,a=!v.j.getPlainAddress(this.caipAddress),s=await m.w.getSessions({address:r,caipNetworkId:i}),l=!m.w.getSIWX()||s.some(e=>e.data.accountAddress===r),d=e.isSwitchingNamespace&&l&&!this.enableEmbedded,u=this.enableEmbedded&&a;d?w.RouterController.goBack():u&&c.I.close()}onNewNetwork(e){let t=this.caipNetwork,o=t?.caipNetworkId?.toString(),r=t?.chainNamespace,i=e?.caipNetworkId?.toString(),a=e?.chainNamespace,n=o!==i,l=t?.name===s.b.UNSUPPORTED_NETWORK_NAME,u="ConnectingExternal"===w.RouterController.state.view,p="ProfileWallets"===w.RouterController.state.view,h=!d.R.getAccountData(e?.chainNamespace)?.caipAddress,m="UnsupportedChain"===w.RouterController.state.view,g=c.I.state.open,y=!1;this.enableEmbedded&&"SwitchNetwork"===w.RouterController.state.view&&(y=!0),n&&D.resetState(),!g||u||p||(h?n&&(y=!0):m?y=!0:!n||r!==a||l||(y=!0)),y&&"SIWXSignMessage"!==w.RouterController.state.view&&w.RouterController.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(p.ApiController.prefetch(),p.ApiController.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}ej.styles=ez,eF([(0,i.Cb)({type:Boolean})],ej.prototype,"enableEmbedded",void 0),eF([(0,i.SB)()],ej.prototype,"open",void 0),eF([(0,i.SB)()],ej.prototype,"caipAddress",void 0),eF([(0,i.SB)()],ej.prototype,"caipNetwork",void 0),eF([(0,i.SB)()],ej.prototype,"shake",void 0),eF([(0,i.SB)()],ej.prototype,"filterByNamespace",void 0),eF([(0,i.SB)()],ej.prototype,"padding",void 0),eF([(0,i.SB)()],ej.prototype,"mobileFullScreen",void 0);let eM=class extends ej{};eM=eF([(0,z.Mo)("w3m-modal")],eM);let eH=class extends ej{};eH=eF([(0,z.Mo)("appkit-modal")],eH),o(33888);var e_=(0,z.iv)`
1027  :host {
1028    width: 100%;
1029  }
1030`,eV=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eK=class extends r.oi{constructor(){super(...arguments),this.hasImpressionSent=!1,this.walletImages=[],this.imageSrc="",this.name="",this.size="md",this.tabIdx=void 0,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100",this.rdnsId="",this.displayIndex=void 0,this.walletRank=void 0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupIntersectionObserver()}updated(e){super.updated(e),(e.has("name")||e.has("imageSrc")||e.has("walletRank"))&&(this.hasImpressionSent=!1),e.has("walletRank")&&this.walletRank&&!this.intersectionObserver&&this.setupIntersectionObserver()}setupIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(e=>
1030{e.forEach(e=>{!e.isIntersecting||this.loading||this.hasImpressionSent||this.sendImpressionEvent()})},{threshold:.1}),this.intersectionObserver.observe(this)}cleanupIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0)}sendImpressionEvent(){this.name&&!this.hasImpressionSent&&this.walletRank&&(this.hasImpressionSent=!0,(this.rdnsId||this.name)&&N.X.sendWalletImpressionEvent({name:this.name,walletRank:this.walletRank,rdnsId:this.rdnsId,view:w.RouterController.state.view,displayIndex:this.displayIndex}))}render(){return(0,r.dy)`
1031      <wui-list-wallet
1032        .walletImages=${this.walletImages}
1033        imageSrc=${(0,a.o)(this.imageSrc)}
1034        name=${this.name}
1035        size=${(0,a.o)(this.size)}
1036        tagLabel=${(0,a.o)(this.tagLabel)}
1037        .tagVariant=${this.tagVariant}
1038        .walletIcon=${this.walletIcon}
1039        .tabIdx=${this.tabIdx}
1040        .disabled=${this.disabled}
1041        .showAllWallets=${this.showAllWallets}
1042        .loading=${this.loading}
1043        loadingSpinnerColor=${this.loadingSpinnerColor}
1044      ></wui-list-wallet>
1045    `}};eK.styles=e_,eV([(0,i.Cb)({type:Array})],eK.prototype,"walletImages",void 0),eV([(0,i.Cb)()],eK.prototype,"imageSrc",void 0),eV([(0,i.Cb)()],eK.prototype,"name",void 0),eV([(0,i.Cb)()],eK.prototype,"size",void 0),eV([(0,i.Cb)()],eK.prototype,"tagLabel",void 0),eV([(0,i.Cb)()],eK.prototype,"tagVariant",void 0),eV([(0,i.Cb)()],eK.prototype,"walletIcon",void 0),eV([(0,i.Cb)()],eK.prototype,"tabIdx",void 0),eV([(0,i.Cb)({type:Boolean})],eK.prototype,"disabled",void 0),eV([(0,i.Cb)({type:Boolean})],eK.prototype,"showAllWallets",void 0),eV([(0,i.Cb)({type:Boolean})],eK.prototype,"loading",void 0),eV([(0,i.Cb)({type:String})],eK.prototype,"loadingSpinnerColor",void 0),eV([(0,i.Cb)()],eK.prototype,"rdnsId",void 0),eV([(0,i.Cb)()],eK.prototype,"displayIndex",void 0),eV([(0,i.Cb)()],eK.prototype,"walletRank",void 0),eK=eV([(0,z.Mo)("w3m-list-wallet")],eK);var eX=(0,z.iv)`
1046  :host {
1047    --local-duration-height: 0s;
1048    --local-duration: ${({durations:e})=>e.lg};
1049    --local-transition: ${({easings:e})=>e["ease-out-power-2"]};
1050  }
1051
1052  .container {
1053    display: block;
1054    overflow: hidden;
1055    overflow: hidden;
1056    position: relative;
1057    height: var(--local-container-height);
1058    transition: height var(--local-duration-height) var(--local-transition);
1059    will-change: height, padding-bottom;
1060  }
1061
1062  .container[data-mobile-fullscreen='true'] {
1063    overflow: scroll;
1064  }
1065
1066  .page {
1067    position: absolute;
1068    top: 0;
1069    left: 0;
1070    right: 0;
1071    width: 100%;
1072    height: auto;
1073    width: inherit;
1074    box-sizing: border-box;
1075    display: flex;
1076    flex-direction: column;
1077    background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
1078    border-bottom-left-radius: var(--local-border-bottom-radius);
1079    border-bottom-right-radius: var(--local-border-bottom-radius);
1080    transition: border-bottom-left-radius var(--local-duration) var(--local-transition);
1081  }
1082
1083  .page[data-mobile-fullscreen='true'] {
1084    height: 100%;
1085  }
1086
1087  .page-content {
1088    display: flex;
1089    flex-direction: column;
1090    min-height: 100%;
1091  }
1092
1093  .footer {
1094    height: var(--apkt-footer-height);
1095  }
1096
1097  div.page[view-direction^='prev-'] .page-content {
1098    animation:
1099      slide-left-out var(--local-duration) forwards var(--local-transition),
1100      slide-left-in var(--local-duration) forwards var(--local-transition);
1101    animation-delay: 0ms, var(--local-duration, ${({durations:e})=>e.lg});
1102  }
1103
1104  div.page[view-direction^='next-'] .page-content {
1105    animation:
1106      slide-right-out var(--local-duration) forwards var(--local-transition),
1107      slide-right-in var(--local-duration) forwards var(--local-transition);
1108    animation-delay: 0ms, var(--local-duration, ${({durations:e})=>e.lg});
1109  }
1110
1111  @keyframes slide-left-out {
1112    from {
1113      transform: translateX(0px) scale(1);
1114      opacity: 1;
1115      filter: blur(0px);
1116    }
1117    to {
1118      transform: translateX(8px) scale(0.99);
1119      opacity: 0;
1120      filter: blur(4px);
1121    }
1122  }
1123
1124  @keyframes slide-left-in {
1125    from {
1126      transform: translateX(-8px) scale(0.99);
1127      opacity: 0;
1128      filter: blur(4px);
1129    }
1130    to {
1131      transform: translateX(0) translateY(0) scale(1);
1132      opacity: 1;
1133      filter: blur(0px);
1134    }
1135  }
1136
1137  @keyframes slide-right-out {
1138    from {
1139      transform: translateX(0px) scale(1);
1140      opacity: 1;
1141      filter: blur(0px);
1142    }
1143    to {
1144      transform: translateX(-8px) scale(0.99);
1145      opacity: 0;
1146      filter: blur(4px);
1147    }
1148  }
1149
1150  @keyframes slide-right-in {
1151    from {
1152      transform: translateX(8px) scale(0.99);
1153      opacity: 0;
1154      filter: blur(4px);
1155    }
1156    to {
1157      transform: translateX(0) translateY(0) scale(1);
1158      opacity: 1;
1159      filter: blur(0px);
1160    }
1161  }
1162`,eG=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eY=class extends r.oi{constructor(){super(...arguments),this.resizeObserver=void 0,this.transitionDuration="0.15s",this.transitionFunction="",this.history="",this.view="",this.setView=void 0,this.viewDirection="",this.historyState="",this.previousHeight="0px",this.mobileFullScreen=l.OptionsController.state.enableMobileFullScreen,this.onViewportResize=()=>{this.updateContainerHeight()}}updated(e){if(e.has("history")){let e=this.history;""!==this.historyState&&this.historyState!==e&&this.onViewChange(e)}e.has("transitionDuration")&&this.style.setProperty("--local-duration",this.transitionDuration),e.has("transitionFunction")&&this.style.setProperty("--local-transition",this.transitionFunction)}firstUpdated(){this.transitionFunction&&this.style.setProperty("--local-transition",this.transitionFunction),this.style.setProperty("--local-duration",this.transitionDuration),this.historyState=this.history,this.resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this.getWrapper()){let e=t.contentRect.height,o=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height")||"0");
1162this.mobileFullScreen?(e=(window.visualViewport?.height||window.innerHeight)-this.getHeaderHeight()-o,this.style.setProperty("--local-border-bottom-radius","0px")):(e+=o,this.style.setProperty("--local-border-bottom-radius",o?"var(--apkt-borderRadius-5)":"0px")),this.style.setProperty("--local-container-height",`${e}px`),"0px"!==this.previousHeight&&this.style.setProperty("--local-duration-height",this.transitionDuration),this.previousHeight=`${e}px`}}),this.resizeObserver.observe(this.getWrapper()),this.updateContainerHeight(),window.addEventListener("resize",this.onViewportResize),window.visualViewport?.addEventListener("resize",this.onViewportResize)}disconnectedCallback(){let e=this.getWrapper();e&&this.resizeObserver&&this.resizeObserver.unobserve(e),window.removeEventListener("resize",this.onViewportResize),window.visualViewport?.removeEventListener("resize",this.onViewportResize)}render(){return(0,r.dy)`
1163      <div class="container" data-mobile-fullscreen="${(0,a.o)(this.mobileFullScreen)}">
1164        <div
1165          class="page"
1166          data-mobile-fullscreen="${(0,a.o)(this.mobileFullScreen)}"
1167          view-direction="${this.viewDirection}"
1168        >
1169          <div class="page-content">
1170            <slot></slot>
1171          </div>
1172        </div>
1173      </div>
1174    `}onViewChange(e){let t=e.split(",").filter(Boolean),o=this.historyState.split(",").filter(Boolean),r=o.length,i=t.length,a=t[t.length-1]||"",n=z.Hg.cssDurationToNumber(this.transitionDuration),s="";i>r?s="next":i<r?s="prev":i===r&&t[i-1]!==o[r-1]&&(s="next"),this.viewDirection=`${s}-${a}`,setTimeout(()=>{this.historyState=e,this.setView?.(a)},n),setTimeout(()=>{this.viewDirection=""},2*n)}getWrapper(){return this.shadowRoot?.querySelector("div.page")}updateContainerHeight(){let e=this.getWrapper();if(!e)return;let t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height")||"0"),o=0;this.mobileFullScreen?(o=(window.visualViewport?.height||window.innerHeight)-this.getHeaderHeight()-t,this.style.setProperty("--local-border-bottom-radius","0px")):(o=e.getBoundingClientRect().height+t,this.style.setProperty("--local-border-bottom-radius",t?"var(--apkt-borderRadius-5)":"0px")),this.style.setProperty("--local-container-height",`${o}px`),"0px"!==this.previousHeight&&this.style.setProperty("--local-duration-height",this.transitionDuration),this.previousHeight=`${o}px`}getHeaderHeight(){return 60}};eY.styles=[eX],eG([(0,i.Cb)({type:String}
1174)],eY.prototype,"transitionDuration",void 0),eG([(0,i.Cb)({type:String})],eY.prototype,"transitionFunction",void 0),eG([(0,i.Cb)({type:String})],eY.prototype,"history",void 0),eG([(0,i.Cb)({type:String})],eY.prototype,"view",void 0),eG([(0,i.Cb)({attribute:!1})],eY.prototype,"setView",void 0),eG([(0,i.SB)()],eY.prototype,"viewDirection",void 0),eG([(0,i.SB)()],eY.prototype,"historyState",void 0),eG([(0,i.SB)()],eY.prototype,"previousHeight",void 0),eG([(0,i.SB)()],eY.prototype,"mobileFullScreen",void 0),eY=eG([(0,z.Mo)("w3m-router-container")],eY)}}]);
1175//# sourceMappingURL=6161.7fda5da0dc7e5fe4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.