1import{u as le}from"./useQuery-J_ZvZ6Yd.js";import{g as xe,a as he,b as pe}from"./ecommerce-CVHizo0X.js";import{a as S,p as e,t as fe}from"./chunk-BV7QT456-DdeNQK3V.js";import{t as be}from"./i18n-routing-CyUnpHmq.js";import{l as re}from"./logo_trans-YhBI3VwB.js";import{F as ke}from"./FileSaver.min-D0bcnIio.js";import{i as ge}from"./browser-CK3SCXuS.js";import{B as I}from"./Button-DXYIv0zD.js";import{o as je,s as ye,u as we,a as Ne}from"./schemas-DA8tnxNz.js";import{u as ve}from"./useDialog-Dyw9xfsa.js";import{u as Ce}from"./AuthContext-ITX5IgHz.js";import{u as Le}from"./useBaseQuery-CyR1GZb_.js";import{u as _e}from"./useMutation-Q57BkF3t.js";import{C as ce}from"./CloseButton-xaR58E3N.js";import{t as Se}from"./tickbox-d1lmzvGp.js";import{u as V}from"./useTranslation-BujEXuts.js";import{b as F}from"./ga4-cgdoKrx9.js";function ut(t){var n;const o=le({queryKey:["order","detail",t],queryFn:({signal:s})=>xe(t,{signal:s}),enabled:!!t,retry:5,refetchOnWindowFocus:!1,refetchInterval:s=>s.state.data||s.state.status==="error"?!1:3e3});return{order:o.data,streamingEvent:(n=o.data)==null?void 0:n.streamingEvent,isLoading:o.isLoading,error:o.error}}function $e(t){return le({queryKey:["feedback","product",t],queryFn:({signal:o})=>he(t,{signal:o}),enabled:!!t})}const B="/assets/Ticket_trans_top_2x-wNLDMMd9.png",E="/assets/Ticket_trans_bottom_2x-BdYw2nvt.png",g=3,Me=240,C=Me*g,D="system-ui, -apple-system, sans-serif";function R(t,o){return new Promise((n,s)=>{const r=new Image;r.onload=()=>n(r),r.onerror=s,r.src=t})}async function Te(t){try{const n=await(await fetch(t)).blob(),s=URL.createObjectURL(n);try{return await R(s)}finally{URL.revokeObjectURL(s)}}catch{return null}}function ie(t,o){const n=t.width,s=t.height,r=document.createElement("canvas");r.width=n,r.height=s;const u=r.getContext("2d");u.fillStyle="#d9d9d9",u.fillRect(0,0,n,s),u.globalCompositeOperation="destination-in",u.drawImage(o,0,0,n,s);const d=document.createElement("canvas");d.width=n,d.height=s;const l=d.getContext("2d"),a=g;l.drawImage(t,a,a,n-a*2,s-a*2),l.globalCompositeOperation="destination-in",l.drawImage(o,a,a,n-a*2,s-a*2);const i=document.createElement("canvas");i.width=n,i.height=s;const c=i.getContext("2d");return c.drawImage(r,0,0),c.drawImage(d,0,0),i}async function De(t,o){const n=Math.round(C*10/7),s=document.createElement("canvas");s.width=C,s.height=n;const r=s.getContext("2d");if(t){const u=t.naturalWidth/t.naturalHeight,d=C/n;let l=0,a=0,i=t.naturalWidth,c=t.naturalHeight;u>d?(i=t.naturalHeight*d,l=(t.naturalWidth-i)/2):(c=t.naturalWidth/d,a=(t.naturalHeight-c)/2),r.drawImage(t,l,a,i,c,0,0,C,n)}else r.fillStyle="#cccccc",r.fillRect(0,0,C,n);return ie(s,o)}async function Ie(t,o,n,s,r){const u=o.naturalWidth/o.naturalHeight,d=Math.round(C/u),l=document.createElement("canvas");l.width=C,l.height=d;const a=l.getContext("2d");a.fillStyle="#ffffff",a.fillRect(0,0,C,d);const i=C/2;let c=Math.round(d*.12);const j=24*g,y=Math.round(t.naturalWidth/t.naturalHeight*j);a.drawImage(t,i-y/2,c,y,j),c+=j+Math.round(16*g),a.textBaseline="alphabetic",a.fillStyle="#000000",a.textAlign="center";const p=20*g,x=13*g,b=9*g;a.font=`600 ${p}px ${D}`;const w=a.measureText(n).width;a.font=`600 ${x}px ${D}`;const N=s?a.measureText(s).width:0,$=s?a.measureText(" ").width:0;a.font=`600 ${b}px ${D}`;const _=s?a.measureText(" (HKT)").width:0,M=w+(s?$+N+_:0);let k=i-M/2;return a.font=`600 ${p}px ${D}`,a.textAlign="left",a.fillText(n,k,c+p),k+=w+$,s&&(a.font=`600 ${x}px ${D}`,a.fillText(s,k,c+p),k+=N,a.font=`600 ${b}px ${D}`,a.fillText(" (HKT)",k,c+p)),c+=p+Math.round(12*g),a.strokeStyle="#d9d9d9",a.lineWidth=g,a.setLineDash([4*g,3*g]),a.beginPath(),a.moveTo(Math.round(C*.08),c),a.lineTo(Math.round(C*.92),c),a.stroke(),a.setLineDash([]),c+=Math.round(12*g),a.font=`${12*g}px ${D}`,a.fillStyle="#898989",a.textAlign="center",a.fillText(r,i,c+12*g),ie(l,o)}function We({posterUrl:t,logoUrl:o,maskTopUrl:n,maskBottomUrl:s,liveDate:r,liveTime:u,optionName:d,fileName:l="ticket.png"}){const[a,i]=S.useState(!1);return{download:async()=>{i(!0);try{const[j,y,p,x]=await Promise.all([t?Te(t):Promise.resolve(null),R(o),R(n),R(s)]),b=await De(j,p),w=await Ie(y,x,r,u,d),N=g,$=b.height+w.height-N,_=d
1ocument.createElement("canvas");_.width=C,_.height=$;const M=_.getContext("2d");M.drawImage(b,0,0),M.drawImage(w,0,b.height-N);const k=await new Promise(v=>_.toBlob(v,"image/png"));if(!k)return;if(navigator.share&&ge()){const v=new File([k],l,{type:"image/png"});try{if(navigator.canShare&&navigator.canShare({files:[v]})){await navigator.share({files:[v]});return}}catch(T){if(T.name==="AbortError")return}}ke.saveAs(k,l)}finally{i(!1)}},isGenerating:a}}function H(t){return new Date(t).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,"")}function Ae({title:t,startDate:o,endDate:n,description:s=""}){const r=o?H(o):"",u=n?H(n):"",d=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(t)}&dates=${r}/${u}&details=${encodeURIComponent(s)}`,l=`https://outlook.live.com/calendar/0/action/compose?subject=${encodeURIComponent(t)}&startdt=${encodeURIComponent(o)}&enddt=${encodeURIComponent(n)}&body=${encodeURIComponent(s)}`,a=S.useCallback(()=>{const i=o?H(o):"",c=n?H(n):"",j=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//The Makers//EN","BEGIN:VEVENT",`DTSTART:${i}`,`DTEND:${c}`,`SUMMARY:${t}`,`DESCRIPTION:${s}`,"END:VEVENT","END:VCALENDAR"].join(`\r 2`),y=new Blob([j],{type:"text/calendar;charset=utf-8"}),p=URL.createObjectURL(y),x=document.createElement("a");x.href=p,x.download="event.ics",x.click(),URL.revokeObjectURL(p)},[t,o,n,s]);return{googleCalendarUrl:d,outlookCalendarUrl:l,downloadIcs:a}}function Oe(t){const o=Le();return _e({mutationFn:n=>pe(n),onSuccess:n=>{o.invalidateQueries({queryKey:["feedback"]})},onError:t==null?void 0:t.onError})}const He=je({content:ye().optional()});function Re({filled:t,disabled:o}){const n=o?"#D9D9D9":t?"#C0ED1C":"#D9D9D9";return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:t&&!o?n:"none",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})}function Pe({value:t,disabled:o,onChange:n}){return e.jsx("div",{className:"flex gap-1",children:[1,2,3].map(s=>e.jsx("button",{type:"button",disabled:o,className:`p-0.5 transition-opacity ${o?"cursor-not-allowed opacity-40":"cursor-pointer hover:scale-110"}`,onClick:()=>!o&&n(s),"aria-label":`${s} star`,children:e.jsx(Re,{filled:(t??0)>=s,disabled:o})},s))})}function Ue({onClose:t}){const{t:o}=V("common");return e.jsxs("div",{className:"flex flex-col items-center gap-8 py-4",children:[e.jsx("div",{className:"relative flex items-center justify-center w-full",children:e.jsx(ce,{onClick:t,className:"absolute right-0"})}),e.jsx("p",{className:"text-[20px] font-bold text-black text-center",children:o("payment_complete.feedback_success")}),e.jsx("img",{src:Se,alt:"Success",className:"w-16 h-16"}),e.jsx(I,{gradientHover:!0,className:"w-full bg-black text-white text-base font-bold border-0 rounded-full",onClick:t,children:o("payment_complete.feedback_close")})]})}const z=["content","whole_ux","purchase_ux","streaming"];function Fe({isOpen:t,onClose:o,productId:n,posterUrl:s,eventSponsor:r,eventTitle:u,optionName:d,liveDateTimeFull:l}){const{t:a}=V("common"),{user:i}=Ce(),{ref:c}=ve({isOpen:t,onClose:o,lockScroll:!1}),[j,y]=S.useState(!1),[p,x]=S.useState(null),[b,w]=S.useState(!1),[N,$]=S.useState({content:{isNA:!1,value:null},whole_ux:{isNA:!1,value:null},purchase_ux:{isNA:!1,value:null},streaming:{isNA:!1,value:null}}),{register:_,handleSubmit:M,formState:{isSubmitting:k}}=we({resolver:Ne(He)}),{mutateAsync:v}=Oe();function T(h){$(m=>({...m,[h]:{isNA:!m[h].isNA,value:m[h].isNA?m[h].value:null}}))}function P(h,m){$(f=>({...f,[h]:{...f[h],value:m}}))}async function W(h){x(null),w(!1);for(const f of z){const L=N[f];if(L.isNA!==!0&&(L.value===null||L.value<=0)){w(!0);return}}const m={};for(const f of z){const L=N[f];L.isNA?m[f]="na":L.value!=null&&L.value>0&&(m[f]=String(L.value))}try{await v({productId:n,email:(i==null?void 0:i.email)??"",content:h.content||void 0,rating:Object.keys(m).length>0?m:void 0}),y(!0)}catch{x(a("payment_complete.feedback_error"))}}return e.jsx("dialog",{ref:c,className:"modal",children:e.jsx("div",{className:"modal-box w-full max-w-lg flex flex-col rounded-3xl px-2 py-8",children:e.jsx("div",{className:"overflow-y-auto max-h-[60vh] py-2 px-4 md:px-10",children:j?e.jsx(Ue,{onClose:o}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative flex items-center justify-center mb-7.5 text-black",children:[e.jsx("h3",{className:"font-bold text-[20px]",children:a("payment_complete.feedback_title")}),e.jsx(ce,{onClick:o,className:"absolute right-0"})]}),e.jsx("p",{className:"text-lg text-start font-bold text-black mb-4",children:a("payment_complete.feedback_thank_you")}),e.jsxs("div",{className:"flex gap-3 bg-gray-50 rounded-2xl p-3 mb-4",children:[s&&e.jsx("img",{src:s,alt:u,className:"w-14 h-auto rounded-lg object-cover aspect-7/10 shrink-0"}),e.jsxs("div",{className:"flex flex-col justify-center gap-1 min-w-0",children:[r&&e.jsx("p",{className:"text-base font-bold text-black leading-snug truncate",children:r}),e.jsx("p",{className:"text-base font-bold text-black leading-snug",children:u}),e.jsxs("p",{className:"text-xs text-black opacity-60",children:[d," | ",l," (HKT)"]})]})]}),e.jsx("p",{className:"text-sm text-black mb-5",children:a("payment_complete.feedback_instruction")}),e.jsxs("form",{onSubmit:M(W),noValidate:!0,className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-base font-bold text-black",children:a("payment_complete.feedback_rate_header")}),e.jsx("div",{className:"flex flex-col gap-3 mb-5",children:z.map(h=>{const m=N[h];return e.jsx("div",{className:"flex flex-row gap-1.5",children:e.jsxs("div",{className:"flex items-center w-full justify-between gap-2",children:[e.jsx("span",{className:"text-sm text-black flex-1",children:a(`payment_complete.feedback_${h}`)}),e.jsxs("div",{className:"flex flex-row gap-1.5 ml-auto",children:[e.jsx("button",{type:"button",onClick:()=>T(h),className:`text-sm font-bold px-2 py-0.5 ${m.isNA?" text-[#8F9CE1] opacity-100":"text-black opacity-40"}`,children:a("payment_complete.feedback_na")}),e.jsx(Pe,{value:m.value,disabled:m.isNA,onChange:f=>P(h,f)})]})]})},h)})}),b&&e.jsx("p",{className:"text-red-500 text-sm",children:a("payment_complete.feedback_rating_required")}),e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{className:"text-sm font-bold text-black block mb-2",children:a("payment_complete.feedback_other_
2comments")}),e.jsx("textarea",{..._("content"),rows:4,className:"w-full rounded-xl border border-gray-200 px-3 py-2 text-sm text-black resize-none focus:outline-none focus:border-[#C0ED1C]"})]}),p&&e.jsx("p",{className:"text-red-500 text-base text-center",children:a("payment_complete.feedback_error")}),e.jsx(I,{gradientHover:!0,type:"submit",loading:k,className:"w-full bg-black text-white text-base font-bold border-0 rounded-full",children:a("payment_complete.feedback_submit")})]})]})})})})}function Be(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("path",{d:"M5 11V18.2C5 18.6774 5.18437 19.1352 5.51256 19.4728C5.84075 19.8104 6.28587 20 6.75 20H17.25C17.7141 20 18.1592 19.8104 18.4874 19.4728C18.8156 19.1352 19 18.6774 19 18.2V11",stroke:"black",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 7L12 4L9 7",stroke:"black",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 4V15",stroke:"black",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ee(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("path",{d:"M15.1875 5.42383C15.6118 5.46926 15.9499 5.66401 16.2188 5.86914C16.503 6.08603 16.8078 6.39374 17.1211 6.70703L17.293 6.87891C17.6063 7.1922 17.914 7.49698 18.1309 7.78125C18.3653 8.08862 18.5859 8.48644 18.5859 9C18.5859 9.51356 18.3653 9.91138 18.1309 10.2188C17.914 10.503 17.6063 10.8078 17.293 11.1211L10.0986 18.3154C9.94157 18.4725 9.73819 18.6886 9.47461 18.8379C9.21089 18.9872 8.92063 19.0506 8.70508 19.1045L6.09668 19.7559L6.09473 19.7568L6.05078 19.7676C5.90293 19.8045 5.68156 19.8628 5.4873 19.8818C5.28061 19.9021 4.82874 19.9088 4.45996 19.54C4.09118 19.1713 4.09794 18.7194 4.11816 18.5127C4.13719 18.3184 4.19546 18.0971 4.23242 17.9492L4.89551 15.2949C4.9494 15.0794 5.0128 14.7891 5.16211 14.5254C5.31138 14.2618 5.5275 14.0584 5.68457 13.9014L12.8789 6.70703C13.1922 6.39374 13.497 6.08603 13.7812 5.86914C14.0886 5.63466 14.4864 5.41406 15 5.41406L15.1875 5.42383Z",stroke:"#D9D9D9",strokeWidth:"2"}),e.jsx("path",{d:"M12.5 7.5L15.5 5.5L18.5 8.5L16.5 11.5L12.5 7.5Z",fill:"#D9D9D9"})]})}function ze(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("rect",{x:"3",y:"6",width:"18",height:"15",rx:"2",stroke:"black",strokeWidth:"2"}),e.jsx("rect",{x:"3",y:"6",width:"18",height:"15",rx:"2",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2"}),e.jsx("rect",{x:"3",y:"6",width:"18",height:"15",rx:"2",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2"}),e.jsx("path",{d:"M3 10C3 8.11438 3 7.17157 3.58579 6.58579C4.17157 6 5.11438 6 7 6H17C18.8856 6 19.8284 6 20.4142 6.58579C21 7.17157 21 8.11438 21 10H3Z",fill:"black"}),e.jsx("path",{d:"M3 10C3 8.11438 3 7.17157 3.58579 6.58579C4.17157 6 5.11438 6 7 6H17C18.8856 6 19.8284 6 20.4142 6.58579C21 7.17157 21 8.11438 21 10H3Z",fill:"black","fill-opacity":"0.2"}),e.jsx("path",{d:"M3 10C3 8.11438 3 7.17157 3.58579 6.58579C4.17157 6 5.11438 6 7 6H17C18.8856 6 19.8284 6 20.4142 6.58579C21 7.17157 21 8.11438 21 10H3Z",fill:"black","fill-opacity":"0.2"}),e.jsx("path",{d:"M7 3L7 6",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M7 3L7 6",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M7 3L7 6",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M17 3L17 6",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M17 3L17 6",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M17 3L17 6",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M9 15H15",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M9 15H15",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M9 15H15",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M12 12L12 18",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M12 12L12 18",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("path",{d:"M12 12L12 18",stroke:"black",strokeOpacity:"0.2",strokeWidth:"2",strokeLinecap:"round"})]})}function de(t,o){var d,l,a;if(!t)return{date:"-",time:""};const n=new Date(t.start),s={hour:"2-digit",minute:"2-digit",hour12:!1};let r;if(o==="en"){const c=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).formatToParts(n),j=(d=c.find(x=>x.type==="day"))==null?void 0:d.value,y=(l=c.find(x=>x.type==="month"))==null?void 0:l.value,p=(a=c.find(x=>x.type==="year"))==null?void 0:a.value;r=`${j} ${y}, ${p}`}else{const i={year:"numeric",month:"long",day:"numeric"};r=n.toLocaleDateString("zh-TW",i)}const u=n.toLocaleTimeString("en-US",s);return{date:r,time:u}}function Ve(t,o){const{date:n,time:s}=de(t,o);return s?`${n} ${s}`:n}function Ge(t,o){return`${t==="HKD"?"HK$":`${t} `}
2${o.toLocaleString()}`}function mt({item:t,lang:o,currency:n,detail:s,streamingEvent:r,paymentFailed:u,enterLiveLabelKey:d="payment_complete.enter_live"}){var q,Z,Q,Y,J,X,ee,te,se,oe,ae,ne;const{t:l,i18n:a}=V("common"),i=fe(),c=!!(s!=null&&s.livePeriod&&new Date>=new Date(s.livePeriod.start)&&new Date<=new Date(s.livePeriod.end)),j=!!(s!=null&&s.livePeriod&&new Date>new Date(s.livePeriod.end)&&new Date<=new Date(new Date(s.livePeriod.end).getTime()+336*60*60*1e3)),{data:y,isLoading:p}=$e(j?t.productId:null),x=!!(y!=null&&y.id),b=((q=r==null?void 0:r.sponsor)==null?void 0:q[o])??((Z=r==null?void 0:r.sponsor)==null?void 0:Z.en)??"",w=((Q=r==null?void 0:r.title)==null?void 0:Q[o])??((Y=r==null?void 0:r.title)==null?void 0:Y.en)??"",N=[l("payment_complete.live_stream_prefix"),b,w].filter(Boolean).join(" - "),{googleCalendarUrl:$,outlookCalendarUrl:_,downloadIcs:M}=Ae({title:N,startDate:((J=s==null?void 0:s.livePeriod)==null?void 0:J.start)??"",endDate:((X=s==null?void 0:s.livePeriod)==null?void 0:X.end)??"",description:N}),[k,v]=S.useState(!1),T=S.useRef(null),[P,W]=S.useState(!1);S.useEffect(()=>{if(!k)return;const O=me=>{T.current&&!T.current.contains(me.target)&&v(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[k]);const h=((ee=t.product)==null?void 0:ee.name[o])??((te=t.product)==null?void 0:te.name.en)??"",m=(r==null?void 0:r.posterUrl)??((se
2=t.product)==null?void 0:se.imageUrl[o])??((oe=t.product)==null?void 0:oe.imageUrl.en),f=((ae=t.option)==null?void 0:ae.name[o])??((ne=t.option)==null?void 0:ne.name.en)??"-",L=t.option!=null?t.option.discountedPrice??t.option.price:null,{date:U,time:A}=de(s==null?void 0:s.livePeriod,"en"),G=Ve(s==null?void 0:s.livePeriod,o),{download:ue,isGenerating:K}=We({posterUrl:m,logoUrl:re,maskTopUrl:B,maskBottomUrl:E,liveDate:U,liveTime:A,optionName:f,fileName:`ticket-${U} ${A}.png`});return e.jsxs("div",{className:"flex flex-col md:flex-row bg-background-grey w-full gap-5",children:[!u&&e.jsxs("div",{className:"hidden md:flex md:w-60 shrink-0 md:flex-col",children:[e.jsxs("div",{className:"relative aspect-7/10",children:[e.jsx("div",{className:"absolute inset-0 bg-border-grey mask-(--mask-url) mask-size-[100%_100%] mask-no-repeat",style:{"--mask-url":`url(${B})`}}),e.jsx("div",{className:"absolute inset-px bottom-0 bg-cover bg-center bg-no-repeat mask-(--mask-url) mask-size-[100%_100%] mask-no-repeat",style:{"--mask-url":`url(${B})`,backgroundImage:m?`url(${m})`:void 0},role:"img","aria-label":h})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-border-grey mask-(--mask-url) mask-size-[100%_100%] mask-no-repeat",style:{"--mask-url":`url(${E})`}}),e.jsxs("div",{className:"relative mx-px mb-px bg-white flex flex-col items-center p-4 gap-3 mask-(--mask-url) mask-size-[100%_100%] mask-no-repeat",style:{"--mask-url":`url(${E})`},children:[e.jsx("img",{src:re,alt:"The Makers",className:"h-6 object-contain"}),e.jsxs("div",{className:"flex text-center text-black leading-tight items-baseline pb-3 border-b border-dashed border-border-grey",children:[e.jsx("p",{className:"text-[20px] font-semibold mr-1",children:U}),A&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[13px] font-semibold mr-0.5",children:A}),e.jsx("p",{className:"text-[9px] font-semibold",children:" (HKT)"})]})]}),e.jsx("p",{className:"text-xs text-[#898989] text-center",children:f})]})]})]}),e.jsx("div",{className:"flex-1 bg-white rounded-2xl",children:e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"px-4 py-6 md:p-7.5 h-full space-y-3 text-black font-bold",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 md:hidden",children:[!u&&m&&e.jsx("img",{src:m,alt:h,className:"w-16 h-auto rounded-lg object-cover aspect-7/10"}),e.jsxs("div",{className:"leading-snug",children:[b&&e.jsx("p",{className:"text-base font-bold text-black",children:b}),e.jsx("p",{className:"text-lg font-bold text-black",children:w||h})]})]}),e.jsxs("div",{className:"leading-snug hidden md:block",children:[b&&e.jsx("p",{className:"text-base",children:b}),e.jsx("h3",{className:"text-lg",children:w||h})]}),e.jsxs("div",{className:"space-y-2 font-normal",children:[e.jsxs("div",{className:"flex justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-[#bcbcbc]",children:l("payment_complete.ticket_type")}),e.jsx("span",{className:"text-black text-right",children:f})]}),e.jsxs("div",{className:"flex justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-[#bcbcbc]",children:l("payment_complete.live_date_time")}),e.jsxs("span",{className:"text-black text-right",children:[G," (HKT)"]})]}),e.jsxs("div",{className:"flex justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-[#bcbcbc]",children:l("payment_complete.price")}),e.jsx("span",{className:"text-black text-right",children:L!=null?Ge(n,L):"-"})]})]})]}),!u&&e.jsx("div",{className:"border-t border-border-grey"}),!u&&e.jsx("div",{className:"p-7.5 mt-auto",children:e.jsxs("div",{className:"max-w-100 mx-auto w-full flex flex-col gap-2",children:[c&&e.jsxs(I,{gradientHover:!0,className:"w-full bg-banner-green text-black text-base font-bold border-0",onClick:()=>{F("Enter live"),i(be(`/live/${r==null?void 0:r.id}`,a.language))},children:["â¶ ",l(d)]}),j&&e.jsxs(I,{gradientHover:!0,className:`w-full bg-black flex items-center justify-items-center text-white text-base font-bold border-0${x?" opacity-30":""}`,disabled:x||p,loading:p,onClick:()=>W(!0),children:[e.jsx(Ee,{}),l(x?"payment_complete.feedback_submitted":"payment_complete.feedback")]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(I,{gradientHover:!0,className:"flex flex-row items-center justify-center flex-1 text-sm text-black border border-border-grey bg-button-grey",disabled:K,loading:K,onClick:()=>{F("Share"),ue()},children:[e.jsx(Be,{}),l("payment_complete.share")]}),e.jsxs("div",{ref:T,className:"relative flex-1",children:[e.jsxs(I,{gradientHover:!0,className:"flex flex-row items-center justify-center w-full text-sm text-black border border-border-grey bg-button-grey",onClick:()=>{F("Add to calendar"),v(O=>!O)},children:[e.jsx(ze,{}),l("payment_complete.add_to_calendar")]}),k&&e.jsxs("div",{className:"absolute bottom-full mb-2 left-0 right-0 bg-white rounded-xl shadow-lg border border-gray-200 p-2 z-50",children:[e.jsx("a",{href:$,target:"_blank",rel:"noopener noreferrer",className:"block px-4 py-2 text-sm hover:bg-gray-100 rounded-lg cursor-pointer text-black",onClick:()=>v(!1),children:l("payment_complete.google_calendar")}),e.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"block px-4 py-2 text-sm hover:bg-gray-100 rounded-lg cursor-pointer text-black",onClick:()=>v(!1),children:l("payment_complete.outlook")}),e.jsx("button",{type:"button",className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded-lg cursor-pointer text-black",onClick:()=>{M(),v(!1)},children:l("payment_complete.ical")})]})]})]})]})})]})}),e.jsx(Fe,{isOpen:P,onClose:()=>W(!1),productId:t.productId,lang:o,posterUrl:m,eventSponsor:b,eventTitle:w||h,optionName:f,liveDateTimeFull:G})]})}function Ke(t,o){return o==="zh-Hant"&&t.replace(/\s+/g,"").toLowerCase()==="unionpay"?"éè¯":t}function xt(t,o,n="en"){if(!t&&!o)return"-";const s=(o==null?void 0:o.slice(-4))??"****";return`${t?Ke(t,n):""} (**${s})`}export{mt as O,xt as f,ut as u};
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.