(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9421],{58376:function(e,t,n){"use strict";n.d(t,{j:function(){return TicketingHead}});var r=n(52322),i=n(53228),o=n(32805),a=n(19533),s=n(58681),c=n(62476),l=n(56506);let TicketingHead=e=>{var t,n,d,u,m,g,p,f,v,h;let{ticketing:y,country:k}=e,{ticketingField:x}=(0,s.zS)(y),T=(0,c.U)((null==x?void 0:x.description)||""),b="https://www.zeffy.com",D="".concat(b).concat((0,a.getTicketingLink)(y.path,(0,o.getIsoLocaleFromCountry)(k,y.locale))),j=(0,i.getCurrencyFromCountry)(null===(t=y.organization)||void 0===t?void 0:t.country),w=null===(n=y.occurrencesWithRates)||void 0===n?void 0:n.find(e=>{var t;return(null===(t=e.occurrence)||void 0===t?void 0:t.startUtc)&&new Date(e.occurrence.startUtc)>new Date}),F=(null==w?void 0:null===(d=w.occurrence)||void 0===d?void 0:d.startUtc)||(null===(g=y.occurrencesWithRates)||void 0===g?void 0:null===(m=g[0])||void 0===m?void 0:null===(u=m.occurrence)||void 0===u?void 0:u.startUtc),C=!!F;return(0,r.jsx)(l._,{description:null==x?void 0:x.description,image:y.bannerUrl||y.logoUrl||void 0,title:null==x?void 0:x.title,url:D,video:y.bannerVideoUrl||void 0,children:(null===(p=y.rates)||void 0===p?void 0:p.length)&&(null===(f=y.rates)||void 0===f?void 0:f.length)>0&&(0,r.jsx)("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org/","@type":C?"Event":"Product",name:null==x?void 0:x.title,eventAttendanceMode:y.address?"https://schema.org/OfflineEventAttendanceMode":"https://schema.org/OnlineEventAttendanceMode",location:y.address?{"@type":"Place",name:y.address,address:y.address}:{"@type":"VirtualLocation",url:D},startDate:F,image:y.bannerUrl||y.logoUrl||(C?void 0:b+"/images/zeffy-logo.png"),offers:null===(v=y.rates)||void 0===v?void 0:v.map(e=>{var t,n;return{"@type":"Offer",url:D,price:(0,i.getDollarValue)(e.amount),priceCurrency:j.toUpperCase(),name:x?null===(t=(0,o.getField)(e.rateFields,x.locale))||void 0===t?void 0:t.title:"",description:x?null===(n=(0,o.getField)(e.rateFields,x.locale))||void 0===n?void 0:n.description:""}}),description:T,organizer:{"@type":"Organization",name:null===(h=y.organization)||void 0===h?void 0:h.name}})})})}},56506:function(e,t,n){"use strict";n.d(t,{_:function(){return ZeffyHead}});var r=n(52322),i=n(32805),o=n(97729),a=n.n(o),s=n(5632),c=n(62476),l=n(17749);let ZeffyHead=e=>{let{description:t="",disableMobileAutoZoom:n=!0,image:o,imageWidth:d="600px",themeColor:u=l.DG.primary.main,title:m="Zeffy",url:g,video:p,children:f}=e,v=m||"Zeffy",h=(0,s.useRouter)(),{locale:y}=h,k=(0,i.getLocalesFromIsoLocale)(y),x=g||"".concat("https://www.zeffy.com","/").concat(y).concat(h.asPath),T=(0,c.U)(t),b=T||v;return(0,r.jsxs)(a(),{children:[(0,r.jsx)("title",{children:v}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,r.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,r.jsx)("meta",{charSet:"utf-8"}),(0,r.jsx)("meta",{name:"author",content:"Zeffy"}),(0,r.jsx)("meta",{name:"copyright",content:"Zeffy"}),(0,r.jsx)("meta",{name:"description",content:b}),(0,r.jsx)("meta",{name:"language",content:k}),(0,r.jsx)("meta",{name:"theme-color",content:u}),(0,r.jsx)("meta",{name:"title",content:v}),(0,r.jsx)("meta",{name:"viewport",content:n?"width=device-width, initial-scale=1, maximum-scale=1":"width=device-width, initial-scale=1"}),(0,r.jsx)("meta",{property:"og:description",content:b}),(0,r.jsx)("meta",{property:"og:site_name",content:"Zeffy"}),(0,r.jsx)("meta",{property:"og:title",content:v}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:url",content:x}),o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:image",content:o}),(0,r.jsx)("meta",{property:"og:image:secure_url",content:o}),(0,r.jsx)("meta",{property:"og:image:width",content:d})]}),p&&(0,r.jsx)("meta",{property:"og:video",content:p}),f]})}},5947:function(e,t,n){"use strict";n.d(t,{a:function(){return useTicketDrawer}});var r=n(2784),i=n(34988),o=n(63955),a=n(67264),s=n(951);let useTicketDrawer=e=>{let{control:t}=e,n=(0,o.qo)({control:t,name:"ticketsPurchased"}),c=(0,o.qo)({control:t,name:"extraDonation"})||0,{ticketing:l,validDiscount:d,hasDiscountCodes:u}=r.useContext(a._),m=!!l.extraDonation,g=m&&!!c,p=r.useMemo(()=>(null==n?void 0:n.reduce((e,t)=>t.purchasedNumber?t.attendeesByTicket?e+t.attendeesByTicket*parseInt(t.purchasedNumber.toString()):e+parseInt(t.purchasedNumber.toString()):e,0))||0,[n]),f=l.formCategory===i.TicketingFormCategory.MembershipV2,v=(0,s.XX)(n,l,c,d),h=(0,s.yI)(n,l,c);return{hasDiscountCodes:u,ticketingCanHaveExtraDonation:m,ticketingHasExtraDonation:g,allTicketsSelectedNumber:p,isMembershipV2:f,eligibleAmountTotal:v,displayGenerateReceipt:h,extraDonation:c}}},16280:function(e,t,n){"use strict";n.d(t,{V:function(){return TicketingContainer}});var r=n(52322),i=n(2784),o=n(69692),a=n(54673),s=n(25237),c=n.n(s),l=n(67264),d=n(34988),u=n(79188);let isProduction=()=>!0;var m=n(75678);let useTicketingV2IsActive=e=>{var t;let n=(null==e?void 0:null===(t=e.organization)||void 0===t?void 0:t.createdAtUtc)?(0,u.convertTimestampToDateNumber)(e.organization.createdAtUtc):"undefined",{isActive:r,loading:i}=(0,m.F)({flagKey:d.AmplitudeFlagKey.MemorableForms,userProperties:{donor_organization_country:e.organization.country,donor_organization_creation_date:n},skip:e.formCategory!==d.TicketingFormCategory.Event||!e.organization||isProduction()});return{ticketingV2IsActive:r,loading:i}};var g=n(6463),p=n(49479),f=n(54686),v=n(5632),h=n(63955),y=n(48619),k=n(59508);let useTicketingForm=e=>{var t,n;let{ssrTicketing:r}=e,o=(0,v.useRouter)(),{ticketing:a}=(0,i.useContext)(l._),{isPreview:s}=(0,i.useContext)(y.v),c=r.organization,{firstName:d,lastName:u,email:m,companyName:p,address:f,city:x,postalCode:T}=o.query,{defaultCountry:b,defaultRegion:D}=(0,k.k)(c),j=r.displayAddressQuestion?{firstName:d||"",lastName:u||"",email:m||"",region:D,country:b,address:f||"",city:x||"",postalCode:T||""}:{firstName:d||"",lastName:u||"",email:m||"",region:D,country:b},w={companyName:p||"",fundraising:(null===(t=r.donationForm)||void 0===t?void 0:t.campaignId)?{type:g.lO.IndividualFundraising,createTeam:void 0,inputs:[]}:void 0,customAnswersOfOrder:void 0,customAnswersOfParticipants:void 0,discountId:"",firstParticipantIsBuyer:!1,extraDonation:null,ticketsPurchased:s?[{rateId:null==a?void 0:null===(n=a.rates)||void 0===n?void 0:n[0].id,purchasedNumber:1}]:void 0},F=(0,h.cI)({mode:"onBlur",defaultValues:{...j,...w},shouldUnregister:!1});return(0,i.useEffect)(()=>{F.setValue("country",b),F.setValue("region",D)},[b,D]),{form:F,isFormValid:F.formState.isValid,isFormDirty:F.formState.isDirty}};var x=n(32450),T=n(5947),b=n(30412);let D=c()(()=>Promise.all([n.e(5402),n.e(4695),n.e(2290),n.e(4884),n.e(1238),n.e(3971),n.e(2703),n.e(2271),n.e(1511),n.e(6354),n.e(8072),n.e(8553)]).then(n.bind(n,68553)),{loadableGenerated:{webpack:()=>[68553]}}),j=c()(()=>Promise.all([n.e(5402),n.e(4695),n.e(2290),n.e(4884),n.e(1238),n.e(3971),n.e(2703),n.e(2271),n.e(1511),n.e(6354),n.e(8072),n.e(3970),n.e(1605)]).then(n.bind(n,1605)),{loadableGenerated:{webpack:()=>[1605]}}),w=c()(()=>Promise.all([n.e(5402),n.e(4695),n.e(2290),n.e(4884),n.e(1238),n.e(3971),n.e(2703),n.e(2271),n.e(1511),n.e(6354),n.e(8072),n.e(3970),n.e(3658)]).then(n.bind(n,23658)),{loadableGenerated:{webpack:()=>[23658]}}),F=c()(()=>Promise.all([n.e(4695),n.e(2290),n.e(1238),n.e(3971),n.e(7164)]).then(n.bind(n,29268)).then(e=>e.TicketingV2),{loadableGenerated:{webpack:()=>[29268]}}),TicketingContainer=e=>{let{isSmallSize:t,isFullWidth:n,hideHeader:s,ssrTicketing:c,isEmbed:d,v2:u}=e,{isSmallScreen:m}=(0,p.a)(),{form:v}=useTicketingForm({ssrTicketing:c});(0,b.c)({control:v.control});let{isSubmitting:h,isAnimatedThankYouPage:k,organization:C,generateETicket:S,selectedPaymentMethod:O}=i.useContext(y.v),{hasADate:V}=i.useContext(l._),I=t||!d&&m,{displayGenerateReceipt:_}=(0,T.a)({setValue:v.setValue,control:v.control,trigger:v.trigger,watch:v.watch}),{amount:z,hasNoETickets:q}=(0,x.A)({control:v.control}),{loading:A,ticketingV2IsActive:N}=useTicketingV2IsActive(c);return A?null:(0,r.jsxs)(r.Fragment,{children:[h&&k&&O!==g.XL.CashApp&&(0,r.jsx)(o.Z,{sx:{position:"fixed",display:"flex",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255, 255, 255, 0.9)",zIndex:1e3},children:(0,r.jsx)(f.U9,{organizationName:C.name,formType:a.FormType.Ticketing,generateTaxReceipt:_,generateTicket:S&&!q,isFree:0===z,hasADate:V})}),(0,r.jsx)("form",{noValidate:!0,style:h?{pointerEvents:"none",opacity:.4}:void 0,children:N||u?(0,r.jsx)(F,{ticketing:c}):(0,r.jsxs)(r.Fragment,{children:[d&&(0,r.jsx)(D,{getValues:v.getValues,setValue:v.setValue,register:v.register,control:v.control,handleSubmit:v.handleSubmit,errors:v.formState.errors,trigger:v.trigger,watch:v.watch,formState:v.formState}),I&&(0,r.jsx)(w,{getValues:v.getValues,setValue:v.setValue,register:v.register,control:v.control,handleSubmit:v.handleSubmit,errors:v.formState.errors,trigger:v.trigger,watch:v.watch,isFullWidth:n,hideHeader:s,formState:v.formState}),!d&&!m&&!I&&(0,r.jsx)(j,{getValues:v.getValues,setValue:v.setValue,register:v.register,control:v.control,handleSubmit:v.handleSubmit,errors:v.formState.errors,trigger:v.trigger,watch:v.watch,formState:v.formState})]})})]})}},67264:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(2784);let i=r.createContext({ticketingIsFull:!1,ticketingIsClosed:!1,ticketingDescriptionIsOpen:!1,openTicketingDescription:()=>{},closeTicketingDescription:()=>{},buyerDrawerIsOpen:!1,toggleBuyerDrawer:e=>()=>{},fallBackToTicketingContainerOnFullTicketing:e=>{},fallBackToTicketsDrawerOnOverpassedRatesSeats:(e,t)=>{},fallBackToTicketsDrawerOnOverPassedTicketingSeats:(e,t)=>{},fallBackToTicketingContainerOnNoTicketSelected:e=>{},fullRatesReturnByOrder:[],remainingTicketingSeatsReturnByOrder:null,remainingTicketingSeats:1/0,hasDiscountCodes:!1,validDiscount:null,setValidDiscount:e=>{},ticketing:{},ticketingField:{},organization:{},questions:[],featureFlag:{},registrationIncreaseThermometer:!1,isOnboarding:!1,selectedOccurrenceWithRates:null,occurrencesWithRates:[],hasADate:!1,isOccurrencesWithRatesLoading:!0,setSelectedOccurrenceId:e=>{},selectedOccurrenceId:null,hasOnlyOneDate:!1,isCampaignRegistration:!1,donationForm:void 0,event:void 0,isAuction:!1,membershipRenewalBuyerInfo:void 0,setMembershipRenewalBuyerInfo:()=>{}})},62476:function(e,t,n){"use strict";n.d(t,{U:function(){return useHeadDescription}});var r=n(2784),i=n(24330),o=n.n(i);let useHeadDescription=e=>(0,r.useMemo)(()=>o()(e,{allowedTags:[]}),[e])},79173:function(e,t,n){"use strict";n.d(t,{D:function(){return createFrontendTheme},F:function(){return useTheme}});var r=n(2784),i=n(98643),o=n(47591),a=n(63358),s=n(17749);let createFrontendTheme=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,i.Z)({...a.VH,palette:{...s.DG,background:{default:t?"transparent":s.DG.text.reverse.intense},component:"form",border:{...s.DG.border,brand:e?{intense:e,moderate:(0,o.$n)(e,.4),quiet:(0,o.$n)(e,.8)}:s.DG.border.brand},surface:{...s.DG.surface,brand:e?{intense:e,moderate:(0,o.$n)(e,.75),quiet:(0,o.$n)(e,.9)}:s.DG.surface.brand},text:{...s.DG.text,primary:s.DG.neutral[20],secondary:s.DG.neutral[50],brand:e?{intense:(0,o._j)(e,.2),moderate:e,quiet:(0,o.$n)(e,.2)}:s.DG.text.brand},primary:e?{darkest:(0,o._j)(e,.5),dark:(0,o._j)(e,.3),main:e,light:(0,o.$n)(e,.7),lighter:(0,o.$n)(e,.9),lightest:(0,o.$n)(e,.95),contrastText:s.DG.primary.contrastText}:{...s.DG.primary},secondary:e?{darkest:(0,o._j)(e,.7),dark:(0,o._j)(e,.4),main:(0,o.$n)(e,.5),light:(0,o.$n)(e,.7),lighter:(0,o.$n)(e,.8),lightest:(0,o.$n)(e,.9),contrastText:s.DG.secondary.contrastText}:{...s.DG.secondary}}})},useTheme=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r.useMemo(()=>createFrontendTheme(e,t),[e,t])}},30412:function(e,t,n){"use strict";n.d(t,{c:function(){return useTicketingFormUpdated}});var r=n(2784),i=n(36234),o=n(63955),a=n(48619),s=n(67264),c=n(8398),l=n(6463),d=n(83078),u=n(38632),m=n(67962),g=n(951),p=n(13388);let useTicketingFormUpdated=e=>{let{control:t}=e,{isDirty:n,isSubmitting:f,isSubmitSuccessful:v}=(0,o.cl)({control:t}),{locale:h}=(0,r.useContext)(c.R),{tip:y,displayedFormAmount:k,selectedPaymentMethod:x,formData:T,formType:b,organization:D,shouldSendTipPercentage:j,selectedTip:w}=(0,r.useContext)(a.v),{ticketing:F,validDiscount:C}=(0,r.useContext)(s._),S=(0,o.qo)({control:t,name:"email"}),O=(0,o.qo)({control:t,name:"firstName"}),V=(0,o.qo)({control:t,name:"lastName"}),I=(0,o.qo)({control:t,name:"address"}),_=(0,o.qo)({control:t,name:"city"}),z=(0,o.qo)({control:t,name:"postalCode"}),q=(0,o.qo)({control:t,name:"region"}),A=(0,o.qo)({control:t,name:"country"}),N=(0,o.qo)({control:t,name:"discountId"}),G=(0,o.qo)({control:t,name:"extraDonation"}),U=(0,o.qo)({control:t,name:"giveAsOrganism"}),P=(0,o.qo)({control:t,name:"companyName"}),R=(0,o.qo)({control:t,name:"ticketsPurchased"}),B=(0,o.qo)({control:t,name:"occurrenceId"}),M=(0,r.useMemo)(()=>(0,u._W)(A),[A]),$=(0,r.useMemo)(()=>(0,g.XX)(R,F,G||0,C),[G,C,JSON.stringify(R)]),L=(0,r.useMemo)(()=>{if(!F.rates||!R||!C)return 0;let e=(0,p.S)(F.rates,R);return(0,m.TC)(C,e)},[C,JSON.stringify(R)]),Z=(0,u.zJ)(R);(0,d.S)({email:S,firstName:O,lastName:V,address:I,city:_,postalCode:z,region:q,country:M,discountAmount:L,eligibleAmount:$,extraDonation:G,discountId:N,isCorporate:U,corporationName:P,ticketingOccurrenceId:B,tipAmount:(j?0:y)||0,tipPercentage:(j?w.percentage:0)||0,productsAmount:k,totalAmount:k+y,paymentMethod:x,productTickets:Z,productDonation:null,productBids:null,formId:T.id,formLang:l.DL[h],formType:b||null,locale:h,organizationId:D.id,source:l.Dy.FormSubmission,status:l.LV.Open,userTimezone:i.ou.local().zoneName||"UTC"},n,f||v)}},76527:function(){},96969:function(){},32232:function(){},24195:function(){}}]);