1import{be as Me,bf as Qe,bg as Re,bh as We,bi as Ke,bj as Be,bk as V,a as x,bl as Se,k as ze,e as Ue,bm as Ve,c as Ye,f as Ne,d as ke,aZ as ce,a$ as Xe,b5 as he,b4 as Ge,j as e,L as ae,bn as He,bo as Je,s as ne,aJ as Ce,a3 as Ze,n as et,bp as tt,h as J,bq as y,t as p,br as st,bs as at,a1 as Z,bt as nt,as as it,B as ie,bu as rt}from"./index-CRPZpX17.js";import{F as ct,R as dt,P as lt,O as ot,C as ut,T as xt}from"./popover-5zndvtb5.js";import{Q as ee}from"./index-DAkWUOeG.js";import{n as Pe,u as mt,b as pe}from"./sb-loading-BS93ZLM4.js";import{f as ft,d as ht,e as pt}from"./logo-B8_A0nH6.js";import{M as yt}from"./header-CqtDmtDa.js";import{b as bt,D as jt,a as ye,g as gt}from"./pricing.config-DRwWTe1Y.js";import{u as wt}from"./mobile-pending-C6irSst_.js";import{F as vt}from"./order_dialog_success-CTvM1juB.js";import{F as be}from"./order_dialog_warning-MN9_wnCL.js";import{R as Nt}from"./refresh-cw-DaN2jrmX.js";import{C as te}from"./copy-DpsntgYm.js";import{A as kt,I as Ct}from"./invite-code-page-xhVh6mvp.js";import"./device-status-icons-7iM_qVs6.js";import"./dapposLogo-T2t9YBIw.js";import"./incognito-BoJbb9iM.js";import"./search-BenPg9xh.js";let se=[];function je(i){const s=i.chains;return Me(se,s)?se:(se=s,s)}function Pt(i,s={}){let r;try{r=i.getClient(s)}catch{}return r}function re(i,s={}){const r=Pt(i,s);return r==null?void 0:r.extend(Qe)}async function Et(i,s={}){return(await Re(i,s)).extend(We)}async function At(i,s){var o;const{addEthereumChainParameter:r,chainId:l}=s,f=i.state.connections.get(((o=s.connector)==null?void 0:o.uid)??i.state.current);if(f){const u=f.connector;if(!u.switchChain)throw new Ke({connector:u});return await u.switchChain({addEthereumChainParameter:r,chainId:l})}const h=i.chains.find(u=>u.id===l);if(!h)throw new Be;return i.setState(u=>({...u,chainId:l})),h}function It(i,s){const{onChange:r}=s;return i.subscribe(()=>re(i),r,{equalityFn(l,f){return(l==null?void 0:l.uid)===(f==null?void 0:f.uid)}})}function Tt(i,s){const{onChange:r}=s;return i._internal.chains.subscribe((l,f)=>{r(l,f)})}function Ft(i,s={}){return{gcTime:0,async queryFn({queryKey:r}){const{connector:l}=s,{connectorUid:f,scopeKey:h,...o}=r[1];return Et(i,{...o,connector:l})},queryKey:Lt(s)}}function Lt(i={}){const{connector:s,...r}=i;return["walletClient",{...ft(r),connectorUid:s==null?void 0:s.uid}]}function _t(i){return{mutationFn(s){return At(i,s)},mutationKey:["switchChain"]}}function Dt(i={}){const s=V(i);return x.useSyncExternalStore(r=>Tt(s,{onChange:r}),()=>je(s),()=>je(s))}function Ot(i={}){const s=V(i);return Se.useSyncExternalStoreWithSelector(r=>It(s,{onChange:r}),()=>re(s,i),()=>re(s,i),r=>r,(r,l)=>(r==null?void 0:r.uid)===(l==null?void 0:l.uid))}function $t(i={}){const{mutation:s}=i,r=V(i),l=_t(r),{mutate:f,mutateAsync:h,...o}=ze({...s,...l});return{...o,chains:Dt({config:r}),switchChain:f,switchChainAsync:h}}function ge(i={}){const{query:s={},...r}=i,l=V(r),f=Ue(),{address:h,connector:o,status:u}=Ve({config:l}),c=ht({config:l}),g=i.connector??o,{queryKey:m,...M}=Ft(l,{...i,chainId:i.chainId??c,connector:i.connector??o}),a=!!((u==="connected"||u==="reconnecting"&&(g!=null&&g.getProvider))&&(s.enabled??!0)),P=x.useRef(h);return x.useEffect(()=>{const L=P.current;!h&&L?(f.removeQueries({queryKey:m}),P.current=void 0):h!==L&&(f.invalidateQueries({queryKey:m}),P.current=h)},[h,f]),pt({...s,...M,queryKey:m,enabled:a,staleTime:Number.POSITIVE_INFINITY})}/** 2 * @license lucide-react v0.372.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const qt=Ye("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Mt={56:{"0xe9e7cea3dedca5984780bafc599bd69add087d56":18,"0x55d398326f99059ff775485246999027b3197955":18,"0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82":18,"0x2170ed0880ac9a755fd29b2688956bd959f933f8":18,"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c":18,"0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c":18,"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3":18,"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d":18,"0xf8a0bf9cf54bb92f17374d9e9a321e6a111a51bd":18}};function Qt(i,s){var r;return(r=Mt[i])==null?void 0:r[s.toLowerCase()]}const we=56;function Rt(i){return i instanceof Error&&i.message.includes("Unauthorized method")&&i.message.toLowerCase().includes("chain")}function Wt(i){return Ce[i]??`Chain ${i}`}function Kt(){const{connector:i}=ce();return i!=null&&i.icon?e.jsx("img",{src:i.icon,width:16,height:16,alt:i.name||"Wallet"}):null}function ve({tokenAddress:i,toAddress:s,amount:r,disabled:l,tokenDecimal:f,targetChainId:h=we,onStatusChange:o}){const u=Pe("checkout"),c=Ne(),{session:g}=ke(),{address:m,isConnected:M,chain:a}=ce(),P=Xe(),L=ge().data,z=ge({chainId:h}).data,A=Ot({chainId:h}),{switchChainAsync:E}=$t(),[T,N]=x.useState("default"),_=he(g==null?void 0:g.address)??he(m),I=(g==null?void 0:g.chain)==="evm"&&g.connectorId===Ge;x.useEffect(()=>{if(l){N("disabled");return}},[l]);const b=async()=>
6{if(l)return;const t=z??L;if(!_||!A||!I&&!t){o==null||o("walletClosed");return}if(!I&&(!M||!m)){o==null||o("walletClosed");return}if(!I&&(a==null?void 0:a.id)!==h)try{await E({chainId:h})}catch{o==null||o("userRejected");return}N("paying");try{let k=f;if(k||(k=Qt(we,i)),!k){N("pay"),o==null||o("failed");return}const W=He({abi:[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],functionName:"transfer",args:[s,Je(r,k)]}),K=I?await P.sendTransaction({chain:"evm",address:_,to:i,data:W,value:"0x0",chainId:h}):await t.sendTransaction({account:m,to:i,data:W});await A.waitForTransactionReceipt({hash:K}),N("pay"),o==null||o("success",K)}catch(k){Rt(k)&&ne(u("walletChainUnauthorized",{chainName:Wt(h)})),(k==null?void 0:k.code)===4001?o==null||o("userRejected"):o==null||o("failed"),N("pay")}},Q=()=>{switch(T){case"pay":return u(c?"payMobile":"pay");case"paying":return u("paying");case"disabled":return u(c?"payMobile":"pay");default:return u(c?"payMobile":"pay")}},D=l?"disabled":T,R=D==="paying",O=D==="disabled"||D==="paying";return e.jsxs("button",{onClick:b,disabled:O,className:`flex items-center justify-center gap-2 px-[10px] py-[6px] rounded-[16px] text-xs font-medium 7 ${D==="disabled"?"bg-[#1A1A1933]":"bg-[#2AAE67]"} 8 ${O?"cursor-not-allowed":"cursor-pointer"}`,children:[R&&e.jsx(ae,{className:"w-4 h-4 animate-spin text-white"}),e.jsx(Kt,{}),e.jsx("span",{className:"text-white",children:l?u(c?"payMobile":"pay"):Q()})]})}function Bt({connectorId:i,orderChainId:s,privyConnectorType:r,sessionChain:l,shouldShowWalletAddress:f}){return l==="solana"||i==="io.privy.wallet"||r==="embedded"||s!=="56"||!f}function St(i,s){const r=i.find(l=>Object.values(l._id).includes(s));if(!r)throw new Error(`Plan not found for packageId ${s}`);return r}function zt({id:i}){var fe;const s=Pe("checkout"),r=Ze(),[l,f]=x.useState(null),{copy:h}=mt(),[o,u]=x.useState(0),[c,g]=x.useState(null),[m,M]=x.useState(null),{session:a,packageApi:P,refreshUserData:L}=ke(),{data:z=[]}=wt(),A=Ne(),[E,T]=x.useState(null),N=et(),{connector:_}=ce(),{user:I}=tt(),b=x.useMemo(()=>{if(i==null)return null;const n=Number(i);return Number.isNaN(n)?null:n},[i]),{data:Q,isLoading:D,isError:R}=J({queryKey:["packages"],queryFn:()=>P.getPackages(),staleTime:300*1e3,gcTime:600*1e3,refetchOnWindowFocus:!1}),O=x.useMemo(()=>Q?bt(Q):null,[Q]),{data:t,isLoading:k,isError:W}=J({queryKey:["order",b],queryFn:async()=>{if(!b)throw new Error("Order ID is required");const n=await P.getOrder({id:b});if(n.status===y.Pending&&!n.txhashList&&(a!=null&&a.address)){const d=p.getQueryData(["pendingOrders",a==null?void 0:a.address,0]),j=d==null?void 0:d.find(v=>v.id===b);if(j!=null&&j.txhashList)return{...n,txhashList:j.txhashList}}return n},enabled:!!b&&!!(a!=null&&a.address),refetchInterval:n=>{const d=n.state.data;return!d||[y.Canceled,y.Paid,y.Credited].includes(d.status)?!1:1e4},staleTime:0});x.useEffect(()=>{if(!t||!b||t.status!==y.Pending||t.txhashList)return;const n=p.getQueryData(["pendingOrders",a==null?void 0:a.address,0]),d=n==null?void 0:n.find(j=>j.id===b);d!=null&&d.txhashList&&p.setQueryData(["order",b],{...t,txhashList:d.txhashList})},[t,b,a==null?void 0:a.address,p,z]);const K=n=>{!t||!b||p.setQueryData(["order",b],{...t,txhashList:n})},{data:$,isLoading:Ee,isFetching:Ae,isError:Y}=J({queryKey:["wallet-address-verify",t==null?void 0:t.walletAddress],queryFn:async()=>{var v;const n=(v=t==null?void 0:t.walletAddress)==null?void 0:v.trim();if(!n)return{exists:!1};const d=await fetch(`https://verify-address.dappos.com/api/address/exists?address=${encodeURIComponent(n)}`);if(!d.ok)throw new Error(`verify address failed: ${d.status}`);const j=await d.json();return{exists:(j==null?void 0:j.exists)===!0}},enabled:!!t,staleTime:0,gcTime:0,refetchOnMount:"always",refetchOnWindowFocus:!1,retry:!1});x.useEffect(()=>{if(!b){r.replace("/pricing");return}},[b,r]),x.useEffect(()=>{!t||!O||g(St(O,t.packageId))},[t,O]),x.useEffect(()=>{R&&(console.error("Failed to fetch packages:",R),ne("Failed to fetch packages."))},[R]),x.useEffect(()=>{W&&(ne("Failed to fetch order data."),r.replace("/pricing"))},[W,r]);const Ie=D||k;x.useEffect(()=>{if(!t)return;
8const n=jt[t.durationDays];M(n)},[t==null?void 0:t.durationDays]);const U=x.useRef(null);x.useEffect(()=>{var n,d;if(!(!t||!(a!=null&&a.address))&&!(((n=U.current)==null?void 0:n.orderId)===t.id&&((d=U.current)==null?void 0:d.status)===t.status)){if(t.status===y.Pending&&t.txhashList&&p.setQueryData(["pendingOrders",a==null?void 0:a.address,0],[t]),!st(t.eoaAddress,a.address)){r.replace("/pricing");return}t.status===y.Expired?(T("timeout"),u(0),U.current={orderId:t.id,status:t.status},p.invalidateQueries({queryKey:["pendingOrders",a==null?void 0:a.address,0]})):(t.status===y.Paid||t.status===y.Credited)&&(T("success"),u(0),U.current={orderId:t.id,status:t.status},p.invalidateQueries({queryKey:["accountInfo",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["activationCode",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["pendingOrders",a==null?void 0:a.address,0]}),p.invalidateQueries({queryKey:["active-plan",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["billing-history",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["gold-exchange-info",a==null?void 0:a.address]}))}},[t==null?void 0:t.status,t==null?void 0:t.id,t==null?void 0:t.txhashList,a==null?void 0:a.address,r,t,A,N]);const C=x.useRef(null);x.useEffect(()=>{if(!t||t.status!==y.Pending&&t.status!==y.PartiallyPaid){C.current&&(clearInterval(C.current),C.current=null);return}const n=new Date(t.expiredAt).getTime(),d=()=>{const j=Date.now(),v=Math.max(0,Math.floor((n-j)/1e3));u(v),v<=0&&(p.setQueryData(["order",t.id],q=>q&&{...q,status:y.Expired}),u(0),C.current&&(clearInterval(C.current),C.current=null))};return d(),C.current=setInterval(d,1e3),()=>{C.current&&(clearInterval(C.current),C.current=null)}},[t==null?void 0:t.id,t==null?void 0:t.status,t==null?void 0:t.expiredAt,a==null?void 0:a.address,z]);const F=x.useRef(null);x.useEffect(()=>{var j,v,q;if(!t)return;if(t.status!==y.Pending||!t.txhashList){(j=F.current)!=null&&j.dismiss&&(F.current.dismiss(),F.current=null);return}const n=`${t.id}:${t.txhashList}`;if(((v=F.current)==null?void 0:v.key)===n)return;(q=F.current)!=null&&q.dismiss&&F.current.dismiss();const d=at(s("verifying"),6e3);F.current={key:n,dismiss:(d==null?void 0:d.dismiss)??null}},[t,s]);const X=(n,d)=>{h(n),f(d),setTimeout(()=>f(null),2e3)},Te=n=>{const d=Math.floor(n/3600),j=Math.floor(n%3600/60),v=n%60;return`${String(d).padStart(2,"0")}:${String(j).padStart(2,"0")}:${String(v).padStart(2,"0")}`},Fe=async()=>{if(t)try{await P.cancelOrder(t.id),p.invalidateQueries({queryKey:["pendingOrders",a==null?void 0:a.address,0]}),p.setQueryData(["order",t.id],n=>n&&{...n,status:2})}catch(n){console.error("cancelOrder:",n)}},Le=async n=>{const d=E;if(T(null),!!d){if(d==="timeout"&&n===1){r.replace("/pricing");return}if(d==="success"&&n===1){N.setPendingPricingPurchase(null),await Promise.all([p.invalidateQueries({queryKey:["accountInfo",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["activationCode",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["pendingOrders",a==null?void 0:a.address,0]}),p.invalidateQueries({queryKey:["active-plan",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["billing-history",a==null?void 0:a.address]}),p.invalidateQueries({queryKey:["gold-exchange-info",a==null?void 0:a.address]})]),L(),A?N.closeAllPageDialog():r.replace("/");return}d==="cancel"&&n===1&&Fe()}},de=E?E==="timeout"?{Icon:be,title:s("d_timeout_title"),description:s.rich("d_timeout_des",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})}),buttons:[{label:s("d_timeout_btn"),value:1}]}:E==="cancel"?{Icon:be,title:s("d_cancel_title"),description:s("d_cancel_des"),buttons:[{label:s("d_cancel_btn_yse"),value:1},{label:s("d_cancel_btn_no"),value:0}]}:{Icon:vt,title:s("d_success_title"),description:s("d_success_des"),buttons:[{label:s("d_success_btn"),value:1}]}:null,_e=x.useMemo(()=>!t||!c||!m?"--":c.month_credits[m]*t.packageAmount,[t,c,m]),G=(c==null?void 0:c.id)==="individualStandard"||(c==null?void 0:c.id)==="individualLight",De=x.useMemo(()=>{if(!t||!c||!m)return"--";const n=c.month_credits[m]*t.packageAmount;return G?n*ye(t.durationDays):n},[m,G,t,c]),le=x.useMemo(()=>!t||!c||!m?0:gt(c,m)*t.packageAmount,[t,c,m]),w=x.useMemo(()=>!t||!c||!m?0:c.prices[m]*t.packageAmount,[t,c,m]),Oe=n=>{switch(n){case"monthly":return s("billedMonthly");case"quarterly":return s("billedQuarterly");case"semiannually":return s("billedSemiannually");case"yearly":return s("billedYearly")}},oe=x.useMemo(()=>t?ye(t.durationDays):"--",[t]),ue=()=>{if(!t)return null;const n=()=>{T("cancel")};switch(t.status){case 0:case 3:return t.txhashList&&t.status===0?e.jsx("div",{className:"text-[#2aae67] text-[16px] font-medium",children:s("confirming")}):e.jsx(ie,{className:"h-7 px-2 rounded-full text-[12px] font-medium",onClick:n,children:s("cancelOrder")});case 1:return e.jsx("div",{className:"text-[#2aae67] text-[16px] font-medium",children:s("status_orderSucessfull")});case 2:return e.jsx("div",{className:"text-[#858481] font-medium text-[16px]",children:s("status_orderCanceled")});case 4:return e.jsx("div",{className:"text-[#858481] font-medium text-[16px]",children:s("status_orderExpired")});default:return null}};if(Ie)return e.jsx("div",{className:"flex justify-center items-center min-h-screen",children:e.jsx(pe,{className:"w-10 h-10 text-[#858481] animate-spin"})});if(!t||!c||!m)return null;
8const B=!!(t!=null&&t.walletAddress)&&(Ee||Ae),xe=!B&&Y,$e=!B&&!Y&&(($==null?void 0:$.exists)!==!0||!(t!=null&&t.walletAddress)),S=!B&&!Y&&($==null?void 0:$.exists)===!0,me=()=>{if(A){const n=new URL(window.location.href);b&&n.searchParams.set("id",String(b)),window.location.href=n.toString();return}window.location.reload()},qe=()=>{!((t==null?void 0:t.status)!==y.Paid&&(t==null?void 0:t.status)!==y.Credited&&!!c&&!!m)||!c||!m?N.setPendingPricingPurchase(null):N.setPendingPricingPurchase({source:"checkoutBack",planId:c.id,billingPeriod:m,audience:c.id==="individualStandard"||c.id==="individualLight"?"individual":"business"}),r.replace("/pricing")},H=Bt({connectorId:_==null?void 0:_.id,orderChainId:t.chainId,privyConnectorType:(fe=I==null?void 0:I.wallet)==null?void 0:fe.connectorType,sessionChain:a==null?void 0:a.chain,shouldShowWalletAddress:S});return e.jsxs("div",{className:"bg-[#fafafa]",children:[e.jsx("div",{className:"hidden md:block",children:e.jsx("div",{className:"flex justify-between items-center px-6 pt-4 md:py-4 mx-auto max-w-[918px]",children:e.jsxs("button",{onClick:()=>qe(),className:"flex gap-1 items-center",children:[e.jsx(ct,{className:"w-6 h-6 text-[#858481]"}),e.jsx("span",{className:"text-[#34322d] text-[18px] font-medium",children:s("back")})]})})}),e.jsx("div",{className:"block md:hidden sticky top-0 z-10 bg-[#f8f8f7] px-6 py-4",children:e.jsx(yt,{pageName:"checkout"})}),e.jsxs("div",{className:"px-6 py-4 mx-auto max-w-[918px]",children:[A?e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-col items-start gap-1 max-w-[70%]",children:[e.jsx("p",{className:"text-[#34322d] text-sm font-medium",children:s("title")}),e.jsxs("p",{className:"text-[#858481] text-[13px] break-words",children:[s("orderId")," : ",t.orderId]})]}),e.jsx("div",{className:"whitespace-nowrap ml-2",children:ue()})]}):e.jsxs("div",{className:"flex flex-row gap-6 items-center",children:[e.jsx("p",{className:"text-[#34322d] text-sm font-medium",children:s("title")}),e.jsxs("p",{className:"text-[#858481] text-[13px]",children:[s("orderId")," : ",t.orderId]})]}),e.jsxs("div",{className:"flex flex-col justify-between items-start py-3 md:flex-row",children:[e.jsxs("div",{className:"flex flex-col gap-8 items-start w-full md:flex-row md:items-center md:w-auto",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[16px] font-bold text-[#34322d] mb-1",children:G?`${s(c.nameKey)} - ${oe} ${s("monthPlan")}- ${De} ${s("credits")}`:`${s(c.nameKey)} - ${oe} ${s("monthPlan")}- ${_e} ${s("creditsPerMonth")}`}),e.jsxs("p",{className:"text-[13px] text-[#858481]",children:["$",le?le.toFixed(2):"--"," /month,"," ",Oe(m)]})]}),e.jsxs("div",{className:"hidden mt-2 md:mt-0 md:block",children:[e.jsxs("div",{className:"flex gap-2 justify-end items-center",children:[e.jsx("img",{src:`https://pub-resource.dappos.com/tokenIcon/${t.tokenName.toLowerCase()}.png`,width:24,height:24,alt:t.tokenName}),e.jsx("span",{className:"text-[16px] font-bold text-[#34322d]",children:w?w.toFixed(2):"--"})]}),e.jsx("p",{className:"text-[13px] text-right text-[#858481] mt-1",children:w?"$"+w.toFixed(2):"--"})]})]}),e.jsx("div",{className:"hidden justify-end mt-2 w-full md:flex md:mt-0 md:w-auto",children:ue()}),e.jsxs("div",{className:"flex justify-between items-center mt-2 w-full md:hidden",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex gap-2 justify-end items-center",children:[e.jsx("img",{src:`https://pub-resource.dappos.com/tokenIcon/${t.tokenName.toLowerCase()}.png`,width:24,height:24,alt:t.tokenName}),e.jsx("span",{className:"text-[16px] font-bold text-[#34322d]",children:w?w.toFixed(2):"--"})]}),e.jsx("p",{className:"text-[13px] text-right text-[#858481] mt-1",children:w?"$"+w.toFixed(2):"--"})]}),!H&&e.jsx("div",{className:"ml-2",children:e.jsx(ve,{tokenAddress:t.tokenAddress,toAddress:t.walletAddress,amount:t.targetTokenAmount||""+w,tokenDecimal:t.tokenDecimal,disabled:!!t.txhashList||t.chainId!=="56"||t.status!==y.Pending&&t.status!==y.PartiallyPaid,targetChainId:+t.chainId,onStatusChange:(n,d)=>{n==="success"&&d&&K(d)}})})]})]}),!H&&e.jsx("div",{className:"hidden md:block",children:e.jsx(ve,{tokenAddress:t.tokenAddress,toAddress:t.walletAddress,amount:t.targetTokenAmount||""+w,tokenDecimal:t.tokenDecimal,disabled:!!t.txhashList||t.chainId!=="56"||t.status!==y.Pending&&t.status!==y.PartiallyPaid,targetChainId:+t.chainId,onStatusChange:(n,d)=>{n==="success"&&d&&K(d)}})}),!H&&e.jsxs("div",{className:"flex items-center gap-2 w-full pt-3 pb-3 md:pt-4 md:pb-0 md:w-[300px]",children:[e.jsx("div",{className:"flex-1 h-px bg-[#e5e7eb]"}),e.jsx("span",{className:"text-[#858481] text-[16px]",children:"or"}),e.jsx("div",{className:"flex-1 h-px bg-[#e5e7eb]"})]}),e.jsxs("div",{className:"flex flex-col gap-6 py-4 md:flex-row",children:[e.jsxs("div",{className:"flex flex-col flex-shrink-0 items-center md:items-start",children:[e.jsx("div",{className:"rounded-lg",children:S?e.jsx(ee,{value:t.walletAddress,size:132}):B?e.jsxs("div",{className:"w-[132px] h-[132px] rounded-[8px] relative overflow-hidden border border-[#
8E9ECEF]",children:[e.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(135deg, #E1E4E8 0%, #ECEEEF 45%, #F5F6F6 50%, #ECEEEF 55%, #E1E4E8 100%)",backgroundSize:"200% 200%",animation:"checkout-shimmer 3s linear infinite"}}),e.jsx("style",{jsx:!0,children:` 9 @keyframes checkout-shimmer { 10 0% { 11 background-position: 100% 100%; 12 } 13 100% { 14 background-position: 0 0; 15 } 16 } 17 `})]}):xe?e.jsxs("div",{className:"w-[132px] h-[132px] relative overflow-hidden",children:[e.jsx(ee,{value:"Failed to verify payment address",size:132}),e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-[#ffffffb2] backdrop-blur-[6px]",children:e.jsxs("button",{onClick:me,className:"px-[10px] py-[6px] rounded-[16px] bg-[#2aae67] text-white text-[12px] font-medium inline-flex items-center gap-1",children:[e.jsx(Nt,{className:"w-4 h-4"}),s("retry")]})})]}):$e?e.jsxs("div",{className:"w-[132px] h-[132px] rounded-[8px] relative overflow-hidden",children:[e.jsx(ee,{value:"Verifying secure payment address",size:132}),e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-[#ffffffb2] backdrop-blur-[6px]",children:e.jsx(qt,{className:"w-8 h-8 text-[#f25a5a]",strokeWidth:1.5})})]}):e.jsx("div",{className:"w-[132px] h-[132px] flex justify-center items-center",children:e.jsx(pe,{className:"w-6 h-6 text-[#858481] animate-spin"})})}),e.jsx("div",{className:"mt-2 text-center md:text-left",children:S?e.jsxs("div",{className:"md:hidden text-[16px] font-medium text-[#858481] break-all",children:[e.jsx("span",{className:"underline cursor-pointer decoration-dotted underline-offset-2",children:t.walletAddress}),e.jsx("span",{className:"inline-flex ml-1 align-middle",children:l==="contract"?e.jsx(Z,{className:"w-4 h-4 text-green-600"}):e.jsx(te,{className:"w-4 h-4 text-[#535350] cursor-pointer",onClick:()=>X(t.walletAddress,"contract")})})]}):null})]}),e.jsxs("div",{className:"flex-1 pl-0 space-y-2 md:pl-4",children:[e.jsxs("div",{className:"flex gap-4 justify-between md:justify-start",children:[e.jsx("span",{className:"w-auto md:w-44 text-sm font-medium text-[#34322d]",children:s("paymentNetwork")}),e.jsx("span",{className:"text-sm font-bold text-[#34322d]",children:Ce[Number(t.chainId)]??"Unknown Chain"})]}),e.jsxs("div",{className:"flex gap-4 justify-between md:justify-start",children:[e.jsx("span",{className:"w-auto md:w-44 text-sm font-medium text-[#34322d]",children:s("payToken")}),e.jsxs("span",{className:"text-sm font-bold text-[#34322d]",children:[t.tokenName,e.jsxs("span",{className:"font-medium text-[14px] text-[#858481] pl-1 inline",children:["(",e.jsx("span",{className:"hidden md:inline",children:s("contractAddress")}),e.jsx("a",{href:nt(+t.chainId,t.tokenAddress),target:"_blank",rel:"noopener noreferrer",className:"underline cursor-pointer decoration-dotted underline-offset-2",children:`****${t.tokenAddress.slice(-4)}`}),")"]})]})]}),e.jsxs("div",{className:"flex gap-4 justify-between items-start md:justify-start",children:[e.jsx("span",{className:"w-auto md:w-44 text-sm font-medium text-[#34322d]",children:s("payAmount")}),e.jsx("div",{children:e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx("span",{className:"text-sm font-bold text-[#34322d]",children:w?w.toFixed(2):"--"}),e.jsx("button",{onClick:()=>X(w?w.toFixed(2):"--","amount"),className:"text-[#999] hover:text-[#34322d] transition-colors",children:l==="amount"?e.jsx(Z,{className:"w-4 h-4 text-green-600"}):e.jsx(te,{className:"w-4 h-4 text-[#535350]"})}),e.jsx("span",{className:"text-sm text-[#efa201] font-medium hidden md:block",children:s("exactAmountWarning")})]})})]}),e.jsx("span",{className:"text-sm text-[#efa201] text-right font-medium block md:hidden",children:s("exactAmountWarning")}),e.jsxs("div",{className:"flex gap-0 md:gap-4 justify-between items-start md:justify-start",children:[e.jsx("span",{className:"w-auto md:w-44 text-sm font-medium text-[#34322d] whitespace-nowrap shrink-0",children:s("receivingAddress")}),e.jsx("div",{className:"flex-1 min-w-0 text-right md:text-left",children:B?e.jsxs("div",{className:"inline-flex gap-1 items-center md:ml-0 ml-auto",children:[e.jsx(ae,{className:"w-4 h-4 text-[#1D1C1B]/80 animate-spin"}),e.jsx("span",{className:"text-sm font-medium text-[#858481]",children:s("verifying_address")})]}):xe?e.jsxs("div",{className:"text-sm font-medium text-[#f25a5a] md:text-left text-right",children:[s("verifyFailed"),e.jsx("button",{onClick:me,className:"ml-1 underline underline-offset-2 text-[#f25a5a]",children:s("retry")})]}):S?e.jsxs("div",{className:"flex gap-2 items-center md:justify-start justify-end",children:[e.jsx("span",{className:"text-sm font-medium text-[#34322d] break-all",children:A?it(t.walletAddress):t.walletAddress}),e.jsx("button",{onClick:()=>X(t.walletAddress,"address"),className:"text-[#999] hover:text-[#666] transition-colors",children:l==="address"?e.jsx(Z,{className:"w-4 h-4 text-[#535350]"}):e.jsx(te,{className:"w-4 h-4 text-[#535350]"})})]}):e.jsx("div",{className:"text-sm font-medium text-[#f25a5a] md:text-left text-right",children:s("verifyInvali
17d")})})]}),e.jsxs("div",{className:"flex gap-4 text-sm font-medium text-[#34322d] justify-between md:justify-start",children:[e.jsx("span",{className:"w-auto md:w-44",children:s("expirationTime")}),e.jsx("span",{className:"text-sm",children:t.status!==2?Te(o):"--"})]}),(t.status===0||t.status===3)&&S&&e.jsxs("div",{className:"flex gap-1 items-center",children:[e.jsx(ae,{className:`w-4 h-4 animate-spin ${t.txhashList&&t.status===0?"text-[#EFA201]":"text-[#1D1C1B]/80"}`}),e.jsx("span",{className:`text-sm font-medium ${t.txhashList&&t.status===0?"text-[#EFA201]":"text-[#858481]"}`,children:t.txhashList&&t.status===0?s("verifying"):s("autoDetecting")})]})]})]}),e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"",children:[e.jsx("div",{className:"text-[16px] font-bold text-[#34322d] mb-1",children:s("paymentSteps")}),e.jsxs("div",{className:"text-[13px] text-[#535350] leading-[18px]",children:[e.jsxs("p",{children:["1."," ",s.rich("step1",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})})]}),e.jsxs("p",{children:["2."," ",s.rich("step2",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})})]})]})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-[16px] font-bold text-[#34322d] mb-1",children:s("notice")}),e.jsxs("div",{className:"text-[13px] text-[#535350] leading-[18px]",children:[e.jsxs("p",{children:["1."," ",s.rich("noticeExactAmount",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})})]}),e.jsxs("p",{children:["2."," ",s.rich("noticeSplitPayment",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})})]}),e.jsxs("p",{children:["3."," ",s.rich("noticeWrongCrypto",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})})]}),e.jsxs("p",{children:["4."," ",s.rich("noticeSupport",{bold:n=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:n})}),e.jsx("a",{href:"https://discord.com/invite/sEtcYb9FgT",target:"_blank",rel:"noopener noreferrer",className:"text-[#2aae67] hover:underline",children:"https://discord.com/invite/sEtcYb9FgT"})]})]})]})]})]}),de&&e.jsx(Ut,{isOpen:!!E,isBlocking:E==="timeout"||E==="success",config:de,onClose:Le})]})}function Ut({isOpen:i,isBlocking:s,config:r,onClose:l}){if(!i)return null;const{Icon:f,title:h,description:o,buttons:u}=r;return e.jsx(dt,{open:i,onOpenChange:c=>{c||l(0)},children:e.jsxs(lt,{children:[e.jsx(ot,{className:"fixed inset-0 bg-[#05050533] backdrop-blur-[4px]",style:{zIndex:70}}),e.jsxs(ut,{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-32px)] md:w-[408px] bg-white rounded-[24px] overflow-hidden flex flex-col items-center text-center pt-10 px-4 pb-4",style:{zIndex:70},onEscapeKeyDown:c=>{s&&c.preventDefault()},onPointerDownOutside:c=>{s&&c.preventDefault()},children:[e.jsx(f,{className:"mb-4 w-14 h-14"}),e.jsx(xt,{className:"text-[18px] text-[#1d1c1b] font-medium mb-2",children:h}),e.jsx("p",{className:"text-[#1d1c1b] text-[14px] font-medium mb-6 whitespace-pre-line",children:o}),u.length===1?e.jsx(ie,{className:"w-full py-3 rounded-[12px]",onClick:()=>l(u[0].value),children:u[0].label}):e.jsx("div",{className:"flex gap-2 w-full",children:u.map((c,g)=>e.jsx(ie,{className:"flex-1 py-3 rounded-[12px]",variant:g===u.length-1?"outline":"default",onClick:()=>l(c.value),children:c.label},c.label))})]})]})})}const os=function(){const s=rt.useSearch();return e.jsx(kt,{fallback:e.jsx(Ct,{referral:s.referral}),children:e.jsx(zt,{id:s.id})})};export{os as component};
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.