1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`5e6b11730a1cc37b0c944ac12baa12b0d8bd7ebf`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`4b79fc39-ca35-48de-a40e-eb15fbb111aa`,e._sentryDebugIdIdentifier=`sentry-dbid-4b79fc39-ca35-48de-a40e-eb15fbb111aa`)}catch{}})();import{A as e,C as t,E as n,Et as r,Ht as i,L as a,M as o,Pt as s,S as c,T as l,X as u,a as d,ft as f,in as p,k as m,nn as h,pt as g,rt as _,sn as v,t as y,vt as b,w as x,y as S}from"./C9n7DQ_O.js";import{i as C}from"./P-HUrDe7.js";import{t as ee}from"./CGWJKfFM.js";import{E as te,g as ne,h as w,i as T,o as E,t as D}from"./DRQOAJEH.js";import{t as O}from"./CgOn9cKa.js";import{t as k}from"./B97TMu_b2.js";import{t as re}from"./BDGpv7rr2.js";import{t as A}from"./CR2eH2nX.js";import{t as j}from"./Co-yTiaF.js";import{t as M}from"./u06cQa_L.js";import{n as N}from"./hqsD3-IO.js";import{n as P,t as F}from"./DL7_muFP.js";import{t as I}from"./VDgIj4Dc2.js";import{t as L}from"./CsqQH4XI2.js";var R=e=>{let t=e.split(`.`).pop()||``;return[`webm`,`mpg`,`mpeg`,`mpe`,`mp4`,`m4p`,`m4v`,`avi`,`wmv`,`mov`].includes(t)},z=e=>e===``?`center`:e.replace(`object-`,``).replaceAll(`-`,` `),B=(e,t)=>{if(!e||!e.includes(`storyblok.com`))return e;e=e.replace(`a.storyblok.com`,`img2.storyblok.com`);let n=e.split(`/f/`),r=`/${t*2}x0/filters:format%28webp%29`;return`${n[0]}${r}/f/${n[1]}`};a(),b(),i();var V={class:`ProductPrice relative type-sm flex flex-col justify-start gap-0 desk:gap-2`},H={key:0,class:`priceLoadBox`},U={key:1,class:`priceLoadBox recommendedPriceLoadBox`},W={class:`sr-only`},G={class:`text-fg-error`},K=O(o({__name:`ProductPrice`,props:{productItem:{},activeVariant:{},crossell:{type:Boolean},design:{}},setup(e){let r=e,i=T(),{productPrice:a}=I(),o=c(()=>i.getPrice(r.activeVariant.partNo,r.crossell??!1)),d=c(()=>i.isSalePrice(r.activeVariant.partNo));return c(()=>r.activeVariant.stockStatuses?.some(e=>e.inStock>0)?r.productItem.displayFlags.filter(e=>e.code!==`onDemand`):r.productItem.displayFlags),(r,i)=>(u(),n(`div`,V,[s(o).status===`logginIn`||s(o).status===`pending`?(u(),n(`div`,H)):l(``,!0),s(o).status===`logginIn`||s(o).status===`pending`?(u(),n(`div`,U)):l(``,!0),s(o).status===`ok`?(u(),n(`p`,{key:2,class:h([`whitespace-nowrap text-fg`,{"text-fg-error":s(d),"type-headline-xl":e.design!==`list`,"type-headline-sm":e.design===`list`}])},[t(`span`,W,v(r.$t(`a11y.price.current`)),1),m(` `+v(s(a)(s(o).price,`price`,!0)),1)],2)):l(``,!0),s(o).price?.isCustomerPrice&&s(o).price?.discountPercentage>0||s(o).price?.isCampaignPrice||s(d)?(u(),n(`p`,{key:3,class:h([`text-fg-muted`,{"leading-single":e.design===`list`}])},[m(v(r.$t(`productPage.price.original`))+` `+v(s(a)(s(o).price,`priceBeforeDiscount`,!0))+` `,1),s(o).price?.isCustomerPrice?(u(),n(`span`,{key:0,class:h({hidden:e.design===`list`})},[m(` (`+v(r.$t(`productPage.price.yourDiscount`))+` `,1),t(`span`,G,v(s(o).price?.discountPercentage)+`%`,1),i[0]||=m(`) `,-1)],2)):l(``,!0)],2)):l(``,!0),s(o).price?.recommendedPriceDisplay?(u(),n(`p`,{key:4,class:h([`type-sm text-fg-muted`,{"leading-single":e.design===`list`}])},v(r.$t(`product.recommendedPrice.short`))+` `+v(s(o).price?.recommendedPriceDisplay),3)):l(``,!0)]))}}),[[`__scopeId`,`data-v-b35117ec`]]);b(),a(),i(),d();var q={key:0,class:`p-32 flex items-center justify-center`},J={key:1},ie={class:`relative`},Y={key:0,class:`absolute w-70 h-70 top-0 left-0 mt-16 ml-16 z-40`},ae=[`src`],oe={key:0},se={key:1},ce={key:2,class:`grid grid-cols-2`},le={key:1,src:A,class:`w-full`,alt:``},ue={key:0,class:`w-full h-full object-cover mb-4`,loop:``,muted:``,autoplay:``,playsinline:``},X=[`src`],de={key:3,class:`relative`},fe={key:1,src:A,class:`aspect-square w-full max-h-[480px]`,alt:``},pe={class:`p-16 pb-0`},Z=o({__name:`QuickBuy`,props:{manualProduct:{},additionalImage:{},manualWidth:{}},emits:[`closeMenu`],async setup(i){let a,o,d=D(),m=E(),v=ee(),b=r(!0),{getProductByPartNo:T}=w(),O=i,A=c(()=>O.manualWidth?`desk:w-[${O.manualWidth}px]`:``),I=c(()=>O.manualWidth?`desk:${O.manualWidth}px`:`desk:350px`),V=r(O.manualProduct?O.manualProduct:m.currentlyBuying);if(!V.value)throw C({statusCode:500,statusMessage:`Quickbuy without a product`});let H=()=>
1{if(V.value){let e=m.currentlyBuyingPrimaryVariant?V.value.variants.findIndex(e=>e.isPrimary):V.value.variants.findIndex(e=>e.partNo===m.currentlyBuying.partNo);e===-1&&(e=0),U.value=V.value.variants[e]}},U=r(V.value.variants[0]);if(H(),!V.value.limitedVariantLoaded)b.value=!1;else{let e=([a,o]=f(()=>T(V.value.partNo)),a=await a,o(),a);e?(V.value=ne(e.hits),H(),b.value=!1):v.setTemporaryError(`Failed to load product`,0)}let W=m.isBuyingUpsellProduct,G=r(V.value.partNo);V.value.variants.length&&(G.value=V.value.variants[0].partNo);let Z=r(te.DefaultImages),me=r(!1),he=async()=>{v.quickBuyCloseAfterAdd&&v.closeAllModal()},Q=c(()=>V.value?.imagesAndVideo(Z.value,U.value)||[]),ge=c(()=>O.additionalImage?.file&&!R(O.additionalImage.file)?{backgroundImage:`url(${B(O.additionalImage.file,758)})`,backgroundSize:`cover`,backgroundPosition:z(O.additionalImage.imagePosition)}:{}),$=r(``),_e=e=>{if(Q.value[e].linkedVideo){$.value=Q.value[e].linkedVideo;return}},ve=()=>{$.value=``};return(r,a)=>{let o=k;return u(),x(_(i.manualProduct?`div`:M),{position:`right`,class:h([`QuickBuy`,s(A)]),"header-class":`bg-transparent border-b-0 absolute top-0 p-16 z-40`,"content-class":`!p-0`,small:``,onClose:a[2]||=e=>s(v).closeAllModal()},{default:g(()=>[s(b)?(u(),n(`div`,q,[e(re)])):s(V)?(u(),n(`div`,J,[t(`div`,ie,[s(U).hasBuyMoreCampaign?(u(),n(`div`,Y,[t(`img`,{src:`/splashes/buy-more-${s(d).getLocale}.svg`,alt:``},null,8,ae)])):s(V).isNewProduct||s(U).isOnSaleForUser?(u(),n(`div`,{key:1,class:h([`absolute top-12 left-12 z-40 flex items-center justify-center w-64 h-64 type-headline-xs text-fg-inverse text-center leading-single rounded-full overflow-hidden pointer-events-none -rotate-12`,{"bg-surface-inverse":s(V).isNewProduct,"bg-surface-error-strong":s(U).isOnSaleForUser}])},[s(V).isNewProduct?(u(),n(`div`,oe,`Nyhet`)):(u(),n(`div`,se,`Rea`))],2)):l(``,!0),i.additionalImage?(u(),n(`div`,ce,[s(Q).length?(u(),x(o,{key:0,src:s(Q)[0].file,provider:`norce`,alt:``,preset:`standard`,loading:`lazy`,sizes:`sm:50vw`},null,8,[`src`])):(u(),n(`img`,le)),t(`div`,{style:p(s(ge))},[(`checkIfVideoFile`in r?r.checkIfVideoFile:s(R))(i.additionalImage.file)?(u(),n(`video`,ue,[t(`source`,{src:i.additionalImage.file,type:`video/mp4`},null,8,X)])):l(``,!0)],4)])):(u(),n(`div`,de,[s(Q).length>0?(u(),x(j,{key:0,images:s(Q),"slide-margin":2,"slide-width":100,"lazy-first-image":!1,sizes:s(I),ratio:`3:3`,onImageClick:_e},null,8,[`images`,`sizes`])):(u(),n(`img`,fe)),a[3]||=t(`div`,{class:`imageOverlay absolute top-0 left-0 w-full h-full pointer-events-none`},null,-1)]))]),t(`div`,pe,[e(F,{"product-item":s(V),"active-variant":s(U),"show-part-no":!1,"show-description":!1,class:`mb-16`},null,8,[`product-item`,`active-variant`]),(u(),x(K,{key:s(U).partNo,class:`mb-16`,crossell:s(W),"product-item":s(V),"active-variant":s(U),design:`standard`},null,8,[`crossell`,`product-item`,`active-variant`])),e(N,{class:`mb-16`,"product-item":s(V),"active-variant":s(U),design:`quickbuy`,onUpdateActiveVariant:a[0]||=e=>U.value=e},null,8,[`product-item`,`active-variant`]),s(U)?(u(),x(P,{key:s(U).partNo,"active-variant":s(U),"product-item":s(V),design:`quickbuy`,crossell:s(W),onAddToCart:he,onAddingToCart:a[1]||=()=>me.value=!0},null,8,[`active-variant`,`product-item`,`crossell`])):l(``,!0)])])):l(``,!0),(u(),x(S,{to:`body`},[e(y,{name:`fade`},{default:g(()=>[s($)===``?l(``,!0):(u(),x(L,{key:0,"video-file":s($),onClose:ve},null,8,[`video-file`]))]),_:1})]))]),_:1},40,[`class`])}}});export{z as n,Z as t}; 2//# sourceMappingURL=D2s82zJ4.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.