PageSourceSearch

https://www.obs.no/assets/9488.chunk.ad17c6513f3c816fd1cd.js

js obs.no collected 2026-09-25 02:37:49 UTC 58,959 bytes, 3 lines download raw bytes

1/*! For license information please see 9488.chunk.ad17c6513f3c816fd1cd.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunknitro5_app=globalThis.webpackChunknitro5_app||[]).push([[9488],{3418:(e,t,n)=>{n.d(t,{Ay:()=>S,K3:()=>a});var a,o=n(62),r=n(6166),i=n(3696),l=n(774),c=n(667),s=n(9412),d=n(7458),u=n(8858),m=n(7097),p=n(3071),h=n(7876),g=n(4702),f=n(3782),y=n(9540),v=n(9221),E=n(9803);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(null,arguments)}function k(e){return"number"==typeof e&&e>=1}!function(e){e[e.Default=0]="Default",e[e.MiniCart=1]="MiniCart",e[e.Mini=2]="Mini"}(a||(a={}));const b=9999;const S=(0,l.I4)(function(e){const t=(0,y.tO)(),n=(0,i.useRef)(!0),o=(0,i.useRef)(!1),[l,d]=(0,i.useState)(String(e.value)),m=(0,i.useRef)(e.value),g=(0,i.useRef)(!1),{appearance:v,showFeedback:S=!0,allowDecimal:I=!1,update:T}=e;(0,i.useEffect)(()=>{!o.current&&n.current&&d(String(e.value))},[e.value]),(0,i.useEffect)(()=>()=>{n.current=!1,o.current=!1,g.current=!1,m.current=null},[]);const _=(0,i.useCallback)(t=>I?parseFloat((t||"").toString().replace(",",".")):Math.max(e.factor,parseInt(t,10)),[I,e.factor]),M=(0,i.useCallback)(e=>(0,r.__awaiter)(this,void 0,void 0,function*(){try{yield T(e),g.current=!1,m.current=e}catch(e){return n.current&&(o.current?g.current=!1:(d(String(m.current)),g.current=!0)),Promise.reject(e)}}),[T]),N=(0,i.useCallback)(e=>(d(String(e)),(()=>(0,r.__awaiter)(this,void 0,void 0,function*(){try{return yield M(e)}catch(e){return m.current&&T(m.current),Promise.reject(e)}}))()),[M,T]),G=(0,i.useCallback)(t=>{const{value:n}=t.currentTarget;if(n){const t=_(n)*e.factor;return N(t<b?t:b)}d("")},[N,_,e.factor]),V=(0,i.useCallback)(()=>{const t=_(l)-1*e.factor;return k(t)?N(t):Promise.reject(null)},[N,_,e.factor,l]),W=(0,i.useCallback)(()=>{const t=(_(l)||0)+1*e.factor;if(k(t)){return N(t<b?t:b)}return Promise.reject(null)},[N,_,e.factor,l]),R=(0,i.useCallback)(()=>{n.current&&(g.current?(T(m.current),d(String(m.current)),g.current=!1):d(String(e.value)))},[e.value,T]),X=e.value>0,$=l?_(l)>0:X,F=e.isUpdating||!$||e.value<=1,U=e.isUpdating||!e.enableQuantitySelector||_(l)>=b,z=S?e.appearance===a.Mini||e.appearance===a.MiniCart&&t?j:w:Y;return i.createElement(O,{css:{borderRadius:p.asY,minWidth:v===a.MiniCart?44:86,border:{xy:{width:e=>e.tokens.borderWidth.highlight,style:"solid",color:e.highlightError?e=>e.tokens.color.danger.border.strong:p.rjy}}},onClick:e=>{e.stopPropagation(),e.preventDefault()}},i.createElement(z,C({gtmButtonData:{buttonText:(0,c.TlY)("/Product/MinimizeQty"),context:"Decrease quantity in quantity selector.",eventType:E.LU.Remove,eventGroup:E._B.Product,shouldNotTrack:!e.isPDP},id:"quantity-step-button-reduce"},f.GB.DecreaseQuantityButton,{as:u.Sx.None,behavior:h.nS.KeepEnabled,title:(0,c.TlY)("/Product/MinimizeQty"),onClick:V,disabled:F,css:!!F&&x}),i.createElement(s.Hs,{strokeWidth:3})),i.createElement(P,{css:A},i.createElement(L,{css:v===a.Mini&&{width:"2ch",padding:{xy:1}}},i.createElement(B,null,i.createElement(D,C({id:"quanity-input","aria-label":e.inputLabel,type:"number",step:"any",value:l?_(l)/e.factor:"",min:e.factor,max:"999"},f.GB.QuantityInput,{disabled:e.disableInput,onChange:G,onFocus:()=>{o.current=!0},onBlur:()=>{o.current=!1,R()}}))))),i.createElement(z,C({gtmButtonData:{buttonText:(0,c.TlY)("/Product/MaximizeQty"),context:"Increase quantity in quantity selector.",eventType:E.LU.Add,eventGroup:E._B.Product,shouldNotTrack:!e.isPDP},id:"quantity-step-button-add"},f.GB.IncreaseQuantityButton,{as:u.Sx.None,behavior:h.nS.KeepEnabled,title:(0,c.TlY)("/Product/MaximizeQty"),onClick:W,disabled:U}),i.createElement(s.FW,{strokeWidth:3})))},(0,p.X6j)({property:"background"}),{display:"inline-flex",justifyContent:()=>(0,c.UPE)()?"center":"space-evenly",alignItems:"center",maxWidth:"100%",padding:{xy:p.nU9}}),x={pointerEvents:"none",border:{xy:{width:0}}},I={width:p.asY,height:p.asY,maxWidth:p.asY,maxHeight:p.asY,padding:{xy:0},cursor:"pointer",":focus":Object.assign({},(0,v.b)())},T={width:p.utm,height:p.utm,maxWidth:p.utm,maxHeight:p.utm,padding:{xy:0},border:{xy:{width:p.yLY,style:"solid",color:p.YVp}},cursor:"pointer",":focus":Object.assign({},(0,v.b)())},w=(0,l.I4)(h.Ay,(0,d.v9)(p.Bzh.Small),Object.assign({},I)),Y=(0,l.I4)(d.cV,(0,d.v9)(p.Bzh.Small),Object.assign({},T)),j=(0,l.I4)(h.Ay,(0,d.v9)(p.Bzh.Mini),Object.assign({},I)),D=(0,l.I4)(m.zq,(0,m.XN)(),(0,g.gD)(["::-webkit-outer-spin-button","::-webkit-inner-spin-button"],{WebkitAppearance:"none"}),{display:"flex",width:"100%",color:"inherit",textAlign:"center",WebkitAppearance:"textfield"}),P=l.I4.div((0,p.X6j)({property:"color"}),{position:"relative",display:"flex"}),O=l.I4.div({minHeight:p.utm,backgroundColor:p.ONy}),L=(0,l.I4)(e=>{const t=(0,o.c)(3);let n,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?((0,p.X6j)({property:"opacity"}),n={display:"flex",pointerEvents:"auto"},t[0]=n):n=t[0],t[1]!==e.children?(a=i.createElement(l.I4.Div,{css:n},e.children),t[1]=e.children,t[2]=a):a=t[2],a},{width:({isCompact:e})=>e?"3.5ch":"4ch"}),B=l.I4.label({display:"flex",marginBottom:0},(0,p.Wlv)("BodyLarge")),A={color:p.X2A}},3720:(e,t,n)=>{n.d(t,{default:()=>Xt});
2var a=n(62),o=n(3696),r=n(667),i=n(121),l=n(6488),c=n(2364),s=n(7877),d=n(4105);const u=function(e){const t=(0,a.c)(11),{outOfStockText:n,noShipmentAvailableText:r,discountCodeText:i}=e,{checkoutData:l}=(0,c.Vy)(),{items:u,viewData:m}=l,p=(0,s.a)(u,null==m?void 0:m.bundleLineItems);let h,g;if(t[0]!==p||t[1]!==i||t[2]!==r||t[3]!==n){let e;t[5]!==i||t[6]!==r||t[7]!==n?(e=(e,t)=>o.createElement(d.A,{key:`${e.code}_${t}`,item:e,outOfStockText:n,noShipmentAvailableText:r,discountCodeText:i,cartView:"checkout"}),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],h=p.map(e),t[0]=p,t[1]=i,t[2]=r,t[3]=n,t[4]=h}else h=t[4];return t[9]!==h?(g=o.createElement(o.Fragment,null,h),t[9]=h,t[10]=g):g=t[10],g};var m=n(3379),p=n(2432),h=n(7458),g=n(8858),f=n(7876),y=n(3071),v=n(774),E=n(9540),C=n(3782),k=n(4929);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(null,arguments)}const S=(0,v.I4)((0,v.jg)(function(e){const t=(0,a.c)(17);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=function(e){switch(e){case"checkout-page-order-section":return C.GB.CheckoutPageOrderSection;case"checkout-page-address-section-guest":return C.GB.CheckoutPageAddressSectionGuest;case"checkout-page-address-section-loggedin":return C.GB.CheckoutPageAddressSectionLoggedIn;case"checkout-page-shipping-section":return C.GB.CheckoutPageShippingSection;case"checkout-page-payment-section":return C.GB.CheckoutPagePaymentSection;case"checkout-page-coopay-section":return C.GB.CheckoutPageCoopaySection;default:return null}},t[0]=n):n=t[0];const r=n,i=e.id;let l;t[1]!==e.id?(l=r(e.id),t[1]=e.id,t[2]=l):l=t[2];const c=`checkoutsection-${e.id}`;let s,d,u,m;return t[3]!==e.headingText||t[4]!==e.icon?(s=!!e.headingText&&o.createElement(I,null,!!e.headingText&&o.createElement(T,null,e.headingText),!!e.icon&&o.createElement(w,{src:e.icon,alt:"Coopay ikon"})),t[3]=e.headingText,t[4]=e.icon,t[5]=s):s=t[5],t[6]!==e.compose?(d=e.compose(),t[6]=e.compose,t[7]=d):d=t[7],t[8]!==e.children||t[9]!==d?(u=o.createElement(v.I4.Div,{css:d},e.children),t[8]=e.children,t[9]=d,t[10]=u):u=t[10],t[11]!==e.id||t[12]!==l||t[13]!==c||t[14]!==s||t[15]!==u?(m=o.createElement(x,b({id:i},l,{"data-test-id":c}),s,u),t[11]=e.id,t[12]=l,t[13]=c,t[14]=s,t[15]=u,t[16]=m):m=t[16],m})),x=(0,v.I4)(l.x,{backgroundColor:y.ONy,marginBottom:y.YaY,padding:{xy:y.YaY},borderRadius:y.EXj,border:{xy:{width:y.yLY,style:"solid",color:y.YVp}}}),I=v.I4.div({margin:{bottom:y.YaY},display:"flex"}),T=(0,v.I4)(p.H5,{margin:{y:0}}),w=(0,v.I4)(k.A,{width:60,height:"auto",maxHeight:60,marginLeft:"auto"});var Y=n(8036),j=n(5007),D=n(9087);const P=(0,v.I4)(e=>{const t=(0,a.c)(21);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.createElement(B,null,(0,r.TlY)("/Checkout/Summary/CartTotal")),t[0]=n):n=t[0];const i=e.totalPriceInclVat+e.totalSavings.inclVat;let l,c,s,d,u,m,p,h,g,f,y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l={symbol:""},t[1]=l):l=t[1],t[2]!==i?(c=o.createElement("tr",null,n,o.createElement(A,null,o.createElement(O,{current:i,appearance:D.m_.Checkout,formatOptions:l}))),t[2]=i,t[3]=c):c=t[3],t[4]!==e.discountCode||t[5]!==e.totalSavings.inclVat?(s=!!e.discountCode&&o.createElement("tr",null,o.createElement(B,null,"Rabattkode: ",e.discountCode),o.createElement(A,null,o.createElement(v.I4.Span,{css:N},"-"),o.createElement(O,{current:e.totalSavings.inclVat,appearance:D.m_.Checkout,formatOptions:{symbol:""}}))),t[4]=e.discountCode,t[5]=e.totalSavings.inclVat,t[6]=s):s=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(d=o.createElement(B,null,"("+(0,r.TlY)("/Checkout/Summary/OfWhichVAT")),t[7]=d):d=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(u={symbol:""},t[8]=u):u=t[8],t[9]!==e.totalVat?(m=o.createElement("tr",null,d,o.createElement(A,null,o.createElement(O,{current:e.totalVat,appearance:D.m_.Checkout,formatOptions:u}),")")),t[9]=e.totalVat,t[10]=m):m=t[10],t[11]===Symbol.for("react.memo_cache_sentinel")?(p=o.createElement(_,null,o.createElement("th",
2null),o.createElement("td",null)),t[11]=p):p=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(h=o.createElement(B,{css:G},(0,r.TlY)("/Checkout/Summary/TotalExcludeShipping")),t[12]=h):h=t[12],t[13]===Symbol.for("react.memo_cache_sentinel")?(g={symbol:""},t[13]=g):g=t[13],t[14]!==e.totalPriceInclVat?(f=o.createElement(M,null,h,o.createElement(A,{css:V},o.createElement(O,{current:e.totalPriceInclVat,appearance:D.m_.Checkout,formatOptions:g}))),t[14]=e.totalPriceInclVat,t[15]=f):f=t[15],t[16]!==f||t[17]!==c||t[18]!==s||t[19]!==m?(y=o.createElement(v.I4.Div,null,o.createElement(L,null,o.createElement("tbody",null,c,s,m,p,f))),t[16]=f,t[17]=c,t[18]=s,t[19]=m,t[20]=y):y=t[20],y},{display:"flex",justifyContent:"flex-end",width:"100%",backgroundColor:y.t6h,padding:{xy:y.EXj}}),O=(0,v.I4)(j.R,(0,y.Wlv)("SubtitleLarge"),{fontSize:9.142857}),L=v.I4.table({width:"100%"}),B=v.I4.th((0,y.Wlv)("SubtitleLarge"),{textAlign:"left",paddingRight:y.YaY}),A=v.I4.td({display:"flex",alignItems:"center",justifyContent:"right"}),_=v.I4.tr({height:y.YaY}),M=v.I4.tr({borderTop:{color:y.rjy,style:"solid",width:y.yLY}}),N={marginRight:y.EXj},G={paddingTop:y.YaY},V={paddingTop:y.YaY};var W=n(3925),R=n(3255),X=n.n(R),$=n(8085),F=n(6166),U=n(2708),z=n(6268),H=n(7097),J=n(4702),q=n(5127);function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},K.apply(null,arguments)}function Q(e){const{testElement:t}=e,[n,a]=(0,o.useState)(!1),l={firstname:(0,r.TlY)("/Checkout/Inputs/FirstName"),lastname:(0,r.TlY)("/Checkout/Inputs/Lastname"),address:(0,r.TlY)("/Checkout/Inputs/AddressLine"),postalcode:(0,r.TlY)("/Checkout/Inputs/PostalCode"),city:(0,r.TlY)("/Checkout/Inputs/City")};function c(t,n){e[n](t.currentTarget.value),e.clearError()}function s(e,t){Z(e,t,"checkout-form-information")}const d=(0,o.useCallback)(t=>(0,F.__awaiter)(this,void 0,void 0,function*(){const n=yield(e=>(0,F.__awaiter)(void 0,void 0,void 0,function*(){var t,n;const a=yield fetch(`bring/getgeo?postalCode=${e}`),o=yield a.json();return null!==(n=(0,q.Zx)(null===(t=o.geoAddresses[0])||void 0===t?void 0:t.city))&&void 0!==n?n:""}))(t);e.setCity(n)}),[e]),[u,m]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{var t;4!==(null===(t=e.postalCode)||void 0===t?void 0:t.length)||n||d(e.postalCode)},[]),o.createElement(ee,null,o.createElement(H.LB,"Guest"===t?C.GB.CheckoutGuestNameInput:C.GB.CheckoutCustomertNameInput,o.createElement(H.cL,{uncontrolled:!0,required:!0,value:e.givenName,autoComplete:e.autoCompleteSection+" given-name",spellCheck:!1,autoCorrect:"off",minLength:2,maxLength:50,onChange:e=>{c(e,"setGivenName"),"Guest"===t&&s(e,"firstName")},label:(0,i.Jn)(e.page.firstNameLabel),id:"given-name",errorMessage:l.firstname})),o.createElement(H.LB,"Guest"===t?C.GB.CheckoutGuestLastNameInput:C.GB.CheckoutCustomerLastNameInput,o.createElement(H.cL,{uncontrolled:!0,required:!0,value:e.familyName,autoComplete:e.autoCompleteSection+" family-name",spellCheck:!1,autoCorrect:"off",minLength:2,maxLength:50,onChange:e=>{c(e,"setFamilyName"),"Guest"===t&&s(e,"lastName")},label:(0,i.Jn)(e.page.lastNameLabel),id:"family-name",errorMessage:l.lastname})),o.createElement(H.LB,"Guest"===t?C.GB.CheckoutGuestAddressInput
2:C.GB.CheckoutCustomerAddressInput,o.createElement(H.cL,{uncontrolled:!0,required:!0,value:e.addressLine,autoComplete:e.autoCompleteSection+" address-line1",spellCheck:!1,autoCorrect:"off",minLength:1,maxLength:60,onChange:e=>{c(e,"setAddressLine"),"Guest"===t&&s(e,"address")},label:(0,i.Jn)(e.page.address1Label),id:"address-line1",errorMessage:l.address})),o.createElement(te,null,o.createElement(H.IH,K({css:{marginLeft:-y.YaY}},"Guest"===t?C.GB.CheckoutGuestPostalCodeInput:C.GB.CheckoutCustomerPostalCodeInput),o.createElement(H.cL,{type:"tel",required:!0,uncontrolled:!0,value:e.postalCode,autoComplete:e.autoCompleteSection+" postal-code",spellCheck:!1,autoCorrect:"off",minLength:4,maxLength:4,pattern:"[0-9]{4}",onChange:e=>{var n;c(e,"setPostalCode"),"Guest"===t&&s(e,"postalCode"),4===e.target.value.length&&d(null===(n=e.target)||void 0===n?void 0:n.value).then(()=>{m(!0)})},label:(0,i.Jn)(e.page.postalCodeLabel),id:"postal-code",errorMessage:l.postalcode})),o.createElement(H.IH,"Guest"===t?C.GB.CheckoutGuestCityInput:C.GB.CheckoutCustomerCityInput,o.createElement(H.cL,{uncontrolled:!0,required:!0,value:e.city,autoComplete:e.autoCompleteSection+" address-level2",spellCheck:!1,autoCorrect:"off",minLength:1,maxLength:40,onChange:e=>{c(e,"setCity"),a(!0),"Guest"===t&&s(e,"city")},label:(0,i.Jn)(e.page.cityLabel),id:"address-level2",errorMessage:l.city,cityIsAutoFilledIn:u}))))}function Z(e,t,n){const a=(0,r.W9$)(n);if(a)return""===e.currentTarget.value?delete a[t]:a[t]=e.currentTarget.value,void(0,r.EXA)(n,a);const o={[t]:e.currentTarget.value};(0,r.EXA)(n,o)}const ee=v.I4.div({paddingBottom:y.EXj,width:"100%"}),te=v.I4.div(Object.assign({display:"flex",flexDirection:"row"},(0,J.$_)(y._fM,{flexDirection:"row"})));var ne=n(2833);function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ae.apply(null,arguments)}function oe(e){const{actions:{setTemporaryAddress:t},state:{checkoutData:{additional:{useTemporaryAddress:n,temporaryAddress:a},checkoutViewData:{defaultCustomerAddress:i}}}}=(0,o.useContext)(c.ob),l=(0,r.W9$)("checkout-form-information"),[s,d]=(0,o.useState)(!n),[u,m]=(0,o.useState)(!1),[p,h]=(0,o.useState)(a.firstName||(null==l?void 0:l.firstName)),[g,f]=(0,o.useState)(a.lastName||(null==l?void 0:l.lastName)),[v,E]=(0,o.useState)(a.line1||(null==l?void 0:l.address)),[k,b]=(0,o.useState)(a.postalCode||(null==l?void 0:l.postalCode)),[S,x]=(0,o.useState)(a.city||(null==l?void 0:l.city)),[I,T]=(0,o.useState)(null);return(0,o.useEffect)(()=>{p&&g&&v&&k&&k.length>3&&S&&function(){(0,F.__awaiter)(this,void 0,void 0,function*(){T(null),s?t(null):t({firstName:p,lastName:g,line1:v,line2:"",postalCode:k,city:S,stateCode:"",additional:{shouldForceChangeSelectedShippingMethod:!s&&u},countryCode:"",email:"",organization:"",phoneNumber:""}).then(e=>{var t,n,a;return m(!1),(null!==(n=null===(t=null==e?void 0:e.errors)||void 0===t?void 0:t.length)&&void 0!==n?n:0)>0?(T(null===(a=null==e?void 0:e.errors[0])||void 0===a?void 0:a.message),Promise.reject(null)):Promise.resolve()}).catch(e=>(m(!1),T(e&&"string"==typeof e?e:(0,r.TlY)("/Errors/Unknown")),Promise.reject(null)))})}()},[p,v,k,S,g,s,t,u]),o.createElement(o.Fragment,null,o.createElement(re,null,o.createElement(ge,{tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&(d(!0),m(!1))}},o.createElement(ce,{name:"AddressOption",checked:s,onClick:()=>{d(!0),m(!1)},testElement:"checkout-registered-address-option",tabIndex:-1},o.createElement("div",null,(0,r.TlY)("/Checkout/RegistryAddress"),o.createElement(ie,{css:fe},o.createElement(le,{"data-di-mask":!0},i.firstName+" "+i.lastName),o.createElement(le,{"data-di-mask":!0},i.line1),o.createElement(le,{"data-di-mask":!0},i.postalCode+" "+i.city)),o.createElement(ue,null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement(se,null,`${(0,r.TlY)("/Shared/EmailShort")} `)),o.createElement("td",null,o.createElement(de,{"data-di-mask":!0},i.email))),o.createElement("tr",null,o.createElement("td",null,o.createElement(se,null,`${(0,r.TlY)("/Shared/PhoneShort")} `)),o.createElement("td",null,o.createElement(de,{"data-di-mask":!0},i.phoneNumber)))))))),o.createElement(he,null),o.createElement(me,null,o.createElement(ge,{tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&(d(!1),m(!0))}},o.createElement(pe,{name:"AddressOption",checked:!s,onClick:()=>{d(!1),m(!0)},css:Object.assign({},!s&&{paddingBottom:y.asY}),testElement:"checkout-new-address-option",tabIndex:-1},o.createElement("span",null,(0,r.TlY)("/Checkout/ChangeAddressOrRecipient")))
2),!s&&o.createElement(Q,{page:e.page,autoCompleteSection:"billing",givenName:p,setGivenName:h,familyName:g,setFamilyName:f,addressLine:v,setAddressLine:E,postalCode:k,setPostalCode:b,city:S,setCity:x,clearError:()=>T(null)})),!!I&&o.createElement(z.A,ae({type:z.M.Error,customStyle:{width:`calc(100% - ${y.EXj}px)`,margin:{top:0,left:y.EXj}}},C.GB.RegisterFailedElement),I)))}const re=v.I4.div({width:"100%",padding:{x:y.EXj}}),ie=v.I4.div({display:"flex",flexDirection:"column"}),le=v.I4.div({width:"100%"}),ce=(0,v.I4)(U.sx,{padding:{x:y.EXj,top:y.EXj,bottom:0},width:"100%"}),se=v.I4.span({marginRight:y.EXj}),de="span",ue=v.I4.table({margin:{x:0,top:y.YaY,bottom:0}}),me=v.I4.div({marginTop:y.EXj,padding:{y:y.EXj,left:y.EXj},margin:{right:-y.YaY},position:"relative"}),pe=(0,v.I4)(U.sx,{width:"100%",marginBottom:0}),he=v.I4.div({margin:{y:y.YaY,left:y.EXj},borderTop:{color:y.rjy,style:"solid",width:y.yLY}}),ge=v.I4.div((0,ne.k)({borderRadius:y.q$c})),fe={marginTop:y.EXj};var ye=n(1940),ve=n(6276),Ee=n(5340),Ce=n(7581),ke=n(9803),be=n(4519),Se=n(203);function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},xe.apply(null,arguments)}const Ie=(0,v.I4)(e=>{const{item:t}=e,n=(0,E.tO)(),a="MEMBER"===e.item.viewData.discountPriceType,i=a?Be:j.R;return o.createElement(Te,null,o.createElement(we,null,o.createElement(_e,{to:t.url,css:!!n&&De,gtmData:{linkText:t.displayName+" - image",linkPath:t.url,context:"List item links",eventType:ke.SF.Redirect,eventGroup:ke.jf.Lists}},o.createElement(k.A,{src:t.viewData.imageUrl,alt:t.displayName,sizes:"160px",ratio:be.w.OneToOne,css:n?Me:Ne})),o.createElement(Ye,null,o.createElement(je,null,o.createElement(Pe,null,t.displayName),!!a&&o.createElement(Ae,null,(0,r.TlY)("/Shared/Order/DiscountType/MemberPrice")),o.createElement(Se.V,{viewData:t.viewData}),o.createElement(Le,null,o.createElement(Oe,null,`${(0,r.TlY)("/Email/OrderShipped/Quantity")} `,t.quantity),o.createElement(i,{current:t.totalPrice,appearance:D.m_.Checkout,formatOptions:{symbol:""},css:Ge})),!n&&o.createElement(Ce.A,xe({quantity:t.quantity},t.viewData))))),!!n&&o.createElement(Ce.A,xe({quantity:t.quantity},t.viewData)))}),Te=v.I4.li(Object.assign(Object.assign({width:"100%",display:"flex",flexDirection:"column",paddingTop:y.EXj,paddingLeft:y.EXj,borderBottom:{color:y.rjy,style:"solid",width:"thin"}},(0,J.gD)(":first-child",{padding:{top:0}})),(0,J.$_)(y._fM,{padding:{y:0}}))),we=v.I4.div({display:"flex",flexDirection:"row",alignItems:"center"}),Ye=v.I4.div(Object.assign({flexGrow:4,marginLeft:y.EXj,paddingTop:y.EXj},(0,J.$_)(y._fM,{paddingBottom:y.EXj,marginLeft:y.asY}))),je=v.I4.div({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:(0,y.De1)(24)}),De={marginRight:y.YaY,flex:{grow:0,shrink:0,basis:"30%"}},Pe=v.I4.h4((0,y.Wlv)("SubtitleLarge"),{width:"100%",margin:{xy:0}}),Oe=v.I4.span({}),Le=v.I4.div({fontSize:y.NiS,display:"inline-flex",justifyContent:"space-between",width:"100%",marginBottom:y.EXj}),Be=(0,v.I4)(j.R,{color:y.qzw}),Ae=v.I4.div({color:y.qzw,alignSelf:"start",fontSize:y.NiS}),_e=(0,v.I4)(ye.A,(0,ne.k)({})),Me={maxHeight:"80px"},Ne={width:"5rem"},Ge={fontSize:9.142857};function Ve(e){const[t,n]=(0,o.useState)("");return(0,o.useEffect)(()=>{var t;if(null==e?void 0:e.current){const a=null===(t=null==e?void 0:e.current)||void 0===t?void 0:t.closest("#checkout-page-order-section, #checkout-page-address-section-guest, #checkout-page-address-section-loggedin, #checkout-page-shipping-section, #checkout-page-payment-section, #checkout-page-bottom-error-section");n(null==a?void 0:a.id)}},[e,t]),t}function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},We.apply(null,arguments)}const Re=e=>{var t,n;const a=(0,o.useRef)(null),r=Ve(a);return(0,o.useEffect)(()=>{a&&r&&(0,ke.xG)(e.noShipmentText,r)},[r,e,e.noShipmentText,e.shippingMethods.length]),o.createElement(Xe,null,(null===(t=e.shippingGroupItems)||void 0===t?void 0:t.length)>0&&o.createElement($e,{bare:!0},e.shippingGroupItems.map((e,t)=>
2o.createElement(Fe,{key:e.code+t,item:e}))),!!e.error&&o.createElement(z.A,{header:e.error.header,type:z.M.Error},e.error.message),o.createElement(p.Ul,{column:!0},1===e.shippingMethods.length?o.createElement(Ee.default,We({warehouseCode:e.warehouseCode,shippingGroupItems:e.shippingGroupItems,key:e.shippingMethods[0].id},e.shippingMethods[0],{warehouseCount:e.warehouseCount,orderLength:e.orderLength})):null===(n=e.shippingMethods)||void 0===n?void 0:n.map((t,n)=>o.createElement(Ee.default,We({warehouseCode:e.warehouseCode,key:t.id+n,shippingGroupItems:e.shippingGroupItems,warehouseCount:e.warehouseCount},t,{orderLength:e.orderLength}))),"noshipment"===e.warehouseCode&&o.createElement(Ue,{ref:a,id:"errorMessageId","data-test-id":"product-not-available-for-pickup"},e.noShipmentText)))},Xe=v.I4.div({width:"100%"}),$e=(0,v.I4)(p.Ul,{margin:{top:({isCompact:e})=>e?0:y.YaY}}),Fe=Ie,Ue=v.I4.li({cursor:"pointer",padding:{x:y.EXj,top:y.YaY,bottom:y.EXj},backgroundColor:y.t6h,color:y.guH,wordBreak:"break-word"});var ze=n(4753);function He(e){const t=(0,a.c)(7),{isOpen:n,onClose:l,termsAndConditions:c}=e;let s,d,u;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,r.TlY)("/Checkout/Summary/CoopTermsAndConditionHeader"),t[0]=s):s=t[0],t[1]!==c?(d=o.createElement(i.fi,c),t[1]=c,t[2]=d):d=t[2],t[3]!==n||t[4]!==l||t[5]!==d?(u=o.createElement(Je,{isOpen:n,onClose:l,header:s,"data-test-id":"checkouttermsandconditions"},d),t[3]=n,t[4]=l,t[5]=d,t[6]=u):u=t[6],u}const Je=(0,v.I4)(ze.A,{height:"50vh",overflowX:"hidden",display:"flex",flexDirection:"column",maxWidth:1e3,borderRadius:y.EXj});function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},qe.apply(null,arguments)}const Ke=(0,v.I4)(e=>{const{totalPriceExclVat:t,totalPriceInclVat:n,shippingFee:a,termsAccepted:i,actionButton:l,checkoutData:c,toggleTermsAccepted:s}=e,d=n-t,[u,m]=(0,o.useState)(!1);return o.createElement(Qe,null,o.createElement(et,null,o.createElement(tt,null,(0,r.TlY)("/Checkout/Summary/TotalToPayIncludeShipping")," (",o.createElement(Ze,{current:a,appearance:D.m_.Summary}),")"),o.createElement(nt,{current:n,appearance:D.m_.Summary}),o.createElement("div",null,o.createElement(at,null,(0,r.TlY)("/Checkout/Summary/OfWhichVAT")),o.createElement(Ze,{current:d,appearance:D.m_.Summary}))),o.createElement(ot,null,o.createElement(ct,null,o.createElement(U.Sc,{checked:i,onChange:s,testElement:"checkout-terms-checkbox",onKeyDown:e=>{"Enter"===e.key&&s()}}),o.createElement(it,null,o.createElement(rt,null,(0,r.TlY)("/Checkout/Summary/AcceptTerms")),o.createElement(lt,qe({onClick:()=>m(!0),onKeyDown:e=>{"Enter"===e.key&&m(!0)}},C.GB.CheckoutTermsAndConditionsLink,{tabIndex:0}),(0,r.TlY)("/Checkout/Summary/CoopTermsAndCondition"))))),o.createElement(o.Fragment,null,l),o.createElement(He,{isOpen:u,termsAndConditions:c.checkoutViewData.termsAndConditions,onClose:()=>m(!1)}))}),Qe=v.I4.div({padding:{x:y.EXj,top:y.YaY,bottom:y.EXj},marginTop:y.EXj}),Ze=(0,v.I4)(j.R,(0,y.Wlv)("SubtitleLarge"),{fontSize:9.142857}),et=v.I4.div({width:"100%",textAlign:"center"}),tt=v.I4.div({fontSize:y.pU_}),nt=(0,v.I4)(j.R,(0,y.Wlv)("SubtitleLarge"),{fontSize:23,margin:{y:y.YaY}}),at=v.I4.span({marginRight:y.EXj,fontSize:y.NiS}),ot=v.I4.div({padding:{x:24},fontSize:y.NiS,margin:{top:y.YaY,left:({isCompact:e})=>e?0:y.YaY}}),rt=v.I4.span({marginRight:y.nU9}),it=v.I4.div({display:"block"}),lt=v.I4.span((0,ne.k)({offset:y.yLY,borderRadius:y.yLY}),{cursor:"pointer",color:y.wDm,":hover":{textDecoration:"underline"}}),ct=v.I4.div({position:"relative",display:"flex",gap:y.EXj});var st=n(7539),dt=n(7921),ut=n(7045);function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},mt.apply(null,arguments)}const pt="checkout-form-information";function ht(e){const t=(0,a.c)(28),{actions:n,state:l}=(0,o.useContext)(c.ob),{setBillingAddress:s}=n,{checkoutData:d}=l,{billingAddress:u}=d,{phoneNumber:m,email:p}=u;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={phone:(0,r.TlY)("/Checkout/Inputs/Phone"),email:(0,r.TlY)("/Checkout/Inputs/Email")},t[0]=h):h=t[0];const g=h;let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=(0,r.W9$)(pt),t[1]=f):f=t[1];
2const v=f,[E,k]=(0,o.useState)(m||(null==v?void 0:v.phoneNumber)),[b,S]=(0,o.useState)(p||(null==v?void 0:v.email));let x,I,T;t[2]!==p||t[3]!==b||t[4]!==m||t[5]!==E||t[6]!==s?(x=()=>{const e=setTimeout(()=>{b!==p&&s({email:b}),E!==m&&s({phoneNumber:E})},ut.DT);return()=>{clearTimeout(e)}},I=[p,b,m,E,s],t[2]=p,t[3]=b,t[4]=m,t[5]=E,t[6]=s,t[7]=x,t[8]=I):(x=t[7],I=t[8]),(0,o.useEffect)(x,I),t[9]===Symbol.for("react.memo_cache_sentinel")?(T=function(e,t){Z(e,t,pt)},t[9]=T):T=t[9];const w=T;let Y;t[10]===Symbol.for("react.memo_cache_sentinel")?(Y=Object.assign({},(0,J.$_)(y._fM,{width:400,marginRight:y.asY})),t[10]=Y):Y=t[10];const j=e.autoCompleteSection?e.autoCompleteSection+" tel":"tel";let D,P,O;t[11]===Symbol.for("react.memo_cache_sentinel")?(D=e=>{k(e.target.value),w(e,"phoneNumber")},t[11]=D):D=t[11],t[12]!==e.page.phoneNumberLabel?(P=(0,i.Jn)(e.page.phoneNumberLabel),t[12]=e.page.phoneNumberLabel,t[13]=P):P=t[13],t[14]!==E||t[15]!==j||t[16]!==P?(O=o.createElement(H.LB,mt({css:Y},C.GB.CheckoutGuestPhoneInput),o.createElement(H.cL,{type:"tel",name:"phone",required:!0,uncontrolled:!0,value:E,autoComplete:j,spellCheck:!1,autoCorrect:"off",pattern:"[0-9]{8}",minLength:8,maxLength:8,onChange:D,label:P,id:"phone-number",errorMessage:g.phone})),t[14]=E,t[15]=j,t[16]=P,t[17]=O):O=t[17];const L=e.autoCompleteSection?e.autoCompleteSection+" email":"email";let B,A,_,M;return t[18]===Symbol.for("react.memo_cache_sentinel")?(B=e=>{S(e.target.value),w(e,"email")},t[18]=B):B=t[18],t[19]!==e.page.emailLabel?(A=(0,i.Jn)(e.page.emailLabel),t[19]=e.page.emailLabel,t[20]=A):A=t[20],t[21]!==b||t[22]!==L||t[23]!==A?(_=o.createElement(H.LB,C.GB.CheckoutGuestEmailInput,o.createElement(H.cL,{uncontrolled:!0,required:!0,name:"email",type:"email",value:b,autoComplete:L,spellCheck:!1,autoCorrect:"off",maxLength:100,onChange:B,label:A,id:"email",errorMessage:g.email,"data-di-mask":!0})),t[21]=b,t[22]=L,t[23]=A,t[24]=_):_=t[24],t[25]!==O||t[26]!==_?(M=o.createElement(gt,null,o.createElement(ft,null,O,_)),t[25]=O,t[26]=_,t[27]=M):M=t[27],M}const gt=v.I4.div({width:"100%",margin:{bottom:-y.YaY,right:-y.YaY}}),ft=v.I4.div(Object.assign({width:"100%",display:"flex",flexDirection:"column",marginRight:-y.YaY},(0,J.$_)(y._fM,{marginRight:0,flexDirection:"row"})));function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},yt.apply(null,arguments)}const vt="billing";function Et(e){const{actions:{setGuestAddress:t},state:{checkoutData:{additional:{temporaryAddress:n}}}}=(0,o.useContext)(c.ob),a=(0,r.W9$)("checkout-form-information"),[i,l]=(0,o.useState)(n.firstName||(null==a?void 0:a.firstName)),[s,d]=(0,o.useState)(n.lastName||(null==a?void 0:a.lastName)),[u,m]=(0,o.useState)(n.line1||(null==a?void 0:a.address)),[p,h]=(0,o.useState)(n.postalCode||(null==a?void 0:a.postalCode)),[g,f]=(0,o.useState)(n.city||(null==a?void 0:a.city)),[v,E]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let n;return i&&s&&u&&p&&p.length>3&&g&&(n=setTimeout(function(){e.setLoadingShippingMethods(!0),e.setLoadingPaymentMethods(!0),E(null),t({firstName:i,lastName:s,line1:u,line2:"",postalCode:p,city:g,stateCode:"",additional:null,countryCode:"",email:"",organization:"",phoneNumber:""}).then(e=>{var t,n,a;return(null!==(n=null===(t=null==e?void 0:e.errors)||void 0===t?void 0:t.length)&&void 0!==n?n:0)>0?(E(null===(a=null==e?void 0:e.errors[0])||void 0===a?void 0:a.message),Promise.reject(null)):Promise.resolve()}).catch(e=>(E(e&&"string"==typeof e?e:(0,r.TlY)("/Errors/Unknown")),Promise.reject(null))).finally(()=>{e.setLoadingShippingMethods(!1),e.setLoadingPaymentMethods(!1)})},320)),()=>{clearTimeout(n)}},[i,u,p,g,t,s]),o.createElement(Ct,null,o.createElement(Q,{page:e.page,autoCompleteSection:vt,givenName:i,setGivenName:l,familyName:s,setFamilyName:d,addressLine:u,setAddressLine:m,postalCode:p,setPostalCode:h,city:g,setCity:f,clearError:()=>E(null),testElement:"Guest"}),o.createElement(ht,{page:e.page,autoCompleteSection:vt}),!!v&&o.createElement(z.A,yt({type:z.M.Error,customStyle:{width:`calc(100% - ${y.YaY}px)`,marginTop:0}},C.GB.RegisterFailedElement),v))}const Ct=v.I4.div({marginRight:-y.YaY});var kt=n(9781),bt=n(6591),St=n(9412);function xt(e){const t=(0,a.c)(22);let n,l,c,s,d,u,m,p,h,g,f;if(t[0]!==e){const{code:a,remove:r,text:m}=Object.assign({},e);c=function(){r(a)},l=It,d="checkoutpage-code",t[7]===Symbol.for("react.memo_cache_sentinel")?(u=o.createElement(St.Jl,{css:Yt}),t[7]=u):u=t[7],n=Tt,s=(0,i.Jn)(m,{code:a}),t[0]=e,t[1]=n,t[2]=l,t[3]=c,t[4]=s,t[5]=d,t[6]=u}else n=t[1],l=t[2],c=t[3],s=t[4],d=t[5],u=t[6];return t[8]!==s?(m=o.createElement("div",null,s),t[8]=s,t[9]=m):m=t[9],t[10]!==n||t[11]!==m?(p=o.createElement(n,null,m),t[10]=n,t[11]=m,t[12]=p):p=t[12],t[13]===Symbol.for("react.memo_cache_sentinel")?(h=(0,r.TlY)("/Checkout/RemoveDiscount"),t[13]=h):h=t[13],t[14]!==c?(g=o.createElement(wt,{onClick:c},h),t[14]=c,t[15]=g):g=t[15],t[16]!==l||t[17]!==d||t[18]!==u||t[19]!==p||t[20]!==g?(f=o.createElement(l,{"data-test-id":d},u,p,g),t[16]=l,t[17]=d,t[18]=u,t[19]=p,t[20]=g,t[21]=f):f=t[21],f}const It=v.I4.div({display:"flex",alignItems:"flex-start",margin:{x:y.LcP.small,bottom:y.LcP.small}}),Tt=v.I4.span({display:"flex",margin:{left:y.EXj,right:y.asY}}),wt=v.I4.span({cursor:"pointer",textDecoration:"underline"}),Yt={stroke:y.yGP};function jt(e){const[t,n]=(0,f.j8)(),[a,i]=(0,o.useState)(!1),[l,c]=(0,o.useState)(""),[s,d]=(0,o.useState)("");function u(t){return(0,F.__awaiter)(this,void 0,void 0,function*(){const a=()=>(0,F.__awaiter)(this,void 0,void 0,function*(){try{const n=yield e.addCode(t);return n.checkoutData.giftCardPayments.map(e=>e.code.toLowerCase()).includes(t.toLowerCase())||n.checkoutData.discountCodes.map(e=>e.toLowerCase()).includes(t.toLowerCase())?((0,ke.$t)(n.checkoutData).catch(()=>{}),Promise.resolve()):(d((0,r.TlY)("/Checkout/DiscountCodeError")),Promise.reject())}catch(e){return Promise.reject()}});try{const e=a();n(e),yield e,c(""),d("")}catch(e){d((0,r.TlY)("/Checkout/DiscountCodeError"))}})}const m=o.useCallback(()=>{i(!0)},[]);return o.createElement(Pt,null,a?o.createElement(o.Fragment,null,o.createElement(Bt,{htmlFor:"promo-code-input"},e.title),o.createElement(Ot,null,o.createElement(At,{autoFocus:!0,t
2ype:"text",disabled:!t.enabled,value:l,placeholder:e.title,onChange:function(e){c(e.currentTarget.value)},onKeyPress:function(e){const t=e.currentTarget.value.trim();e.which===r.jDl&&""!==t&&u(t)},size:20,id:"promo-code-input",hasError:!!s}),o.createElement(Dt,{gtmButtonData:{buttonText:(0,r.TlY)("/Checkout/DiscountCodeButton"),context:"Add discount code",eventType:ke.LU.Submit,eventGroup:ke._B.Checkout},state:t,as:g.Sx.Primary,onClick:function(){u(l)}},(0,r.TlY)("/Checkout/DiscountCodeButton"))),!!s&&o.createElement(_t,null,s)):o.createElement(Lt,{onClick:m,onKeyDown:e=>{"Enter"===e.key&&m()},tabIndex:0},e.title))}const Dt=(0,v.I4)((0,f.V4)(h._s),(0,ne.k)({offset:y.q$c}),Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",padding:{x:y.EXj},marginLeft:y.nU9,fontSize:y.pU_,boxShadow:"none",height:({isCompact:e})=>e?y.RrY:y.wmU},(0,J.$_)(y.x36,{padding:{x:12},marginLeft:y.YaY})),(0,J.$_)(y._fM,{padding:{x:y.utm}}))),Pt=v.I4.div({display:"flex",flexDirection:"column",padding:{x:y.EXj},margin:{y:y.YaY},alignItems:"start"}),Ot=v.I4.div(Object.assign({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},(0,J.$_)(y.x36,{justifyContent:"flex-start"}))),Lt=v.I4.span((0,ne.k)({offset:y.q$c,borderRadius:y.yLY}),{cursor:"pointer",textDecoration:"underline"}),Bt=v.I4.label({textDecoration:"underline",marginBottom:"10px"}),At=(0,v.I4)(H.Ay,{height:({isCompact:e})=>e?y.RrY:y.wmU,maxWidth:({isCompact:e})=>e?"65%":"95%",display:"flex",alignItems:"center",paddingLeft:y.pU_,whiteSpace:"nowrap"}),_t=v.I4.div({margin:{top:y.YaY},color:y.guH});var Mt=n(8898),Nt=n(6156),Gt=n(3513),Vt=n(992);function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Wt.apply(null,arguments)}const Rt=(0,Y.A)(null,e=>({openMiniMenuTab:t=>e((0,$.WK)(t))}))((0,m.Bw)(function(e){var t,n,a,s,d,k,b,x,I;const[T,w]=(0,o.useState)(!1),[Y,j]=(0,o.useState)(!1),D=(0,E.tO)(),[P,O]=(0,o.useState)(!1),L=(0,c.Vy)(),{checkoutData:B}=L,A=(0,c.ju)(),_=(0,r.T76)((0,ve.HW)()),M=(0,st.d)(e=>e.appShellData.availableLanguages),N=(0,st.d)(e=>e.appShellData.culture),G=(0,dt.R)(),V=null==_?void 0:_.isLoggedIn,R=!!(null==_?void 0:_.id),$="online"===e.cartType,F=!!(null===(t=(0,i.Jn)(e.content.topInformationArea))||void 0===t?void 0:t.html),U=[],H=Object.keys(B.checkoutViewData.shippingMethodsByWarehouseCode).length;let J=0;const[q,K]=(0,o.useState)(!1),[Q,Z]=(0,o.useState)(!1),[ee,te]=(0,o.useState)(!1),[ne,ae]=(0,f.j8)({minimumPending:750,maximumRejected:500,maximumFulfilled:500}),re=(0,o.useRef)(null),ie=(0,o.useCallback)(e=>{var t,n,a;if(e.preventDefault(),!Y){const o=null===(a=null===(n=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.offsetParent)||void 0===n?void 0:n.offsetParent)||void 0===a?void 0:a.offsetTop,r=D?Nt.x6:Nt.vV+Gt.Y;j(!0),setTimeout(()=>{window.scrollTo({top:o-r,behavior:"smooth"}),j(!1)},20)}(0,r.Tus)("Tried to submit invalid checkout form")},[D,Y]);(0,Vt.N)(()=>{const e=re.current;return e&&(0,r.BdH)()&&e.addEventListener("invalid",ie,!0),()=>{e&&(0,r.BdH)()&&e.removeEventListener("invalid",ie,!0)}}),(0,o.useEffect)(()=>{if(!B.canProceedWithPurchase){const t=B.items.filter(e=>e.viewData.outOfStock);(0,ke.jY)(t,(0,i.Jn)(e.content.lineOutOfStockText),"checkout-page-line-item")}},[B.canProceedWithPurchase]);const le=(0,o.useRef)(null),[ce,se]=(0,o.useState)(""),[de,ue]=(0,o.useState)(""),[me,pe]=(0,o.useState)(null),he=(0,o.useRef)(null),ge=Ve((null==le?void 0:le.current)&&le),fe=Ve(he),ye=(0,i.Jn)(e.content.shippingInformationAreaText),Ee=B.additional.showErrorChangingPostalCode,Ce=(0,o.useCallback)(()=>{L.validationErrors.length&&(L.validationErrors.map(e=>{se(e.section)}),L.validationErrors.map(e=>{ue(e.message)}))},[L.validationErrors]),be=(0,o.useCallback)(()=>{const e=new URLSearchParams(location.search),t=null==e?void 0:e.get("info");if(t&&(0,Mt.OP)(t)){const e=(0,Mt.Af)(t);pe(e),(0,Mt.mk)()}},[]);(0,o.useEffect)(()=>{ne.status===f.nW.Rejected&&Ce(),be()},[be,Ce,ne.status]),(0,o.useEffect)(()=>{"PostalCode"===ce&&de&&ge&&(0,ke.xG)(de,ge)},[de,ce,ge]),(0,o.useEffect)(()=>{he.current&&fe&&(0,ke.xG)((0,r.TlY)("/Checkout/ShippingPromptInformation"),fe)},[fe]);const Se=B.viewData.minOrderValueReached?o.createElement(m.Wl,null,o.createElement(l.eS,{css:P?En:vn},o.createElement($t,Wt({isFormSubmit:!0,gtmButtonData:{buttonText:(0,i.Jn)(e.content.completePurchaseHeader),context:"Complete purchase",eventType:ke.LU.Submit,eventGroup:ke._B.Checkout},disabled:!P||!B.checkoutViewData.allItemsShippable||!R,state:ne,css:Object.assign(Object.assign({},ne.status===f.nW.Pending&&{opacity:"0"}
2),P&&Object.assign({},(0,y.PMn)())),type:"submit"},C.GB.CompletePurchaseButton),o.createElement(i.Cx,{component:"span",for:e.content.completePurchaseHeader})),!P&&o.createElement(mn,{onClick:()=>K(!0)}))):o.createElement(qt,null,(0,i.Jn)(e.content.minOrderValueMessage,{minorder:(0,W.$)(B.viewData.minOrderValue),remaining:(0,W.$)(X()(B.viewData.minOrderValue).subtract(B.viewData.total.inclVat).value)}));for(const t in B.checkoutViewData.shippingMethodsByWarehouseCode)if((null===(a=null===(n=B.checkoutViewData.shippingMethodsByWarehouseCode[t])||void 0===n?void 0:n.shippingMethods)||void 0===a?void 0:a.length)>0){J++;const n=null===(s=L.checkoutData.items)||void 0===s?void 0:s.filter(e=>e.viewData.warehouseCode===t);if(U.push(o.createElement(cn,{key:t},"online"===e.cartType&&o.createElement(o.Fragment,null,o.createElement(nn,null,`${(0,r.TlY)("/Checkout/Shipping")} ${J}`),!!(null===(d=B.checkoutViewData.shippingMethodsByWarehouseCode[t])||void 0===d?void 0:d.chain)&&o.createElement(z.A,{header:(0,r.TlY)("/Checkout/ShippingPromptInformationFromStoreTitle"),type:z.M.Info,testId:"important-message"},(0,r.TlY)("/Checkout/ShippingPromptInformationFromStore",G?(0,r.TlY)("/Chain/Obs/Name"):(0,r.TlY)("/Chain/Obsbygg/Name")))),o.createElement(Re,{key:t,warehouseCode:t,shippingMethods:null===(k=B.checkoutViewData.shippingMethodsByWarehouseCode[t])||void 0===k?void 0:k.shippingMethods,shippingGroupItems:n,noShipmentText:(0,i.Jn)(e.content.noShipmentText),warehouseCount:J,orderLength:H,error:null===(b=B.checkoutViewData.shippingMethodsByWarehouseCode[t])||void 0===b?void 0:b.error}))),1===Object.keys(B.checkoutViewData.shippingMethodsByWarehouseCode).length)break}if(!B.checkoutViewData.allItemsShippable){J++;const t=null===(x=L.checkoutData.items)||void 0===x?void 0:x.filter(e=>e.viewData.noShipmentAvailable);U.push(o.createElement(o.Fragment,null,J>1&&o.createElement(nn,null,(0,r.TlY)("/Checkout/Shipping")+` ${J}`),o.createElement(Re,{key:"noshipment",warehouseCode:"noshipment",shippingMethods:[],shippingGroupItems:t,noShipmentText:(0,i.Jn)(e.content.noShipmentText),warehouseCount:J,orderLength:H,error:null})))}const xe=M.find(e=>e.culture===N).url,Ie=G?(0,r.TlY)("/Chain/Obs/StoreCartHeader"):(0,r.TlY)("/Chain/Obsbygg/StoreCartHeader");return 0===B.items.length?o.createElement(l.gZ,Wt({appearanceWidth:"narrow"},C.GB.CheckoutPage,{id:"checkout-page"}),o.createElement("div",null,o.createElement(en,null,o.createElement(pn,null),o.createElement(tn,Wt({to:xe,gtmData:{linkText:(0,r.TlY)("/MiniCart/EmptyCart"),linkPath:xe,context:"Continue shopping when on checkout page - no products in cart",eventType:ke.SF.Browse,eventGroup:ke.jf.Checkout}},C.GB.CheckoutContinueShoppingLink),(0,r.TlY)("/Shared/ContinueShopping"))),o.createElement(p.P,null,(0,r.TlY)("/MiniCart/EmptyCart")),!!Ee&&o.createElement(z.A,{css:Cn,type:z.M.Error,header:(0,r.TlY)("/Checkout/PostalCodeEmptyCartErrorHeader"),testId:(0,r.TlY)("/Checkout/PostalCodeEmptyCartErrorText")},(0,r.TlY)("/Checkout/PostalCodeEmptyCartErrorText")),o.createElement(l.eS,null,o.createElement(i.Cx,{for:e.content.emptyCartArea})))):o.createElement(l.gZ,Wt({css:!!D&&{padding:{x:y.nU9}},appearanceWidth:"narrow",id:"checkout-page"},C.GB.CheckoutPage),o.createElement(l.lV,{elementRef:re,onSubmit:function(e){return e.preventDefault(),ae(A.completePurchase())}
2,onKeyPress:function(e){"input"===e.target.tagName.toLowerCase()&&13===(e.keyCode||e.which||e.charCode||e.key||0)&&e.preventDefault()},css:!D&&{maxWidth:730}},o.createElement(en,null,o.createElement(pn,null),o.createElement(tn,Wt({to:xe,gtmData:{linkText:(0,r.TlY)("/Shared/ContinueShopping"),linkPath:xe,context:"Continue shopping when on checkout page",eventType:ke.SF.Browse,eventGroup:ke.jf.Checkout}},C.GB.CheckoutContinueShoppingLink),(0,r.TlY)("/Shared/ContinueShopping"))),!!F&&o.createElement(ln,null,o.createElement(kt.a,{noMargin:!0},o.createElement(i.Cx,{for:e.content.topInformationArea,component:"div"}))),B.canProceedWithPurchase?o.createElement(o.Fragment,null,o.createElement(S,{id:"checkout-page-order-section"},o.createElement(Ft,{css:!$&&{marginBottom:0}},$?(0,r.TlY)("/Checkout/OnlineCartHeader"):Ie,!$&&o.createElement(Ut,Wt({},C.GB.CheckoutPageStoreName,{id:"checkout-page-store-name"}),(0,r.TlY)("/Checkout/YourStore")," ",L.checkoutData.viewData.storeName)),J>1&&o.createElement(z.A,{header:(0,r.TlY)("/Checkout/ShippingPromptInformationTitle"),type:z.M.Info},(0,r.TlY)("/Checkout/ShippingPromptInformationTop")),!!me&&o.createElement(z.A,{header:me.title,type:z.M.Info},me.message),o.createElement(u,{outOfStockText:(0,i.Jn)(e.content.lineOutOfStockText),noShipmentAvailableText:(0,i.Jn)(e.content.lineNoShipmentText),discountCodeText:(0,i.Jn)(e.content.discountCodeText)}),o.createElement(Jt,null,o.createElement(hn,null,o.createElement(jt,{title:(0,i.Jn)(e.content.addDiscountCodeText),addCode:A.addDiscountCode}),B.discountCodes.length>0&&B.discountCodes.map(t=>o.createElement(xt,{code:t,key:t,remove:()=>A.removeDiscountCode(t),text:e.content.discountCodeText}))),o.createElement(on,{amountLeftToFreeShipping:B.checkoutViewData.amountLeftToFreeShipping,shippingFee:B.shippingFee,paymentFee:B.paymentFee,totalSavings:B.checkoutViewData.totalSavings,totalPriceInclVat:B.checkoutViewData.totalPriceInclVatExclShipping,totalVat:B.checkoutViewData.totalVatExclShipping,discountCode:!!B.discountCodes&&B.discountCodes[0]}))),!B.viewData.minOrderValueReached&&o.createElement(qt,null,(0,i.Jn)(e.content.minOrderValueMessage,{minorder:(0,W.$)(B.viewData.minOrderValue),remaining:(0,W.$)(X()(B.viewData.minOrderValue).subtract(B.viewData.total.inclVat).value)})),!V&&!!(0,i.Jn)(e.content.coopayDescription)&&o.createElement(S,{id:"checkout-page-coopay-section",headingText:(0,r.TlY)("/Checkout/CoopaySectionTitle"),icon:(0,i.Jn)(e.content.coopayIcon)},o.createElement("p",null,(0,i.Jn)(e.content.coopayDescription))),!!V&&o.createElement(m.WB,null,o.createElement(S,{id:"checkout-page-address-section-loggedin",headingText:(0,r.TlY)("/Checkout/YourInformation")},o.createElement(oe,{page:e.content}))),o.createElement(m.WB,null,!V&&o.createElement(S,{headingText:(0,r.TlY)("/Checkout/LoginSectionTitle"),id:"checkout-page-address-section-guest"},o.createElement(Kt,null,o.createElement(Zt,null,(0,r.TlY)("/Checkout/LogInBoldDisclaimerText")),(0,r.TlY)("/Checkout/LogInDisclaimerText"),o.createElement(Qt,Wt({gtmButtonData:{buttonText:(0,r.TlY)("/Checkout/LoginButtonTitle"),context:"Login disclaimer - redirect user to login page",eventType:ke.LU.Login,eventGroup:ke._B.Checkout},css:kn,onClick:()=>{location.assign("/loginpage/auth0login?returnurl="+location.href)}},C.GB.CheckoutLoginMemberButton),(0,r.TlY)("/Checkout/LoginButtonTitle"))),o.createElement("div",null,o.createElement(Ht,null,(0,r.TlY)("/Checkout/ShopAsGuestTitle")),o.createElement("p",null,(0,r.TlY)("/Checkout/ShopAsGuestText"))),o.createElement(sn,null,o.createElement(Et,{page:e.content,setLoadingShippingMethods:e=>{Z(e)},setLoadingPaymentMethods:e=>{te(e)}}))),o.createElement(o.Fragment,null,o.createElement(S,{id:"checkout-page-shipping-section",headingText:(0,r.TlY)("/Checkout/ShippingMethodTitle")},!!(null==ye?void 0:ye.length)&&o.createElement(z.A,{testId:"important-message",type:z.M.Info,header:(0,r.TlY)("/Checkout/ShippingPromptInformationTitle")},ye),J>1&&o.createElement("div",{ref:he},o.createElement(z.A,{testId:"not-in-same-stock-multiple-deliveries",header:(0,r.TlY)("/Checkout/ShippingPromptInformationHeader"),type:z.M.Info},(0,r.TlY)("/Checkout/ShippingPromptInformation"))),Q?o.createElement(fn,null,o.createElement(St.y$,null)):J>0&&B.billingAddress.postalCode.length<4&&!V&&o.createElement(gn,null,o.createElement("div",null,(0,r.TlY)("/Checkout/GuestMissingPostalInfo")))||U),o.createElement(S,{id:"checkout-page-payment-section",headingText:(0,r.TlY)("/Shared/Order/PaymentMethod")},o.createElement(m.kr,{renderNothingToPay:()=>o.createElement(i.Cx,{for:e.content.nothingLeftToPayText}),renderPaymentMethods:t=>{const n=o.Children.count(t)>5&&!T;return o.createElement(o.Fragment,null,ee?o.createElement(fn,null,o.createElement(St.y$,null)):J>0&&B.billingAddress.postalCode.length<4&&!V&&o.createElement(gn,null,o.createElement("div",null,(0,r.TlY)("/Checkout/GuestMissingPostalPaymentInfo")))||o.createElement(o.Fragment,null,o.createElement(dn,null,o.createElement(v.I4.Div,{css:bn},o.createElement(yn,{column:!0},o.Children.map(t,(e,t)=>n?t<5?e:void 0:e)))),o.createElement(un,null,o.createElement(kt.a,{noMargin:!0},o.createElement(i.Cx,{for:e.content.paymentDescription}))),!!n&&o.createElement(zt,null,o.createElement(h.Ay,{gtmButtonData:{buttonText:(0,r.TlY)("/Shared/ShowAll"),context:"Show all payment methods",eventType:ke.LU.Open,eventGroup:ke._B.Checkout},as:g.Sx.White,onClick:()=>w(!0),css:Sn},(0,r.TlY)("/Shared/ShowAll")))),o.createElement(rn,{totalPriceInclVat:B.totalPriceInclVat,totalPriceExclVat:B.totalPriceExclVat,shippingFee:B.shippingFee,termsAccepted:P,toggleTermsAccepted:()=>{O(!P),K(!1)},checkoutData:B,actionButton:Se}))}})),!!(L.validationErrors&&L.validationErrors.length||q&&!P)&&o.createElement(l.eS,{id:"Payment"===ce&&"payment-error"},o.createElement(z.A,{id:"checkout-page-bottom-error-section",header:(0,i.Jn)(e.content.validationMessagesHeader),type:z.M.Error},o.createElement(p.Ul,null,null===(I=L.validationErrors)||void 0===I?void 0:I.map(e=>o.createElement(v.I4.Li,{key:e.message,ref:le,"data-id-test":e.message.replace(/\s+/g,"-").toLowerCase()},e.message)),!!q&&o.createElement(v.I4.Li,{"data-test-id":(0,r.TlY)("/Checkout/AcceptTermsCheckoutError").replace(/\s+/g,"-").toLowerCase()},(0,r.TlY)("/Checkout/AcceptTermsCheckoutError")))))))):o.createElement(l.eS,null,o.createElement(u,{outOfStockText:(0,i.Jn)(e.content.lineOutOfStockText),noShipmentAvailableText:(0,i.Jn)(e.content.lineNoShipmentText),discountCodeText:(0,i.Jn)(e.content.discountCodeText)}),o.createElement(i.Cx,{for:e.content.somethingWrongWithSomeLineItemsText,component:an}))))}));function Xt(e){const t=(0,a.c)(5);let n,r;return t[0]!==e?(n=o.createElement(Rt,e),t[0]=e,t[1]=n):n=t[1],t[2]!==e.cartType||t[3]!==n?(r=o.createElement(c.sT,{cartType:e.cartType},n),t[2]=e.cartType,t[3]=n,t[4]=r):r=t[4],r}const $t=(0,v.I4)((0,f.V4)(h._s),h.vJ,(0,ne.k)({offset:y.q$c}),{width:"100%",transitionDelay:"0s",opacity:"1",transition:{property:"opacity",duration:".5s",timingFunction:"easeInOut"},":disabled":{transitionDelay:"4s",":hover":{backgroundColor:y.Wfp}},backgroundColor:y.yGP,":hover":{backgroundColor:y.kXR}}),Ft=(0,v.I4)(p.H5,{margin:{top:0,bottom:y.EXj}}),Ut=(0,v.I4)(p.H4,{fontSize:y.pU_,margin:{y:8}}),zt=v.I4.div({display:"flex",justifyContent:"center"}),Ht=v.I4.h3((0,y.Wlv)("SubtitleLarge"),{margin:{y:0}}),Jt=(0,v.I4)(l.wn,{margin:{top:y.nU9}}),qt=v.I4.div({backgroundColor:y.WIM,padding:{xy:y.asY},borderRadius:y.LcP.small,textAlign:"left",margin:{x:0,y:y.LcP.medium}}),Kt=v.I4.div({marginBottom:y.YaY,backgroundColor:y.Jy6,padding:{xy:y.EXj},borderRadius:y.EXj}),Qt=(0,v.I4)(h._s,(0,ne.k)({offset:y.q$c})),Zt="span",en=v.I4.div({display:"flex",alignItems:"center",height:50,padding:{xy:y.EXj}}),tn=(0,v.I4)(ye.A,(0,ne.k)({offset:y.q$c,borderRadius:y.yLY}),{fontSize:y.pU_,display:"inline-block",textDecoration:"underline",color:y.wDm}),nn=v.I4.div({fontSize:y.pU_,backgroundColor:y.Wfp,padding:{y:4,x:16},marginBottom:8}),an=v.I4.div({marginTop:y.EXj}),on=(0,v.I4)(P,{backgroundColor:y.wB3,borderRadius:y.EXj,lineHeight:"30px"}),rn=(0,v.I4)(Ke,{backgroundColor:y.wB3,borderRadius:y.nU9}),ln=v.I4.div({margin:{y:y.EXj},padding:{xy:y.EXj},borderRadius:y.EXj,border:{xy:{width:y.yLY,style:"solid",color:y.Wfp}},backgroundColor:y.ONy}),cn=v.I4.div(Object.assign({},(0,J.gD)(":not(:last-child)",{marginBottom:y.EXj,paddingBottom:12}))),sn=v.I4.div({paddingRight:y.EXj,width:"100%"}),dn=v.I4.div({display:"flex",flexDirection:"column",justifyContent:"space-between"}),un=v.I4.div({margin:{left:y.YaY,bottom:y.asY},fontSize:14}),mn=v.I4.span({position:"absolute",height:"100%",width:({isCompact:e})=>e?"85%":"93%",top:0,transform:"translate(-100%, 0)"}),pn=(0,v.I4)(bt.A,{fontSize:18,transform:"rotate(180deg)",margin:{x:y.nU9}}),hn=v.I4.div({margin:{y:y.YaY}}),gn=v.I4.div({backgroundColor:y.ONy,padding:{xy:y.EXj},borderRadius:y.nU9}),fn=v.I4.div({display:"flex",justifyContent:"center",marginBottom:y.asY}),yn=(0,v.I4)(p.Ul,{display:"flex",width:"100%"}),vn={textAlign:"center",margin:{y:y.asY},padding:{x:y.asY},position:"relative"},En={textAlign:"center",margin:{y:y.asY},padding:{x:y.asY}},Cn={width:"50%",marginLeft:"auto",marginRight:"auto"},kn={fontSize:y.NiS,whiteSpace:"nowrap",padding:{x:y.YaY},width:"100%",margin:{y:y.EXj}}
2,bn={display:"flex"},Sn={marginTop:y.YaY}},5340:(e,t,n)=>{n.d(t,{default:()=>j});var a=n(3696),o=n(774),r=n(2364),i=n(5007),l=n(2708),c=n(3071),s=n(380),d=n(3782);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}const m=(0,o.I4)((0,o.jg)(e=>{var t,n;const o=(0,r.Vy)(),i=(0,r.ju)(),l=null===(t=o.checkoutData.additional)||void 0===t?void 0:t.selectedDropPointIdByWarehouseCode[e.warehouseCode];return e.dropPoints&&(null===(n=e.dropPoints)||void 0===n?void 0:n.length)>0&&a.createElement(p,u({css:e.compose(),value:l,options:e.dropPoints,onChangeOption:function(t){i.setSelectedDropPointId(Object.assign(Object.assign({},o.checkoutData.additional.selectedDropPointIdByWarehouseCode),{[e.warehouseCode]:t}))}},"MyPack Collect"===e.testElement?d.GB.CheckoutDropPointMyPackDropdown:1===e.warehouseCount?d.GB.CheckoutDropPointStoreDropdownOne:d.GB.CheckoutDropPointStoreDropdownTwo))})),p=(0,o.I4)(s.A,{width:({isCompact:e})=>e?"16.5rem":"330px",maxWidth:"100%",backgroundColor:c.ONy});var h=n(9540),g=n(4702),f=n(6166),y=n(667),v=n(7062),E=n(6739),C=n(7539),k=n(992),b=n(726);const S=(0,o.I4)(({parcels:e,cost:t})=>{var n,o;const i=(0,C.d)(e=>e.appShellData.siteSettings.porterbuddyToken),l=(0,C.d)(e=>e.appShellData.siteSettings.porterbuddyUrl),c=(0,C.d)(e=>e.appShellData.siteSettings.porterbuddyWidgetUrl),{stores:s,storeId:d}=(0,b.z)(),u=s.find(e=>e.storeId.toString()===d);if(!i||!l)return null;const{checkoutData:{billingAddress:m}}=(0,r.Vy)(),p=e.reduce((e,t)=>[{description:null==t?void 0:t.displayName},...e],[]),h=(0,a.useMemo)(()=>({originAddress:{streetName:u.street,postalCode:u.postalCode,city:u.city,country:"Norway"},destinationAddress:{streetName:m.line1,postalCode:m.postalCode,city:m.city,country:"Norway"},products:["delivery"],parcels:p}),[u,m,p]),g=null===(o=null===(n=(0,E.Z)({requestValues:h}))||void 0===n?void 0:n.current)||void 0===o?void 0:o.requestValues,[S,I]=(0,a.useState)(void 0),T=(0,a.useRef)(null),{setPorterBuddyWindow:w}=(0,r.ju)();function Y(e,t){return e.city===t.city&&e.country===t.country&&e.postalCode===t.postalCode&&e.streetName===t.streetName}return(0,k.N)(()=>{const e=g,t=h,n=Y(e.originAddress,t.originAddress),a=Y(e.destinationAddress,t.destinationAddress),o=e.parcels.length===t.parcels.length&&e.parcels.every((e,n)=>e.description===t.parcels[n].description);n&&a&&o&&S||!h||I(h)},[S,g,h]),(0,k.N)(()=>{(0,y.BdH)()&&S&&((0,v.A)(`${c}porterbuddy-widget.css`),(0,y.k07)(`${c}porterbuddy-widget.js`,e=>(e.async=!0,e)).then(()=>fetch(`${l}/availability`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json","x-public-token":i},body:JSON.stringify(S)}).then(e=>{e.json().then(e=>{var{deliveryWindows:n}=e,a=(0,f.__rest)(e,["deliveryWindows"]);const o=Object.assign(Object.assign({},a),{deliveryWindows:n.map(e=>Object.assign(Object.assign({},e),{price:Object.assign(Object.assign({},e.price),{fractionalDenomination:`${t.inclVat}00`})}))});window.porterbuddy={token:i,view:"checkout",availabilityResponse:o,onSelectDeliveryWindow:function(e){w({start:JSON.stringify(e.start),end:JSON.stringify(e.end),token:e.token,price:e.price.fractionalDenomination})},onSetCallbacks:function(e){T.current=e}}})}).then(()=>{const e=setInterval(()=>{var t;(null===(t=null==T?void 0:T.current)||void 0===t?void 0:t.setSelectedDeliveryWindow)&&(T.current.setSelectedDeliveryWindow(void 0,!0),clearInterval(e))},200)})))},[S,t.inclVat,i,l,c,w]),a.createElement(x,{id:"porterbuddy-widget","data-border":!0})}),x=o.I4.div({minHeight:250,backgroundColor:c.ONy});var I=n(7600),T=n(2833),w=n(1794);function Y(e,t){let n=e.toLowerCase();return n=n.replace(/æ/g,"a"),n=n.replace(/ø/g,"o"),n=n.replace(/å/g,"a"),n=n.replace(/\s+/g,"-"),`${n}-${t}`}const j=e=>{var t;const n=(0,h.tO)(),o=(0,r.Vy)(),l=(0,r.ju)(),{warehouseCode:s,isPorterbuddy:d,name:u,serviceToCustomer:p}=e,g=e.id===o.checkoutData.additional.selectedShippingMethodIdByWarehouseCode[s],[f,y]=(0,a.useState)({}),v=(0,I.i)("display_estimated_delivery_time",e.experimentationData);(0,a.useEffect)(()=>{var t,n;l.setSelectedServiceToCustomerId(Object.assign(Object.assign({},null===(n=null===(t=o.checkoutData)||void 0===t?void 0:t.additional)||void 0===n?void 0:n.selectedServicesToCustomerByShippingMethodCode[s]),{[e.id]:Object.keys(f).filter(e=>f[e])}))},[e.id,f]);const E=(0,w.t)("toggleShippingMethodAdditionalInfo"),C=e=>{y(Object.assign(Object.assign({},f),{[e.target.name]:e.target.checked}))},k=(g||E)&&a.createElement(W,{css:e.orderLength>1&&{width:"80%"}},e.deliveryText),b=g&&E&&a.createElement(W,{css:e.orderLength>1&&{width:"80%"}},e.additionalInfoText),x=a.createElement(B,{css:e.orderLength>1&&{width:"85%"}},!!g&&a.createElement(m,{dropPoints:e.dropPointSelectOptions,warehouseCode:s,css:H,testElement:u,warehouseCount:e.warehouseCount})),T=a.createElement(P,null,a.createElement(L,null,a.createElement(V,null,a.createElement(X,null,e.name," -"),a.createElement("div",null,a.createElement(i.R,{current:{inclVat:e.cost.inclVat,exclVat:e.cost.exclVat},css:J}))),"variation_1"===v&&a.createElement(z,null,function(e){let t="";if(/Porterbuddy/.test(e))return"Du vil motta en melding fra Porterbuddy når pakken er klar for levering";if(/henting innen 24 timer/.test(e))return"Normalt er varene klare for henting innen 24 timer innenfor butikkens åpningtid";const n=e.match(/(\d+(?:-\d+)?)\s*virkedager|virkedager\s*(\d+(?:-\d+)?)/);n&&(t=`Normal leveringstid er ${n[1]?n[1]:n[2]} virkedager`);const a=e.match(/(\d+)\s*timer|timer\s*(\d+)/);a&&(t=`Normalt klar for henting etter ${a[1]?a[1]:a[2]} timer`);return t}(e.deliveryText)),n?a.createElement(a.Fragment,null,k,b,x):a.createElement(R,null,k,b,x)),(null==p?void 0:p.length)>0&&!!g&&a.createElement(A,null,a.createElement(M,null,"Tilleggstjenester for ",e.name),null==p?void 0:p.map((e,t)=>a.createElement(_,{key:t},a.createElement($,{name:e.consignorID,checked:!!f[e.consignorID],onChange:C},a.createElement(V,null,a.createElement(X,null,e.name),a.createElement(i.R,{css:q,current:e.price}))),a.createElement(N,null,a.createElement(G,null,e.description)))))),j=(0,a.useCallback)(()=>{g||l.selectedShippingMethodId(Object.assign(Object.assign({},o.checkoutData.additional.selectedShippingMethodIdByWarehouseCode),{[s]:e.id}))},[l,g,e.id,o.checkoutData.additional.selectedShippingMethodIdByWarehouseCode,s]);return a.createElement(D,null,a.createElement(O,{tabIndex:g?-1:0,key:e.id,onClick:j,onKeyDown:e=>{"Enter"===e.key&&j()},css:!!(null===(t=e.dropPointSelectOptions)||void 0===t?void 0:t.length)&&{paddingBottom:c.YaY},"data-test-id":Y(e.name,e.id)},a.createElement(U,{tabIndex:-1,name:"shippingmethod",value:e.id,checked:g,css:K},T),!!d&&!!g&&a.createElement(S,{parcels:e.shippingGroupItems,cost:e.cost})))},D=o.I4.div(Object.assign({},(0,g.gD)(":not(:last-child)",{borderBottom:{color:c.rjy,style:"solid",width:"thin"}}))),P=o.I4.div({display:"flex",flexDirection:"column"}),O=o.I4.li((0,T.k)({}),{cursor:"pointer",padding:{x:c.EXj,top:c.YaY,bottom:c.YaY},borderRadius:4,marginTop:4.5}),L=o.I4.div({display:"flex",flexDirection:"column",marginLeft:c.EXj,marginTop:-c.nU9,lineHeight:1.7}),B=o.I4.div({width:({isCompact:e})=>e?"85%":"inherit",display:"block"}),A=o.I4.div({display:"flex",flexDirection:"column",marginLeft:c.EXj}),_=o.I4.div({position:"relative",margin:{bottom:c.YaY,left:c.nU9}}),M=o.I4.p({margin:{top:c.asY,bottom:c.YaY}}),N=o.I4.div({width:"100%",padding:{x:26},margin:{bottom:c.EXj}}),G=o.I4.p({margin:{xy:0}}),V=(0,o.I4)(B,{display:"flex",flexWrap:"wrap",width:288}),W=(0,o.I4)(B,{width:"auto",maxWidth:({isCompact:e})=>e?"16rem":"20rem",fontSize:c.pU_}),R=o.I4.div({display:"flex",flexDirection:"column",minWidth:350}),X=o.I4.span({marginRight:c.EXj}),$=(0,o.I4)(l.Sc,{alignItems:"center",margin:{bottom:0}}),F=(0,o.I4)({marginBottom:0,flexBasis:e=>e.isCompact?"auto":250}),U=(0,o.I4)(l.sx,F),z=o.I4.p({margin:{xy:0}}),H={marginTop:c.EXj,width:"100%"},J={fontSize:9.142857},q={fontSize:10},K={position:"relative"}}
2,7062:(e,t,n)=>{n.d(t,{A:()=>r});const a={},o={},r=(e,t)=>{if(!(e in a)){let n=document.createElement("link");n.href=e,n.type="text/css",n.rel="stylesheet",t&&(n=t(n)),a[e]=new Promise((t,a)=>{n.onload=()=>{o[e]=n,t()},n.onerror=a,document.body.appendChild(n)})}return a[e]}},8898:(e,t,n)=>{n.d(t,{Af:()=>l,OP:()=>i,mk:()=>r,xQ:()=>o});var a=n(667);function o(e){return`info=${e}`}function r(){const e=new URL(document.location.href);e.searchParams.has("info")&&history.replaceState&&(e.searchParams.delete("info"),history.replaceState(history.state,document.title,e.toString()))}function i(e){return!!e}function l(e){return"not-fullfiled-predefined-cart"===e?{title:(0,a.TlY)("/KnownMessages/Information/NotFullfiledPredefinedCartTitle"),message:(0,a.TlY)("/KnownMessages/Information/NotFullfiledPredefinedCartText")}:null}},9221:(e,t,n)=>{n.d(t,{b:()=>r});var a=n(4702),o=n(3071);const r=()=>Object.assign({},(0,a.gD)(":focus",{outline:{width:o.yLY,color:o.b5r,style:"solid"}}))}},e=>{Object.assign(e.sriHashes,{6013:"sha384-FXCqpGkDTrjieenYCKKMmLE0D1zprZ+xPYePrqf5ToKSXEN8OldSSuHlWF++Tq6y"})}]);
3//# sourceMappingURL=9488.chunk.ad17c6513f3c816fd1cd.js.map

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.