1import{t as b,a as l,j as e,e as u}from"./index-Bycp73E7.js";import{r as c}from"./router-BIDspSpA.js";import{E as P,P as _,l as A}from"./PaymentForm-B8d20Cbu.js";import{C as Y,L as j,T as L,W as V,j as G}from"./ui-D973SSVI.js";import"./react-vendor-B-kMZTGf.js";import"./pixel-j5umXTyu.js";const R=89500,U="VidSummit 2027 General Admission",W="/tickets/2027",N=A("pk_live_muyH6J440zy8p41DmEMYgn4V"),o="w-full rounded-xl border border-white/15 bg-black/40 px-4 py-3 font-normal outline-none focus:border-red-400";function K(){const[a,i]=c.useState({firstName:"",lastName:"",company:"",email:"",phone:""}),[h,w]=c.useState(null),[r,g]=c.useState(null),[v,k]=c.useState(!1),[m,C]=c.useState(!1),x=c.useRef(null),p=b.tickets2027.createPaymentIntent.useMutation(),n=b.tickets2027.status.useQuery({paymentIntentId:r??"pi_pending"},{enabled:!!r,refetchInterval:t=>t.state.data?.sheetSynced||t.state.data?.paymentStatus==="failed"?!1:3e3});c.useEffect(()=>{const t=document.title;return document.title="VidSummit 2027 Tickets | $895 General Admission",()=>{document.title=t}},[]),c.useEffect(()=>{x.current=null},[a]),c.useEffect(()=>{const t=new URLSearchParams(window.location.search).get("payment_intent_client_secret");t&&(k(!0),N.then(s=>s?.retrievePaymentIntent(t)).then(s=>{s?.paymentIntent?.status==="succeeded"||s?.paymentIntent?.status==="processing"?g(s.paymentIntent.id):s?.error?l.error(s.error.message):l.error("Payment was not completed. You can try again below.")}).catch(()=>{C(!0),l.error("Could not confirm payment. Contact [email protected] before trying again.")}).finally(()=>k(!1)))},[]);async function S(t){t.preventDefault(),x.current??=crypto.randomUUID();try{const s=await p.mutateAsync({...a,checkoutId:x.current});w(s.clientSecret)}catch(s){l.error(s instanceof Error?s.message:"Could not start checkout.")}}const f=n.data?.paymentStatus==="failed",d=n.data?.paymentStatus==="completed",y=["refunded","partially_refunded"].includes(n.data?.paymentStatus??""),T=e.jsx("header",{"data-loc":"client/src/pages/Tickets2027.tsx:61",className:"border-b border-white/10 px-5 py-6",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:61",className:"mx-auto flex max-w-5xl items-center justify-between",children:[e.jsxs("a",{"data-loc":"client/src/pages/Tickets2027.tsx:62",href:"/",className:"text-2xl font-black tracking-tight",children:["VID",e.jsx("span",{"data-loc":"client/src/pages/Tickets2027.tsx:62",className:"text-red-500",children:"SUMMIT"})]}),e.jsx("span",{"data-loc":"client/src/pages/Tickets2027.tsx:63",className:"rounded-full border border-white/20 px-4 py-1 text-xs font-bold tracking-widest",children:"2027"})]})});return r||v||m?e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:66",className:"min-h-screen bg-[#080809] text-white",children:[T,e.jsxs("main",{"data-loc":"client/src/pages/Tickets2027.tsx:67",className:"mx-auto max-w-2xl px-5 py-20 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Tickets2027.tsx:68",className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-red-500/10 text-red-400",children:d?e.jsx(Y,{"data-loc":"client/src/pages/Tickets2027.tsx:69",className:"h-9 w-9"}):e.jsx(j,{"data-loc":"client/src/pages/Tickets2027.tsx:69",className:"h-8 w-8 animate-spin"})}),e.jsx("h1",{"data-loc":"client/src/pages/Tickets2027.tsx:71",className:"mt-6 text-4xl font-black",children:f?"Your payment didnât complete":y?"Your order needs review":d?"See you at VidSummit 2027":m?"We couldnât confirm your payment":"Confirming your order"}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:72",className:"mt-4 leading-7 text-gray-300",children:f?"Your payment was unsuccessful. Contact [email protected] for help before starting another purchase.":y?"A refund is recorded on this order. Contact our team for help with your ticket.":d?`Your General Admission purchase for ${u} is confirmed. Your digital ticket will be emailed once the 2027 tickets are ready.`:m?"Please contact [email protected] before trying another purchase, so we can check whether your payment completed.":"Weâre checking your payment and saving your order. Please donât submit another payment."}),d&&!n.data?.sheetSynced&&e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:75",className:"mt-3 text-sm text-gray-400",children:"Your payment is recorded. Weâre finishing your order
1confirmation."}),n.isError&&e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:76",className:"mt-3 text-sm text-red-300",children:"We couldnât load your order status. Contact our team before attempting another purchase."}),r&&e.jsxs("p",{"data-loc":"client/src/pages/Tickets2027.tsx:77",className:"mt-6 break-all text-xs text-gray-500",children:["Order reference: ",r]}),e.jsx("a",{"data-loc":"client/src/pages/Tickets2027.tsx:78",href:"mailto:[email protected]",className:"mt-8 inline-flex rounded-xl border border-white/20 px-6 py-3 font-bold",children:"Contact VidSummit"})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:81",className:"min-h-screen bg-[#080809] text-white",children:[T,e.jsxs("main",{"data-loc":"client/src/pages/Tickets2027.tsx:81",children:[e.jsx("section",{"data-loc":"client/src/pages/Tickets2027.tsx:82",className:"border-b border-white/10 bg-[radial-gradient(ellipse_at_top,rgba(185,28,28,.22),transparent_60%)] px-5 py-14 sm:py-20",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:83",className:"mx-auto max-w-5xl text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:84",className:"text-xs font-bold uppercase tracking-[.3em] text-red-400",children:"VidSummit 2027 · General Admission"}),e.jsxs("h1",{"data-loc":"client/src/pages/Tickets2027.tsx:85",className:"mt-5 text-5xl font-black leading-[1.05] tracking-tight sm:text-7xl",children:["Your next big idea",e.jsx("br",{"data-loc":"client/src/pages/Tickets2027.tsx:85"}),"starts here."]}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:86",className:"mt-4 text-lg font-semibold text-white",children:u}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:87",className:"mx-auto mt-6 max-w-xl text-lg leading-8 text-gray-300",children:"Get your General Admission ticket for VidSummit 2027 at the early price."}),e.jsxs("p",{"data-loc":"client/src/pages/Tickets2027.tsx:88",className:"mt-7 text-6xl font-black",children:["$895",e.jsx("span",{"data-loc":"client/src/pages/Tickets2027.tsx:88",className:"ml-2 text-base font-bold text-gray-400",children:"USD"})]}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:89",className:"mt-3 text-sm text-gray-400",children:"One ticket · One-time payment"})]})}),e.jsx("section",{"data-loc":"client/src/pages/Tickets2027.tsx:92",className:"mx-auto max-w-2xl px-5 py-12",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:93",className:"rounded-3xl border border-white/10 bg-[#111113] p-6 sm:p-8",children:[h?e.jsxs(P,{"data-loc":"client/src/pages/Tickets2027.tsx:106",stripe:N,options:{clientSecret:h},children:[e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:107",className:"mb-5",children:[e.jsx("h2",{"data-loc":"client/src/pages/Tickets2027.tsx:107",className:"text-2xl font-black",children:"Complete your purchase"}),e.jsxs("p",{"data-loc":"client/src/pages/Tickets2027.tsx:107",className:"mt-2 text-sm text-gray-400",children:[U," · ",a.firstName," ",a.lastName]})]}),e.jsx(_,{"data-loc":"client/src/pages/Tickets2027.tsx:108",onSuccess:g,onError:t=>l.error(t),ticketCount:1,orderTotal:R/100,itemLabel:"2027 General Admission",returnUrl:W,trackTicketCheckout:!1})]}):e.jsxs("form",{"data-loc":"client/src/pages/Tickets2027.tsx:94",onSubmit:t=>{S(t)},className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:95",children:[e.jsx("h2",{"data-loc":"client/src/pages/Tickets2027.tsx:95",className:"text-2xl font-black",children:"Whoâs attending?"}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:95",className:"mt-2 text-sm text-gray-400",children:"Use the attendeeâs name and company as they should appear on their ticket."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:96",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("label",{"data-loc":"client/src/pages/Tickets2027.tsx:97",className:"space-y-2 text-sm font-bold",children:["First name",e.jsx("input",{"data-loc":"client/src/pages/Tickets2027.tsx:97",required:!0,maxLength:100,value:a.firstName,onChange:t=>i({...a,firstName:t.target.value}),autoComplete:"given-name",className:o})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets2027.tsx:98",className:"space-y-2 text-sm font-bold",children:["Last name",e.jsx("input",{"data-loc":"client/src/pages/Tickets2027.tsx:98",required:!0,maxLength:100,value:a.lastName,onChange:t=>i({...a,lastName:t.target.value}),autoComplete:"family-name",className:o})]})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets2027.tsx:100",className:"block space-y-2 text-sm font-bold",children:["Company",e.jsx("input",{"data-loc":"client/src/pages/Tickets2027.tsx:100",required:!0,maxLength:150,value:a.company,onChange:t=>i({...a,company:t.target.value}),autoComplete:"organization",className:o}),e.jsx("span",{"data-loc":"client/src/pages/Tickets2027.tsx:100",className:"block text-xs font-normal text-gray-400",children:"This name will appear on your 2027 ticket."})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets2027.tsx:101",className:"block space-y-2 text-sm font-bold",children:["Email",e.jsx("input",{"data-loc":"client/src/pages/Tickets2027.tsx:101",required:!0,type:"email",maxLength:320,value:a.email,onChange:t=>i({...a,email:t.target.value}),autoComplete:"email",className:o})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets2027.tsx:102",className:"block space-y-2 text-sm font-bold",children:["Phone ",e.jsx("span",{"data-loc":"client/src/pages/Tickets2027.tsx:102",className:"font-normal text-gray-500",children:"(optional)"}),e.jsx("input",{"data-loc":"client/src/pages/Tickets2027.tsx:102",type:"tel",maxLength:40,value:a.p
1hone,onChange:t=>i({...a,phone:t.target.value}),autoComplete:"tel",className:o})]}),e.jsx("button",{"data-loc":"client/src/pages/Tickets2027.tsx:103",disabled:p.isPending,className:"flex w-full items-center justify-center rounded-xl bg-red-600 px-6 py-4 font-black uppercase tracking-wide hover:bg-red-500 disabled:opacity-50",children:p.isPending?e.jsxs(e.Fragment,{children:[e.jsx(j,{"data-loc":"client/src/pages/Tickets2027.tsx:104",className:"mr-2 h-5 w-5 animate-spin"}),"Preparing checkoutâ¦"]}):"Continue to payment · $895"})]}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:110",className:"mt-5 text-center text-xs leading-6 text-gray-500",children:"Your digital ticket will be sent later, once the new 2027 tickets are ready."})]})}),e.jsx("section",{"data-loc":"client/src/pages/Tickets2027.tsx:113","aria-label":"Ticket details",className:"mx-auto grid max-w-5xl gap-4 px-5 pb-12 md:grid-cols-3",children:[[L,"General Admission for 2027",`Join us for VidSummit on ${u}. Venue details will be announced.`],[V,"Your ticket arrives later","Weâre preparing the new 2027 digital tickets. Once theyâre ready, weâll email yours to the address you provide."],[G,"Your place is reserved","A successful payment confirms your purchase. You donât need to purchase again when your digital ticket is issued."]].map(([t,s,I])=>{const E=t;return e.jsx("div",{"data-loc":"client/src/pages/Tickets2027.tsx:118",className:"rounded-2xl border border-white/10 bg-white/[.03] p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:119",className:"flex gap-3",children:[e.jsx(E,{"data-loc":"client/src/pages/Tickets2027.tsx:119",className:"mt-1 h-5 w-5 shrink-0 text-red-400"}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:119",children:[e.jsx("h2",{"data-loc":"client/src/pages/Tickets2027.tsx:119",className:"font-bold",children:String(s)}),e.jsx("p",{"data-loc":"client/src/pages/Tickets2027.tsx:119",className:"mt-2 text-sm leading-6 text-gray-400",children:String(I)})]})]})},String(s))})}),e.jsx("footer",{"data-loc":"client/src/pages/Tickets2027.tsx:122",className:"border-t border-white/10 px-5 py-6",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets2027.tsx:122",className:"mx-auto flex max-w-5xl flex-wrap justify-center gap-6 text-sm text-gray-500",children:[e.jsx("a",{"data-loc":"client/src/pages/Tickets2027.tsx:123",href:"mailto:[email protected]",className:"hover:text-white",children:"[email protected]"}),e.jsx("a",{"data-loc":"client/src/pages/Tickets2027.tsx:123",href:"/privacy-policy",className:"hover:text-white",children:"Privacy"}),e.jsx("a",{"data-loc":"client/src/pages/Tickets2027.tsx:123",href:"/terms-and-conditions",className:"hover:text-white",children:"Terms"})]})})]})]})}export{K as default};
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.