"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4311,5165],{3642:(e,t,a)=>{a.d(t,{BrandCarouselPreview:()=>y,CategoryCarouselPreview:()=>b,FeaturedBlogPostsPreview:()=>f,ProductRailPreview:()=>x});var r=a(95155),l=a(12115),i=a(52987),o=a(52619),s=a.n(o),n=a(2821),d=a(4562),c=a(97094),m=a(18867),u=a(62391),p=a(97003),g=a(92531),h=a(30655);function x({data:e,locale:t,className:a,paddingClass:o="",sectionOrder:d}){let[m,g]=(0,l.useState)(null),[x,f]=(0,l.useState)(!0),[b,y]=(0,l.useState)(!1),v=e.filterBy?.productCount||e.filterBy?.productIds?.length||8,w="carousel"===e.layout,j=e.columns||4,N=w?"flex gap-3 md:gap-4 overflow-x-auto snap-x snap-mandatory scrollbar-hide pb-4":`${(e=>{let t={2:"grid grid-cols-2 md:grid-cols-2 gap-2 sm:gap-3",3:"grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3",4:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 sm:gap-3",5:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-2 sm:gap-3",6:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-2 sm:gap-3"};return t[e]||t[4]})(j)} gap-3 md:gap-4`,k=o.includes("p-0")||o.includes("px-0");(0,l.useEffect)(()=>{let t="https://api.komero.ge/Product",a=window.location.hostname;!async function(){try{let r=[];if(e.filterBy?.productIds&&e.filterBy.productIds.length>0){let l=new URLSearchParams;e.filterBy.productIds.forEach(e=>l.append("ids",e));let i=await fetch(`${t}/get-products-by-ids?${l.toString()}`,{headers:{"X-Client-Domain":a}});i.ok?r=await i.json():(console.warn("[ProductRailPreview] get-products-by-ids failed:",i.status),y(!0))}else{let l={};e.filterBy?.categoryIds?.length&&(l.categoryIds=e.filterBy.categoryIds),e.filterBy?.brandIds?.length&&(l.brandIds=e.filterBy.brandIds),e.filterBy?.isRandom!==void 0&&(l.isRandom=e.filterBy.isRandom),e.filterBy?.isNewArrival&&(l.isNewArrival=e.filterBy.isNewArrival),e.filterBy?.hasDiscount&&(l.isDiscounted=e.filterBy.hasDiscount);let i=new URLSearchParams({page:"1",pageSize:String(v),sortColumn:"name",sortOrder:"asc"}),o=await fetch(`${t}/get-products-by-filtering?${i.toString()}`,{method:"POST",headers:{"Content-Type":"application/json","X-Client-Domain":a},body:JSON.stringify(l)});o.ok?r=((await o.json()).items||[]).slice(0,v):(console.warn("[ProductRailPreview] get-products-by-filtering failed:",o.status),y(!0))}g(r)}catch(e){console.warn("[ProductRailPreview] fetch error:",e),y(!0),g(null)}finally{f(!1)}}()},[JSON.stringify(e.filterBy),v]);let C="ka"===t?"ყველას ნახვა":"View All",S="ka"===t?"ყველა":"All",P=(0,r.jsxs)("div",{className:(0,n.A)("flex mb-6 md:mb-10 gap-2 items-center",k&&"px-4","center"===e.titlePosition&&"flex-col justify-center text-center","right"===e.titlePosition&&"flex-row-reverse justify-between text-right",(!e.titlePosition||"left"===e.titlePosition)&&"flex-row justify-between text-left"),children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0 w-full",children:[(0,r.jsx)("h2",{className:"font-heading text-lg md:text-3xl lg:text-4xl font-bold text-foreground",children:(0,u.t)(e.title,t)}),e.subtitle&&(0,r.jsx)("p",{className:"font-primary hidden md:block text-muted-foreground mt-2 md:mt-3 text-sm md:text-lg",children:(0,u.G)(e.subtitle,t)})]}),(0,r.jsx)("div",{className:(0,n.A)("flex-shrink-0","center"===e.titlePosition&&"mt-3"),children:(0,r.jsx)(p.$,{asChild:!0,className:"group",size:"sm",variant:"ghost",children:(0,r.jsxs)(s(),{className:"font-primary flex items-center gap-1 text-sm font-semibold",href:e.viewAllHref,children:[(0,r.jsx)("span",{className:"font-primary hidden sm:inline",children:C}),(0,r.jsx)("span",{className:"font-primary sm:hidden",children:S}),(0,r.jsx)(i.A,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 group-hover:translate-x-1 transition-transform"})]})})})]}),A=(0,r.jsx)("div",{className:N,children:Array.from({length:v}).map((e,t)=>(0,r.jsx)(c.ProductCardSkeleton,{},t))});return(0,r.jsx)("section",{"data-section-order":d,"data-section-type":"ProductRail",children:(0,r.jsxs)("div",{className:o,children:[P,x&&(0,r.jsx)("div",{className:"invisible",children:A}),!x&&b&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:"Preview — no data loaded"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:A})]}),!x&&!b&&m&&m.length>0&&(w?(0,r.jsx)(h.default,{carouselVariant:e.carouselVariant,columns:j,products:m}):(0,r.jsx)("div",{className:N,children:m.map((e,t)=>(0,r.jsx)("div",{className:"h-full",children:(0,r.jsx)(c.default,{priority:t<4,product:e})},e.id))})),!x&&!b&&m&&0===m.length&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:"No products match this filter"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:A})]})]})})}function f({data:e,locale:t,className:a,paddingClass:o="",sectionOrder:n}){let[d,c]=(0,l.useState)(null),[g,h]=(0,l.useState)(!0),[x,f]=(0,l.useState)(!1),b=e.limit||("carousel"===e.layout?6:3);(0,l.useEffect)(()=>{!async function(){try{let e=window.location.hostname,t=new URLSearchParams({page:"1",pageSize:String(b),sortBy:"date",sortOrder:"desc"}),a=await fetch(`https://api.komero.ge/api/blog/posts?${t.toString()}`,{headers:{"X-Client-Domain":e}});if(a.ok){let e=await a.json();c(e.items||[])}else console.warn("[FeaturedBlogPostsPreview] listPosts failed:",a.status),f(!0),c(null)}catch(e){console.warn("[FeaturedBlogPostsPreview] fetch error:",e),f(!0),c(null)}finally{h(!1)}}()},[b]);let y=(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:Array.from({length:b}).map((e,t)=>(0,r.jsx)("div",{className:"h-64 bg-muted animate-pulse rounded-2xl"},t))}),v=(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-12 gap-8",children:[(0,r.jsxs)("div",{className:"max-w-3xl",children:[(0,r.jsx)("h2",{className:"font-heading text-4xl md:text-5xl font-black text-foreground dark:text-foreground",children:(0,u.t)(e.title||{en:"Blog Posts",ka:"ბლოგები"},t)}),e.subtitle&&(0,r.jsx)("p",{className:"font-primary text-muted-foreground mt-4 text-lg",children:(0,u.G)(e.subtitle,t)})]}),e.viewAllHref&&(0,r.jsx)(p.$,{asChild:!0,variant:"outline",children:(0,r.jsxs)(s(),{className:"flex items-center gap-2",href:e.viewAllHref,children:["ka"===t?"ყველას ნახვა":"View All",(0,r.jsx)(i.A,{className:"h-4 w-4"})]})})]});return(0,r.jsx)("section",{className:a||"bg-slate-50/50 dark:bg-slate-950/50 py-16","data-section-order":n,"data-section-type":"FeaturedBlogPosts",children:(0,r.jsxs)("div",{className:o,children:[v,g&&y,!g&&x&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:"Preview — no data loaded"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:y})]}),!g&&!x&&d&&d.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:d.map(e=>(0,r.jsx)(m.default,{locale:t,post:e},e.id))}),!g&&!x&&d&&0===d.length&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:"No blog posts yet"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:y})]})]})})}function b({data:e,locale:t,paddingClass:a="",sectionOrder:i}){let[o,s]=(0,l.useState)(null),[n,d]=(0,l.useState)(!0),[c,m]=(0,l.useState)(!1),u=e.slidesPerView||6;(0,l.useEffect)(()=>{!async function(){try{let e=window.location.hostname,t=await fetch("https://api.komero.ge/Category/get-all-categories",{headers:{"X-Client-Domain":e}});if(t.ok){let e=await t.json();s(e)}else console.warn("[CategoryCarouselPreview] get-all-categories failed:",t.status),m(!0)}catch(e){console.warn("[CategoryCarouselPreview] fetch error:",e),m(!0)}finally{d(!1)}}()},[]);let p=(0,r.jsx)("div",{className:"flex gap-3 overflow-hidden",children:Array.from({length:u}).map((e,t)=>(0,r.jsxs)("div",{className:"flex-shrink-0 flex flex-col items-center gap-2",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full bg-muted animate-pulse"}),(0,r.jsx)("div",{className:"w-14 h-3 rounded bg-muted animate-pulse"})]},t))}),h=c||!n&&(!o||0===o.length);return(0,r.jsx)("div",{"data-section-order":i,"data-section-type":"CategoryCarousel",children:n?(0,r.jsx)("div",{className:`${a} invisible`,children:p}):h?(0,r.jsx)("div",{className:a,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:c?"Preview — no data loaded":"No categories yet"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:p})]})}):(0,r.jsx)(g.default,{categories:o,data:e,locale:t,paddingClass:a})})}function y({data:e,locale:t,paddingClass:a="",sectionOrder:i}){let[o,s]=(0,l.useState)(null),[n,c]=(0,l.useState)(!0),[m,u]=(0,l.useState)(!1),p=e.slidesPerView||6;(0,l.useEffect)(()=>{!async function(){try{let e=window.location.hostname,t=await fetch("https://api.komero.ge/Brand/get-all-brands",{headers:{"X-Client-Domain":e}});if(t.ok){let e=await t.json();s(e)}else console.warn("[BrandCarouselPreview] get-all-brands failed:",t.status),u(!0)}catch(e){console.warn("[BrandCarouselPreview] fetch error:",e),u(!0)}finally{c(!1)}}()},[]);let g=(0,r.jsx)("div",{className:"flex gap-4 overflow-hidden",children:Array.from({length:p}).map((e,t)=>(0,r.jsx)("div",{className:"flex-shrink-0 w-24 h-14 rounded-lg bg-muted animate-pulse"},t))}),h=o??[];e.brandIds?.length&&(h=h.filter(t=>e.brandIds.includes(t.id))),e.maxBrands&&(h=h.slice(0,e.maxBrands));let x=m||!n&&0===h.length;return(0,r.jsx)("div",{"data-section-order":i,"data-section-type":"BrandCarousel",children:n?(0,r.jsx)("div",{className:`${a} invisible`,children:g}):x?(0,r.jsx)("div",{className:a,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)("span",{className:"bg-black/60 text-white text-xs px-2 py-1 rounded-full",children:m?"Preview — no data loaded":"No brands yet"})}),(0,r.jsx)("div",{className:"opacity-40 pointer-events-none",children:g})]})}):(0,r.jsx)(d.default,{brands:h,data:e,locale:t,paddingClass:a})})}},4562:(e,t,a)=>{a.d(t,{default:()=>u});var r=a(95155),l=a(12115),i=a(52619),o=a.n(i),s=a(15239),n=a(38858),d=a(58010),c=a(56654),m=a(62391);function u({data:e,locale:t,brands:a,paddingClass:i=""}){let u=(0,l.useRef)(null),p=(0,l.useRef)(null),[g,h]=(0,l.useState)(new Set),x=Math.max(1,Math.min(e.slidesPerView||6,Math.max(1,a.length-1))),f=(e.autoplay??!1)&&a.length>x,b=f&&void 0!==e.autoScrollSpeed&&e.autoScrollSpeed>0,y=e.autoScrollSpeed??.8,v=e.showHeader??!!(e.title||e.subtitle);return((0,l.useEffect)(()=>{if(!u.current||0===a.length)return;let t={type:"loop",perPage:x,gap:"1rem",pagination:e.showPagination??!1,arrows:e.showArrows??!0,autoplay:f&&!b,interval:e.autoplayInterval||3e3,pauseOnHover:!0,drag:"free",flickPower:300,trimSpace:!0,focus:0,accessibility:!0,waitForTransition:!0,breakpoints:{640:{perPage:Math.min(x,2),gap:"0.5rem",arrows:!1},768:{perPage:Math.min(x,3),gap:"0.75rem",arrows:!1},1024:{perPage:Math.min(x,4),gap:"0.875rem"},1280:{perPage:Math.min(x,5),gap:"0.875rem"}}};b&&(t.autoScroll={speed:y,pauseOnHover:!0,pauseOnFocus:!1}),p.current=new n.Ay(u.current,t);let r=f?{AutoScroll:d.Z}:void 0;return p.current.mount(r),()=>{p.current?.destroy(),p.current=null}},[a,x,e.showPagination,e.showArrows,f,e.autoplayInterval,y,b]),a.length)?(0,r.jsx)("section",{className:"",children:(0,r.jsxs)("div",{className:`${i}`,children:[v&&(0,r.jsxs)("div",{className:"mb-8 space-y-2",children:[e.title&&(0,r.jsx)("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground text-balance",children:(0,m.t)(e.title,t)}),e.subtitle&&(0,r.jsx)("p",{className:"font-primary text-muted-foreground text-sm md:text-base",children:(0,m.t)(e.subtitle,t)})]}),(0,r.jsx)("div",{ref:u,className:"splide",children:(0,r.jsx)("div",{className:"splide__track",children:(0,r.jsx)("ul",{className:"splide__list",children:a.map(e=>{let a=(0,c.t)(e.images),l=!!e.id&&g.has(e.id);return(0,r.jsx)("li",{className:"splide__slide bg-transparent",children:(0,r.jsx)(o(),{"aria-label":e.name||"Brand",className:"group block h-full bg-transparent",href:`/${t}/brand/${e.slug||e.id}`,children:(0,r.jsx)("div",{className:"relative flex h-24 w-full items-center justify-center px-6 py-4 sm:h-28 md:h-32 bg-transparent",children:a&&!l?(0,r.jsx)(s.default,{fill:!0,alt:"",className:"object-contain opacity-70 transition-opacity duration-200 hover:opacity-100",sizes:"(max-width: 640px) 180px, (max-width: 768px) 220px, (max-width: 1024px) 240px, 280px",src:a,onError:()=>{var t;return t=e.id,void h(e=>new Set(e).add(t))}}):(0,r.jsx)("span",{className:"font-heading text-sm md:text-base font-semibold text-muted-foreground",children:e.name||"Brand"})})})},e.id)})})})})]})}):null}},15777:(e,t,a)=>{a.d(t,{U:()=>r});function r(e){if(e&&0!==e.length)return e[0]}},18867:(e,t,a)=>{a.d(t,{default:()=>o});var r=a(95155),l=a(12115);let i={1:(0,l.lazy)(()=>Promise.all([a.e(4909),a.e(1138)]).then(a.bind(a,1138))),2:(0,l.lazy)(()=>Promise.all([a.e(4909),a.e(3873)]).then(a.bind(a,43873))),3:(0,l.lazy)(()=>Promise.all([a.e(4909),a.e(9900)]).then(a.bind(a,99900)))};function o({post:e,locale:t,variant:a=1,showDate:o=!0,showAuthor:s=!0,showExcerpt:n=!0,className:d}){let c=i[a]||i[1];return(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)("div",{className:"w-full aspect-[16/10] animate-pulse bg-slate-100 dark:bg-slate-800 rounded-3xl"}),children:(0,r.jsx)(c,{className:d,locale:t,post:e,showAuthor:s,showDate:o,showExcerpt:n})})}},21333:(e,t,a)=>{a.d(t,{default:()=>s});var r=a(95155),l=a(12115),i=a(46980),o=a.n(i);function s({data:e,locale:t,sectionOrder:a,paddingClass:i}){let s=(0,l.useRef)(null),n=(0,l.useId)().replace(/:/g,"-"),d=(0,l.useMemo)(()=>{var a;return a=e.html,a?"string"==typeof a?a:a[t]?a[t]:a.en?a.en:Object.values(a).find(e=>e&&e.trim())??"":""},[e.html,t]),c=(0,l.useMemo)(()=>{let e=d;e=(e=e.replace(/]*?)categoryLink="([^"]*)"([^>]*?)>/gi,(e,a,r,l)=>{let i=a.replace(/href="[^"]*"/gi,""),o=l.replace(/href="[^"]*"/gi,"");return``})).replace(/]*?)pageLink="([^"]*)"([^>]*?)>/gi,(e,a,r,l)=>{let i=a.replace(/href="[^"]*"/gi,""),o=l.replace(/href="[^"]*"/gi,"");return``});let a=o().sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","scrolling","width","height","loading","style"],ALLOW_DATA_ATTR:!0});a=a.replace(/]*)>/gi,(e,t)=>t.includes("allow=")?e.replace(/allow="([^"]*)"/i,(e,t)=>{let a=t.split(";").map(e=>e.trim());return a.includes("xr-spatial-tracking")||a.push("xr-spatial-tracking"),`allow="${a.join("; ")}"`}):``);let r=0;return(a=a.replace(/]*)>/gi,(e,t)=>{if(r++,!t.includes("loading=")){let e=1===r?"eager":"lazy";return``}return e})).replace(/]*?)(?:width="(\d+)")?(?:[^>]*?)(?:height="(\d+)")?([^>]*)>/gi,(e,t,a,r,l)=>a&&r?e:`
`)},[d,t]);(0,l.useEffect)(()=>{if(s.current&&e.css){let t=document.createElement("style");t.textContent=m(e.css,`[data-custom-html="${n}"]`),s.current.appendChild(t)}},[e.css,n]);let m=(e,t)=>{try{return e.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,(e,a,r)=>a.trim().startsWith("@")||a.trim().startsWith(":root")||"html"===a.trim()||"body"===a.trim()?e:`${t} ${a.trim()}${r}`)}catch(t){return console.error("Error scoping CSS:",t),e}},u=["custom-html-section",i,e.containerClass||""].filter(Boolean).join(" ");return(0,r.jsxs)("section",{ref:s,className:u,"data-custom-html":n,"data-section-order":a,"data-section-type":"CustomHTML",children:[(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:c.replace(//gi,"
​")},className:"custom-html-content",style:{minHeight:"auto"}}),(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:` [data-custom-html="${n}"] .custom-html-content img:not([width]):not([height]) { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; } [data-custom-html="${n}"] .custom-html-content img[width][height] { max-width: 100%; height: auto; display: block; } [data-custom-html="${n}"] .custom-html-content img:first-of-type { content-visibility: auto; } [data-custom-html="${n}"] .custom-html-content iframe { max-width: 100%; border: 0; } [data-custom-html="${n}"] .custom-html-content * { max-width: 100%; } `}})]})}},28986:(e,t,a)=>{a.d(t,{AdminPreviewWrapper:()=>s});var r=a(95155),l=a(67909),i=a(52467);let o=(0,l.default)(()=>Promise.all([a.e(9027),a.e(7403)]).then(a.bind(a,97403)).then(e=>e.AdminPreviewEditorWrapper),{loadableGenerated:{webpack:()=>[97403]},ssr:!1,loading:e=>(0,r.jsx)(r.Fragment,{children:e.children})});function s({children:e,...t}){let{isEditorMode:a,isBrowseMode:l}=(0,i.a)();return!a||l?(0,r.jsx)(r.Fragment,{children:e}):(0,r.jsx)(o,{...t,children:e})}},30655:(e,t,a)=>{a.d(t,{default:()=>x});var r=a(95155),l=a(12115),i=a(37270),o=a(90368),s=a(27937),n=a(97094),d=a(12976);let c={type:"slide",perPage:5,gap:"0.75rem",pagination:!1,arrows:!1,drag:"free",trimSpace:!0,snap:!0,omitEnd:!1,focus:0,perMove:1,flickPower:300,breakpoints:{2e3:{perPage:5,gap:"0.75rem"},1536:{perPage:6,gap:"0.75rem"},1280:{perPage:5,gap:"0.75rem"},1024:{perPage:4,gap:"0.75rem"},768:{perPage:4,gap:"0.5rem"},640:{perPage:3,gap:"0.5rem"},480:{perPage:2,gap:"0.5rem",padding:{right:"2.5rem"}}}},m={type:"slide",perPage:4,gap:"1rem",pagination:!0,arrows:!1,drag:"free",trimSpace:!0,snap:!0,focus:0,perMove:1,flickPower:350,padding:{left:0,right:"3.5rem"},breakpoints:{1536:{perPage:5,padding:{right:"3.5rem"}},1280:{perPage:4,padding:{right:"3.5rem"}},1024:{perPage:3,padding:{right:"3rem"}},768:{perPage:2,padding:{right:"3rem"}},640:{perPage:2,padding:{right:"2.5rem"}},480:{perPage:1,padding:{right:"3.5rem"}}}},u={type:"loop",perPage:3,focus:"center",gap:"1.25rem",pagination:!0,arrows:!1,drag:!0,trimSpace:!1,perMove:1,flickPower:400,breakpoints:{1280:{perPage:3,gap:"1.25rem"},1024:{perPage:3,gap:"1rem"},768:{perPage:1,gap:"0.75rem",padding:{left:"3.5rem",right:"3.5rem"}},480:{perPage:1,gap:"0.5rem",padding:{left:"2.5rem",right:"2.5rem"}}}},p={1:function({products:e}){let{t}=(0,d.k)(),a=(0,l.useRef)(null),m=(0,l.useRef)(null),[u,p]=(0,l.useState)(2),g=(0,l.useCallback)(()=>a.current?.go("<"),[]),h=(0,l.useCallback)(()=>a.current?.go(">"),[]),x=(0,l.useMemo)(()=>e.map((e,t)=>(0,r.jsx)(i.SplideSlide,{children:(0,r.jsx)(n.default,{priority:t<6,product:e})},`${e.id}-${t}`)),[e]);return(0,r.jsxs)("div",{ref:m,className:"relative group/cv1",children:[(0,r.jsx)("button",{"aria-label":t("common.carousel.previous","Previous"),className:" absolute left-2 top-1/2 -translate-y-1/2 z-20 h-8 w-8 rounded-full bg-background/90 border shadow flex items-center justify-center opacity-0 group-hover/cv1:opacity-100 pointer-events-none group-hover/cv1:pointer-events-auto transition-opacity duration-200 hover:bg-muted ",type:"button",onClick:g,children:(0,r.jsx)(o.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{"aria-label":t("common.carousel.next","Next"),className:" absolute right-2 top-1/2 -translate-y-1/2 z-20 h-8 w-8 rounded-full bg-background/90 border shadow flex items-center justify-center opacity-0 group-hover/cv1:opacity-100 pointer-events-none group-hover/cv1:pointer-events-auto transition-opacity duration-200 hover:bg-muted ",type:"button",onClick:h,children:(0,r.jsx)(s.A,{className:"h-4 w-4"})}),(0,r.jsx)(i.Splide,{ref:a,"aria-label":t("common.carousel.products","Products"),hasTrack:!1,options:c,onMoved:(t,a)=>p(Math.max(2,Math.round(a/Math.max(1,e.length-1)*100))),children:(0,r.jsx)(i.SplideTrack,{children:x})}),(0,r.jsx)("div",{className:"mt-3 h-[2px] bg-border/40 rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full bg-foreground/20 rounded-full transition-[width] duration-300 ease-out",style:{width:`${u}%`}})})]})},2:function({products:e}){let{t}=(0,d.k)(),a=(0,l.useRef)(null),c=(0,l.useRef)(null),[u,p]=(0,l.useState)(!0),[g,h]=(0,l.useState)(!1),x=(0,l.useCallback)(()=>a.current?.go("<"),[]),f=(0,l.useCallback)(()=>a.current?.go(">"),[]),b=(0,l.useCallback)((t,a)=>{p(0===a),h(a>=e.length-1)},[e.length]),y=(0,l.useMemo)(()=>e.map((e,t)=>(0,r.jsx)(i.SplideSlide,{children:(0,r.jsx)(n.default,{priority:t<5,product:e})},`${e.id}-${t}`)),[e]);return(0,r.jsx)("div",{ref:c,children:(0,r.jsxs)("div",{className:"cv2 pb-8",children:[(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1.5 mb-3",children:[(0,r.jsx)("button",{"aria-label":t("common.carousel.previous","Previous"),className:" h-8 w-8 rounded-full border flex items-center justify-center text-muted-foreground hover:text-foreground hover:border-foreground/40 disabled:opacity-30 transition-[color,border-color,opacity] duration-150 ",disabled:u,type:"button",onClick:x,children:(0,r.jsx)(o.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{"aria-label":t("common.carousel.next","Next"),className:" h-8 w-8 rounded-full border flex items-center justify-center text-muted-foreground hover:text-foreground hover:border-foreground/40 disabled:opacity-30 transition-[color,border-color,opacity] duration-150 ",disabled:g,type:"button",onClick:f,children:(0,r.jsx)(s.A,{className:"h-4 w-4"})})]}),(0,r.jsx)(i.Splide,{ref:a,"aria-label":t("common.carousel.products","Products"),hasTrack:!1,options:m,onMoved:b,children:(0,r.jsx)(i.SplideTrack,{children:y})})]})})},3:function({products:e}){let{t}=(0,d.k)(),a=(0,l.useRef)(null),c=(0,l.useRef)(null),m=(0,l.useCallback)(()=>a.current?.go("<"),[]),p=(0,l.useCallback)(()=>a.current?.go(">"),[]),g=(0,l.useMemo)(()=>e.map((e,t)=>(0,r.jsx)(i.SplideSlide,{children:(0,r.jsx)(n.default,{priority:t<4,product:e})},`${e.id}-${t}`)),[e]);return(0,r.jsx)("div",{ref:c,children:(0,r.jsxs)("div",{className:"cv3 relative pb-8 px-10 sm:px-12 md:px-14",children:[(0,r.jsx)("button",{"aria-label":t("common.carousel.previous","Previous"),className:" absolute left-0 top-1/2 -translate-y-1/2 z-20 h-8 w-8 sm:h-9 sm:w-9 md:h-11 md:w-11 rounded-full bg-background border shadow-lg flex items-center justify-center hover:bg-muted transition-colors ",type:"button",onClick:m,children:(0,r.jsx)(o.A,{className:"h-4 w-4 md:h-5 md:w-5"})}),(0,r.jsx)("button",{"aria-label":t("common.carousel.next","Next"),className:" absolute right-0 top-1/2 -translate-y-1/2 z-20 h-8 w-8 sm:h-9 sm:w-9 md:h-11 md:w-11 rounded-full bg-background border shadow-lg flex items-center justify-center hover:bg-muted transition-colors ",type:"button",onClick:p,children:(0,r.jsx)(s.A,{className:"h-4 w-4 md:h-5 md:w-5"})}),(0,r.jsx)(i.Splide,{ref:a,"aria-label":t("common.carousel.products","Products"),hasTrack:!1,options:u,children:(0,r.jsx)(i.SplideTrack,{children:g})})]})})}};var g=a(22660);let h=(0,l.memo)(function({products:e,columns:t=4,carouselVariant:a}){let{config:i}=(0,g.Ku)(),o=p[a??i?.ui?.carousel?.variant??1]??p[1],s=(0,l.useMemo)(()=>e.map((e,t)=>(0,r.jsx)("div",{className:"h-full",children:(0,r.jsx)(n.default,{priority:t<4,product:e})},`${e.id}-${t}`)),[e]);return e.length<=5?(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3 md:gap-4",children:s}):(0,r.jsx)(o,{columns:t,products:e})},(e,t)=>{if(e.carouselVariant!==t.carouselVariant)return!1;if(e.products===t.products)return!0;if(e.products.length!==t.products.length)return!1;for(let a=0;a{a.d(t,{Hc:()=>u,wM:()=>g,xQ:()=>m});var r=a(95155),l=a(12115),i=a(76908),o=a(154),s=a(3538),n=a(80430),d=a(61283),c=a(71360);function m(e){let t=e.trim();if(!t.toLowerCase().startsWith("{e.preventDefault(),e.stopPropagation();let a="touches"in e?e.touches[0].clientX:e.clientX,r=b.current?.offsetWidth??u??560,l=e=>{t({width:Math.max(200,Math.round(r+(("touches"in e?e.touches[0].clientX:e.clientX)-a)))})},i=()=>{window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",i),window.removeEventListener("touchmove",l),window.removeEventListener("touchend",i)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",i),window.addEventListener("touchmove",l,{passive:!1}),window.addEventListener("touchend",i)},[u,t]),v=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let a="touches"in e?e.touches[0].clientY:e.clientY,r=p??400,l=e=>{t({height:Math.max(120,Math.round(r+(("touches"in e?e.touches[0].clientY:e.clientY)-a)))})},i=()=>{window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",i),window.removeEventListener("touchmove",l),window.removeEventListener("touchend",i)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",i),window.addEventListener("touchmove",l,{passive:!1}),window.addEventListener("touchend",i)},[p,t]);return(0,r.jsxs)(o.VR,{className:"relative my-4",style:{userSelect:"none"},children:[a&&i.isEditable&&(0,r.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 z-30 flex items-center gap-0.5 rounded-xl border bg-popover shadow-lg px-1.5 py-1 text-popover-foreground",role:"toolbar",style:{bottom:"calc(100% + 8px)",whiteSpace:"nowrap"},onMouseDown:e=>e.stopPropagation(),children:[(0,r.jsx)(h,{active:"left"===f,title:"Align left",onClick:()=>t({align:"left"}),children:(0,r.jsx)(s.A,{className:"w-3.5 h-3.5"})}),(0,r.jsx)(h,{active:"center"===f,title:"Align center",onClick:()=>t({align:"center"}),children:(0,r.jsx)(n.A,{className:"w-3.5 h-3.5"})}),(0,r.jsx)(h,{active:"right"===f,title:"Align right",onClick:()=>t({align:"right"}),children:(0,r.jsx)(d.A,{className:"w-3.5 h-3.5"})}),(0,r.jsx)("span",{className:"w-px h-4 bg-border mx-1"}),(0,r.jsxs)("div",{className:"flex items-center gap-1",title:"Width (px, empty = full)",children:[(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono",children:"W"}),(0,r.jsx)("input",{className:"w-16 h-6 text-xs px-1.5 border rounded-md bg-background text-center",min:200,placeholder:"full",type:"number",value:u??"",onChange:e=>{let a=parseInt(e.target.value);t({width:isNaN(a)?null:a})}})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",title:"Height (px)",children:[(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono",children:"H"}),(0,r.jsx)("input",{className:"w-16 h-6 text-xs px-1.5 border rounded-md bg-background text-center",min:120,type:"number",value:p??400,onChange:e=>{let a=parseInt(e.target.value);isNaN(a)||t({height:a})}})]}),(0,r.jsx)("span",{className:"w-px h-4 bg-border mx-1"}),(0,r.jsx)(h,{title:"Remove embed",onClick:()=>i.chain().focus().deleteNode("iframe").run(),children:(0,r.jsx)(c.A,{className:"w-3.5 h-3.5 text-rose-500"})})]}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"left"===f?"flex-start":"right"===f?"flex-end":"center"},children:(0,r.jsxs)("div",{ref:b,style:{position:"relative",display:"inline-block",width:u?`${u}px`:"100%",maxWidth:"100%"},children:[(0,r.jsx)("iframe",{allow:g||void 0,allowFullScreen:"true"===x||!0===x,frameBorder:"0",height:p??400,scrolling:"no",src:m,style:{border:"none",overflow:"hidden",display:"block",width:"100%"},title:"Embedded content"}),a&&(0,r.jsx)("div",{className:"absolute inset-0 ring-2 ring-blue-500 ring-offset-2 pointer-events-none rounded-sm"}),a&&i.isEditable&&(0,r.jsx)("div",{"aria-label":"Drag to resize width","aria-valuenow":u??560,className:"absolute top-1/2 -translate-y-1/2 w-3 flex flex-col items-center justify-center gap-[3px] cursor-ew-resize z-20",role:"slider",style:{right:-10},tabIndex:0,title:"Drag to resize width",onMouseDown:y,onTouchStart:y,children:(0,r.jsx)("span",{className:"w-1 h-5 rounded-full bg-blue-500 opacity-80"})}),a&&i.isEditable&&(0,r.jsx)("div",{"aria-label":"Drag to resize height","aria-valuenow":p??400,className:"absolute left-1/2 -translate-x-1/2 h-3 flex flex-row items-center justify-center gap-[3px] cursor-ns-resize z-20",role:"slider",style:{bottom:-10},tabIndex:0,title:"Drag to resize height",onMouseDown:v,onTouchStart:v,children:(0,r.jsx)("span",{className:"h-1 w-5 rounded-full bg-blue-500 opacity-80"})})]})})]})}let g=i.bP.create({name:"iframe",group:"block",atom:!0,draggable:!0,addAttributes:()=>({src:{default:null},width:{default:null},height:{default:400},allow:{default:null},allowfullscreen:{default:!0},align:{default:"center"}}),parseHTML:()=>[{tag:"div[data-iframe-wrapper] iframe[src]",getAttrs:e=>{let t=e.closest("[data-iframe-wrapper]"),a=e.getAttribute("width")||e.style.width?.replace("px",""),r=e.getAttribute("height")||e.style.height?.replace("px",""),l=t?.style.justifyContent;return{src:e.getAttribute("src"),width:a&&parseInt(a)||null,height:r&&parseInt(r)||400,allow:e.getAttribute("allow"),allowfullscreen:e.hasAttribute("allowfullscreen")||e.hasAttribute("allowFullScreen")?"true":"false",align:"flex-start"===l?"left":"flex-end"===l?"right":"center"}}},{tag:"iframe[src]",getAttrs:e=>{let t=e.getAttribute("width"),a=e.getAttribute("height");return{src:e.getAttribute("src"),width:t&&parseInt(t)||null,height:a&&parseInt(a)||400,allow:e.getAttribute("allow"),allowfullscreen:e.hasAttribute("allowfullscreen")||e.hasAttribute("allowFullScreen")?"true":"false",align:"center"}}}],renderHTML({HTMLAttributes:e}){let{align:t,width:a,height:r,src:l,allow:o,allowfullscreen:s}=e,n=["border:none;overflow:hidden;display:block;width:100%",r?`height:${r}px`:"height:400px"].join(";");return["div",{"data-iframe-wrapper":"true",style:`display:flex;justify-content:${"left"===t?"flex-start":"right"===t?"flex-end":"center"}`},["div",{style:`position:relative;display:inline-block;width:${a?a+"px":"100%"};max-width:100%`},["iframe",(0,i.KV)({src:l,allow:o||void 0,allowfullscreen:s||void 0},{frameborder:"0",scrolling:"no",style:n})]]]},addNodeView:()=>(0,o.gu)(p)});function h({active:e,title:t,onClick:a,children:l}){return(0,r.jsx)("button",{className:["flex items-center justify-center w-7 h-7 rounded-lg transition-colors touch-manipulation",e?"bg-foreground text-background":"text-muted-foreground hover:bg-accent hover:text-foreground"].join(" "),title:t,type:"button",onClick:a,children:l})}},52467:(e,t,a)=>{a.d(t,{LiveTenantProvider:()=>u,a:()=>m});var r=a(95155),l=a(12115),i=a(20063);let o=new Map;"undefined"!=typeof setInterval&&setInterval(()=>{let e=Date.now();for(let[t,a]of o.entries())a.expires{e&&(Array.isArray(e)?e:[e]).forEach(e=>{if(!e||document.querySelector(`link[data-font-loader="${CSS.escape(e)}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.setAttribute("data-font-loader",e),t.href=e,document.head.appendChild(t)})},[e]),null}var d=a(20973);let c=(0,l.createContext)(null);function m(){let e=(0,l.useContext)(c);return e||{tenant:{},isEditorMode:!1,isTranslationMode:!1,isBrowseMode:!1}}function u({initialTenant:e,children:t}){let{tenant:a,isEditorMode:o,isTranslationMode:m,isBrowseMode:u}=function(e){let t=(0,l.useMemo)(()=>window.self!==window.top,[]),[a,r]=(0,l.useState)(e),[o]=(0,l.useState)(t),[s,n]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!1),p=(0,i.useRouter)(),g=(0,l.useRef)(null),h=(0,l.useRef)(null),x=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!t)return void r(e);(null===x.current||JSON.stringify(e)===JSON.stringify(x.current))&&r(e)},[e,t]),(0,l.useEffect)(()=>{if(!t||!m)return;let e=null,r=t=>{let a=t.target.closest("[data-section-type]");a&&a!==e?(e&&(e.style.outline="",e.style.cursor=""),e=a,a.style.outline="3px solid #3b82f6",a.style.outlineOffset="-3px",a.style.cursor="crosshair"):!a&&e&&(e.style.outline="",e.style.cursor="",e=null)},l=e=>{e.preventDefault(),e.stopPropagation();let t=e.target.closest("[data-section-type]");if(t){let e=t.getAttribute("data-section-type"),r=t.getAttribute("data-section-order"),l=t.getAttribute("data-section-id"),i=r?parseInt(r):null,o="",s=window.location.pathname;if(s.includes("/info/")){let e=s.split("/info/")[1]?.split("?")[0],t=a.infoPages?.pages.findIndex(t=>t.slug===e);o=-1!==t?`infoPages.pages.${t}.config.sections.${i}`:`infoPages.pages.?.config.sections.${i}`}else if(s.split("/").length>2){let e=s.split("/").slice(2).join("/"),t=a.dynamicPages?.pages.findIndex(t=>t.slug===e);o=-1!==t?`dynamicPages.pages.${t}.sections.${i}`:`dynamicPages.pages.?.sections.${i}`}else o=`homepage.sections.${i}`;window.parent.postMessage({type:"STOREFRONT_AI_ELEMENT_SELECTED",path:o,label:`${e} Section`,value:e,order:i,sectionId:l},"*"),t.style.backgroundColor="rgba(59, 130, 246, 0.2)",setTimeout(()=>{t.style.backgroundColor=""},200)}};return window.addEventListener("mouseover",r),window.addEventListener("click",l,!0),()=>{window.removeEventListener("mouseover",r),window.removeEventListener("click",l,!0),e&&(e.style.outline="",e.style.cursor="")}},[t,m]);let f=(0,l.useCallback)(e=>{h.current=e,x.current=e,g.current&&clearTimeout(g.current),g.current=setTimeout(async()=>{let e=h.current;if(e)try{let t=await fetch("/api/preview-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({config:e})});if(t.ok){let e=await t.json();e.id&&(document.cookie=`komero_preview_id=${e.id}; path=/; max-age=3600; SameSite=Lax`),p.refresh()}}catch(e){console.error("Failed to update preview config:",e)}},400)},[p]);return(0,l.useEffect)(()=>{if(!t)return;let e=e=>{if(e.data?.type==="UPDATE_TENANT_CONFIG"&&e.data.config&&(r(e.data.config),e.data.syncOnly||f(e.data.config)),e.data?.type==="ENABLE_TRANSLATION_INSPECT"||e.data?.type==="SET_INSPECT_MODE"&&e.data.enabled?n(!0):(e.data?.type==="DISABLE_TRANSLATION_INSPECT"||e.data?.type==="SET_INSPECT_MODE"&&!1===e.data.enabled)&&n(!1),e.data?.type==="SET_BROWSE_MODE"&&c(!!e.data.enabled),e.data?.type==="SET_AI_TARGETING_MODE"&&u(!!e.data.enabled),e.data?.type==="ADMIN_SCROLL_TO_SECTION"){let{id:t,sectionType:a,sectionOrder:r}=e.data,l=t?`[data-section-id="${t}"]`:null!=r?`[data-section-type="${a}"][data-section-order="${r}"]`:`[data-section-type="${a}"]`,i=document.querySelector(l);i&&(i.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{let t=i.getBoundingClientRect();e.source?.postMessage({type:"STOREFRONT_ACTIVE_SECTION",sectionType:a,sectionOrder:r,viewportTop:t.top,viewportHeight:t.height,viewportTotal:window.innerHeight},"*")},400))}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e),g.current&&clearTimeout(g.current)}},[t,f]),{tenant:a,isEditorMode:o,isTranslationMode:s,isBrowseMode:d,isAiTargetingMode:m}}(e),p=(0,i.usePathname)();(0,l.useEffect)(()=>{o&&a?.theme&&(0,s.s)(a.theme)},[a,o]),(0,l.useEffect)(()=>{if(!o)return;let e=p?.replace(/^\/[a-z]{2,3}(?=\/|$)/,"")||"";window.parent.postMessage({type:"STOREFRONT_PATH_CHANGE",path:e||"/"},"*")},[p,o]);let g=(0,l.useMemo)(()=>{if(!o||!a?.theme?.fonts)return[];let e=[],t=new Set;if(a.theme.fonts.family&&(e=>{if(!e||e.includes("://")||e.startsWith("//")||e.includes(".css"))return;let a=e.split(",")[0].trim().replace(/['"]/g,"");a&&t.add(a)})(a.theme.fonts.family),t.size>0){let a=Array.from(t).map(e=>`family=${e.replace(/ /g,"+")}:wght@300;400;500;600;700`).join("&");e.push(`https://fonts.googleapis.com/css2?${a}&display=swap`)}return a.theme.fonts.url&&(Array.isArray(a.theme.fonts.url)?e.push(...a.theme.fonts.url.filter(Boolean)):e.push(a.theme.fonts.url)),e},[a,o]);return(0,r.jsxs)(c.Provider,{value:{tenant:a,isEditorMode:o,isTranslationMode:m,isBrowseMode:u},children:[o&&(0,r.jsx)(n,{url:g}),o&&(0,r.jsx)(d.S,{isBrowseMode:u}),t]})}},52865:(e,t,a)=>{a.d(t,{default:()=>s});var r=a(95155),l=a(12115),i=a(15239);function o({rating:e}){return(0,r.jsx)("div",{"aria-label":`${e} out of 5 stars`,className:"flex gap-0.5",children:[1,2,3,4,5].map(t=>(0,r.jsx)("svg",{className:`w-4 h-4 ${t<=e?"text-yellow-400":"text-gray-300 dark:text-gray-600"}`,fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})},t))})}function s({data:e,locale:t,paddingClass:a="",sectionOrder:s}){let n=e.testimonials??[],d="grid"!==e.layout,c=e.columns??3,m=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!d||!e.autoplay||n.length<=1)return;let t=setInterval(()=>{let e=m.current;if(!e)return;let t=e.firstElementChild?.clientWidth??320;e.scrollLeft+e.clientWidth>=e.scrollWidth-10?e.scrollTo({left:0,behavior:"smooth"}):e.scrollBy({left:t+16,behavior:"smooth"})},e.autoplayInterval??4e3);return()=>clearInterval(t)},[d,e.autoplay,e.autoplayInterval,n.length]);let u=(a,l)=>(0,r.jsxs)("div",{className:`flex flex-col gap-4 bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-sm border border-gray-100 dark:border-gray-700 ${d?"flex-shrink-0 w-80 snap-start":""}`,children:[!1!==e.showRating&&a.rating&&(0,r.jsx)(o,{rating:a.rating}),(0,r.jsxs)("p",{className:"text-muted-foreground dark:text-muted-foreground text-sm leading-relaxed flex-1",children:["“",a.text[t]??a.text.en,"”"]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[!1!==e.showAvatar&&(0,r.jsx)("div",{className:"flex-shrink-0 w-10 h-10 rounded-full overflow-hidden bg-brand-primary/20 flex items-center justify-center",children:a.avatarUrl?(0,r.jsx)(i.default,{alt:a.name,className:"object-cover w-full h-full",height:40,src:a.avatarUrl,width:40}):(0,r.jsx)("span",{className:"text-sm font-bold text-brand-primary",children:a.name.charAt(0).toUpperCase()})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-semibold text-foreground dark:text-foreground",children:a.name}),(a.role||a.company)&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-muted-foreground",children:[a.role?a.role[t]??a.role.en:"",a.role&&a.company?" \xb7 ":"",a.company??""]})]})]})]},l);return(0,r.jsxs)("div",{className:a,"data-section-order":s,"data-section-type":"Testimonials",children:[(e.title||e.subtitle)&&(0,r.jsxs)("div",{className:"text-center mb-10",children:[e.title&&(0,r.jsx)("h2",{className:"font-heading text-3xl font-bold text-foreground dark:text-foreground",children:e.title[t]??e.title.en}),e.subtitle&&(0,r.jsx)("p",{className:"mt-3 text-muted-foreground dark:text-muted-foreground",children:e.subtitle[t]??e.subtitle.en})]}),d?(0,r.jsx)("div",{ref:m,className:"flex gap-4 overflow-x-auto snap-x snap-mandatory pb-4 scrollbar-hide",children:n.map(u)}):(0,r.jsx)("div",{className:`grid grid-cols-1 ${{2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"}[c]??"md:grid-cols-3"} gap-6`,children:n.map(u)})]})}},56654:(e,t,a)=>{a.d(t,{t:()=>r});function r(e){if(e&&0!==e.length)return e[0]}},62391:(e,t,a)=>{function r(e,t){if(null!=e[t])return e[t];if(null!=e.en)return e.en;let a=Object.keys(e)[0];return a?e[a]:""}function l(e,t){if(e)return r(e,t)||void 0}a.d(t,{G:()=>l,t:()=>r})},63118:(e,t,a)=>{a.d(t,{CN:()=>g,De:()=>h,EI:()=>j,H1:()=>N,K7:()=>y,U4:()=>c,Ur:()=>x,VZ:()=>v,_R:()=>w,cB:()=>s,cC:()=>n,d4:()=>o,gg:()=>u,pD:()=>m,st:()=>b,v8:()=>d,y0:()=>i,ys:()=>p,zZ:()=>f});var r=a(25177);function l(e){let t=new URLSearchParams;for(let[a,r]of Object.entries(e))null!=r&&""!==r&&t.append(a,String(r));let a=t.toString();return a?`?${a}`:""}async function i(e={}){let t=`https://api.komero.ge/api/blog/posts${l(e)}`;return(0,r.nr)(t,{requireAuth:!1,cache:"no-store"})}async function o(){return(0,r.nr)("https://api.komero.ge/api/blog/categories",{requireAuth:!1})}async function s(){return(0,r.nr)("https://api.komero.ge/api/blog/tags",{requireAuth:!1})}async function n(e,t){return(0,r.nr)(`https://api.komero.ge/api/blog/posts/${e}/comments`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"},requireAuth:!1})}async function d(e={}){return(0,r.nr)(`https://api.komero.ge/api/blog/admin/posts${l(e)}`,{adminAuth:!0,cache:"no-store",requireAuth:!0})}async function c(e){return(0,r.nr)(`https://api.komero.ge/api/blog/admin/posts/${e}`,{adminAuth:!0,cache:"no-store",requireAuth:!0})}async function m(e){return(0,r.nr)("https://api.komero.ge/api/blog/posts",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"},adminAuth:!0,requireAuth:!0})}async function u(e,t){return(0,r.nr)(`https://api.komero.ge/api/blog/posts/${e}`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json"},adminAuth:!0})}async function p(e){return(0,r.nr)(`https://api.komero.ge/api/blog/posts/${e}`,{method:"DELETE",adminAuth:!0})}async function g(e){return(0,r.nr)(`https://api.komero.ge/api/blog/posts/${e}/publish`,{method:"POST",adminAuth:!0,requireAuth:!0})}async function h(e){return(0,r.nr)(`https://api.komero.ge/api/blog/posts/${e}/archive`,{method:"POST",adminAuth:!0,requireAuth:!0})}async function x(e,t){let a=new FormData;return a.append("id",e),a.append("files",t,t.name),(0,r.nr)("https://api.komero.ge/api/blog/images",{method:"POST",body:a,adminAuth:!0,requireAuth:!0})}async function f(e){return(0,r.nr)("https://api.komero.ge/api/blog/categories",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"},adminAuth:!0,requireAuth:!0})}async function b(e,t){return(0,r.nr)(`https://api.komero.ge/api/blog/categories/${e}`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json"},adminAuth:!0,requireAuth:!0})}async function y(e){return(0,r.nr)(`https://api.komero.ge/api/blog/categories/${e}`,{method:"DELETE",adminAuth:!0,requireAuth:!0})}async function v(e){return(0,r.nr)("https://api.komero.ge/api/blog/tags",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"},adminAuth:!0,requireAuth:!0})}async function w(e){return(0,r.nr)(`https://api.komero.ge/api/blog/tags/${e}`,{method:"DELETE",adminAuth:!0,requireAuth:!0})}async function j(e={}){return(0,r.nr)(`https://api.komero.ge/api/blog/admin/comments${l(e)}`,{adminAuth:!0,requireAuth:!0,cache:"no-store"})}async function N(e,t){return(0,r.nr)(`https://api.komero.ge/api/blog/comments/${e}/moderate`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json"},adminAuth:!0,requireAuth:!0})}},69357:(e,t,a)=>{a.d(t,{J0:()=>U,qP:()=>Y,Qr:()=>ei});var r=a(55653),l=a(77637),i=a(52865),o=a(95155),s=a(15239),n=a(52619),d=a.n(n),c=a(83908),m=a(97901),u=a(84462),p=a(52987),g=a(2821),h=a(6132);function x({children:e,className:t="",paddingClass:a="",isLoading:r,error:l,isEmpty:i,emptyMessage:s="No items found",loadingSkeleton:n}){return l?(0,o.jsx)("section",{className:t,children:(0,o.jsx)("div",{className:a,children:(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,o.jsx)(h.A,{className:"h-12 w-12 text-destructive mb-4"}),(0,o.jsx)("h3",{className:"font-heading text-lg font-semibold text-foreground mb-2",children:"Something went wrong"}),(0,o.jsx)("p",{className:"font-primary text-muted-foreground text-sm max-w-md",children:l.message||"Failed to load content"})]})})}):r&&n?(0,o.jsx)("section",{className:t,children:n}):i?(0,o.jsx)("section",{className:t,children:(0,o.jsx)("div",{className:a,children:(0,o.jsx)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:(0,o.jsx)("p",{className:"font-primary text-muted-foreground",children:s})})})}):(0,o.jsx)("section",{className:t,children:e})}var f=a(97094),b=a(97003),y=a(88873),v=a(62391),w=a(30655);async function j({data:e,locale:t,className:a,paddingClass:r="",sectionOrder:l}){let i=e.filterBy?.productCount||e.filterBy?.productIds?.length||12,s=null,n=null;try{if(e.filterBy?.productIds&&e.filterBy.productIds.length>0)s=(await (0,y.ob)(e.filterBy.productIds)).slice(0,i);else{let t={};e.filterBy?.categoryIds?.length&&(t.categoryIds=e.filterBy.categoryIds),e.filterBy?.brandIds?.length&&(t.brandIds=e.filterBy.brandIds),e.filterBy?.condition?.length&&(t.condition=e.filterBy.condition),e.filterBy?.stockStatus&&(t.stockStatus=e.filterBy.stockStatus),e.filterBy?.minPrice!==void 0&&(t.minPrice=e.filterBy.minPrice),e.filterBy?.maxPrice!==void 0&&(t.maxPrice=e.filterBy.maxPrice),e.filterBy?.isRandom!==void 0&&(t.isRandom=e.filterBy.isRandom),e.filterBy?.isNewArrival&&(t.isNewArrival=e.filterBy.isNewArrival),e.filterBy?.isLiquidated&&(t.isLiquidated=e.filterBy.isLiquidated),e.filterBy?.isComingSoon&&(t.isCommingSoon=e.filterBy.isComingSoon),e.filterBy?.hasDiscount&&(t.isDiscounted=e.filterBy.hasDiscount),s=((await (0,y.i1)({filter:t,pageSize:i,page:1,sortBy:e.sortBy||"featured"})).items||[]).slice(0,i)}}catch(e){n=e,console.error("Failed to load products:",e)}let c="carousel"===e.layout,m=e.columns||4,u=c?"flex gap-3 md:gap-4 overflow-x-auto snap-x snap-mandatory scrollbar-hide pb-4":`${(e=>{let t={2:"grid grid-cols-2 md:grid-cols-2 gap-2 sm:gap-3",3:"grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3",4:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 sm:gap-3",5:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-5 gap-2 sm:gap-3",6:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-2 sm:gap-3"};return t[e]||t[4]})(m)} gap-3 md:gap-4`,h=(0,o.jsx)("div",{className:a||"",children:(0,o.jsxs)("div",{className:`container mx-auto ${r}`,children:[(0,o.jsx)("div",{className:"h-12 bg-muted rounded-lg w-64 mb-10 animate-pulse"}),(0,o.jsx)("div",{className:u,children:Array.from({length:i}).map((e,t)=>(0,o.jsx)(f.ProductCardSkeleton,{},t))})]})}),j=r.includes("p-0")||r.includes("px-0"),N="ka"===t?"ყველას ნახვა":"View All",k="ka"===t?"ყველა":"All";return(0,o.jsx)("div",{className:"min-h-[400px] md:min-h-[600px]","data-section-order":l,"data-section-type":"ProductRail",children:(0,o.jsx)(x,{className:a||"",emptyMessage:e.filterBy?.isNewArrival?"No new arrivals at the moment":e.filterBy?.isLiquidated?"No liquidated items available":e.filterBy?.isComingSoon?"No coming soon items":e.filterBy?.hasDiscount?"No discounted items available":e.filterBy?.categoryIds?.length?"No products found in selected categories":e.filterBy?.brandIds?.length?"No products found from selected brands":"No products available",error:n,isEmpty:!s||0===s.length,loadingSkeleton:h,paddingClass:r,children:(0,o.jsxs)("div",{className:`${r}`,children:[(0,o.jsxs)("div",{className:(0,g.A)("flex mb-6 md:mb-10 gap-2 items-center",j&&"px-4","center"===e.titlePosition&&"flex-col justify-center text-center","right"===e.titlePosition&&"flex-row-reverse justify-between text-right",(!e.titlePosition||"left"===e.titlePosition)&&"flex-row justify-between text-left"),children:[(0,o.jsxs)("div",{className:"flex-1 min-w-0 w-full",children:[(0,o.jsx)("h2",{className:"font-heading text-lg md:text-3xl lg:text-4xl font-bold text-foreground",children:(0,v.t)(e.title,t)}),e.subtitle&&(0,o.jsx)("p",{className:"font-primary hidden md:block text-muted-foreground mt-2 md:mt-3 text-sm md:text-lg",children:(0,v.G)(e.subtitle,t)})]}),(0,o.jsx)("div",{className:(0,g.A)("flex-shrink-0","center"===e.titlePosition&&"mt-3"),children:(0,o.jsx)(b.$,{asChild:!0,className:"group",size:"sm",variant:"ghost",children:(0,o.jsxs)(d(),{className:"font-primary flex items-center gap-1 text-sm font-semibold",href:e.viewAllHref,children:[(0,o.jsx)("span",{className:"font-primary hidden sm:inline",children:N}),(0,o.jsx)("span",{className:"font-primary sm:hidden",children:k}),(0,o.jsx)(p.A,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 group-hover:translate-x-1 transition-transform"})]})})})]}),c?(0,o.jsx)(w.default,{carouselVariant:e.carouselVariant,columns:m,products:s||[]}):(0,o.jsx)("div",{className:u,children:s?.map((e,t)=>(0,o.jsx)("div",{className:"h-full",children:(0,o.jsx)(f.default,{priority:t<4,product:e})},e.id))})]})})})}var N=a(96117),k=a(21333),C=a(92531),S=a(99274);async function P({data:e,locale:t,sectionOrder:a,paddingClass:r}){let l=[];try{l=await (0,S.QU)()}catch(e){return null}return l&&0!==l.length?(0,o.jsx)("div",{"data-section-order":a,"data-section-type":"CategoryCarousel",children:(0,o.jsx)(C.default,{categories:l,data:e,locale:t,paddingClass:r})}):null}var A=a(4562),I=a(5327);async function z({data:e,locale:t,sectionOrder:a,paddingClass:r}){let l=[];try{l=await (0,I.E1)()}catch(e){return null}if(!l||0===l.length)return null;let i=l;e.brandIds&&e.brandIds.length>0&&(i=l.filter(t=>e.brandIds.includes(t.id)));let s=e.maxBrands?i.slice(0,e.maxBrands):i;return(0,o.jsx)("div",{"data-section-order":a,"data-section-type":"BrandCarousel",children:(0,o.jsx)(A.default,{brands:s,data:e,locale:t,paddingClass:r})})}var M=a(63118),_=a(18867),E=a(73637);async function $({data:e,locale:t,className:a,paddingClass:r="",sectionOrder:l}){let i=null,s=null;try{i=(await (0,M.y0)({page:1,pageSize:e.limit||("carousel"===e.layout?6:3),sortBy:"date",sortOrder:"desc"})).items||[]}catch(e){s=e,console.error("Failed to load blog posts:",e)}let n=e.columns||3,c=e.cardVariant??1,m=e.showDate??!0,u=e.showAuthor??!0,g=e.showExcerpt??!0,h=e.layout||"grid";return(0,o.jsx)("div",{"data-section-order":l,"data-section-type":"FeaturedBlogPosts",children:(0,o.jsx)(x,{className:a||"bg-slate-50/50 dark:bg-slate-950/50 py-16 md:py-24",emptyMessage:"No blog posts available",error:s,isEmpty:!i||0===i.length,paddingClass:r,children:(0,o.jsxs)("div",{className:`${r}`,children:[(0,o.jsxs)("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-12 md:mb-16 gap-8",children:[(0,o.jsxs)("div",{className:"max-w-3xl",children:[e.title&&(0,o.jsx)("h2",{className:"font-heading text-4xl md:text-5xl lg:text-7xl font-black text-foreground dark:text-foreground mb-6 tracking-tight leading-[0.9]",children:(0,v.t)(e.title,t)}),e.subtitle&&(0,o.jsx)("p",{className:"font-primary text-muted-foreground dark:text-muted-foreground text-lg md:text-xl leading-relaxed max-w-2xl",children:(0,v.G)(e.subtitle,t)})]}),e.viewAllHref&&(0,o.jsx)(b.$,{asChild:!0,className:"rounded-full h-12 px-8 text-sm font-bold group transition-all hover:shadow-lg shrink-0",variant:"default",children:(0,o.jsxs)(d(),{href:e.viewAllHref,children:[e.viewAllText?(0,v.t)(e.viewAllText,t):"Explore Our Blog",(0,o.jsx)(p.A,{className:"ml-2 w-4 h-4 transition-transform group-hover:translate-x-1"})]})})]}),"carousel"===h?(0,o.jsxs)(E.Carousel,{className:"w-full relative group/carousel",opts:{align:"start",loop:!0},children:[(0,o.jsx)(E.CarouselContent,{className:"-ml-4 md:-ml-6",children:i?.map(e=>(0,o.jsx)(E.CarouselItem,{className:`pl-4 md:pl-6 ${(e=>{let t={1:"basis-full",2:"basis-full md:basis-1/2",3:"basis-full sm:basis-1/2 lg:basis-1/3",4:"basis-full sm:basis-1/2 lg:basis-1/4"};return t[e]||t[3]})(n)}`,children:(0,o.jsx)(_.default,{locale:t,post:e,showAuthor:u,showDate:m,showExcerpt:g,variant:c})},e.id))}),(0,o.jsxs)("div",{className:"flex justify-end gap-3 mt-8",children:[(0,o.jsx)(E.CarouselPrevious,{className:"static translate-y-0 h-10 w-10 rounded-full border-slate-200 dark:border-slate-800"}),(0,o.jsx)(E.CarouselNext,{className:"static translate-y-0 h-10 w-10 rounded-full border-slate-200 dark:border-slate-800"})]})]}):(0,o.jsx)("div",{className:"list"===h?"flex flex-col gap-12 max-w-5xl mx-auto":(e=>{let t={1:"grid grid-cols-1 gap-8",2:"grid grid-cols-1 md:grid-cols-2 gap-8",3:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",4:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8"};return t[e]||t[3]})(n),children:i?.map(e=>(0,o.jsx)("div",{className:"h-full",children:(0,o.jsx)(_.default,{locale:t,post:e,showAuthor:u,showDate:m,showExcerpt:g,variant:c})},e.id))})]})})})}var T=a(3642);let B={animation:l.f3.optional()},Y={none:"w-full",compact:"max-w-5xl mx-auto px-4 md:px-8 lg:px-12",default:"max-w-7xl mx-auto px-4 md:px-6 lg:px-8",wide:"max-w-[1600px] mx-auto px-4 md:px-8 lg:px-12",full:"w-full px-0"},U="py-6 md:py-16 lg:py-20",H=r.Ik({en:r.Yj()}).catchall(r.Yj()).refine(e=>"string"==typeof e.en,{message:"English (en) translation is required"}),O=r.Ik({layout:r.k5(["carousel","grid"]),columns:r.KC([r.eu(1),r.eu(2),r.eu(3),r.eu(4),r.eu(5)]).optional(),carouselStyle:r.k5(["full-width","grid"]).optional(),scrollDirection:r.k5(["horizontal","vertical"]).optional(),showArrows:r.zM().optional(),autoScroll:r.zM().optional(),autoScrollInterval:r.ai().optional(),rounded:r.zM().optional(),bannerHeight:r.Yj().optional(),bannerHeightTablet:r.Yj().optional(),bannerHeightMobile:r.Yj().optional(),banners:r.YO(r.Ik({imageUrl:r.Yj(),laptopImageUrl:r.Yj().optional(),tabletImageUrl:r.Yj().optional(),mobileImageUrl:r.Yj().optional(),href:r.Yj(),alt:H,badge:H.optional(),title:H.optional(),description:H.optional()}))}),L=r.g1(r.Yj(),r.Yj()),D=r.Ik({html:r.KC([r.Yj(),L]),css:r.Yj().optional(),padding:r.k5(["none","small","medium","large"]).optional(),fullWidth:r.zM().optional(),containerClass:r.Yj().optional()}),R=r.Ik({customName:r.Yj().optional(),title:H,subtitle:H.optional(),titlePosition:r.k5(["left","center","right"]).optional(),layout:r.k5(["carousel","grid"]),columns:r.KC([r.eu(2),r.eu(3),r.eu(4),r.eu(5),r.eu(6)]).optional(),viewAllHref:r.Yj(),filterBy:r.Ik({categoryIds:r.YO(r.Yj()).optional(),brandIds:r.YO(r.Yj()).optional(),productIds:r.YO(r.Yj()).optional(),condition:r.YO(r.ai()).optional(),stockStatus:r.ai().optional(),isNewArrival:r.zM().optional(),isLiquidated:r.zM().optional(),isComingSoon:r.zM().optional(),hasDiscount:r.zM().optional(),minPrice:r.ai().optional(),maxPrice:r.ai().optional(),isRandom:r.zM().optional(),productCount:r.ai().optional(),facetFilters:r.YO(r.bz()).optional()}).optional(),sortBy:r.k5(["featured","newest","price-low","price-high","rating","name"]).optional(),carouselVariant:r.KC([r.eu(1),r.eu(2),r.eu(3)]).optional()}),F=r.Ik({title:H.optional(),subtitle:H.optional(),showHeader:r.zM().optional(),showAllCard:r.zM().optional(),allCardText:H.optional(),allCardSubtext:H.optional(),allCategoriesHref:r.Yj().optional(),categoryIds:r.YO(r.Yj()).optional(),limit:r.ai().optional(),slidesPerView:r.ai().optional(),showArrows:r.zM().optional(),showPagination:r.zM().optional(),autoplay:r.zM().optional(),autoplayInterval:r.ai().optional(),cardHeight:r.Yj().optional(),cardWidth:r.Yj().optional()}),q=r.Ik({title:H.optional(),subtitle:H.optional(),showHeader:r.zM().optional(),brandIds:r.YO(r.Yj()).optional(),slidesPerView:r.ai().optional(),showArrows:r.zM().optional(),showPagination:r.zM().optional(),autoplay:r.zM().optional(),autoplayInterval:r.ai().optional(),cardHeight:r.Yj().optional(),cardWidth:r.Yj().optional(),maxBrands:r.ai().optional(),autoScrollSpeed:r.ai().optional()}),V=r.Ik({title:H.optional(),subtitle:H.optional(),layout:r.k5(["grid","carousel","list"]),columns:r.KC([r.eu(1),r.eu(2),r.eu(3),r.eu(4)]).optional(),limit:r.ai().optional(),showDate:r.zM().optional(),showAuthor:r.zM().optional(),showExcerpt:r.zM().optional(),viewAllHref:r.Yj().optional(),viewAllText:H.optional(),cardVariant:r.KC([r.eu(1),r.eu(2),r.eu(3)]).optional()}),W=r.Ik({title:H.optional(),subtitle:H.optional(),layout:r.k5(["carousel","grid"]).optional(),columns:r.KC([r.eu(2),r.eu(3),r.eu(4)]).optional(),autoplay:r.zM().optional(),autoplayInterval:r.ai().optional(),showRating:r.zM().optional(),showAvatar:r.zM().optional(),cardVariant:r.KC([r.eu(1),r.eu(2)]).optional(),testimonials:r.YO(r.Ik({name:r.Yj(),role:H.optional(),company:r.Yj().optional(),text:H,rating:r.ai().optional(),avatarUrl:r.Yj().optional()}))}),G=r.Ik({layout:r.k5(["image-left","image-right","centered","background"]).optional(),imageUrl:r.Yj().optional(),mobileImageUrl:r.Yj().optional(),badge:H.optional(),title:H,subtitle:H.optional(),body:H,ctaLabel:H.optional(),ctaHref:r.Yj().optional(),stats:r.YO(r.Ik({value:H,label:H})).optional()}),K=r.Ik({title:H,subtitle:H.optional(),endsAt:r.Yj(),imageUrl:r.Yj().optional(),mobileImageUrl:r.Yj().optional(),ctaLabel:H.optional(),ctaHref:r.Yj().optional(),showAfterExpiry:r.zM().optional(),expiryMessage:H.optional()}),J=r.Ik({title:H,subtitle:H.optional(),placeholder:H.optional(),buttonText:H.optional(),successMessage:H.optional(),layout:r.k5(["horizontal","centered","card"]).optional(),backgroundImageUrl:r.Yj().optional(),disclaimer:H.optional()}),X=r.Ik({videoUrl:r.Yj(),posterImageUrl:r.Yj().optional(),objectFit:r.k5(["cover","contain"]).optional(),title:H.optional(),subtitle:H.optional(),ctaLabel:H.optional(),ctaHref:r.Yj().optional(),overlayOpacity:r.ai().optional(),autoplay:r.zM().optional(),loop:r.zM().optional(),muted:r.zM().optional(),minHeight:r.Yj().optional()}),Q=r.k5(["none","compact","default","wide","full"]).optional(),Z=[r.Ik({id:r.Yj().optional(),type:r.eu("CommercialBanner"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:O,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("ProductRail"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:R,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("CustomHTML"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:D,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("CategoryCarousel"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:F,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("BrandCarousel"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:q,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("FeaturedBlogPosts"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:V,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("Testimonials"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:W,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("AboutSection"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:G,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("CountdownBanner"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:K,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("NewsletterSection"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:J,...B}),r.Ik({id:r.Yj().optional(),type:r.eu("VideoHero"),enabled:r.zM(),order:r.ai(),padding:Q,backgroundColor:r.Yj().optional(),backgroundColorDark:r.Yj().optional(),data:X,...B})],ee=r.gM("type",[...Z]),et=r.Ik({templateId:r.ai().int().min(1).optional(),sections:r.YO(ee)}),ea={CommercialBanner:N.default,ProductRail:j,CustomHTML:k.default,CategoryCarousel:P,BrandCarousel:z,FeaturedBlogPosts:$,Testimonials:i.default,AboutSection:function({data:e,locale:t,paddingClass:a="",sectionOrder:r}){let l=e.layout??"image-left",i=e=>e?e[t]??e.en:"",n=(0,o.jsxs)("div",{className:"flex flex-col justify-center py-8 md:py-0",children:[e.badge&&(0,o.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-brand-primary/10 text-brand-primary mb-4 w-fit",children:i(e.badge)}),(0,o.jsx)("h2",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground dark:text-foreground leading-tight",children:i(e.title)}),e.subtitle&&(0,o.jsx)("p",{className:"mt-3 text-lg font-medium text-foreground dark:text-muted-foreground",children:i(e.subtitle)}),(0,o.jsx)("p",{className:"mt-5 text-muted-foreground dark:text-muted-foreground leading-relaxed whitespace-pre-line",children:i(e.body)}),e.ctaHref&&e.ctaLabel&&(0,o.jsx)(d(),{className:"mt-6 inline-flex items-center px-6 py-3 bg-brand-primary text-white font-semibold rounded-lg hover:opacity-90 transition-opacity w-fit",href:e.ctaHref,children:i(e.ctaLabel)}),e.stats&&e.stats.length>0&&(0,o.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6 mt-8 pt-8 border-t border-gray-200 dark:border-gray-700",children:e.stats.map((e,t)=>(0,o.jsxs)("div",{className:"text-center md:text-left",children:[(0,o.jsx)("p",{className:"text-2xl font-bold text-brand-primary",children:i(e.value)}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground dark:text-muted-foreground mt-1",children:i(e.label)})]},t))})]});if("centered"===l)return(0,o.jsx)("div",{className:a,"data-section-order":r,"data-section-type":"AboutSection",children:(0,o.jsxs)("div",{className:"max-w-3xl mx-auto text-center",children:[e.imageUrl&&(0,o.jsx)("div",{className:"relative w-full h-64 rounded-2xl overflow-hidden mb-8",children:(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:"object-cover",src:e.imageUrl})}),n]})});if("background"===l)return(0,o.jsxs)("div",{className:`relative ${a}`,"data-section-order":r,"data-section-type":"AboutSection",children:[e.imageUrl&&(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:"object-cover",src:e.imageUrl}),(0,o.jsx)("div",{className:"relative z-10 bg-black/60 py-16",children:(0,o.jsxs)("div",{className:"max-w-2xl mx-auto text-center text-white px-4",children:[e.badge&&(0,o.jsx)("span",{className:"inline-flex px-3 py-1 rounded-full text-xs font-semibold bg-white/20 mb-4",children:i(e.badge)}),(0,o.jsx)("h2",{className:"font-heading text-3xl md:text-4xl font-bold",children:i(e.title)}),e.subtitle&&(0,o.jsx)("p",{className:"mt-3 text-lg opacity-90",children:i(e.subtitle)}),(0,o.jsx)("p",{className:"mt-5 opacity-80 leading-relaxed whitespace-pre-line",children:i(e.body)}),e.ctaHref&&e.ctaLabel&&(0,o.jsx)(d(),{className:"mt-6 inline-flex px-6 py-3 bg-white text-foreground font-semibold rounded-lg hover:bg-gray-100 transition-colors",href:e.ctaHref,children:i(e.ctaLabel)})]})})]});let c=e.imageUrl?(0,o.jsxs)("div",{className:"relative w-full h-64 md:h-auto min-h-[400px] rounded-2xl overflow-hidden",children:[(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:`object-cover ${e.laptopImageUrl||e.tabletImageUrl||e.mobileImageUrl?"hidden lg:block":""}`,sizes:"(max-width: 1024px) 0px, 50vw",src:e.imageUrl}),e.laptopImageUrl&&(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:"object-cover hidden md:block lg:hidden",sizes:"(max-width: 1024px) 100vw, 50vw",src:e.laptopImageUrl}),e.tabletImageUrl&&(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:"object-cover hidden sm:block md:hidden",sizes:"(max-width: 768px) 100vw, 50vw",src:e.tabletImageUrl}),(0,o.jsx)(s.default,{fill:!0,alt:i(e.title),className:`object-cover ${e.imageUrl||e.laptopImageUrl||e.tabletImageUrl?"block sm:hidden":""}`,sizes:"100vw",src:e.mobileImageUrl||e.imageUrl})]}):null;return(0,o.jsx)("div",{className:a,"data-section-order":r,"data-section-type":"AboutSection",children:(0,o.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-16 items-center",children:"image-right"===l?(0,o.jsxs)(o.Fragment,{children:[n,c]}):(0,o.jsxs)(o.Fragment,{children:[c,n]})})})},CountdownBanner:c.default,NewsletterSection:m.default,VideoHero:u.default},er={...ea,ProductRail:T.ProductRailPreview,FeaturedBlogPosts:T.FeaturedBlogPostsPreview,CategoryCarousel:T.CategoryCarouselPreview,BrandCarousel:T.BrandCarouselPreview},el={allowedSections:["CommercialBanner","ProductRail","CustomHTML","CategoryCarousel","BrandCarousel","FeaturedBlogPosts","Testimonials","AboutSection","CountdownBanner","NewsletterSection","VideoHero"],schema:et,registry:{...ea},previewRegistry:{...er}};function ei(){return el}},73637:(e,t,a)=>{a.d(t,{Carousel:()=>p,CarouselContent:()=>g,CarouselItem:()=>h,CarouselNext:()=>f,CarouselPrevious:()=>x});var r=a(95155),l=a(12115),i=a(68072),o=a(35626),s=a(52987),n=a(25016),d=a(97003),c=a(12976);let m=l.createContext(null);function u(){let e=l.useContext(m);if(!e)throw Error("useCarousel must be used within a ");return e}let p=l.forwardRef(({orientation:e="horizontal",opts:t,setApi:a,plugins:o,className:s,children:d,...c},u)=>{let[p,g]=(0,i.A)({...t,axis:"horizontal"===e?"x":"y"},o),[h,x]=l.useState(!1),[f,b]=l.useState(!1),y=l.useCallback(e=>{e&&(x(e.canScrollPrev()),b(e.canScrollNext()))},[]),v=l.useCallback(()=>{g?.scrollPrev()},[g]),w=l.useCallback(()=>{g?.scrollNext()},[g]),j=l.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),v()):"ArrowRight"===e.key&&(e.preventDefault(),w())},[v,w]);return l.useEffect(()=>{g&&a&&a(g)},[g,a]),l.useEffect(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{g?.off("select",y)}},[g,y]),(0,r.jsx)(m.Provider,{value:{carouselRef:p,api:g,opts:t,orientation:e||(t?.axis==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:w,canScrollPrev:h,canScrollNext:f},children:(0,r.jsx)("div",{ref:u,"aria-roledescription":"carousel",className:(0,n.cn)("relative",s),role:"region",onKeyDownCapture:j,...c,children:d})})});p.displayName="Carousel";let g=l.forwardRef(({className:e,...t},a)=>{let{carouselRef:l,orientation:i}=u();return(0,r.jsx)("div",{ref:l,className:"overflow-hidden",children:(0,r.jsx)("div",{ref:a,className:(0,n.cn)("flex","horizontal"===i?"-ml-4":"-mt-4 flex-col",e),...t})})});g.displayName="CarouselContent";let h=l.forwardRef(({className:e,...t},a)=>{let{orientation:l}=u();return(0,r.jsx)("div",{ref:a,"aria-roledescription":"slide",className:(0,n.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===l?"pl-4":"pt-4",e),role:"group",...t})});h.displayName="CarouselItem";let x=l.forwardRef(({className:e,variant:t="outline",size:a="icon",...l},i)=>{let{t:s}=(0,c.k)(),{orientation:m,scrollPrev:p,canScrollPrev:g}=u();return(0,r.jsxs)(d.$,{ref:i,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===m?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!g,size:a,variant:t,onClick:p,...l,children:[(0,r.jsx)(o.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"font-primary sr-only",children:s("common.carousel.previousSlide","Previous slide")})]})});x.displayName="CarouselPrevious";let f=l.forwardRef(({className:e,variant:t="outline",size:a="icon",...l},i)=>{let{t:o}=(0,c.k)(),{orientation:m,scrollNext:p,canScrollNext:g}=u();return(0,r.jsxs)(d.$,{ref:i,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===m?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!g,size:a,variant:t,onClick:p,...l,children:[(0,r.jsx)(s.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"font-primary sr-only",children:o("common.carousel.nextSlide","Next slide")})]})});f.displayName="CarouselNext"},75165:(e,t,a)=>{a.d(t,{A:()=>N});var r=a(95155),l=a(12115),i=a(52619),o=a.n(i),s=a(15239),n=a(20063),d=a(27937),c=a(34604),m=a(65229),u=a(26497),p=a(64555),g=a(47650),h=a(67546),x=a(15777),f=a(99274),b=a(25016),y=a(12976),v=a(84935),w=a(32985);function j({children:e}){return"undefined"==typeof document?null:(0,g.createPortal)(e,document.body)}function N({label:e,triggerClassName:t}={}){let{t:a}=(0,y.k)(),[i,g]=(0,l.useState)(!1),[k,C]=(0,l.useState)([]),[S,P]=(0,l.useState)(!1),[A,I]=(0,l.useState)(null),z=l.useRef(!1),M=(0,n.usePathname)(),_=M.split("/")[1]||"",E=/^[a-z]{2,3}$/.test(_)?_:"ka";(0,l.useEffect)(()=>{z.current||(async()=>{try{P(!0);let e=await (0,f.QU)();C(Array.isArray(e)?e:[]),z.current=!0}catch(e){console.error("Failed to load categories",e)}finally{P(!1)}})()},[]),(0,l.useEffect)(()=>{if(!i)return;let e=document.body.style.overflow,t=document.documentElement.style.overflow,a=document.body.style.position,r=document.body.style.width,l=window.scrollY;return document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${l}px`,document.body.style.width="100%",()=>{document.documentElement.style.overflow=t,document.body.style.overflow=e,document.body.style.position=a,document.body.style.top="",document.body.style.width=r,window.scrollTo(0,l)}},[i]),(0,l.useEffect)(()=>{g(!1)},[M]);let{topLevel:$,childrenMap:T}=(0,l.useMemo)(()=>{let e="__root__",t={};return k.forEach(a=>{let r=a.parentId&&a.parentId.trim().length>0?a.parentId.trim():e;t[r]||(t[r]=[]),t[r].push(a)}),Object.keys(t).forEach(e=>t[e].sort((e,t)=>(e.name??"").localeCompare(t.name??""))),{topLevel:t[e]??[],childrenMap:t}},[k]),B=(0,l.useMemo)(()=>{let e=[];for(let t=0;t<$.length;t+=4)e.push($.slice(t,t+4));return e},[$]),Y=A?k.find(e=>e.id===A):null,U=A&&T[A]||[],H=e=>(0,w.nb)(`/category/${e.slug||e.id}`,E);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("button",{"aria-expanded":i,"aria-label":i?a("category.drawer.ariaCloseMenu","Close categories menu"):a("category.drawer.ariaOpenMenu","Open categories menu"),className:(0,b.cn)("flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-all text-sm relative z-[10001]",t),onClick:()=>g(!i),children:[(0,r.jsx)(h.A,{className:"w-5 h-5 flex-shrink-0"}),e&&(0,r.jsx)("span",{className:"whitespace-nowrap",children:e})]}),(0,r.jsx)(u.N,{children:i&&(0,r.jsx)(j,{children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.P.div,{animate:{opacity:1},className:"fixed inset-0 bg-black/50 z-[10000] backdrop-blur-sm",exit:{opacity:0},initial:{opacity:0},onClick:()=>g(!1)}),(0,r.jsx)(p.P.div,{animate:{opacity:1,y:0},className:"fixed inset-0 z-[10000] flex items-start justify-center pt-28 md:pt-32 pb-4 px-2 md:px-6 pointer-events-none",exit:{opacity:0,y:12},initial:{opacity:0,y:12},transition:{duration:.25,ease:"easeOut"},children:(0,r.jsxs)("div",{className:"relative w-full max-w-6xl rounded-3xl bg-white dark:bg-brand-surfacedark shadow-[0_24px_80px_rgba(0,0,0,0.4)] border border-primary/40 backdrop-blur-xl overflow-hidden max-h-full flex flex-col pointer-events-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 md:px-6 py-3 border-b border-border/60 bg-gradient-to-r from-primary/5 via-neutral-50/70 to-transparent dark:from-primary/10 dark:via-neutral-900/80",children:[(0,r.jsx)("h2",{className:"font-heading text-base md:text-lg font-semibold",children:a("categories.allCategories","Categories")}),(0,r.jsx)("button",{"aria-label":a("category.drawer.ariaCloseMenu","Close categories menu"),className:"font-primary inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs md:text-sm bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:()=>g(!1),children:(0,r.jsx)(m.A,{className:"w-4 h-4"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden px-4 md:px-6 py-4 scrollbar-thin scrollbar-thumb-neutral-300 dark:scrollbar-thumb-neutral-700 scrollbar-track-transparent",children:S?(0,r.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:a("category.drawer.loadingCategories","Loading categories...")}):0===$.length?(0,r.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:a("category.drawer.noCategoriesFound","No categories found.")}):(0,r.jsx)("div",{className:"flex flex-col gap-8",children:B.map((e,t)=>{let l=e.some(e=>e.id===A);return(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"grid gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-4",children:[e.map(e=>{let t=(T[e.id]?.length||0)>0,l=A===e.id;return(0,r.jsx)(o(),{className:(0,b.cn)("group flex items-stretch p-3 rounded-2xl transition-all border text-left",l?"bg-primary/5 border-primary shadow-md shadow-primary/30":"bg-neutral-50 dark:bg-brand-surfacedark/80 border-border/60 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:border-primary/60 hover:shadow-md"),href:H(e),onClick:()=>g(!1),children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col items-start text-left flex-1",children:[(0,r.jsx)("span",{className:(0,b.cn)("text-sm md:text-base font-semibold leading-tight line-clamp-2",l?"text-primary":"text-foreground"),children:(0,v.HS)(e.translations,"Name",E,e.name??"")}),(0,r.jsx)("span",{className:"font-primary mt-1 text-[11px] md:text-xs text-muted-foreground flex items-center gap-1",children:l?(0,r.jsxs)(r.Fragment,{children:[a("category.drawer.viewingSubcategories","Viewing subcategories"),(0,r.jsx)(d.A,{className:"w-3 h-3"})]}):a("category.drawer.browseProducts","Browse products")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"relative w-12 h-12 md:w-14 md:h-14 rounded-xl overflow-hidden bg-white dark:bg-neutral-800 border border-border/60 flex items-center justify-center",children:(0,x.U)(e.images)?(0,r.jsx)(s.default,{fill:!0,alt:(0,v.HS)(e.translations,"Name",E,e.name??"")||a("categories.category","Category"),className:"object-cover",src:(0,x.U)(e.images)}):(0,r.jsx)(c.A,{className:"w-6 h-6 text-muted-foreground/60"})}),t?(0,r.jsx)("button",{"aria-label":l?a("category.drawer.ariaHideSubcategories","Hide subcategories"):a("category.drawer.ariaShowSubcategories","Show subcategories"),className:"p-1.5 rounded-lg hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors",onClick:t=>{var a;t.preventDefault(),t.stopPropagation(),a=e.id,I(e=>e===a?null:a)},children:(0,r.jsx)(d.A,{className:(0,b.cn)("w-4 h-4 text-muted-foreground transition-transform duration-300",l?"rotate-90 text-primary":"group-hover:translate-x-1")})}):(0,r.jsx)(d.A,{className:"w-4 h-4 text-muted-foreground transition-transform duration-300 group-hover:translate-x-1"})]})]})},e.id)}),t===B.length-1&&(0,r.jsx)(o(),{className:"group flex items-stretch p-3 rounded-2xl transition-all border text-left bg-neutral-50 dark:bg-brand-surfacedark/80 border-border/60 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:border-primary/60 hover:shadow-md",href:(0,w.nb)("/category",E),onClick:()=>g(!1),children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-3",children:[(0,r.jsx)("div",{className:"flex flex-col items-start text-left flex-1",children:(0,r.jsx)("span",{className:"text-sm md:text-base font-semibold leading-tight line-clamp-2 text-primary",children:a("categories.allProducts","View All Products")})}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("div",{className:"relative w-12 h-12 md:w-14 md:h-14 rounded-xl overflow-hidden bg-primary/5 dark:bg-primary/10 border border-primary/20 flex items-center justify-center",children:(0,r.jsx)(h.A,{className:"w-6 h-6 text-primary group-hover:scale-110 transition-transform duration-300"})})})]})})]}),(0,r.jsx)(u.N,{children:l&&Y&&U.length>0&&(0,r.jsx)(p.P.div,{animate:{height:"auto",opacity:1},className:"overflow-hidden w-full",exit:{height:0,opacity:0},initial:{height:0,opacity:0},transition:{duration:.28,ease:"easeInOut"},children:(0,r.jsx)("div",{className:"mt-2 mb-6 rounded-2xl border border-border bg-neutral-50/90 dark:bg-brand-surfacedark/80 p-3 md:p-4",children:(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2.5",children:U.map(e=>(0,r.jsxs)(o(),{className:"group flex items-center justify-between gap-3 px-3 py-2 rounded-xl hover:bg-white dark:hover:bg-neutral-800 transition-all border border-border/50 hover:border-primary/50",href:H(e),onClick:()=>g(!1),children:[(0,r.jsx)("span",{className:"font-primary text-xs md:text-sm font-medium text-muted-foreground group-hover:text-foreground text-left line-clamp-2",children:(0,v.HS)(e.translations,"Name",E,e.name??"")}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("div",{className:"relative w-8 h-8 md:w-9 md:h-9 rounded-lg bg-neutral-100 dark:bg-neutral-800 border border-border/50 flex items-center justify-center overflow-hidden",children:(0,x.U)(e.images)?(0,r.jsx)(s.default,{fill:!0,alt:(0,v.HS)(e.translations,"Name",E,e.name??"")||a("categories.category","Category"),className:"object-cover",src:(0,x.U)(e.images)}):(0,r.jsx)(c.A,{className:"w-4 h-4 text-muted-foreground/70"})}),(0,r.jsx)(d.A,{className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-primary shrink-0"})]})]},e.id))})})})})]},t)})})})]})})]})})})]})}},77637:(e,t,a)=>{a.d(t,{f3:()=>u});var r=a(55653);let l=r.k5(["none","fade-in","fade-up","fade-down","slide-left","slide-right","zoom-in","zoom-out","flip-up","custom"]),i=r.Ik({preset:l,duration:r.ai().min(.05).max(10).optional(),delay:r.ai().min(0).max(10).optional(),easing:r.Yj().max(100).optional(),distance:r.ai().min(-2e3).max(2e3).optional(),trigger:r.k5(["scroll","load"]).optional(),scrollStart:r.Yj().max(50).optional(),once:r.zM().optional(),stagger:r.ai().min(0).max(2).optional(),staggerSelector:r.Yj().max(200).optional()}),o=r.Ik({id:r.Yj().min(1).max(64),label:r.Yj().max(100).optional(),selector:r.Yj().min(1).max(200),speed:r.ai().min(-5).max(5).optional(),horizontalSpeed:r.ai().min(-5).max(5).optional(),scaleFrom:r.ai().min(0).max(10).optional(),scaleTo:r.ai().min(0).max(10).optional(),opacityFrom:r.ai().min(0).max(1).optional(),opacityTo:r.ai().min(0).max(1).optional(),rotationFrom:r.ai().min(-360).max(360).optional(),rotationTo:r.ai().min(-360).max(360).optional(),scrollStart:r.Yj().max(50).optional(),scrollEnd:r.Yj().max(50).optional(),scrub:r.KC([r.zM(),r.ai().min(0).max(10)]).optional()}),s=r.Ik({progress:r.ai().min(0).max(1),x:r.ai().min(-5e3).max(5e3).optional(),y:r.ai().min(-5e3).max(5e3).optional(),opacity:r.ai().min(0).max(1).optional(),scale:r.ai().min(0).max(20).optional(),rotation:r.ai().min(-3600).max(3600).optional(),skewX:r.ai().min(-90).max(90).optional(),skewY:r.ai().min(-90).max(90).optional(),ease:r.Yj().max(100).optional()}),n=r.Ik({id:r.Yj().min(1).max(64),label:r.Yj().min(1).max(100),selector:r.Yj().min(1).max(200),keyframes:r.YO(s).max(50)}),d=r.Ik({tracks:r.YO(n).max(20),scrollTrigger:r.Ik({start:r.Yj().max(50).optional(),end:r.Yj().max(50).optional(),scrub:r.KC([r.zM(),r.ai().min(0).max(10)]).optional(),pin:r.zM().optional(),pinSpacing:r.zM().optional()}).optional()}),c=r.k5(["parallax-slow","parallax-medium","parallax-fast","zoom-scroll","zoom-out-scroll","fade-scroll","tilt-scroll","pin-reveal","horizontal-drift","clip-reveal"]),m=r.Ik({preset:c,intensity:r.ai().min(.1).max(2).optional(),scrub:r.ai().min(0).max(3).optional(),direction:r.k5(["normal","reverse"]).optional()}),u=r.Ik({entrance:i.optional(),scrollEffect:m.optional(),parallax:r.YO(o).max(10).optional(),timeline:d.optional()}),p=r.Ik({id:r.Yj().min(1).max(64),name:r.Yj().min(1).max(100),entrance:i.optional(),parallax:r.YO(o).max(10).optional()});r.Ik({enabled:r.zM(),respectReducedMotion:r.zM().optional(),defaultDuration:r.ai().min(.05).max(10).optional(),defaultEasing:r.Yj().max(100).optional(),components:r.Ik({pageTransition:r.Ik({preset:r.k5(["none","fade","slide-up","slide-left"]),duration:r.ai().min(.05).max(5).optional()}).optional(),productCard:r.Ik({hoverPreset:r.k5(["none","lift","glow","scale"]).optional(),entrancePreset:r.k5(["none","fade-up","stagger-fade"]).optional()}).optional(),navbar:r.Ik({scrollShrink:r.zM().optional(),hideOnScrollDown:r.zM().optional()}).optional()}).optional(),presets:r.YO(p).max(20).optional()})},81654:(e,t,a)=>{a.d(t,{LivePreviewDragDropContext:()=>d,s:()=>n});var r=a(95155),l=a(12115),i=a(67909),o=a(52467);let s=(0,i.default)(()=>Promise.all([a.e(9027),a.e(8226)]).then(a.bind(a,48226)).then(e=>e.LivePreviewDragDropEditor),{loadableGenerated:{webpack:()=>[48226]},ssr:!1,loading:e=>(0,r.jsx)("div",{className:"flex flex-col w-full min-h-screen",children:e.children})}),n=(0,l.createContext)([]);function d({sections:e,children:t}){let[a,i]=(0,l.useState)(!1),{isEditorMode:d,isTranslationMode:c,isBrowseMode:m,tenant:u}=(0,o.a)();(0,l.useEffect)(()=>{i(!0)},[]);let p=(0,l.useMemo)(()=>e,[d,u,e]);return!a||!d||c||m?(0,r.jsx)(n.Provider,{value:p,children:(0,r.jsx)("div",{className:"flex flex-col w-full min-h-screen",children:t})}):(0,r.jsx)(n.Provider,{value:p,children:(0,r.jsx)(s,{sections:p,children:t})})}},83908:(e,t,a)=>{a.d(t,{default:()=>c});var r=a(95155),l=a(12115),i=a(15239),o=a(52619),s=a.n(o);function n(e){let t=new Date(e).getTime()-Date.now();return t<=0?null:{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3)}}function d({value:e,label:t}){return(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"bg-white/20 backdrop-blur-sm rounded-xl px-3 py-2 min-w-[60px] text-center",children:(0,r.jsx)("span",{className:"text-3xl md:text-4xl font-bold tabular-nums",children:String(e).padStart(2,"0")})}),(0,r.jsx)("span",{className:"text-xs mt-1 font-medium uppercase tracking-wider opacity-80",children:t})]})}function c({data:e,locale:t,paddingClass:a="",sectionOrder:o}){let[c,m]=(0,l.useState)(!1),[u,p]=(0,l.useState)(()=>n(e.endsAt));(0,l.useEffect)(()=>{m(!0);let t=setInterval(()=>p(n(e.endsAt)),1e3);return()=>clearInterval(t)},[e.endsAt]);let g=e=>e?e[t]??e.en:"";return c?u?(0,r.jsx)("div",{className:a,"data-section-order":o,"data-section-type":"CountdownBanner",children:(0,r.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-brand-primary text-white",children:[e.imageUrl&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{fill:!0,alt:g(e.title),className:`object-cover ${e.laptopImageUrl||e.tabletImageUrl||e.mobileImageUrl?"hidden lg:block":""}`,sizes:"100vw",src:e.imageUrl}),e.laptopImageUrl&&(0,r.jsx)(i.default,{fill:!0,alt:g(e.title),className:"object-cover hidden md:block lg:hidden",sizes:"100vw",src:e.laptopImageUrl}),e.tabletImageUrl&&(0,r.jsx)(i.default,{fill:!0,alt:g(e.title),className:"object-cover hidden sm:block md:hidden",sizes:"100vw",src:e.tabletImageUrl}),(0,r.jsx)(i.default,{fill:!0,alt:g(e.title),className:`object-cover ${e.imageUrl||e.laptopImageUrl||e.tabletImageUrl?"block sm:hidden":""}`,sizes:"100vw",src:e.mobileImageUrl||e.imageUrl}),(0,r.jsx)("div",{className:"absolute inset-0 bg-brand-primary/70"})]}),(0,r.jsxs)("div",{className:"relative z-10 flex flex-col md:flex-row items-center justify-between gap-6 px-8 py-10",children:[(0,r.jsxs)("div",{className:"text-center md:text-left",children:[(0,r.jsx)("h2",{className:"font-heading text-2xl md:text-3xl font-bold",children:g(e.title)}),e.subtitle&&(0,r.jsx)("p",{className:"mt-2 opacity-90 text-base",children:g(e.subtitle)}),e.ctaHref&&e.ctaLabel&&(0,r.jsx)(s(),{className:"mt-4 inline-flex px-5 py-2.5 bg-white text-brand-primary font-semibold rounded-lg hover:bg-gray-100 transition-colors",href:e.ctaHref,children:g(e.ctaLabel)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(d,{label:"Days",value:u.days}),(0,r.jsx)("span",{className:"text-2xl font-bold opacity-60 mb-4",children:":"}),(0,r.jsx)(d,{label:"Hours",value:u.hours}),(0,r.jsx)("span",{className:"text-2xl font-bold opacity-60 mb-4",children:":"}),(0,r.jsx)(d,{label:"Min",value:u.minutes}),(0,r.jsx)("span",{className:"text-2xl font-bold opacity-60 mb-4",children:":"}),(0,r.jsx)(d,{label:"Sec",value:u.seconds})]})]})]})}):e.showAfterExpiry?(0,r.jsx)("div",{className:a,"data-section-order":o,"data-section-type":"CountdownBanner",children:(0,r.jsx)("div",{className:"bg-gray-100 dark:bg-gray-800 rounded-2xl p-8 text-center",children:(0,r.jsx)("p",{className:"text-muted-foreground dark:text-muted-foreground",children:g(e.expiryMessage)||"This sale has ended."})})}):null:(0,r.jsx)("div",{className:a,"data-section-order":o,"data-section-type":"CountdownBanner",children:(0,r.jsx)("div",{className:"relative overflow-hidden rounded-2xl bg-brand-primary/10 animate-pulse",style:{height:"200px"}})})}},84462:(e,t,a)=>{a.d(t,{default:()=>g});var r=a(95155),l=a(12115),i=a(52619),o=a.n(i),s=a(53511),n=a(85921),d=a(2068),c=a(35130),m=a(97003),u=a(12976),p=a(39307);function g({data:e,locale:t,paddingClass:a="",sectionOrder:i}){let g=(0,l.useRef)(null),[h,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1!==e.muted),[y,v]=(0,l.useState)(!1),[w,j]=(0,l.useState)(!1),N=e.videoUrl?(0,p.Hc)(e.videoUrl):null,k=e.minHeight??"60vh",C=e.minHeightTablet||k,S=e.minHeightMobile||k,P=e.overlayOpacity??.4,A=e.objectFit??"cover",{t:I}=(0,u.k)(),z=e=>e?e[t]??e.en:"";(0,l.useEffect)(()=>{if(x(!0),N)return;let t=g.current;if(!t)return;t.muted=!1!==e.muted,t.defaultMuted=!1!==e.muted;let a=requestAnimationFrame(async()=>{try{await t.play(),v(!0),j(!1)}catch{v(!1),j(!0)}});return()=>cancelAnimationFrame(a)},[e.muted,N]);let M=async()=>{if(N)return;let e=g.current;if(!e)return;let t=!f;if(b(t),e.muted=t,!t&&!y)try{await e.play(),v(!0),j(!1)}catch{}},_=async()=>{if(N)return;let e=g.current;if(e)if(y)e.pause(),v(!1);else try{await e.play(),v(!0),j(!1)}catch{e.muted=!1,b(!1);try{await e.play(),v(!0),j(!1)}catch{}}};return(0,r.jsx)("div",{className:a,"data-section-order":i,"data-section-type":"VideoHero",children:(0,r.jsxs)("div",{className:"group relative overflow-hidden shadow-2xl transition-all duration-700 2xl h-[var(--h-mob)] md:h-[var(--h-tab)] lg:h-[var(--h-desk)]",style:{"--h-desk":k,"--h-tab":C,"--h-mob":S},children:[h&&N?(0,r.jsx)("iframe",{allowFullScreen:!0,allow:"autoplay; encrypted-media",className:`w-full h-full absolute inset-0 pointer-events-none transition-transform duration-1000 group-hover:scale-105 ${"cover"===A?"object-cover":"object-contain"}`,src:`${N}?autoplay=1&mute=${+(!1!==e.muted)}&loop=1&playlist=${N.split("/").pop()}&controls=0&modestbranding=1&rel=0`,style:{border:"none",width:"100%",height:"100%"},title:"Hero Video"}):h&&e.videoUrl&&""!==e.videoUrl.trim()?(0,r.jsx)("video",{ref:g,playsInline:!0,autoPlay:!1!==e.autoplay,className:`w-full h-full transition-transform duration-1000 group-hover:scale-105 ${"cover"===A?"object-cover":"object-contain"}`,loop:!1!==e.loop,muted:f,poster:e.posterImageUrl||void 0,preload:"auto",style:{minHeight:"100%"},onPause:()=>v(!1),onPlay:()=>v(!0),children:(0,r.jsx)("source",{src:e.videoUrl,type:"video/mp4"})}):e.posterImageUrl?(0,r.jsx)("img",{alt:z(e.title),className:`w-full h-full transition-transform duration-1000 group-hover:scale-105 ${"cover"===A?"object-cover":"object-contain"}`,src:e.posterImageUrl,style:{minHeight:"100%"}}):(0,r.jsx)("div",{className:"w-full h-full bg-muted"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-black/20 transition-opacity duration-500",style:{opacity:P}}),!N&&(0,r.jsx)("button",{"aria-label":y?I("common.video.pause","Pause video"):I("common.video.play","Play video"),className:"absolute inset-0 grid place-items-center z-10",type:"button",onClick:_,children:(0,r.jsx)("span",{className:"rounded-full bg-white/10 p-6 backdrop-blur-md border border-white/20 transition-all duration-300 scale-90 opacity-0 group-hover:opacity-100 group-hover:scale-100 hover:bg-white/20",children:y?(0,r.jsx)(s.A,{className:"h-10 w-10 text-white fill-white"}):(0,r.jsx)(n.A,{className:"h-10 w-10 text-white fill-white ml-1"})})}),(e.title||e.subtitle||e.ctaLabel)&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white text-center px-6 pointer-events-none z-10",children:[e.title&&(0,r.jsx)("h2",{className:"font-heading text-4xl md:text-6xl lg:text-7xl font-black leading-tight mb-6 drop-shadow-[0_10px_20px_rgba(0,0,0,0.5)] uppercase tracking-tighter",children:z(e.title)}),e.subtitle&&(0,r.jsx)("p",{className:"text-lg md:text-2xl font-medium opacity-90 max-w-3xl mb-10 drop-shadow-lg tracking-wide leading-relaxed",children:z(e.subtitle)}),e.ctaHref&&e.ctaLabel&&(0,r.jsx)(o(),{className:"pointer-events-auto inline-flex items-center px-10 py-4 bg-white text-foreground font-bold uppercase tracking-widest rounded-full hover:bg-brand-primary hover:text-white transition-all duration-300 shadow-[0_10px_30px_rgba(255,255,255,0.2)] active:scale-95",href:e.ctaHref,children:z(e.ctaLabel)})]}),!N&&(0,r.jsx)("div",{className:"absolute right-6 top-6 z-20",children:(0,r.jsx)(m.$,{"aria-label":f?I("common.video.unmute","Unmute video"):I("common.video.mute","Mute video"),className:"h-12 w-12 rounded-full bg-black/20 text-white backdrop-blur-xl border border-white/10 transition-all duration-300 hover:bg-white/20 hover:scale-110",size:"icon",type:"button",variant:"ghost",onClick:M,children:f?(0,r.jsx)(d.A,{className:"h-6 w-6"}):(0,r.jsx)(c.A,{className:"h-6 w-6"})})}),w&&!N&&(0,r.jsx)("div",{className:"pointer-events-none absolute bottom-8 right-8 rounded-full bg-white/10 px-5 py-2 text-xs font-bold uppercase tracking-widest text-white backdrop-blur-md border border-white/20",children:I("home.video.tapToPlay","Tap to play")})]})})}},92531:(e,t,a)=>{a.d(t,{default:()=>h});var r=a(95155),l=a(12115),i=a(52619),o=a.n(i),s=a(15239),n=a(38858),d=a(67546),c=a(15777),m=a(62391),u=a(7588),p=a(98493),g=a(75165);function h({data:e,locale:t,categories:a,paddingClass:i=""}){let h=(0,l.useRef)(null),x=(0,l.useRef)(null),f=(0,l.useRef)(null),[b,y]=(0,l.useState)(new Set),v=(0,u.a)();(0,l.useEffect)(()=>{if(x.current&&a.length>0)return h.current=new n.Ay(x.current,{type:"slide",perPage:e.slidesPerView||4,gap:"1rem",pagination:e.showPagination??!1,arrows:e.showArrows??!0,drag:!0,flickPower:300,accessibility:!0,waitForTransition:!0,dragMinThreshold:{mouse:4,touch:10},autoWidth:!1,autoplay:e.autoplay??!1,interval:e.autoplayInterval||3e3,pauseOnHover:!0,trimSpace:!0,focus:0,omitEnd:!1,breakpoints:{640:{perPage:2.5,gap:"0.5rem",arrows:!1,drag:!0,trimSpace:!0,focus:0,padding:0},768:{perPage:3,gap:"0.75rem",arrows:!1,drag:!0,trimSpace:!0},1024:{perPage:3,gap:"0.875rem",trimSpace:!0}}}),h.current.mount(),()=>{h.current&&h.current.destroy()}},[a,e.slidesPerView,e.showPagination,e.showArrows,e.autoplay,e.autoplayInterval]);let w=a;return(e.categoryIds&&e.categoryIds.length>0&&(w=w.filter(t=>e.categoryIds?.includes(t.id))),e.limit&&(w=w.slice(0,e.limit)),0===w.length)?null:(0,r.jsxs)("section",{className:"relative",children:[(0,r.jsxs)("div",{className:`${i}`,children:[e.showHeader&&(0,r.jsxs)("div",{className:"mb-8 md:mb-10 flex flex-col gap-3 md:gap-4",children:[e.title&&(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-foreground text-balance font-heading tracking-tight",children:(0,m.t)(e.title,t)}),e.subtitle&&(0,r.jsx)("p",{className:"font-primary text-muted-foreground text-base md:text-lg max-w-2xl",children:(0,m.t)(e.subtitle,t)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 md:gap-4",children:[e.showAllCard&&(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("button",{"aria-label":(0,m.t)(e.allCardText||{ka:"ყველა კატეგორია",en:"View all categories"},t),className:"font-primary block",type:"button",onClick:()=>{if(f.current){let e=f.current.querySelector("button");e&&e.click()}},children:(0,r.jsx)("div",{className:"h-32 sm:h-40 md:h-48 lg:h-56 w-24 sm:w-28 md:w-36 lg:w-40 cursor-pointer overflow-hidden rounded-2xl border border-border/60 bg-card shadow-sm",children:(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center gap-1.5 sm:gap-2 md:gap-3 p-2 sm:p-3",children:[(0,r.jsx)(d.A,{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 text-foreground"}),(0,r.jsx)("p",{className:"font-primary text-[10px] sm:text-xs md:text-sm font-semibold text-foreground text-center",children:(0,m.t)(e.allCardText||{ka:"ყველა",en:"All"},t)})]})})})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:(0,r.jsx)("div",{ref:x,className:"splide",children:(0,r.jsx)("div",{className:"splide__track",children:(0,r.jsx)("ul",{className:"splide__list",children:w.map(e=>{let a=(0,c.U)(e.images)||"/placeholder.png",l=b.has(e.id);return(0,r.jsx)("li",{className:"splide__slide",children:(0,r.jsx)(o(),{"aria-label":e.name||"Category",className:"block h-full",href:`/${t}/category/${e.slug||e.id}`,children:(0,r.jsxs)("div",{className:"relative h-32 sm:h-40 md:h-48 lg:h-56 w-full cursor-pointer rounded-2xl overflow-hidden border border-border/60 bg-card shadow-sm",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-primary/10"}),(0,r.jsx)("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 md:top-4 md:right-4 w-14 h-14 sm:w-16 sm:h-16 md:w-24 md:h-24 lg:w-28 lg:h-28",children:(0,r.jsx)(s.default,{fill:!0,alt:"",className:"object-contain drop-shadow-md",sizes:"(max-width: 640px) 56px, (max-width: 768px) 64px, (max-width: 1024px) 96px, 112px",src:l?"/placeholder.png":a,onError:()=>{var t;return t=e.id,void y(e=>new Set(e).add(t))}})}),(0,r.jsx)("div",{className:"absolute bottom-2 sm:bottom-3 md:bottom-4 left-2 sm:left-3 md:left-4 right-2 sm:right-3 md:right-4 z-10",children:(0,r.jsx)("h3",{className:"text-[9px] sm:text-[10px] md:text-xs lg:text-sm font-heading font-semibold text-foreground truncate",children:e.name})})]})})},e.id)})})})})})]})]}),(0,r.jsx)("div",{ref:f,className:"sr-only",children:v?(0,r.jsx)(p.A,{}):(0,r.jsx)(g.A,{})})]})}},96117:(e,t,a)=>{a.d(t,{default:()=>h});var r=a(95155),l=a(12115),i=a(15239),o=a(52619),s=a.n(o),n=a(67909),d=a(62391),c=a(25016),m=a(12976);let u=(0,n.default)(()=>Promise.resolve().then(a.bind(a,37270)).then(e=>e.Splide),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),p=(0,n.default)(()=>Promise.resolve().then(a.bind(a,37270)).then(e=>e.SplideSlide),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),g=(0,l.memo)(function({banner:e,locale:t,index:a,bannerHeight:l,bannerHeightTablet:o,bannerHeightMobile:n,rounded:m=!0}){let u=e.imageUrl||"/placeholder.png",p=e.laptopImageUrl||null,g=e.tabletImageUrl||null,h=e.mobileImageUrl||e.imageUrl||"/placeholder.png";e.laptopImageUrl||e.tabletImageUrl,e.tabletImageUrl;let x=e.badge?(0,d.t)(e.badge,t)?.trim():"";return(0,r.jsxs)(s(),{"aria-label":(0,d.t)(e.alt,t),className:(0,c.cn)("group relative block overflow-hidden transition-[opacity,transform] duration-500",m?"rounded-2xl":"rounded-none","opacity-100 scale-100"),href:`/${t}${e.href}`,children:[(0,r.jsx)("div",{className:"relative w-full",style:{"--banner-height":l||"400px","--banner-height-tablet":o||l||"300px","--banner-height-mobile":n||l||"250px"},children:(0,r.jsxs)("div",{className:"relative w-full h-[var(--banner-height-mobile)] md:h-[var(--banner-height-tablet)] lg:h-[var(--banner-height)]",children:[(0,r.jsx)(i.default,{fill:!0,alt:(0,d.t)(e.alt,t),className:(0,c.cn)("object-cover w-full h-full transition-transform duration-700",(p||g||h)&&"hidden lg:block"),fetchPriority:0===a?"high":"auto",loading:0===a?"eager":"lazy",priority:0===a,quality:90,sizes:"100vw",src:u}),(p||!p&&(g||h))&&(0,r.jsx)(i.default,{fill:!0,alt:(0,d.t)(e.alt,t),className:(0,c.cn)("object-cover w-full h-full transition-transform duration-700",p?"hidden md:block lg:hidden":"hidden",!p&&(g||h)&&"hidden md:block lg:hidden"),fetchPriority:0===a?"high":"auto",loading:0===a?"eager":"lazy",priority:0===a,quality:90,sizes:"(min-width: 1024px) 0px, 100vw",src:p||u}),(g||!g&&h)&&(0,r.jsx)(i.default,{fill:!0,alt:(0,d.t)(e.alt,t),className:(0,c.cn)("object-cover w-full h-full transition-transform duration-700",g?"hidden sm:block md:hidden":"hidden",!g&&h&&"hidden sm:block md:hidden"),fetchPriority:0===a?"high":"auto",loading:0===a?"eager":"lazy",priority:0===a,quality:90,sizes:"(min-width: 768px) 0px, 100vw",src:g||p||u}),(0,r.jsx)(i.default,{fill:!0,alt:(0,d.t)(e.alt,t),className:(0,c.cn)("object-cover transition-transform duration-700 group-hover:scale-105",(u||p||g)&&"block sm:hidden"),fetchPriority:0===a?"high":"auto",loading:0===a?"eager":"lazy",priority:0===a,quality:90,sizes:"100vw",src:h})]})}),""!==x&&(0,r.jsx)("div",{className:"absolute top-4 left-4 md:top-6 md:left-6 bg-primary text-primary-foreground text-sm md:text-base font-bold px-4 py-2 rounded-full shadow-lg",children:x})]})});function h({data:e,locale:t,sectionOrder:a,paddingClass:i}){let{t:o}=(0,m.k)(),s=(0,l.useCallback)(e=>{let t=(e,t)=>{e.querySelectorAll("a, button").forEach(e=>{t?(e.setAttribute("tabindex","-1"),document.activeElement===e&&e.blur()):e.removeAttribute("tabindex")})};e.on("move",(a,r)=>{let l=e.Components.Slides.getAt(r);l&&t(l.slide,!0)}),e.on("mounted moved",()=>{e.Components.Slides.forEach(e=>{t(e.slide,"true"===e.slide.getAttribute("aria-hidden"))})})},[]),n="carousel"===e.layout,d=e.columns||1,h=e.carouselStyle||"full-width",x=e.scrollDirection||"horizontal",f=e.showArrows??!0,b=e.autoScroll??!0,y=e.autoScrollInterval||5e3,v=e.bannerHeight,w=e.bannerHeightTablet,j=e.bannerHeightMobile,N="vertical"===x,k=v||(N?"500px":void 0),C=(0,l.useMemo)(()=>{let e={direction:N?"ttb":"ltr",height:N?k:void 0,arrows:(!N||!f)&&f,pagination:!0,autoplay:b,interval:y,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!1,wheel:N,speed:600,easing:"cubic-bezier(0.25, 1, 0.5, 1)"};return"grid"===h?{...e,type:"slide",gap:"1rem",pagination:!!N&&!!f,drag:"free",trimSpace:!0,snap:!1,omitEnd:!0,focus:0,perMove:1,perPage:d>=3?3:d>=2?2:1,breakpoints:{1280:{perPage:d>=3?3:d>=2?2:1,gap:"1rem"},1024:{perPage:d>=2?2:1,gap:"0.75rem"},768:{perPage:d>=2?2:1,gap:"0.75rem"},640:{perPage:1,gap:"0.5rem"}}}:{...e,type:"slide",perPage:1,perMove:1,gap:N?"1rem":"1.5rem",pagination:!0,drag:!0,focus:0}},[N,k,f,b,y,h,d]);if(!n){let l=1===d?"grid grid-cols-1 gap-6":2===d?"grid grid-cols-2 gap-4 md:gap-6":3===d?"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-6":4===d?"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6":"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 md:gap-6";return(0,r.jsx)("section",{className:(0,c.cn)("relative w-full overflow-hidden",i),"data-section-order":a,"data-section-type":"CommercialBanner",children:(0,r.jsx)("div",{className:l,children:e.banners.map((a,l)=>(0,r.jsx)(g,{banner:a,bannerHeight:v,bannerHeightMobile:j,bannerHeightTablet:w,index:l,locale:t,rounded:e.rounded},l))})})}return(0,r.jsx)("section",{className:(0,c.cn)("relative w-full overflow-hidden",i),"data-section-order":a,"data-section-type":"CommercialBanner",children:(0,r.jsx)("div",{className:(0,c.cn)("relative group",N&&f?"[&_.splide__pagination]:flex-col [&_.splide__pagination]:!left-auto [&_.splide__pagination]:!right-4 [&_.splide__pagination]:!top-1/2 [&_.splide__pagination]:!-translate-y-1/2 [&_.splide__pagination]:!bottom-auto [&_.splide__pagination]:!gap-3 [&_.splide__pagination]:!z-50 [&_.splide__pagination]:!pointer-events-auto [&_.splide__pagination__page]:!bg-white/50 [&_.splide__pagination__page.is-active]:!bg-white [&_.splide__pagination__page.is-active]:!scale-150 [&_.splide__pagination__page]:!transition-all [&_.splide__pagination__page]:!duration-75 [&_.splide__pagination__page]:!w-2.5 [&_.splide__pagination__page]:!h-2.5 [&_.splide__pagination__page]:!shadow-md":"",!v&&!N&&"aspect-square md:aspect-auto md:min-h-64 lg:min-h-80 xl:min-h-96",v&&!N&&"min-h-[var(--banner-height-mobile)] md:min-h-[var(--banner-height-tablet)] lg:min-h-[var(--banner-height)]"),style:v&&!N?{"--banner-height":v,"--banner-height-tablet":w||v,"--banner-height-mobile":j||v}:N?{minHeight:k}:void 0,children:(0,r.jsx)(u,{"aria-label":o("home.commercialBanners","Commercial Banners"),options:C,onMounted:s,children:e.banners.map((a,l)=>(0,r.jsx)(p,{className:"grid"===h?"!h-auto":"",style:(()=>{if(N&&k)return{height:k}})(),children:(0,r.jsx)(g,{banner:a,bannerHeight:N?k:v,bannerHeightMobile:j,bannerHeightTablet:w,index:"grid"===h?0:l,locale:t,rounded:e.rounded})},l))})})})}},97901:(e,t,a)=>{a.d(t,{default:()=>o});var r=a(95155),l=a(12115),i=a(15239);function o({data:e,locale:t,paddingClass:a="",sectionOrder:o}){let[s,n]=(0,l.useState)(""),[d,c]=(0,l.useState)(!1),m=e.layout??"centered",u=(e,a="")=>e?e[t]??e.en??a:a,p=d?(0,r.jsx)("p",{className:"text-green-600 dark:text-green-400 font-semibold text-center py-2",children:u(e.successMessage,"Thank you! You've been subscribed.")}):(0,r.jsxs)("form",{className:"horizontal"===m?"flex gap-2 w-full max-w-md":"flex flex-col gap-3 w-full max-w-sm",onSubmit:e=>{e.preventDefault(),s&&c(!0)},children:[(0,r.jsx)("label",{className:"sr-only",htmlFor:"newsletter-email",children:"Email address"}),(0,r.jsx)("input",{required:!0,className:"flex-1 px-4 py-2.5 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-foreground dark:text-foreground text-base focus:outline-none focus:ring-2 focus:ring-brand-primary",id:"newsletter-email",placeholder:u(e.placeholder,"Your email address"),type:"email",value:s,onChange:e=>n(e.target.value)}),(0,r.jsx)("button",{className:"px-5 py-2.5 bg-brand-primary text-white text-sm font-semibold rounded-lg hover:opacity-90 transition-opacity whitespace-nowrap",type:"submit",children:u(e.buttonText,"Subscribe")})]});return"card"===m?(0,r.jsx)("div",{className:a,"data-section-order":o,"data-section-type":"NewsletterSection",children:(0,r.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-brand-primary/10 dark:bg-brand-primary/20 border border-brand-primary/20 p-8 md:p-12",children:[e.backgroundImageUrl&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{fill:!0,alt:"",className:`object-cover opacity-20 ${e.laptopBackgroundImageUrl||e.tabletBackgroundImageUrl||e.mobileBackgroundImageUrl?"hidden lg:block":""}`,src:e.backgroundImageUrl}),e.laptopBackgroundImageUrl&&(0,r.jsx)(i.default,{fill:!0,alt:"",className:"object-cover opacity-20 hidden md:block lg:hidden",src:e.laptopBackgroundImageUrl}),e.tabletBackgroundImageUrl&&(0,r.jsx)(i.default,{fill:!0,alt:"",className:"object-cover opacity-20 hidden sm:block md:hidden",src:e.tabletBackgroundImageUrl}),(0,r.jsx)(i.default,{fill:!0,alt:"",className:`object-cover opacity-20 ${e.backgroundImageUrl||e.laptopBackgroundImageUrl||e.tabletBackgroundImageUrl?"block sm:hidden":""}`,src:e.mobileBackgroundImageUrl||e.backgroundImageUrl}),(0,r.jsx)("div",{className:"absolute inset-0"})]}),(0,r.jsxs)("div",{className:"relative z-10 flex flex-col items-center text-center gap-4",children:[(0,r.jsx)("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground dark:text-foreground",children:u(e.title)}),e.subtitle&&(0,r.jsx)("p",{className:"text-muted-foreground dark:text-muted-foreground max-w-md",children:u(e.subtitle)}),p,e.disclaimer&&(0,r.jsx)("p",{className:"text-xs text-gray-400",children:u(e.disclaimer)})]})]})}):"horizontal"===m?(0,r.jsx)("div",{className:`py-8 border-y border-gray-200 dark:border-gray-800 ${a}`,"data-section-order":o,"data-section-type":"NewsletterSection",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-heading text-xl md:text-2xl font-bold text-foreground dark:text-foreground",children:u(e.title)}),e.subtitle&&(0,r.jsx)("p",{className:"text-muted-foreground dark:text-muted-foreground text-sm mt-1",children:u(e.subtitle)})]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[p,e.disclaimer&&(0,r.jsx)("p",{className:"text-xs text-gray-400",children:u(e.disclaimer)})]})]})}):(0,r.jsx)("div",{className:a,"data-section-order":o,"data-section-type":"NewsletterSection",children:(0,r.jsxs)("div",{className:"flex flex-col items-center text-center gap-4",children:[(0,r.jsx)("h2",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground dark:text-foreground",children:u(e.title)}),e.subtitle&&(0,r.jsx)("p",{className:"text-muted-foreground dark:text-muted-foreground max-w-md",children:u(e.subtitle)}),p,e.disclaimer&&(0,r.jsx)("p",{className:"text-xs text-gray-400",children:u(e.disclaimer)})]})})}},98493:(e,t,a)=>{a.d(t,{A:()=>N});var r=a(95155),l=a(12115),i=a(24685),o=a(27892),s=a(49537),n=a(67546),d=a(29632),c=a(43569),m=a(52619),u=a.n(m),p=a(15239),g=a(20063),h=a(95684),x=a(15777),f=a(99274),b=a(12976),y=a(84935),v=a(32985);let w="__root__";function j(e){return(e??"").trim()}function N(){let{t:e}=(0,b.k)(),t=(0,g.usePathname)(),[a,m]=(0,l.useState)(!1),[N,k]=(0,l.useState)([]),[C,S]=(0,l.useState)(!1),[P,A]=(0,l.useState)(null),[I,z]=(0,l.useState)(new Set),[M,_]=(0,l.useState)(null),E=(0,l.useRef)(!1),{childrenMap:$,roots:T}=(0,l.useMemo)(()=>(function(e){let t={};for(let a of e){let e=j(a.parentId)||w;t[e]||(t[e]=[]),t[e].push(a)}Object.keys(t).forEach(e=>t[e].sort((e,t)=>(e.name??e.id??"").localeCompare(t.name??t.id??"")));let a=t[w]??[];return{childrenMap:t,roots:a}})(N),[N]),B=t.split("/")[1]||"",Y=/^[a-z]{2,3}$/.test(B)?B:"ka",U=()=>{m(!1),_(null)},H=e=>(e?$[j(e)]:$[w])??[],O=M?H(M):T,L=M?N.find(e=>j(e.id)===M):null;async function D(){S(!0),A(null);try{let e=await (0,f.QU)();k(Array.isArray(e)?e:[]),E.current=!0}catch(e){console.error(e),A("Failed to load categories")}finally{S(!1)}}function R({node:t}){let a=j(t.id),l=H(a).length>0,i=(0,x.U)(t.images)||"/placeholder.png",o=I.has(a);return(0,r.jsx)("li",{className:"select-none",children:(0,r.jsxs)("div",{className:"group flex items-center gap-3 rounded-xl border border-transparent hover:border-brand-primary/20 dark:hover:border-brand-primary/30 bg-white dark:bg-gray-800/60 hover:bg-brand-primary/5 dark:hover:bg-brand-primary/10 transition-all duration-150 px-3 min-w-0 shadow-sm hover:shadow-md",children:[(0,r.jsxs)(u(),{className:"flex-1 py-2.5 flex items-center gap-3 min-w-0",href:(0,v.nb)(`/category/${t.slug||a}`,Y),onClick:U,children:[(0,r.jsx)("div",{className:"relative w-9 h-9 sm:w-10 sm:h-10 flex-shrink-0 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 ring-1 ring-gray-200 dark:ring-gray-600 group-hover:ring-brand-primary/40 dark:group-hover:ring-brand-primary/50 transition-all duration-150",children:(0,r.jsx)(p.default,{fill:!0,alt:t.name||e("categories.category","Category"),className:"object-cover group-hover:scale-105 transition-transform duration-200",sizes:"40px",src:o?"/placeholder.png":i,onError:()=>{z(e=>new Set(e).add(a))}})}),(0,r.jsx)("span",{className:"font-primary text-sm font-medium text-foreground dark:text-foreground group-hover:text-brand-primary dark:group-hover:text-brand-primarydark truncate min-w-0 transition-colors duration-150",children:(0,y.HS)(t.translations,"Name",Y,t.name??e("categories.category","Category"))})]}),l?(0,r.jsx)("button",{"aria-label":e("categories.viewCategories","View Categories"),className:"p-1.5 rounded-lg hover:bg-brand-primary/10 dark:hover:bg-brand-primary/20 transition-colors duration-150 flex-shrink-0",type:"button",onClick:()=>{_(a)},children:(0,r.jsx)(s.A,{className:"h-4 w-4 text-muted-foreground group-hover:text-brand-primary dark:group-hover:text-brand-primarydark transition-colors duration-150"})}):(0,r.jsx)("div",{className:"w-7 flex-shrink-0"})]})},a)}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.T,{isIconOnly:!0,"aria-label":e("categories.viewCategories","View Categories"),className:"relative rounded-full bg-transparent h-6 w-6",variant:"solid",onPress:()=>{m(!0),E.current||D()},children:(0,r.jsx)(n.A,{height:23,width:23})}),(0,r.jsx)(i.e,{show:a,children:(0,r.jsxs)(o.lG,{className:"relative z-50",onClose:U,children:[(0,r.jsx)(i.e.Child,{as:l.Fragment,enter:"transition-opacity duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{"aria-hidden":"true",className:"fixed inset-0 bg-black/45 backdrop-blur-[2px]"})}),(0,r.jsx)(i.e.Child,{as:l.Fragment,enter:"transition-transform duration-300",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition-transform duration-200",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:(0,r.jsxs)(o.lG.Panel,{className:"fixed left-0 top-0 h-full w-[400px] max-w-[92vw] bg-white dark:bg-brand-surfacedark shadow-2xl rounded-r-2xl overflow-hidden flex flex-col",children:[(0,r.jsxs)("div",{className:"relative flex items-center justify-between gap-2 px-4 sm:px-5 py-4 ",children:[(0,r.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-brand-primary rounded-tr-sm rounded-br-sm"}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1 pl-2",children:[L?(0,r.jsx)("button",{"aria-label":e("common.goBack","Go back"),className:"p-1.5 -ml-1 rounded-lg hover:bg-white dark:hover:bg-gray-800 transition-colors duration-150 flex-shrink-0 border border-transparent hover:border-gray-200 dark:hover:border-gray-700",type:"button",onClick:()=>{_(null)},children:(0,r.jsx)(d.A,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}):(0,r.jsx)("div",{className:"flex-shrink-0 p-1.5 rounded-lg bg-brand-primary/10 dark:bg-brand-primary/20",children:(0,r.jsx)(n.A,{className:"h-4 w-4 text-brand-primary dark:text-brand-primarydark"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h2",{className:"font-heading text-base sm:text-lg font-bold text-gray-900 dark:text-foreground truncate leading-tight",children:L?(0,y.HS)(L.translations,"Name",Y,L.name??""):e("categories.category","Categories")}),!L&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground font-primary mt-0.5",children:T.length>0?`${T.length} ${e("categories.available","available")}`:""})]})]}),(0,r.jsx)("button",{"aria-label":e("common.close","Close"),className:"p-1.5 rounded-lg hover:bg-white dark:hover:bg-gray-800 transition-colors duration-150 flex-shrink-0 border border-transparent hover:border-gray-200 dark:hover:border-gray-700",onClick:U,children:(0,r.jsx)(c.A,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"})})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden px-3 py-3 sm:px-4 sm:py-4 bg-brand-primary/5 dark:bg-brand-surfacedark",children:[C&&(0,r.jsx)("div",{className:"space-y-2",children:[72,88,64,80,76,68,84,60].map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl bg-white dark:bg-gray-800/60 px-3 py-2.5 shadow-sm",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),(0,r.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,r.jsx)("div",{className:"h-3 rounded-full bg-gray-200 dark:bg-gray-700 animate-pulse",style:{width:`${e}%`}}),(0,r.jsx)("div",{className:"h-2 rounded-full bg-gray-100 dark:bg-gray-700/50 animate-pulse w-1/3"})]})]},t))}),P&&!C&&(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-red-50 dark:bg-red-900/20 flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)(c.A,{className:"h-6 w-6 text-red-500"})}),(0,r.jsx)("p",{className:"font-primary text-sm text-red-600 dark:text-red-400 mb-4",children:P}),(0,r.jsx)(h.T,{className:"bg-brand-primary/10 text-brand-primary font-primary",size:"sm",variant:"flat",onPress:D,children:e("common.retry","Try again")})]}),!C&&!P&&0===O.length&&(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-100 dark:bg-gray-800 flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)(n.A,{className:"h-6 w-6 text-muted-foreground"})}),(0,r.jsx)("p",{className:"font-primary text-sm text-gray-500 dark:text-gray-400",children:L?e("categories.noSubcategories","No subcategories available."):e("categories.noCategories","No categories available.")})]}),!C&&!P&&O.length>0&&(0,r.jsx)("ul",{className:"space-y-1.5",children:O.map(e=>(0,r.jsx)(R,{node:e},e.id))})]}),(0,r.jsx)("div",{className:"px-3 sm:px-4 py-3 sm:py-4 border-t border-gray-100 dark:border-gray-800 bg-white dark:bg-brand-surfacedark",children:(0,r.jsx)(h.T,{fullWidth:!0,as:u(),className:"bg-brand-primary text-white font-primary font-semibold hover:opacity-90 transition-opacity",href:"/category",radius:"lg",variant:"solid",onPress:U,children:e("categories.allProducts","View All Products")})})]})})]})})]})}}}]);