1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[631],{2631:(e,t,s)=>{s.r(t),s.d(t,{default:()=>h});var r=s(2854),a=s(3255),n=s(9864),i=s(9817),l=s(801),o=s(7923),d=s(7191),c=s(8875),m=s(6510),u=s(4606),f=s(1011),p=s(3612);let x=i.z.object({firstname:i.z.string().min(1,"Firstname is required"),lastname:i.z.string().min(1,"Lastname is required"),email:i.z.string().email("Invalid email address")});function h(){var e,t,s;let i=(0,m.I)({required:["space","amount","date"]}),h=(0,n.mN)({resolver:(0,a.u)(x),mode:"onChange"}),v=i.space&&i.amount&&i.date,g={publicKey:"pk_live_69f9952353ef005d11d6bf5e7353402f7fc4425c",reference:new Date().getTime().toString(),email:null!==(s=h.watch("email"))&&void 0!==s?s:"",amount:i.amount?100*i.amount:0},b=(0,c.Qj)(g),y=(0,f.useRouter)(),j=e=>{let t=u.A.stringify({...i,space:i.space,amount:i.amount,date:i.date,firstname:h.watch("firstname"),lastname:h.watch("lastname"),email:h.watch("email"),reference:e,redirect:i.redirect?i.redirect:"/customer-info?".concat(u.A.str
1ingify(i))});y.push("/payment-success?".concat(t))};return(0,r.jsx)("div",{className:"flex flex-col items-center justify-center min-h-screen",children:(0,r.jsxs)("div",{className:"w-full max-w-[500px] max-h-[400px] p-2 px-4",children:[(0,r.jsxs)("div",{className:" flex flex-row items-center",children:[(0,r.jsx)(l.$,{size:"icon",variant:"ghost",onClick:()=>y.push("/calendar?".concat(u.A.stringify(i))),className:(null===(e=i.redirect)||void 0===e?void 0:e.includes("select-a-plan"))||(null===(t=i.redirect)||void 0===t?void 0:t.includes("calendar"))?"flex":"invisible",children:(0,r.jsx)(p.A,{})}),(0,r.jsx)("p",{className:"flex-[0.9] text-sm text-center uppercase font-dm-sans font-medium",children:"Payment details"})]}),(0,r.jsx)("div",{className:"mx-auto mt-2 mb-6 border-t"}),(0,r.jsx)(o.lV,{...h,children:(0,r.jsxs)("form",{onSubmit:h.handleSubmit(function(e){b({onSuccess:j})}),className:"mx-auto space-y-4",children:[(0,r.jsx)(o.zB,{control:h.control,name:"firstname",render:e=>{let{field:t}=e;return(0,r.jsxs)(o.eI,{className:"space-y-0.5",children:[(0,r.jsx)(o.lR,{className:"text-sm",children:"First name"}),(0,r.jsx)(o.MJ,{children:(0,r.jsx)(d.p,{className:"placeholder:text-sm",placeholder:"First name",...t})}),(0,r.jsx)(o.C5,{})]})}}),(0,r.jsx)(o.zB,{control:h.control,name:"lastname",render:e=>{let{field:t}=e;return(0,r.jsxs)(o.eI,{className:"space-y-0.5",children:[(0,r.jsx)(o.lR,{className:"text-sm",children:"Last name"}),(0,r.jsx)(o.MJ,{children:(0,r.jsx)(d.p,{className:"placeholder:text-sm",placeholder:"Last name",...t})}),(0,r.jsx)(o.C5,{})]})}}),(0,r.jsx)(o.zB,{control:h.control,name:"email",render:e=>{let{field:t}=e;return(0,r.jsxs)(o.eI,{className:"space-y-0.5",children:[(0,r.jsx)(o.lR,{className:"text-sm",children:"Email"}),(0,r.jsx)(o.MJ,{children:(0,r.jsx)(d.p,{className:"placeholder:text-sm",placeholder:"Email",type:"email",...t})}),(0,r.jsx)(o.C5,{})]})}}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(l.$,{type:"submit",size:"sm",disabled:!h.formState.isValid||!v,children:"Submit"})})]})})]})})}},801:(e,t,s)=>{s.d(t,{$:()=>d,r:()=>o});var r=s(2854),a=s(6710),n=s(7502),i=s(4281),l=s(9422);let o=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"h-10 px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=a.forwardRef((e,t)=>{let{className:s,variant:a,size:i,asChild:d=!1,...c}=e,m=d?n.DX:"button";return(0,r.jsx)(m,{className:(0,l.cn)(o({variant:a,size:i,className:s})),ref:t,...c})});d.displayName="Button"},7923:(e,t,s)=>{s.d(t,{C5:()=>v,MJ:()=>h,eI:()=>p,lR:()=>x,lV:()=>d,zB:()=>m});var r=s(2854),a=s(6710),n=s(7502),i=s(9864),l=s(9422),o=s(461);let d=i.Op,c=a.createContext({}),m=e=>{let{...t}=e;return(0,r.jsx)(c.Provider,{value:{name:t.name},children:(0,r.jsx)(i.xI,{...t})})},u=()=>{let e=a.useContext(c),t=a.useContext(f),{getFieldState:s,formState:r}=(0,i.xW)(),n=s(e.name,r);if(!e)throw Error("useFormField should be used within <FormField>");let{id:l}=t;return{id:l,name:e.name,formItemId:"".concat(l,"-form-item"),formDescriptionId:"".concat(l,"-form-item-description"),formMessageId:"".concat(l,"-form-item-message"),...n}},f=a.createContext({}),p=a.forwardRef((e,t)=>{let{className:s,...n}=e,i=a.useId();return(0,r.jsx)(f.Provider,{value:{id:i},children:(0,r.jsx)("div",{ref:t,className:(0,l.cn)("space-y-2",s),...n})})});p.displayName="FormItem";let x=a.forwardRef((e,t)=>
1{let{className:s,...a}=e,{error:n,formItemId:i}=u();return(0,r.jsx)(o.J,{ref:t,className:(0,l.cn)(n&&"text-destructive",s),htmlFor:i,...a})});x.displayName="FormLabel";let h=a.forwardRef((e,t)=>{let{...s}=e,{error:a,formItemId:i,formDescriptionId:l,formMessageId:o}=u();return(0,r.jsx)(n.DX,{ref:t,id:i,"aria-describedby":a?"".concat(l," ").concat(o):"".concat(l),"aria-invalid":!!a,...s})});h.displayName="FormControl",a.forwardRef((e,t)=>{let{className:s,...a}=e,{formDescriptionId:n}=u();return(0,r.jsx)("p",{ref:t,id:n,className:(0,l.cn)("text-[0.8rem] text-muted-foreground",s),...a})}).displayName="FormDescription";let v=a.forwardRef((e,t)=>{var s;let{className:a,children:n,...i}=e,{error:o,formMessageId:d}=u(),c=o?String(null!==(s=null==o?void 0:o.message)&&void 0!==s?s:""):n;return c?(0,r.jsx)("p",{ref:t,id:d,className:(0,l.cn)("text-[0.8rem] font-medium text-destructive",a),...i,children:c}):null});v.displayName="FormMessage"},7191:(e,t,s)=>{s.d(t,{p:()=>i});var r=s(2854),a=s(6710),n=s(9422);let i=a.forwardRef((e,t)=>{let{className:s,type:a,...i}=e;return(0,r.jsx)("input",{type:a,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:t,...i})});i.displayName="Input"},461:(e,t,s)=>{s.d(t,{J:()=>d});var r=s(2854),a=s(6710),n=s(1742),i=s(4281),l=s(9422);let o=(0,i.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.b,{ref:t,className:(0,l.cn)(o(),s),...a})});d.displayName=n.b.displayName},6510:(e,t,s)=>{s.d(t,{I:()=>i});var r=s(125),a=s(7341),n=s(6710);function i(){let{required:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{toast:t}=(0,r.dj)(),[s]=(0,a.ab)({firstname:a.tU,lastname:a.tU,email:a.tU,amount:a.GJ,space:a.tU,date:a.tU,reference:a.tU,dayPassAmount:a.GJ,weeklyPassAmount:a.GJ,membershipPassAmount:a.GJ,redirect:a.tU}
1),[i,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{l(!0)},[]),(0,n.useEffect)(()=>{i&&(null==e||e.forEach(e=>{let r=s[e];(!r||"string"==typeof r&&r.length<1)&&t({variant:"destructive",description:"".concat(e," is required.")})}))},[i,s]),s}},125:(e,t,s)=>{s.d(t,{dj:()=>u});var r=s(6710);let a=0,n=new Map,i=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},l=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],d={toasts:[]};function c(e){d=l(d,e),o.forEach(e=>{e(d)})}function m(e){let{...t}=e,s=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),r=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||r()}}}),{id:s,dismiss:r,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function u(){let[e,t]=r.useState(d);return r.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},9422:(e,t,s)=>{s.d(t,{cn:()=>n});var r=s(1729),a=s(5516);function n(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.QP)((0,r.$)(t))}}}]);
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.