PageSourceSearch

https://socialloop.ai/_next/static/chunks/699.bf5dbe63f2379b7d.js

js socialloop.ai collected 2026-10-05 12:45:56 UTC 43,173 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[699,4683],{47064:(e,t,r)=>{r.d(t,{$V:()=>c,aD:()=>d,clearTrackingSession:()=>a});var i=r(12115),l=r(29213);function s(){let e="sl_tracking_session",t=sessionStorage.getItem(e);return t||(t=(0,l.k)(),sessionStorage.setItem(e,t)),t}function a(){if("undefined"!=typeof sessionStorage)try{for(let e of(sessionStorage.removeItem("sl_tracking_session"),Object.keys(sessionStorage)))e.startsWith("sl_sent_")&&sessionStorage.removeItem(e)}catch(e){}}function n(e){try{let t=sessionStorage.getItem("sl_sent_".concat(e));return t?new Set(JSON.parse(t)):new Set}catch(e){return new Set}}function o(){let e=window.location.pathname;return e.match(/\/tickets\/tkt_/)||e.match(/^\/tickets\/[^/]+\/?$/)?"success_page":e.includes("/approval/")?"approval_page":e.includes("/checkout")?"checkout":e.match(/\/loops\/[^/]+\/tickets\/?$/)?"ticket_selection":e.includes("/loops/")?"event_page":"unknown"}function c(e){let t=(0,i.useRef)([]),r=(0,i.useRef)([]),l=(0,i.useRef)(Date.now()),[a
1]=(0,i.useState)(()=>s()),c=(0,i.useRef)(a),d=(0,i.useRef)(e||""),u=(0,i.useRef)(void 0),p=(0,i.useRef)({}),m=(0,i.useRef)(null),x=(0,i.useRef)(null);(0,i.useEffect)(()=>{c.current=s(),d.current=e||"",l.current=Date.now(),t.current=[],r.current=[],x.current=null;{let e=new URLSearchParams(window.location.search);u.current=e.get("promoCode")||e.get("promocode")||e.get("PromoCode")||void 0,p.current=function(){let e=new URLSearchParams(window.location.search);return{utm_source:e.get("utm_source")||void 0,utm_medium:e.get("utm_medium")||void 0,utm_campaign:e.get("utm_campaign")||void 0}}()}},[e]);let g=(0,i.useRef)(null),h=(0,i.useCallback)(()=>{d.current&&c.current&&(m.current&&(clearTimeout(m.current),m.current=null),g.current&&g.current(),(0!==t.current.length||0!==r.current.length)&&(!function(e){if(0===e.steps.length&&0===e.errors.length)return;let t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon?navigator.sendBeacon("/api/events/track",t):fetch("/api/events/track",{method:"POST",body:t,keepalive:!0}).catch(()=>{})}({sessionId:c.current,eventId:d.current,steps:[...t.current],errors:[...r.current],timeOnPageMs:Date.now()-l.current,page:o(),...p.current,promoCode:u.current}),t.current=[],r.current=[],x.current=null))},[]),f=(0,i.useCallback)(()=>{let e=Date.now();null===x.current&&(x.current=e),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{m.current=null,h()},Math.min(1500,Math.max(0,5e3-(e-x.current))))},[h]),b=(0,i.useCallback)((e,r)=>{let i=d.current;if(i&&!n(i).has(e)){t.current.push({step:e,timestamp:Date.now(),...r&&{metadata:r}});try{let t=n(i);t.add(e),sessionStorage.setItem("sl_sent_".concat(i),JSON.stringify([...t]))}catch(e){}f()}},[f]),v=(0,i.useCallback)((e,t,i)=>{r.current.length>=10||(r.current.push({step:e,message:(t||"").slice(0,500),stack:(i||"").slice(0,1e3),timestamp:Date.now()}),f())},[f]);return(0,i.useEffect)(()=>{let e=()=>h(),t=()=>{"hidden"===document.visibilityState&&h()},i=e=>{r.current.length>=10||r.current.push({step:o(),message:(e.message||"").slice(0,500),stack:"".concat(e.filename||"",":").concat(e.lineno||0,":").concat(e.colno||0),timestamp:Date.now()})},l=e=>{var t,i;if(r.current.length>=10)return;let l=(null==(t=e.reason)?void 0:t.message)||String(e.reason||"Unhandled rejection");r.current.push({step:o(),message:l.slice(0,500),stack:((null==(i=e.reason)?void 0:i.stack)||"").slice(0,1e3),timestamp:Date.now()})};return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",e),window.addEventListener("error",i),window.addEventListener("unhandledrejection",l),()=>{h(),m.current&&(clearTimeout(m.current),m.current=null),document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",e),window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",l)}},[]),{trackStep:b,trackError:v,flush:h,sessionId:a,scrollResolverRef:g}}function d(e,t,r){let i=0,l=0,s=()=>{let e=Date.now();if(e-l<200)return;l=e;let r=document.documentElement.scrollHeight-window.innerHeight;if(r<=0)return;let s=window.scrollY/r*100;s>i&&(i=s),s>=20&&t("scroll_25"),s>=45&&t("scroll_50"),s>=70&&t("scroll_75"),s>=95&&t("scroll_100")};return r&&(r.current=()=>{i>=20&&t("scroll_25"),i>=45&&t("scroll_50"),i>=70&&t("scroll_75"),i>=95&&t("scroll_100")}),window.addEventListener("scroll",s,{passive:!0}),()=>{window.removeEventListener("scroll",s),r&&(r.current=null)}}},90699:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var i=r(95155),l=r(12115),s=r(14585),a=r(39390),n=r(76849),o=r(97516),c=r(31311),d=r(47064),u=r(96010),p=r(334);function m(e){var t,r,o,m;let{eventId:x,eventName:g,eventStartTime:h,preselectedTicketClassId:f,preselectedTierIndex:v,affiliateUid:y,autoPromoCode:w,onClose:j,onSuccess:k,onContinueToCheckout:N}=e,{trackStep:C,sessionId:S}=(0,d.$V)(x);(0,l.useEffect)(()=>{C("get_tickets_click")},[C]),(0,l.useEffect)(()=>{console.warn("[LEGACY-BUY-FLOW] TicketPurchaseView mounted. This component is retired by ADR-0035. If you are seeing this in production post-cutover, file a bug — the user reached a deprecated surface. Event:",x)},[x]);let I=()=>{try{let e=localStorage.getItem("event-".concat(x,"-attribution"));if(!e)return{sessionId:S};let t=JSON.parse(e);return{utm_source:String(t.utm_source||"").slice(0,200),utm_medium:String(t.utm_medium||"").slice(0,200),utm_campaign:String(t.utm_campaign||"").slice(0,200),sessionId:S}}catch(e){return{sessionId:S}}},[_,P]=(0,l.useState)([]),R=(0,l.useRef)([]),[T,E]=(0,l.useState)(!0),[D,q]=(0,l.useState)(null),[A,F]=(0,l.useState)(null),[L,M]=(0,l.useState)(!0),[U,O]=(0,l.useState)(null),[$,z]=(0,l.useState)(null),[B,V]=(0,l.useState)(null),[W,H]=(0,l.useState)(null),[Y,J]=(0,l.useState)(null),G=(0,l.useRef)(null),[K,X]=(0,l.useState)({});(0,l.useEffect)(()=>()=>{G.current&&clearTimeout(G.current)},[]);let[Q,Z]=(0,l.useState)({}),[ee,et]=(0,l.useState)({}),[er,ei]=(0,l.useState)(null),[el,es]=(0,l.useState)(!1),[ea,en]=(0,l.useState)(p.fH),[eo,ec]=(0,l.useState)(!1),[ed,eu]=(0,l.useState)(!1),ep="promo_".concat(x),[em,ex]=(0,l.useState)(""),[eg,eh
1]=(0,l.useState)(()=>{try{let e=sessionStorage.getItem(ep);return e?JSON.parse(e):null}catch(e){return null}}),[ef,eb]=(0,l.useState)(!1),[ev,ey]=(0,l.useState)(null),[ew,ej]=(0,l.useState)(()=>{if(w||y){try{if(sessionStorage.getItem(ep))return!1}catch(e){}return!0}return!1}),[ek,eN]=(0,l.useState)([]),eC=(0,l.useRef)(!1);(0,l.useEffect)(()=>{x&&!eC.current&&(eC.current=!0,y?(0,a.getDocs)((0,a.query)((0,a.collection)(s.db,"events",x,"promoCodes"),(0,a.where)("affiliateId","==",y),(0,a.where)("enabled","==",!0))).then(e=>{let t=e.docs.map(e=>({code:e.data().code,applicableClasses:e.data().applicableClasses||[]}));eN(t),0===t.length&&ej(!1)}).catch(()=>{ej(!1)}):s.auth.currentUser&&(0,n.httpsCallable)(s.functions,"resolveAffiliateDiscount")({eventId:x}).then(e=>{let t=e.data;t.hasDiscount&&Array.isArray(t.codes)?eN(t.codes.map(e=>({code:e.code,applicableClasses:e.applicableClasses||[]}))):ej(!1)}).catch(()=>{ej(!1)}))},[y,x]),(0,l.useEffect)(()=>{if(!y||0===ek.length||!$)return;if(eg&&!ek.some(e=>e.code===eg.code))return void ej(!1);let e=$.id,t=ek.find(t=>0===t.applicableClasses.length||t.applicableClasses.includes(e));if(!t||(null==eg?void 0:eg.code)===t.code)return void ej(!1);ex(t.code),eb(!0),(0,n.httpsCallable)(s.functions,"validatePromoCode")({eventId:x,code:t.code,ticketClassId:e}).then(e=>{let t=e.data;if(t.valid){let e={code:t.code,type:t.discountType,value:t.discountValue,applicableClasses:t.applicableClasses||[],tierConfig:t.tierConfig||null};eh(e),C("promo_applied",{code:e.code});try{sessionStorage.setItem(ep,JSON.stringify(e))}catch(e){}e.applicableClasses.length>0&&P(R.current.filter(t=>"secret"!==t.visibility||e.applicableClasses.includes(t.id)))}}).catch(()=>{}).finally(()=>{eb(!1),ej(!1)})},[y,ek,$,x,eg,ep]);let eS=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(!w||eS.current||eg||y){w&&!y&&ej(!1);return}eS.current=!0,ex(w.toUpperCase()),eb(!0),(0,n.httpsCallable)(s.functions,"validatePromoCode")({eventId:x,code:w}).then(e=>{let t=e.data;if(t.valid){let e={code:t.code,type:t.discountType,value:t.discountValue,applicableClasses:t.applicableClasses||[],tierConfig:t.tierConfig||null};eh(e),C("promo_applied",{code:e.code});try{sessionStorage.setItem(ep,JSON.stringify(e))}catch(e){}e.applicableClasses.length>0&&P(R.current.filter(t=>"secret"!==t.visibility||e.applicableClasses.includes(t.id)))}else ey(t.reason||"This promo code is no longer valid")}).catch(()=>{ey("Unable to verify promo code")}).finally(()=>{eb(!1),ej(!1)})},[w,x,eg,y,ep]);let[eI,e_]=(0,l.useState)(null),[eP,eR]=(0,l.useState)(null),[eT,eE]=(0,l.useState)(!1),[eD,eq]=(0,l.useState)(!1),[eA,eF]=(0,l.useState)(null),eL=(0,l.useRef)(null),eM=(0,l.useRef)(!1);(0,l.useEffect)(()=>{(async()=>{let e=s.auth.currentUser;if(e&&x)try{let t=await c.inviteRegistrationService.checkForPendingInvite(x,e.uid
1);t?(t.staffRole,eF(t),eL.current=t):(eF(null),eL.current=null)}catch(e){console.error("❌ Error checking pending invite:",e)}})()},[x]),(0,l.useEffect)(()=>{let e=async()=>{try{var e,t,r,i,l;E(!0),q(null);let o=s.auth.currentUser,c=null;if(o){let r=await (0,a.getDoc)((0,a.doc)(s.db,"events",x,"ticketReservations",o.uid));if(r.exists()){let i=r.data();"held"===i.status&&(null==(e=i.expiresAt)?void 0:e.toDate())>new Date&&(c={ticketClassId:i.ticketClassId,quantity:i.quantity||1,expiresAt:i.expiresAt.toDate(),pricingModel:i.pricingModel||void 0,pricePerTicket:i.pricePerTicket||void 0,tierIndex:null!=(t=i.tierIndex)?t:null,tierName:i.tierName||null,amount:i.amount||void 0})}}e_(c);let d=await (0,a.getDoc)((0,a.doc)(s.db,"events",x));if(d.exists()){let e=d.data();eu(!0===e.absorbFees);let t="number"==typeof e.platformFeeOverride?e.platformFeeOverride:null;try{let e=(0,n.httpsCallable)(s.functions,"validateHostPayments"),r=(await e({eventId:x})).data;"number"==typeof(null==r?void 0:r.platformFeePercent)?(en(r.platformFeePercent),ec(!0===r.platformFeeIsOverride)):(en(null!=t?t:p.fH),ec(null!=t))}catch(e){en(null!=t?t:p.fH),ec(null!=t)}!1===e.ticketsSellable&&M(!1),(null==(r=e.payoutDestination)?void 0:r.status)&&O(e.payoutDestination.status)}let u=(0,a.collection)(s.db,"events",x,"ticketClasses"),m=await (0,a.getDocs)((0,a.query)(u)),g=[];m.forEach(e=>{let t=e.data(),r=t.held||0,i=(null==c?void 0:c.ticketClassId)===e.id?c.quantity:0,l=Math.max(0,t.capacity-t.sold-r+i);g.push({id:e.id,eventId:t.eventId||x,name:t.name||"General Admission",description:t.description,pricing:t.pricing||{model:"fixed",basePrice:0,currency:"USD"},capacity:t.capacity||0,sold:t.sold||0,held:t.held||0,available:l,eligibility:t.eligibility,sortOrder:t.sortOrder,showRemaining:t.showRemaining,visibility:t.visibility})}),g.sort((e,t)=>{var r,i;return(null!=(r=e.sortOrder)?r:999)-(null!=(i=t.sortOrder)?i:999)}),R.current=g;let h=g.filter(e=>!!("secret"!==e.visibility||eg&&eg.applicableClasses.length>0&&eg.applicableClasses.includes(e.id)));P(h);let b=!0;for(let e=0;e<h.length;e++){let t=h[e],r=(null==c?void 0:c.ticketClassId)===t.id;if((r||(f?t.id===f&&t.available>0:0===e&&t.available>0))&&b)if(z(t),V(t.id),b=!1,r&&(null==c?void 0:c.pricePerTicket)){let e=c.pricingModel||(null==(l=t.pricing)?void 0:l.model);"pwyw"===e||"pay_what_you_want"===e?(H(c.pricePerTicket),X(e=>({...e,[t.id]:c.pricePerTicket}))):"tiered"===e&&null!=c.tierIndex&&(J(c.tierIndex),et(e=>({...e,[t.id]:c.tierIndex})))}else null!=v&&(null==(i=t.pricing)?void 0:i.model)==="tiered"&&(J(v),et(e=>({...e,[t.id]:v})))}}catch(e){console.error("Error loading ticket classes:",e),q("Unable to load tickets. Please try again."),ej(!1)}finally{E(!1)}};x&&e()},[x,f]),(0,l.useEffect)(()=>{(async()=>{let e=s.auth.currentUser;if(e&&x)try{let i=(0,a.query)((0,a.collection)(s.db,"events",x,"approvalRequests"),(0,a.where)("requesterId","==",e.uid),(0,a.where)("status","==","pending")),l=await (0,a.getDocs)(i);if(l.empty)eR(null);else{var t,r;let i=l.docs[0],s=i.data(),a={id:i.id,eventId:s.eventId||x,ticketClassId:s.ticketClassId||"",requesterId:s.requesterId||e.uid,requesterName:s.requesterName||e.displayName||"User",requesterPhotoURL:s.requesterPhotoURL,status:"pending",requestedAt:(null==(t=s.requestedAt)?void 0:t.toDate())||new Date,reviewedAt:null==(r=s.reviewedAt)?void 0:r.toDate(),reviewedBy:s.reviewedBy,reviewNote:s.reviewNote,quantity:s.quantity||1,ticketClassName:s.ticketClassName||"",ticketPrice:s.ticketPrice||0};eR(a)}}catch(e){console.error("❌ Error checking pending approval:",e)}})()},[x]),(0,l.useEffect)(()=>{var e,t,r;if(!$)return void ei(null);let i=$.pricing.basePrice||0;"pwyw"===$.pricing.model||"pay_what_you_want"===$.pricing.model?i=null!=(t=null!=(e=null!=W?W:$.pricing.minPrice)?e:$.pricing.basePrice)?t:0:"tiered"===$.pricing.model&&null!==Y&&$.pricing.tiers&&(i=(null==(r=$.pricing.tiers[Y])?void 0:r.price)||0);let l=i,s=$&&eJ($.id);eg&&i>0&&s&&(l=eK(i,$.id)),0===l?ei({ticketPrice:0,platformFee:0,processingFee:0,salesTax:0,total:0}):ei(eU(l))},[$,W,Y,ea,eo,ed,eg]);let eU=e=>(0,p.m8)({subtotal:e,platformFeePercent:ea,absorbFees:ed,platformFeeIsOverride:eo}),eO=(e,t)=>{X(r=>({...r,[e]:t})),Z(t=>{let r={...t};return delete r[e],r}),B===e&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{H(t)},800))},e$=(e,t)=>{Z(r=>({...r,[e]:t})),X(t=>({...t,[e]:null})),G.current&&(clearTimeout(G.current),G.current=null),B===e&&H(t)},ez=(e,t)=>{et(r=>({...r,[e]:t})),B===e&&J(t)},eB=async(e,t)=>{if(!s.auth.currentUser)return void F("You must be logged in to purchase tickets");try{es(!0),F(null);let r=(0,n.httpsCallable)(s.functions,"createFreeTicket"),i=eL.current,{ticketId:l}=(await r({eventId:x,ticketClassId:e.id,userId:t,inviteId:(null==i?void 0:i.inviteId)||null,promoCode:(null==eg?void 0:eg.code)||null,attribution:I()})).data;C("register_free",{tierId:e.id,ticketId:l}),k(l)}catch(e){console.error("Failed to purchase free ticket:",e),F((null==e?void 0:e.message)||"Failed to register. Please try again."),es(!1)}},eV=async e=>{let t=s.auth.currentUser;if(!t)return void F("You must be logged in to request approval");try{es(!0);let r=(0,n.httpsCallable)(s.functions,"createFreeTicket"),i=(await r({eventId:x,ticketClassId:e.id,userId:t.uid,promoCode:(null==eg?void 0:eg.code)||null,attribution:I()})).data;if(i.requiresApproval){C("approval_submitted",{tierId:e.id});let r={id:i.approvalRequestId,eventId:x,ticketClassId:e.id,requesterId:t.uid,requesterName:t.displayName||"",status:"pending",requestedAt:new Date,quantity:1,ticketClassName:e.n
1ame,ticketPrice:0};eR(r),eE(!0)}else j();es(!1)}catch(t){let e=t instanceof Error?t.message:"Failed to submit request";console.error("❌ Failed to submit approval request:",e),e.includes("already")||e.includes("pending")?F("You already have a pending request for this event."):F("Failed to submit request. Please try again."),es(!1)}},eW=async()=>{if(eP)try{es(!0);let e=(0,n.httpsCallable)(s.functions,"cancelApprovalRequest");await e({eventId:x,requestId:eP.id}),eR(null),eE(!1),es(!1),j()}catch(e){console.error("❌ Error canceling approval request:",e),F("Failed to cancel request. Please try again."),es(!1)}},eH=async()=>{let e=em.trim();if(e){eb(!0),ey(null);try{let t=(0,n.httpsCallable)(s.functions,"validatePromoCode"),r=(await t({eventId:x,code:e})).data;if(r.valid){let e={code:r.code,type:r.discountType,value:r.discountValue,applicableClasses:r.applicableClasses||[],tierConfig:r.tierConfig||null};eh(e),ey(null);try{sessionStorage.setItem(ep,JSON.stringify(e))}catch(e){}if(e.applicableClasses.length>0){let t=R.current.filter(t=>"secret"!==t.visibility||e.applicableClasses.includes(t.id));P(t)}}else ey(r.reason||"Invalid promo code")}catch(e){ey(((null==e?void 0:e.message)||"Failed to validate promo code").replace(/^.*?(?:FAILED_PRECONDITION|NOT_FOUND|ALREADY_EXISTS|RESOURCE_EXHAUSTED|INVALID_ARGUMENT):\s*/i,""))}finally{eb(!1)}}},eY=async()=>{if($&&!eM.current){eM.current=!0;try{var e,t,r;let i=s.auth.currentUser;if(!i)return void F("You must be logged in to register");if(eP)return void eE(!0);let l=$.pricing.basePrice||0;if((null==(e=$.eligibility)?void 0:e.requiresCredential)&&"approval"===$.eligibility.credentialType&&0===l)return void await eV($);let a="pwyw"===$.pricing.model||"pay_what_you_want"===$.pricing.model,o=$.pricing.basePrice||0;if(a?o=null!=(t=null!=W?W:$.pricing.minPrice)?t:0:"tiered"===$.pricing.model&&null!==Y&&$.pricing.tiers&&(o=(null==(r=$.pricing.tiers[Y])?void 0:r.price)||0),a&&o>0){let e=$.pricing.minPrice||0,t=Math.max(e,50);if(o<t)return void F("Minimum payment is ".concat((0,u.$g)(t)))}if(eg&&o>0&&eJ($.id)&&(o=eK(o,$.id)),0===o){if(eg&&eJ($.id)){let e=async()=>{es(!0);try{let e=(0,n.httpsCallable)(s.functions,"createFreeTicketWithPromo"),t=(await e({eventId:x,ticketClassId:$.id,userId:i.uid,promoCode:eg.code,attribution:I()})).data;if(t.requiresApproval){let e={id:t.approvalRequestId,eventId:x,ticketClassId:$.id,requesterId:i.uid,requesterName:i.displayName||"",status:"pending",requestedAt:new Date,quantity:1,ticketClassName:$.name,ticketPrice:0};eR(e),eE(!0),es(!1);return}let{ticketId:r}=t;try{sessionStorage.removeItem(ep)}catch(e){}k(r)}catch(t){let e=(null==t?void 0:t.message)||"Failed to register. Please try again.";F(e.replace(/^.*?(?:FAILED_PRECONDITION|NOT_FOUND|ALREADY_EXISTS|RESOURCE_EXHAUSTED):\s*/i,"")),es(!1)}};await e();return}await eB($,i.uid);return}C("continue_checkout",{tierId:$.id,total:o}),N({ticketClassId:$.id,price:o,tierIndex:null!==Y?Y:void 0,promoCode:eg&&eJ($.id)?eg.code:void 0})}finally{eM.current=!1}}},eJ=e=>!!eg&&(0===eg.applicableClasses.length||eg.applicableClasses.includes(e)),eG=e=>{if(!eg)return null;if(eg.tierConfig&&e&&eg.tierConfig[e]){var t;let r=eg.tierConfig[e];return{type:r.discountType||eg.type,value:null!=(t=r.discountValue)?t:eg.value}}return{type:eg.type,value:eg.value}},eK=(e,t)=>{let r=eG(t);if(!r)return e;let i=0;return i="%"===r.type?Math.round(e*r.value/100):Math.min(Math.round(100*r.value),e),Math.max(e-i,0)},eX=e=>{let t=e.pricing.basePrice||0,r="pwyw"===e.pricing.model||"pay_what_you_want"===e.pricing.model;if(0===t&&!r)return"FREE";if(r){let r=e.pricing.minPrice||t;return r>0?"".concat((0,u.$g)(r),"+"):"Any amount"}if("tiered"!==e.pricing.model||!e.pricing.tiers||!(e.pricing.tiers.length>0))return(0,u.$g)(t);{let t=e.pricing.tiers[0];return(0,u.$g)(t.price)}},eQ=(null==$?void 0:$.pricing.model)==="pwyw"||(null==$?void 0:$.pricing.model)==="pay_what_you_want",eZ=(null==$?void 0:$.pricing.basePrice)||0;$&&eQ?eZ=null!=(o=null!=W?W:$.pricing.minPrice)?o:0:(null==$?void 0:$.pricing.model)==="tiered"&&null!==Y&&$.pricing.tiers&&(eZ=(null==(m=$.pricing.tiers[Y])?void 0:m.price)||0);let e0=$&&0===eZ,e5=$&&eZ>0&&eg&&eJ($.id)&&0===eK(eZ,$.id),e2=e0||e5;return(0,i.jsxs)("div",{className:"min-h-screen",style:{backgroundColor:"rgb(var(--surface-raised))"},children:[el&&(0,i.jsx)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center",style:{backgroundColor:"rgb(var(--surface-raised))"},children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,i.jsxs)("div",{className:"relative w-16 h-16 flex items-center justify-center",children:[(0,i.jsx)("div",{className:"absolute inset-0 rounded-full animate-spin",style:{border:"2px s
1olid transparent",borderTopColor:"rgba(255, 255, 255, 0.5)",borderRightColor:"rgba(255, 255, 255, 0.15)",animationDuration:"1.2s",animationTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"}}),(0,i.jsx)("svg",{className:"w-7 h-7 text-white/70 animate-pulse",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,style:{animationDuration:"2s"},children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})})]}),(0,i.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,i.jsx)("p",{className:"text-white/70 text-[15px] font-medium tracking-tight",children:"Securing your ticket"}),(0,i.jsx)("p",{className:"text-white/30 text-xs",children:"This will only take a moment"})]})]})}),(0,i.jsx)("div",{className:"sticky top-0 z-40 backdrop-blur-sm border-b",style:{backgroundColor:"rgba(20, 20, 25, 0.95)",borderColor:"rgba(255, 255, 255, 0.08)"},children:(0,i.jsx)("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 h-16 flex items-center",children:(0,i.jsx)("button",{onClick:j,disabled:el,className:"text-white/70 disabled:opacity-50 hover:text-white hover:bg-white/5 rounded-full p-2 transition-all","aria-label":"Back to event",children:(0,i.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2.5,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})})}),(0,i.jsx)("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 py-8 sm:py-12",children:(0,i.jsxs)("div",{className:"max-w-xl mx-auto",children:[!L&&(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[(0,i.jsx)("p",{className:"text-[17px] font-semibold text-white mb-2",children:"pending_approval"===U?"Tickets coming soon":"rejected"===U||"revoked"===U?"Tickets are temporarily unavailable":"Tickets are not currently available"}),(0,i.jsx)("p",{className:"text-[13px] mb-8",style:{color:"rgb(179, 179, 179)"},children:"Please check back later."}),(0,i.jsx)("button",{onClick:j,className:"h-12 px-8 text-[15px] font-semibold rounded-full",style:{backgroundColor:"rgba(255, 255, 255, 0.12)",color:"#ffffff"},children:"Go Back"})]}),L&&(0,i.jsxs)(i.Fragment,{children:[eA&&(0,i.jsxs)("div",{className:"mb-6 rounded-2xl p-4 flex items-center gap-3",style:{backgroundColor:"rgba(255, 255, 255, 0.08)"},children:[(0,i.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:"rgba(255, 204, 0, 0.15)"},children:(0,i.jsxs)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",style:{color:"rgb(255, 204, 0)"},children:[(0,i.jsx)("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",strokeWidth:"0"}),(0,i.jsx)("path",{d:"M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"}),(0,i.jsx)("path",{d:"M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"})]})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("p",{className:"text-white font-semibold text-[15px]",children:["You're invited as ",(0,c.KI)(eA.category)]}),(0,i.jsxs)("p",{className:"text-[13px]",style:{color:"rgb(179, 179, 179)"},children:["by ",eA.senderName,eA.staffRole&&" • ".concat((0,c.gv)(eA.staffRole))]})]})]}),(0,i.jsx)("h1",{className:"text-[20px] font-bold text-white mb-1 tracking-tight",children:"Select Tickets"}),(0,i.jsx)("p",{className:"text-[14px] font-medium mb-0.5",style:{color:"rgb(179, 179, 179)"},children:g}),h&&(0,i.jsx)("p",{className:"text-[12px] font-normal mb-6",style:{color:"rgb(117, 117, 117)"},children:h.toLocaleString("en-US",{weekday:"long",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).replace(","," •")}),!T&&_.some(e=>{var t;return(e.pricing.basePrice||0)>0||(e.pricing.minPrice||0)>0||(null==(t=e.pricing.tiers)?void 0:t.some(e=>e.price>0))}
1)&&(0,i.jsxs)("div",{style:{marginBottom:"16px"},children:[eg?(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",borderRadius:"10px",backgroundColor:"rgba(52, 199, 89, 0.08)",border:"1px solid rgba(52, 199, 89, 0.2)"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(52, 199, 89)",strokeWidth:2,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,i.jsx)("span",{style:{fontSize:"14px",fontWeight:500,color:"rgb(52, 199, 89)"},children:eg.code}),(0,i.jsx)("span",{style:{fontSize:"13px",color:"rgba(52, 199, 89, 0.6)"},children:(()=>{let e=eG(null==$?void 0:$.id);return e&&0!==e.value?"%"===e.type?"".concat(e.value,"% off"):"".concat((0,u.$g)(Math.round(100*e.value))," off"):"Access code applied"})()})]}),(0,i.jsx)("button",{onClick:()=>{eh(null),ex(""),ey(null);try{sessionStorage.removeItem(ep)}catch(e){}P(R.current.filter(e=>"secret"!==e.visibility)),(null==$?void 0:$.visibility)==="secret"&&(z(null),V(null))},style:{fontSize:"13px",color:"rgba(255, 255, 255, 0.4)",background:"none",border:"none",cursor:"pointer"},children:"Remove"})]}):(0,i.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,i.jsx)("input",{type:"text",name:"socialloop-promo-code",autoComplete:"off","data-form-type":"other","data-lpignore":"true",autoCorrect:"off",autoCapitalize:"characters",spellCheck:!1,value:em,onChange:e=>{ex(e.target.value.toUpperCase()),ey(null)},placeholder:"Promo code",disabled:ef||el,onKeyDown:e=>{"Enter"===e.key&&eH()},style:{flex:1,padding:"10px 12px",borderRadius:"10px",fontSize:"14px",color:"white",backgroundColor:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.1)",outline:"none",opacity:ef?.5:1}}),(0,i.jsx)("button",{onClick:eH,disabled:!em.trim()||ef||el,style:{padding:"10px 16px",borderRadius:"10px",fontSize:"14px",fontWeight:500,color:"white",backgroundColor:"rgba(255, 255, 255, 0.08)",border:"1px solid rgba(255, 255, 255, 0.1)",cursor:"pointer",opacity:!em.trim()||ef?.4:1},children:ef?"Checking...":"Apply"})]}),ev&&(0,i.jsx)("p",{style:{marginTop:"6px",fontSize:"13px",color:"rgb(255, 69, 58)"},children:ev})]}),T||ew?(0,i.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,i.jsx)("div",{className:"w-10 h-10 border-[2.5px] border-white/[0.08] border-t-white/50 rounded-full animate-spin"}),(0,i.jsx)("p",{className:"text-white/40 text-sm font-medium tracking-wide",children:"Loading tickets..."})]})}):D?(0,i.jsx)("div",{className:"bg-red-500/10 border border-red-500/20 rounded-2xl p-4",children:(0,i.jsx)("p",{className:"text-red-500",children:D})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-2 mb-4",children:_.map(e=>(0,i.jsx)(b,{ticket:e,isSelected:B===e.id,onSelect:()=>(e=>{if(0!==e.available)if(B===e.id?null:e.id){if(G.current&&(clearTimeout(G.current),G.current=null),C("tier_selected",{tierId:e.id,tierName:e.name,price:e.pricing.basePrice}),z(e),V(e.id),"tiered"===e.pricing.model&&e.pricing.tiers){let t=e.pricing.tiers.findIndex(e=>e.capacity>0),r=t>=0?t:0;J(r),void 0===ee[e.id]&&et(t=>({...t,[e.id]:r}))}if("pwyw"===e.pricing.model||"pay_what_you_want"===e.pricing.model){let t=K[e.id],r=Q[e.id];void 0!==r?H(r):void 0!==t&&H(t)}}else z(null),V(null),H(null),J(null)})(e),formatTicketPrice:eX,onPWYWPriceChange:eO,onPWYWSuggestionSelect:e$,onTierSelect:ez,pwyPrice:K[e.id],selectedSuggestion:Q[e.id],selectedTier:ee[e.id],userHoldExpiresAt:(null==eI?void 0:eI.ticketClassId)===e.id?eI.expiresAt:null,promoDiscount:(()=>{var t;if(!eJ(e.id))return null;let r=e.pricing.basePrice||0;if("tiered"===e.pricing.model&&(null==(t=e.pricing.tiers)?void 0:t.length)&&(r=e.pricing.tiers[0].price||0),r<=0)return null;let i=eK(r,e.id);return i===r?null:{originalPrice:(0,u.$g)(r),discountedPrice:0===i?"Free":(0,u.$g)(i)}})()},e.id))}),A&&(0,i.jsxs)("div",{className:"mb-4 p-3 rounded-lg flex items-start gap-2",style:{backgroundColor:"rgba(255, 69, 58, 0.1)",border:"1px solid rgba(255, 69, 58, 0.3)"},children:[(0,i.jsx)("p",{className:"text-sm flex-1",style:{color:"rgb(255, 69, 58)"},children:A}),(0,i.jsx)("button",{onClick:()=>F(null),className:"text-white/40 hover:text-white/70 transition-colors flex-shrink-0 mt-0.5","aria-label":"Dismiss error",children:(0,i.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),$&&er&&(0,i.jsxs)("div",{className:"space-y-6 pb-8 animate-fadeInUp",children:[er.total>0&&(0,i.jsxs)("div",{className:"rounded-xl p-4 mb-4",style:{backgroundColor:"rgba(255, 255, 255, 0.03)",border:"1px solid rgba(255, 255, 255, 0.1)"},children:[(0,i.jsx)("h3",{className:"text-[15px] font-semibold text-white mb-3 opacity-90",children:"Pricing Breakdown"}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,i.jsx)("span",{className:"text-[14px] font-medium",style:{color:"rgb(200, 200, 200)"},children:"Ticket"}),(0,i.jsx)("span",{className:"text-[14px] font-semibold text-white",children:eg&&eg.value>0&&$&&eJ($.id)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"line-through text-white/30 mr-1.5",children:(0,u.$g)((null==$?void 0:$.pricing.basePrice)||0)}),(0,u.$g)(er.ticketPrice)]}):(0,u.$g)(er.ticketPrice)})]}
1),eg&&$&&eJ($.id)&&(()=>{let e=eG($.id);return e&&0!==e.value?(0,i.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,i.jsx)("span",{className:"text-[14px] font-medium",style:{color:"rgb(52, 199, 89)"},children:"Promo discount"}),(0,i.jsxs)("span",{className:"text-[14px] font-semibold",style:{color:"rgb(52, 199, 89)"},children:["−","%"===e.type?"".concat(e.value,"%"):(0,u.$g)(Math.round(100*e.value))]})]}):null})(),er.platformFee>0&&(0,i.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,i.jsx)("span",{className:"text-[14px] font-medium",style:{color:"rgb(200, 200, 200)"},children:"Platform fee"}),(0,i.jsx)("span",{className:"text-[14px] font-semibold text-white",children:(0,u.$g)(er.platformFee)})]}),er.processingFee>0&&(0,i.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,i.jsx)("span",{className:"text-[14px] font-medium",style:{color:"rgb(200, 200, 200)"},children:"Payment processing fee"}),(0,i.jsx)("span",{className:"text-[14px] font-semibold text-white",children:(0,u.$g)(er.processingFee)})]}),er.salesTax>0&&(0,i.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,i.jsx)("span",{className:"text-[14px] font-medium",style:{color:"rgb(200, 200, 200)"},children:"Sales tax"}),(0,i.jsx)("span",{className:"text-[14px] font-semibold text-white",children:(0,u.$g)(er.salesTax)})]}),(0,i.jsx)("div",{className:"h-px",style:{backgroundColor:"rgba(255, 255, 255, 0.1)"}})]})]}),(0,i.jsxs)("div",{className:"flex justify-between items-center mb-6 pb-2",style:{borderBottom:"1px solid rgba(255, 255, 255, 0.1)"},children:[(0,i.jsx)("span",{className:"text-[15px] font-semibold text-white",children:"Total"}),(0,i.jsx)("span",{className:"text-[22px] font-bold text-white transition-all duration-200",style:{animation:"fadeInScale 0.2s ease-out"},children:er?0===er.total&&eg&&$&&eJ($.id)?"Free":(0,u.$g)(er.total):"$0"},(null==er?void 0:er.total)||0)]}),!e2&&er&&er.total>0&&(0,i.jsx)("button",{onClick:eY,disabled:el,className:"w-full text-[15px] font-semibold transition-all disabled:opacity-50 hover:scale-[1.01] active:scale-[0.98]",style:{height:"48px",backgroundColor:eP?"rgb(18, 18, 20)":"rgba(255, 255, 255, 0.9)",color:eP?"#ffffff":"rgb(var(--surface-base))",borderRadius:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:eP?"1.5px solid rgb(255, 204, 0)":"none",boxShadow:eP?"0 0 12px rgba(255, 204, 0, 0.25)":"none",cursor:"pointer"},children:eP?"Pending Approval":"Continue to Checkout"}),e2&&(0,i.jsx)("button",{onClick:eY,disabled:el,className:"w-full text-[15px] font-semibold transition-all disabled:opacity-50",style:{height:"48px",backgroundColor:eP?"rgb(18, 18, 20)":"rgba(255, 255, 255, 0.9)",color:eP?"#ffffff":"rgb(var(--surface-base))",borderRadius:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:eP?"1.5px solid rgb(255, 204, 0)":"none",boxShadow:eP?"0 0 12px rgba(255, 204, 0, 0.25)":"none"},children:el?(0,i.jsx)("div",{className:"w-5 h-5 border-2 border-black/20 border-t-black rounded-full animate-spin"}):eP?"Pending Approval":(null==$||null==(t=$.eligibility)?void 0:t.requiresCredential)&&(null==$||null==(r=$.eligibility)?void 0:r.credentialType)==="approval"?"Request Approval":"Register"})]})]})]})]})}),eT&&eP&&(0,i.jsx)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center px-5",style:{backgroundColor:"rgb(var(--surface-raised))"},children:(0,i.jsxs)("div",{className:"w-full max-w-[380px] rounded-2xl overflow-hidden",style:{backgroundColor:"rgb(var(--surface-overlay))"},children:[(0,i.jsx)("div",{className:"h-[3px]",style:{background:"linear-gradient(90deg, rgba(255,204,0,0.4), rgba(255,204,0,0.15), transparent)"}}),(0,i.jsxs)("div",{className:"px-7 pt-8 pb-7",children:[(0,i.jsx)("div",{className:"flex justify-center mb-6",children:(0,i.jsxs)("div",{className:"relative w-14 h-14 flex items-center justify-center",children:[(0,i.jsx)("div",{className:"absolute inset-0 rounded-full",style:{backgroundColor:"rgba(255, 204, 0, 0.08)"}}),(0,i.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"rgb(255, 204, 0)",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})]})}),(0,i.jsx)("h2",{className:"text-white text-[17px] font-semibold text-center mb-2",children:"Awaiting Approval"}),(0,i.jsx)("p",{className:"text-white/40 text-[13px] text-center leading-relaxed mb-6",children:"Your request has been submitted. The host will review and respond soon."}),(0,i.jsx)("div",{className:"rounded-xl px-4 py-3.5 mb-2",style:{backgroundColor:"rgba(255, 255, 255, 0.04)"},children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-white/90 text-[14px] font-medium",children:eP.ticketClassName}),(0,i.jsxs)("p",{className:"text-white/30 text-[12px] mt-0.5",children:["Requested ",eP.requestedAt.toLocaleDateString()]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full",style:{backgroundColor:"rgba(255, 204, 0, 0.1)"},children:[(0,i.jsx)("div",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"rgb(255, 204, 0)"}}),(0,i.jsx)("span",{className:"text-[11px] font-medium",style:{color:"rgb(255, 204, 0)"},children:"Pending"})]})]})}),eP.ticketPrice>0&&(0,i.jsx)("p",{className:"text-white/25 text-[11px] text-center mb-2",children:"Card authorized — you won't be charged unless approved."})]}),(0,i.jsxs)("div",{style:{borderTop:"1px solid rgba(255, 255, 255, 0.06)"},children:[(0,i.jsx)("button",{onClick:j,className:"w-full py-3.5 text-[14px] font-medium transition-colors hover:bg-white/[0.03]",style:{color:"rgba(255, 255, 255, 0.5)",borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},children:"Back to Event"}),(0,i.jsx)("button",{onClick:()=>eq(!0),disabled:el,className:"w-full py-3.5 text-[14px] font-medium transition-colors hover:bg-white/[0.03] disabled:opacity-50",style:{color:"rgba(255, 255, 255, 0.3)"},children:"Cancel Request"})]})]})}),eD&&(0,i.jsx)("div",{className:"fixed inset-0 z-[65] flex items-center justify-center px-5",style:{backgroundColor:"rgba(0, 0, 0, 0.85)"},children:(0,i.jsxs)("div",{className:"w-full max-w-[340px] rounded-2xl overflow-hidden",style:{backgroundColor:"rgb(var(--surface-overlay))"},children:[(0,i.jsxs)("div",{className:"px-7 pt-7 pb-5",children:[(0,i.jsx)("h2",{className:"text-white text-[17px] font-semibold text-center mb-2",children:"Cancel Request?"}),(0,i.jsx)("p",{className:"text-white/40 text-[13px] text-center leading-relaxed",children:"You'll need to submit a new request if you change your mind."})]}),(0,i.jsxs)("div",{style:{borderTop:"1px solid rgba(255, 255, 255, 0.06)"},children:[(0,i.jsx)("button",{onClick:()=>eq(!1),disabled:el,className:"w-full py-3.5 text-[14px] font-medium transition-colors hover:bg-white/[0.03]",style:{color:"rgba(255, 255, 255, 0.5)",borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},children:"Keep Request"}),(0,i.jsx)("button",{onClick:eW,disabled:el,className:"w-full py-3.5 text-[14px] font-medium transition-colors hover:bg-white/[0.03] disabled:opacity-50",style:{color:"rgb(255, 69, 58)"},children:el?"Canceling...":"Yes, Cancel"})]})]})})]})}let x="rgb(18, 18, 18)",g="rgb(179, 179, 179)",h="rgb(30, 215, 96)",f="rgba(255, 255, 255, 0.15)";function b(e){var t,r;let{ticket:l,isSelected:s,onSelect:a,formatTicketPrice:n,onPWYWPriceChange:o,onPWYWSuggestionSelect:c,onTierSelect:d,pwyPrice:u,selectedSuggestion:p,selectedTier:m,userHoldExpiresAt:x,promoDiscount:g}=e,h=0===l.available&&!x,f="pwyw"===l.pricing.model||"pay_what_you_want"===l.pricing.model,b="tiered"===l.pricing.model;return(0,i.jsxs)("div",{onClick:h?void 0:a,className:"rounded-xl px-4 py-3 transition-all duration-150 ".concat(h?"o
1pacity-60 cursor-not-allowed":"cursor-pointer hover:bg-white/[0.04]"),style:{backgroundColor:s?"rgba(255, 255, 255, 0.06)":"rgba(255, 255, 255, 0.02)",border:s?"1.5px solid rgba(255, 255, 255, 0.2)":"1px solid rgba(255, 255, 255, 0.08)"},children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("h3",{className:"text-[15px] font-semibold text-white flex-1 truncate",children:l.name}),(0,i.jsx)("span",{className:"text-[15px] font-bold ml-3",children:g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"line-through text-white/30 mr-1.5 font-medium text-[13px]",children:g.originalPrice}),(0,i.jsx)("span",{style:{color:"rgb(52, 199, 89)"},children:g.discountedPrice})]}):(0,i.jsx)("span",{className:"text-white",children:n(l)})})]}),l.description&&(0,i.jsx)("p",{className:"text-[13px] mt-1.5 leading-snug",style:{color:"rgba(255, 255, 255, 0.5)"},children:l.description}),(!1!==l.showRemaining||h||x)&&(0,i.jsx)("p",{className:"text-[11px] font-medium mt-1",style:{color:x?"rgb(30, 215, 96)":h?"rgb(255, 69, 58)":l.available<=10?"rgb(255, 149, 0)":"rgba(255, 255, 255, 0.35)"},children:x?"Reserved for you":h?"Sold Out":l.available<=10?"Only ".concat(l.available," left"):l.available>=1e4?"Unlimited":"".concat(l.available," available")}),(null==(t=l.eligibility)?void 0:t.requiresCredential)&&(null==(r=l.eligibility)?void 0:r.credentialType)==="approval"&&(0,i.jsxs)("div",{className:"inline-flex items-center gap-1.5 mt-2 px-2.5 py-1 rounded-full",style:{backgroundColor:"rgba(255, 204, 0, 0.15)"},children:[(0,i.jsx)("svg",{className:"w-3 h-3",fill:"rgb(255, 204, 0)",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"})}),(0,i.jsx)("span",{className:"text-[10px] font-semibold",style:{color:"rgb(255, 204, 0)"},children:"Approval Required"})]}),"secret"===l.visibility&&(0,i.jsxs)("div",{className:"inline-flex items-center gap-1.5 mt-2 px-2.5 py-1 rounded-full",style:{backgroundColor:"rgba(245, 158, 11, 0.15)"},children:[(0,i.jsx)("svg",{className:"w-3 h-3",fill:"rgb(245, 158, 11)",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})}),(0,i.jsx)("span",{className:"text-[10px] font-semibold",style:{color:"rgb(245, 158, 11)"},children:"Secret"})]}),f&&l.available>0&&(0,i.jsx)(v,{ticket:l,onPriceChange:e=>o(l.id,e),onSuggestionSelect:e=>c(l.id,e),customPrice:u,selectedSuggestion:p}),b&&l.available>0&&(0,i.jsx)(y,{ticket:l,tiers:l.pricing.tiers||[],onTierSelect:e=>d(l.id,e),selectedTier:m})]})}function v(e){let{ticket:t,onPriceChange:r,onSuggestionSelect:l,customPrice:s,selectedSuggestion:a}=e,n=t.pricing.minPrice||0,c=(t.pricing.suggestedPrices||[500,1e3,2500,5e3]).filter(e=>e>=n).slice(0,4);return(0,i.jsxs)("div",{className:"mt-3",children:[(0,i.jsx)("div",{className:"h-px mb-3",style:{backgroundColor:"rgba(255, 255, 255, 0.1)"}}),(0,i.jsx)("p",{className:"text-[13px] font-medium mb-1",style:{color:g},children:"Choose your price"}),n>0&&(0,i.jsxs)("p",{className:"text-[12px] font-normal mb-3",style:{color:"rgb(255, 149, 0)"},children:["Minimum: ",(0,u.$g)(n)]}),(0,i.jsx)("div",{className:"flex gap-2 mb-3",children:c.map(e=>(0,i.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e)},className:"flex-1 h-11 rounded-xl text-[15px] font-semibold transition-all",style:{backgroundColor:a===e?h:"rgb(28, 28, 30)",border:"1px solid ".concat(a===e?h:f),color:"white"},children:(0,u.$g)(e)},e))}),(0,i.jsxs)("div",{className:"rounded-lg p-3",style:{backgroundColor:x,border:"1px solid rgba(255, 255, 255, 0.2)"},onClick:e=>e.stopPropagation(),children:[(0,i.jsx)("label",{className:"block text-[11px] font-medium mb-1",style:{color:g},children:"Custom amount"}),(0,i.jsx)(o.A,{value:s||null,onChange:r,placeholder:"$0.00",minValue:n,error:!1})]})]})}function y(e){let{ticket:t,tiers:r,onTierSelect:l,selectedTier:s}=e;return(0,i.jsxs)("div",{className:"mt-3",children:[(0,i.jsx)("div",{className:"h-px mb-3",style:{backgroundColor:"rgba(255, 255, 255, 0.1)"}}),(0,i.jsx)("p",{className:"text-[13px] font-medium mb-3",style:{color:g},children:"Select ticket tier"}),(0,i.jsx)("div",{className:"space-y-2",children:r.map((e,t)=>{let r=0===e.capacity,a=s===t;return(0,i.jsx)("button",{onClick:e=>{e.stopPropagation(),r||l(t)},disabled:r,className:"w-full rounded-xl p-3 transition-all disabled:cursor-not-allowed",style:{backgroundColor:a?"rgba(30, 215, 96, 0.15)":x,border:a?"2px solid ".concat(h):"1px solid ".concat(f),opacity:r?.5:1,minHeight:"68px"},children:(0,i.jsxs)("div",{className:"flex items-start justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col items-start",children:[(0,i.jsx)("span",{className:"text-[15px] font-semibold text-white text-left",children:e.name}
1),(0,i.jsx)("span",{className:"text-[12px] font-medium mt-1",style:{color:r?"rgb(255, 69, 58)":g},children:r?"Sold out":"".concat(e.capacity," available")})]}),(0,i.jsx)("span",{className:"text-[17px] font-bold text-white",children:(0,u.$g)(e.price)})]})},t)})})]})}},97516:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(95155),l=r(12115);function s(e){let{value:t,onChange:r,placeholder:s="$0.00",minValue:a=0,error:n=!1,className:o="",inputStyle:c,ariaLabel:d}=e,[u,p]=(0,l.useState)(""),m=(0,l.useRef)(null);(0,l.useEffect)(()=>{null===t||0===t?p(""):p(x(t))},[t]);let x=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(e/100),g=n||null!==t&&t>0&&t<a;return(0,i.jsx)("input",{ref:m,type:"text",inputMode:"numeric",value:u,onChange:e=>{let t=e.target.value.replace(/\D/g,"");if(""===t){p(""),r(null);return}let i=parseInt(t,10);i>0x7fffffff||(p(x(i)),r(i>0?i:null))},onKeyDown:e=>{if("Backspace"===e.key&&null!==t&&t>0){e.preventDefault();let i=Math.floor(t/10);0===i?(p(""),r(null)):(p(x(i)),r(i))}},placeholder:s,"aria-label":d,"aria-invalid":g||void 0,className:"w-full bg-transparent outline-none ".concat(o),style:{font:'17px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontWeight:600,color:"white",...c}})}}}]);

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.