PageSourceSearch

https://www.fielmann.cz/_nuxt/Dqgbrh9O2.js

js fielmann.cz collected 2026-09-29 00:04:04 UTC 7,594 bytes, 1 lines download raw bytes

1import{i as ge}from"./W8yBmbHj.js";import{Ct as ye,D as y,E as q,Kt as G,On as t,Qn as T,Yt as _e,_,b as l,bt as P,ct as he,et as ve,g as n,k as xe,mt as o,nr as x,o as C,qt as g,tr as M,v as h,y as f}from"./CMma-7Vx.js";import{H as we}from"./Br9o_PmH.js";import{t as Pe}from"./DG7sPv5b.js";import{ht as Ce,r as Se,z as Q}from"./Dm6uK8nD.js";import{m as K}from"./DG3aEyU_.js";import{d as U}from"./Da1g2PJ82.js";import{t as Be}from"./BTdX0wIf2.js";import{o as V}from"./C2x3Az-d2.js";import{r as Te}from"./DsPBT4vf.js";import{t as Ie}from"./K9rsuiWd.js";import{t as $e}from"./CmOIa94w.js";import{r as De}from"./DrEJHg-V.js";import{s as Re}from"./DPgatRlY.js";import{t as W}from"./CeMqVJl4.js";import{t as Ae}from"./DUGi2R1z2.js";import{c as ze}from"./0wYR3XtN2.js";import{t as Me}from"./B4SffaxL.js";import{t as Ke}from"./6pthga7K.js";import{n as Ve,t as Le}from"./DKSqGKyh2.js";import{t as je}from"./BNO0uzV22.js";var Ee={key:0,class:"text-lg font-medium"},Ne={key:1,class:"text-4xl font-medium 2xl:text-5xl","data-testid":"intro-headline"},Fe={key:2,class:"text-base text-balance"},He={key:3,class:"flex justify-center gap-2"},Oe={class:"flex flex-wrap gap-x-2 gap-y-1 p-2","data-testid":"product-badges"},qe={class:"space-y-4 p-2"},Ge={class:"flex gap-x-3"},Qe={key:2,class:"flex justify-center gap-x-3 sm:px-8"},Ue={class:"flex flex-wrap gap-x-2 gap-y-1 p-2","data-testid":"product-badges"},We={class:"space-y-4 p-2"},Ye={key:1,class:"w-full! max-w-[600px]"},Je=xe({__name:"ProductRecommendationTeaser",props:{blok:{type:Object,default:()=>{}},prefetch:{type:String,default:void 0}},async setup(a){let p,S;const r=a,Y=n(()=>i.value.length>=2),{$fimLocalePath:J}=ge(),L=e=>J(Se(e)),I=n(()=>r.blok?.product_ids?.split(",")?.map(e=>parseInt(e))??[]),$=n(()=>r.blok?.product_reference_keys?.split(",")?.map(e=>e.trim())?.filter(Boolean)??[]),{data:X,status:Z}=([p,S]=G(()=>Te({params:{ids:I.value||[],with:U},options:{dedupe:"defer"}},`productRecommendation-${r.blok._uid}`)),p=await p,S(),p),{data:ee,status:te}=([p,S]=G(()=>je({params:{referenceKeys:$.value||[],with:U},options:{dedupe:"defer"}})),p=await p,S(),p),i=n(()=>{const e=[...new Set($.value)],c=[...new Set(I.value)],d=e.flatMap(s=>{const k=ee?.value?.find(u=>u.referenceKey===s);return k?[k]:[]});return[...d,...c.flatMap(s=>{if(d.some(u=>u&&u.id===s))return[];const k=X.value?.find(u=>u.id===s);return k?[k]:[]})].filter(s=>Ce(s))}),{isLessThan:j,isGreaterThan:oe,breakpoint:ae}=Be(),w=n(()=>(ae.value,j("sm")?1:j("md")?2:3)),E=n(()=>{const e=w.value,c=i.value??[];return Array.from({length:Math.ceil(c.length/e)},(d,s)=>c.slice(s*e,s*e+e))}),D=n(()=>{const e=["success","error"];return!e.includes(Z.value)||!e.includes(te.value)}),re=n(()=>{const e=(I.value?.length??0)+($.value?.length??0);return Math.min(3,Math.max(1,e||3))}),se=n(()=>{const e=w.value,c=re.value,d=[];for(let s=0;s<c;s+=e)d.push(Array.from({length:Math.min(e,c-s)}));return d});he(()=>{i.value.length>0&&(F(i.value,z,-1,0),K(r.blok)&&H({...r.blok,products:i.value}))});const{marginClasses:le}=De(r.blok),ne=n(()=>r.blok?.intro_show&&r.blok?.intro_headline),ce=n(()=>i.value.length===1),ie=n(()=>V(r.blok.theme_background,"#ffffff")),N=n(()=>r.blok.theme_text==="light"?"light":"dark"),R=n(()=>V(r.blok.theme_label,"#000000")),A=n(()=>V(r.blok.theme_label_text,"#ffffff")),z={name:[ze,r.blok.creative_name].filter(Boolean).join(" | "),id:r.blok._uid},{trackSelectItem:de,trackViewItemList:F,trackPromotionClick:ue,trackPromotionView:H}=Pe(),me=({product:e,index:c})=>{we(e.categories)&&de(e,z,c),K(r.blok)&&ue(r.blok)},fe=({product:e,index:c})=>{F([e],z,c,1),K(r.blok)&&H({...r.blok,products:[e]})};return(e,c)=>{const d=Me,s=Ve,k=$e,u=Le,O=Re,pe=Ae,ke=ye("editable");return _e((o(),l("div",ve({...a.blok.id?{id:a.blok.id}:{}},{class:[...t(le)],style:{backgroundColor:t(ie)},role:"main","data-testid":"product-recommendation-teaser"}),[_("div",{class:T(["flex flex-col gap-y-14 pt-8 pb-16 md:gap-x-2 md:py-20 md:pb-24",{"md:grid md:grid-cols-2":t(ce)}])},[t(ne)?(o(),l("div",{key:0,"data-testid":"product-recommendation-intro",class:T(["mx-auto flex max-w-4xl flex-col justify-center space-y-4 text-center",{"text-white":t(N)==="light","text-black":t(N)==="dark","container max-w-6xl":a.blok.intro_in_container}])},[a.blok?.intro_overline?(o(),l("p",Ee,x(a.blok.intro_overline),1)):f("",!0),a.blok?.intro_headline?(o(),l("h2",Ne,x(a.blok.intro_headline),1)):f("",!0),a.blok?.intro_text?(o(),l("p",Fe,x(a.blok.intro_text),1)):f("",!0),a.blok?.intro_label?(o(),l("div",He,[_("p",{class:"rounded-[4px] px-4 py-1 text-2xl font-medium",style:M({backgroundColor:t(R),color:t(A)})},x(a.blok.intro_label),5)])):f("",!0)],2)):f("",!0),t(Y)||t(D)?(o(),h(pe,{key:`prs-${t(w)}`,"show-buttons":!1,dots:t(E).length>1&&t(oe)("xs"),"has-gradient":!1,class:T(["product-recommendation-scroller mx-auto w-full",{"md:max-w-[calc(400px*3+24px)]":t(i).length>=3,"md:max-w-[calc(400px*2+24px)]":t(i).length===2}]),"wrapper-classes":"mb-2","item-class":"flex w-4/5 snap-center gap-x-3 p-2 sm:w-full"},{default:g(()=>[t(D)?(o(!0),l(C,{key:1},P(t(se),(m,v)=>(o(),h(Ke,{key:`product-recommendation-skeleton-slide-${v}`,class:"w-[calc(100vw)] p-2 sm:w-full"},{default:g(()=>[_("div",Ge,[(o(!0),l(C,null,P(m,(b,B)=>(o(),l("div",{key:`skeleton-${v}-${B}`,class:"w-full sm:w-[400px]"},[y(W)]))),128))])]),_:2},1024))),128)):(o(!0),l(C,{key:0},P(t(E),(m,v)=>
1(o(),l("div",{key:`product-recommendation-slide-${v}`,class:"flex w-full"},[(o(!0),l(C,null,P(m,(b,B)=>(o(),l("div",{key:`product-recommendation-${b.id}`,class:T(["w-full lg:max-w-(--breakpoint-xs)",{"sm:w-1/2 md:w-1/3":t(i).length>=3}])},[y(O,{product:b,prefetch:a.prefetch,"disable-swipe":"",placement:"PDP-carousel","onClick:selectItem":be=>me({product:b,index:v*t(w)+B}),"onIntersect:product":be=>fe({product:b,index:v*t(w)+B})},{"header-actions":g(()=>[_("div",Oe,[a.blok.custom_product_badge?(o(),h(d,{key:0,label:a.blok.custom_product_badge,type:"default",size:"small",style:M({backgroundColor:t(R),color:t(A)})},null,8,["label","style"])):f("",!0),a.blok.show_product_badges?(o(),h(s,{key:1,product:b},null,8,["product"])):f("",!0)])]),"footer-action":g(()=>[_("div",qe,[y(k,{class:"w-full",to:L(b),"is-small":"",type:"secondary"},{default:g(()=>[q(x(e.$t("pdcard.switch_now")),1)]),_:1},8,["to"]),y(u,{"get-attribute":("getProductAttribute"in e?e.getProductAttribute:t(Q))(b),type:"list","list-spacing":3},null,8,["get-attribute"])])]),_:2},1032,["product","prefetch","onClick:selectItem","onIntersect:product"])],2))),128))]))),128))]),_:1},8,["dots","class"])):(o(),l("div",Qe,[t(D)?(o(),l("div",Ye,[y(W)])):(o(!0),l(C,{key:0},P(t(i),m=>(o(),h(O,{key:`product-recommendation-${m.id}`,class:"w-full! max-w-[calc(100vw-40px)] sm:max-w-[600px]",product:m,prefetch:a.prefetch,"disable-swipe":"",placement:"PDP-carousel"},{"header-actions":g(()=>[_("div",Ue,[a.blok.custom_product_badge?(o(),h(d,{key:0,label:a.blok.custom_product_badge,type:"default",size:"small",style:M({backgroundColor:t(R),color:t(A)})},null,8,["label","style"])):f("",!0),a.blok.show_product_badges?(o(),h(s,{key:1,product:m},null,8,["product"])):f("",!0)])]),"footer-action":g(()=>[_("div",We,[y(k,{class:"w-full",to:L(m),"is-small":"",type:"secondary"},{default:g(()=>[q(x(e.$t("pdcard.switch_now")),1)]),_:1},8,["to"]),y(u,{"get-attribute":("getProductAttribute"in e?e.getProductAttribute:t(Q))(m),type:"list","list-spacing":3},null,8,["get-attribute"])])]),_:2},1032,["product","prefetch"]))),128))]))],2)],16)),[[ke,a.blok]])}}}),_t=Object.assign(Ie(Je,[["__scopeId","data-v-40ba21f5"]]),{__name:"ProductRecommendationTeaser"});export{_t 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.