1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2762,8515,9779],{62826:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[site]/bestill",function(){return t(52906)}])},56034:function(e,s,t){"use strict";var r=t(85893),a=t(67294),n=t(2459),i=t(50912),l=t(19050),o=t(73699),d=t(74619),c=t(93967),m=t.n(c),u=t(78515);s.Z=e=>{let{children:s,className:t,checked:c,isInflatedSizes:h=!1}=e,p=(0,a.useRef)(),{isFocusVisible:g,focusProps:f}=(0,n.F)(),{labelProps:b,fieldProps:x}=(0,i.N)(e),v=(0,d.l)(e),{isSelected:y}=v,{inputProps:j,errorMessageProps:k}=(0,l.O)(e,v,p);return(0,a.useEffect)(()=>{c&&v.setSelected(c)},[c]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("label",{className:m()("flex items-center text-primary",{"border-b-[1px] border-system-error":!!e.errorMessage},t),...b,children:[(0,r.jsx)(o.T,{children:(0,r.jsx)("input",{...j,...f,...x,ref:p})}),(0,r.jsx)("span",{className:m()("inline-block",{"mr-2 h-7 w-7":!h,"mr-4 h-12 w-12 pt-2":h}),"aria-hidden":"true",children:(0,r.jsx)(u.default,{isFocusVisible:g,isSelected:y})}),s]}),e.errorMessage&&(0,r.jsx)("div",{role:"region","aria-live":"polite",...k,className:"text-system-error",children:e.errorMessage})]})}},32493:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});var r=t(85893);function a(e){let{message:s,className:t=""}=e;return s?(0,r.jsx)("p",{role:"alert","aria-live":"assertive","aria-atomic":"true",className:"my-4 text-system-error ".concat(t),children:s}):null}t(67294)},15279:function(e,s,t){"use strict";var r=t(85893),a=t(67294),n=t(93967),i=t.n(n),l=t(83666),o=t(69694);let d=e=>{let{description:s,errorMessage:t,className:n,...o}=e,d=(0,a.useRef)(),{labelProps:c,inputProps:m,descriptionProps:u,errorMessageProps:h}=(0,l.h)(o,d);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("label",{...c,className:i()("block py-4",{"mb-2":!s,"py-0 !text-lg font-bold":o.webshopStyle}),children:o.label}),s&&(0,r.jsx)("div",{id:u.id,className:"mb-2 text-lg",children:s}),(0,r.jsx)("textarea",{...m,ref:d,className:i()("block px-4 py-3 text-lg",{"bg-system-grey":"grey"===o.background||!o.background,"bg-system-white":"white"===o.background||o.webshopStyle,"!py-2":2===o.ypadding||o.webshopStyle},n),rows:8}),s&&(0,r.jsx)("div",{...u,children:s}),t&&(0,r.jsx)("div",{role:"region","aria-live":"polite",...h,className:"text-system-error",children:t})]})};d.propTypes=o.Z,s.Z=d},1193:function(e,s,t){"use strict";var r=t(85893),a=t(67294),n=t(93967),i=t.n(n),l=t(83666),o=t(69694);let d=e=>{let{description:s,errorMessage:t,className:n,...o}=e,d=(0,a.useRef)(),{labelProps:c,inputProps:m,descriptionProps:u,errorMessageProps:h}=(0,l.h)(o,d);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("label",{...c,className:i()("block text-xl font-bold",{"mb-2":!s,"!text-lg":o.webshopStyle}),children:o.label}),s&&(0,r.jsx)("div",{id:u.id,className:i()("mb-2 text-lg",{"!text-base":o.webshopStyle}),children:s}),(0,r.jsx)("input",{...m,ref:d,...s?{"aria-describedby":u.id}:{},...t?{"aria-controls":h.id}:{},value:o.defaultValue,className:i()("px-4 py-3 text-lg disabled:bg-system-grey disabled:text-system-black/80",{"border-system-error":!!t,"bg-system-white":"white"===o.background||o.webshopStyle,"bg-system-grey":"grey"===o.background||!o.background,"!py-2":2===o.ypadding||o.webshopStyle},n)}),t&&(0,r.jsx)("div",{role:"region","aria-live":"polite",...h,className:"text-system-error",children:t})]})};d.propTypes=o.Z,s.Z=d},78515:function(e,s,t){"use strict";t.r(s);var r=t(85893);t(67294),s.default=function(e){let{width:s="24",height:t="24",isSelected:a,isFocusVisible:n}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(s," ").concat(t),width:"100%",fill:"none",children:[(0,r.jsx)("rect",{x:a?4:5,y:a?4:5,width:a?16:14,height:a?16:14,fill:"none",stroke:"black",strokeWidth:1}),a&&(0,r.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",fill:"currentColor"}),n&&(0,r.jsx)("rect",{x:1,y:1,width:22,height:22,fill:"none",stroke:"#2563eb",strokeWidth:2})]})}},99779:function(e,s,t){"use strict";t.r(s);var r=t(85893);t(67294),s.default=function(e){let{width:s="50",height:t="50",isSelected:a}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(s," ").concat(t),width:"100%",fill:"none","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"2",y:"2",width:"44",height:"44",rx:"23",fill:"var(--main-background)"}),(0,r.jsx)("rect",{x:"10",y:"10",width:"30",height:"30",rx:"19",fill:"
1currentColor"}),(0,r.jsx)("rect",{x:a?"2":"3",y:a?"2":"3",width:a?"46":"44",height:a?"46":"44",rx:"23",stroke:a?"#2563eb":"var(--main-text)",strokeWidth:a?"4":"2"})]})}},82531:function(e,s,t){"use strict";var r=t(85893);t(67294);var a=t(62830),n=t.n(a),i=t(73699),l=t(35129),o=t(87641),d=t(24550);s.Z=e=>{let{breadcrumbs:s=[],className:t}=e;return(0,r.jsx)("nav",{"aria-label":"Br\xf8dtekst","aria-describedby":"breadcrumb-label",...t?{className:t}:{},children:(0,r.jsxs)("ol",{children:[(0,r.jsx)("li",{id:"breadcrumb-label",className:"inline-block",children:(0,r.jsx)(i.T,{children:"Du er her"})}),s.map((e,t)=>{let{name:a,item:i}=e,c=Object.keys(s).length===t+1;return(0,r.jsx)("li",{className:"inline-block",children:c?(0,r.jsx)(d.Z,{renderAs:"span",className:"font-bold",children:a}):(0,r.jsx)(o.Z,{linkTo:{pathname:(0,l.Z)(i)},children:(0,r.jsx)(d.Z,{renderAs:"span",className:'after:decoration-tranparent after:mx-2 after:content-[">"] hover:underline',children:a})})},n()())})]})})}},11151:function(e,s,t){"use strict";t.d(s,{E:function(){return h},Y:function(){return p}});var r=t(85893),a=t(67294),n=t(90277),i=t(7572),l=t(10888),o=t(73699),d=t(2459),c=t(99779),m=t(96277);let u=a.createContext(null),h=e=>{let{children:s,label:t,className:a}=e,i=(0,l.w)(e),{radioGroupProps:o,labelProps:d}=(0,n.a)(e,i);return(0,r.jsxs)("div",{...o,...a?{className:a}:{},children:[(0,r.jsx)("span",{...d,className:"mb-4 block text-2xl font-bold",children:t}),(0,r.jsx)(u.Provider,{value:i,children:s})]})},p=e=>{let{checked:s,children:t}=e,n=a.useContext(u),l=a.useRef(null),{inputProps:h}=(0,i.x)(e,n,l),{isFocusVisible:p,focusProps:g}=(0,d.F)(),f=(0,m.Xy)(n.selectedValue,e.value);return(0,a.useEffect)(()=>{let{value:e}=h;s&&e&&n.setSelectedValue(e)},[]),(0,r.jsxs)("label",{className:"mb-4 flex cursor-pointer items-center",children:[(0,r.jsx)(o.T,{children:(0,r.jsx)("input",{...h,...g,ref:l,...s?{checked:"checked"}:{}})}),(0,r.jsx)("span",{className:"mr-2 inline-block h-6 w-6".concat(f?" text-primary":" text-main-background"),children:(0,r.jsx)(c.default,{isSelected:p})}),t]})}},69694:function(e,s,t){"use strict";var r=t(45697),a=t.n(r);s.Z=()=>({description:a().string,errorMessage:a().string,className:a().string})},66891:function(e,s,t){"use strict";t.d(s,{W:function(){return n}});let r="Noe gikk galt under innsendingen.";class a extends Error{constructor(e,s){super(e),this.validationErrors=s}}async function n(e){let{endpoints:s,craftFormData:t,proptlyFormData:n,timeoutMs:i=3e4}=e,l=new AbortController,o=setTimeout(()=>l.abort(),i);try{let[e,i]=await Promise.all([fetch(s.craft,{method:"POST",body:t,signal:l.signal}).then(async e=>{if(!e.ok){let s=await e.json().catch(()=>({}));throw new a("Craft submission failed",null==s?void 0:s.validationErrors)}return e.json()}),fetch(s.proptly,{method:"POST",body:n,signal:l.signal}).then(e=>e.json())]);if(!i||"ok"!==i.status||!i.orderId)return console.warn("submitLeadOrder: proptly returned without orderId",i),{ok:!1,message:r};return{ok:!0,craftResult:e,proptlyResult:i}}catch(e){var d;if(l.signal.aborted)return console.error("submitLeadOrder: timed out after",i,"ms"),{ok:!1,message:"Innsendingen tok for lang tid. Sjekk forbindelsen og pr\xf8v igjen."};if(console.error("submitLeadOrder: submission failed",e),e instanceof a&&(null===(d=e.validationErrors)||void 0===d?void 0:d.length))return{ok:!1,message:e.validationErrors.join(" ")};return{ok:!1,message:r}}finally{clearTimeout(o)}}},61841:function(e,s,t){"use strict";async function r(e){return e.size<838860.8?e:a(e,{limits:{width:1280,height:1280},quality:2})}async function a(e,s){return new Promise((t,r)=>{let a=new FileReader;a.readAsDataURL(e),a.onload=r=>{if("string"!=typeof r.target.result)throw Error("File is not delivered as string");let a=new Image;a.src=r.target.result,a.onload=async()=>t(new File([await function(e,s){let t=document.createElement("canvas");return t.width=n(e,{limits:s.limits}).width,t.height=n(e,{limits:s.limits}).height,t.getContext("2d").drawImage(e,0,0,n(e,{limits:s.limits}).width,n(e,{limits:s.limits}).height),new Promise((e,r)=>{t.toBlob(s=>e(s),"image/jpeg",s.quality)})}(a,s)],"compressed--".concat(e.name)))},a.onerror=r})}
1function n(e,s){return e.width>e.height&&e.width>s.limits.width?{width:s.limits.width,height:e.height*s.limits.width/e.width}:e.height>s.limits.height?{width:e.width*s.limits.height/e.height,height:s.limits.height}:{width:e.width,height:e.height}}t.d(s,{l:function(){return r}})},57371:function(e,s,t){"use strict";t.d(s,{Mj:function(){return n},Y0:function(){return a},eR:function(){return i},oH:function(){return r}});let r=e=>e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),a=e=>e.replace(/[\s\-]/g,"").match(/^(?:(?:\+|00)47)?[2-9]\d{7}$/),n=e=>/^[a-zA-ZåæøÃ
ÃÃ0-9 ,.-]*$/.test(e),i=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=arguments.length>2?arguments[2]:void 0,r="";return"string"==typeof e&&(e.length<s&&(r+="minst ".concat(s," tegn")),t&&e.length>t&&(""!==r&&(r+=" og "),r+="maksimalt ".concat(t," tegn")),""!==r)?{message:"Du m\xe5 skrive inn ".concat(r,".")}:{message:null}}},69852:function(e,s,t){"use strict";t.d(s,{Z:function(){return g}});var r=t(85893),a=t(93967),n=t.n(a),i=t(70375),l=t(37308),o=t(96277),d=t(33934),c=t(88238),m=t(39332),u=t(67294);async function h(e){let s=e.replace(/[^0-9a-zæøåäöüé]/gi," ").replace(/\s+/g," ").trim(),t=new URLSearchParams({sok:"".concat(s,"*"),objtype:"Vegadresse",treffPerSide:"10"}).toString(),r="".concat("https://ws.geonorge.no/adresser/v1","/sok?").concat(t),a=await fetch(r);return[...(await a.json()).adresser].sort((e,s)=>e.adressenavn<s.adressenavn?-1:e.adressenavn>s.adressenavn?1:Number(e.nummer)-Number(s.nummer))}var p=t(93379);function g(e){var s,t,a,g,f;let[b,x]=(0,u.useState)(""),v=(0,c.Nr)(b,300),[y,j]=(0,u.useState)(null),k=(0,m.useRouter)(),w=(0,u.useId)(),N=(0,u.useRef)(null),S=(0,d.a)({queryKey:["addressSearch",v],queryFn:()=>h(v),staleTime:1/0,refetchOnMount:!0,refetchOnWindowFocus:!0,retry:!1,enabled:!!v,placeholderData:e=>e}),Z=e.isLoading||S.isFetching||v!==b,I=v&&!Z&&(0,o.xb)(S.data),O="";return!Z&&I&&(O="Vi fant ingen treff p\xe5 denne adressen"),S.isError&&(O="Vi har for \xf8yeblikket problemer med \xe5 hente adresser"),e.errorMessage&&(O=e.errorMessage),(0,u.useEffect)(()=>{e.predefinedAddress&&j(e.predefinedAddress)},[e.predefinedAddress]),(0,u.useEffect)(()=>{e.onChange&&e.onChange(y||null)},[y]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)(i.hQ,{value:e.predefinedAddress||y,onChange:e=>j(e),children:[(0,r.jsx)(l.__,{className:"block text-lg font-bold mb-2",children:"Adresse"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(i.gA,{disabled:!!(null===(s=e.predefinedAddress)||void 0===s?void 0:s.adressenavn),className:n()("px-4 py-2 text-lg w-full",{"bg-system-white":"white"===e.background,"bg-system-grey":"grey"===e.background||!e.background}),ref:N,id:w,autoComplete:"shipping street-address","aria-describedby":"".concat(w,"-instructions ").concat(w,"-error"),displayValue:e=>e?"".concat(e.adressetekst,", ").concat(e.postnummer," ").concat(e.poststed):"",onChange:e=>{x(e.target.value)}}),Z&&(0,r.jsx)("div",{className:"absolute right-4 top-3 h-6 w-6 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"presentation"})]}),(0,r.jsx)(i.L5,{as:"div",className:"absolute left-0 right-0 z-50 max-h-52 overflow-auto border bg-system-white p-2 text-system-black empty:invisible",children:null===(t=S.data)||void 0===t?void 0:t.map(e=>(0,r.jsxs)(i.O2,{value:e,className:"px-2 py-1 data-[focus]:bg-system-accent data-[focus]:text-system-black data-[active]:bg-system-accent data-[active]:text-system-black",children:[e.adressetekst,", ",e.postnummer," ",e.poststed]},"".concat(e.adressetekst,"-").concat(e.postnummer,"-").concat(e.poststed)))})]}),O?(0,r.jsx)("p",{id:"".concat(w,"-error"),className:"mt-2 leading-snug text-system-error",children:O}):(g=e.isLoading,f=null===(a=N.current)||void 0===a?void 0:a.value,!g&&(!y||f!=="".concat(y.adressetekst,", ").concat(y.postnummer," ").concat(y.poststed))&&(0,r.jsx)("p",{id:"".concat(w,"-instructions"),className:"mt-2 leading-snug text-system-black p-5 bg-system-grey",children:"Skriv inn adressen din og velg fra nedtrekksmenyen"})),e.predefinedAddress?(0,r.jsxs)("p",{className:"!mt-0",children:[(0,r.jsx)(p.Z,{type:"button",variant:"secondary",className:"underline",onClick:e=>{e.preventDefault(),k.back()},children:"G\xe5 tilbake til elektrikers\xf8ket"})," ","for \xe5 endre adresse"]}):null]})}},52906:function(e,s,t){"use strict";t.r(s),t.d(s,{__N_SSP:function(){return j}});var r=t(85893),a=t(61841);t(40221);var n=t(11163),i=t(67294),l=t(93379),o=t(56034),d=t(32493),c=t(15829),m=t(87641),u=t(24550),h=t(15279),p=t(1193),g=t(82531),f=t(70507),b=t(11151),x=t(66891),v=t(69852),y=t(57371),j=!0;s.default=e=>{var s,t,j,k;let{globalContent:w,error:N}=e,{firmInformation:{email:S,name:Z,nameOverride:I,id:O,formSettings:C=[]}={},departments:F,siteTheme:E={label:"default",class:""}}=w,[M,T]=(0,i.useState)(),[_,L]=(0,i.useState)(!1),[V,D]=(0,i.useState)(),[z,A]=(0,i.useState)(null),[R,P]=(0,i.useState)("private"),[B,H]=(0,i.useState)([]),[W,q]=(0,i.useState)(),J=async e=>{q(e)},[U,Y]=(0,i.useState)(!1),X=(0,n.useRouter)(),$=F.filter(e=>0!==Object.keys(e).length);$.length>0&&($=[{title:I||Z,email:S,id:O,proptlyId:null==w?void 0:null===(s=w.firmInformation)||void 0===s?void 0:s.proptlyId,installerOrganisationId:null==w?void 0:null===(t=w.firmInformation)||void 0===t?void 0:t.installerOrganisationId},...$]),(0,i.useEffect)(()=>{var e,s;D(null===(s=window)||void 0===s?void 0:null===(e=s.location)||void 0===e?void 0:e.origin)},[]),(0,i.useEffect)(()=>{var e,s;let t={memberSite:{id:O,memberName:Z,email:S},proptlyId:null==w?void 0:null===(e=w.firmInformation)||void 0===e?void 0:e.proptlyId,installerOrganisationId:null==w?void 0:null===(s=w.firmInformation)||void 0===s?void 0:s.proptlyId};localStorage.setItem("orderDetails",JSON.stringify(t)),T(t)},[]);let{locationHistory:K,memberSite:{id:G,memberName:Q,email:ee},proptlyId:es,installerOrganisationId:et}=M||{memberSite:{}},er=[{name:"Forside",item:"/"},{name:"Send foresp\xf8rsel",item:"/bestill"}];console.log("orderDetails",M);let ea=async e=>{Promise.all(Array.from(e.target.files).map(a.l)).then(e=>{H(s=>[...s,...e])})},en=e=>{H(s=>s.filter((s,t)=>t!==e))},ei=async e=>{e.preventDefault();let{target:{customerType:{value:s}={},fullName:{value:t}={},phoneNumber:{value:r}={},message:{value:a}={},email:{value:n}={},wantsVideoSurvey:{checked:i}={},companyName:{value:l}={},companyOrgNumber:{value:o}={},wantsFinancingOffer:{checked:d}={}}={}}=e,c={};if(t||(c.fullName="Du m\xe5 oppgi navn"),r||(c.phoneNumber="Du m\xe5 oppgi telefonnummer"),n||(c.email="Du m\xe5 oppgi e-postadresse"),t){isNaN(t)||(c.fullName="Du kan bare skrive bokstaver i dette feltet");let e=(0,y.eR)(t);(null==e?void 0:e.message)&&(c.fullName=e.message)}if(r&&(isNaN(r)&&(c.phoneNumber="Du kan bare skrive tall i dette feltet"),(0,y.Y0)(r)||(c.phoneNumber="Du m\xe5 oppgi et gyldig norsk telefonnummer")),n&&!(0,y.oH)(n)&&(c.email="E-postadressen er ikke i et gyldig format"),B.length>5&&(c.images="Du kan maks laste opp 5 bilder."),a||(c.message="Du m\xe5 beskrive kort hva du trenger hjelp til"),W||(c.address="Du m\xe5 oppgi adresse"),Object.keys(c).length>0)return A(c);A(null),Y(!0);let m=new FormData;B.length&&B.forEach(async(e,s)=>{m.append("image-".concat(s),e)}),m.append("data",JSON.stringify({customerType:s,fullName:t,phoneNumber:r,email:n,message:a,wantsVideoSurvey:i,address1:W.adressetekst,zip:W.postnummer,city:W.poststed,companyName:l,companyOrgNumber:o,wantsFinancingOffer:d,recipientName:Q,memberFirmId:G,recipientEmail:ee,originURL:V}));let u=new FormData;u.append("workflowId","fb862033-1756-44b0-b623-697e9fc45661"),u.append("customerType",s),u.append("fullName",t),u.append("phoneNumber",r),u.append("email",n),u.append("message",a),u.append("wantsVideoSurvey",i||""),u.append("address1",W.adressetekst),u.append("zip",W.postnummer),u.append("city",W.poststed),u.append("wantsFinancingOffer",d||""),u.append("recipientName",Q),u.append("memberFirmId",G),u.append("recipientEmail",ee),u.append("originURL",V),u.append("isFromChainOffice","0"),u.append("contractorId",es),et&&u.append("installerOrganisationId",et),u.append("orderTags",JSON.stringify(["1446dde4-e296-41a0-be62-17e5db834081"])),B.length&&B.forEach((e,s)=>{u.append("image-".concat(s),e)});let h=await (0,x.W)({endpoints:{craft:"/api/craftcms/postOrder",proptly:"/api/proptly/v1/order"},craftFormData:m,proptlyFormData:u,timeoutMs:9e4});if(!h.ok){A({global:h.message}),Y(!1);return}if(h.craftResult&&G){X.push("/bestill/bekreftelse");return}Y(!1)},el="col-span-full 2xl:col-start-3 xl:col-span-8";return(0,r.jsxs)(f.Z,{seo:{seoTitle:"Bestilling",robots:"noindex follow"},error:N,globalContent:w,siteTheme:E,isMember:!0,children:[er&&(0,r.jsx)("section",{className:"page-container grid grid-cols-6 gap-x-4 sm:grid-cols-12 sm:gap-x-10",children:(0,r.jsx)(g.Z,{breadcrumbs:er,className:"mb-12 ".concat(el)})}),(0,r.jsxs)("article",{className:"page-container grid grid-cols-6 gap-x-4 sm:grid-cols-12 sm:gap-x-10",children:[(0,r.jsx)("section",{className:"prose prose-brand mb-14 max-w-none md:prose-lg ".concat(el),children:(0,r.jsx)("header",{children:(0,r.jsx)(c.Z,{className:"mb-8",children:"Send oss en foresp\xf8rsel"})})}),(0,r.jsx)("section",{className:"prose prose-brand mb-8 md:prose-lg ".concat(el),children:(0,r.jsxs)("form",{onSubmit:ei,children:[(0,r.jsxs)(b.E,{label:"Er du privat- eller bedriftskunde?",name:"customerType",className:"mb-14",onChange:e=>P(e),children:[(0,r.jsx)(b.Y,{value:"Privatkunde",checked:!0,children:"Privatkunde"}),(0,r.jsx)(b.Y,{value:"Bedriftskunde",children:"Bedriftskunde"})]}),$.length>0&&(0,r.jsx)(b.E,{label:"Hvor vil du sende bestillingen?",name:"department",className:"mb-14",onChange:e=>T({memberSite:{id:e.id,email:e.email,memberName:e.memberName},proptlyId:e.proptlyId,installerOrganisationId:e.installerOrganisationId}),children:$.map(e=>(0,r.jsx)(b.Y,{value:{id:e.id,email:e.email,memberName:e.title,proptlyId:e.proptlyId,installerOrganisationId:e.installerOrganisationId},children:e.title},e.title))}),(0,r.jsxs)("fieldset",{className:"mb-14",children:[(0,r.jsx)("legend",{id:"helpTextLegend",className:"text-2xl font-bold",children:"Hva trenger du hjelp til?"}),(0,r.jsx)(h.Z,{className:"w-full","aria-labelledby":"helpTextLegend",name:"message",label:"Beskriv kort hva du trenger hjelp av elektriker til. Dette hjelper v\xe5re elektrikere \xe5 gi deg et bedre tilbud.",...(null==z?void 0:z.message)?{errorMessage:null==z?void 0:z.message}:{}})]}),C.includes("formFileUpload")&&(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("fieldset",{children:(0,r.jsxs)("div",{className:"col-span-full",children:[(0,r.jsx)("legend",{id:"imageUploadLegend",className:"text-2xl font-bold",children:"Last opp bilde(r)"}),(0,r.jsx)("label",{htmlFor:"cover-photo",className:"block py-4",children:"Last opp bilde(r). Maks 5 stykk og maks 15 MB pr. bilde."}),(0,r.jsx)("div",{className:" border-gray-900/25 mt-2 flex justify-center rounded-lg border border-dashed py-4 hover:bg-system-grey",children:(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)("div",{className:"text-gray-600 flex text-sm leading-6",children:(0,r.jsxs)("label",{htmlFor:"file-upload",className:" focus-within:ring-indigo-600 relative cursor-pointer rounded-md font-semibold focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 ",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("svg",{stroke:"currentColor",fill:"
1currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1.5em",width:"1.5em",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"})]}),(0,r.jsx)("span",{className:"text-gray-900 text-sm font-medium",children:"Last opp bilde"})]}),(0,r.jsx)("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only","aria-labelledby":"imageUploadLegend",accept:"image/*",multiple:!0,onChange:ea})]})})})}),(null==z?void 0:z.images)&&(0,r.jsx)("div",{role:"region","aria-live":"polite",className:"my-2 text-system-error",children:null==z?void 0:z.images})]})}),(0,r.jsx)("div",{className:"mt-6",children:B.map((e,s)=>(0,r.jsxs)("div",{className:"mb-2 mr-2 flex items-center justify-between","aria-label":"Slett ".concat(e.name),children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("svg",{className:"mr-2.5 h-6 w-6 text-current",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})]}),(0,r.jsxs)("span",{className:"mr-2",children:[e.name," (",(Math.round(e.size/1024/1024*100)/100).toFixed(2)," ","MB)"]})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>en(s),className:"flex items-center",children:[(0,r.jsxs)("svg",{className:"mr-2.5 h-6 w-6 text-current",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})]}),"Slett"]})]},s))})]}),C.includes("formVideo")&&(0,r.jsxs)("fieldset",{className:"mb-8",children:[(0,r.jsx)("legend",{id:"videoSurveyLegend",className:"text-2xl font-bold",children:"\xd8nsker du videobefaring?"}),(0,r.jsx)(u.Z,{children:"Videobefaring er gratis og vil fungere godt hvis du skal gj\xf8re mindre arbeider hjemme, men trenger at elektriker tar en titt f\xf8rst."}),(0,r.jsx)(o.Z,{name:"wantsVideoSurvey",value:"Ja","aria-labelledby":"videoSurveyLegend",className:"mb-8",checked:_,children:(0,r.jsx)("span",{className:"text-base text-system-black",children:"Jeg \xf8nsker videobefaring"})})]}),(0,r.jsxs)("fieldset",{children:[(0,r.jsx)("legend",{className:"mb-8 text-2xl font-bold",children:null!==(k=w.webshopSett
1ings.contactInputTitle)&&void 0!==k?k:"Kontaktinformasjon"}),(0,r.jsx)("div",{className:"mb-14",children:(0,r.jsx)(p.Z,{label:"Navn",type:"text",name:"fullName",className:"w-full",autoComplete:"name","aria-required":!0,...(null==z?void 0:z.fullName)?{errorMessage:null==z?void 0:z.fullName}:{}})}),"professional"===R&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-14",children:(0,r.jsx)(p.Z,{label:"Firmanavn (valgfritt)",type:"text",name:"companyName",className:"w-full",autoComplete:"organization"})}),(0,r.jsx)("div",{className:"mb-14",children:(0,r.jsx)(p.Z,{label:"Organisasjonsnummer (valgfritt)",type:"text",name:"companyOrgNumber",className:"w-full"})})]}),(0,r.jsx)("div",{className:"mb-14",children:(0,r.jsx)(p.Z,{label:"Telefonnummer",type:"text",name:"phoneNumber",className:"w-3/5",autoComplete:"tel",description:"8 siffer","aria-required":!0,...(null==z?void 0:z.phoneNumber)?{errorMessage:null==z?void 0:z.phoneNumber}:{}})}),(0,r.jsx)("div",{className:"mb-14",children:(0,r.jsx)(p.Z,{label:"E-post",type:"email",name:"email",className:"w-full",autoComplete:"email","aria-required":!0,...(null==z?void 0:z.email)?{errorMessage:null==z?void 0:z.email}:{}})}),(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(v.Z,{predefinedAddress:null==M?void 0:null===(j=M.customer)||void 0===j?void 0:j.address,onChange:J}),(null==z?void 0:z.address)&&(0,r.jsx)("div",{role:"region","aria-live":"polite",className:"mt-2 text-system-error",children:z.address})]})]}),C.includes("formFinancing")&&(0,r.jsxs)("fieldset",{className:"mb-14",children:[(0,r.jsx)("legend",{id:"finansialLegend",className:"text-2xl font-bold",children:"\xd8nsker du tilbud p\xe5 finansiering?"}),(0,r.jsx)(u.Z,{children:"Vi tilbyr finansiering for v\xe5re privatkunder."}),(0,r.jsx)(o.Z,{name:"wantsFinancingOffer",value:"Ja","aria-labelledby":"finansialLegend",children:(0,r.jsx)("span",{className:"text-base text-system-black",children:"Jeg \xf8nsker tilbud p\xe5 finansiering"})})]}),(0,r.jsx)(d.Z,{message:null==z?void 0:z.global}),(0,r.jsxs)("div",{className:"flex w-36 items-baseline justify-between gap-4",children:[K&&(0,r.jsx)(m.Z,{linkTo:{pathname:"/".concat(K)},children:"Forrige"}),(0,r.jsx)(l.Z,{isDisabled:U,type:"submit",className:"mt-6 flex-1 whitespace-nowrap",children:U?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"ml-auto mr-4 inline-block h-6 w-6 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status"}),(0,r.jsx)("span",{children:"Sender foresp\xf8rsel"})]}):(0,r.jsx)("span",{children:"Send foresp\xf8rsel"})})]})]})})]})]})}}},function(e){e.O(0,[6911,1509,6342,1370,9732,2700,221,507,2888,9774,179],function(){return e(e.s=62826)}),_N_E=e.O()}]);
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.