PageSourceSearch

https://omnivideoai.ai/assets/payment-C0F8lRei.js

js omnivideoai.ai collected 2026-10-05 13:37:52 UTC 2,926 bytes, 1 lines download raw bytes

1import{C as h,b4 as j,r as n,j as e,E as y,F as N,H as C,J as P,m as l,a5 as p,ae as b,b5 as w}from"./main-BRoHUnkC.js";import{D as v}from"./dashboard-header-DZG1RtAW.js";import{a as E}from"./payment-DIaVka8w.js";import{I as k}from"./IconAlertCircle-sCslAUNS.js";import{I}from"./IconCircleX-BSSqp4-F.js";import"./separator-B088A5oO.js";import"./sidebar-C2cKXgWP.js";import"./sheet-BE5D64KP.js";import"./useRender-DSF4MwyC.js";import"./auth-middleware-CfpjMzjb.js";import"./createServerFn-C-oX5ijE.js";const L=2e3,R=6e4,t=l.settings.payment;function T(s){switch(s){case"processing":return{title:t.processing.title,description:t.processing.description};case"success":return{title:t.success.title,description:t.success.description};case"failed":return{title:t.failed.title,description:t.failed.description};case"timeout":return{title:t.timeout.title,description:t.timeout.description};default:return{title:"",description:""}}}function _({status:s}){switch(s){case"processing":return e.jsx(p,{className:"size-12 shrink-0 text-cyan-600 animate-spin"});case"success":return e.jsx(b,{className:"size-12 shrink-0 text-green-600"});case"failed":return e.jsx(I,{className:"size-12 shrink-0 text-red-600"});case"timeout":return e.jsx(k,{className:"size-12 shrink-0 text-yellow-600"});default:return e.jsx(p,{className:"size-12 shrink-0 text-muted-foreground animate-spin"})}}function z({sessionId:s,callback:i="/settings/billing"}){const o=h(),c=j(),[r,u]=n.useState(()=>s?"processing":"failed"),a=n.useRef(!1),m=n.useRef(0);n.useEffect(()=>{if(!s||r!=="processing")return;a.current=!1,m.current=Date.now(),(async()=>{for(;!a.current&&Date.now()-m.current<R;){try{if((await E({data:{sessionId:s}}))?.isPaid){u("success"),a.current=!0;return}}catch{}await new Promise(d=>setTimeout(d,L))}a.current||u("timeout")})()},[s,r]),n.useEffect(()=>{if(r!=="success"||!i)return;(async()=>(await c.invalidateQueries({queryKey:["currentPlan"]}),await c.refetchQueries({queryKey:["currentPlan"]}),o({to:i})))()},[r,i,c,o]);const{title:f,description:x}=T(r);return e.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:e.jsx(y,{className:"w-full max-w-md",children:e.jsxs(N,{className:"py-4 text-center",children:[e.jsx("div",{className:"mb-8 flex justify-center",children:e.jsx(_,{status:r})}),e.jsx(C,{children:f}),e.jsx(P,{children:x})]})})})}function Y(){const s=w({from:"/settings/payment"}),i=[{label:l.common.settings,isCurrentPage:!1},{label:l.settings.billing.breadcrumb,isCurrentPage:!0}];return e.jsxs(e.Fragment,{children:[e.jsx(v,{breadcrumbs:i}),e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsx("div",{className:"@container/main flex flex-1 flex-col gap-2",children:e.jsx("div",{className:"flex flex-col gap-4 py-4 lg:gap-6 lg:py-6",children:e.jsx("div",{className:"px-4 lg:px-6",children:e.jsx(z,{sessionId:s.session_id,callback:s.callback??"/settings/billing"})})})})})]})}export{Y 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.