1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7937],{1805:(e,l,t)=>{t.d(l,{A:()=>o});var r=t(7876);t(4232);var n=t(5039),a=t.n(n);let o=e=>{let{checked:l,value:t,text:n,onChange:o,name:s,error:i,cm:c}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:a()("custom-checkbox",i&&"error"),children:[(0,r.jsx)("input",{type:"checkbox",name:s,checked:void 0!==l?l:!!t,onChange:o}),(0,r.jsx)("div",{className:a()("body-small text-black100",i&&"text-danger"),children:n}),(0,r.jsx)("span",{className:a()(c,"checkmark")})]}),i&&(0,r.jsx)("p",{className:"body-small text-danger block text-start mt-1 pl-6",children:i})]})}},7937:(e,l,t)=>{t.r(l),t.d(l,{default:()=>C});var r=t(7876),n=t(4232),a=t(8992),o=t(1768),s=t(3378),i=t(9029),c=t(5039),d=t.n(c);let u=e=>{let{id:l,name:t,value:n,onChange:a,label:o,placeholder:s,subLabel:i,options:c=[],error:u,className:x,...p}=e;return(0,r.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[o&&""!==o.trim()&&(0,r.jsx)("label",{className:"text-[12px] leading-[15px] text-black uppercase tracking-[0.05em] font-lexend font-light",children:o}),(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsxs)("select",{id:l,name:t,value:n||"",onChange:e=>a(e.target.value),style:{backgroundColor:"transparent"},className:d()("w-full h-[32px] !bg-transparent border-0 border-b border-black/20 focus:border-black text-[14px] font-noir focus:outline-none transition-colors appearance-none pr-8 cursor-pointer rounded-none",n?"text-black":"text-grey",u&&"border-danger focus:border-danger",x),...p,children:[s&&(0,r.jsx)("option",{value:"",disabled:!0,className:"text-grey",children:s}),c.map((e,l)=>(0,r.jsx)("option",{value:e.value||e,className:"text-black bg-white",children:e.label||e.title||e.value||e},l))]}),(0,r.jsx)("div",{className:"absolute right-2 bottom-3 pointer-events-none text-black/50",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})})]}),i&&(0,r.jsx)("p",{className:"text-[11px] leading-[14px] text-grey/80 text-start font-noir",children:i}),u&&(0,r.jsx)("p",{className:"body-small text-danger text-start",children:u})]})};var x=t(9701),p=t(1805);let b=(e,l)=>(null==e?void 0:e.name)||"field-".concat(l),m=e=>!["control_head","control_button","control_divider"].includes(null==e?void 0:e.type),h=e=>!["control_button"].includes(null==e?void 0:e.type),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,l)=>{if(!m(l))return e;let t=null==l?void 0:l.name;return t&&(e[t]=(null==l?void 0:l.defaultValue)||""),e},{})},f=e=>(null==e?void 0:e.type)==="control_email"?"email":(null==e?void 0:e.type)==="control_phone"?"tel":(null==e?void 0:e.type)==="control_datetime"?"date":(null==e?void 0:e.type)==="control_number"?"number":"text",g=e=>!!(null==e?void 0:e.required)&&"Please enter a ".concat(null==e?void 0:e.label),j=e=>"".concat(null==e?void 0:e.label).concat((null==e?void 0:e.required)?" *":""),k=e=>{let[l,t]=(0,n.useState)([]),[r,a]=(0,n.useState)(!1),[o,s]=(0,n.useState)("");return(0,n.useEffect)(()=>{let l=new AbortController;return(async()=>{if(!e){t([]),a(!1);return}a(!0),s("");try{let r=new URLSearchParams({jotformUrl:e}),n=await fetch("/api/jotform/questions?".concat(r.toString()),{signal:l.signal});if(!n.ok)throw Error("HTTP ".concat(n.status));let a=await n.json();t(Array.isArray(null==a?void 0:a.questions)?a.questions:[])}catch(e){"AbortError"!==e.name&&(s(e.message||"Failed to load questions."),t([]))}finally{a(!1)}})(),()=>l.abort()},[e]),{questions:l,isLoading:r,error:o}},y=()=>{let[e,l]=(0,n.useState)(!1),[t,r]=(0,n.useState)("");return{submit:(0,n.useCallback)(async(e,t)=>{if(!e)throw Error("Jotform URL is required.");l(!0),r("");try{let l=await fetch("/api/jotform/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jotformUrl:e,values:t})}),r=await l.json();if(!l.ok||!(null==r?void 0:r.ok))throw Error((null==r?void 0:r.error)||"HTTP ".concat(l.status));return r}catch(e){throw r(e.message||"Failed to submit form."),e}finally{l(!1)}},[]),isSubmitting:e,error:t}};var N=t(2116),w=t(3329);let _=(e,l)=>{if(!e)return"";let t=e.match(/\{([^}]+)\}/);if(t){let n=t[1],a=e.split(/\{[^}]+\}/),o=l||"#";return o&&!/^https?:\/\//i.test(o)&&"#"!==o&&(o="https://".concat(o)),(0,r.jsxs)("span",{children:[a[0],(0,r.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"underline",children:n}),a[1]]})}return e},C=e=>{var l;let{data:t={}}=e,{vertical_space:c}
1=t,[m,C]=(0,n.useState)(!1),{questions:q,isLoading:A,error:S}=k(null==t?void 0:t.jotformUrl),{submit:T,isSubmitting:L,error:I}=y(),E=(0,n.useMemo)(()=>v(q),[q]);(0,n.useMemo)(()=>q.some(e=>(null==e?void 0:e.type)==="control_head"),[q]);let{control:O,handleSubmit:P,reset:U,setValue:D,watch:H,formState:{errors:R}}=(0,a.mN)({defaultValues:E});(0,n.useEffect)(()=>{U(E)},[E,U]);let B=S||I,F=(e,l)=>{var t,n;if(!h(e))return null;let o=b(e,l),s=null==R||null==(t=R[o])?void 0:t.message;if((null==e?void 0:e.type)==="control_head")return 0===l?null:(0,r.jsx)("p",{className:"title-mobile tablet:text-subtitle uppercase tablet:col-span-2 pb-2 border-b border-black/20 mt-8 mb-6",children:e.text||e.label},e.id||o);if((null==e?void 0:e.type)==="control_divider")return null;if((null==e?void 0:e.type)==="control_dropdown"){let l=e.options||[];return(0,r.jsx)("div",{className:d()("w-full",{"tablet:col-span-1":null==e?void 0:e.shrink,"tablet:col-span-2":!(null==e?void 0:e.shrink)}),children:(0,r.jsx)(a.xI,{control:O,name:o,rules:{required:null!=e&&!!e.required&&"Please enter a ".concat(null==e?void 0:e.label)},render:t=>{let{field:{onChange:n,value:a}}=t;return(0,r.jsx)(u,{options:l,value:a,label:j(e),placeholder:(null==e?void 0:e.hint)||"Please select",subLabel:null==e?void 0:e.subLabel,onChange:n,error:!!s})}})},e.id||o)}if((null==e?void 0:e.type)==="control_textarea")return(0,r.jsx)("div",{className:d()("w-full",{"tablet:col-span-1":null==e?void 0:e.shrink,"tablet:col-span-2":!(null==e?void 0:e.shrink)}),children:(0,r.jsx)(a.xI,{control:O,name:o,rules:{required:g(e)},render:l=>{let{field:{onChange:t,value:n,...a}}=l;return(0,r.jsx)(x.A,{...a,label:j(e),placeholder:(null==e?void 0:e.hint)||"",subLabel:null==e?void 0:e.subLabel,className:"w-full",onChange:t,value:n||"",error:s})}})},e.id||o);if((null==e?void 0:e.type)==="control_widget"&&(null==e?void 0:e.cfname)==="Terms & Conditions"){let l=_(e.termsText||e.label,e.termsLink);return(0,r.jsx)("div",{className:d()("w-full",{"tablet:col-span-1":null==e?void 0:e.shrink,"tablet:col-span-2":!(null==e?void 0:e.shrink)}),children:(0,r.jsx)(a.xI,{control:O,name:o,rules:{required:null!=e&&!!e.required&&"Please accept the terms and conditions"},render:e=>{let{field:{onChange:t,value:n}}=e;return(0,r.jsx)(p.A,{name:o,checked:!!n,text:l,onChange:e=>t(e.target.checked),error:s})}})},e.id||o)}if((null==e?void 0:e.type)==="control_checkbox"){let l=(null==(n=(e.options||[])[0])?void 0:n.title)||e.label;return(0,r.jsx)("div",{className:d()("w-full",{"tablet:col-span-1":null==e?void 0:e.shrink,"tablet:col-span-2":!(null==e?void 0:e.shrink)}),children:(0,r.jsx)(a.xI,{control:O,name:o,rules:{required:null!=e&&!!e.required&&"Please check this box"},render:e=>{let{field:{onChange:t,value:n}}=e;return(0,r.jsx)(p.A,{name:o,checked:!!n,text:l,onChange:e=>t(e.target.checked),error:s})}})},e.id||o)}return(0,r.jsx)("div",{className:d()("w-full",{"tablet:col-span-1":null==e?void 0:e.shrink,"tablet:col-span-2":!(null==e?void 0:e.shrink)}),children:(0,r.jsx)(a.xI,{control:O,name:o,rules:{required:g(e)},render:l=>{let{field:{onChange:t,value:n,...a}}=l;return(0,r.jsx)(i.A,{...a,label:j(e),placeholder:(null==e?void 0:e.hint)||"",subLabel:null==e?void 0:e.subLabel,type:f(e),className:"w-full",onChange:t,value:n||"",error:s})}})},e.id||o)},M=async e=>{let l={...e};q.forEach((t,r)=>{let n=b(t,r);if("control_widget"===t.type&&"Terms & Conditions"===t.cfname)l[n]=e[n]?"Accepted":"";else if("control_checkbox"===t.type){var a,o,s,i;let r=(null==(o=t.options)||null==(a=o[0])?void 0:a.value)||(null==(i=t.options)||null==(s=i[0])?void 0:s.title)||"Yes";l[n]=e[n]?r:""}});try{var r,n,a,o;let e=await T(t.jotformUrl,l),s=(null==e||null==(n=e.result)||null==(r=n.content)?void 0:r.submissionID)||(null==e||null==(a=e.result)?void 0:a.submissionID)||(null==e||null==(o=e.content)?void 0:o.submissionID)||(null==e?void 0:e.submissionID);(0,w._D)({event:"form-request-submitted",requestId:s,formType:"jotform"}),C(!0),U(E)}catch(e){}};return(0,r.jsx)(N.A,{vs:c,id:null==t?void 0:t.anchorId,children:(0,r.jsx)("div",{className:"flex flex-col w-full tablet:w-auto tablet:container tablet:flex-col laptop:flex-row-reverse tablet:items-center lg-laptop:px-0 desktop:px-0 desktop:w-full tablet:justify-center desktop:justify-center",children:(0,r.jsx)("div",{className:"px-6 py-[12px] w-full h-auto bg-brown-dark lg-laptop:max-w-[870px] tablet:space-x-4",children:(0,r.jsx)("div",{className:"waitlist-form container bg-brown-dark border-0 tablet:border-2 border-white px-2 tablet:px-12 py-12",children:m?(0,r.jsx)("h5",{className:"contact-us-form-success contact-us-page",children:(null==t?void 0:t.submitSuccessText)||"THANK YOU FOR GETTING IN TOUCH. YOUâLL HEAR FROM US SOON."}):(0,r.jsxs)("div",{className:"w-full",children:[(null==t?void 0:t.t
1itle)?(0,r.jsx)("p",{className:d()("h2 uppercase text-center max-w-[600px] mx-auto",(null==t?void 0:t.text)?"mb-4":"mb-[40px]"),children:t.title}):null,(null==t?void 0:t.text)&&(0,r.jsx)("div",{className:"mb-[40px] text-center",children:(0,r.jsx)(s.A,{data:t.text})}),B?(0,r.jsx)("p",{className:"text-danger",children:B}):null,A||B||!(q.length>0)?null:(0,r.jsxs)("form",{onSubmit:P(M),className:"space-y-8",children:[(0,r.jsx)("div",{className:"grid grid-cols-1 tablet:grid-cols-2 gap-x-8 gap-y-4 tablet:gap-y-8 w-full items-end",children:q.map((e,l)=>F(e,l))}),(0,r.jsx)(o.A,{className:"btn btn-thredary mt-8 min-w-[200px] uppercase",type:"submit",disabled:L,text:(null==(l=q.find(e=>(null==e?void 0:e.type)==="control_button"))?void 0:l.label)||(null==t?void 0:t.submitButtonLabel)||"Send"})]}),A||B||0!==q.length?null:(0,r.jsx)("p",{className:"text-white",children:"No questions found for this form."})]})})})})})}},9029:(e,l,t)=>{t.d(l,{A:()=>o});var r=t(7876);t(4232);var n=t(5039),a=t.n(n);let o=e=>{let{id:l,name:t,value:n,onChange:o,label:s,placeholder:i,subLabel:c,error:d,onBlur:u,type:x="text",className:p,prefix:b,...m}=e;return(0,r.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[s&&""!==s.trim()&&(0,r.jsx)("label",{className:"text-[12px] leading-[15px] text-black uppercase tracking-[0.05em] font-lexend font-light",children:s}),(0,r.jsxs)("div",{className:"relative w-full flex items-center",children:[b&&(0,r.jsx)("span",{className:"absolute left-0 bottom-2 text-[14px] font-noir text-black select-none pointer-events-none",children:b}),(0,r.jsx)("input",{type:x,id:l,name:t,value:n,onChange:o,placeholder:i,onBlur:u,style:{backgroundColor:"transparent"},className:a()("w-full h-[32px] !bg-transparent border-0 border-b border-black/20 focus:border-black pb-2 text-[14px] font-noir text-black placeholder-grey focus:outline-none transition-colors rounded-none",b&&"!pl-4",d&&"border-danger focus:border-danger",p),...m})]}),c&&(0,r.jsx)("p",{className:"text-[11px] leading-[14px] text-grey/80 text-start font-noir",children:c}),d&&(0,r.jsx)("p",{className:"body-small text-danger text-start",children:d})]})}},9701:(e,l,t)=>{t.d(l,{A:()=>o});var r=t(7876);t(4232);var n=t(5039),a=t.n(n);let o=e=>{let{id:l,name:t,value:n,onChange:o,label:s,placeholder:i,subLabel:c,error:d,onBlur:u,className:x,...p}=e;return(0,r.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[s&&""!==s.trim()&&(0,r.jsx)("label",{className:"text-[12px] leading-[15px] text-black uppercase tracking-[0.05em] font-lexend font-light",children:s}),(0,r.jsx)("textarea",{id:l,name:t,value:n,onChange:o,placeholder:i,onBlur:u,style:{backgroundColor:"transparent"},className:a()("w-full !bg-transparent border-0 border-b border-black/20 focus:border-black pb-2 text-[14px] font-noir text-black placeholder-grey focus:outline-none transition-colors min-h-[80px] resize-y rounded-none",d&&"border-danger focus:border-danger",x),...p}),c&&(0,r.jsx)("p",{className:"text-[11px] leading-[14px] text-grey/80 text-start font-noir",children:c}),d&&(0,r.jsx)("p",{className:"body-small text-danger text-start",children:d})]})}}}]);
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.