1import{c as b,d as f,r as n,t as v,j as e,f as D,n as N,o as d,p as m,k as L,q as T}from"./index-C6jjXqoV.js";import{S as P,M as U,P as E}from"./search-DYFl5yFN.js";/** 2 * @license lucide-react v0.453.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 H=b("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const A=b("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);function K(){const{language:i}=f(),t=i==="zh-Hant",[a,p]=n.useState(""),[l,u]=n.useState(""),[r,h]=n.useState(null),{data:o,isFetching:g}=v.ticketing.retrieve.useQuery(r??{publicId:"disabled",email:"[email protected]"},{enabled:!!r});return e.jsxs("section",{"data-loc":"client/src/components/TicketRetrieval.tsx:15",className:"retrieval-panel",children:[e.jsxs("div",{"data-loc":"client/src/components/TicketRetrieval.tsx:16",children:[e.jsx(A,{"data-loc":"client/src/components/TicketRetrieval.tsx:16",className:"h-7 w-7 text-[#d7b86b]"}),e.jsx("h2",{"data-loc":"client/src/components/TicketRetrieval.tsx:16",className:"mt-5 font-display text-4xl text-white",children:t?"éæ°åå¾é票":"Retrieve your tickets"}),e.jsx("p",{"data-loc":"client/src/components/TicketRetrieval.tsx:16",className:"mt-3 max-w-lg text-sm leading-6 text-slate-400",children:t?"使ç¨ä»æ¬¾ç¢ºèªé 顯示çè¨å®ç·¨èå購票é»éµï¼é¨æå次éåæ¸ç¢¼é票ã":"Use the order reference from your payment confirmation and the purchase email to reopen your digital tickets at any time."})]}),e.jsxs("form",{"data-loc":"client/src/components/TicketRetrieval.tsx:17",onSubmit:c=>{c.preventDefault(),h({publicId:a.trim().toUpperCase(),email:l.trim()})},className:"mt-7 grid gap-4 sm:grid-cols-[1fr_1fr_auto] sm:items-end",children:[e.jsxs("label",{"data-loc":"client/src/components/TicketRetrieval.tsx:18",className:"field-label",children:[e.jsx("span",{"data-loc":"client/src/components/TicketRetrieval.tsx:18",children:t?"è¨å®ç·¨è":"Order reference"}),e.jsx("input",{"data-loc":"client/src/components/TicketRetrieval.tsx:18",required:!0,minLength:8,maxLength:40,value:a,onChange:c=>p(c.target.value),placeholder:"ORD-â¦"})]}),e.jsxs("label",{"data-loc":"client/src/components/TicketRetrieval.tsx:19",className:"field-label",children:[e.jsx("span",{"data-loc":"client/src/components/TicketRetrieval.tsx:19",children:t?"購票é»éµ":"Purchase email"}),e.jsx("input",{"data-loc":"client/src/components/TicketRetrieval.tsx:19",required:!0,type:"email",maxLength:320,value:l,onChange:c=>u(c.target.value)})]}),e.jsxs("button",{"data-loc":"client/src/components/TicketRetrieval.tsx:20",type:"submit",className:"secondary-cta min-h-[3.25rem] justify-center",children:[e.jsx(P,{"data-loc":"client/src/components/TicketRetrieval.tsx:20",className:"h-4 w-4"}),t?"å°æ¾":"Find"]})]}),r&&!g&&!o&&e.jsx("p",{"data-loc":"client/src/components/TicketRetrieval.tsx:22",className:"mt-5 text-sm text-[#e4c67d]",children:t?"æ¾ä¸å°ç¸ç¬¦ç已仿¬¾è¨å®ãè«æ ¸å°è³æã":"No matching paid order was found. Check both details."}),o&&e.jsx("div",{"data-loc":"client/src/components/TicketRetrieval.tsx:23",className:"mt-7 grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:o.tickets.map(c=>e.jsxs(D,{"data-loc":"client/src/components/TicketRetrieval.tsx:23",href:`/ticket/${c.ticketCode}`,className:"flex items-center gap-3 rounded-xl border border-white/10 bg-white/[0.025] p-4",children:[e.jsx(N,{"data-loc":"client/src/components/TicketRetrieval.tsx:23",className:"h-5 w-5 text-cyan-200"}),e.jsxs("span",{"data-loc":"client/src/components/TicketRetrieval.tsx:23",children:[e.jsx("strong",{"data-loc":"client/src/components/TicketRetrieval.tsx:23",className:"block text-sm text-white",children:c.ticketType==="adult"?"Adult":"Child U15"}),e.jsx("small",{"data-loc":"client/src/components/TicketRetrieval.tsx:23",className:"text-slate-500",children:c.ticketCode})]})]},c.ticketCode))})]})}const I={en:{eyebrow:"Secure your place",title:"Tickets",intro:"Choose your tickets, add buyer details and continue to secure Stripe Checkout. Your digital passes appear after verified payment.",adultDetail
11:"Standard event admission for one visitor.",childDetail:"Admission for one visitor under 15. Age may be checked at entry.",buyer:"Buyer details",name:"Full name",email:"Email address",phone:"Phone (optional)",promo:"Promo code (optional)",promoHint:"If you have a code, enter it here. You can also apply an eligible code in secure checkout.",summary:"Order summary",total:"Total",continue:"Continue to secure checkout",redirect:"Secure Stripe Checkout is opening in a new tab.",error:"Checkout could not be started. Please check your details and try again.",cancelled:"Checkout was cancelled. Your card was not charged.",secure:["Secure payment through Stripe","Promo codes supported","Digital QR tickets after payment"]},"zh-Hant":{eyebrow:"é çå
¥å ´åé¡",title:"é票",intro:"鏿é票ãå¡«å¯«è³¼ç¥¨äººè³æï¼ç¶å¾åå¾å®å
¨ç Stripe çµå¸³ã仿¬¾ç¶ç¢ºèªå¾ï¼æ¸ç¢¼é票æç«å³é¡¯ç¤ºã",adultDetail:"ä¸ä½è¨ªå®¢çæ¨æºå±æé票ã",childDetail:"ä¸ä½ 15 æ²ä»¥ä¸è¨ªå®¢é票ï¼å
¥å ´ææéæ ¸å¯¦å¹´é½¡ã",buyer:"è³¼ç¥¨äººè³æ",name:"å§å",email:"é»éµå°å",phone:"é»è©±ï¼é¸å¡«ï¼",promo:"åªæ 碼ï¼é¸å¡«ï¼",promoHint:"å¦æåªæ 碼ï¼è«å¨æ¤è¼¸å
¥ãåè³æ ¼åªæ ç¢¼äº¦å¯æ¼å®å
¨çµå¸³é 使ç¨ã",summary:"è¨å®æè¦",total:"總é¡",continue:"åå¾å®å
¨çµå¸³",redirect:"æ£å¨æ°åé éåå®å
¨ç Stripe çµå¸³ã",error:"æªè½éå§çµå¸³ãè«æª¢æ¥è³æå¾é試ã",cancelled:"çµå¸³å·²åæ¶ï¼ä½ çä¿¡ç¨å¡ä¸æè¢«æ£æ¬¾ã",secure:["éé Stripe å®å
¨ä»æ¬¾","æ¯æ´åªæ 碼","仿¬¾å¾å徿¸ç¢¼ QR é票"]}};function M({value:i,onChange:t,label:a}){return e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:53",className:"quantity-control","aria-label":a,children:[e.jsx("button",{"data-loc":"client/src/pages/Tickets.tsx:53",type:"button",onClick:()=>t(Math.max(0,i-1)),"aria-label":`Remove one ${a}`,children:e.jsx(U,{"data-loc":"client/src/pages/Tickets.tsx:53",className:"h-4 w-4"})}),e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:53","aria-live":"polite",children:i}),e.jsx("button",{"data-loc":"client/src/pages/Tickets.tsx:53",type:"button",onClick:()=>t(Math.min(12,i+1)),"aria-label":`Add one ${a}`,children:e.jsx(E,{"data-loc":"client/src/pages/Tickets.tsx:53",className:"h-4 w-4"})})]})}function z(){const{language:i}=f(),t=I[i],[a,p]=n.useState(1),[l,u]=n.useState(0),[r,h]=n.useState(""),[o,g]=n.useState(""),[c,w]=n.useState(""),[j,C]=n.useState(""),k=v.ticketing.createCheckout.useMutation(),y=a*d.adult+l*d.childU15,R=typeof window<"u"&&new URLSearchParams(window.location.search).get("cancelled")==="1",S=async s=>{if(s.preventDefault(),a+l<1)return T.error(i==="en"?"Choose at least one ticket.":"è«é¸æè³å°ä¸å¼µé票ã");try{const x=await k.mutateAsync({buyerName:r,email:o,phone:c||void 0,promoCode:j||void 0,adultQuantity:a,childQuantity:l,language:i});T.success(t.redirect),window.open(x.checkoutUrl,"_blank","noopener,noreferrer")||window.location.assign(x.checkoutUrl)}catch(x){T.error(x instanceof Error?x.message:t.error)}};return e.jsx("section",{"data-loc":"client/src/pages/Tickets.tsx:83",className:"page-hero",children:e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:84",className:"container py-16 sm:py-24",children:[e.jsx("p",{"data-loc":"client/src/pages/Tickets.tsx:85",className:"eyebrow text-cyan-200",children:t.eyebrow}),e.jsx("h1",{"data-loc":"client/src/pages/Tickets.tsx:86",className:"mt-5 font-display text-7xl leading-[0.88] text-white sm:text-9xl",children:t.title}),e.jsx("p",{"data-loc":"client/src/pages/Tickets.tsx:87",className:"mt-6 max-w-2xl text-base leading-7 text-slate-300",children:t.intro}),R&&e.jsx("div",{"data-loc":"client/src/pages/Tickets.tsx:88",className:"mt-8 rounded-xl border border-[#d7b86b]/30 bg-[#d7b86b]/10 p-4 text-sm text-[#ead18d]",children:t.cancelled}),e.jsxs("form",{"data-loc":"client/src/pages/Tickets.tsx:90",onSubmit:S,className:"mt-12 grid gap-8 xl:grid-cols-[1.25fr_0.75fr]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:91",className:"space-y-5",children:[[{label:m.adult,price:d.adult,detail:t.adultDetail,value:a,setValue:p},{label:m.childU15,price:d.childU15,detail:t.childDetail,value:l,setValue:u}].map(s=>e.jsxs("article",{"data-loc":"client/src/pages/Tickets.tsx:96",className:"ticket-tier",children:[e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:97",children:[e.jsx("p",{"data-loc":"client/src/pages/Tickets.tsx:97",className:"eyebrow text-cyan-200",children:"Admission"}),e.jsx("h2",{"data-loc":"client/src/pages/Tickets.tsx:97",className:"mt-3 font-display text-4xl text-white",children:s.label}),e.jsx("p",{"data-loc":"client/src/pages/Tickets.tsx:97",className:"mt-2 text-sm text-slate-400",children:s.detail})]}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:98",className:"flex items-center justify-between gap-5 sm:justify-end",children:[e.jsxs("p",{"data-loc":"client/src/pages/Tickets.tsx:98",className:"font-display text-4xl text-white",children:["HKD ",s.price]}),e.jsx(M,{"data-loc":"client/src/pages/Tickets.tsx:98",value:s.value,onChange:s.setValue,label:s.label})]})]},s.label)),e.jsxs("fieldset",{"data-loc":"client/src/pages/Tickets.tsx:102",className:"form-panel",children:[e.jsx("legend",{"data-loc":"client/src/pages/Tickets.tsx:103",className:"font-display text-4xl text-white",children:t.buyer}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:104",className:"mt-7 grid gap-5 sm:grid-cols-2",children:[e.jsxs("label",{"data-loc":"client/src/pages/Tickets.tsx:105",className:"field-label sm:col-span-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:105",children:t.name}),e.jsx("input",{"data-loc":"client/src/pages/Tickets.tsx:105",required:!0,minLength:2,maxLength:160,value:r,onChange:s=>h(s.target.value),autoComplete:"name"})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets.tsx:106",className:"field-label",children:[e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:106",children:t.email}),e.jsx("input",{"data-loc":"client/src/pages/Tickets.tsx:106",required:!0,type:"email",maxLength:320,value:o,onChange:s=>g(s.target.value),autoComplete:"email"})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets.tsx:107",className:"field-label",children:[e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:107",children:t.phone}),e.jsx("input",{"data-loc":"client/src/pages/Tickets.tsx:107",maxLength:40,value:c,onChange:s=>w(s.target.value),autoComplete:"tel"})]}),e.jsxs("label",{"data-loc":"client/src/pages/Tickets.tsx:108",className:"field-label sm:col-span-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:108",children:t.promo}),e.jsx("input",{"data-loc":"client/src/pages/Tickets.tsx:108",maxLength:48,value:j,onChange:s=>C(s.target.value.toUpperCase()),autoCapitalize:"characters"}),e.jsx("small",{"data-loc":"client/src/pages/Tickets.tsx:108",children:t.promoHint})]})]})]})]}),e.jsxs("aside",{"data-loc":"client/src/pages/Tickets.tsx:113",className:"order-summary",children:[e.jsx(N,{"data-loc":"client/src/pages/Tickets.tsx:114",className:"h-7 w-7 text-cyan-200"}),e.jsx("h2",{"data-loc":"client/src/pages/Tickets.tsx:115",className:"mt-5 font-display text-4xl text-white",children:t.summary}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:116",className:"mt-8 space-y-4 border-y border-white/10 py-6 text-sm",children:[a>0&&e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:117",className:"flex justify-between gap-4",children:[e.jsxs("span",{"data-loc":"client/src/pages/Tickets.tsx:117",className:"text-slate-300",children:[m.adult," à ",a]}),e.jsxs("span",{"data-loc":"client/src/pages/Tickets.tsx:117",children:["HKD ",a*d.adult]})]}),l>0&&e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:118",className:"flex justify-between gap-4",children:[e.jsxs("span",{"data-loc":"client/src/pages/Tickets.tsx:118",className:"text-slate-300",children:[m.childU15," à ",l]}),e.jsxs("span",{"data-loc":"client/src/pages/Tickets.tsx:118",children:["HKD ",l*d.childU15]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Tickets.tsx:120",className:"mt-6 flex items-end justify-between gap-4",children:[e.jsx("span",{"data-loc":"client/src/pages/Tickets.tsx:120",className:"eyebrow text-slate-400",children:t.total}),e.jsxs("strong",{"data-loc":"client/src/pages/Tickets.tsx:120",className:"font-display text-5xl font-normal text-white",children:["HKD ",y]})]}),e.jsxs("button",{"data-loc":"client/src/pages/Tickets.tsx:121",type:"submit",disabled:k.isPending||y===0,className:"ticket-cta mt-8 flex min-h-12 w-full justify-center disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(L,{"data-loc":"client/src/pages/Tickets.tsx:121",className:"h-4 w-4"}),k.isPending?"â¦":t.continue]}),e.jsx("ul",{"data-loc":"client/src/pages/Tickets.tsx:122",className:"mt-7 space-y-3",children:t.secure.map(s=>e.jsxs("li",{"data-loc":"client/src/pages/Tickets.tsx:123",className:"flex items-center gap-2 text-xs text-slate-400",children:[e.jsx(H,{"data-loc":"client/src/pages/Tickets.tsx:123",className:"h-4 w-4 text-cyan-200"}),s]},s))})]})]}),e.jsx(K,{"data-loc":"client/src/pages/Tickets.tsx:127"})]})})}export{z 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.