1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5146],{9438:(e,l,t)=>{t.d(l,{A:()=>s});var a=t(96427);function n(){let e=(0,a._)(['\n query GET_BOOKING_DESTINATIONS_WITH_POLICY(\n $locale: LanguageCodeFilterEnum!\n $first: Int!\n $field: String = ""\n $secondLocale: String = ""\n ) {\n destinations(\n where: { language: $locale, parent: "0", orderby: { field: TITLE, order: ASC } }\n first: $first\n ) {\n edges {\n node {\n title\n id\n acfDestination {\n destinationSiteId\n }\n }\n }\n }\n generalSettings {\n optionsField(field: $field, locale: $secondLocale)\n }\n }\n']);return n=function(){return e},e}let s=(0,t(79350).J1)(n())},38293:(e,l,t)=>{t.d(l,{V:()=>r});var a=t(14232),n=t(39324),s=t.n(n);let r=()=>{let{publicRuntimeConfig:e}=s()(),l=e.GOOGLE_RECAPTCHA_SITEKEY;return{executeRecaptcha:(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"SUBMIT";return l?window.grecaptcha?new Promise(t=>{window.grecaptcha.ready(async()=>{try{let a=await window.grecaptcha.execute(l,{action:e});t(a)}catch(e){console.error("â reCAPTCHA: Execution error:",e),t(null)}})}):(console.error("â reCAPTCHA: Script not loaded. Check if the script tag is present in _document.tsx"),null):(console.error("â reCAPTCHA: Site key is missing from publicRuntimeConfig"),null)},[l])}}},38339:(e,l,t)=>{t.d(l,{A:()=>n});var a=t(37876);function n(e){let{state:l,setState:t,name:n,id:s,type:r,label:o,placeholder:i,error:d,onBlur:c,required:u=!1}=e;return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:r,id:s,name:n,className:"peer block w-full rounded-xl border-0 bg-white p-4 pb-2 pt-6 text-gray-900 placeholder-black shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 ".concat(d?"ring-2 ring-red-500":""),placeholder:i,required:u,autoCapitalize:"off",autoCorrect:"off",value:l[n]||"",onChange:e=>t({...l,[n]:e.target.value}),onBlur:c}),(0,a.jsx)("label",{htmlFor:n,className:"pointer-events-none absolute left-4 top-2 text-xs font-semibold text-gray-500 transition-all duration-200",children:o}),d&&(0,a.jsx)("p",{className:"mt-1 px-1 text-sm text-red-600",children:d})]})}t(14232)},95146:(e,l,t)=>{t.r(l),t.d(l,{default:()=>S});var a=t(37876),n=t(89099),s=t(14232),r=t(17218),o=t(68638),i=t(38549),d=t(9438),c=t(48230),u=t.n(c),m=t(56856),p=t(98069),h=t(40933),x=t(7117),b=t(48470),g=t(41286),v=t(13919),f=t(2775),N=t(93526),j=t(82197),y=t(38293),w=t(38339),C=t(95912),F=t(57555);(0,m.E)("sv",p.sv),(0,m.E)("da",h.da),(0,m.E)("nb",x.nb),(0,m.E)("de",b.de),(0,m.E)("en",g.b),(0,m.E)("nl",v.nl);let k=s.forwardRef((e,l)=>(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{ref:l,id:e.id,value:(null==e?void 0:e.date)?(0,f.GP)(e.date,"dd MMM",{locale:(e=>{switch(e){case"sv":return p.sv;case"en":return g.b;case"da":return h.da;case"de":return b.de;case"nl":return v.nl}})(e.locale)}):"",onClick:e.onClick,readOnly:!0,placeholder:e.placeholder,"aria-label":e.placeholder,"aria-required":"true",className:"peer block w-full cursor-pointer appearance-none rounded-xl border-0 bg-white p-4 pb-2 pt-6 text-gray-900 placeholder-black shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"}),(0,a.jsx)("label",{htmlFor:e.id,className:"pointer-events-none absolute left-4 top-2 text-xs font-semibold text-gray-500 transition-all duration-200",children:(e.date,e.placeholder)})]}));function S(e){var l,t,c,p,h,x,b,g,v,f,S,A,_,D,E,T,I,P,L,R,O,B;let{template:q,innerBlocks:M,message:$,renderBlocks:H,subject:z,receiver:G}=e,U=(0,n.useRouter)(),{executeRecaptcha:W}=(0,y.V)(),[J,K]=(0,s.useState)(!1),[V,Y]=(0,s.useState)(null),Q={destination:"",email:"",name:"",customerNumber:"",bookingNumber:"",hasAccepted:!1,startDate:new Date,honeypot:""}
1,[X,Z]=(0,s.useState)(Q),[ee,{data:el}]=(0,i._)(d.A,{variables:{locale:null==(l=U.locale)?void 0:l.toLocaleUpperCase(),first:100,field:"wp_page_for_privacy_policy",secondLocale:null==(t=U.locale)?void 0:t.toLocaleUpperCase()}}),et=async e=>{var l,t,a;if(e.preventDefault(),""!==X.honeypot.trim()){Y(null==$||null==(l=$.Form)?void 0:l.RequestSuccess),Z(Q);return}let n=await W("BONUSPOINTS");if(!n){K(!1),Y("Error: reCAPTCHA verification failed");return}let s=new FormData;s.append("formName","[".concat(Date.now(),"] - First Camp Bonus points")),s.append("data",JSON.stringify(X)),s.append("template",q),s.append("recaptchaToken",n),s.append("subject",z||"Bonuspo\xe4ng - First camp"),s.append("receiver",G||"[email protected]"),K(!0);let r=await fetch("/api/form",{body:s,method:"POST"});(null==r?void 0:r.status)&&(null==r?void 0:r.status)===200?(K(!1),Z(Q),Y(null==$||null==(t=$.Form)?void 0:t.RequestSuccess),(0,N.le)({event:"form_bonuspoints",name:"form_bonuspoints",category:"form",action:"submit",value:{block_form_name:"block_form_bonuspoints"}})):(K(!1),Y(null==$||null==(a=$.Form)?void 0:a.RequestError))};return(0,s.useEffect)(()=>{ee()},[ee]),(0,a.jsx)("div",{className:"alignfull bg-light-beige py-8",children:(0,a.jsxs)("div",{className:"mx-auto max-w-7xl px-0 lg:px-8",children:[!!(null==M?void 0:M.length)&&H(M,$),(0,a.jsxs)("form",{onSubmit:et,className:"mt-8",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute left-[-9999px] top-[-9999px] opacity-0",children:(0,a.jsx)("input",{type:"text",name:"website",placeholder:"L\xe4mna detta f\xe4lt tomt",value:X.honeypot,onChange:e=>Z({...X,honeypot:e.target.value}),tabIndex:-1,autoComplete:"off"})}),(0,a.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,a.jsx)("div",{className:"md:col-span-1",children:(0,a.jsx)(w.A,{state:X,setState:Z,name:"name",type:"text",id:"name",placeholder:"".concat(null==$||null==(c=$.Form)?void 0:c.NamePlaceholder," *"),label:null==$||null==(p=$.Form)?void 0:p.Name,required:!0})}),(0,a.jsx)("div",{className:"md:col-span-1",children:(0,a.jsx)(w.A,{state:X,setState:Z,name:"customerNumber",type:"text",id:"customerNumber",placeholder:null==$||null==(h=$.Form)?void 0:h.CustomerNumberPlaceholder,label:null==$||null==(x=$.Form)?void 0:x.CustomerNumber})})]}),(0,a.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:(0,a.jsx)("div",{className:"md:col-span-2",children:(0,a.jsx)(w.A,{state:X,setState:Z,name:"email",type:"email",id:"email",placeholder:"".concat(null==$||null==(b=$.Form)?void 0:b.EmailPlaceholder," *"),label:null==$||null==(g=$.Form)?void 0:g.Email,required:!0})})}),(0,a.jsx)("h2",{className:"mb-5 text-2xl",children:null==$||null==(v=$.Form)?void 0:v.DesiredDestination}),(0,a.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(r.WF,{value:X.destination,onChange:e=>{Z({...X,destination:e.title})},children:(0,a.jsxs)("div",{className:"relative mt-1",children:[(0,a.jsxs)(r.go,{className:"peer relative w-full cursor-default rounded-xl bg-white p-4 pb-2 pr-10 pt-6 text-left shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 sm:text-sm",children:[(0,a.jsx)("span",{className:"block truncate text-base text-gray-900",children:(null==(f=X.destination)?void 0:f.replace("First Camp",""))||"".concat(null==$||null==(S=$.Form)?void 0:S.DesiredDestination," *")}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})})]}),(0,a.jsxs)("label",{className:"pointer-events-none absolute left-4 top-2 text-xs font-semibold text-gray-500 transition-all duration-200",children:[null==$||null==(A=$.Form)?void 0:A.DesiredDestination," *"]}),(0,a.jsx)(o.e,{as:s.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(r.wh,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-lg bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:null==el||null==(_=el.destinations)?void 0:_.edges.map(e=>(0,a.jsx)(r.h7,{value:e.node,className:e=>{let{focus:l}=e;return"relative cursor-default select-none py-2 pl-10 pr-4 ".concat(l?"bg-red-100 text-red-900":"text-gray-900")},children:l=>{let{selected:t}=l;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"block truncate ".concat(t?"font-medium":"font-normal"),children:e.node.title.replace("First Camp ","")}),t&&(0,a.jsx)("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-red-600",children:(0,a.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})})]})}},e.node.id))})})]})})}),(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(m.Ay,{renderCustomHeader:e=>{let{monthDate:l,decreaseMonth:t,increaseMonth:n}=e;return(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("button",{type:"button","aria-label":"F\xf6reg\xe5ende m\xe5nad",onClick:t,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:(0,a.jsx)(C.A,{className:"size-5"})}),(0,a.jsx)("span",{className:"react-datepicker__current-month flex-1",children:l.toLocaleStr
1ing("en-US",{month:"long",year:"numeric"})}),(0,a.jsx)("button",{type:"button","aria-label":"N\xe4sta m\xe5nad",onClick:n,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:(0,a.jsx)(F.A,{className:"size-5"})})]})},placeholderText:null==$||null==(D=$.Form)?void 0:D.CheckIn,showWeekNumbers:!0,onChange:e=>{Z({...X,startDate:e})},monthsShown:2,calendarStartDay:1,dateFormat:"dd MMM",selected:null==X?void 0:X.startDate,customInput:(0,a.jsx)(k,{locale:U.locale,date:null==X?void 0:X.startDate,id:"checkin-input",placeholder:null==$||null==(E=$.Form)?void 0:E.CheckIn}),startDate:null==X?void 0:X.startDate,popperPlacement:"bottom"})})]}),(0,a.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:(0,a.jsx)("div",{className:"md:col-span-2",children:(0,a.jsx)(w.A,{state:X,setState:Z,name:"bookingNumber",type:"text",id:"booking-number",placeholder:"".concat(null==$||null==(T=$.Form)?void 0:T.BookingNumberPlaceholder," *"),label:null==$||null==(I=$.Form)?void 0:I.BookingNumber,required:!0})})}),(0,a.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:(0,a.jsxs)("div",{className:"md:col-span-1",children:[(0,a.jsx)("input",{type:"checkbox",id:"accepted",checked:X.hasAccepted,onChange:()=>{Z({...X,hasAccepted:!X.hasAccepted})},className:"mr-4 rounded-lg border-[#DFDFDF] p-3 text-red-600 focus:ring-2 focus:ring-red-700"}),(0,a.jsxs)("label",{htmlFor:"accepted",children:[null==$||null==(P=$.Form)?void 0:P.AcceptedTerms,(null==el||null==(L=el.generalSettings)?void 0:L.optionsField)&&(0,a.jsx)(u(),{className:"text-red-600",href:null==el||null==(R=el.generalSettings)?void 0:R.optionsField,children:" ".concat(null==$||null==(O=$.Form)?void 0:O.terms)})]})]})}),(0,a.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:(0,a.jsxs)("div",{className:"flex md:col-span-1",children:[(0,a.jsx)("button",{disabled:J||!X.name||!X.email||!X.destination||!X.startDate||!X.bookingNumber||!X.hasAccepted,type:"submit",className:"rounded-lg bg-red-600 px-16 py-4 uppercase text-white hover:bg-red-800 focus:bg-red-800 disabled:bg-red-400",children:null==$||null==(B=$.Form)?void 0:B.Submit}),J&&(0,a.jsx)("div",{className:"ml-4 flex",children:(0,a.jsx)(j.A,{})})]})}),V&&(0,a.jsx)("h4",{className:"mt-4 text-lg",children:V})]})]})})}}}]);
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.