PageSourceSearch

https://www.lappset.com/_nuxt/BPlzvKj4.js

js lappset.com collected 2026-09-25 20:41:32 UTC 62,972 bytes, 7 lines download raw bytes

1import{E as Ze,G as Jt,u as _a,v as d,i as h,aN as qt,K as ba,k as X,af as Oa,ag as Ra,aO as Fa,a8 as Ut,n as H,L as r,V as Se,U as N,l as I,ah as Xt,aP as Aa,aQ as Ca,r as P,c as Zt,aB as ka,B as Pa,e as R,R as Xe,aR as mt,a5 as pt,t as Ma,aS as Kt,aK as Na,aL as xa,aM as $a,C as Yt,j as m,F as ee,m as U,y as ce,aH as Ua,aF as Qt,aA as Va,q as en,aT as La,S as wa,$ as Ga,ay as Ta,d as tn,z as dt,J as da,ab as ut,o as Sa,aa as xt,aU as ma,aV as ze,aW as Ha,am as pa,aX as Ba,ae as za,az as ja,aY as ga,aZ as Wt,P as fa,a1 as Vt,s as gt,T as Wa,a_ as qa,a$ as Ka,w as ha,f as Ya,h as Qa,b0 as Ja,b1 as Xa,p as Ea,_ as Za,D as va,aw as Je,b2 as eo,A as to}from"./DC_4iFUA.js";import{_ as no}from"./BvjpN_Ww.js";import{u as ao}from"./DwLb6q8I.js";import{_ as oo,a as so}from"./DslTMqll.js";import{_ as ya}from"./BQLp3X50.js";const lo=Jt({name:"CartChecker",setup(){return{cartStore:_a()}},async created(){if(!this.cartStore.get){const A=await this.$azureApi(`order/cart?locale=${this.$i18n.locale}&email=`,{method:"POST"});this.cartStore.set(A)}}},"$nqDEpzcdeb");function ro(A,i,B,y,g,x){return d(),h("div")}const io=Ze(lo,[["render",ro]]),co=Jt({name:"CustomerReference",components:{StandardContentSection:qt},props:["fields"],data(){var A,i,B,y,g,x,w,be,oe,te;return{customerReferenceArgs:{subtitle:((A=this.fields)==null?void 0:A.subtitle)||t("customer-reference"),imageSrc:((i=this.fields)==null?void 0:i.imageSrc)||"",imageAlt:((B=this.fields)==null?void 0:B.imageAlt)||"",heading:((y=this.fields)==null?void 0:y.heading)||"",description:((g=this.fields)==null?void 0:g.description)||"",buttonLabel:((x=this.fields)==null?void 0:x.buttonLabel)||"",buttonLink:((w=this.fields)==null?void 0:w.buttonLink)||"",buttonSize:((be=this.fields)==null?void 0:be.buttonSize)||"",buttonState:((oe=this.fields)==null?void 0:oe.buttonState)||"",buttonVariant:((te=this.fields)==null?void 0:te.buttonVariant)||""}}}},"$fLgy3dt42z");function uo(A,i,B,y,g,x){const w=ba("StandardContentSection");return d(),X(w,Oa(Ra(A.customerReferenceArgs)),null,16)}const mo=Ze(co,[["render",uo]]),po=Jt({name:"Sustainability",props:["fields"],components:{HighlightSection:Fa},computed:{sustainabilityArgs(){return{columnWidthRatio:this.fields&&this.fields.columnWidthRatio||"1:2",containerPadding:this.fields&&this.fields.containerPadding||""}},renderColumn2(){var A;if((A=this.fields)!=null&&A.column2)return Ut(this.fields.column2)}}},"$IHy4usa864"),Gt=A=>(Aa("data-v-4287f8d2"),A=A(),Ca(),A),go={class:"sustainability__column align-center sustainability__column--first"},fo={key:0},ho=Gt(()=>r("h6",null,[r("p",null,"GWP-fossil")],-1)),vo=Gt(()=>r("sub",null,"2",-1)),yo={key:1},_o=Gt(()=>r("h6",null,[r("p",null,"GWP-total")],-1)),bo=Gt(()=>r("sub",null,"2",-1)),Ao=["innerHTML"];function Co(A,i,B,y,g,x){const w=ba("HighlightSection");return d(),X(w,Xt(A.sustainabilityArgs,{class:"sustainability__container"}),{"first-column":H(()=>{var be,oe;return[r("div",go,[(be=A.fields)!=null&&be.gwpFossil?(d(),h("div",fo,[ho,r("h5",null,[r("p",null,[Se("~"+N(A.fields.gwpFossil)+" kg CO",1),vo,Se("e")])])])):I("",!0),(oe=A.fields)!=null&&oe.gwpTotal?(d(),h("div",yo,[_o,r("h5",null,[r("p",null,[Se("~"+N(A.fields.gwpTotal)+" kg CO",1),bo,Se("e")])])])):I("",!0)])]}),"second-column":H(()=>[r("div",{class:"sustainability__column sustainability__column--second",innerHTML:A.renderColumn2},null,8,Ao)]),_:1},16)}const ko=Ze(po,[["render",Co],["__scopeId","data-v-4287f8d2"]]),Po={key:0,class:"recommendation__container"},$o={class:"recommendation__heading-container"},Lo={class:"recommendation__heading-links"},wo={class:"recommendation__scroll-container"},To={class:"recommendation__highlight-card-content"},So={class:"recommendation__highlight-card-title"},Eo={class:"recommendation__highlight-card-label"},Io={__name:"Recommendation",props:["fields"],setup(A){var le,Oe,Ge;const i=A,B=P([]),y=en(),{locale:g,t:x}=Zt(),{canShowPrice:w}=ka(),be=Pa(),oe=R(()=>{var _;return((_=i.fields)==null?void 0:_.isMyDesign)||B.value.some(b=>b.isMyDesign)}),te=R(()=>{var D,Z,Y,V;const _=(Z=(D=i.fields)==null?void 0:D.highlightContent)==null?void 0:Z.overrideLinkLabel,b=(V=(Y=i.fields)==null?void 0:Y.highlightContent)==null?void 0:V.overrideLink,T=typeof b=="string"?b:(b==null?void 0:b.href)||(b==null?void 0:b.url)||"";return!_||!T?null:{label:_,to:T}}),ue=R(()=>{var b,T;const _=((T=(b=i.fields)==null?void 0:b.categories[0].obj)==null?void 0:T.name[g.value])??"";return _?`${x("Show more")} ${_.toLowerCase()}`:x("Show more")}),Ae=R(()=>{var b,T;const _=((T=(b=i.fields)==null?void 0:b.categories[0].obj)==null?void 0:T.name[g.value])??"";return _?`${x("Show more")} MyDesign ${_.toLowerCase()}`:x("Show more")}),u=R(()=>{var _;return`/${g.value}/${Xe.pageCatalog[g.value]}/${mt((_=i.fields)==null?void 0:_.categories[0].obj,g.value)}`}),Ue=R(()=>{var _;return mt((_=i.fields)==null?void 0:_.categories[0].obj,g.value)??""}),Q=P(!1),se=async()=>{const _=Ue.value.split("/"),b=_[_.length-1];if(!b){Q.value=!1;return}try{await $fetch(`${y.public.BACKEND_API_BASE_URL}/content/contentPage`,{method:"GET",query:{slug:b,locale:g.value,contentType:"pageCatalog",preview:"false"}}),console.log("myDesignPageExists ::::::",Q.value),Q.value=!0}catch(T){console.log("error ::::::",T),Q.value=!1}};pt([Ue,()=>g.value,te],()=>{if(te.value){Q.value=!1;return}se()},{immediate:!0});const Ve=(_,b,T,D)=>{if(!_||!b)return"";const Z=_/Math.pow(10,b),Y=La[T]||D;return wa(Z,T,Y)||""},f=(_,b)=>{var Z,Y,V,ge;if(!_||_.length===0)return"";const T=Ta[b];let D=null;return T&&(D=(Z=_.find(re=>re.country===T))==null?void 0:Z.value,D||(D=(Y=_.find(re=>re.country===T.toUpperCase()))==null?void 0:Y.value)),D||(D=(V=_.find(re=>!re.country))==null?void 0:V.value),!D&&_.length>0&&(D=(ge=_[0])==null?void 0:ge.value),D?Ve(D.centAmount,D.fractionDigits,b,D.currencyCode):""},E=((Oe=(le=i.fields)==null?void 0:le.categories)==null?void 0:Oe.map(_=>{var b;return(b=_.obj)==null?void 0:b.id}))??[],{data:ne}
1=Ma(`recommendation-products-${(Ge=i.fields)==null?void 0:Ge.productSku}`,()=>{var _,b,T;return $fetch("product/recommendations",{method:"POST",query:{locale:g.value,sort:(E==null?void 0:E.length)>0?`categoryOrderHints.${E[E.length-1]} asc`:"variants.attributes.product-priority%20asc",categories:E[0]},body:{productGroup:((_=i.fields)==null?void 0:_.productGroup)??[],productOfOrigin:((b=i.fields)==null?void 0:b.productSku)??"",domain:"webshop"},headers:{"x-sku":(T=i.fields)==null?void 0:T.productSku},baseURL:y.public.BACKEND_API_BASE_URL})},{transform:_=>_!=null&&_.results?_.results.map(b=>{var Y,V,ge,re,Ce,Pe,ie,$e,Le,he;const T=(Y=b.masterVariant)==null?void 0:Y.prices,D=(ge=(V=T==null?void 0:T[0])==null?void 0:V.discounted)==null?void 0:ge.value,Z=((Pe=(Ce=(re=b.masterVariant)==null?void 0:re.attributes)==null?void 0:Ce.find(ke=>ke.name==="sparkified"))==null?void 0:Pe.value)===!0;return{title:Kt(((ie=b.name)==null?void 0:ie[g.value])||(($e=b.name)==null?void 0:$e["en-GB"])||"",g.value),price:b.myDesign??!1?"":f(T,g.value),oldPrice:b.myDesign??!1?"":D?Ve(D.centAmount,D.fractionDigits,g.value,D.currencyCode):"",image:Na(b)||"",imageHover:xa(b)||"",tags:$a(b,g.value,x),sku:((Le=b.masterVariant)==null?void 0:Le.sku)||"",isFavorite:!1,href:be("/"+Yt(b.name,(he=b.masterVariant)==null?void 0:he.sku,g.value)),isMyDesign:b.myDesign??!1,isSpark:Z}}):[]});pt(ne,_=>{B.value=_||[]},{immediate:!0});const de=R(()=>w.value?B.value:B.value.map(_=>({..._,price:"",oldPrice:""})));return(_,b)=>{var D,Z;const T=Ga;return m(de).length>0?(d(),h("div",Po,[r("div",$o,[r("h4",null,N((Z=(D=A.fields)==null?void 0:D.highlightContent)==null?void 0:Z.header),1),r("div",Lo,[m(te)?(d(),X(T,{key:0,to:m(te).to,class:"recommendation__heading-link"},{default:H(()=>[Se(N(m(te).label),1)]),_:1},8,["to"])):(d(),h(ee,{key:1},[U(T,{to:m(u),class:"recommendation__heading-link"},{default:H(()=>[Se(N(m(ue)),1)]),_:1},8,["to"]),Q.value&&m(oe)?(d(),X(T,{key:0,to:m(u)+"?mydesign=true",class:"recommendation__heading-link"},{default:H(()=>[Se(N(m(Ae)),1)]),_:1},8,["to"])):I("",!0)],64))])]),r("div",wo,[(d(!0),h(ee,null,ce(m(de),(Y,V)=>(d(),h("article",{key:V},[(d(),X(m(Ua),Xt({key:V,ref_for:!0},Y,{class:"recommendation__product-card",addShadow:!0,cardColor:"#ffffff"}),null,16))]))),128)),r("article",To,[U(m(Va),{contentAlignment:"flex-start",showCurvyBottomRight:!0,curvyColor:"#F4F4F4"},{default:H(()=>{var Y,V,ge,re,Ce,Pe,ie,$e,Le,he;return[r("h6",So,N((V=(Y=A.fields)==null?void 0:Y.highlightContent)==null?void 0:V.ctaHeader),1),r("div",Eo,N((re=(ge=A.fields)==null?void 0:ge.highlightContent)==null?void 0:re.content),1),U(T,{to:(Pe=(Ce=A.fields)==null?void 0:Ce.highlightContent)==null?void 0:Pe.ctaLink,class:"recommendation__highlight-card-cta","aria-label":`${(($e=(ie=A.fields)==null?void 0:ie.highlightContent)==null?void 0:$e.title)||"Suunnitellaan MyDesign"} - ${((he=(Le=A.fields)==null?void 0:Le.highlightContent)==null?void 0:he.content)||"Navigate to MyDesign"}`},{default:H(()=>{var ke,Ee;return[U(m(Qt),{variant:"outline-rounded",label:((Ee=(ke=A.fields)==null?void 0:ke.highlightContent)==null?void 0:Ee.ctaLabel)??"",class:"recommendation__button",icon:"brush",textColor:"#ffffff",backgroundColor:"#09875A",borderColor:"#09875A"},null,8,["label"])]}),_:1},8,["to","aria-label"])]}),_:1})])])])):I("",!0)}}},Do=Ze(Io,[["__scopeId","data-v-ac2bb78e"]]);var Oo={prefix:"far",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 13.3-10.7 24-24 24L40 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l368 0c13.3 0 24 10.7 24 24z"]},Ro={prefix:"far",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M248 72c0-13.3-10.7-24-24-24s-24 10.7-24 24V232H40c-13.3 0-24 10.7-24 24s10.7 24 24 24H200V440c0 13.3 10.7 24 24 24s24-10.7 24-24V280H408c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V72z"]};const Fo={class:"flex flex-col pr-32"},Mo=["innerHTML"],No={key:0},xo={key:1},Uo=tn({__name:"Description",props:{productDescription:{type:String,default:""}},setup(A){const i=P(!1),B=()=>{i.value=!i.value};return(y,g)=>{var x;return d(),h("div",Fo,[r("div",{class:dt([{"description-truncated":!m(i)},"description-content"])},[r("span",{innerHTML:A.productDescription},null,8,Mo)],2),A.productDescription&&((x=A.productDescription)==null?void 0:x.length)>300?(d(),h("button",{key:0,class:"text-left h-auto rounded-lg text-md font-bold",onClick:g[0]||(g[0]=w=>B())},[m(i)?(d(),h("span",No,[Se(N(y.$t("Show less"))+" ",1),U(m(da),{class:"ml-1 h-4 inline",icon:m(Oo)},null,8,["icon"])])):(d(),h("span",xo,[Se(N(y.$t("Show more"))+" ",1),U(m(da),{class:"ml-1 h-4 inline",icon:m(Ro)},null,8,["icon"])]))])):I("",!0)])}}}),Vo=Ze(Uo,[["__scopeId","data-v-fd7edb7d"]]),Go=""+new URL("avainlippu.CXWkvZKH.png",import.meta.url).href,Ho=""+new URL("keyflag.D6gcfRwH.png",import.meta.url).href,Bo=""+new URL("reddot-award.DjX7HWkN.png",import.meta.url).href,Ia=A=>(Aa("data-v-3487896a"),A=A(),Ca(),A),zo={class:"product-hero"},jo={class:"product-hero__container"},Wo={class:"product-long-description-container"},qo={class:"accordions"},Ko={class:"mt-3"},Yo={class:"flex flex-col gap-6 lg:gap-12"}
1,Qo={key:0,id:"technicalInformation"},Jo={class:"mb-5"},Xo={class:"font-bold text-lg"},Zo={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-12"},es=["innerHTML"],ts=["innerHTML"],ns=["innerHTML"],as={key:1,id:"imageInformation",class:"flex flex-col"},os={class:"mb-5"},ss={class:"font-bold mb-2 text-lg"},ls={class:"grid grid-cols-1 lg:grid-cols-2 gap-8"},rs=["href"],is=["src"],cs=["href"],us=["src"],ds={class:"mt-3 grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-12"},ms={key:0,class:"pb-3"},ps={class:"mb-2 dwg__title"},gs={class:"font-bold text-lg"},fs=["onClick"],hs={key:1,class:"pb-3"},vs={class:"mb-2 dwg__title"},ys={class:"font-bold text-lg"},_s=["onClick"],bs={class:"mt-3"},As={class:"grid grid-cols-1 gap-6 lg:gap-12"},Cs={key:0,id:"colorInformation"},ks={class:"mb-5"},Ps={class:"font-bold text-lg"},$s=["innerHTML"],Ls={class:"product-hero__info"},ws={class:"basic-product-info"},Ts={class:"product-title"},Ss={class:"product-meta"},Es={class:"product-group"},Is={class:"product-sku"},Ds={key:0,class:"product-pricing"},Os={key:0,class:"old-price"},Rs={key:0,class:"mydesign-info-accordion"},Fs={class:"mydesign-info-content"},Ms={key:1,class:"product-options-accordions"},Ns={class:"choices-label"},xs={class:"accordion-label"},Us={key:0,class:"accordion-value"},Vs={class:"option-content"},Gs={class:"variants-info"},Hs={class:"option-grid"},Bs=["onClick"],zs={class:"option-card__content"},js=["src","alt"],Ws={class:"option-card__text"},qs={class:"option-card__title"},Ks={key:0,class:"option-card__check"},Ys={key:2,class:"product-complementary-parts"},Qs={class:"product-complementary-parts__title"},Js={class:"product-complementary-parts__list"},Xs={class:"flex flex-col add-to-cart-section gap-4"},Zs=Ia(()=>r("span",{class:"inline-block h-5 w-5 shrink-0 rounded-full border-2 border-white border-t-transparent animate-spin","aria-hidden":"true"},null,-1)),el={key:0,class:"flex gap-5 items-center"},tl={key:0,class:"flex flex-row items-center gap-4"},nl={key:0},al={key:0},ol=["alt"],sl={key:1},ll=["alt"],rl={key:1},il=Ia(()=>r("img",{class:"h-12 sm:h-16 w-auto",src:Bo,alt:"Red Dot Award",loading:"lazy"},null,-1)),cl=[il],ul={key:1},dl={key:0,src:oo,alt:"product",title:"product",loading:"lazy"},ml={key:1,src:so,alt:"product",title:"product",loading:"lazy"},pl={key:1,class:"!my-0"},gl=tn({__name:"ProductDetails",props:{productIsConfigurable:{type:Boolean,default:!1},isMyDesign:{type:Boolean,default:!1},isSpark:{type:Boolean,default:!1},myDesignProductContent:{default:()=>({heading:"",content:""})},characteristics:{default:()=>[]},rules:{default:()=>[]},product:{},productBreadcrumbs:{default:()=>[]},documentAttributes:{default:()=>[]},productDescription:{default:""},technicalAttributes:{default:()=>[]},mainAttributes:{default:()=>[]},functionAttributes:{default:()=>[]},imageAttributes:{default:()=>[]},colorAttributes:{default:()=>[]},colors:{default:()=>({})},productKeyFlags:{default:()=>[]},productAssessmentFlags:{default:()=>[]},complementaryParts:{default:()=>[]},editorial:{default:()=>{}},typeTranslations:{default:()=>[]}},setup(A){const i=A,B=en(),y=_a(),{$i18n:g}=ga(),{$azureApi:x}=ga(),{t:w,locale:be}=Zt(),{canShowPrice:oe}=ka();B.public.WEBAPI_URL;const te=P(1),ue=P(!1),Ae=P(!1),u=P(!1);P(null);const Ue=P([]),Q=P({}),se=ut({technical:{isOpen:!1},functions:{isOpen:!1},download:{isOpen:!1},colors:{isOpen:!1},warranty:{isOpen:!1}}),Ve=P(!0),f=ut({}),E=ut({}),ne=ut({}),de=ut(new Set),le=P(""),Oe=P(!1),Ge=P(null),_=P(void 0),b=P(0),T=P(!1),D=P(!1),Z=R(()=>$a(i.product,g.locale,w).map(n=>({label:n,highlighted:!1}))),Y=R(()=>{var e;return(e=i==null?void 0:i.editorial)==null?void 0:e.warrantyData}),V=i.functionAttributes.flatMap(e=>Object.entries(e||{}).map(([n,o])=>({name:w(n.toLowerCase()),value:o}))),ge=R(()=>{var e,n,o,a;return Kt(((n=(e=i.product)==null?void 0:e.name)==null?void 0:n[g.locale.value])||((a=(o=i.product)==null?void 0:o.name)==null?void 0:a["en-GB"])||"",g.locale.value)}),re=R(()=>{var e,n;return((n=(e=i.product)==null?void 0:e.masterVariant)==null?void 0:n.sku)||""}),Ce=R(()=>{var a,s,c,v;if(!oe.value)return"";const e=(s=(a=i.product)==null?void 0:a.masterVariant)==null?void 0:s.prices;if(!e||e.length===0)return"";console.log("$i18n.locale: ",g.locale.value);const n=Ta[g.locale.value];let o=null;return console.log("Current country: ",n),n&&(o=(c=e.find(k=>k.country===n))==null?void 0:c.value,o||(o=(v=e.find(k=>k.country===n.toUpperCase()))==null?void 0:v.value)),o?(o.centAmount/Math.pow(10,o.fractionDigits)).toLocaleStr
1ing(g.locale,{style:"currency",currency:o.currencyCode||"EUR",minimumFractionDigits:0,maximumFractionDigits:0}):""}),Pe=R(()=>{var o,a,s,c;const e=(a=(o=i.product)==null?void 0:o.masterVariant)==null?void 0:a.prices,n=(c=(s=e==null?void 0:e[0])==null?void 0:s.discounted)==null?void 0:c.value;return n?(n.centAmount/Math.pow(10,n.fractionDigits)).toLocaleString(g.locale,{style:"currency",currency:n.currencyCode||"EUR"}):""}),ie=R(()=>{var o;if(!((o=i.product)!=null&&o.images)||i.product.images.length===0)return Ue.value.length>0?Ue.value:[{id:"placeholder",src:Wt,type:"image",alt:"Placeholder",thumbnail:Wt,index:0}];const e="?w=1000&f=png";return i.product.images.map((a,s)=>{var c;return(c=a.content_type)!=null&&c.startsWith("video/")?{id:s.toString(),type:"video",videoSource:"direct",src:a.file_url,thumbnail:a.poster||void 0,alt:a.desc||`Product video ${s+1}`,index:1,videoOptions:{autoplay:!0,muted:!0,loop:!0,controls:!0}}:{...a,id:s.toString(),src:a.file_url+e,type:"image",alt:a.desc||`Product image ${s+1}`,thumbnail:a.file_url+e,index:a.default?0:1}}).sort((a,s)=>a.index-s.index)}),$e=()=>{const e=at();if(!e)return 0;const n=ke(e),o=ie.value.findIndex(a=>{const s=a.file_url||"";if(!s)return!1;const c=ke(s);return n===c||n.includes(c)||c.includes(n)});return o>=0?o:0},Le=e=>{var o;const n=(o=Ge.value)==null?void 0:o.querySelectorAll(".main-swiper, .mobile-swiper");n==null||n.forEach(a=>{const s=a.swiper;s&&s.realIndex!==e&&s.slideToLoop(e,0)})},he=()=>{if(!at())return;const n=$e();D.value=!0,_.value=n,b.value=n,xt(()=>{Le(n),D.value=!1})},ke=e=>{if(!e)return"";let n=e.split("?")[0];try{n=decodeURIComponent(n)}catch{}return n=n.replace(/\+/g," "),n=n.replace(/\/+$/,""),n.toLowerCase().trim()},Ee=R(()=>{var n,o,a,s,c,v,k,M;const e=(a=(o=(n=i.product)==null?void 0:n.masterVariant)==null?void 0:o.attributes)==null?void 0:a.find(G=>G.name==="groups");return e!=null&&e.value&&e.value.length>0&&(((c=(s=e.value[0])==null?void 0:s.label)==null?void 0:c[g.locale])||((k=(v=e.value[0])==null?void 0:v.label)==null?void 0:k["en-GB"])||((M=e.value[0])==null?void 0:M.key))||""}),ft=R(()=>{const e=At();return Array.isArray(e)?e.filter(n=>n&&n.type&&["2d-model","3d-model"].includes(n.type)).map(n=>{var o,a;return{name:((o=n.name)==null?void 0:o[g.locale.value])||((a=n.name)==null?void 0:a["en-GB"])||"",url:n.url||"",type:n.type||"",downloadName:n.filename||Ct(n)}}):[]}),ht=R(()=>{const e=At();return Array.isArray(e)?e.filter(n=>n&&n.type&&["product-certificates","installation-instructions","sustainability","product-card","quick-start-guide"].includes(n.type)).map(n=>{var o,a;return{name:n.type==="product-card"?w("Product sheet"):((o=n.name)==null?void 0:o[g.locale.value])||((a=n.name)==null?void 0:a["en-GB"])||"",url:n.url||"",type:n.type||"",downloadName:n.filename||Ct(n),locale:n.locale||g.locale.value}}).filter(n=>n.type!=="product-card"?!0:n.locale===g.locale.value):[]}),et=R(()=>i.characteristics.reduce((e,n)=>{const o=Object.keys(n)[0];return e[o]=n[o],e},{})),W=R(()=>{var o;const e=Object.keys(et.value),n=Array.from(de);return console.log("[COMPUTED] characteristicsData calculation started"),console.log("[COMPUTED] All keys from lookup:",e),console.log("[COMPUTED] Unavailable characteristics:",n),console.log("[COMPUTED] Props characteristics length:",((o=i.characteristics)==null?void 0:o.length)||0),e.filter(a=>{const s=de.has(a);return console.log(`[COMPUTED] "${a}" - unavailable: ${s}`),!s}).map(a=>{const s=et.value[a];a in f||(f[a]=!1);const c=s.options.filter(v=>v!=null).map(v=>{var k;return(k=Object.keys(v))==null?void 0:k.filter(M=>M!=null).map(M=>({key:M,...v[M]}))}).flat();return console.log("processedOptions for",a,c),{key:a,...s,options:c,isOpen:f[a],isLocked:ne[a]||!1}})}),tt=e=>e&&e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Re=(e,n,o)=>{const a=(e==null?void 0:e[fa[g.locale.value]])||(e==null?void 0:e.en)||(e==null?void 0:e.default)||"";return tt(a)},vt=(e,n)=>{var a,s,c,v,k,M;console.log("[CONFIG] characteristicKey:",e),console.log("[CONFIG] optionKey:",n),console.log("[CONFIG] characteristicsData:",W.value);const o=((s=(a=W.value.find(G=>G.key===e))==null?void 0:a.options.find(G=>G.key===n))==null?void 0:s.label[fa[g.locale.value]])||((v=(c=W.value.find(G=>G.key===e))==null?void 0:c.options.find(G=>G.key===n))==null?void 0:v.label.en)||((M=(k=W.value.find(G=>G.key===e))==null?void 0:k.options.find(G=>G.key===n))==null?void 0:M.label.default);return tt(o)},Fe=(e,n)=>{se[e]&&(se[e].isOpen=n)},yt=(e,n)=>{f[e]=n},_t=async(e,n,o)=>
1{if(ne[e]){console.log(`Cannot select option for locked characteristic: ${e}`);return}const a=W.value.find(s=>s.key===e&&s.theme===!0);E[e]=n,console.log("[CONFIG] Selected option:",{characteristicKey:e,optionKey:n,optionLabel:o}),me(),a&&(await xt(),he()),await Be()},je=(e,n)=>E[e]===n,me=()=>{console.log("[RULES] Processing rules..."),bt(),i.rules.forEach((e,n)=>{try{if(!e||!e.conditions||!e.actions){console.warn("[RULES] Invalid rule structure:",e);return}const o=Ht(e.conditions);console.log(`[RULES] Rule ${n+1} conditions met:`,o),console.log("conditionsMet: ",e.conditions),o&&(console.log(`[RULES] Applying ${e.actions.length} actions for rule ${n+1}`),e.actions.forEach(a=>{Bt(a)}))}catch(o){console.error(`[RULES] Error processing rule ${n+1}:`,o)}})},Ht=e=>{if(!e||e.length===0)return!1;const n=[];return e.forEach((a,s)=>{if(!a||!a.value||a.compareValue===void 0){console.log(`[EVAL] Condition ${s} invalid:`,a),n.push(!1);return}const c=E[a.value],v=c===a.compareValue;console.log(`[EVAL] Condition ${s}: ${a.value} === "${a.compareValue}" ? Current: "${c}" = ${v} (${a.logicOperator||"AND"})`),n.push(v)}),e.some(a=>a.logicOperator==="OR")?n.some(a=>a):n.every(a=>a)},Bt=e=>{if(console.log("applyRuleAction",e),!e||!e.item||!e.actionType){console.warn("[RULES] Invalid action:",e);return}const n=e.item,o=e.actionType,a=e.value;switch(o){case"UNAVAILABLE":de.add(n),n in E&&delete E[n],n in ne&&delete ne[n],console.log("UNAVAILABLE action applied for",n);break;case"ATTACH_REQUIRED":ne[n]=!0,a&&(E[n]=a);break;case"ATTACH_OPTIONAL":a&&(E[n]=a);break;case"AVAILABLE":console.log(`[RULES] Made ${n}${a?` option ${a}`:""} available`);break;default:console.warn(`[RULES] Unhandled action type: ${o}`)}},bt=()=>{Object.keys(ne).forEach(e=>{ne[e]=!1}),de.clear()},He=async()=>{W.value.forEach(e=>{const n=e.key,o=e;if(o&&o.theme===!0&&!(n in E)){let a=o.default;!a&&o.options&&o.options.length>0&&(a=o.options[0].key),a&&(E[n]=a,console.log(`[CONFIG] Set theme default for ${n}: ${a}`))}}),me(),W.value.forEach(e=>{const n=e.key,o=e;E[n]||(o==null?void 0:o.theme)===!0||ne[n]||de.has(n)||o&&o.default&&(E[n]=o.default,console.log(`[CONFIG] Set non-theme default for ${n}: ${o.default}`))}),me(),console.log("[CONFIG] Configuration initialized from computed data"),console.log("[CONFIG] Final selections:",E),console.log("[CONFIG] Final locked characteristics:",ne),console.log("[CONFIG] Final unavailable characteristics:",Array.from(de)),he(),await Be(),console.log("[CONFIG] Initializing configuration from computed data...",W)},Be=async()=>{var e,n;if(!((n=(e=i.product)==null?void 0:e.masterVariant)!=null&&n.sku)||Object.keys(E).length===0){console.log("[PRICE] Skipping price fetch - missing SKU or no selections");return}try{Oe.value=!0,console.log("[PRICE] Fetching price for configuration...",E);const o=Object.entries(E).filter(([M,G])=>G&&!de.has(M)).map(([M,G])=>({characteristicId:M,optionValueId:G,quantity:1}));console.log("[PRICE] Mapped configuration:",o);const a=i.product.masterVariant.sku,s=g.locale.value,[c]=await Promise.all([$fetch(`/product/price/${a}?locale=${s}`,{method:"POST",baseURL:B.public.BACKEND_API_BASE_URL,body:{selectedConfigurations:o}}),new Promise(M=>setTimeout(M,400))]),v=(c==null?void 0:c.data)||c;console.log("[PRICE] Full API response:",c),console.log("[PRICE] Processed price result:",v);let k=null;(v==null?void 0:v.totalPrice)!==void 0?typeof v.totalPrice=="object"&&v.totalPrice.price!==void 0?(k=v.totalPrice.price,console.log("[PRICE] Using totalPrice.price:",k)):typeof v.totalPrice=="number"&&(k=v.totalPrice,console.log("[PRICE] Using totalPrice directly:",k)):(v==null?void 0:v.price)!==void 0&&(k=v.price,console.log("[PRICE] Using price property:",k)),k!==null?(le.value=nt(k,s),console.log("[PRICE] Updated configuration price:",le.value),console.log("[PRICE] Formatted from value:",k)):(console.warn("[PRICE] Could not find price in response:",v),console.warn("[PRICE] Available properties:",Object.keys(v||{})))}catch(o){console.error("[PRICE] Error fetching configuration price:",o),le.value=""}finally{Oe.value=!1}},nt=(e,n)=>{if(console.log("PRE format price",e,"for locale:",n),typeof e!="number")return"";const o=e;console.log("POST format price",o);const a=La[n];return console.log("Mapped locale for pricing:",a),a?wa(o,n,a):""},At=()=>{var n,o,a;const e=(a=(o=(n=i.product)==null?void 0:n.masterVariant)==null?void 0:o.attributes)==null?void 0:a.find(s=>s.name==="documents");return e?kt(e.value)||[]:[]},Ct=e=>{var c,v,k,M;if(!e||!e.url)return"";const n=Vt[g.locale]||g.locale;if(!((c=e.name)!=null&&c[n]))return"";const o=e.name[n].split(" "),a=((e==null?void 0:e.url)||"").split("."),s=`${o[0]}${o[2]?"_"+o[1]:""}`;return`${(k=(v=i.product)==null?void 0:v.masterVariant)==null?void 0:k.sku}_${gt((M=i.product)==null?void 0:M.name,n)}_${s}.${a[a.length-1]}`},kt=e=>{if(e)try{return JSON.parse(e)}catch(n){console.error("Error parsing JSON attribute:",n);return}},We=()=>{se.download.isOpen||(se.download.isOpen=!0),xt(()=>{const e=document.querySelector('[data-accordion="download"]');e&&e.scrollIntoView({behavior:"smooth",block:"center"})})},qe=async(e,n)=>{try{const o=await fetch(e);if(!o.ok)throw new Error(`Failed to fetch file: ${o.statusText}`);const a=await o.blob(),s=window.URL.createObjectURL(a),c=document.createElement("a");c.href=s,c.download=n||"download",document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(s)}catch(o){console.error("Error downloading file:",o),window.open(e,"_blank")}},Ke=()=>{},Pt=()=>{},$t=e=>{if(!T.value||D.value)return;const n=ie.value;if(e<0||e>=n.length)return;_.value=e,b.value=e;const o=n[e],a=(o==null?void 0:o.file_url)||"";if(!a)return;const s=ke(a),c=W.value.find(v=>v.theme===!0);if(c)for(const v of c.options){if(!v.image)continue;
1const k=ke(v.image),M=s===k,G=s.includes(k)||k.includes(s),we=F=>{const q=F.split("/");return q[q.length-1]||""},De=we(k),Te=we(s);if((M||G||De!==""&&Te!==""&&De===Te)&&E[c.key]!==v.key){E[c.key]=v.key,me();return}}},zt=async()=>{var n,o,a;if(!((o=(n=i.product)==null?void 0:n.masterVariant)!=null&&o.sku)){console.error("[CART] No SKU available for product");return}const e=i.product.masterVariant.sku;if(!ue.value)try{ue.value=!0,await y.ensureCurrencyMatches({azureApi:x,locale:g.locale.value}),console.log("[CART] Adding configured product to cart...",{sku:e,selections:E,lockedCharacteristics:ne,complementaryParts:Q.value});const s=Object.entries(E).filter(([F,q])=>q&&!de.has(F)).map(([F,q])=>{const J=W.value.find(Ne=>Ne.key===F),ve=J==null?void 0:J.options.find(Ne=>Ne.key===q);return{item:F,value:q,optionName:J!=null&&J.label?Re(J.label):F,optionValueName:ve!=null&&ve.label?Re(ve.label):q,quantity:1,locked:ne[F]||!1,actionType:ne[F]?"ATTACH_REQUIRED":"AVAILABLE"}});console.log("[CART] Actions for setTheme:",s);const c=at();console.log("[CART] Theme image for cart:",c);try{await y.setTheme({actions:s,sku:e,qty:te.value,azureApi:x,characteristics:i.characteristics,theme:!0,unlock:!1,locale:g.locale.value,themeImage:c}),console.log("[CART] setTheme completed successfully")}catch(F){console.error("[CART] setTheme failed:",F)}const v=s.map(F=>({item:F.item,value:F.value,optionName:F.optionName,optionValueName:F.optionValueName,quantity:F.quantity,locked:F.locked}));if(console.log("[CART] Configuration to save:",v),await y.addConfiguredProduct({azureApi:x,locale:g.locale.value,configuration:v,sku:e,themeImage:c}),i.complementaryParts&&i.complementaryParts.length>0){console.log("[CART] Adding complementary parts to cart...",Q.value);for(const F of i.complementaryParts){const q=F.masterVariant.key,J=Q.value[q]||0;if(J>0){console.log(`[CART] Adding complementary part: ${q} with quantity: ${J}`);try{await y.add({azureApi:x,locale:g.locale.value,sku:q,quantity:J,config:!1}),console.log(`[CART] Successfully added complementary part: ${q}`)}catch(ve){console.error(`[CART] Failed to add complementary part ${q}:`,ve)}}}}const k=le.value;if(k){const F=Me(k);localStorage.setItem(`configured-price-${e}`,F.toString()),console.log("[CART] Stored configured price in localStorage:",F)}ue.value=!1,Ae.value=!0;const M=g.locale.value==="sv-SE"?"SEK":"EUR",G=gt(i.product.name,g.locale.value),we=y.getConfiguration,De=(we==null?void 0:we.price)||0;console.log("[CART] Cart configuration for GTM:",we),console.log("[CART] Config price for GTM:",De);const Te=De||le.value||Ce.value,Ye=typeof Te=="number"?Te:Me(Te);console.log("[CART] Price values for GTM:",{cartConfigPrice:De,configurationPrice:le.value,productPrice:Ce.value,finalPriceValue:Te,numericPrice:Ye,quantity:te.value});const Qe=[{item_id:e,item_name:G,affiliation:`Lappset.com/${g.locale.value}`,price:Ye*te.value,currency:M,quantity:te.value}];i.complementaryParts&&i.complementaryParts.length>0&&i.complementaryParts.forEach(F=>{var ve;const q=F.masterVariant.key,J=Q.value[q]||0;if(J>0){const Ne=lt(F.name,g.locale.value),Ot=(ve=F.price)!=null&&ve.price?nt(F.price.price,g.locale.value):"0",Rt=Me(Ot);Qe.push({item_id:q,item_name:Ne,affiliation:`Lappset.com/${g.locale.value}`,price:Rt*J,currency:M,quantity:J})}}),typeof window<"u"&&((a=window.dataLayer)==null||a.push({event:"add_to_cart",ecommerce:{items:Qe}})),console.log("[CART] Product added to cart successfully"),setTimeout(()=>{Ae.value=!1},3e3)}catch(s){console.error("[CART] Error adding product to cart:",s),ue.value=!1,u.value=!0,setTimeout(()=>{u.value=!1},5e3)}},Me=e=>{if(!e)return 0;console.log("[PRICE] Extracting from string:",e);let n=e.replace(/[^\d.,]/g,"");const o=n.lastIndexOf("."),a=n.lastIndexOf(",");o>a&&o>n.length-4?n=n.replace(/,/g,""):a>o&&a>n.length-4?n=n.replace(/\./g,"").replace(",","."):n=n.replace(/[.,]/g,"");const s=parseFloat(n)||0;return console.log("[PRICE] Extracted numeric value:",s),s},at=()=>{const e=W.value.find(a=>a.theme===!0);if(!e){console.log("[THEME] No theme characteristic found");return}const n=E[e.key];if(!n){console.log("[THEME] No theme option selected");return}const o=e.options.find(a=>a.key===n);if(!(o!=null&&o.image)){console.log("[THEME] No image found for theme option:",n);return}return console.log("[THEME] Found theme image:",o.image),o.image},jt=(e,n)=>{let o="";if(["impact-area-length","impact-area-width","falling-space-area-length","falling-space-area-width","length","width","height","max-free-fall-height","max-free-fall-height-sport","height-required","largest-part","area-of-movement-length","area-of-movement-width","armrest-height","seat-height","surface-fluff-height","astm-use-zone-length","astm-use-zone-width","astm-max-fall-height"].includes(e)?o="mm":["impact-area","falling-space-area","area-of-movement","astm-use-zone"].includes(e)?o="m2":["weight","heaviest-part","surface-fluff-weight","surface-full-weight"].includes(e)?o="kg":["amount-of-concrete"].includes(e)?o="m3":["installation-time"].includes(e)&&(o="h"),o==="")return String(n);if(o==="h")return`${n} h`;if(g.locale.value!=="en-US")return`${n} ${o==="m2"?"m²":o==="m3"?"m³":o}`;if(o==="mm"){const s=Math.floor(n/304.8),c=(n%304.8/25.4).toFixed(0);return`${s} ft ${c} in`}const a=qa(n,o).toFixed(1);return o==="m2"?`${a} sq ft`:o==="kg"?`${a} lbs`:o==="m3"?`${a} cu ft`:a},ot=e=>{if(!e||!e.name||!e.value)return"";let n="";const o=st(e.name),a=typeof e.value=="string"?Number(e.value):e.value;if(typeof e.value=="number"||typeof e.value=="string"&&e.value.trim()!==""&&!isNaN(a)){if(a===0)return"";const c=jt(e.name,a);return n+=`<div class="font-semibold" style="white-space:nowrap;flex-shrink:0;margin-right:8px">${o}:</div>`,n+=`<div style="text-align:right">${c}</div>`,n}const s=Lt(e.value);return s?(n+=`<div class="font-semibold" style="white-space:nowrap;flex-shrink:0;margin-right:8px">${o}:</div>`,n+=`<div style="text-align:right">${s}</div>`,n):""},st=e=>{const n=Vt[g.locale.value]||g.locale.value,o=i.typeTranslations.find(c=>c.name===e),a=(o==null?void 0:o.label[n])||(o==null?void 0:o.label["en-GB"])||(o==null?void 0:o.label.en)||"";if(a)return a;const s=w(e);return s!==e?s:""},Lt=e=>Array.isArray(e)?e.map(o=>o&&typeof o=="object"&&o.label&&(o.label[g.locale.value]||o.label["en-GB"]||o.label.en||o.key)||"").filter(o=>o!=="").join(", "):typeof e=="object"&&e!==null?e[g.locale.value]||e["en-GB"]||e.key||"":e||"",lt=(e,n)=>gt(e,n),wt=e=>!!(["made-in-finland","red-dot"].includes(e.name)&&e.value===!0),Tt=(e,n)=>{if(!n||n.length===0)return"";let o="";const a=Vt[g.locale.value]||g.locale.value,s=st(`color-${e}`)||Kt(e);return o+=`<div class="font-semibold mb-2">${s}:</div>`,o+='<div class="mb-2 grid grid-cols-2">
1',n.forEach(c=>{if(!c||!c.key||!c.label)return;const v=c.label[a]??c.label["en-GB"]??c.label.en??c.key;c.iconUrl?o+=`<div class="grid grid-cols-4 gap-1 mb-3 p-2">
2            <div class="col-span-1"><img src="${c.iconUrl}" class="w-8 h-auto" alt="${v}"></div>
3            <div class="col-span-3">${v}</div>
4          </div>`:o+=`<div class="grid grid-cols-4 gap-1 mb-3 p-2">
5            <div class="col-span-1"></div>
6            <div class="col-span-3">${v}</div>
7          </div>`}),o+="</div>",o},rt=()=>{if(i.complementaryParts&&i.complementaryParts.length>0){const e={};console.log("[COMPLEMENTARY] Initializing complementary part quantities:",i.complementaryParts),i.complementaryParts.forEach(n=>{e[n.masterVariant.key]=0}),console.log("[COMPLEMENTARY] Initial quantities:",e),Q.value=e,console.log("[COMPLEMENTARY] Complementary part quantities initialized:",Q.value)}},St=(e,n="images",o="visualized")=>{var c,v;const a=(v=(c=e.masterVariant)==null?void 0:c.attributes)==null?void 0:v.find(k=>k.name===n);return Wa(a,o)||Wt},Et=(e,n)=>{console.log("old complementaryPartQuantities",Q.value),console.log("[COMPLEMENTARY] Incrementing part:",e.masterVariant.key,"to",n),Q.value[e.masterVariant.key]=n,console.log("[COMPLEMENTARY] Complementary part quantities:",Q.value)},It=(e,n)=>{console.log("[COMPLEMENTARY] Decrementing part:",e.masterVariant.key,"to",n),Q.value[e.masterVariant.key]=Math.max(0,n)},Dt=()=>{var n,o,a;const e=(a=(o=(n=i.product)==null?void 0:n.masterVariant)==null?void 0:o.attributes)==null?void 0:a.find(s=>s.name==="images");return e?kt(e.value):[]},Ie=R(()=>{const e=Dt();return Array.isArray(e)?e.filter(n=>n&&n.type==="technical").map(n=>{var o,a;return{id:n.id||"",url:n.url||"",type:n.type||"",name:((o=n.name)==null?void 0:o[g.locale.value])||n.filename||"",description:((a=n.description)==null?void 0:a[g.locale.value])||""}}):[]});return pt(W,(e,n)=>{var c,v;console.log("[WATCH] ===== CharacteristicsData Changed ====="),console.log("[WATCH] New data length:",e.length),console.log("[WATCH] Old data length:",(n==null?void 0:n.length)||0),console.log("[WATCH] Props rules length:",((c=i.rules)==null?void 0:c.length)||0),console.log("[WATCH] Props characteristics length:",((v=i.characteristics)==null?void 0:v.length)||0);const o=e.length>0,a=!n||n.length===0,s=i.rules&&i.rules.length>0;console.log("[WATCH] hasCharacteristics:",o),console.log("[WATCH] isFirstTime:",a),console.log("[WATCH] hasRules:",s),o&&a?(console.log("[WATCH] ✅ Triggering initialization"),console.log("[WATCH] Found characteristics:",e.map(k=>{var M;return{key:k.key,theme:k.theme,default:k.default,optionsCount:((M=k.options)==null?void 0:M.length)||0}})),s?console.log("[WATCH] Product has",i.rules.length,"rules - will process them"):console.log("[WATCH] Product has NO rules - will only set defaults"),He().then(()=>{console.log("=== FINAL CONFIGURATION STATE ==="),console.log("[FINAL] Selections:",E),console.log("[FINAL] Unavailable:",Array.from(de)),console.log("[FINAL] Visible characteristics:",W.value.length),console.log("[FINAL] Visible keys:",W.value.map(k=>k.key))})):console.log("[WATCH] ❌ Not triggering initialization")},{immediate:!0}),pt(E,(e,n)=>{console.log("[WATCH] Selected characteristics changed:",e),i.characteristics.some(a=>{const s=Object.keys(a)[0],c=a[s];if((c==null?void 0:c.theme)===!0){const v=n==null?void 0:n[s],k=e[s];return v!==k}return!1})&&(console.log("[WATCH] Theme characteristic changed, processing rules and syncing slider..."),me(),he())},{deep:!0}),pt(()=>i.complementaryParts,(e,n)=>{console.log("[COMPLEMENTARY] Props complementaryParts changed:",{newParts:(e==null?void 0:e.length)||0,oldParts:(n==null?void 0:n.length)||0,newPartsData:e}),e&&e.length>0&&rt()},{immediate:!0,deep:!0}),Sa(()=>{var e;console.log("ConfigurableProduct mounted"),console.log("Props at mount:",{characteristicsLength:i.characteristics.length,rulesLength:i.rules.length,complementaryPartsLength:((e=i.complementaryParts)==null?void 0:e.length)||0,complementaryPartsData:i.complementaryParts,locale:g.locale.value}),console.log("Computed characteristicsData length at mount:",W.value.length),rt(),xt(()=>{requestAnimationFrame(()=>{T.value=!0})})}),(e,n)=>{const o=Vo;return d(),h("div",{ref_key:"productDetailsEl",ref:Ge,class:"product-details"},[r("section",zo,[r("div",jo,[r("div",{class:dt(["product-hero__slider",{"slider-theme-sync":D.value}]),style:{position:"relative"}}
7,[U(m(ma),{items:ie.value,tags:Z.value,autoplay:!1,"show-thumbnails":!0,loop:!0,isMyDesign:e.isMyDesign,isSpark:e.isSpark,downloadButtonLabel:m(w)("Download"),onHandleDownload:We,onHandle360:Ke,onHandleFavorite:Pt,onChange:$t,class:"product-hero__slider-desktop",activeIndex:_.value,thumbnailsInitialIndex:b.value},null,8,["items","tags","isMyDesign","isSpark","downloadButtonLabel","activeIndex","thumbnailsInitialIndex"]),r("div",Wo,[U(o,{product:e.product,productDescription:e.productDescription},null,8,["product","productDescription"])]),r("div",qo,[(d(),X(m(ze),{key:"technical",title:m(w)("technical"),"is-open":se.technical.isOpen,icon:"ruler","data-accordion":"technical","onUpdate:isOpen":n[0]||(n[0]=a=>Fe("technical",a))},{default:H(()=>[r("div",Ko,[r("div",Yo,[e.technicalAttributes?(d(),h("div",Qo,[r("div",Jo,[r("span",Xo,N(m(w)("Technical information")),1)]),r("div",Zo,[r("div",null,[(d(!0),h(ee,null,ce(e.mainAttributes,(a,s)=>(d(),h("div",{key:s,class:"flex flex-col my-2"},[r("div",{class:"flex justify-between",innerHTML:ot(a)},null,8,es)]))),128)),(d(!0),h(ee,null,ce(e.technicalAttributes.slice(0,Math.ceil(e.technicalAttributes.length/2)),(a,s)=>(d(),h("div",{key:s,class:"flex flex-col my-2"},[r("div",{class:"flex justify-between",innerHTML:ot(a)},null,8,ts)]))),128))]),r("div",null,[(d(!0),h(ee,null,ce(e.technicalAttributes.slice(Math.ceil(e.technicalAttributes.length/2)),(a,s)=>(d(),h("div",{key:s+Math.ceil(e.technicalAttributes.length/2),class:"flex flex-col my-2"},[r("div",{class:"flex justify-between",innerHTML:ot(a)},null,8,ns)]))),128))])])])):I("",!0),Ie.value.length>0?(d(),h("div",as,[r("div",os,[r("span",ss,N(m(w)("Technical images")),1)]),r("div",ls,[r("div",null,[(d(!0),h(ee,null,ce(Ie.value.slice(0,Math.ceil(Ie.value.length/2)),(a,s)=>(d(),h("div",{key:s},[r("div",null,[r("a",{href:a.url,target:"_blank"},[r("img",{class:"mb-5",src:a.url},null,8,is)],8,rs)])]))),128))]),r("div",null,[(d(!0),h(ee,null,ce(Ie.value.slice(Math.ceil(Ie.value.length/2)),(a,s)=>(d(),h("div",{key:s+Math.ceil(Ie.value.length/2)},[r("div",null,[r("a",{href:a.url,target:"_blank"},[r("img",{class:"mb-5",src:a.url},null,8,us)],8,cs)])]))),128))])])])):I("",!0)])])]),_:1},8,["title","is-open"])),m(V)&&m(V).length>0?(d(),X(m(ze),{key:"functions",title:m(w)("functions"),"is-open":se.functions.isOpen,icon:"sparkles","data-accordion":"functions","onUpdate:isOpen":n[1]||(n[1]=a=>Fe("functions",a))},{default:H(()=>[U(m(Ha),{items:m(V)},null,8,["items"])]),_:1},8,["title","is-open"])):I("",!0),(d(),X(m(ze),{key:"download",title:m(w)("Download"),"is-open":se.download.isOpen,icon:"download","data-accordion":"download","onUpdate:isOpen":n[2]||(n[2]=a=>Fe("download",a))},{default:H(()=>[r("div",ds,[ft.value.length>0?(d(),h("div",ms,[r("div",ps,[r("span",gs,N(m(w)("2D & 3D DWG files")),1)]),(d(!0),h(ee,null,ce(ft.value,(a,s)=>(d(),h("div",{key:s,class:"py-2"},[r("a",{href:"#",onClick:pa(c=>qe(a.url,a.downloadName),["prevent"]),class:"cursor-pointer"},[U(m(Qt),{variant:"outline-rounded",label:a.name,class:"dwg__button",icon:"download",backgroundColor:"#fff",borderColor:"#000",size:"small"},null,8,["label"])],8,fs)]))),128))])):I("",!0),ht.value.length>0?(d(),h("div",hs,[r("div",vs,[r("span",ys,N(m(w)("Product files")),1)]),(d(!0),h(ee,null,ce(ht.value,(a,s)=>(d(),h("div",{key:s,class:"py-2"},[r("a",{href:"#",onClick:pa(c=>qe(a.url,a.downloadName),["prevent"]),class:"cursor-pointer"},[U(m(Qt),{variant:"outline-rounded",label:a.name,class:"dwg__button",icon:"download",backgroundColor:"#fff",borderColor:"#000",size:"small"},null,8,["label"])],8,_s)]))),128))])):I("",!0)])]),_:1},8,["title","is-open"])),(d(),X(m(ze),{key:"colors",title:m(w)(m(be)==="en-GB"?"Colours":"Colors"),"is-open":se.colors.isOpen,icon:"grid","data-accordion":"colors","onUpdate:isOpen":n[3]||(n[3]=a=>Fe("colors",a))},{default:H(()=>[r("div",bs,[r("div",As,[e.colors&&Object.keys(e.colors).length>0?(d(),h("div",Cs,[r("div",ks,[r("span",Ps,N(m(w)(m(be)==="en-GB"?"Available colours":"Available colors")),1)]),(d(!0),h(ee,null,ce(e.colors,(a,s)=>(d(),h("div",{key:s,class:"my-2"},[r("div",{innerHTML:Tt(s,a)},null,8,$s)]))),128))])):I("",!0)])])]),_:1},8,["title","is-open"])),(d(),X(m(ze),{class:"warranty__accordion",key:"warranty",title:m(w)("warranty"),"is-open":se.warranty.isOpen,icon:"shield","data-accordion":"warranty","onUpdate:isOpen":n[4]||(n[4]=a=>Fe("warranty",a))},{default:H(()=>[U(ya,{content:Y.value},null,8,["content"])]),_:1},8,["title","is-open"]))])],2),r("div",Ls,[r("div",{class:dt({"slider-theme-sync":D.value}),style:{position:"relative"}}
7,[U(m(ma),{items:ie.value,tags:Z.value,autoplay:!1,"show-thumbnails":!0,loop:!0,isMyDesign:e.isMyDesign,isSpark:e.isSpark,onHandleDownload:We,onHandle360:Ke,onHandleFavorite:Pt,onChange:$t,class:"product-hero__slider-mobile",activeIndex:_.value,thumbnailsInitialIndex:b.value},null,8,["items","tags","isMyDesign","isSpark","activeIndex","thumbnailsInitialIndex"])],2),r("div",ws,[r("h1",Ts,N(ge.value),1),r("div",Ss,[r("span",Es,N(Ee.value),1),r("span",Is,N(re.value),1)]),m(oe)&&le.value!=="hide-price"&&!e.isMyDesign?(d(),h("div",Ds,[r("span",{class:dt(["current-price",{"price-updating":Oe.value}])},N(le.value||Ce.value),3),Pe.value&&!le.value?(d(),h("span",Os,N(Pe.value),1)):I("",!0)])):I("",!0)]),e.isMyDesign?(d(),h("div",Rs,[U(m(ze),{title:e.myDesignProductContent.heading,"is-open":Ve.value,isMyDesign:!0,"onUpdate:isOpen":n[5]||(n[5]=a=>Ve.value=a)},{default:H(()=>[r("div",Fs,[e.myDesignProductContent.content?(d(),X(ya,{key:0,content:e.myDesignProductContent.content},null,8,["content"])):I("",!0)])]),_:1},8,["title","is-open"])])):I("",!0),W.value.length>0?(d(),h("div",Ms,[r("span",Ns,N(m(w)("Choices"))+":",1),(d(!0),h(ee,null,ce(W.value,a=>(d(),X(m(ze),{key:a.key,title:Re(a.label),"is-open":a.isOpen,"show-line":!0,"onUpdate:isOpen":s=>yt(a.key,s)},{title:H(()=>[r("span",xs,N(Re(a.label))+N(E[a.key]?": ":""),1),E[a.key]?(d(),h("span",Us,N(vt(a.key,E[a.key])),1)):I("",!0)]),default:H(()=>[r("div",Vs,[r("div",Gs,[r("div",Hs,[(d(!0),h(ee,null,ce(a.options,s=>(d(),h("div",{key:s.key,class:dt(["option-card",{"option-card--selected":je(a.key,s.key),"option-card--locked":a.isLocked,"option-card--disabled":a.isLocked&&!je(a.key,s.key)}]),onClick:c=>_t(a.key,s.key,s.label)},[r("div",zs,[s.image?(d(),h("img",{key:0,src:s.image,alt:s.label.default,class:"option-card__image"}
7,null,8,js)):I("",!0),r("div",Ws,[r("span",qs,N(Re(s.label)),1)])]),je(a.key,s.key)?(d(),h("span",Ks)):I("",!0)],10,Bs))),128))])])])]),_:2},1032,["title","is-open","onUpdate:isOpen"]))),128))])):I("",!0),e.complementaryParts&&e.complementaryParts.length>0?(d(),h("div",Ys,[r("div",Qs,[r("span",null,N(m(w)("Complementary parts"))+":",1)]),r("div",Js,[(d(!0),h(ee,null,ce(e.complementaryParts,a=>{var s;return d(),h("div",{key:a.masterVariant.key,class:"product-complementary-parts__item"},[U(m(Ba),{quantity:0,sku:a.masterVariant.key,productName:lt(a.name,m(g).locale.value),price:m(oe)?nt((s=a.price)==null?void 0:s.price,m(g).locale.value):"",image:St(a),minQuantity:"0",onIncrement:c=>Et(a,c),onDecrement:c=>It(a,c)},null,8,["sku","productName","price","image","onIncrement","onDecrement"])])}),128))])])):I("",!0),r("div",Xs,[U(m(ja),{variant:"primary",size:"large",label:m(w)("Add to basket"),fullWidth:"",disabled:ue.value,"aria-busy":ue.value,onClick:zt},za({default:H(()=>[Se(" "+N(m(w)("Add to basket")),1)]),_:2},[ue.value?{name:"iconLeft",fn:H(()=>[Zs]),key:"0"}:void 0]),1032,["label","disabled","aria-busy"]),e.productKeyFlags||e.productAssessmentFlags?(d(),h("div",el,[e.productKeyFlags?(d(),h("div",tl,[(d(!0),h(ee,null,ce(e.productKeyFlags,(a,s)=>(d(),h("div",{key:s,class:"my-2"},[wt(a)===!0?(d(),h("div",nl,[a.name==="made-in-finland"?(d(),h(ee,{key:0},[m(g).locale==="fi-FI"?(d(),h("div",al,[r("img",{class:"h-12 sm:h-16 w-auto",src:Go,alt:m(w)("Made in Finland"),loading:"lazy"},null,8,ol)])):(d(),h("div",sl,[r("img",{class:"h-12 sm:h-16 w-auto",src:Ho,alt:m(w)("Made in Finland"),loading:"lazy"},null,8,ll)]))],64)):a.name==="red-dot"?(d(),h("div",rl,cl)):I("",!0)])):I("",!0)]))),128))])):I("",!0),e.productAssessmentFlags?(d(),h("div",ul,[(d(!0),h(ee,null,ce(e.productAssessmentFlags,(a,s)=>(d(),h("div",{key:s,class:"my-2"},[a.value==="Accepteras"||a.value==="accepteras"?(d(),h("img",dl)):I("",!0),a.value==="Rekommenderas"?(d(),h("img",ml)):I("",!0)]))),128))])):I("",!0)])):I("",!0),e.isMyDesign?I("",!0):(d(),h("p",pl,N(e.product.commPhrase),1))])])])])],512)}}}),fl=Ze(gl,[["__scopeId","data-v-3487896a"]]);function hl(A){var y,g;const i=(y=A==null?void 0:A.find(x=>x.name==="type"))==null?void 0:y.value,B=(g=A==null?void 0:A.find(x=>x.name==="visibility-set"))==null?void 0:g.value;return i==="PROD_MD"?!(Array.isArray(B)&&B.some(x=>x.includes("MyDesign:true"))):!1}const vl=Ea(no),yl=Ea(io),_l={class:"px-5"},bl={class:"px-5 lg:px-20 pb-20"},Al={class:"px-5",style:{"max-width":"1440px",margin:"auto"}},Cl={class:"px-5",style:{"max-width":"1440px",margin:"20px auto"}},kl={class:"px-5"},Pl={class:"px-5",style:{"max-width":"1440px",margin:"20px auto"}},El=tn({__name:"[...slug]",async setup(A){var st,Lt,lt,wt,Tt,rt,St,Et,It,Dt,Ie,e,n,o,a,s,c,v,k,M,G,we,De,Te,Ye,Qe,F,q,J,ve,Ne,Ot,Rt,nn,an,on,sn,ln,rn,cn,un,dn,mn,pn,gn,fn,hn,vn,yn,_n,bn,An,Cn;let i,B;const{locale:y,t:g}=Zt(),x=Pa(),w=en(),{WEBAPI_URL:be,DOMAIN:oe}=w.public,{currentRoute:te}=Ka(),ue=te.value;let Ae;Array.isArray(ue.params.slug)?Ae=ue.params.slug[ue.params.slug.length-1]:Ae=ue.params.slug;const{data:u}=([i,B]=ha(()=>va(`product/${Ae}?locale=${y.value}&ignoreCampaigns=true`,{method:"GET",baseURL:`${w.public.BACKEND_API_BASE_URL}/`,key:`product-${Ae}-${y.value}`},"$F70jcQYKA5")),i=await i,B(),i),Ue=(st=u.value)==null?void 0:st.typeTranslations,se=((Tt=(wt=(lt=(Lt=u.value)==null?void 0:Lt.masterVariant)==null?void 0:lt.attributes)==null?void 0:wt.find(l=>
7l.name==="type"))==null?void 0:Tt.value)==="PROD_MD",Ve=((It=(Et=(St=(rt=u.value)==null?void 0:rt.masterVariant)==null?void 0:St.attributes)==null?void 0:Et.find(l=>l.name==="sparkified"))==null?void 0:It.value)===!0,f=(Dt=u.value)==null?void 0:Dt.editorial,E=R(()=>(f==null?void 0:f.myDesignProductDescriptionHeading)??null),ne=R(()=>(f==null?void 0:f.myDesignProductDescription)??null),de=R(()=>({heading:E.value,content:ne.value})),le=["recommendation","warranty","sustainability"],Oe=(l,p)=>{var $,C,O,L;return[l,p==null?void 0:p.key,($=p==null?void 0:p.fields)==null?void 0:$.internalName,(L=(O=(C=p==null?void 0:p.sys)==null?void 0:C.contentType)==null?void 0:O.sys)==null?void 0:L.id].filter(S=>typeof S=="string").some(S=>le.some(j=>S.toLowerCase().includes(j)))},Ge=R(()=>{var C,O;const l=(C=u.value)==null?void 0:C.editorial,p=((O=l==null?void 0:l.pdpOverride)==null?void 0:O.additionalBlocks)??(l==null?void 0:l.additionalBlocks)??[];return(Array.isArray(p)?p.map((L,S)=>{var j,K,z;return[(L==null?void 0:L.key)??((z=(K=(j=L==null?void 0:L.sys)==null?void 0:j.contentType)==null?void 0:K.sys)==null?void 0:z.id)??S,L]}):Object.entries(p??{})).filter(([L,S])=>S&&!Oe(L,S)).filter(([L,S])=>{var K;const j=String((S==null?void 0:S.key)??((K=S==null?void 0:S.fields)==null?void 0:K.key)??"").toLowerCase();return!le.includes(j)}).map(([L,S])=>{var j,K,z;return{key:String(L),type:((z=(K=(j=S==null?void 0:S.sys)==null?void 0:j.contentType)==null?void 0:K.sys)==null?void 0:z.id)??"",data:S}})}),_=l=>{var p;return((p=l==null?void 0:l.data)==null?void 0:p.fields)??(l==null?void 0:l.data)??{}},b=l=>l?typeof l=="string"?l:Array.isArray(l)?Ut(l):Array.isArray(l==null?void 0:l.content)?Ut(l.content):"":"",T=(l,p)=>{var L,S,j,K;if(!p.slug)return"";const $=Xe,C=((j=(S=(L=l==null?void 0:l.sys)==null?void 0:L.contentType)==null?void 0:S.sys)==null?void 0:j.id)??(l==null?void 0:l.contentType)??p.contentType,O=C?(K=$[C])==null?void 0:K[y.value]:void 0;return O?`/${y.value}/${O}/${p.slug}`:x(`/${p.slug}`)},D=l=>{const p=(l==null?void 0:l.fields)??l??{},$=p.ctaLabel??p.label??p.title??"",C=p.url??p.ctaLink??p.link??T(l,p);return!$||!C?{}:{buttonLabel:$,buttonLink:C,buttonVariant:"outline"}},Z=R(()=>Ge.value.filter(l=>{const p=_(l);return l.type?l.type==="layout2Column":!!(p.column1||p.column2)}).map(l=>{var C,O;const p=_(l),$=((C=p.image)==null?void 0:C.fields)??p.image??{};return{key:l.key,subtitle:p.title??"",heading:p.heading??"",imageSrc:((O=$.file)==null?void 0:O.url)??$.url??"",imageAlt:$.title??$.alt??"",imagePosition:p.imageOnRight?"right":"left",description:[p.column1,p.column2,p.content].map(b).filter(Boolean).join(""),button:D(p.cta)}}).filter(l=>l.description)),Y={subtitle:g("customer-reference"),imageSrc:((n=(e=(Ie=f==null?void 0:f.productGroupData)==null?void 0:Ie.customerReference)==null?void 0:e.image)==null?void 0:n.url)??"",imageAlt:((s=(a=(o=f==null?void 0:f.productGroupData)==null?void 0:o.customerReference)==null?void 0:a.image)==null?void 0:s.alt)??"",heading:((v=(c=f==null?void 0:f.productGroupData)==null?void 0:c.customerReference)==null?void 0:v.title)??"",description:(M=(k=f==null?void 0:f.productGroupData)==null?void 0:k.customerReference)!=null&&M.description?Ut((we=(G=f==null?void 0:f.productGroupData)==null?void 0:G.customerReference)==null?void 0:we.description):"",buttonLabel:((Te=(De=f==null?void 0:f.productGroupData)==null?void 0:De.customerReference)==null?void 0:Te.primaryButtonText)??"",buttonLink:((Qe=(Ye=f==null?void 0:f.productGroupData)==null?void 0:Ye.customerReference)==null?void 0:Qe.primaryButtonUrl)??"",buttonSize:"large",buttonState:"default",buttonVariant:"primary"},V={column1:((F=f==null?void 0:f.sustainabilityData)==null?void 0:F.column1)??"",column2:((q=f==null?void 0:f.sustainabilityData)==null?void 0:q.column2)??"",gwpFossil:((Ot=(Ne=(ve=(J=u.value)==null?void 0:J.masterVariant)==null?void 0:ve.attributes)==null?void 0:Ne.find(l=>
7l.name==="GWPFossil"))==null?void 0:Ot.value)??"",gwpTotal:((on=(an=(nn=(Rt=u.value)==null?void 0:Rt.masterVariant)==null?void 0:nn.attributes)==null?void 0:an.find(l=>l.name==="GWPTotal"))==null?void 0:on.value)??""},ge=(cn=(rn=(ln=(sn=u.value)==null?void 0:sn.masterVariant)==null?void 0:ln.attributes)==null?void 0:rn.find(l=>l.name==="groups"))==null?void 0:cn.value,re=ge?ge.map(l=>l.label[y.value]):[],Ce={productSku:Ae,productGroup:re,categories:(un=u.value)==null?void 0:un.categories,isMyDesign:se,highlightContent:{header:((dn=f==null?void 0:f.recommendationData)==null?void 0:dn.header)??"",content:((mn=f==null?void 0:f.recommendationData)==null?void 0:mn.text)??"",ctaHeader:((pn=f==null?void 0:f.recommendationData)==null?void 0:pn.ctaHeader)??"",ctaLabel:((gn=f==null?void 0:f.recommendationData)==null?void 0:gn.ctaLabel)??"",ctaLink:((fn=f==null?void 0:f.recommendationData)==null?void 0:fn.ctaLink)??"",overrideLinkLabel:((hn=f==null?void 0:f.recommendationData)==null?void 0:hn.overrideLabel)??"",overrideLink:((vn=f==null?void 0:f.recommendationData)==null?void 0:vn.overrideLink)??""}};if(!u.value)throw Ya({statusCode:404,statusMessage:`${g("Page not found")} - ${Ae}`,fatal:!0});[i,B]=ha(()=>va("product-type/lappset-product-type",{method:"GET",baseURL:`${w.public.AWS_API_ENDPOINT}/${w.public.AWS_API_ENV}/`,key:"product-attributes",default:()=>({attributes:[]}),onResponseError({error:l}){console.error("Error fetching product attributes:",l)}},"$V30Ld52CnU")),i=await i,B();const Pe=R(()=>{var $,C,O;if(!(($=u.value)!=null&&$.name)||!((O=(C=u.value)==null?void 0:C.masterVariant)!=null&&O.sku))return null;const l=gt(u.value.name,y.value),p=u.value.masterVariant.sku;return`${l} ${p}`}),ie=P((_n=(yn=u==null?void 0:u.value)==null?void 0:yn.description)==null?void 0:_n[y.value]),$e=P(ot()),Le=P(Yt((bn=u==null?void 0:u.value)==null?void 0:bn.name,(Cn=(An=u.value)==null?void 0:An.masterVariant)==null?void 0:Cn.sku,y.value)),he=P(u.value.name),ke=()=>{var C,O;const l=[],p=u.value.masterVariant.attributes.find(L=>L.name==="visibility-set");let $=[];p&&($=p.value.filter(L=>L.endsWith(":true")).map(L=>L.split(":")[0]));for(const L in he.value){const S=he.value[L];$.includes(L)&&S!=null&&l.push({rel:"alternate",hreflang:L,href:`${oe}/${L}/${Yt(S,(O=(C=u.value)==null?void 0:C.masterVariant)==null?void 0:O.sku,L)}`})}return l},Ee=R(()=>`${Pe.value||"Product"} ${g("| Lappset Group | The world of playgrounds and sports")}`),ft=R(()=>{var l,p;return hl((p=(l=u.value)==null?void 0:l.masterVariant)==null?void 0:p.attributes)}),ht=R(()=>ft.value?"noindex, follow":"index, follow");ao({title:Ee.value,ogTitle:Ee.value,twitterTitle:Ee.value,ogImage:$e.value,twitterImage:$e.value,description:ie.value,ogDescription:ie.value,twitterDescription:ie.value,ogUrl:`${oe}/${y.value}/${Le.value}`,ogType:"product",robots:ht}),Qa({title:Ee.value,meta:[{name:"description",content:ie.value}],link:[{rel:"canonical",hid:"canonical",href:`${oe}/${y.value}/${Le.value}`},...ke()]});const et=P([]),W=P([]),tt=P([]),Re=P([]),vt=P([]),Fe=P([]),yt=P([]),_t=P([]),je=P([]),me=P([]),Ht=P([]),Bt=P([]);P(!1);const bt=P(!1);P(!1);const He=P([]),Be=P([]),nt=P(null),At=P(!1);P(!1);const Ct=P([]),kt=P([]),We=P([]),qe=P(null),Ke=P(null),Pt=Ja();Sa(()=>{var L,S,j,K,z,xe,it,ct,Ft,kn,Pn,$n,Ln,wn,Tn,Sn,En,In,Dn,On,Rn,Fn,Mn,Nn,xn,Un,Vn,Gn,Hn,Bn,zn,jn,Wn,qn,Kn,Yn,Qn,Jn,Xn,Zn,ea,ta,na,aa,oa;if(Pt.setIsInverted(!1),(j=(S=(L=u.value)==null?void 0:L.masterVariant)==null?void 0:S.prices)!=null&&j.length){const ae=y.value.split("-")[1]||y.value,ye=u.value.masterVariant.prices;let fe=ye.filter(_e=>_e.country===ae||ae==="FI"&&_e.country==="FI"||ae==="SE"&&_e.country==="SE");if(fe.length||(fe=ye.filter(_e=>_e.value.currencyCode===(y.value==="sv-SE"?"SEK":"EUR"))),fe.length||(fe=[ye[0]]),fe.length){const _e=fe[0];u.value.price={price:_e.value.centAmount/100,currency:_e.value.currencyCode},console.log("🛒 [PRICE DEBUG] Price processed:",{originalPrices:ye.length,selectedPrice:_e,finalPrice:u.value.price})}}const l=((it=(xe=(z=(K=u==null?void 0:u.value)==null?void 0:K.masterVariant)==null?void 0:z.attributes)==null?void 0:xe.find(ae=>ae.name==="is-configurable"||ae.name==="product-is-configurable"))==null?void 0:it.value)??!1;console.log("[PAGE] Product is configurable:",l),l?(console.log("[PAGE] Calling configurableProduct()"),zt(u==null?void 0:u.value)):console.log("[PAGE] Product is NOT configurable - skipping extraction");const p=Vt[y.value]||y.value,$=[{slug:"pageCatalog",name:"pageCatalog"}];if((Ft=(ct=u.value)==null?void 0:ct.categories)!=null&&Ft.length){me.value=(kn=u.value)==null?void 0:kn.categories;const ae=(Pn=u.value)==null?void 0:Pn.categories.find(fe=>!("parent"in fe.obj));ae&&$.push({slug:`${Xe.pageCatalog[y.value]}/${mt(ae.obj,y.value)}`,name:((Ln=($n=ae.obj)==null?void 0:$n.name)==null?void 0:Ln[p])||ae.key});const ye=(wn=u.value)==null?void 0:wn.categories.find(fe=>"parent"in fe.obj);ye&&$.push({slug:`${Xe.pageCatalog[y.value]}/${mt(ye.obj,y.value)}`,name:((Sn=(Tn=ye.obj)==null?void 0:Tn.name)==null?void 0:Sn[p])||ye.key})}$.push({name:Me((En=u.value)==null?void 0:En.name,y.value)});const C=(Rn=(On=(Dn=(In=u.value)==null?void 0:In.masterVariant)==null?void 0:Dn.attributes)==null?void 0:On.find(ae=>ae.name==="groups"))==null?void 0:Rn.value;if(C&&C.length&&(C.value=C),We.value=$,(Mn=(Fn=u.value)==null?void 0:Fn.masterVariant)!=null&&Mn.attributes){const ae=[],ye=[],fe=[],_e=[],sa=[],la=[],ra=[],ia=[],ca=[],ua=[],Da=u.value.masterVariant.attributes;
7Xa.forEach(Mt=>{if(Mt.exclusiveLocale&&Mt.exclusiveLocale!==y.value)return;const pe=Da.find(Nt=>Nt.name===Mt.name);if(!(!pe||!("value"in pe)||!pe.value))switch(Mt.position){case 1:ae.push(pe);break;case 2:ye.push(pe);break;case 3:_e.push(pe);break;case 4:sa.push(pe);break;case 5:la.push(pe);break;case"tag":pe.value&&ra.push(pe.name);break;case"flag":ia.push(pe);break;case"assessment":ca.push(pe);break;case"price-info":ua.push(pe);break;case"functions":const Nt=at(pe.value);Nt&&fe.push(Nt);break}}),et.value=ae,W.value=ye,tt.value=fe,yt.value=ra,_t.value=ia,je.value=ca,Bt.value=ua,Re.value=_e,vt.value=sa,Fe.value=la}Ct.value=(Nn=u.value)==null?void 0:Nn.complementaryParts.slice(0,2),kt.value=(xn=u.value)==null?void 0:xn.complementaryParts.slice(2);const O=y.value==="sv-SE"?"SEK":"EUR";qe.value={event:"page_view",page_type:"Product page",path:te.value.path},Ke.value={event:"view_item",ecommerce:{items:[{item_id:(Un=u==null?void 0:u.value)==null?void 0:Un.key,item_name:Me((Vn=u==null?void 0:u.value)==null?void 0:Vn.name,y.value),affiliation:`Lappset.com/${y.value}`,price:(Gn=u==null?void 0:u.value.price)==null?void 0:Gn.price,currency:O,item_brand:(Hn=C==null?void 0:C.value)==null?void 0:Hn[0],item_category:(zn=(Bn=me.value[0])==null?void 0:Bn.obj)==null?void 0:zn.name[y.value],item_category1:(Wn=(jn=me.value[1])==null?void 0:jn.obj)==null?void 0:Wn.name[y.value],item_category2:(Kn=(qn=me.value[2])==null?void 0:qn.obj)==null?void 0:Kn.name[y.value],item_category3:(Qn=(Yn=me.value[3])==null?void 0:Yn.obj)==null?void 0:Qn.name[y.value],item_category4:(Xn=(Jn=me.value[4])==null?void 0:Jn.obj)==null?void 0:Xn.name[y.value],item_category5:(ea=(Zn=me.value[5])==null?void 0:Zn.obj)==null?void 0:ea.name[y.value],item_list_id:Me((ta=u==null?void 0:u.value)==null?void 0:ta.name,y.value)+" "+((na=u==null?void 0:u.value)==null?void 0:na.key),item_list_name:Me((aa=u==null?void 0:u.value)==null?void 0:aa.name,y.value)+" "+((oa=u==null?void 0:u.value)==null?void 0:oa.key)}]}}});const $t=R(()=>{var l,p,$,C,O;return(l=u.value)!=null&&l.description?(($=(p=u.value)==null?void 0:p.description)==null?void 0:$[y.value])||((O=(C=u.value)==null?void 0:C.description)==null?void 0:O[eo[y.value]]):""});R(()=>{const l=[];return me.value.forEach(p=>{var $,C;l.unshift({label:(($=p.obj)==null?void 0:$.name[y.value])||((C=p.obj)==null?void 0:C.key),slug:`/${Xe.pageCatalog[y.value]}/${mt(p.obj,y.value)}`})}),l}),R(()=>{const l=[];return Ht.value.forEach(p=>{var $;l.push({label:(($=p.label)==null?void 0:$[y.value])||p.key,slug:`/${Xe.pageSearch[y.value]}`})}),l});async function zt(l){var C,O,L,S,j,K,z,xe,it,ct;console.log("[PAGE] configurableProduct() called");const p=await l;nt.value=p.masterVariant.sku;const $=(O=(C=p.masterVariant)==null?void 0:C.attributes)==null?void 0:O.find(Ft=>Ft.name==="configuration");console.log("[PAGE] Configuration attribute found:",!!$),$?(He.value=((j=(S=(L=$.value)==null?void 0:L.obj)==null?void 0:S.value)==null?void 0:j.characteristics)??!1,Be.value=((xe=(z=(K=$.value)==null?void 0:K.obj)==null?void 0:z.value)==null?void 0:xe.rules)??[],console.log("[PAGE] Extracted characteristics:",((it=He.value)==null?void 0:it.length)||0),console.log("[PAGE] Extracted rules:",((ct=Be.value)==null?void 0:ct.length)||0),console.log("[PAGE] Characteristics data:",He.value)):(console.warn("[PAGE] No configuration attribute found on product"),He.value=!1,Be.value=[]),bt.value=!0,At.value=!0,console.log("[PAGE] configurableProduct() complete")}function Me(l,p){return gt(l,p)}function at(l){if(l)try{return JSON.parse(l)}catch(p){console.error("Error parsing JSON attribute:",p);return}}function jt(){var p,$;let l=($=(p=u==null?void 0:u.value)==null?void 0:p.images)==null?void 0:$.filter(C=>{var O;return!((O=C.content_type)!=null&&O.startsWith("video/"))}).map(C=>({src:C.file_url?C.file_url+"?w=1000&f=png":"",type:C.mimetype,index:C.default?0:1}));return l==null?void 0:l.sort((C,O)=>C.index>O.index?1:-1)}function ot(){const l=jt();return(l||[]).length>0?l[0].src:""}return(l,p)=>{const $=to,C=vl,O=yl,L=Za;return d(),h("div",null,[U(L,null,{default:H(()=>{var S,j,K;return[U($,{"breadcrumbs-list":We.value,"additional-query":se?{mydesign:"true"}:void 0},null,8,["breadcrumbs-list","additional-query"]),qe.value?(d(),X(C,{key:0,data:qe.value},null,8,["data"])):I("",!0),Ke.value?(d(),X(C,{key:1,data:Ke.value},null,8,["data"])):I("",!0),U(O),U(m(Je),{style:{"max-width":"1440px",margin:"0 auto"}},{default:H(()=>{var z,xe;return[r("div",_l,[U(fl,{product:m(u),productIsConfigurable:bt.value,isMyDesign:se,isSpark:Ve,"product-breadcrumbs":We.value,documentAttributes:Fe.value,productDescription:$t.value,technicalAttributes:W.value,mainAttributes:et.value,functionAttributes:tt.value,colorAttributes:Re.value,colors:((z=m(u))==null?void 0:z.colors)||{},imageAttributes:vt.value,productTags:yt.value,productKeyFlags:_t.value,productAssessmentFlags:je.value,editorial:m(f),complementaryParts:((xe=m(u))==null?void 0:xe.complementaryParts)||[],characteristics:He.value,rules:Be.value,typeTranslations:m(Ue),myDesignProductContent:de.value},null,8,["product","productIsConfigurable","product-breadcrumbs","documentAttributes","productDescription","technicalAttributes","mainAttributes","functionAttributes","colorAttributes","colors","imageAttributes","productTags","productKeyFlags","productAssessmentFlags","editorial","complementaryParts","characteristics","rules","typeTranslations","myDesignProductContent"])])]}),_:1}),V!=null&&V.gwpFossil||V!=null&&V.gwpTotal?(d(),X(m(Je),{key:2,style:{"max-width":"1440px",margin:"0 auto"}},{default:H(()=>[r("div",bl,[U(ko,{fields:V})])]),_:1})):I("",!0),U(m(Je),{style:{"background-color":"#F4F4F4"}},{default:H(()=>[r("div",Al,[U(Do,{fields:Ce})])]),_:1}),m(f).descriptionOverride?(d(),X(m(Je),{key:3},{default:H(()=>[r("div",Cl,[U(m(qt),{description:m(f).descriptionOverride.description,paddingLeft:"large",paddingRight:"large"},null,8,["description"])])]),_:1})):I("",!0),(S=m(f))!=null&&S.showCustomerReference&&((K=(j=m(f))==null?void 0:j.productGroupData)!=null&&K.customerReference)?(d(),X(m(Je),{key:4,style:{"max-width":"1440px",margin:"0 auto"}},{default:H(()=>[r("div",kl,[U(mo,{fields:Y})])]),_:1})):I("",!0),(d(!0),h(ee,null,ce(Z.value,z=>(d(),X(m(Je),{key:z.key,style:{"max-width":"1440px",margin:"0 auto"}},{default:H(()=>
7[r("div",Pl,[U(m(qt),Xt({subtitle:z.subtitle,heading:z.heading,description:z.description,imageSrc:z.imageSrc,imageAlt:z.imageAlt,imagePosition:z.imagePosition,ref_for:!0},z.button,{paddingLeft:"large",paddingRight:"large"}),null,16,["subtitle","heading","description","imageSrc","imageAlt","imagePosition"])])]),_:2},1024))),128))]}),_:1})])}}});export{El as default};

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.