1import{_ as K}from"./ItemCard.zDBFFqBF.js";import{_ as Q,bA as U,f as u,n as m,l as Z,k as ee,V as te,m as f,w as se,o as g,c as p,d as c,t as oe,S as R,G as V,F as j,M as ae,s as ne,af as re,ag as le}from"./entry.zlGrKV9S.js";import{e as X}from"./_deepdash.856KG5aX.js";import"./useToast.2mKJaF47.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./useItemVariants.8vutJz2d.js";import"./useTikTokEvents.CgTpsFoq.js";import"./HealthDetails.Y84Yp7JH.js";import"./useItemSlotsReservation.GYmp5ixe.js";import"./SectionBox.SKDlK6up.js";import"./InlineDatePicker.NVuqje2m.js";import"./main.e9WtgjyO.js";import"./Icon.LSEtOKWI.js";/* empty css */import"./useDiscount.8bSj2gwE.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"780f0f2ecc0b8b2ccee17a13740c89faf5d601d9"};var _=new o.Error().stack;_&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[_]="99fad024-e1c3-4133-be7a-afa70db5226b",o._sentryDebugIdIdentifier="sentry-dbid-99fad024-e1c3-4133-be7a-afa70db5226b")}catch{}})();const $=o=>(re("data-v-c067cc88"),o=o(),le(),o),ce={class:"flex justify-center px-2 py-2 w-full font-bold ok-text-primary dark:text-white text-lg"},ie={class:"relative w-full carousel-wrapper suggested-carousel"},ue=$(()=>c("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[c("path",{d:"M15 6l-6 6 6 6"})],-1)),de=[ue],me=["onClick"],fe=$(()=>c("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[c("path",{d:"M9 6l6 6-6 6"})],-1)),ge=[fe],M=155,pe={__name:"index",props:{item:{type:Object,default:()=>({})},excludedItemIds:{type:Array,default:()=>[]}},emits:["itemSelected"],setup(o,{emit:_}){U(e=>({"058bce02":u(z)}));const n=o,A=_,d=m(null),i=m([]),v=m(!1),h=m(!1),P=m(0),D=m(0),F=Z(),S=ee(),y=te(),z=f(()=>S.isDark?"#ffffff":"#000000"),b=f(()=>{var e;return y.menuByType((e=F.params)==null?void 0:e.type,!1)??[]}),k=f(()=>S.windowWidth>768?16:12),G=f(()=>{const e=Number(S._appWidth??0),s=S.windowWidth>768?88:72,r=Math.max(e-s,M);return Math.max(1,Math.floor((r+k.value)/(M+k.value)))}),w=f(()=>i.value.length>1&&i.value.length>G.value),B=e=>{var s;(s=d.value)==null||s.scrollBy({left:e*(M+k.value),behavior:"smooth"})},O=()=>B(-1),Y=()=>B(1),q=e=>{d.value&&(v.value=!0,h.value=!1,P.value=e.clientX,D.value=d.value.scrollLeft)},H=e=>{if(!v.value||!d.value)return;const s=e.clientX-P.value;Math.abs(s)>4&&(h.value=!0),d.value.scrollLeft=D.value-s},x=()=>{v.value=!1,setTimeout(()=>{h.value=!1})},C=e=>{h.value||A("itemSelected",e)},E=(e,s,r)=>{var l;if(s!=null&&s.smart)return;const a=(l=e==null?void 0:e.id)==null?void 0:l.toString();r.has(a)&&(e.category=s?{id:s.id,slug:s.slug,locale:s.locale}:null,i.value.find(I=>I.id===e.id)||i.value.push(e))};return se([()=>{var e;return(e=n.item)==null?void 0:e.id},()=>n.excludedItemIds,()=>y.crossSellingItems,b],()=>{var r,a,l,I,N,T;if(!((r=b.value)!=null&&r.length))return;if(i.value=[],(l=(a=n.item)==null?void 0:a.suggested_items)!=null&&l.length){if((N=(I=n.item)==null?void 0:I.related)!=null&&N.length){i.value=n.item.related;return}const t=new Set(n.item.suggested_items.map(String));X(b.value,(W,L,J)=>{E(W,J,t)},{childrenPath:["subcategories","items"]});return}if(!((T=y.crossSellingItems)!=null&&T.length))return;const e=new Set(n.excludedItemIds.map(t=>t==null?void 0:t.toString())),s=new Set(y.crossSellingItems.map(t=>typeof t=="object"?(t==null?void 0:t.id)??(t==null?void 0:t.item_id):t).filter(t=>t&&!e.has(t.toString())).map(String));X(b.value,(t,W,L)=>{E(t,L,s)},{childrenPath:["subcategories","items"]})},{immediate:!0,deep:!0}),(e,s)=>{const r=K;return g(),p(j,null,[c("div",ce,oe(e.$t("you-may-like")),1),c("div",ie,[c("div",{class:R(["suggested-carousel__layout",{"suggested-carousel__layout--no-nav":!u(w)}])},[u(w)?(g(),p("button",{key:0,type:"button",class:"suggested-carousel__nav suggested-carousel__nav--prev",onClick:O},de)):V("",!0),c("div",{ref_key:"scrollContainerRef",ref:d,class:R(["suggested-carousel__track",{"is-dragging":u(v),"suggested-carousel__track--no-nav":!u(w)}]),onPointerdown:q,onPointermove:H,onPointerup:x,onPointerleave:x,onPointercancel:x},[(g(!0),p(j,null,ae(u(i),a=>(g(),p("div",{key:a.id,class:"flex justify-center items-center carousel__item suggested-slide",onClick:l=>C(a)},[ne(r,{item:a,showDescription:!1,compact:"",crossSelling:"",onClicked:l=>C(a),onShowPriceModal:l=>C(a)},null,8,["item","onClicked","onShowPriceModal"])],8,me))),128))],34),u(w)?(g(),p("button",{key:1,type:"button",class:"suggested-carousel__nav suggested-carousel__nav--next",onClick:Y},ge)):V("",!0)],2)])],64)}}},Re=Q(pe,[["__scopeId","data-v-c067cc88"]]);export{Re 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.