1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1965],{7727:(e,t,a)=>{a.d(t,{EventsIndex:()=>w,T:()=>k});var s=a(95155),l=a(12115),n=a(34214),r=a(98328),i=a(965),o=a(73158),c=a(37648),d=a(26049),m=a(36899),x=a(73675);let p=async e=>{let{signal:t,...a}=e,s=new URLSearchParams;for(let[e,t]of Object.entries(a))void 0!==t&&s.set(e,String(t));let l=await fetch("/api/events?".concat(s),{signal:t,cache:"no-store"});if(!l.ok)throw Error("Events could not be loaded. Please try again.");let n=await l.json();if(!Array.isArray(n.events)||!Number.isInteger(n.page)||n.page<1||!Number.isInteger(n.pageSize)||n.pageSize<1||!Number.isInteger(n.totalCount)||n.totalCount<0||"boolean"!=typeof n.hasNextPage||!Number.isFinite(n.generatedAtUtcMilli))throw Error("Events could not be loaded. Please try again.");return n};var u=a(96776),h=a(31759);let g=e=>Array.from(new Map(e.map(e=>[e.category,e])).values()),b=e=>{let{events:t}=e;return(0,s.jsx)("div",{className:"flex flex-wrap gap-x-6 gap-y-3",children:g(t).map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{backgroundColor:e.categoryColor},"aria-hidden":"true"}),e.category]},e.category))})},y=e=>{let{className:t=""}=e;return(0,s.jsx)("span",{className:"inline-flex items-center rounded-full bg-red-500 px-2 py-0.5 text-[10px] font-bold leading-4 text-white ".concat(t),children:"New"})},j=e=>{let{view:t,onChange:a,primaryColor:l}=e;return(0,s.jsx)("div",{className:"inline-grid grid-cols-2 gap-1 rounded-md border border-gray-200 bg-white p-1",children:[{id:"list",label:"List",Icon:n.A},{id:"calendar",label:"Calendar",Icon:r.A}].map(e=>{let{id:n,label:r,Icon:i}=e,o=t===n;return(0,s.jsxs)("button",{type:"button",onClick:()=>a(n),"aria-pressed":o,className:"inline-flex items-center justify-center gap-2 rounded px-4 py-2 text-sm font-bold ".concat(o?"text-white":"text-gray-700 hover:bg-gray-100"),style:o?{backgroundColor:l}:void 0,children:[(0,s.jsx)(i,{className:"h-4 w-4"}),r]},n)})})},f=e=>{let{event:t,onNavigateStart:a,primaryColor:l,nowUtcMilli:n}=e;return(0,s.jsxs)(h.d6,{href:"/events/".concat(t.slug),prefetch:!1,loadingLabel:"Loading event...",onNavigateStart:a,className:"grid gap-4 rounded-md border border-gray-200 bg-white p-5 transition md:grid-cols-[120px_1fr_auto]",style:{borderColor:"#E5E7EB"},onMouseEnter:e=>{e.currentTarget.style.borderColor=l},onMouseLeave:e=>{e.currentTarget.style.borderColor="#E5E7EB"},children:[(0,s.jsxs)("div",{className:"relative rounded-md border border-gray-200 bg-gray-50 p-3 text-center",children:[(0,u.im)(t,n)&&(0,s.jsx)(y,{className:"absolute -top-2.5 left-2"}),(0,s.jsx)("p",{className:"text-sm font-bold uppercase text-gray-500",children:new Intl.DateTimeFormat("en-US",{month:"short"}).format((0,u.y0)(t))}),(0,s.jsx)("p",{className:"text-3xl font-black text-gray-950",children:(0,u.y0)(t).getDate()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"inline-flex rounded px-2 py-1 text-xs font-bold text-white",style:{backgroundColor:t.categoryColor},children:t.category}),(0,s.jsx)("h3",{className:"mt-3 text-2xl font-black text-gray-950",children:t.title}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-line text-sm leading-6 text-gray-600",children:t.description})]}),(0,s.jsxs)("div",{className:"text-sm font-bold text-gray-950 md:text-right",children:[(0,s.jsx)("p",{children:t.dateLabel}),(0,s.jsx)("p",{className:"mt-1",children:t.timeLabel}),(0,s.jsx)("p",{className:"mt-1 text-gray-600",children:t.location})]})]})},v=e=>{let{events:t,currentMonth:a,onNavigateStart:n,onMonthChange:r,nowUtcMilli:d}=e,m=(0,u._B)(a),p=a.getMonth(),[b,j]=(0,l.useState)("All Categories"),f=g(t).some(e=>e.category===b)?b:"All Categories",v=(0,l.useMemo)(()=>"All Categories"===f?t:t.filter(e=>e.category===f),[t,f]),N=(0,l.useMemo)(()=>v.reduce((e,t)=>{let a=t.dateISO;return e[a]=[...e[a]||[],t],e},{}),[v]),w=e=>{r(new Date(a.getFullYear(),a.getMonth()+e,1))};return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-6 flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[(0,s.jsxs)("select",{"aria-label":"Filter events by category",value:f,onChange:e=>j(e.target.value),className:"h-11 w-full max-w-[210px] rounded-md border border-gray-300 bg-white px-3 text-sm",children:[(0,s.jsx)("option",{children:"All Categories"}),g(t).map(e=>(0,s.jsx)("option",{children:e.category},e.category))]}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>w(-1),className:"rounded-full p-2 text-gray-700 hover:bg-gray-100","aria-label":"Previous month",children:(0,s.jsx)(i.A,{className:"h-5 w-5"})}),(0,s.jsx)("h2",{className:"min-w-[110px] text-center text-xl font-black text-gray-950",children:(0,u.Wj)(a)}),(0,s.jsx)("button",{type:"button",onClick:()=>w(1),className:"rounded-full p-2 text-gray-700 hover:bg-gray-100","aria-label":"Next month",children:(0,s.jsx)(o.A,{className:"h-5 w-5"})})]})]}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("div",{className:"min-w-[700px] overflow-hidden rounded-md border border-gray-200",children:[(0,s.jsx)("div",{className:"grid grid-cols-7 border-b border-gray-200 bg-white",children:["Mo","Tu","We","Th","Fr","Sa","Su"].map(e=>(0,s.jsx)("div",{className:"px-3 py-3 text-center text-sm font-bold text-gray-600",children:e},e))}),(0,s.jsx)("div",{className:"grid grid-cols-7",children:m.map(e=>{let t=(0,u.kX)(e),a=N[t]||[],l=e.getMonth()!==p,r=a.some(e=>(0,u.im)(e,d));return(0,s.jsxs)("div",{className:"min-h-[64px] border-b border-r border-gray-200 p-2 ".concat(l?"bg-gray-50 text-gray-400":"bg-white text-gray-950"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-center gap-1.5",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:e.getDate()}),r&&(0,s.jsx)(y,{})]}),(0,s.jsx)("div",{className:"mt-1.5 space-y-1",children:a.map(e=>(0,s.jsxs)(h.d6,{href:"/events/".concat(e.slug),prefetch:!1,loadingLabel:"Loading event...",onNavigateStart:n,className:"block rounded-md px-2 py-1.5 text-xs font-bold leading-4",style:{backgroundColor:e.categoryColor,color:(0,x.j6)(e.categoryColor)},children:[(0,s.jsx)("span",{className:"block",children:e.title}),(0,s.jsxs)("span",{className:"mt-1 flex items-center gap-1 font-semibold",children:[(0,s.jsx)(c.A,{className:"h-3 w-3 shrink-0"}),e.timeLabel.split(" - ")[0]]})]},e.id))})]},t)})})]})})]})},N=e=>{let{initialPage:t,primaryColor:a,onNavigateStart:n,remote:r}=e,[i,o]=(0,l.useState)("list"),[c,x]=(0,l.useState)(()=>new Date(t.generatedAtUtcMilli)),[h,g]=(0,l.useState)(t),[y,N]=(0,l.useState)(t.page),[w,k]=(0,l.useState)(!1),[C,S]=(0,l.useState)(!1),[A,E]=(0,l.useState)(0),[I,T]=(0,l.useState)(0),[M,P]=(0,l.useState)(null),L=(0,u._B)(c),_=(0,u.kX)(L[0]),q=(0,u.kX)(L[L.length-1]),D="".concat(_,"/").concat(q),R=t.generatedAtUtcMilli;(0,l.useEffect)(()=>
1{if(!r||"list"!==i||y<=h.page){k(!1);return}let e=new AbortController;return k(!0),S(!1),p({page:y,pageSize:t.pageSize,signal:e.signal}).then(t=>{e.signal.aborted||(g(e=>({...t,events:Array.from(new Map([...e.events,...t.events].map(e=>[e.id,e])).values())})),k(!1))}).catch(()=>{e.signal.aborted||(S(!0),k(!1))}),()=>e.abort()},[r,i,y,h.page,t.pageSize,A]),(0,l.useEffect)(()=>{if(!r||"calendar"!==i)return;let e=new AbortController;return P({range:D,status:"loading",events:[]}),(async()=>{let t=new Map,a=1,s=!0;for(;s;){let l=await p({page:a,pageSize:100,startDateFrom:_,startDateTo:q,signal:e.signal});if(e.signal.aborted)return;for(let e of l.events)t.set(e.id,e);s=l.hasNextPage,a+=1}P({range:D,status:"loaded",events:[...t.values()]})})().catch(()=>{e.signal.aborted||P({range:D,status:"error",events:[]})}),()=>e.abort()},[r,i,D,_,q,I]);let O=(r?(null==M?void 0:M.range)===D?M.events:[]:t.events).filter(e=>e.endAtUtcMilli>=R),U=r&&((null==M?void 0:M.range)!==D||"loading"===M.status),F=r&&(null==M?void 0:M.range)===D&&"error"===M.status,B=(0,l.useMemo)(()=>h.events.filter(e=>e.endAtUtcMilli>=R),[h.events,R]),H=(0,l.useMemo)(()=>r?B:[...B].sort((e,t)=>e.startAtUtcMilli-t.startAtUtcMilli),[r,B]);return(0,s.jsxs)("div",{className:"bg-white",children:[(0,s.jsx)(d.default,{variant:"events"}),(0,s.jsx)(m.D,{path:"/events",title:"Events For You"}),(0,s.jsxs)("section",{className:"container pb-16",children:[(0,s.jsxs)("div",{className:"mb-6 space-y-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-3xl font-black",style:{color:a},children:"Events Calendar"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"Switch between calendar and list view anytime."})]}),(0,s.jsx)(j,{view:i,onChange:o,primaryColor:a})]}),"list"===i&&(0,s.jsx)(b,{events:B})]}),"calendar"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-busy":U,children:(0,s.jsx)(v,{events:O,currentMonth:c,onNavigateStart:n,onMonthChange:x,nowUtcMilli:R})}),U&&(0,s.jsx)("p",{role:"status",className:"mt-4 text-sm text-gray-600",children:"Loading events..."}),F&&(0,s.jsxs)("div",{role:"alert",className:"mt-4 text-sm text-gray-700",children:[(0,s.jsx)("p",{children:"We could not load events for this month."}),(0,s.jsx)("button",{type:"button",onClick:()=>T(e=>e+1),className:"mt-2 rounded-md border border-gray-300 px-4 py-2 font-bold",children:"Try again"})]})]}):(0,s.jsxs)(s.Fragment,{children:[0===B.length?(0,s.jsxs)("div",{className:"rounded-md border border-gray-200 bg-gray-50 p-8 text-center",children:[(0,s.jsx)("h3",{className:"text-2xl font-black text-gray-950",children:"No public events yet"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"Upcoming chamber events will appear here once they are ready."})]}):(0,s.jsx)("div",{className:"space-y-4","aria-busy":w,children:H.map(e=>(0,s.jsx)(f,{event:e,onNavigateStart:n,primaryColor:a,nowUtcMilli:R},e.id))}),C&&(0,s.jsx)("p",{role:"alert",className:"mt-4 text-sm text-gray-700",children:"We could not load more events. Please try again."}),r&&h.hasNextPage&&(0,s.jsxs)("div",{className:"mt-6 text-center",children:[(0,s.jsx)("button",{type:"button",disabled:w,onClick:()=>{N(h.page+1),C&&E(e=>e+1)},className:"rounded-md border border-gray-300 px-6 py-3 text-sm font-bold text-gray-950 disabled:cursor-wait disabled:opacity-60",children:w?"Loading events...":C?"Try again":"Load more events"}),(0,s.jsx)("p",{role:"status",className:"mt-2 text-sm text-gray-600",children:w?"Loading more events...":"Showing ".concat(B.length," of ").concat(h.totalCount," events.")})]})]})]})]})},w=e=>{let{initialPage:t,primaryColor:a}=e,[n,r]=(0,l.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.VH,{message:n,primaryColor:a}),(0,s.jsx)(N,{initialPage:t,primaryColor:a,onNavigateStart:r,remote:!0})]})},k=e=>{let{events:t,primaryColor:a,nowUtcMilli:l,onNavigateStart:n}=e;return(0,s.jsx)(N,{initialPage:{events:t,page:1,pageSize:t.length,totalCount:t.length,hasNextPage:!1,generatedAtUtcMilli:l},primaryColor:a,onNavigateStart:n,remote:!1})}},19968:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(40157).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},31759:(e,t,a)=>{a.d(t,{VH:()=>c,d6:()=>d,w$:()=>i});var s=a(95155),l=a(12115),n=a(6874),r=a.n(n);let i=l.createContext(!1),o=e=>{let{event:t,href:a}=e;if(t.defaultPrevented||0!==t.button||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)return!1;let s=t.currentTarget.getAttribute("target");return(!s||"_self"===s)&&new URL(a,window.location.href).href!==window.location.href},c=e=>{let{message:t,primaryColor:a}=e;return t?(0,s.jsx)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-white/90 px-4 backdrop-blur-sm",role:"status","aria-live":"polite",children:(0,s.jsxs)("div",{className:"rounded-md border border-gray-200 bg-white px-8 py-7 text-center shadow-xl",children:[(0,s.jsx)("div",{className:"mx-auto h-12 w-12 animate-spin rounded-full border-4 border-gray-200 border-t-[var(--cmp-event-primary-color)]",style:{borderTopColor:a}}),(0,s.jsx)("p",{className:"mt-5 text-lg font-black text-gray-950",children:t}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"One moment while the page opens."})]})}):null},d=e=>{let{href:t,loadingLabel:a,onNavigateStart:n,onClick:c,children:d,...m}=e;return l.useContext(i)?(0,s.jsx)("span",{className:m.className,style:m.style,role:"link","aria-disabled":"true",children:d}):(0,s.jsx)(r(),{...m,href:t,onClick:e=>{null==c||c(e),o({event:e,href:t})&&n(a)},children:d})}},37648:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(40157).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},81965:(e,t,a)=>{a.r(t),a.d(t,{AttendeeAssignmentSection:()=>tX,EventDetail:()=>tP,EventQuickFacts:()=>tC,Events:()=>at,GeneratedInvoiceView:()=>t2,MemberInvoiceCard:()=>tW,NonMemberInvoiceCard:()=>
1tK,SponsorBillingCard:()=>t3,buildEventAttendeeInput:()=>ti,getEventAttendeeFieldError:()=>to});var s=a(95155),l=a(39959),n=a(36899),r=a(12115),i=a(6874),o=a.n(i),c=a(30242),d=a(965),m=a(83662),x=a(98328),p=a(37648),u=a(40157);let h=(0,u.A)("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);var g=a(19968),b=a(10518);let y=(0,u.A)("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var j=a(31554),f=a(86438),v=a(18046);let N=(0,u.A)("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);var w=a(19637),k=a(15300),C=a(96776),S=a(98715);let A=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,E=/^[0-9a-f]{64}$/,I=new Map,T=new Map,M=e=>"string"==typeof e&&A.test(e),P=()=>{try{return window.sessionStorage}catch(e){return}},L=()=>window.location.host.trim().toLowerCase()||null,_=()=>{var e,t;let a=null===(t=globalThis.crypto)||void 0===t?void 0:null===(e=t.randomUUID)||void 0===e?void 0:e.call(t);if(!a||!M(a))throw Error("A secure event operation identifier could not be created.");return a},q=e=>{let{action:t,entityId:a,eventId:s,tenantKey:l}=e;return"cmp-public-event-operation:v1:".concat(encodeURIComponent(l),":").concat(encodeURIComponent(s),":").concat(t,":").concat(encodeURIComponent(a))},D=e=>{if(!e)return null;try{let t=JSON.parse(e);if(!t||"object"!=typeof t||Array.isArray(t)||1!==t.version||!M(t.operationId)||"string"!=typeof t.requestHash||!E.test(t.requestHash))return null;return t}catch(e){return null}},R=e=>{let{storage:t,storageKey:a}=e;try{return D(t.getItem(a))}catch(e){throw Error("Safe event retry storage is unavailable in this browser.")}},O=async e=>{let{action:t,createOperationId:a=_,entityId:s,eventId:l,fingerprintRequest:n=e=>(0,S.hh)({requestIdentity:e}),input:r,storage:i=P(),tenantKey:o}=e;if(!i)throw Error("Safe event retry storage is unavailable in this browser.");let c={...r};delete c.operationId;let d=q({action:t,entityId:s,eventId:l,tenantKey:o}),m=await n({action:t,entityId:s,eventId:l,input:c,tenantKey:o}),x=R({storage:i,storageKey:d});if((null==x?void 0:x.requestHash)===m)return{input:{...c,operationId:x.operationId},operationId:x.operationId,storageKey:d};let p=a();if(!M(p))throw Error("A secure event operation identifier could not be created.");try{i.setItem(d,JSON.stringify({operationId:p,requestHash:m,version:1}))}catch(e){throw Error("Safe event retry storage is unavailable in this browser.")}return{input:{...c,operationId:p},operationId:p,storageKey:d}},U=async e=>{let t=q(e),a=I.get(t),s=(async()=>(await a,O(e)))();I.set(t,s);try{return await s}finally{I.get(t)===s&&I.delete(t)}},F=e=>{let t,{operation:a,storage:s=P()}=e;if(!s)return!1;try{t=R({storage:s,storageKey:a.storageKey})}catch(e){return!1}if((null==t?void 0:t.operationId)!==a.operationId)return!1;try{return s.removeItem(a.storageKey),!0}catch(e){return!1}},B=e=>{let t,a,{execute:s,isAuthoritativelyCompleted:l,...n}=e,r=q(n),i=T.get(r);if(i)return i;let o=new Promise((e,s)=>{t=e,a=s});return T.set(r,o),(async()=>{try{let e=await U(n),a=await s(e.input);l(a)&&F({operation:e,...n.storage?{storage:n.storage}:{}}),t(a)}catch(e){a(e)}finally{T.get(r)===o&&T.delete(r)}})(),o},H=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return e.tickets.filter(a=>a.visibleOnRegistrationForm&&"Sponsor included"!==a.audience&&(!a.salesStartUtcMilli||a.salesStartUtcMilli<=t)&&(!a.salesEndUtcMilli||a.salesEndUtcMilli>=t)&&(0===a.remainingQuantity||null!=e.spotsRemaining&&e.spotsRemaining<a.attendeesPerTicket))},G=e=>{let{event:t,primaryColor:a}=e,{executeRecaptcha:l}=(0,c._Y)(),[n,i]=(0,r.useState)(!1),[o,d]=(0,r.useState)(!1),[m,x]=(0,r.useState)(!1),[p,u]=(0,r.useState)(""),h=(0,r.useRef)(Date.now()),g=(0,r.useRef)(null),b=H(t);if(!t.allowWaitlist||!t.publicRegistrationEnabled||!b.length||(0,C.gY)(t))return null;let y=async e=>{if(e.preventDefault(),o)return;let a=new FormData(e.currentTarget);d(!0),u("");try{if(!l)throw Error("Security verification is still loading. Please try again.");let e=await l("event_waitlist_submit");g.current||(g.current=_());let s=await fetch("/api/events/".concat(encodeURIComponent(t.slug),"/waitlist"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({recaptchaToken:e,timestamp:h.current,honeyPot:a.get("website"),input:{operationId:g.current,eventId:t.id,ticketTypeId:a.get("ticketTypeId"),firstName:a.get("firstName"),lastName:a.get("lastName"),email:a.get("email")}})}),n=await s.json();if(!s.ok||!0!==n.success)throw Error(n.error||"The waitlist entry could not be saved.");x(!0)}catch(e){u(e instanceof Error?e.message:"The waitlist entry could not be saved.")}finally{d(!1)}};return m?(0,s.jsx)("p",{className:"mt-6 rounded border border-green-300 bg-green-50 p-4 text-gray-950",role:"status",children:"You are on the waitlist. A seat is not reserved."}):n?(0,s.jsxs)("form",{onSubmit:y,className:"mt-6 grid gap-3 rounded-lg border border-gray-200 bg-white p-5 text-gray-950",children:[(0,s.jsx)("h3",{className:"text-lg font-bold",children:"Join the Waitlist"}),(0,s.jsxs)("label",{children:["Ticket type",(0,s.jsx)("select",{name:"ticketTypeId",className:"mt-1 w-full rounded border p-2",disabled:o,children:b.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,s.jsxs)("label",{children:["First name",(0,s.jsx)("input",{name:"firstName",autoComplete:"given-name",required:!0,maxLength:100,disabled:o,className:"mt-1 w-full rounded border p-2"})]}),(0,s.jsxs)("label",{children:["Last name",(0,s.jsx)("input",{name:"lastName",autoComplete:"family-name",maxLength:100,disabled:o,className:"mt-1 w-full rounded border p-2"})]}),(0,s.jsxs)("label",{children:["Email",(0,s.jsx)("input",{name:"email",type:"email",autoComplete:"email",required:!0,maxLength:254,disabled:o,className:"mt-1 w-full rounded border p-2"})]}),(0,s.jsx)("div",{"aria-hidden":"true",className:"hidden",children:(0,s.jsxs)("label",{children:["Website",(0,s.jsx)("input",{name:"website",tabIndex:-1,autoComplete:"off"})]})}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"This adds your contact details to the chamber's waitlist. A seat is not reserved."}),p&&(0,s.jsx)("p",{role:"alert",className:"text-sm text-red-700",children:p}),(0,s.jsx)("button",{type:"submit",disabled:o,className:"rounded px-5 py-3 font-bold text-white disabled:opacity-50",style:{backgroundColor:a},children:o?"Saving...":"Join Waitlist"}),(0,s.jsx)("button",{type:"button",disabled:o,onClick:()=>i(!1),className:"p-2",children:"Cancel"})]}):(0,s.jsx)("button",{type:"button",className:"mt-4 w-full rounded border px-5 py-3 font-bold",onClick:()=>{h.current=Date.now(),i(!0)},children:"Join the Waitlist"})};var Y=a(7727),V=a(31759),Q=a(30720),z=a(24803);let $=new Set(["EVERYONE","NON_MEMBERS","Everyone","Non members"]),J=e=>{let{audience:t}=e;return $.has(t)},W=e=>{let{sales:t}=e;return t.filter(e=>e.quantity>0&&e.priceAmount>0)},K=e=>{let{mode:t,sales:a}=e,s=W({sales:a});return 0!==s.length&&"DISABLED"!==t&&("ALL_TICKETS"===t||s.some(e=>J({audience:e.audience})))},X=e=>{let{mode:t,options:a,sales:s}=e;if(0===W({sales:s}).length)return[];let l=K({mode:t,sales:s});return a.filter(e=>l?"card"===e.type:"manual"===e.type)},Z=e=>{let{mode:t,options:a,sales:s}=e;if(0===W({sales:s}).length)return null;let l=K({mode:t,sales:s}),n=l?"card":"manual";return a.some(e=>e.type===n)?null:l?"Credit card payment is required for the selected tickets, but secure checkout is not available. Please contact the chamber.":"Credit card payment is not available for the selected tickets, and no manual payment method is configured. Please contact the chamber."},ee=e=>{let{expandTicketPackages:t,lineItems:a}=e;return a.flatMap(e=>{let{quantity:a,ticket:s}=e;return Array.from({length:Math.max(0,Math.floor(a||0))*(t?Math.max(1,Math.floor(s.attendeesPerTicket||1)):1)},(e,t)=>({slotId:"".concat(s.id,"::").concat(t),ticketTypeId:s.id,ticketTypeName:s.name}))})},et=e=>
1({...e,name:"",email:"",phone:"",customFieldValues:{}}),ea=e=>{let{currentRows:t,slots:a}=e,s=new Map(t.map(e=>[e.slotId,e]));return a.map(e=>{let t=s.get(e.slotId);return t?{...t,ticketTypeId:e.ticketTypeId,ticketTypeName:e.ticketTypeName}:et(e)})},es=e=>Array.isArray(e)?e.some(e=>e.trim().length>0):!!(e&&e.trim()),el=e=>Array.isArray(e)?e.map(e=>e.trim()).filter(Boolean).join(", "):(e||"").trim(),en=e=>Array.isArray(e)?e[0]||"":e||"",er=e=>{let{checked:t,choice:a,choices:s,value:l}=e,n=new Set(Array.isArray(l)?l:l?[l]:[]);return t?n.add(a):n.delete(a),s.filter(e=>n.has(e))};var ei=a(73675),eo=a(16370);let ec=e=>{let{action:t,result:a}=e;return"REGISTRATION"===t?!0===a.success&&!0===a.registrationSubmittedSuccessfully&&"string"==typeof a.registrationId&&a.registrationId.length>0:!0===a.success&&!0===a.sponsorshipRequestSubmittedSuccessfully&&"string"==typeof a.sponsorshipRequestId&&a.sponsorshipRequestId.length>0},ed=e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Submission returned an invalid response.");return e},em=async e=>{let{action:t,createOperationId:a,endpoint:s,entityId:l,eventId:n,fetchImpl:r=globalThis.fetch,fingerprintRequest:i,input:o,recaptchaToken:c,storage:d=P(),tenantKey:m=L(),timestamp:x}=e;if(!m)throw Error("The event tenant could not be identified for a safe retry.");let p=await B({action:t,...a?{createOperationId:a}:{},entityId:l,eventId:n,execute:async e=>{let t=await r(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({input:e,recaptchaToken:c,timestamp:x})}),a=ed(await t.json());if(!t.ok||!a.success)throw Error(a.error||"Submission could not be completed");return a},...i?{fingerprintRequest:i}:{},input:o,isAuthoritativelyCompleted:e=>ec({action:t,result:e}),...d?{storage:d}:{},tenantKey:m});if(!ec({action:t,result:p}))throw Error("REGISTRATION"===t?"The registration could not be confirmed.":"The sponsorship request could not be confirmed.");return p};var ex=a(6160);let ep=e=>null,eu={title:"Business Excellence Awards Gala 2026",date:"Monday, June 18, 2026",time:"6:00 PM - 10:00 PM",venue:"Sand Bay Convention Centre",address:"123 Main Street, Ontario, ON"},eh=e=>{let{children:t,narrow:a=!1}=e;return(0,s.jsx)("div",{className:"bg-white text-gray-950",children:(0,s.jsx)("div",{className:a?"mx-auto max-w-[980px] px-6 py-10":"mx-auto max-w-[1280px] px-6 py-10",children:t})})},eg=e=>{let{eyebrow:t,title:a}=e;return(0,s.jsxs)("div",{className:"text-center",children:[t?(0,s.jsx)("p",{className:"text-xs font-black uppercase tracking-[0.2em] text-blue-500",children:t}):null,(0,s.jsx)("h2",{className:"mt-2 font-serif text-4xl font-black leading-tight text-gray-950",children:a})]})},eb=e=>{let{icon:t,label:a,value:l}=e;return(0,s.jsxs)("div",{className:"flex items-center gap-3 border-r border-gray-100 px-5 last:border-r-0",children:[(0,s.jsx)("span",{className:"text-blue-500",children:t}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-black",children:l}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:a})]})]})},ey=()=>(0,s.jsx)("div",{className:"bg-white",children:(0,s.jsx)("section",{className:"relative min-h-[620px] bg-cover bg-center text-white",style:{backgroundImage:"linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.30)), url(https://images.unsplash.com/photo-1511795409834-ef04bbd61622?auto=format&fit=crop&w=1600&q=80)"},children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-[1280px] items-center px-10 py-24",children:[(0,s.jsxs)("div",{className:"max-w-[620px]",children:[(0,s.jsx)("p",{className:"text-4xl font-black text-blue-400",children:"SAND BAY"}),(0,s.jsx)("p",{className:"text-2xl font-black text-blue-300",children:"Chamber of Commerce"}),(0,s.jsx)("h1",{className:"mt-12 font-serif text-6xl font-black leading-tight",children:eu.title}),(0,s.jsx)("p",{className:"mt-5 max-w-[560px] text-lg leading-8 text-white/90",children:"Celebrate the achievements of local businesses, entrepreneurs, and community leaders during an unforgettable evening of networking, recognition, entertainment, and inspiration."}),(0,s.jsx)("p",{className:"mt-6 text-sm font-bold",children:"Registration Closes June 18, 2026"}),(0,s.jsxs)("div",{className:"mt-7 flex gap-4",children:[(0,s.jsxs)("button",{className:"rounded bg-blue-500 px-6 py-3 text-sm font-black text-white",children:["Register Now ",(0,s.jsx)(g.A,{className:"ml-1 inline h-4 w-4"})]}),(0,s.jsx)("button",{className:"rounded border border-white/40 bg-white/10 px-6 py-3 text-sm font-black text-white",children:"Become a Sponsor"})]})]}),(0,s.jsxs)("div",{className:"ml-auto w-[360px] rounded-xl border border-white/30 bg-black/20 p-8 text-center",children:[(0,s.jsx)("p",{className:"text-sm font-black uppercase",children:"Sponsor Level Name"}),(0,s.jsx)("div",{className:"mt-10 rounded border border-white/25 py-20 font-black",children:"The Sponsor Logo"})]})]})})}),ej=()=>(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"bg-blue-500 py-10 text-center text-white",children:[(0,s.jsx)("p",{className:"text-xl font-black uppercase tracking-wide",children:"Event Countdown"}),(0,s.jsx)("div",{className:"mt-5 flex justify-center gap-4",children:[["15","Days"],["08","Hours"],["42","Minutes"],["16","Seconds"]].map(e=>
1{let[t,a]=e;return(0,s.jsxs)("div",{className:"w-20 rounded bg-white py-3",children:[(0,s.jsx)("p",{className:"text-2xl font-black text-blue-500",children:t}),(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase text-gray-500",children:a})]},a)})})]}),(0,s.jsxs)("div",{className:"mx-auto grid max-w-[1280px] grid-cols-4 divide-x divide-gray-100 py-6",children:[(0,s.jsx)(eb,{icon:(0,s.jsx)(x.A,{}),label:"Event Date",value:eu.date}),(0,s.jsx)(eb,{icon:(0,s.jsx)(p.A,{}),label:"Event Time",value:eu.time}),(0,s.jsx)(eb,{icon:(0,s.jsx)(m.A,{}),label:"Event Venue",value:eu.venue}),(0,s.jsx)(eb,{icon:(0,s.jsx)(h,{}),label:"Tickets Starting at",value:"$65.00"})]}),(0,s.jsxs)(eh,{children:[(0,s.jsx)(eg,{title:"Connect & Network"}),(0,s.jsx)("p",{className:"mx-auto mt-6 max-w-[760px] text-center text-lg leading-8 text-gray-700",children:"Celebrate the achievements of local businesses, entrepreneurs, and community leaders during an unforgettable evening of networking, recognition, entertainment, and inspiration."})]})]}),ef=()=>(0,s.jsxs)(eh,{children:[(0,s.jsxs)("div",{className:"grid grid-cols-[320px_1fr] gap-10",children:[(0,s.jsx)("img",{src:"https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&w=700&q=80",alt:"",className:"h-[390px] w-full object-cover"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-black uppercase tracking-widest text-blue-500",children:"Keynote Speaker"}),(0,s.jsx)("h2",{className:"mt-2 font-serif text-4xl font-black",children:"Jane Smith"}),(0,s.jsx)("p",{className:"text-lg font-bold",children:"CEO, Innovation Canada"}),(0,s.jsx)("p",{className:"mt-5 max-w-[680px] text-lg leading-8 text-gray-700",children:"Jane Smith is a renowned business leader with over 20 years of experience driving economic growth."})]})]}),(0,s.jsx)(eg,{eyebrow:"Meet Our Panelists",title:""}),(0,s.jsx)("div",{className:"mt-8 grid grid-cols-4 gap-8",children:["Sarah Mitchell","Michael Chen","Jennifer Adams","David Thompson"].map((e,t)=>(0,s.jsxs)("div",{children:[(0,s.jsx)("img",{src:"https://images.unsplash.com/photo-".concat(t%2?"1500648767791-00dcc994a43e":"1494790108377-be9c29b29330","?auto=format&fit=crop&w=500&q=80"),alt:"",className:"h-44 w-full object-cover"}),(0,s.jsx)("p",{className:"mt-4 font-black",children:e}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Community leader and panelist"})]},e))})]}),ev=e=>{let{sponsorsOnly:t=!1}=e;return(0,s.jsxs)(eh,{children:[t?null:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-14",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(eg,{eyebrow:"Agenda Details",title:"Event Schedule"}),(0,s.jsx)("ul",{className:"mx-auto mt-8 max-w-sm space-y-5 text-sm",children:["Registration & Networking","Welcome Reception","Dinner Service","Awards Presentation","Entertainment","Closing Remarks"].map((e,t)=>(0,s.jsxs)("li",{className:"flex gap-4",children:[(0,s.jsx)("span",{className:"font-black text-blue-500",children:"".concat(6+t,":30PM")}),(0,s.jsx)("span",{children:e})]},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(eg,{eyebrow:"Venue Location",title:eu.venue}),(0,s.jsx)("div",{className:"mt-8 h-52 rounded bg-blue-50 p-12 text-center text-blue-500",children:"Ontario Map"}),(0,s.jsx)("p",{className:"mt-5 text-sm text-gray-600",children:eu.address})]})]}),(0,s.jsxs)("div",{className:t?"":"mt-16",children:[(0,s.jsx)(eg,{eyebrow:"Thank You To Our Sponsors",title:""}),(0,s.jsxs)("div",{className:"mt-10 grid gap-10",children:[(0,s.jsx)("div",{className:"rounded border border-gray-100 py-24 text-center font-black text-gray-700",children:"THE SPONSOR LOGO"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,s.jsx)("div",{className:"rounded border border-gray-200 py-14 text-center font-black",children:"SPONSOR LOGO 1"}),(0,s.jsx)("div",{className:"rounded border border-gray-200 py-14 text-center font-black",children:"SPONSOR LOGO 2"})]})]})]})]})},eN=e=>{let{variant:t="form"}=e;return(0,s.jsxs)(eh,{narrow:!0,children:[(0,s.jsx)("p",{className:"text-xs font-bold",children:"< Back to Events"}),(0,s.jsxs)("div",{className:"mt-8 text-center",children:[(0,s.jsx)("p",{className:"font-black",children:"CHAMBER LOGO"}),(0,s.jsxs)("h1",{className:"mt-5 text-2xl font-black",children:[eu.title," Registration Form"]})]}),(0,s.jsxs)("div",{className:"mt-8 rounded bg-[#f7f8ff] p-6 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-lg font-black text-blue-500",children:"Select Tickets"}),(0,s.jsx)("table",{className:"mt-4 w-full text-sm",children:(0,s.jsx)("tbody",{className:"divide-y",children:[["MT","Member Ticket","$100.00"],["NMT","Non-Member Ticket","$150.00"],["TB","Table of 8","$600.00"]].map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"py-4 font-black",children:e[0]}),(0,s.jsx)("td",{children:e[1]}),(0,s.jsx)("td",{children:e[2]}),(0,s.jsx)("td",{children:(0,s.jsx)("input",{className:"w-20 rounded border px-2 py-1",value:"table"===t&&"TB"===e[0]?1:2*("MT"===e[0]),readOnly:!0})}),(0,s.jsx)("td",{className:"text-right font-black",children:"table"===t&&"TB"===e[0]?"$600.00":"MT"===e[0]?"$200.00":"$0.00"})]},e[0]))})}),(0,s.jsxs)("div",{className:"mt-6 text-right text-xl font-black",children:["TOTAL DUE ","table"===t?"$600.00":"$226.00"]})]}
1),(0,s.jsx)(ew,{title:"member"===t?"Select Member Company To Invoice":"Invoice and Attendee Details",table:"table"===t}),(0,s.jsxs)("button",{className:"mt-8 w-full rounded bg-blue-500 py-4 text-sm font-black text-white",children:["Register & Generate Invoice ",(0,s.jsx)(ex.A,{className:"inline h-4 w-4"})]})]})},ew=e=>{let{title:t,table:a=!1}=e;return(0,s.jsxs)("div",{className:"mt-8 rounded bg-white p-6 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-lg font-black",children:t}),(0,s.jsxs)("div",{className:"mt-5 grid grid-cols-2 gap-4",children:[(0,s.jsx)("input",{className:"h-11 rounded border px-3",value:"John Johnson",readOnly:!0}),(0,s.jsx)("input",{className:"h-11 rounded border px-3",value:"[email protected]",readOnly:!0}),(0,s.jsx)("input",{className:"h-11 rounded border px-3",value:"1234567890",readOnly:!0}),(0,s.jsx)("input",{className:"h-11 rounded border px-3",value:"ABC Insurance Group",readOnly:!0})]}),(0,s.jsx)("p",{className:"mt-8 text-sm font-black",children:"Assign ALL tickets to attendees"}),(0,s.jsx)("div",{className:"mt-4 space-y-3",children:Array.from({length:a?8:2},(e,t)=>(0,s.jsxs)("div",{className:"grid grid-cols-[32px_1fr_1fr_1fr] gap-3",children:[(0,s.jsx)("span",{className:"py-2 text-sm",children:t+1}),(0,s.jsx)("input",{className:"h-10 rounded border px-3",value:0===t?"Alex Johnson":"",readOnly:!0}),(0,s.jsx)("input",{className:"h-10 rounded border px-3",value:0===t?"[email protected]":"",readOnly:!0}),(0,s.jsx)("input",{className:"h-10 rounded border px-3",value:0===t?"1234567890":"",readOnly:!0})]},t))})]})},ek=e=>{let{table:t=!1,details:a=!1}=e;return(0,s.jsxs)(eh,{narrow:!0,children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"font-black",children:"CHAMBER LOGO"}),(0,s.jsxs)("h1",{className:"mt-5 text-2xl font-black",children:[eu.title," Sponsorship"]})]}),(0,s.jsxs)("div",{className:"mt-8 rounded bg-white p-6 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-lg font-black text-blue-500",children:"Select Your Sponsorship Level"}),(0,s.jsx)("table",{className:"mt-4 w-full text-sm",children:(0,s.jsx)("tbody",{className:"divide-y",children:["Platinum Sponsor","Gold Sponsor","Silver Sponsor","Bronze Sponsor"].map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"py-4 font-black",children:e}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"rounded bg-blue-100 px-3 py-1 text-xs font-bold text-blue-700",children:"Available"})}),(0,s.jsxs)("td",{className:"font-black",children:["$",[2e3,1500,1e3,500][t].toLocaleString(),".00"]}),(0,s.jsx)("td",{children:0===t?"Selected":"Open"})]},e))})})]}),t?(0,s.jsx)(eN,{variant:"table"}):null,a?(0,s.jsxs)("div",{className:"mt-8 rounded bg-white p-6 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-lg font-black",children:"Sponsor My Event Comments"}),(0,s.jsx)("p",{className:"mt-4 text-sm leading-7 text-gray-700",children:"This sponsorship package includes brand visibility, complimentary attendee tickets, and public recognition."})]}):null]})},eC=e=>{let{state:t}=e;return"detail-hero"===t?(0,s.jsx)(ey,{}):"detail-countdown"===t?(0,s.jsx)(ej,{}):"detail-speakers"===t?(0,s.jsx)(ef,{}):"detail-location"===t?(0,s.jsx)(ev,{}):"detail-sponsors"===t?(0,s.jsx)(ev,{sponsorsOnly:!0}):"registration-member"===t?(0,s.jsx)(eN,{variant:"member"}):"registration-non-member"===t?(0,s.jsx)(eN,{variant:"non-member"}):"registration-table"===t?(0,s.jsx)(eN,{variant:"table"}):"sponsor-form"===t?(0,s.jsx)(ek,{}):"sponsor-table"===t?(0,s.jsx)(ek,{table:!0}):"sponsor-details"===t?(0,s.jsx)(ek,{details:!0}):(0,s.jsx)(eN,{})},eS=()=>({companyName:"",contactName:"",contactEmail:"",contactPhone:"",streetAddress:"",addressLine2:"",city:"",province:"",postalCode:"",country:""}),eA=e=>{var t,a,s,l;let{company:n}=e;return n?{companyName:n.name,contactName:n.contactName||"",contactEmail:n.contactEmail||"",contactPhone:n.phoneNumber||"",streetAddress:(null===(t=n.address)||void 0===t?void 0:t.streetAddress)||"",addressLine2:"",city:(null===(a=n.address)||void 0===a?void 0:a.city)||"",province:(null===(s=n.address)||void 0===s?void 0:s.province)||"",postalCode:(null===(l=n.address)||void 0===l?void 0:l.postalCode)||"",country:"Canada"}:eS()},eE=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim().toLowerCase()),eI=e=>{let t=e>0;return{billingIncluded:t,billingRequired:t}},eT=e=>{let{billing:t,billingIncluded:a,billingRequired:s}=e;return a?t.companyName.trim()?t.contactName.trim()?eE(t.contactEmail)?t.streetAddress.trim()&&t.city.trim()&&t.province.trim()&&t.postalCode.trim()&&t.country.trim()?null:"Enter the full billing address, including province/state, postal code and country.":"Enter a valid billing contact email.":"Enter the billing contact name.":"Enter the company or payer name.":s?"Complete the billing details before continuing.":null},eM=e=>{let{billing:t,billingIncluded:a,billingRequired:s}=e,l=eT({billing:t,billingIncluded:a,billingRequired:s});if(l)throw Error(l);return a?{companyName:t.companyName.trim(),contactName:t.contactName.trim(),contactEmail:t.contactEmail.trim(),contactPhone:t.contactPhone.trim()||null,streetAddress:t.streetAddress.trim(),addressLine2:t.addressLine2.trim()||null,city:t.city.trim(),province:t.province.trim(),postalCode:t.postalCode.trim(),country:t.country.trim()}:null},eP="AIzaSyCI6NZt_cU7du4ZKQrrY5AqWd4gwiLGGhA",eL={id:"manual-fallback",label:"Invoice me",description:"The chamber will follow up with payment instructions.",type:"manual"},e_="h-12 w-full min-w-0 rounded-md border border-gray-300 bg-white px-3 text-sm text-gray-950 outline-none transition placeholder:text-gray-500 focus:border-[var(--cmp-event-primary-color)] focu
1s:ring-2 focus:ring-[var(--cmp-event-primary-ring-color)]",eq="notranslate ".concat(e_),eD=e=>Object.entries(e).map(e=>{let[t,a]=e;return{fieldId:t,value:el(a)}}).filter(e=>e.value),eR=(e,t)=>{let a=e.find(e=>e.required&&!es(t[e.id]));return a?a.label:null},eO=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()),eU=e=>"$".concat((e||0).toLocaleString("en-CA",{minimumFractionDigits:2,maximumFractionDigits:2})),eF=e=>e/100,eB=e=>eU(eF(e)),eH=e=>{let{amountInCents:t,loading:a}=e;return null==t&&a?"Calculatingâ¦":eB(t||0)},eG=e=>null!==e.remainingQuantity&&void 0!==e.remainingQuantity?Math.max(0,Math.floor(e.remainingQuantity)):null!==e.availabilityLimit&&void 0!==e.availabilityLimit?Math.max(0,Math.floor(e.availabilityLimit)):null,eY=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(e.salesStartUtcMilli&&t<e.salesStartUtcMilli)return"Sales not open yet";if(e.salesEndUtcMilli&&t>e.salesEndUtcMilli)return"Sales closed";let a=eG(e);return 0===a?"Sold out":null!==a?"".concat(a," remaining"):null},eV=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a=eY(e,t);return"Sales not open yet"!==a&&"Sales closed"!==a&&"Sold out"!==a},eQ=(e,t)=>{let a=Math.max(0,Math.floor(t));if(!e||!eV(e))return 0;let s=eG(e);return null!==s?Math.min(s,a):a},ez=e=>{let t=e.find(e=>eV(e));return t?{[t.id]:1}:{}},e$=()=>{let e=new Date,t=new Date(e.getTime()+2592e6),a=e=>e.toLocaleDateString("en-CA",{month:"long",day:"numeric",year:"numeric"});return{invoiceDateLabel:a(e),dueDateLabel:a(t)}},eJ=e=>{let t=e.trim().replace(/\s+/g," ");if(!t)return{firstName:"",lastName:""};let a=t.indexOf(" ");return -1===a?{firstName:t,lastName:""}:{firstName:t.slice(0,a),lastName:t.slice(a+1)}},eW=e=>e.map(e=>({code:e.ticket.code||"â",description:e.ticket.name,quantity:e.quantity,unitPrice:e.ticket.priceAmount,lineTotal:e.lineTotal})),eK=e=>e.map(e=>({code:e.code||"â",description:e.description,quantity:e.quantity,unitPrice:eF(e.unitAmountInCents),lineTotal:eF(e.lineTotalInCents)})),eX=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Tax",s=Math.round(100*e.reduce((e,t)=>e+t.lineTotal,0)),l=Math.round(t/100*s);return{lineItems:e.map(e=>({ticketTypeId:null,code:e.code,description:e.description,quantity:e.quantity,unitAmountInCents:Math.round(100*e.unitPrice),lineTotalInCents:Math.round(100*e.lineTotal)})),subtotalInCents:s,taxAmountInCents:l,cardProcessingFeeInCents:0,totalAmountInCents:s+l,taxRatePercentage:t,taxRateLabel:a}},eZ=(e,t)=>e.tickets.find(t)||e.tickets[0],e0=(e,t)=>{let a=eZ(e,e=>"Active members"===e.audience),s=eZ(e,e=>"Non members"===e.audience),l=eZ(e,e=>/table/i.test(e.name));return"non-member"===t?s?{[s.id]:1}:{}:"table"===t?l?{[l.id]:1}:{}:a?{[a.id]:2}:ez(e.tickets)},e1=(e,t)=>eX(eW(te(e.tickets,t))),e2=(e,t,a)=>{let s=eW(te(e.tickets,a));return eX([...t?[{code:t.code||"â",description:t.name,quantity:1,unitPrice:t.priceAmount,lineTotal:t.priceAmount}]:[],...s])},e5=(e,t)=>{if("table"!==t)return{};let a=eZ(e,e=>/table/i.test(e.name));return a?{[a.id]:1}:{}},e4={name:"Local Chamber of Commerce",address:"100 Chamber Way\nDowntown, ON A1A 1A1",phone:"555-0100",email:"[email protected]"},e6=[{id:"qa-member-company",name:"QA Member Company"}],e3=[{id:"card",label:"Credit card",description:"Continue to secure checkout when payment is due.",type:"card"},{id:"manual-invoice-me",label:"Invoice me",description:"The chamber will follow up with payment instructions.",type:"manual",manualPaymentMethodId:"invoice-me"}],e9={id:"pixel-qa-event",slug:"test",title:"Community Business Awards",category:"Gala",categoryColor:"#2563eb",status:"Upcoming",dateISO:"2026-09-18",dateLabel:"September 18, 2026",timeLabel:"6:00 PM - 10:00 PM",startAtUtcMilli:Date.UTC(2026,8,18,23,0),endAtUtcMilli:Date.UTC(2026,8,19,3,0),location:"Civic Convention Centre",address:"100 Main Street",city:"Downtown",province:"ON",postalCode:"A1A 1A1",country:"Canada",mode:"In-person",description:"A chamber event celebrating local business leadership and community impact.",heroShortDescription:"Celebrate local business leadership with the chamber community.",registrationClosesLabel:"September 12, 2026",spotsRemaining:80,publicRegistrationEnabled:!0,eventIsFree:!1,displayRemainingTicketQuantity:!0,allowWaitlist:!0,speakers:[],agendaItems:[],tickets:[{id:"qa-member-ticket",code:"MEM",name:"Member Ticket",price:"$100",priceAmount:100,attendeesPerTicket:1,audience:"Active members",visibleOnRegistrationForm:!0},{id:"qa-non-member-ticket",code:"NON",name:"Non-member Ticket",price:"$150",priceAmount:150,attendeesPerTicket:1,audience:"Non members",visibleOnRegistrationForm:!0},{id:"qa-table-ticket",code:"TBL",name:"Table of 8",price:"$600",priceAmount:600,attendeesPerTicket:8,audience:"Everyone",visibleOnRegistrationForm:!0}
1],sponsorIncludedTickets:[{id:"qa-sponsor-ticket",code:"SPT",name:"Included Sponsor Ticket",price:"Free",priceAmount:0,attendeesPerTicket:1,audience:"Sponsor included",visibleOnRegistrationForm:!1}],customFields:[{id:"qa-attendee-dietary",label:"Dietary restriction",fieldType:"MULTI_SELECT",required:!1,helperText:"Select the meal preference for this attendee.",choices:["None","Gluten Free","Vegetarian","Vegan","Halal"],scope:"ATTENDEE"}],sponsorshipEnabled:!0,sponsorshipPackages:[{id:"qa-sponsor-package",code:"SPON",name:"Premier Sponsorship",price:"$2,000",priceAmount:2e3,includedAttendees:2,includedAttendeeTicketTypeId:"qa-sponsor-ticket",available:4,description:"Recognition before, during, and after the event.",heroBannerEnabled:!0,addOns:[]}],sponsors:[],heroSponsor:null},e8=e=>({"registration-form":"form","registration-member":"member","registration-non-member":"non-member","registration-table":"table","registration-invoice":"invoice","registration-payment":"payment"})[e]||null,e7=e=>({"sponsor-form":"form","sponsor-table":"table","sponsor-details":"details","sponsor-invoice":"invoice","sponsor-payment":"payment"})[e]||null,te=(e,t)=>e.map(e=>({ticket:e,quantity:Math.max(0,Math.floor(t[e.id]||0))})).filter(e=>e.quantity>0).map(e=>({...e,lineTotal:e.ticket.priceAmount*e.quantity})),tt=e=>e.map(e=>({ticketTypeId:e.ticket.id,quantity:e.quantity})),ta=e=>e.flatMap(e=>Array.from({length:e.quantity},()=>e.ticket)),ts=e=>e.customFields.filter(e=>"SPONSORSHIP_REQUEST"!==e.scope),tl=e=>e.customFields.filter(e=>"SPONSORSHIP_REQUEST"===e.scope),tn=e=>{let{fields:t,ticketTypeId:a}=e;return t.filter(e=>{var t;return!(null===(t=e.appliesToTicketTypeIds)||void 0===t?void 0:t.length)||e.appliesToTicketTypeIds.includes(a)})},tr=(e,t,a)=>{let s=new Set(e.filter(e=>a(e.scope)).map(e=>e.id)),l={};return Object.entries(t).forEach(e=>{let[t,a]=e;s.has(t)&&(l[t]=a)}),eD(l)},ti=e=>{var t;let{row:a,fields:s}=e,l=eJ(a.name),n=tn({fields:s,ticketTypeId:a.ticketTypeId});return{firstName:l.firstName,lastName:l.lastName||null,email:a.email.trim(),phone:a.phone.trim()||null,companyName:(null===(t=a.companyName)||void 0===t?void 0:t.trim())||null,ticketTypeId:a.ticketTypeId,customFieldAnswers:tr(n,a.customFieldValues,e=>"ATTENDEE"===e)}},to=e=>{let{rows:t,fields:a,attendeeLabel:s="attendee"}=e;for(let[e,l]of t.entries()){let t=eR(tn({fields:a,ticketTypeId:l.ticketTypeId}),l.customFieldValues);if(t)return"".concat(t," is required for ").concat(s," ").concat(e+1,".")}return null},tc=e=>{let{firstName:t,lastName:a}=eJ(e),s=e.trim();return{firstName:t||s||"â",lastName:a||t||s||"â"}},td=e=>{let{option:t,totalInCents:a}=e;return{type:a<=0||"free"===t.type?"FREE":"card"===t.type?"CREDIT_CARD":"MANUAL",manualPaymentMethodId:t.manualPaymentMethodId||void 0}},tm=e=>{let{eventSlug:t,input:a,enabled:s}=e,[l,n]=(0,r.useState)(null),[i,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(null),m=(0,r.useMemo)(()=>a?JSON.stringify(a):"",[a]);return(0,r.useEffect)(()=>{if(!s||!m){n(null),o(!1),d(null);return}let e=JSON.parse(m),a=new AbortController;return o(!0),d(null),fetch("/api/events/".concat(t,"/pricing-preview"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({input:e}),signal:a.signal}).then(async e=>{let t=await e.json();if(!e.ok||!t.success||!t.pricingPreview)throw Error(t.error||"Pricing could not be calculated");n(t.pricingPreview)}).catch(e=>{a.signal.aborted||(n(null),d(e instanceof Error?e.message:"Pricing could not be calculated"))}).finally(()=>{a.signal.aborted||o(!1)}),()=>a.abort()},[s,t,m]),{preview:l,loading:i,error:c}},tx=e=>{let{color:t}=e;return"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" fill="'.concat(t,'" stroke="white" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z"/><circle cx="12" cy="10" r="3"/></svg>')))},tp=e=>{var t;let{apiKey:a}=e,s=window;if(null===(t=s.google)||void 0===t?void 0:t.maps)return Promise.resolve(s.google);let l=document.querySelector("script[data-event-map]");return new Promise(l?(e,t)=>{l.addEventListener("load",()=>{var a;if(null===(a=s.google)||void 0===a?void 0:a.maps){e(s.google);return}t(Error("Google Maps loaded without the maps API"))}),l.addEventListener("error",()=>t(Error("Google Maps failed to load")))}:(e,t)=>
1{let l=document.createElement("script");l.src="https://maps.googleapis.com/maps/api/js?key=".concat(encodeURIComponent(a)),l.async=!0,l.defer=!0,l.dataset.eventMap="true",l.onload=()=>{var a;if(null===(a=s.google)||void 0===a?void 0:a.maps){e(s.google);return}t(Error("Google Maps loaded without the maps API"))},l.onerror=()=>t(Error("Google Maps failed to load")),document.head.appendChild(l)})},tu=e=>({"--cmp-event-primary-color":e,"--cmp-event-primary-ring-color":(0,ei.lf)(e,.2)}),th="min-w-0 break-words text-sm font-bold text-gray-950",tg="whitespace-pre-line break-words [&>:first-child]:mt-0 [&>:last-child]:mb-0 [&_.ql-align-left]:text-left [&_.ql-align-center]:text-center [&_.ql-align-justify]:text-justify [&_.ql-align-right]:text-right [&_a]:font-semibold [&_a]:text-[var(--cmp-event-primary-color)] [&_a]:underline [&_a]:underline-offset-2 [&_a:focus-visible]:outline [&_a:focus-visible]:outline-2 [&_a:focus-visible]:outline-offset-2 [&_a:focus-visible]:outline-[var(--cmp-event-primary-color)] [&_li]:mt-1 [&_ol]:list-decimal [&_ol]:pl-6 [&_ul]:list-disc [&_ul]:pl-6 [&_li[data-list=bullet]]:list-disc [&_li[data-list=ordered]]:list-decimal",tb="mx-auto max-w-3xl text-base leading-8 text-gray-700 ".concat(tg," ")+"[&_blockquote]:my-4 [&_blockquote]:border-l-4 [&_blockquote]:border-[var(--cmp-event-primary-color)] [&_blockquote]:pl-4 [&_blockquote]:italic [&_h1]:mb-3 [&_h1]:font-serif [&_h1]:text-4xl [&_h1]:font-black [&_h1]:leading-tight [&_h1]:text-gray-950 [&_h2]:mb-3 [&_h2]:font-serif [&_h2]:text-4xl [&_h2]:font-black [&_h2]:leading-tight [&_h2]:text-gray-950 [&_h3]:mb-2 [&_h3]:text-2xl [&_h3]:font-black [&_h3]:text-gray-950 [&_h4]:mb-2 [&_h4]:text-xl [&_h4]:font-black [&_h4]:text-gray-950 [&_p]:mt-3",ty="mt-2 text-sm leading-6 text-gray-700 ".concat(tg," ")+"[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-[var(--cmp-event-primary-color)] [&_blockquote]:pl-3 [&_blockquote]:italic [&_h1]:mt-3 [&_h1]:text-xl [&_h1]:font-black [&_h1]:text-gray-950 [&_h2]:mt-3 [&_h2]:text-lg [&_h2]:font-black [&_h2]:text-gray-950 [&_h3]:mt-2 [&_h3]:text-base [&_h3]:font-black [&_h3]:text-gray-950 [&_h4]:mt-2 [&_h4]:font-black [&_h4]:text-gray-950 [&_p]:mt-2",tj=e=>({backgroundColor:e}),tf=e=>({borderColor:e,color:e}),tv=e=>{let{href:t,label:a,primaryColor:l}=e;return(0,s.jsx)("div",{className:"container pt-8",children:(0,s.jsxs)(o(),{href:t,className:"inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-black transition hover:bg-gray-50",style:tf(l),children:[(0,s.jsx)(d.A,{className:"h-4 w-4"}),a]})})},tN=e=>{let{sponsor:t,size:a="default"}=e,[l,n]=(0,r.useState)(!1),i=(0,r.useRef)(null),o="hero"===a;(0,r.useEffect)(()=>{if(!t.logoUrl||l)return;let e=window.setTimeout(()=>{let e=i.current;e&&e.complete&&0===e.naturalWidth&&n(!0)},600);return()=>window.clearTimeout(e)},[l,t.logoUrl]);let c=(0,Q.mH)({url:t.linkUrl}),d=o?"flex min-h-[240px] flex-col items-center justify-center rounded-xl border border-gray-200 bg-white p-8 text-center text-2xl font-black text-gray-950":"flex min-h-[120px] flex-col items-center justify-center rounded-sm border border-gray-200 bg-white p-4 text-center text-xl font-black text-gray-950",m=t.logoUrl&&!l?(0,s.jsx)("img",{ref:i,src:t.logoUrl,alt:t.name,className:o?"max-h-32 max-w-full object-contain":"max-h-16 max-w-full object-contain",onError:e=>{e.currentTarget.style.display="none",n(!0)}}):(0,s.jsx)("span",{children:t.name});return c?(0,s.jsx)("a",{href:c,target:"_blank",rel:"noreferrer","aria-label":t.name,className:"".concat(d," transition hover:border-gray-300 hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2"),children:m}):(0,s.jsx)("div",{"aria-label":t.name,className:d,children:m})},tw=e=>{let{event:t,primaryColor:a}=e,l=r.useContext(V.w$),n=(0,r.useRef)(null),i=(0,r.useRef)(null),o=(0,r.useRef)(null),[c,d]=(0,r.useState)("");if((0,r.useEffect)(()=>{if(l||!eP||!t.coordinates||!n.current)return;let e=!0;return(async()=>{try{var s;let l=await tp({apiKey:eP});if(!e||!n.current||!t.coordinates)return;let r={lat:t.coordinates.latitude,lng:t.coordinates.longitude},c=new l.maps.Map(n.current,{center:r,zoom:14,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!0});
1null===(s=o.current)||void 0===s||s.setMap(null),o.current=new l.maps.Marker({position:r,map:c,title:t.location,icon:{url:tx({color:a}),scaledSize:new l.maps.Size(42,42),anchor:new l.maps.Point(21,42)}}),i.current=c}catch(e){d(e instanceof Error?e.message:"Google Maps could not be loaded")}})(),()=>{var t;e=!1,null===(t=o.current)||void 0===t||t.setMap(null)}},[t,a,l]),"Virtual"===t.mode)return null;if(l)return(0,s.jsx)("div",{className:"mt-5 flex h-[300px] items-center justify-center rounded-md border border-gray-200 bg-gray-50 p-5 text-sm text-gray-700",children:"Map disabled in preview."});if(!t.coordinates){let e=encodeURIComponent("".concat(t.location," ").concat(t.address).trim());return(0,s.jsx)("div",{className:"mt-5 overflow-hidden rounded-md border border-gray-200 bg-white",children:(0,s.jsx)("iframe",{title:"".concat(t.title," map"),src:"https://www.google.com/maps?q=".concat(e,"&output=embed"),className:"h-[300px] w-full",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}return eP?c?(0,s.jsx)("div",{className:"mt-5 rounded-md border border-gray-200 bg-gray-50 p-5 text-sm text-gray-700",children:c}):(0,s.jsx)("div",{className:"mt-5 overflow-hidden rounded-md border border-gray-200 bg-white",children:(0,s.jsx)("div",{ref:n,className:"notranslate h-[300px] w-full","aria-label":"".concat(t.title," map"),translate:"no"})}):(0,s.jsx)("div",{className:"mt-5 rounded-md border border-gray-200 bg-gray-50 p-5 text-sm text-gray-700",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(m.A,{className:"mt-0.5 h-5 w-5 shrink-0",style:{color:a}}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-black text-gray-950",children:"Map"}),(0,s.jsx)("p",{className:"mt-1",children:t.address})]})]})})},tk=e=>{let{targetUtcMilli:t,primaryColor:a}=e,[l,n]=(0,r.useState)(t);(0,r.useEffect)(()=>{n(Date.now());let e=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let i=Math.max(0,t-l),o=[{label:"Days",value:Math.floor(i/864e5)},{label:"Hours",value:Math.floor(i%864e5/36e5)},{label:"Minutes",value:Math.floor(i%36e5/6e4)},{label:"Seconds",value:Math.floor(i%6e4/1e3)}];return(0,s.jsx)("div",{className:"py-10 text-white",style:tj(a),children:(0,s.jsxs)("div",{className:"container",children:[(0,s.jsx)("h2",{className:"text-center text-xl font-black uppercase tracking-wide",children:"Event Countdown"}),(0,s.jsx)("div",{className:"mx-auto mt-6 flex max-w-xl justify-center gap-3 sm:gap-4",children:o.map(e=>(0,s.jsxs)("div",{className:"flex w-20 flex-col items-center rounded-lg bg-white/95 py-3",children:[(0,s.jsx)("span",{className:"text-2xl font-black",style:{color:a},children:String(e.value).padStart(2,"0")}),(0,s.jsx)("span",{className:"mt-1 text-[10px] font-bold uppercase tracking-wide text-gray-500",children:e.label})]},e.label))})]})})},tC=e=>{let{event:t,primaryColor:a}=e,l=t.tickets.map(e=>e.priceAmount),n=t.publicRegistrationEnabled&&l.length>0,r=[{icon:x.A,label:"Event Date",value:t.dateLabel,labelFirst:!1},{icon:p.A,label:"Event Time",value:t.timeLabel,labelFirst:!1},{icon:m.A,label:"Event Venue",value:t.location||"To be announced",labelFirst:!1}];if(n){let e=Math.min(...l);r.push({icon:h,label:"Tickets Starting at",value:t.eventIsFree||e<=0?"Free":eU(e),labelFirst:!0})}return(0,s.jsx)("div",{className:"border-b border-gray-100 bg-white",children:(0,s.jsx)("div",{className:"container grid divide-y divide-gray-100 py-4 sm:divide-y-0 lg:divide-x ".concat(n?"sm:grid-cols-2 lg:grid-cols-4":"sm:grid-cols-3 lg:grid-cols-3"),children:r.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3",children:[(0,s.jsx)(e.icon,{className:"h-5 w-5 shrink-0",style:{color:a}}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-black text-gray-950",children:e.labelFirst?e.label:e.value}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:e.labelFirst?e.value:e.label})]})]},e.label))})})},tS=e=>{let{event:t,chamberProfile:a,onNavigateStart:l,primaryColor:n}=e,r=Number.isFinite(t.endAtUtcMilli)&&t.endAtUtcMilli<=Date.now(),i=(0,C.gY)(t),o=!r&&t.sponsorshipEnabled&&t.sponsorshipPackages.length>0,c=t.registrationClosesLabel;return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-gray-950 text-white",children:[t.featuredImage&&(0,s.jsx)("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url(".concat(t.featuredImage,")")},"aria-hidden":!0}),(0,s.jsx)("div",{className:"absolute inset-0 bg-black/65"}),(0,s.jsxs)("div",{className:"container relative grid items-center gap-8 py-16 md:grid-cols-2 md:py-24",children:[(0,s.jsxs)("div",{children:[(null==a?void 0:a.name)&&"COMMUNITY"!==t.eventKind&&(0,s.jsx)("p",{className:"text-2xl font-black uppercase leading-tight text-white",children:a.name}),(0,s.jsx)("h1",{className:"mt-4 text-4xl font-black leading-tight md:text-5xl",children:t.title}),t.heroShortDescriptionHtml?(0,s.jsx)("div",{className:"mt-5 max-w-2xl text-base leading-8 text-white/90 ".concat(tg),dangerouslySetInnerHTML:{__html:t.heroShortDescriptionHtml}}):(t.heroShortDescription||t.description)&&(0,s.jsx)("p",{className:"mt-4 max-w-md whitespace-pre-line text-sm leading-7 text-gray-200",children:t.heroShortDescription||t.description}),c&&(0,s.jsxs)("p",{className:"mt-5 flex items-center gap-2 text-sm font-bold",children:[(0,s.jsx)(x.A,{className:"h-4 w-4"})," Registration closes ",c]}),(0,s.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:["COMMUNITY"===t.eventKind&&t.externalEventUrl&&!r&&(0,s.jsxs)("a",{href:t.externalEventUrl,rel:"noopener noreferrer",target:"_blank",className:"inline-flex items-center gap-2 rounded-md px-6 py-3 text-sm font-black text-white",style:tj(n),children:["Visit Event Page ",(0,s.jsx)(g.A,{className:"h-4 w-4"})]}),r&&(i||!t.publicRegistrationEnabled)&&(0,s.jsx)("p",{className:"font-bold",children:"This event has ended."}),!i&&t.publicRegistrationEnabled&&(0,s.jsxs)(V.d6,{href:"/events/".concat(t.slug,"/purchase"),loadingLabel:"Loading registration...",onNavigateStart:l,className:"inline-flex items-center gap-2 rounded-md px-6 py-3 text-sm font-black text-white",style:tj(n),children:["Register Now ",(0,s.jsx)(g.A,{className:"h-4 w-4"})]}),o&&(0,s.jsxs)(V.d6,{href:"/events/".concat(t.slug,"/purchase/sponsorship"),loadingLabel:"Loading sponsorship...",onNavigateStart:l,className:"inline-flex items-center gap-2 rounded-md border border-white/40 bg-white/10 px-6 py-3 text-sm font-black text-white",children:["Become a Sponsor ",(0,s.jsx)(g.A,{className:"h-4 w-4"})]})]})]}),t.heroSponsor&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,s.jsx)("p",{className:"text-sm font-black uppercase tracking-wide",children:t.heroSponsor.packageName}),(0,s.jsx)("div",{className:"mt-4 flex min-h-[180px] w-full max-w-sm items-center justify-center rounded-xl border border-white/30 p-6 text-center text-lg font-black",children:t.heroSponsor.logoUrl?(0,s.jsx)("img",{src:t.heroSponsor.logoUrl,alt:t.heroSponsor.name,className:"max-h-28 max-w-full object-contain"}):t.heroSponsor.name})]})]})]})},tA=e=>{let{event:t}=e,a=t.partners||[];return 0===a.length?null:(0,s.jsxs)("section",{className:"container flex flex-col gap-7 py-10",children:[(0,s.jsx)("h2",{className:"text-center text-3xl font-extrabold text-gray-950",children:"In Partnership With"}),(0,s.jsx)("div",{className:"flex flex-wrap justify-center gap-x-12 gap-y-10",children:a.map(e=>{let t=(0,s.jsx)("img",{src:e.logoUrl,alt:"Event partner",className:"block max-h-full max-w-full object-contain"}),a="flex aspect-square w-80 max-w-full items-center justify-center";return e.websiteUrl?(0,s.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"".concat(a," focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2"),children:t},e.id):(0,s.jsx)("div",{className:a,children:t},e.id)})})]})},tE=e=>{let{event:t,primaryColor:a}=e;if(0===t.speakers.length)return null;if(1===t.speakers.length){let e=t.speakers[0];return(0,s.jsx)("section",{className:"border-t border-gray-100",children:(0,s.jsxs)("div",{className:"container grid gap-8 py-12 md:grid-cols-[320px_1fr] md:items-center",children:[(0,s.jsx)("div",{className:"overflow-hidden rounded-lg bg-gray-100",children:e.imageUrl?(0,s.jsx)("img",{src:e.imageUrl,alt:e.name,className:"h-full max-h-80 w-full object-cover"}):(0,s.jsx)("div",{className:"flex h-72 items-center justify-center text-sm text-gray-400",children:"No photo provided"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide",style:{color:a},children:"Keynote Speaker"}),(0,s.jsx)("h3",{className:"mt-2 text-3xl font-black text-gray-950",children:e.name}),(e.title||e.company)&&(0,s.jsx)("p",{className:"mt-1 text-sm font-bold italic text-gray-700",children:[e.title,e.company].filter(
1Boolean).join(", ")}),e.bioHtml?(0,s.jsx)("div",{className:"mt-4 text-sm leading-7 text-gray-600 ".concat(tg),dangerouslySetInnerHTML:{__html:e.bioHtml}}):e.bio&&(0,s.jsx)("p",{className:"mt-4 text-sm leading-7 text-gray-600",children:e.bio})]})]})})}let l=t.speakers;return(0,s.jsx)(s.Fragment,{children:l.length>0&&(0,s.jsx)("section",{className:"bg-gray-50 py-12",children:(0,s.jsxs)("div",{className:"container",children:[(0,s.jsx)("h2",{className:"text-center text-2xl font-black uppercase",style:{color:a},children:"Meet Our Panelists"}),(0,s.jsx)("div",{className:"mt-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-4",children:l.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"aspect-square overflow-hidden rounded-lg bg-gray-100",children:e.imageUrl?(0,s.jsx)("img",{src:e.imageUrl,alt:e.name,className:"h-full w-full object-cover"}):(0,s.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-gray-400",children:"No photo"})}),(0,s.jsx)("p",{className:"mt-3 font-black text-gray-950",children:e.name}),(e.title||e.company)&&(0,s.jsx)("p",{className:"text-xs font-bold italic text-gray-700",children:[e.title,e.company].filter(Boolean).join(", ")}),e.bioHtml?(0,s.jsx)("div",{className:"mt-2 text-xs leading-6 text-gray-600 ".concat(tg),dangerouslySetInnerHTML:{__html:e.bioHtml}}):e.bio&&(0,s.jsx)("p",{className:"mt-2 text-xs leading-6 text-gray-600",children:e.bio})]},e.id))})]})})})},tI=e=>{let{event:t,chamberProfile:a,primaryColor:l}=e,n=(t.specialVenueConsiderations||"").split("\n").map(e=>e.trim()).filter(Boolean),r=t.agendaItems.length>0,i="Virtual"!==t.mode;return r||i?(0,s.jsxs)("section",{className:"container grid gap-12 py-12 ".concat(r&&i?"md:grid-cols-2":""),children:[r&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide",style:{color:l},children:"Evening Agenda"}),(0,s.jsx)("h2",{className:"mt-1 text-2xl font-black text-gray-950",children:"Event Schedule"}),(0,s.jsx)("ol",{className:"mt-6 space-y-5 border-l-2 pl-6",style:{borderColor:l},children:t.agendaItems.map(e=>(0,s.jsxs)("li",{className:"relative",children:[(0,s.jsx)("span",{className:"absolute -left-[1.95rem] top-1 h-3 w-3 rounded-full",style:{backgroundColor:l}}),(0,s.jsx)("p",{className:"text-sm font-black text-gray-950",children:e.timeLabel}),e.details&&(0,s.jsx)("p",{className:"text-sm text-gray-600",children:e.details})]},e.id))})]}),i&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide",style:{color:l},children:"Event Location"}),(0,s.jsx)("h2",{className:"mt-1 text-2xl font-black text-gray-950",children:t.location||"Venue to be announced"}),t.address&&(0,s.jsx)("p",{className:"mt-2 whitespace-pre-line text-sm text-gray-600",children:t.address}),(0,s.jsx)(tw,{event:t,primaryColor:l}),(0,s.jsxs)("ul",{className:"mt-5 space-y-2 text-sm text-gray-700",children:[n.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-center gap-2",children:[(0,s.jsx)(b.A,{className:"h-4 w-4 shrink-0",style:{color:l}}),e]},t)),t.dressCode&&(0,s.jsxs)("li",{className:"flex items-center gap-2",children:[(0,s.jsx)(y,{className:"h-4 w-4 shrink-0",style:{color:l}}),"Dress Code: ",t.dressCode]}),(null==a?void 0:a.phone)&&(0,s.jsxs)("li",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.A,{className:"h-4 w-4 shrink-0",style:{color:l}}),"Questions? ",a.phone]})]})]})]}):null},tT=e=>{let{event:t,onNavigateStart:a,primaryColor:l}=e;return!t.publicRegistrationEnabled||0===t.tickets.length||(0,C.gY)(t)?null:(0,s.jsx)("section",{className:"container py-12",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl rounded-2xl border border-gray-100 bg-gray-50 p-8 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-center text-2xl font-black uppercase",style:{color:l},children:"Reserve Your Spot Today"}),(0,s.jsxs)("p",{className:"mt-1 text-center text-sm font-bold",style:{color:l},children:["Don't miss our ",t.title]}),(0,s.jsx)("div",{className:"mt-6 grid grid-cols-[minmax(60px,max-content)_1fr_auto] gap-x-4 divide-y divide-gray-200",children:t.tickets.map(e=>(0,s.jsxs)("div",{className:"col-span-full grid grid-cols-subgrid items-center py-3",children:[(0,s.jsx)("span",{className:th,children:e.code||"â"}),(0,s.jsxs)("span",{className:"min-w-0 break-words text-sm text-gray-800",children:[e.name,t.displayRemainingTicketTypeQuantity&&null!=e.remainingQuantity&&(0,s.jsxs)("span",{className:"block text-xs text-gray-500",children:[Math.max(0,e.remainingQuantity)," remaining"]})]}),(0,s.jsx)("span",{className:"text-right text-sm font-black text-gray-950",children:e.priceAmount<=0?"Free":eU(e.priceAmount)})]},e.id))}),(0,s.jsxs)(V.d6,{href:"/events/".concat(t.slug,"/purchase"),loadingLabel:"Loading registration...",onNavigateStart:a,className:"mt-6 flex w-full items-center justify-center gap-2 rounded-md px-5 py-3 text-sm font-black text-white",style:tj(l),children:["Register Now ",(0,s.jsx)(g.A,{className:"h-4 w-4"})]}),(0,s.jsx)(G,{event:t,primaryColor:l})]})})},tM=e=>{let{event:t,primaryColor:a}
1=e,l=t.sponsorshipPackages.filter(e=>t.sponsors.some(t=>t.packageId===e.id));if(0===l.length)return null;let n=l.find(e=>e.heroBannerEnabled),r=n?t.sponsors.filter(e=>e.packageId===n.id):[],i=l.filter(e=>e.id!==(null==n?void 0:n.id));return(0,s.jsx)("section",{className:"bg-gray-50/40 py-12",children:(0,s.jsxs)("div",{className:"container",children:[(0,s.jsx)("h2",{className:"text-center text-2xl font-black uppercase tracking-wide",style:{color:a},children:"Thank You To Our Sponsors"}),r.length>0&&(0,s.jsx)("div",{className:"mx-auto mt-8 grid max-w-5xl gap-6",children:r.map(e=>(0,s.jsx)(tN,{sponsor:e,size:"hero"},e.id))}),i.map(e=>{let l=t.sponsors.filter(t=>t.packageId===e.id),n=1===l.length?"grid-cols-1":2===l.length?"sm:grid-cols-2":"sm:grid-cols-2 lg:grid-cols-3";return(0,s.jsxs)("div",{className:"mt-12",children:[(0,s.jsx)("h3",{className:"text-center text-xl font-black uppercase tracking-wide",style:{color:a},children:e.name}),(0,s.jsx)("div",{className:"mx-auto mt-6 grid max-w-5xl gap-6 ".concat(n),children:l.map(e=>(0,s.jsx)(tN,{sponsor:e},e.id))})]},e.id)})]})})},tP=e=>{let{event:t,onNavigateStart:a,primaryColor:l,chamberProfile:i}=e,o=r.useContext(V.w$),c=t.registrationDetailsHtml,d=t.descriptionHtml;return(0,s.jsxs)("div",{className:"bg-white",style:tu(l),children:[(0,s.jsx)(n.D,{path:"/events/".concat(t.slug),title:t.title,navigationDisabled:o}),(0,s.jsx)(tS,{event:t,chamberProfile:i,onNavigateStart:a,primaryColor:l}),"Completed"!==t.status&&Number.isFinite(t.startAtUtcMilli)&&t.startAtUtcMilli>0&&(0,s.jsx)(tk,{targetUtcMilli:t.startAtUtcMilli,primaryColor:l}),(0,s.jsx)(tC,{event:t,primaryColor:l}),(c||d||t.description)&&(0,s.jsxs)("section",{className:"container py-12",children:[c?(0,s.jsx)("div",{className:tb,dangerouslySetInnerHTML:{__html:c}}):null,d?(0,s.jsx)("div",{className:"".concat(tb," mt-4"),dangerouslySetInnerHTML:{__html:d}}):t.description?(0,s.jsx)("p",{className:"mx-auto mt-4 max-w-3xl whitespace-pre-line text-base leading-8 text-gray-700",children:t.description}):null]}),(0,s.jsx)(tA,{event:t}),(0,s.jsx)(tE,{event:t,primaryColor:l}),(0,s.jsx)(tI,{event:t,chamberProfile:i,primaryColor:l}),(0,s.jsx)(tT,{event:t,onNavigateStart:a,primaryColor:l}),(0,s.jsx)(tM,{event:t,primaryColor:l})]})},tL=e=>{let{submission:t}=e;if("success"!==t.status&&"error"!==t.status)return null;let a="success"===t.status;return(0,s.jsxs)("div",{className:"notranslate rounded-md border p-4 text-sm leading-6 ".concat(a?"border-green-200 bg-green-50 text-green-900":"border-red-200 bg-red-50 text-red-900"),role:"status",translate:"no",children:[(0,s.jsx)("p",{className:"font-black",children:a?"Submission received":"Submission needs attention"}),t.message&&(0,s.jsx)("p",{className:"mt-1",children:t.message}),t.reference&&(0,s.jsxs)("p",{className:"mt-1",children:["Reference: ",t.reference]})]})},t_="Your checkout is processing. Chamber staff will confirm your registration once payment is complete.",tq=e=>{let{setSubmission:t,setSuccessModalOpen:a}=e;(0,r.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("cmpEventCheckoutStatus");"payment-processing"===e&&(t({status:"success",message:t_}),null==a||a(!1)),"payment-canceled"===e&&t({status:"error",message:"Checkout was canceled. You can submit again when ready."})},[t,a])},tD=e=>{let{fallback:t}=e,[a,l]=(0,r.useState)(!1);return((0,r.useEffect)(()=>
1{l("payment-processing"===new URLSearchParams(window.location.search).get("cmpEventCheckoutStatus"))},[]),a)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"notranslate text-3xl font-black text-gray-950",translate:"no",children:"Checkout received"}),(0,s.jsx)("p",{className:"notranslate mt-2 text-sm text-gray-600",translate:"no",children:t_})]}):(0,s.jsx)("h1",{className:"text-3xl font-black text-gray-950",children:t})},tR=e=>{let{event:t,onClose:a}=e;t.target===t.currentTarget&&a()},tO=e=>{let{open:t,onClose:a,primaryColor:l,title:n,message:i}=e,[o,c]=(0,r.useState)(3),d=(0,r.useRef)(null),m=r.useId();return((0,eo.L)({dialogRef:d,onClose:a,open:t}),(0,r.useEffect)(()=>{if(!t)return;c(3);let e=window.setInterval(()=>{c(t=>t<=1?(window.clearInterval(e),(0,z.Uq)({href:"/events"})||window.location.assign("/events"),0):t-1)},1e3);return()=>window.clearInterval(e)},[t]),t)?(0,s.jsx)("div",{className:"notranslate fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4",onMouseDown:e=>tR({event:e,onClose:a}),translate:"no",children:(0,s.jsxs)("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":m,tabIndex:-1,className:"w-full max-w-md rounded-md bg-white p-8 text-center shadow-xl",children:[(0,s.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full text-2xl font-black text-white",style:tj(l),children:"â"}),(0,s.jsx)("h2",{id:m,className:"mt-5 text-2xl font-black text-gray-950",children:n}),(0,s.jsx)("p",{className:"mt-3 text-sm leading-6 text-gray-600",children:i}),(0,s.jsxs)("p",{className:"mt-5 text-lg font-black",style:{color:l},children:["Redirecting to event calendar in ",o,"..."]})]})}):null},tU=e=>{let{buttonRef:t,onClose:a}=e;return(0,s.jsx)("button",{ref:t,type:"button",onClick:a,"aria-label":"Close",className:"absolute -right-3 -top-3 flex h-8 w-8 items-center justify-center rounded-full bg-red-600 text-lg font-black leading-none text-white shadow",children:"\xd7"})},tF=e=>{let{open:t,primaryColor:a,message:l,onProceed:n,onCancel:i}=e,o=(0,r.useRef)(null),c=(0,r.useRef)(null),d=r.useId();return((0,eo.L)({dialogRef:o,initialFocusRef:c,onClose:i,open:t}),t)?(0,s.jsx)("div",{className:"notranslate fixed inset-0 z-[70] flex items-center justify-center bg-black/40 px-4",onMouseDown:e=>tR({event:e,onClose:i}),translate:"no",children:(0,s.jsxs)("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":d,tabIndex:-1,className:"relative w-full max-w-sm rounded-md bg-white p-8 text-center shadow-xl",children:[(0,s.jsx)(tU,{onClose:i}),(0,s.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-red-600 text-3xl font-black text-white",children:"?"}),(0,s.jsx)("p",{id:d,className:"mx-auto mt-5 max-w-[260px] text-sm font-bold leading-6 text-gray-950",children:l}),(0,s.jsxs)("div",{className:"mt-6 flex justify-center gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:n,className:"rounded-md px-6 py-2.5 text-sm font-black uppercase text-white",style:tj(a),children:"Proceed"}),(0,s.jsx)("button",{ref:c,type:"button",onClick:i,className:"rounded-md bg-gray-950 px-6 py-2.5 text-sm font-black uppercase text-white",children:"Cancel"})]})]})}):null},tB=e=>{let{open:t,onClose:a,message:l}=e,n=(0,r.useRef)(null),i=(0,r.useRef)(null),o=r.useId();return((0,eo.L)({dialogRef:n,initialFocusRef:i,onClose:a,open:t}),t)?(0,s.jsx)("div",{className:"notranslate fixed inset-0 z-[70] flex items-center justify-center bg-black/40 px-4",onMouseDown:e=>tR({event:e,onClose:a}),translate:"no",children:(0,s.jsxs)("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":o,tabIndex:-1,className:"relative w-full max-w-sm rounded-md bg-white p-8 text-center shadow-xl",children:[(0,s.jsx)(tU,{buttonRef:i,onClose:a}),(0,s.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-green-600 text-white",children:(0,s.jsx)(b.A,{className:"h-7 w-7"})}),(0,s.jsx)("p",{id:o,className:"mx-auto mt-5 max-w-[260px] text-sm font-bold leading-6 text-gray-950",children:l})]})}):null},tH=e=>{let{label:t,href:a,onClick:l}=e,n="inline-flex items-center gap-2 text-sm font-black text-gray-950";return a?(0,s.jsxs)(o(),{href:a,className:n,children:[(0,s.jsx)(d.A,{className:"h-4 w-4"})," ",t]}):(0,s.jsxs)("button",{type:"button",onClick:l,className:n,children:[(0,s.jsx)(d.A,{className:"h-4 w-4"})," ",t]})},tG=e=>{let{primaryColor:t,backLink:a,header:l,children:n}=e;return(0,s.jsxs)("div",{className:"bg-slate-100",style:tu(t),children:[(0,s.jsx)("div",{className:"bg-white",children:(0,s.jsxs)("div",{className:"mx-auto max-w-5xl px-4 pb-8 pt-6",children:[a,l]})}),(0,s.jsx)("section",{className:"mx-auto max-w-5xl px-4 py-8",children:(0,s.jsx)("div",{className:"mx-auto max-w-4xl",children:n})})]})},tY=e=>{let{label:t,required:a,children:l}=e;return(0,s.jsxs)("label",{className:"block",children:[(0,s.jsxs)("span",{className:"mb-1 block text-sm font-bold text-gray-950",children:[t,a&&(0,s.jsx)("span",{className:"text-red-500",children:" *"})]}),l]})},tV=e=>{let{billing:t,onChange:a}=e;return(0,s.jsxs)("fieldset",{className:"min-w-0",children:[(0,s.jsxs)("legend",{className:"mb-1 block text-sm font-bold text-gray-950",children:["Billing Address ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,s.jsx)(tY,{label:"Billing Address Line 1",required:!0,children:(0,s.jsx)(l.t,{id:"event-billing-street",label:null,className:"relative min-w-0",inputClassName:eq,placeholder:"Street Number and Name",value:t.streetAddress,onChange:e=>a({streetAddress:e}),onSelectedAddress:e=>a({streetAddress:e.streetAddress,addressLine2:e.unit?"Unit ".concat(e.unit):"",city:e.city,province:e.province||e.provinceCode,postalCode:e.postalCode,country:e.country})})}),(0,s.jsx)(tY,{label:"Billing Address Line 2",children:(0,s.jsx)("input",{autoComplete:"address-line2",className:eq,placeholder:"Suite / Unit (Optional)",value:t.addressLine2,onChange:e=>a({addressLine2:e.target.value})})}),(0,s.jsx)(tY,{label:"Billing City",required:!0,children:(0,s.jsx)("input",{required:!0,autoComplete:"address-level2",className:eq,placeholder:"City",value:t.city,onChange:e=>a({city:e.target.value})})}),(0,s.jsx)(tY,{label:"Province / State",required:!0,children:(0,s.jsx)("input",{required:!0,autoComplete:"address-level1",className:eq,placeholder:"Province / State",value:t.province,onChange:e=>a({province:e.target.value})})}),(0,s.jsx)(tY,{label:"Postal Code",required:!0,children:(0,s.jsx)("input",{required:!0,autoComplete:"postal-code",className:eq,placeholder:"Postal Code",value:t.postalCode,onChange:e=>a({postalCode:e.target.value})})}),(0,s.jsx)(tY,{label:"Country",required:!0,children:(0,s.jsx)("input",{required:!0,autoComplete:"country-name",className:eq,placeholder:"Country",value:t.country,onChange:e=>a({country:e.target.value})})})]})]})},tQ=e=>{let{event:t,chamberProfile:a,primaryColor:l,formLabel:n}=e;return(0,s.jsxs)("div",{className:"mt-4 text-center",children:[(null==a?void 0:a.logoUrl)?(0,s.jsx)("img",{src:a.logoUrl,alt:a.name||"Chamber logo",className:"mx-auto max-h-14 object-contain"}):(null==a?void 0:a.name)?(0,s.jsx)("p",{className:"text-lg font-black uppercase tracking-wide text-gray-950",children:a.name}):null,(0,s.jsx)("div",{className:"mx-auto mt-3 h-1 w-10 rounded-full",style:{backgroundColor:l}}),(0,s.jsxs)("h1",{className:"mt-4 text-2xl font-black text-gray-950 md:text-3xl",children:[t.title," ",n]})]})},tz=e=>{let{stepNumber:t,title:a,primaryColor:l,children:n}=e;return(0,s.jsxs)("section",{className:"overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-100 px-6 py-4",children:[(0,s.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md text-sm font-black text-white",style:tj(l),children:t}),(0,s.jsx)("h2",{className:"text-lg font-black text-gray-950",children:a})]}),(0,s.jsx)("div",{className:"space-y-5 p-6",children:n})]})},t$=e=>{let{value:t,onChange:a,max:l,disabled:n=!1}=e;return(0,s.jsxs)("div",{className:"inline-flex items-center rounded-md border border-gray-300",children:[(0,s.jsx)("button",{type:"button",onClick:()=>a(Math.max(0,t-1)),disabled:n||t<=0,className:"flex h-9 w-9 items-center justify-center text-gray-600 disabled:opacity-40","aria-label":"Decrease quantity",children:(0,s.jsx)(f.A,{className:"h-4 w-4"})}),(0,s.jsx)("span",{className:"min-w-[2.75rem] text-center text-sm font-bold text-gray-950",children:t}),(0,s.jsx)("button",{type:"button",onClick:()=>a(null!=l?Math.min(l,t+1):t+1),disabled:n||null!=l&&t>=l,className:"flex h-9 w-9 items-center justify-center text-gray-600 disabled:opacity-40","aria-label":"Increase quantity",children:(0,s.jsx)(v.A,{className:"h-4 w-4"})})]})},tJ=e=>{let{tickets:t,quantities:a,onQuantityChange:l}=e;return(0,s.jsxs)("div",{className:"md:grid md:grid-cols-[minmax(70px,max-content)_1fr_120px_140px_120px] md:gap-x-4",children:[(0,s.jsxs)("div",{className:"hidden gap-4 border-b border-gray-200 px-2 pb-2 text-xs font-bold uppercase tracking-wide text-gray-500 md:col-span-full md:grid md:grid-cols-subgrid",children:[(0,s.jsx)("span",{children:"Code"}),(0,s.jsx)("span",{children:"Description"}),(0,s.jsx)("span",{className:"text-right",children:"Unit Price"}),(0,s.jsx)("span",{className:"text-center",children:"Qty"}),(0,s.jsx)("span",{className:"text-right",children:"Total"})]}),(0,s.jsx)("div",{className:"divide-y divide-gray-100 md:col-span-full md:grid md:grid-cols-subgrid",children:t.map(e=>{let t=a[e.id]||0,n=e.priceAmount*t,r=eY(e),i=eV(e);return(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-x-4 gap-y-2 px-2 py-4 md:col-span-full md:grid-cols-subgrid",children:[(0,s.jsx)("span",{className:th,children:e.code||"â"}),(0,s.jsxs)("div",{className:"order-last col-span-2 min-w-0 break-words md:order-none md:col-span-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-950",children:e.name}),r&&(0,s.jsx)("span",{className:"rounded px-2 py-0.5 text-xs font-bold ".concat(i?"bg-gray-100 text-gray-600":"bg-red-50 text-red-700"),children:r})]}),e.description&&(0,s.jsx)("p",{className:"mt-0.5 text-xs text-gray-500",children:e.description}),e.attendeesPerTicket>1&&(0,s.jsxs)("p",{className:"mt-1 text-xs font-bold text-gray-700",children:["Includes ",e.attendeesPerTicket," attendees per ticket"]})]}),(0,s.jsx)("span",{className:"text-sm text-gray-800 md:text-right",children:eU(e.priceAmount)}),(0,s.jsx)("div",{className:"flex md:justify-center",children:(0,s.jsx)(t$,{value:t,max:eG(e),disabled:!i,onChange:t=>l(e.id,t)}
1)}),(0,s.jsx)("span",{className:"text-right text-sm font-bold text-gray-950",children:eU(n)})]},e.id)})})]})},tW=e=>{let{billing:t,onChange:a,memberCompanies:l,showBillingFields:n}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-6",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-950",children:n?"Select Member Company and Add Billing Details":"Select Member Company"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:n?"Only public member directory details are prefilled. Complete or correct the billing snapshot for this registration.":"Select the member company, then enter the attendee contact details below."}),(0,s.jsxs)("div",{className:"mt-5 space-y-4",children:[(0,s.jsx)(tY,{label:"Member Company Name",required:!0,children:(0,s.jsxs)("select",{required:!0,value:t.memberCompanyId,onChange:e=>{let s=e.target.value,n=eA({company:l.find(e=>e.id===s)});a({...t,...n,memberCompanyId:s,contactTitle:""})},className:eq,children:[(0,s.jsx)("option",{value:"",children:"Select Member from dropdown"}),l.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsx)(tY,{label:"Billing Contact Name",required:!0,children:(0,s.jsx)("input",{required:!0,className:eq,placeholder:"Billing contact name",value:t.contactName,onChange:e=>a({...t,contactName:e.target.value})})}),(0,s.jsx)(tY,{label:"Billing Contact Title",children:(0,s.jsx)("input",{className:eq,placeholder:"Billing contact title (optional)",value:t.contactTitle,onChange:e=>a({...t,contactTitle:e.target.value})})})]}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsx)(tY,{label:"Billing Contact Email",required:!0,children:(0,s.jsx)("input",{required:!0,type:"email",className:eq,placeholder:"Billing contact email",value:t.contactEmail,onChange:e=>a({...t,contactEmail:e.target.value})})}),(0,s.jsx)(tY,{label:"Billing Contact Phone",children:(0,s.jsx)("input",{className:eq,placeholder:"(+1) 201 563 4789",value:t.contactPhone,onChange:e=>a({...t,contactPhone:e.target.value})})})]}),(0,s.jsx)(tV,{billing:t,onChange:e=>a({...t,...e})})]})]})]})},tK=e=>{let{billing:t,onChange:a}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-6",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-950",children:"Add Invoice Details"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:"Add company name, address, contact name, email and phone number."}),(0,s.jsxs)("div",{className:"mt-5 space-y-4",children:[(0,s.jsx)("div",{className:"md:w-1/2 md:pr-2",children:(0,s.jsx)(tY,{label:"Company Name",required:!0,children:(0,s.jsx)("input",{required:!0,className:eq,placeholder:"Company or payer name",value:t.companyName,onChange:e=>a({...t,companyName:e.target.value})})})}),(0,s.jsx)(tV,{billing:t,onChange:e=>a({...t,...e})}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsx)(tY,{label:"Company Contact Name",required:!0,children:(0,s.jsx)("input",{required:!0,className:eq,placeholder:"Enter Company Contact Name",value:t.contactName,onChange:e=>a({...t,contactName:e.target.value})})}),(0,s.jsx)(tY,{label:"Company Contact Email",required:!0,children:(0,s.jsx)("input",{required:!0,type:"email",className:eq,placeholder:"Enter Company Contact Email",value:t.contactEmail,onChange:e=>a({...t,contactEmail:e.target.value})})})]}),(0,s.jsx)("div",{className:"md:w-1/2 md:pr-2",children:(0,s.jsx)(tY,{label:"Phone Number",children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Phone Number",value:t.contactPhone,onChange:e=>a({...t,contactPhone:e.target.value})})})})]})]})},tX=e=>{let{rows:t,onChange:a,subtitle:l,attendeeFields:n=[]}=e,i=e=>{let t=tn({fields:n,ticketTypeId:e.ticketTypeId});return 0===t.length?null:(0,s.jsx)("div",{className:"grid gap-4 rounded-lg bg-gray-50 p-4 md:grid-cols-2",children:t.map(t=>{var l;return(0,s.jsx)(tZ,{field:t,value:null!==(l=e.customFieldValues[t.id])&&void 0!==l?l:"",onChange:s=>a(e.slotId,{...e,customFieldValues:{...e.customFieldValues,[t.id]:s}})},t.id)})})};return(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-4 sm:p-6",children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-950",children:["Add attendee details"," ",null!=l?l:(0,s.jsxs)(s.Fragment,{children:["List below",(0,s.jsxs)("span",{className:"font-normal text-gray-600",children:["⢠",t.length," ",1===t.length?"attendee":"attendees",", add attendee names and emails and confirmations will be emailed once payment is complete."]})]})]}),0===t.length?(0,s.jsx)("p",{className:"py-6 text-center text-sm text-gray-500",children:"Select at least one ticket above to add attendees."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mt-4 space-y-4 md:hidden",children:t.map((e,t)=>(0,s.jsxs)("section",{className:"space-y-4 rounded-lg border border-gray-200 bg-white p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm font-black text-gray-950",children:["Attendee ",t+1]}),(0,s.jsx)("p",{className:"text-right text-xs font-bold text-gray-600",children:e.ticketTypeName})]}),(0,s.jsx)(tY,{label:"Attendee Name",required:!0,children:(0,s.jsx)("input",{required:!0,className:eq,placeholder:"Enter Attendee Name",value:e.name,onChange:t=>a(e.slotId,{...e,name:t.target.value})})}),(0,s.jsx)(tY,{label:"Attendee Company Name (Optional)",children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Company Name",maxLength:200,value:e.companyName||"",onChange:t=>a(e.slotId,{...e,companyName:t.target.value})})}),(0,s.jsx)(tY,{label:"Attendee Email",required:!0,children:(0,s.jsx)("input",{required:!0,type:"email",className:eq,placeholder:"Enter Attendee Email",value:e.email,onChange:t=>a(e.slotId,{...e,email:t.target.value})})}),(0,s.jsx)(tY,{label:"Attendee Phone Number",children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Attendee Phone Number",value:e.phone,onChange:t=>a(e.slotId,{...e,phone:t.target.value})})}),i(e)]},e.slotId))}),(0,s.jsx)("div",{className:"mt-4 hidden overflow-x-auto md:block",children:(0,s.jsxs)("table",{className:"w-full min-w-[720px] border-collapse",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-xs font-bold uppercase tracking-wide text-gray-500",children:[(0,s.jsx)("th",{className:"w-12 pb-2",children:"#"}),(0,s.jsx)("th",{className:"pb-2 pr-3",children:"Ticket Type"}),(0,s.jsxs)("th",{className:"pb-2 pr-3",children:["Attendee Name ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("th",{className:"pb-2 pr-3",children:"Attendee Company Name"}),(0,s.jsxs)("th",{className:"pb-2 pr-3",children:["Attendee Email ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("th",{className:"pb-2",children:"Attendee Phone Number"})]})}),(0,s.jsx)("tbody",{children:t.map((e,t)=>(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)("tr",{className:"align-top",children:[(0,s.jsx)("td",{className:"py-2 pr-2 text-sm font-bold text-gray-700",children:t+1}),(0,s.jsx)("td",{className:"py-2 pr-3 text-sm font-semibold text-gray-700",children:e.ticketTypeName}),(0,s.jsx)("td",{className:"py-2 pr-3",children:(0,s.jsx)("input",{required:!0,className:eq,placeholder:"Enter Attendee Name",value:e.name,onChange:t=>a(e.slotId,{...e,name:t.target.value})})}),(0,s.jsx)("td",{className:"py-2 pr-3",children:(0,s.jsx)("input",{className:eq,placeholder:"Company Name (Optional)",maxLength:200,value:e.companyName||"",onChange:t=>a(e.slotId,{...e,companyName:t.target.value})})}),(0,s.jsx)("td",{className:"py-2 pr-3",children:(0,s.jsx)("input",{required:!0,type:"email",className:eq,placeholder:"Enter Attendee Email",value:e.email,onChange:t=>a(e.slotId,{...e,email:t.target.value})})}),(0,s.jsx)("td",{className:"py-2",children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Attendee Phone Number",value:e.phone,onChange:t=>a(e.slotId,{...e,phone:t.target.value})})})]}),tn({fields:n,ticketTypeId:e.ticketTypeId}).length>0&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{}),(0,s.jsx)("td",{colSpan:5,className:"pb-5 pt-1",children:i(e)})]})]},e.slotId))})]})})]})]})},tZ=e=>{let{field:t,value:a,onChange:l}=e,n=(t.fieldType||"").toUpperCase(),r="MULTI_SELECT"===n,i=n.includes("AREA")||n.includes("PARAGRAPH")||n.includes("LONG"),o=en(a),c=new Set(Array.isArray(a)?a:a?[a]:[]);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-950",children:[t.label,t.required&&(0,s.jsx)("span",{className:"text-red-500",children:" *"})]}),t.helperText&&(0,s.jsx)("p",{className:"mt-0.5 whitespace-pre-line text-sm text-gray-600",children:t.helperText}),(0,s.jsx)("div",{className:"mt-2",children:r&&t.choices.length>0?(0,s.jsxs)("fieldset",{className:"space-y-2",children:[(0,s.jsx)("legend",{className:"sr-only",children:t.label}),t.choices.map(e=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-start gap-2 text-sm text-gray-800",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--cmp-event-primary-color)]",checked:c.has(e),onChange:s=>l(er({checked:s.target.checked,choice:e,choices:t.choices,value:a}))}),(0,s.jsx)("span",{children:e})]},e))]}):t.choices.length>0?(0,s.jsxs)("select",{className:e_,value:o,onChange:e=>l(e.target.value),children:[(0,s.jsx)("option",{value:"",children:"Select an option"}),t.choices.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}):i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("textarea",{className:"notranslate min-h-[90px] w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-950 outline-none transition placeholder:text-gray-500 focus:border-[var(--cmp-event-primary-color)] focu
1s:ring-2 focus:ring-[var(--cmp-event-primary-ring-color)]",maxLength:250,placeholder:"Enter Question",translate:"no",value:o,onChange:e=>l(e.target.value)}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:[o.length,"/250 characters"]})]}):(0,s.jsx)("input",{className:eq,placeholder:"Let us know",value:o,onChange:e=>l(e.target.value)})})]})},t0=e=>{let{label:t,party:a}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide text-gray-500",children:t}),(0,s.jsx)("p",{className:"mt-2 text-sm font-black text-gray-950",children:a.name||"â"}),a.lines.filter(Boolean).map((e,t)=>(0,s.jsx)("p",{className:"text-sm text-gray-600",children:e},t)),a.email&&(0,s.jsx)("p",{className:"text-sm text-gray-600",children:a.email}),a.phone&&(0,s.jsx)("p",{className:"text-sm text-gray-600",children:a.phone})]})},t1=e=>{let{option:t,primaryColor:a,onPayNow:l,pending:n,disabled:r}=e,i="card"===t.type;return(0,s.jsxs)("div",{className:"flex flex-col md:px-4 md:first:pl-0 md:last:pr-0",children:[(0,s.jsx)("p",{className:"text-sm font-black text-gray-950",children:i?"Pay Credit Card":t.label}),t.description&&(0,s.jsx)("p",{className:"mt-1 flex-1 whitespace-pre-line text-xs leading-5 text-gray-600",children:t.description}),i&&l&&(0,s.jsx)("button",{type:"button",onClick:l,disabled:r,className:"mt-3 inline-flex items-center justify-center rounded-md px-3 py-2 text-xs font-black text-white disabled:opacity-50",style:tj(a),children:n?"Processingâ¦":"Pay Now"})]})},t2=e=>{let{event:t,chamberProfile:a,billingInquiryEmail:l,primaryColor:n,invoiceNumber:r,invoiceDateLabel:i,dueDateLabel:o,billTo:c,soldTo:d,lineItems:u,subtotal:h,tax:g,taxLabel:y,cardFee:f,total:v,paymentOptions:k,onPayWithCard:C,cardPending:S,onConfirmInvoice:A,confirmPending:E,confirmLabel:I,completed:T,confirmation:M}=e,P=k.find(e=>"card"===e.type);return(0,s.jsxs)("div",{className:"space-y-6",children:[M&&(0,s.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-900",children:[(0,s.jsx)(b.A,{className:"mt-0.5 h-5 w-5 shrink-0"}),(0,s.jsx)("p",{children:M})]}),(0,s.jsxs)("div",{id:"event-invoice-print",className:"notranslate overflow-hidden rounded-xl border border-gray-200 bg-white",translate:"no",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4 p-6",children:[(0,s.jsxs)("div",{children:[(null==a?void 0:a.logoUrl)?(0,s.jsx)("img",{src:a.logoUrl,alt:a.name||"Chamber logo",className:"max-h-12 object-contain"}):null,(0,s.jsx)("p",{className:"mt-2 text-sm font-black text-gray-950",children:null==a?void 0:a.name}),((null==a?void 0:a.address)||"").split("\n").filter(Boolean).map((e,t)=>(0,s.jsx)("p",{className:"text-xs text-gray-500",children:e},t)),(null==a?void 0:a.phone)&&(0,s.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-xs text-gray-600",children:[(0,s.jsx)(j.A,{className:"h-3.5 w-3.5 shrink-0",style:{color:n}}),a.phone]})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>window.print(),className:"mb-3 inline-flex items-center gap-2 rounded-md px-3 py-2 text-xs font-bold text-white print:hidden",style:tj(n),children:[(0,s.jsx)(N,{className:"h-4 w-4"})," Print PDF"]}),(0,s.jsx)("p",{className:"text-3xl font-black tracking-tight text-gray-950",children:"INVOICE"}),(0,s.jsxs)("p",{className:"mt-2 text-xs text-gray-600",children:["Invoice #:"," ",(0,s.jsx)("span",{className:"font-bold",style:{color:n},children:r})]}),(0,s.jsxs)("p",{className:"text-xs text-gray-600",children:["Invoice Date: ",i]}),(0,s.jsxs)("p",{className:"text-xs text-gray-600",children:["Due Date: ",o]}),(0,s.jsx)("span",{className:"mt-2 inline-block rounded-md border px-3 py-1 text-xs font-bold",style:{...tf(n),backgroundColor:"".concat(n,"14")},children:"Status: Outstanding"})]})]}),(0,s.jsxs)("div",{className:"grid gap-6 px-6 pb-6 sm:grid-cols-2",children:[(0,s.jsx)(t0,{label:"Bill To",party:c}),(0,s.jsx)(t0,{label:"Sold To",party:d})]}),(0,s.jsx)("div",{className:"overflow-x-auto px-6",children:(0,s.jsxs)("table",{className:"w-full min-w-[560px] border-collapse",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-xs font-bold uppercase text-white",style:tj(n),children:[(0,s.jsx)("th",{className:"rounded-l-md px-4 py-2",children:"Code"}),(0,s.jsx)("th",{className:"px-4 py-2",children:"Description"}),(0,s.jsx)("th",{className:"px-4 py-2 text-center",children:"Qty"}),(0,s.jsx)("th",{className:"px-4 py-2 text-right",children:"Unit Price"}),(0,s.jsx)("th",{className:"rounded-r-md px-4 py-2 text-right",children:"Total"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-gray-100",children:u.map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"px-4 py-3 text-sm font-bold text-gray-950",children:e.code}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-800",children:e.description}),(0,s.jsx)("td",{className:"px-4 py-3 text-center text-sm text-gray-800",children:e.quantity}),(0,s.jsx)("td",{className:"px-4 py-3 text-right text-sm text-gray-800",children:eU(e.unitPrice)}),(0,s.jsx)("td",{className:"px-4 py-3 text-right text-sm font-bold text-gray-950",children:eU(e.lineTotal)})]},t))})]})}),(0,s.jsxs)("div",{className:"grid gap-6 px-6 py-6 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsx)("p",{className:"font-black text-gray-950",children:t.title}),(0,s.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-gray-600",children:[(0,s.jsx)(x.A,{className:"h-4 w-4 shrink-0"})," ",t.dateLabel]}),(0,s.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-gray-600",children:[(0,s.jsx)(p.A,{className:"h-4 w-4 shrink-0"})," ",t.timeLabel]}),(0,s.jsxs)("p",{className:"mt-1 flex items-start gap-2 text-gray-600",children:[(0,s.jsx)(m.A,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,s.jsxs)("span",{children:[t.location,t.address&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("br",{}
1),[t.address,t.city,t.province].filter(Boolean).join(", ")]})]})]})]}),(0,s.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Subtotal"}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eU(h)})]}),(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:y}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eU(g)})]}),f>0&&(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Card processing fee"}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eU(f)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-gray-200 pt-2",children:[(0,s.jsx)("span",{className:"text-base font-black text-gray-950",children:"TOTAL DUE"}),(0,s.jsx)("span",{className:"text-xl font-black text-gray-950",children:eU(v)})]})]})]}),(0,s.jsxs)("div",{className:"border-t border-gray-100 p-6",children:[(0,s.jsxs)("div",{className:"rounded-lg border p-4",style:{borderColor:n},children:[(0,s.jsx)("p",{className:"text-sm font-black uppercase tracking-wide",style:{color:n},children:"Payment Options"}),(0,s.jsx)("div",{className:"mt-4 grid gap-4 md:auto-cols-fr md:grid-flow-col md:divide-x md:divide-gray-200",children:k.map(e=>(0,s.jsx)(t1,{option:e,primaryColor:n,pending:S,disabled:T||S||E,onPayNow:"card"===e.type&&C?()=>C(e):void 0},e.id))})]}),!T&&A&&(0,s.jsx)("button",{type:"button",onClick:A,disabled:E||S,className:"mt-5 w-full rounded-md px-5 py-3 text-sm font-black text-white disabled:opacity-60 print:hidden",style:tj(n),children:E?"Submittingâ¦":P?"".concat(I," (Invoice Me)"):I})]}),(0,s.jsxs)("div",{className:"grid gap-6 border-t border-gray-100 p-6 text-sm sm:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-bold",style:{color:n},children:"Payment Terms"}),(0,s.jsxs)("p",{className:"mt-1 text-gray-600",children:["Thank you for your support of the ",(null==a?void 0:a.name)||"Chamber","."]})]}),(l||(null==a?void 0:a.phone))&&(0,s.jsxs)("div",{className:"rounded-md border border-gray-200 p-4",children:[(0,s.jsx)("p",{className:"font-bold",style:{color:n},children:"Billing inquiries contact"}),l&&(0,s.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-gray-600",children:[(0,s.jsx)(w.A,{className:"h-4 w-4 shrink-0",style:{color:n}}),l]}),(null==a?void 0:a.phone)&&(0,s.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-gray-600",children:[(0,s.jsx)(j.A,{className:"h-4 w-4 shrink-0",style:{color:n}}),a.phone]})]})]}),(0,s.jsxs)("p",{className:"border-t border-gray-100 px-6 py-4 text-center text-xs text-gray-600",children:["Thank you for being a valued member of the ",(null==a?void 0:a.name)||"Chamber","."]})]})]})},t5=e=>{var t,a,l,n,i,o,m;let{event:x,memberCompanies:p,paymentOptions:u,eventTicketCreditCardPaymentMode:h,primaryColor:g,chamberProfile:b,pixelQaPreset:y,pricingPreviewOverride:j}=e,{executeRecaptcha:f}=(0,c._Y)(),v=(0,r.useRef)(Date.now()),N=(0,r.useMemo)(()=>ts(x),[x]),w=(0,r.useMemo)(()=>N.filter(e=>"ATTENDEE"===e.scope),[N]),S=(0,r.useMemo)(()=>N.filter(e=>"ATTENDEE"!==e.scope),[N]),A=(0,r.useMemo)(()=>y?e0(x,y):ez(x.tickets),[x,y]),E=(0,r.useMemo)(()=>ee({expandTicketPackages:!0,lineItems:te(x.tickets,A)}),[x.tickets,A]),[I,T]=(0,r.useState)(()=>A),[M,P]=(0,r.useState)({memberCompanyId:y&&(null===(t=e6[0])||void 0===t?void 0:t.id)||"",companyName:y&&(null===(a=e6[0])||void 0===a?void 0:a.name)||"",contactName:y?"Jordan Lee":"",contactTitle:y?"Operations Lead":"",contactEmail:y?"[email protected]":"",contactPhone:y?"555-0101":"",streetAddress:y?"100 Member Avenue":"",addressLine2:y?"Suite 300":"",city:y?"Downtown":"",province:y?"AB":"",postalCode:y?"A1A 1A1":"",country:y?"Canada":""}),[L,_]=(0,r.useState)({companyName:y?"Guest Business Group":"",streetAddress:y?"25 Market Street":"",addressLine2:y?"Suite 200":"",city:y?"Downtown":"",province:y?"AB":"",postalCode:y?"A1A 1A1":"",country:"Canada",contactName:y?"Morgan Patel":"",contactEmail:y?"[email protected]":"",contactPhone:y?"555-0102":""}),[q,D]=(0,r.useState)(()=>E.map((e,t)=>({...e,name:y?"Attendee ".concat(t+1):"",email:y?"events+attendee".concat(t+1,"@example.com"):"",phone:y?"555-0103":"",customFieldValues:{}}))),[R,O]=(0,r.useState)({}),[U,F]=(0,r.useState)({status:"idle"}),[B,H]=(0,r.useState)("invoice"===y||"payment"===y),[G,Y]=(0,r.useState)(y?"Preview":"Pending"),[V,Q]=(0,r.useState)(null),[z,$]=(0,r.useState)(null),[J,W]=(0,r.useState)(!1),[et,es]=(0,r.useState)(!1),[el,en]=(0,r.useState)(null),[er,ei]=(0,r.useState)(!1),eo=(0,r.useMemo)(()=>te(x.tickets,I),[x.tickets,I]),ec=(0,r.useMemo)(()=>ee({expandTicketPackages:!0,lineItems:eo}),[eo]),{invoiceDateLabel:ed,dueDateLabel:ex}=(0,r.useMemo)(()=>e$(),[]),ep=(0,r.useMemo)(()=>eo.map(e=>({audience:e.ticket.audience,priceAmount:e.ticket.priceAmount,quantity:e.quantity})),[eo]),eu=(0,r.useMemo)(()=>X({mode:h,options:u,sales:ep}),[h,u,ep]),eh=(0,r.useMemo)(()=>Z({mode:h,options:u,sales:ep}),[h,u,ep]),eg=K({mode:h,sales:ep}),eb=eu.find(e=>"manual"===e.type),ey=eu.find(e=>"card"===e.type),ej=Math.round(100*eo.reduce((e,t)=>
1e+t.lineTotal,0)),ef=(0,r.useMemo)(()=>ej<=0?{id:"free",label:"Free",type:"free"}:eg?ey||null:eb||null,[ey,eg,ej,eb]),ev=(0,r.useMemo)(()=>tt(eo),[eo]),eN=(0,r.useMemo)(()=>ev.length&&ef?{eventId:x.id,kind:"REGISTRATION",ticketQuantities:ev,paymentChoice:td({option:ef,totalInCents:ej})}:null,[x.id,ej,ef,ev]),{preview:ew,loading:ek,error:eC}=tm({eventSlug:x.slug,input:eN,enabled:!j&&ev.length>0&&!eh}),eS=null!=j?j:ew,eA=!j&&ek,eE=eh||(j?null:eC),eP=eF(null!==(l=null==eS?void 0:eS.subtotalInCents)&&void 0!==l?l:ej),eL=eF(null!==(n=null==eS?void 0:eS.taxAmountInCents)&&void 0!==n?n:0),e_=eF(null!==(i=null==eS?void 0:eS.cardProcessingFeeInCents)&&void 0!==i?i:0),eq=null!==(o=null==eS?void 0:eS.totalAmountInCents)&&void 0!==o?o:ej,eD=eF(eq),eB=eS?"".concat(eS.taxRateLabel," (").concat(eS.taxRatePercentage,"%)"):"Tax",eG=eo.some(e=>"Active members"===e.ticket.audience),{billingIncluded:eY,billingRequired:eV}=eI(eq),eJ=eG?M:L;(0,r.useEffect)(()=>{D(e=>ea({currentRows:e,slots:ec}))},[ec]),tq({setSubmission:F,setSuccessModalOpen:es});let eX=eG?{name:M.companyName||M.contactName,lines:[M.contactName,M.contactTitle,M.streetAddress,M.addressLine2,[M.city,M.province,M.postalCode].filter(Boolean).join(" "),M.country].filter(Boolean),email:M.contactEmail,phone:M.contactPhone}:{name:L.companyName,lines:[L.contactName,L.streetAddress,L.addressLine2,[L.city,L.province,L.postalCode].filter(Boolean).join(" "),L.country].filter(Boolean),email:L.contactEmail,phone:L.contactPhone},eZ=()=>{if(0===ec.length)return"Select at least one ticket to continue.";if(eG&&!M.memberCompanyId)return"Select the member company for this registration.";let e=eT({billing:eJ,billingIncluded:eY,billingRequired:eV});if(e)return e;let t=q.findIndex(e=>!e.name.trim()||!eO(e.email));if(t>=0)return"Enter a name and a valid email for attendee ".concat(t+1,".");let a=to({rows:q,fields:w});if(a)return a;let s=eR(S,R);return s?"".concat(s," is required."):eh||(eA?"Pricing is still being calculated. Please wait a moment.":eS?null:eE||"Pricing could not be calculated. Please adjust your tickets and try again.")},e1=e=>{let t=eM({billing:eJ,billingIncluded:eY,billingRequired:eV}),a=q[0],s=tc((null==t?void 0:t.contactName)||(null==a?void 0:a.name)||""),l=(null==t?void 0:t.contactEmail)||(null==a?void 0:a.email)||"",n=(null==t?void 0:t.contactPhone)||(null==a?void 0:a.phone)||"",r=tr(S,R,()=>!0);return{eventId:x.id,ticketQuantities:ev,purchaserFirstName:s.firstName,purchaserLastName:s.lastName,purchaserEmail:l.trim(),purchaserPhone:n.trim()||null,selectedMemberCompanyId:eG&&M.memberCompanyId||null,billing:t,paymentChoice:td({option:e,totalInCents:eq}),attendees:q.map(e=>ti({row:e,fields:w})),customFieldAnswers:r}},e2=async(e,t)=>{Q(t),F({status:"loading"});try{if(!f)throw Error("Security verification is still loading. Please try again.");let t=await f("event_registration_submit"),a=await em({action:"REGISTRATION",endpoint:"/api/events/".concat(x.slug,"/registration"),entityId:"new-registration",eventId:x.id,recaptchaToken:t,timestamp:v.current,input:e1(e)});if(a.checkoutUrl){window.location.assign(a.checkoutUrl);return}if(Y(a.invoiceNumber||"Pending"),W(!0),eq<=0){F({status:"success",message:"Your registration has been received."}),es(!0);return}$("Registration confirmed".concat(a.invoiceNumber?" â invoice ".concat(a.invoiceNumber):"",". Please complete payment using the instructions below.")),F({status:"idle"}),ei(!0)}catch(e){F({status:"error",message:e instanceof Error?e.message:"Registration could not be submitted."})}finally{Q(null)}};return!x.publicRegistrationEnabled||0===x.tickets.length||(0,C.gY)(x)?(0,s.jsx)(tG,{primaryColor:g,backLink:(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}),children:(0,s.jsxs)("section",{className:"rounded-md border border-gray-200 bg-gray-50 p-8 text-center",children:[(0,s.jsx)("h2",{className:"text-2xl font-black text-gray-950",children:"Registration is not available"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"This event is public, but online registration is not open right now."})]})}):B?(0,s.jsx)(tG,{primaryColor:g,backLink:J?(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}):(0,s.jsx)(tH,{label:"Back to Registration Details",onClick:()=>H(!1)}),header:(0,s.jsx)(tQ,{event:x,chamberProfile:b,primaryColor:g,formLabel:"Registration Invoice"}),children:(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsx)(tL,{submission:U}),(0,s.jsx)(tO,{open:et,onClose:()=>es(!1),primaryColor:g,title:"Registration received",message:"Your registration was submitted successfully."}),(0,s.jsx)(tF,{message:"Confirm your registration and continue with the selected payment method?",open:!!el,primaryColor:g,onProceed:()=>{en(null),null==el||el()},onCancel:()=>en(null)}),(0,s.jsx)(tB,{message:z||"Your request has been received.",open:er,onClose:()=>ei(!1)}),(0,s.jsx)(t2,{event:x,chamberProfile:b,billingInquiryEmail:null==eS?void 0:eS.billingInquiryEmail,primaryColor:g,invoiceNumber:G,invoiceDateLabel:ed,dueDateLabel:ex,billTo:eX,soldTo:eX,lineItems:eS?eK(eS.lineItems):eW(eo),subtotal:eP,tax:eL,taxLabel:eB,cardFee:e_,total:eD,paymentOptions:eu,onPayWithCard:ey?e=>en(()=>()=>e2(e,"card")):void 0,cardPending:"card"===V,onConfirmInvoice:eb?()=>en(()=>()=>e2(eb,"confirm")):void 0,confirmPending:"confirm"===V,confirmLabel:"Confirm Registration",completed:J,confirmation:z}),!J&&(0,s.jsxs)("button",{type:"button",onClick:()=>H(!1),className:"inline-flex items-center gap-2 text-sm font-bold",style:{color:g},children:[(0,s.jsx)(d.A,{className:"h-4 w-4"})," Back to Registration Details"]}
1)]})}):(0,s.jsx)(tG,{primaryColor:g,backLink:(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}),header:(0,s.jsx)(tQ,{event:x,chamberProfile:b,primaryColor:g,formLabel:"Registration Form"}),children:(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsx)(tL,{submission:U}),(0,s.jsx)(tO,{open:et,onClose:()=>es(!1),primaryColor:g,title:"Registration received",message:"Your registration was submitted successfully."}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(tz,{stepNumber:1,title:"Select Tickets",primaryColor:g,children:(0,s.jsx)(tJ,{tickets:x.tickets,quantities:I,onQuantityChange:(e,t)=>{let a=x.tickets.find(t=>t.id===e);T(s=>({...s,[e]:eQ(a,t)}))}})}),(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1 px-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex w-full max-w-xs justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Subtotal"}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eU(eP)})]}),(0,s.jsxs)("div",{className:"flex w-full max-w-xs justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:eB}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eH({amountInCents:null==eS?void 0:eS.taxAmountInCents,loading:eA})})]}),e_>0&&(0,s.jsxs)("div",{className:"flex w-full max-w-xs justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Card processing fee"}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eU(e_)})]}),!eA&&!eS&&eo.length>0&&(0,s.jsx)("p",{className:"w-full max-w-xs text-right text-xs font-semibold text-red-700",children:eE||"Pricing could not be calculated."}),eA&&(0,s.jsx)("p",{className:"w-full max-w-xs text-right text-xs font-semibold text-gray-500",children:"Updating pricingâ¦"}),(0,s.jsxs)("div",{className:"mt-1 flex w-full max-w-xs items-center justify-between border-t border-gray-300 pt-2",children:[(0,s.jsx)("span",{className:"text-base font-black uppercase text-gray-950",children:"Total Due"}),(0,s.jsx)("span",{className:"text-2xl font-black",style:{color:g},children:eH({amountInCents:null!==(m=null==eS?void 0:eS.totalAmountInCents)&&void 0!==m?m:ej,loading:eA})})]})]})]}),(0,s.jsxs)(tz,{stepNumber:2,title:eV?"Billing and Attendee Details":"Registration and Attendee Details",primaryColor:g,children:[eG?(0,s.jsx)(tW,{billing:M,onChange:P,memberCompanies:p,showBillingFields:eY}):eY?(0,s.jsx)(tK,{billing:L,onChange:_}):null,(0,s.jsx)(tX,{rows:q,attendeeFields:w,onChange:(e,t)=>
1D(a=>a.map(a=>a.slotId===e?t:a))})]}),S.length>0&&(0,s.jsx)(tz,{stepNumber:3,title:"Preferences & Accessibility",primaryColor:g,children:S.map(e=>(0,s.jsx)(tZ,{field:e,value:R[e.id]||"",onChange:t=>O(a=>({...a,[e.id]:t}))},e.id))}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{let e=eZ();if(e){F({status:"error",message:e});return}if(eq<=0){e2({id:"free",label:"Free",type:"free"},"confirm");return}F({status:"idle"}),H(!0),window.scrollTo({top:0,behavior:"smooth"})},disabled:"loading"===U.status,className:"flex w-full items-center justify-center gap-2 rounded-md px-5 py-4 text-sm font-black text-white",style:{...tj(g),opacity:"loading"===U.status?.7:1},children:["loading"===U.status?"Submittingâ¦":eq<=0?"Register":"Register & Generate Invoice",(0,s.jsx)(k.A,{className:"h-4 w-4"})]}),(0,s.jsxs)("p",{className:"notranslate mt-3 text-center text-xs text-gray-500",translate:"no",children:["By clicking Register & Generate, you agree to the"," ",(null==b?void 0:b.name)||"Chamber"," terms and conditions."]})]})]})})},t4=e=>{let{packages:t,selectedPackageId:a,onSelect:l,onViewBenefits:n,primaryColor:r}=e;return(0,s.jsxs)("div",{className:"md:grid md:grid-cols-[minmax(70px,max-content)_1fr_130px_150px] md:gap-x-4",children:[(0,s.jsxs)("div",{className:"hidden gap-4 border-b border-gray-200 px-2 pb-2 text-xs font-bold uppercase tracking-wide text-gray-500 md:col-span-full md:grid md:grid-cols-subgrid",children:[(0,s.jsx)("span",{children:"Code"}),(0,s.jsx)("span",{children:"Description"}),(0,s.jsx)("span",{className:"text-right",children:"Unit Price"}),(0,s.jsx)("span",{className:"text-right",children:"Available Spots"})]}),(0,s.jsx)("div",{className:"space-y-1 md:col-span-full md:grid md:grid-cols-subgrid",children:t.map(e=>{let t=null!==e.available&&e.available<=0,i=a===e.id;return(0,s.jsxs)("label",{className:"grid cursor-pointer grid-cols-2 items-center gap-x-4 gap-y-2 rounded-lg px-2 py-4 md:col-span-full md:grid-cols-subgrid ".concat(t?"cursor-not-allowed bg-gray-100":""),style:i?{boxShadow:"inset 0 0 0 2px ".concat(r)}:void 0,children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("input",{type:"radio",name:"sponsorship-package",disabled:t,checked:i,onChange:()=>l(e.id),className:"h-4 w-4 shrink-0 accent-[var(--cmp-event-primary-color)]"}),(0,s.jsx)("span",{className:th,children:e.code||"â"})]}),(0,s.jsxs)("div",{className:"order-last col-span-2 flex min-w-0 items-center justify-between gap-3 md:order-none md:col-span-1",children:[(0,s.jsx)("span",{className:"min-w-0 break-words text-sm font-bold text-gray-950",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),n(e.id)},className:"shrink-0 rounded-md px-2 py-1 text-[11px] font-bold text-white",style:tj(r),children:"View Benefits"})]}),(0,s.jsx)("span",{className:"text-sm text-gray-800 md:text-right",children:eU(e.priceAmount)}),(0,s.jsx)("span",{className:"text-sm font-bold md:text-right ".concat(t?"text-red-500":"text-gray-950"),children:null===e.available?"Available":t?"Sold Out":"".concat(e.available," spot").concat(1===e.available?"":"s"," left")})]},e.id)})})]})},t6=e=>{let{sponsorshipPackage:t,onClose:a,primaryColor:l}=e,n=(0,r.useRef)(null),i=(0,r.useRef)(null),o=r.useId();return((0,eo.L)({dialogRef:n,initialFocusRef:i,onClose:a,open:!!t}),t)?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-8",onMouseDown:e=>tR({event:e,onClose:a}),children:(0,s.jsxs)("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":o,tabIndex:-1,className:"max-h-full w-full max-w-lg overflow-y-auto rounded-xl bg-white p-6 shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("h3",{id:o,className:"text-lg font-black text-gray-950",children:["Benefits for ",t.name]}),(0,s.jsx)("button",{ref:i,type:"button",onClick:a,"aria-label":"Close",className:"text-xl leading-none text-gray-400",children:"\xd7"})]}),t.description&&(0,s.jsx)("p",{className:"mt-2 text-sm leading-6 text-gray-600",children:t.description}),t.additionalBenefits&&(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("p",{className:"text-sm font-black text-gray-950",children:"Included Benefits"}),(0,s.jsx)("div",{className:ty,dangerouslySetInnerHTML:{__html:t.additionalBenefits}})]}),t.addOns.length>0&&(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)("p",{className:"text-sm font-black text-gray-950",children:"Additional Inclusions"}),(0,s.jsx)("ul",{className:"mt-2 space-y-2",children:t.addOns.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-700",children:[(0,s.jsx)(b.A,{className:"mt-0.5 h-4 w-4 shrink-0",style:{color:l}}),e.quantity>
11?"".concat(e.quantity,"\xd7 "):"",e.description]},e.id))})]}),(0,s.jsx)("p",{className:"mt-6 text-xs leading-5 text-gray-500",children:"Benefits and recognition opportunities may vary based on the selected sponsorship level and event requirements."})]})}):null},t3=e=>{let{billing:t,onChange:a,memberCompanies:l}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Enter your company name and verify and edit billing details. Your company logo and website URL will be populated from member profile"}),(0,s.jsx)("p",{className:"mt-5 text-sm font-black text-gray-950",children:"Member Information"}),(0,s.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,s.jsx)(tY,{label:"Company Member",required:!0,children:(0,s.jsxs)("select",{className:eq,value:t.memberCompanyId,onChange:e=>{var s,n,r,i;let o=e.target.value,c=l.find(e=>e.id===o);a(c?{...t,memberCompanyId:o,streetAddress:(null===(s=c.address)||void 0===s?void 0:s.streetAddress)||"",addressLine2:"",city:(null===(n=c.address)||void 0===n?void 0:n.city)||"",province:(null===(r=c.address)||void 0===r?void 0:r.province)||"",postalCode:(null===(i=c.address)||void 0===i?void 0:i.postalCode)||"",country:t.country||"Canada",contactName:c.contactName||"",contactEmail:c.contactEmail||"",phone:c.phoneNumber||""}:{...t,memberCompanyId:o})},children:[(0,s.jsx)("option",{value:"",children:"Select Company Name"}),l.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),(0,s.jsx)(tV,{billing:t,onChange:e=>a({...t,...e})}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,s.jsx)(tY,{label:"Billing Contact Name",required:!0,children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Contact Name",value:t.contactName,onChange:e=>a({...t,contactName:e.target.value})})}),(0,s.jsx)(tY,{label:"Contact Email",required:!0,children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Contact Email",value:t.contactEmail,onChange:e=>a({...t,contactEmail:e.target.value})})}),(0,s.jsx)(tY,{label:"Phone Number",children:(0,s.jsx)("input",{className:eq,placeholder:"Enter Phone Number",value:t.phone,onChange:e=>a({...t,phone:e.target.value})})})]})]})]})},t9=e=>{let{ticket:t,quantity:a}=e;return(0,s.jsxs)("div",{className:"md:grid md:grid-cols-[minmax(70px,max-content)_1fr_120px_80px_120px] md:gap-x-4",children:[(0,s.jsxs)("div",{className:"hidden gap-4 border-b border-gray-200 px-2 pb-2 text-xs font-bold uppercase tracking-wide text-gray-500 md:col-span-full md:grid md:grid-cols-subgrid",children:[(0,s.jsx)("span",{children:"Code"}),(0,s.jsx)("span",{children:"Description"}),(0,s.jsx)("span",{className:"text-right",children:"Unit Price"}),(0,s.jsx)("span",{className:"text-center",children:"Qty"}),(0,s.jsx)("span",{className:"text-right",children:"Total Price"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-x-4 gap-y-1 px-2 py-4 md:col-span-full md:grid-cols-subgrid",children:[(0,s.jsx)("span",{className:th,children:(null==t?void 0:t.code)||"NCST"}),(0,s.jsx)("span",{className:"min-w-0 break-words text-sm text-gray-800",children:(null==t?void 0:t.name)||"No Charge Sponsorship Ticket"}),(0,s.jsx)("span",{className:"text-sm text-gray-800 md:text-right",children:eU((null==t?void 0:t.priceAmount)||0)}),(0,s.jsx)("span",{className:"text-sm text-gray-800 md:text-center",children:a}),(0,s.jsx)("span",{className:"text-right text-sm font-bold text-gray-950",children:eU(((null==t?void 0:t.priceAmount)||0)*a)})]})]})},t8=e=>{let{tickets:t,quantities:a,onQuantityChange:l}=e;return(0,s.jsxs)("div",{className:"md:grid md:grid-cols-[minmax(70px,max-content)_1fr_120px_140px_120px] md:gap-x-4",children:[(0,s.jsxs)("div",{className:"hidden gap-4 border-b border-gray-200 px-2 pb-2 text-xs font-bold uppercase tracking-wide text-gray-500 md:col-span-full md:grid md:grid-cols-subgrid",children:[(0,s.jsx)("span",{children:"Code"}),(0,s.jsx)("span",{children:"Description"}),(0,s.jsx)("span",{className:"text-right",children:"Unit Price"}),(0,s.jsx)("span",{className:"text-center",children:"Qty"}),(0,s.jsx)("span",{className:"text-right",children:"Total"})]}),(0,s.jsx)("div",{className:"divide-y divide-gray-100 md:col-span-full md:grid md:grid-cols-subgrid",children:t.map(e=>{let t=a[e.id]||0,n=eY(e),r=eV(e);return(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-x-4 gap-y-2 px-2 py-4 md:col-span-full md:grid-cols-subgrid",children:[(0,s.jsx)("span",{className:th,children:e.code||"â"}),(0,s.jsxs)("div",{className:"order-last col-span-2 min-w-0 break-words md:order-none md:col-span-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-950",children:e.name}),n&&(0,s.jsx)("span",{className:"rounded px-2 py-0.5 text-xs font-bold ".concat(r?"bg-gray-100 text-gray-600":"bg-red-50 text-red-700"),children:n})]}),e.description&&(0,s.jsx)("p",{className:"mt-0.5 text-xs text-gray-500",children:e.description})]}),(0,s.jsx)("span",{className:"text-sm text-gray-800 md:text-right",children:eU(e.priceAmount)}),(0,s.jsx)("div",{className:"flex md:justify-center",children:(0,s.jsx)(t$,{value:t,max:eG(e),disabled:!r,onChange:t=>l(e.id,t)}
1)}),(0,s.jsx)("span",{className:"text-right text-sm font-bold text-gray-950",children:eU(e.priceAmount*t)})]},e.id)})})]})},t7=e=>{let{addOns:t}=e;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"hidden grid-cols-[90px_1fr_80px] gap-4 border-b border-gray-200 px-2 pb-2 text-xs font-bold uppercase tracking-wide text-gray-500 md:grid",children:[(0,s.jsx)("span",{children:"Code"}),(0,s.jsx)("span",{children:"Description"}),(0,s.jsx)("span",{className:"text-center",children:"Qty"})]}),(0,s.jsx)("div",{className:"divide-y divide-gray-100",children:t.map(e=>(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-x-4 gap-y-1 px-2 py-3 md:grid-cols-[90px_1fr_80px]",children:[(0,s.jsx)("span",{className:"text-sm font-bold text-gray-950",children:e.code||"â"}),(0,s.jsx)("span",{className:"text-sm text-gray-800",children:e.description}),(0,s.jsx)("span",{className:"text-sm font-bold text-gray-800 md:text-center",children:e.quantity})]},e.id))})]})},ae=e=>{var t,a,l,n,i,o,m,x;let{event:p,memberCompanies:u,paymentOptions:h,primaryColor:g,chamberProfile:b,pixelQaPreset:y,pricingPreviewOverride:j}=e,{executeRecaptcha:f}=(0,c._Y)(),v=(0,r.useRef)(Date.now()),N=(0,r.useMemo)(()=>tl(p),[p]),w=(0,r.useMemo)(()=>p.customFields.filter(e=>"ATTENDEE"===e.scope),[p]),C=(0,r.useMemo)(()=>p.sponsorshipPackages,[p.sponsorshipPackages]),S=(0,r.useMemo)(()=>e5(p,y),[p,y]),[A,E]=(0,r.useState)(()=>{var e;return(null===(e=C.find(e=>null===e.available||e.available>0))||void 0===e?void 0:e.id)||""}),[I,T]=(0,r.useState)(null),[M,P]=(0,r.useState)({memberCompanyId:y&&(null===(t=e6[0])||void 0===t?void 0:t.id)||"",streetAddress:y?"100 Sponsor Avenue":"",addressLine2:y?"Suite 400":"",city:y?"Downtown":"",province:y?"AB":"",postalCode:y?"A1A 1A1":"",country:"Canada",contactName:y?"Taylor Sponsor":"",contactEmail:y?"[email protected]":"",phone:y?"555-0104":""}),[L,_]=(0,r.useState)([]),[q,D]=(0,r.useState)(S),[R,O]=(0,r.useState)([]),[U,F]=(0,r.useState)({}),[B,H]=(0,r.useState)({status:"idle"}),[G,Y]=(0,r.useState)("invoice"===y||"payment"===y),[V]=(0,r.useState)(y?"Preview":"Pending"),[Q,z]=(0,r.useState)(null),[$,J]=(0,r.useState)(null),[W,K]=(0,r.useState)(!1),[X,Z]=(0,r.useState)(null),[et,es]=(0,r.useState)(!1),el=C.find(e=>e.id===A&&(null===e.available||e.available>0)),en=C.find(e=>e.id===I)||null,er=p.sponsorIncludedTickets.find(e=>e.id===(null==el?void 0:el.includedAttendeeTicketTypeId))||p.sponsorIncludedTickets[0],ei=er&&(null==el?void 0:el.includedAttendees)||0,eo=(0,r.useMemo)(()=>er?ee({expandTicketPackages:!1,lineItems:[{ticket:er,quantity:ei}]}):[],[ei,er]),ec=(0,r.useMemo)(()=>te(p.tickets,q),[p.tickets,q]),ed=(0,r.useMemo)(()=>ee({expandTicketPackages:!1,lineItems:ec}),[ec]),ex=(0,r.useMemo)(()=>ta(ec),[ec]),ep=ec.reduce((e,t)=>e+t.lineTotal,0),eu=(null==el?void 0:el.priceAmount)||0,{invoiceDateLabel:eh,dueDateLabel:eg}=(0,r.useMemo)(()=>e$(),[]),eb=(h.length?h:[eL]).filter(e=>"card"!==e.type),ey=eb.find(e=>"manual"===e.type)||eL,ej=Math.round((eu+ep)*100),ef=(0,r.useMemo)(()=>tt(ec),[ec]),ev=(0,r.useMemo)(()=>el?{eventId:p.id,kind:"SPONSORSHIP",sponsorshipPackageId:el.id,additionalTicketQuantities:ef,paymentChoice:td({option:ey,totalInCents:ej})}:null,[ef,p.id,ej,ey,el]),{preview:eN,loading:ew,error:ek}=tm({eventSlug:p.slug,input:ev,enabled:!j&&!!el}),eC=null!=j?j:eN,eS=!j&&ew,eA=j?null:ek,eE=eF(null!==(l=null==eC?void 0:eC.subtotalInCents)&&void 0!==l?l:ej),eI=eF(null!==(n=null==eC?void 0:eC.taxAmountInCents)&&void 0!==n?n:0),eT=eF(null!==(i=null==eC?void 0:eC.cardProcessingFeeInCents)&&void 0!==i?i:0),eM=null!==(o=null==eC?void 0:eC.totalAmountInCents)&&void 0!==o?o:ej,eP=eF(eM),e_=eC?"".concat(eC.taxRateLabel," (").concat(eC.taxRatePercentage,"%)"):"Tax";(0,r.useEffect)(()=>{_(e=>ea({currentRows:e,slots:eo}))},[eo]),(0,r.useEffect)(()=>{O(e=>ea({currentRows:e,slots:ed}))},[ed]),tq({setSubmission:H});let eq=(null===(a=u.find(e=>e.id===M.memberCompanyId))||void 0===a?void 0:a.name)||"",eD=eC?eK(eC.lineItems):[],eU=[...eD.length>0?eD:el?[{code:el.code||"â",description:el.name,quantity:1,unitPrice:eu,lineTotal:eu}]:[],...ei>0?[{code:(null==er?void 0:er.code)||"NCST",description:(null==er?void 0:er.name)||"No Charge Sponsorship Ticket",quantity:ei,unitPrice:0,lineTotal:0}]:[],...eD.length>0?[]:eW(ec)],eH={name:eq||M.contactName,lines:[M.contactName,M.streetAddress,M.addressLine2,[M.city,M.province,M.postalCode].filter(
1Boolean).join(" "),M.country].filter(Boolean),email:M.contactEmail,phone:M.phone},eG=()=>{if(!el)return"Select a sponsorship level to continue.";if(!M.memberCompanyId)return"Select your member company.";if(!M.contactName.trim())return"Enter the billing contact name.";if(!M.streetAddress.trim()||!M.city.trim()||!M.province.trim()||!M.postalCode.trim()||!M.country.trim())return"Enter the full billing address, including province/state, postal code and country.";if(!eO(M.contactEmail))return"Enter a valid billing contact email.";let e=L.findIndex(e=>!e.name.trim()||!eO(e.email));if(e>=0)return"Enter a name and valid email for included attendee ".concat(e+1,".");let t=R.findIndex(e=>!e.name.trim()||!eO(e.email));if(t>=0)return"Enter a name and valid email for additional attendee ".concat(t+1,".");let a=to({rows:L,fields:w,attendeeLabel:"included attendee"})||to({rows:R,fields:w,attendeeLabel:"additional attendee"});if(a)return a;let s=eR(N,U);return s?"".concat(s," is required."):eS?"Pricing is still being calculated. Please wait a moment.":eC?null:eA||"Pricing could not be calculated. Please adjust your selections and try again."},eY=e=>{let t=tc(M.contactName),a=tr(N,U,e=>"ATTENDEE"!==e);return{eventId:p.id,sponsorshipPackageId:null==el?void 0:el.id,selectedMemberCompanyId:M.memberCompanyId,sponsorDisplayName:eq||M.contactName.trim(),purchaserFirstName:t.firstName,purchaserLastName:t.lastName,purchaserEmail:M.contactEmail.trim(),purchaserPhone:M.phone.trim()||null,billing:{companyName:eq,contactName:M.contactName.trim(),contactEmail:M.contactEmail.trim(),contactPhone:M.phone.trim()||null,streetAddress:M.streetAddress.trim()||null,addressLine2:M.addressLine2.trim()||null,city:M.city.trim()||null,province:M.province.trim()||null,postalCode:M.postalCode.trim()||null,country:M.country.trim()||null},paymentChoice:td({option:e,totalInCents:eM}),includedAttendees:er?L.map(e=>ti({row:{...e,ticketTypeId:er.id},fields:w})):[],additionalAttendees:R.map((e,t)=>{var a;return ti({row:{...e,ticketTypeId:(null===(a=ex[t])||void 0===a?void 0:a.id)||""},fields:w})}),customFieldAnswers:a}},eV=async e=>{z("confirm"),H({status:"loading"});try{if(!f)throw Error("Security verification is still loading. Please try again.");let t=await f("event_sponsorship_submit");await em({action:"SPONSORSHIP",endpoint:"/api/events/".concat(p.slug,"/sponsorship"),entityId:"new-sponsorship",eventId:p.id,recaptchaToken:t,timestamp:v.current,input:eY(e)}),K(!0),J("Sponsorship request received. Chamber staff will review it, then confirm the invoice and payment instructions shown below."),H({status:"idle"}),es(!0)}catch(e){H({status:"error",message:e instanceof Error?e.message:"Sponsorship request could not be submitted."})}finally{z(null)}};return p.endAtUtcMilli<=Date.now()||!p.sponsorshipEnabled||0===C.length?(0,s.jsx)(tG,{primaryColor:g,backLink:(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}),children:(0,s.jsxs)("section",{className:"rounded-md border border-gray-200 bg-gray-50 p-8 text-center",children:[(0,s.jsx)("h2",{className:"text-2xl font-black text-gray-950",children:"Sponsorship is not available"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"This event does not have public sponsorship packages available right now."})]})}):G?(0,s.jsx)(tG,{primaryColor:g,backLink:W?(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}):(0,s.jsx)(tH,{label:"Back to Sponsorship Details",onClick:()=>Y(!1)}),header:(0,s.jsx)(tQ,{event:p,chamberProfile:b,primaryColor:g,formLabel:"Sponsorship Invoice"}),children:(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsx)(tL,{submission:B}),(0,s.jsx)(tF,{message:"Submit this sponsorship request for chamber review?",open:!!X,primaryColor:g,onProceed:()=>{Z(null),null==X||X()},onCancel:()=>Z(null)}),(0,s.jsx)(tB,{message:$||"Your request has been received.",open:et,onClose:()=>es(!1)}),(0,s.jsx)(t2,{event:p,chamberProfile:b,billingInquiryEmail:null==eC?void 0:eC.billingInquiryEmail,primaryColor:g,invoiceNumber:V,invoiceDateLabel:eh,dueDateLabel:eg,billTo:eH,soldTo:eH,lineItems:eU,subtotal:eE,tax:eI,taxLabel:e_,cardFee:eT,total:eP,paymentOptions:eb,cardPending:!1,onConfirmInvoice:()=>Z(()=>()=>eV(ey)),confirmPending:"confirm"===Q,confirmLabel:"Confirm Sponsorship Request",completed:W,confirmation:$}),!W&&(0,s.jsxs)("button",{type:"button",onClick:()=>Y(!1),className:"inline-flex items-center gap-2 text-sm font-bold",style:{color:g},children:[(0,s.jsx)(d.A,{className:"h-4 w-4"})," Back to Sponsorship Details"]}
1)]})}):(0,s.jsxs)(tG,{primaryColor:g,backLink:(0,s.jsx)(tH,{label:"Back to Events",href:"/events"}),header:(0,s.jsx)(tQ,{event:p,chamberProfile:b,primaryColor:g,formLabel:"Sponsorships"}),children:[(0,s.jsx)(t6,{sponsorshipPackage:en,onClose:()=>T(null),primaryColor:g}),(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsx)(tL,{submission:B}),[{title:"Select Your Sponsorship Level",content:(0,s.jsx)(t4,{packages:C,selectedPackageId:A,onSelect:E,onViewBenefits:T,primaryColor:g})},{title:"Enter your Company Information and Billing Details",content:(0,s.jsx)(t3,{billing:M,onChange:P,memberCompanies:u})},...er&&ei>0?[{title:"Included Tickets",content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Tickets allocated to this sponsorship level will show up on the sponsorship invoice."}),(0,s.jsx)(t9,{ticket:er,quantity:ei}),(0,s.jsx)(tX,{rows:L,attendeeFields:w,subtitle:(0,s.jsxs)("span",{className:"font-normal text-gray-600",children:["List ",ei," ",1===ei?"ticket":"ticket(s)"," included with the above sponsorship"]}),onChange:(e,t)=>
1_(a=>a.map(a=>a.slotId===e?t:a))})]})}]:[],...p.tickets.length>0?[{title:"Add Additional Tickets (optional)",content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Tickets selected here will be charged in the sponsorship invoice."}),(0,s.jsx)(t8,{tickets:p.tickets,quantities:q,onQuantityChange:(e,t)=>{let a=p.tickets.find(t=>t.id===e);D(s=>({...s,[e]:eQ(a,t)}))}}),R.length>0&&(0,s.jsx)(tX,{rows:R,attendeeFields:w,onChange:(e,t)=>O(a=>a.map(a=>a.slotId===e?t:a))})]})}]:[],...el&&el.addOns.length>0?[{title:"Included Add-ons Benefits",content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"These add-ons benefits are included with your selected sponsorship level."}),(0,s.jsx)(t7,{addOns:el.addOns})]})}]:[],...N.length>0?[{title:"Preferences & Accessibility",content:(0,s.jsx)(s.Fragment,{children:N.map(e=>(0,s.jsx)(tZ,{field:e,value:U[e.id]||"",onChange:t=>F(a=>({...a,[e.id]:t}))},e.id))})}]:[]].map((e,t)=>(0,s.jsx)(tz,{stepNumber:t+1,title:e.title,primaryColor:g,children:e.content},e.title)),(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1 px-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex w-full max-w-xs justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Subtotal"}),(0,s.jsx)("span",{className:"font-bold text-gray-950",children:eB(null!==(m=null==eC?void 0:eC.subtotalInCents)&&void 0!==m?m:ej)})]}),(0,s.jsxs)("div",{className:"flex w-full max-w-xs justify-between",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Plus Applicable Tax"}),(0,s.jsx)("span",{})]}),!eS&&!eC&&(0,s.jsx)("p",{className:"w-full max-w-xs text-right text-xs font-semibold text-red-700",children:"Pricing could not be calculated."}),eS&&(0,s.jsx)("p",{className:"w-full max-w-xs text-right text-xs font-semibold text-gray-500",children:"Updating pricingâ¦"}),(0,s.jsxs)("div",{className:"mt-1 flex w-full max-w-xs items-center justify-between border-t border-gray-300 pt-2",children:[(0,s.jsx)("span",{className:"text-base font-black uppercase text-gray-950",children:"Total Due"}),(0,s.jsx)("span",{className:"text-2xl font-black",style:{color:g},children:eB(null!==(x=null==eC?void 0:eC.subtotalInCents)&&void 0!==x?x:ej)})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{let e=eG();if(e){H({status:"error",message:e});return}H({status:"idle"}),Y(!0),window.scrollTo({top:0,behavior:"smooth"})},disabled:"loading"===B.status,className:"flex w-full items-center justify-center gap-2 rounded-md px-5 py-4 text-sm font-black text-white",style:{...tj(g),opacity:"loading"===B.status?.7:1},children:["Register & Generate Invoice",(0,s.jsx)(k.A,{className:"h-4 w-4"})]}),(0,s.jsxs)("p",{className:"notranslate mt-3 text-center text-xs text-gray-500",translate:"no",children:["By clicking Register & Generate, you agree to the"," ",(null==b?void 0:b.name)||"Chamber"," terms and conditions."]})]})]})]})},at=e=>{let{mode:t="index",events:a=[],event:l=null,memberCompanies:i=[],paymentOptions:o=[],eventTicketCreditCardPaymentMode:c="DISABLED",primaryColor:d="#BD1A25",chamberProfile:m=null,pixelQaState:x=null,nowUtcMilli:p=Date.now()}=e,[u,h]=(0,r.useState)(null),g=ep(x),b=(0,s.jsx)(V.VH,{message:u,primaryColor:d});if(g){let e=e8(g);if(e){let t=e0(e9,e);return(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(t5,{event:e9,memberCompanies:e6,paymentOptions:e3,eventTicketCreditCardPaymentMode:c,primaryColor:d,chamberProfile:m||e4,pixelQaPreset:e,pricingPreviewOverride:e1(e9,t)})]})}let t=e7(g);if(t){let e=e5(e9,t);return(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(ae,{event:e9,memberCompanies:e6,paymentOptions:e3,primaryColor:d,chamberProfile:m||e4,pixelQaPreset:t,pricingPreviewOverride:e2(e9,e9.sponsorshipPackages[0],e)})]})}return(0,s.jsx)(eC,{state:g})}return"detail"===t?l?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(tP,{event:l,onNavigateStart:h,primaryColor:d,chamberProfile:m})]}):(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsxs)("div",{className:"bg-white",children:[(0,s.jsx)(tv,{href:"/events",label:"Back to Events",primaryColor:d}),(0,s.jsxs)("section",{className:"container py-16 text-center",children:[(0,s.jsx)("h1",{className:"text-3xl font-black text-gray-950",children:"Event not available"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"This event may not be published or may no longer be available."})]})]})]}):"purchase"===t?l?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(n.D,{path:"/events/".concat(l.slug,"/purchase"),title:"Event Registration",parents:[{title:l.title,href:"/events/".concat(l.slug)}]}),(0,s.jsx)(t5,{event:l,memberCompanies:i,paymentOptions:o,eventTicketCreditCardPaymentMode:c,primaryColor:d,chamberProfile:m})]}):(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsxs)("div",{className:"bg-white",children:[(0,s.jsx)(tv,{href:"/events",label:"Back to Events",primaryColor:d}),(0,s.jsx)("section",{className:"container py-16 text-center",children:(0,s.jsx)(tD,{fallback:"Event registration is not available"})})]})]}):"sponsorshipPurchase"===t?l?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(n.D,{path:"/events/".concat(l.slug,"/purchase/sponsorship"),title:"Event Sponsorship",parents:[{title:l.title,href:"/events/".concat(l.slug)}]}),(0,s.jsx)(ae,{event:l,memberCompanies:i,paymentOptions:o,primaryColor:d,chamberProfile:m})]}):(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsxs)("div",{className:"bg-white",children:[(0,s.jsx)(tv,{href:"/events",label:"Back to Events",primaryColor:d}),(0,s.jsx)("section",{className:"container py-16 text-center",children:(0,s.jsx)(tD,{fallback:"Event sponsorship is not available"})})]})]}):(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)(Y.T,{events:a,onNavigateStart:h,primaryColor:d,nowUtcMilli:p})]})}},96776:(e,t,a)=>{a.d(t,{Wj:()=>r,_B:()=>i,gY:()=>l,im:()=>n,kX:()=>o,y0:()=>s});let s=e=>new Date("".concat(e.dateISO,"T12:00:00")),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a="number"==typeof e.registrationClosesAtUtcMilli?e.registrationClosesAtUtcMilli:e.endAtUtcMilli;return Number.isFinite(a)&&a<t},n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return"number"==typeof e.createdAtUtcMilli&&t-e.createdAtUtcMilli<=1728e5},r=e=>new Intl.DateTimeFormat("en-US",{month:"short",year:"numeric"}).format(e),i=e=>{let t=e.getFullYear(),a=e.getMonth(),s=new Date(t,a,1),l=(s.getDay()+6)%7,n=Math.ceil((l+new Date(t,a+1,0).getDate())/7),r=new Date(s);return r.setDate(s.getDate()-l),Array.from({length:7*n},(e,t)=>{let a=new Date(r);return a.setDate(r.getDate()+t),a})},o=e=>"".concat(e.getFullYear(),"-").concat(String(e.getMonth()+1).padStart(2,"0"),"-").concat(String(e.getDate()).padStart(2,"0"))},98328:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(40157).A)("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])}}]);
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.