1import{c as J,u as S,r as m,j as e,C as P,P as W,p as q,a as L,b as z,d as se,e as _,L as re,f as k,g as ae,h as le,S as ne}from"./index-azhi5XtH.js";import{g as C}from"./cdnImage-UV_xpSAk.js";import{C as F}from"./chevron-right-B80o_rfg.js";import{S as B}from"./shopping-cart-D98rWk_N.js";import{C as K}from"./ContentCard-CP7JRY0H.js";import{u as ie}from"./useRandomizedContent-PE3_iVaD.js";import{u as oe}from"./useSEO-BzVVhEd6.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const ce=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],de=J("CalendarDays",ce);/** 7 * @license lucide-react v0.475.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const me=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],ue=J("Gift",me),X={days:"××××",months:"×××ש××",years:"×©× ××"},he=a=>{const r=[...a];for(let l=r.length-1;l>0;l--){const i=Math.floor(Math.random()*(l+1));[r[l],r[i]]=[r[i],r[l]]}return r},G=a=>{const r=Date.now(),l=a.map((n,d)=>d),i=l.filter(n=>{const d=a[n];return!(d!=null&&d.is_live_event)||!d.live_end_time?!1:new Date(d.live_end_time).getTime()>r}),c=l.filter(n=>!i.includes(n));return[...i,...he(c)]};function V({item:a,items:r=[],onProductClick:l,hideTitle:i=!1}){var U,O;const c=S(),n=r.length>0?r:a?[a]:[],[d,f]=m.useState(()=>G(n)),[x,o]=m.useState(0),[h,w]=m.useState(!1),s=m.useRef(x);s.current=x;const t=n[d[x]],y=m.useCallback(()=>{n.length<=1||(f(G(n)),o(0))},[n.length]);if(m.useEffect(()=>{if(n.length<=1||h)return;const b=setInterval(()=>{o(v=>v+1>=n.length?(y(),0):v+1)},3e3);return()=>clearInterval(b)},[n.length,h,y]),!t)return null;const j=b=>o(b),M=()=>o(b=>(b-1+n.length)%n.length),u=()=>{if(x+1>=n.length){y();return}o(b=>b+1)},p=t.hero_image_url||t.thumbnail_horizontal||t.thumbnail_vertical||t.thumbnail_url,g=!!t._isProduct,N=g&&t.sale_price&&parseFloat(t.sale_price)<parseFloat(t.base_price),$=g?N?t.sale_price:t.base_price:null,R=!!t.is_live_event,A=R&&t.live_start_time&&Date.now()>=new Date(t.live_start_time).getTime()&&(!t.live_end_time||Date.now()<=new Date(t.live_end_time).getTime()),H=R&&t.live_start_time&&Date.now()<new Date(t.live_start_time).getTime(),te=()=>{c(g?q(t):z(t))};return e.jsxs("div",{className:"hero-section relative w-full group",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[e.jsxs("div",{className:"relative w-full overflow-hidden",style:{aspectRatio:"3250 / 1300",background:"#000"},children:[e.jsxs("div",{className:"absolute inset-0 cursor-pointer",onClick:te,children:[p?e.jsx("img",{src:C(p,1920,768),srcSet:`${C(p,1280,512)} 1280w, ${C(p,1920,768)} 1920w, ${C(p,2400,960)} 2400w`,sizes:"100vw",alt:t.title,width:1920,height:768,className:"w-full h-full object-cover",style:{objectPosition:"center"},fetchpriority:"high",decoding:"async"}):e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-900 to-black"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 35%)"}})]}),n.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:M,"aria-label":"×ת××× × ××§×××ת",className:"cast-arrow-btn absolute right-4 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-black/45 backdrop-blur-md border border-white/15 flex items-center justify-center text-white/70 hover:text-white hover:bg-black/65 transition-all duration-200 hover:scale-110 active:scale-95",children:e.jsx(F,{className:"w-6 h-6",strokeWidth:1.5})}),e.jsx("button",{onClick:u,"aria-label":"×ת××× × ××××",className:"cast-arrow-btn absolute left-4 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-black/45 backdrop-blur-md border border-white/15 flex items-center justify-center text-white/70 hover:text-white hover:bg-black/65 transition-all duration-200 hover:scale-110 active:scale-95",children:e.jsx(P,{className:"w-6 h-6",strokeWidth:1.5})})]}),g&&((U=t.promotion_tags)==null?void 0:U.length)>0&&e.jsx("div",{className:"hidden md:flex absolute top-5 right-5 z-10 flex-col items-end gap-2 pointer-events-none",children:t.promotion_tags.map((b,v)=>e.jsx("span",{className:"text-xs font-bold px-2.5 py-1 rounded-full text-white shadow-lg backdrop-blur-md",style:{backgroundColor:b.color+"e6"},children:b.text},v))}),e.jsx("div",{className:"hidden md:flex absolute bottom-0 right-0 left-0 z-10
11items-end pb-10 md:pb-12",dir:"rtl",children:e.jsxs("div",{className:"w-full px-6 md:px-12 lg:px-16 text-right",children:[e.jsxs("div",{className:"flex items-center justify-start gap-2 mb-5",children:[A&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-red-600 text-white text-xs font-bold rounded-full shadow-lg",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-white opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-white"})]}),"ש×××ר ××"]}),H&&e.jsx("span",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-amber-500/20 border border-amber-500/40 text-amber-300 text-xs font-bold rounded-full",children:"ð´ ××§×¨× × ××× ×קר××"}),g?e.jsxs("span",{className:"flex items-center gap-1 px-2.5 py-0.5 bg-primary/20 border border-primary/40 text-xs text-primary font-bold rounded-full",children:[e.jsx(W,{className:"w-3 h-3"}),t.type==="bundle"?"×××××"
11:t.type==="subscription"?"×× ××":"××צר"]}):t.age_rating&&e.jsx("span",{className:"px-2 py-0.5 bg-primary/20 border border-primary/40 text-xs text-primary font-medium",children:t.age_rating})]}),!i&&e.jsx("h1",{className:"font-black text-white leading-tight mb-4 tracking-tight text-2xl md:text-2xl lg:text-2xl",style:{textShadow:"0 2px 20px rgba(0,0,0,0.6)"},children:t.title}),t.description&&e.jsx("p",{className:"text-white/85 text-xs md:text-sm leading-relaxed mb-8 max-w-xl line-clamp-2 font-light",style:{textShadow:"0 2px 12px rgba(0,0,0,0.9)"},children:t.description}),e.jsxs("div",{className:"cta-container flex items-center justify-start gap-5 flex-wrap",children:[g&&e.jsxs("div",{className:"flex items-center gap-3",children:[N&&e.jsxs("span",{className:"text-white/35 line-through text-base",children:["âª",t.base_price]}),e.jsxs("span",{className:"text-3xl font-black text-white",children:["âª",$]}),N&&e.jsxs("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full text-white bg-red-500",children:[Math.round((1-parseFloat(t.sale_price)/parseFloat(t.base_price))*100),"% ×× ××"]}),t.bundle_duration_value&&t.bundle_duration_unit&&e.jsxs("span",{className:"text-xs text-white/40 border border-white/15 px-2 py-0.5 rounded-full",children:["ת××§×£: ",t.bundle_duration_value," ",X[t.bundle_duration_unit]]})]}),g?e.jsxs("button",{onClick:()=>c(q(t)),className:"flex items-center gap-2 px-10 py-3 bg-primary hover:bg-primary/90 text-white font-bold text-base transition-all shadow-xl shadow-primary/30 rounded-full hover:scale-105",children:[e.jsx(B,{className:"w-5 h-5"}),"×ר××ש×"]}):e.jsxs("button",{onClick:()=>c(z(t)),className:"flex items-center gap-2 px-10 py-3 bg-primary hover:bg-primary/90 text-white font-bold text-base transition-all shadow-xl shadow-primary/30 rounded-full hover:scale-105",children:[e.jsx(L,{className:"w-5 h-5 fill-white"}),R?"×ר××שת ×ר××ס":"×¦×¤× ×¢×ש××"]})]})]})})]}),e.jsxs("div",{className:"md:hidden px-4 pt-4 pb-2 text-right",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-start gap-2 mb-3 flex-wrap",children:[A&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-red-600 text-white text-xs font-bold rounded-full shadow-lg",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-white opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-white"})]}),"ש×××ר ××"]}),H&&e.jsx("span",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-amber-500/20 border border-amber-500/40 text-amber-300 text-xs font-bold rounded-full",children:"ð´ ××§×¨× × ××× ×קר××"}),g?e.jsxs("span",{className:"flex items-center gap-1 px-2.5 py-0.5 bg-primary/20 border border-primary/40 text-xs text-primary font-bold rounded-full",children:[e.jsx(W,{className:"w-3 h-3"}
11),t.type==="bundle"?"×××××":t.type==="subscription"?"×× ××":"××צר"]}):t.age_rating&&e.jsx("span",{className:"px-2 py-0.5 bg-primary/20 border border-primary/40 text-xs text-primary font-medium",children:t.age_rating}),g&&((O=t.promotion_tags)==null?void 0:O.length)>0&&t.promotion_tags.map((b,v)=>e.jsx("span",{className:"text-xs font-bold px-2.5 py-1 rounded-full text-white",style:{backgroundColor:b.color},children:b.text},v))]}),!i&&e.jsx("h1",{className:"text-2xl font-black text-white leading-tight mb-2 tracking-tight",children:t.title}),t.description&&e.jsx("p",{className:"text-white/70 text-xs leading-relaxed mb-3 line-clamp-2 font-light",children:t.description}),e.jsxs("div",{className:"cta-container flex items-center gap-4 flex-wrap",children:[g&&e.jsxs("div",{className:"flex items-center gap-2",children:[N&&e.jsxs("span",{className:"text-white/40 line-through text-sm",children:["âª",t.base_price]}),e.jsxs("span",{className:"text-2xl font-black text-white",children:["âª",$]}),N&&e.jsxs("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full text-white bg-red-500",children:[Math.round((1-parseFloat(t.sale_price)/parseFloat(t.base_price))*100),"% ×× ××"]}),t.bundle_duration_value&&t.bundle_duration_unit&&e.jsxs("span",{className:"text-xs text-white/50 border border-white/15 px-2 py-0.5 rounded-full",children:["ת××§×£: ",t.bundle_duration_value," ",X[t.bundle_duration_unit]]})]}),g?e.jsxs("button",{onClick:()=>c(q(t)),className:"flex items-center gap-2 px-6 py-3 bg-primary hover:bg-primary/90 text-white font-bold text-base transition-all shadow-xl shadow-primary/30 rounded-full",children:[e.jsx(B,{className:"w-5 h-5"}),"×ר××ש×"]}):e.jsxs("button",{onClick:()=>c(z(t)),className:"flex items-center gap-2 px-6 py-3 bg-primary hover:bg-primary/90 text-white font-bold text-base transition-all shadow-xl shadow-primary/30 rounded-full",children:[e.jsx(L,{className:"w-5 h-5 fill-white"}),R?"×ר××שת ×ר××ס":"×¦×¤× ×¢×ש××"]})]})]}),n.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 py-3",dir:"rtl",children:n.map((b,v)=>e.jsx("button",{onClick:()=>j(v),"aria-label":`×¢××ר ×ת××× × ${v+1}`,"aria-current":v===x,className:`h-2 rounded-full transition-all duration-300 ${v===x?"w-7 bg-primary":"w-2 bg-white/30 hover:bg-white/60"}`},v))})]})}function xe(){const a=m.useRef(null),{isAuthenticated:r}=se(),{data:l}=_({queryKey:["me"],queryFn:()=>k.auth.me().catch(()=>null),enabled:r}),{data:i=[]}=_({queryKey:["watchHistory",l==null?void 0:l.id],queryFn:()=>k.entities.WatchHistory.filter({user_id:l.id,completed:!1}),enabled:!!(l!=null&&l.id)}),c=i.filter(o=>(o.timestamp_seconds||0)>=900),{data:n=[]}=_({queryKey:["content","published"],queryFn:()=>k.entities.Content.filter({status:"published"})}),d={};n.forEach(o=>{d[o.id]=o});const f=c.map(o=>({...o,content:d[o.content_id]})).filter(o=>o.content).sort((o,h)=>new Date(h.last_watched_date)-new Date(o.last_watched_date));if(f.length===0)return null;const x=o=>{var h;(h=a.current)==null||h.scrollBy({left:o==="left"?-320:320,behavior:"smooth"})};return e.jsxs("div",{className:"mb-10 group/carousel relative",dir:"rtl",style:{overflow:"visible"},children:[e.jsx("div",{className:"flex items-center justify-between mb-4 px-6 md:px-10",children:e.jsx("h2",{className:"text-base md:text-lg font-bold text-white",children:"×××©× ×¦×¤×××"})}),e.jsx("button",{onClick:()=>x("right"),"aria-label":"×××× ×××× ×",className:"absolute right-0 top-[calc(50%+12px)] -translate-y-1/2 z-10 w-12 h-24 flex items-center justify-center text-white/40 hover:text-white transition-all opacity-0 group-hover/carousel:opacity-100",children:e.jsx(F,{className:"w-7 h-7"})}),e.jsx("button",{onClick:()=>x("left"),"aria-label":"×××× ×©××××",className:"absolute left-0 top-[calc(50%+12px)] -translate-y-1/2 z-10 w-12 h-24 flex items-center justify-center text-white/40 hover:text-white transition-all opacity-0 group-hover/carousel:opacity-100",children:e.jsx(P,{className:"w-7 h-7"})}),e.jsx("div",{ref:a,className:"flex gap-3 overflow-x-auto px-6 md:px-10 pb-2",style:{scrollbarWidth:"none"},children:f.map(o=>e.jsx(pe,{watch:o},o.id))})]})}function Y(a){const r=Math.floor(a/3600),l=Math.floor(a%3600/60);return r>0?`${r}:${String(l).padStart(2,"0")} שע×ת`:`${l} ××§'`}function pe({watch:a}){const r=a.content,l=r.thumbnail_horizontal||r.thumbnail_vertical,i=(r.duration_minutes||120)*60,c=Math.min(a.timestamp_seconds/i*100,95),n=i-a.timestamp_seconds;return e.jsxs(re,{to:z(r),className:"shrink-0 w-60 group",style:{minWidth:"240px"},children:[e.jsxs("div",{className:"relative overflow-hidden bg-card",style:{borderRadius:"4px",aspectRatio:"16/9"},children:[l?e.jsx("img",{src:C(l,320,180),alt:r.title,width:240,height:135,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"w-full h-full bg-secondary flex items-center justify-center",children:e.jsx(L,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:e.jsx("div",{className:"w-12 h-12 bg-white/20 backdrop-blur-sm border border-white/40 rounded-full flex items-center justify-center",children:e.jsx(L,{className:"w-5 h-5 text-white fill-white ml-0.5"})})}),e.jsxs("div",{className:"absolute top-2 left-2 px-2 py-0.5 bg-black/70 backdrop-blur-sm text-white text-[10px] font-semibold rounded border border-white/10",children:["× ××ª×¨× ",Y(n)]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-white/20",children:e.jsx("div",{className:"h-full bg-red-600 transition-all",style:{width:`${c}%`}})})]}),e.jsxs("div",{className:"mt-2 px-0.5",children:[e.jsx("h3",{className:"text-xs font-semibold text-white/90 leading-snug line-clamp-1",children:r.title}),e.jsxs("p",{className:"text-[10px] text-white/40 mt-0.5",children:["עצרת ×-",Y(a.timestamp_seconds)]})]})]})}function Z({title:a,items:r,cardSize:l="md",fillRow:i=!1,viewAllUrl:c}){const n=m.useRef(null),d=S(),f=a==="סר×× ××× ×ס ××× ××××",[x,o]=m.useState(!1),h=m.useRef({startX:0,scrollLeft:0,moved:!1}),w=u=>{const p=n.current;p&&p.scrollBy({left:u==="left"?-320:320,behavior:"smooth"})},s=u=>{u.preventDefault(),d(c||`/category/${encodeURIComponent(a)}`)},t=u=>{const p=n.current;p&&(u.target.closest("a, button")||(o(!0),h.current={startX:u.pageX-p.offsetLeft,scrollLeft:p.scrollLeft,moved:!1}))},y=m.useCallback(u=>{if(!x)return;const p=n.current;
11if(!p)return;u.preventDefault();const N=u.pageX-p.offsetLeft-h.current.startX;Math.abs(N)>4&&(h.current.moved=!0),p.scrollLeft=h.current.scrollLeft-N},[x]),j=m.useCallback(()=>{o(!1),setTimeout(()=>{h.current&&(h.current.moved=!1)},0)},[]),M=u=>{h.current.moved&&(u.preventDefault(),u.stopPropagation())};return r!=null&&r.length?f?e.jsx("div",{className:"mb-16 mx-6 md:mx-10 group/carousel relative",dir:"rtl",style:{overflow:"visible"},children:e.jsxs("div",{className:"rounded-2xl border border-emerald-500/30 overflow-hidden",style:{background:"linear-gradient(180deg, rgba(16,46,32,0.4) 0%, rgba(10,10,10,0.9) 100%)"},children:[e.jsxs("div",{className:"flex flex-col items-center justify-center py-4 border-b border-emerald-500/20 relative",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-500/20 border border-emerald-500/50 flex items-center justify-center",children:e.jsx(ue,{className:"w-4 h-4 text-emerald-400"})}),e.jsx("h2",{className:"text-lg md:text-xl font-black text-white",children:a})]}),e.jsx("p",{className:"text-[11px] text-emerald-400/80 font-medium mt-1",children:"××× ×ס ××× ×× ×ר×××©× ×ª×× ×× ×פ××פ×ר××"}),e.jsx("a",{href:"#",onClick:s,className:"absolute left-4 top-1/2 -translate-y-1/2 text-emerald-400 text-xs font-medium hover:underline",children:"××¦× ××× âº"})]}),e.jsxs("div",{className:"relative my-4",children:[e.jsx("button",{onClick:()=>w("right"),"aria-label":"×××× ×××× ×",className:"absolute right-3 top-1/2 -translate-y-1/2 z-20 w-12 h-12 rounded-full flex items-center justify-center bg-black/50 backdrop-blur-sm border border-emerald-400/30 text-emerald-300 hover:bg-black/70 hover:text-emerald-200 hover:border-emerald-400/60 transition-all carousel-arrow-btn cursor-pointer",children:e.jsx(F,{className:"w-6 h-6"})}),e.jsx("button",{onClick:()=>w("left"),"aria-label":"×××× ×©××××",className:"absolute left-3 top-1/2 -translate-y-1/2 z-20 w-12 h-12 rounded-full flex items-center justify-center bg-black/50 backdrop-blur-sm border border-emerald-400/30 text-emerald-300 hover:bg-black/70 hover:text-emerald-200 hover:border-emerald-400/60 transition-all carousel-arrow-btn cursor-pointer",children:e.jsx(P,{className:"w-6 h-6"})}),e.jsx("div",{ref:n,onMouseDown:t,onMouseMove:y,onMouseUp:j,onMouseLeave:j,onClickCapture:M,className:"flex gap-2.5 overflow-x-auto px-4 md:px-6 select-none",style:{scrollbarWidth:"none",msOverflowStyle:"none",cursor:x?"grabbing":"grab"},children:r.map(u=>e.jsx(K,{item:u,size:i?"fill":l,showTitle:!1},u.id))})]})]})}):e.jsxs("div",{className:"mb-8 group/carousel relative",dir:"rtl",style:{overflow:"visible"},children:[e.jsxs("div",{className:"mb-5 px-6 md:px-10",children:[e.jsx("div",{className:"mb-4 h-px w-full bg-gradient-to-l from-transparent via-white/10 to-transparent"}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-1.5 h-6 rounded-full bg-primary/70 shadow-[0_0_8px_rgba(20,120,120,0.5)]"}),e.jsx("h2",{className:"text-xl md:text-2xl font-black text-white tracking-tight",children:a}),e.jsx("a",{href:"#",onClick:s,className:"text-primary text-xs font-medium hover:underline",children:"××¦× ××× âº"})]})})]}),e.jsxs("div",{className:"relative mb-2",children:[e.jsx("button",{onClick:()=>w("right"),"aria-label":"×××× ×××× ×",className:"absolute right-3 top-1/2 -translate-y-1/2 z-20 w-12 h-12 rounded-full flex items-center justify-center bg-black/50 backdrop-blur-sm border border-white/15 text-white hover:bg-black/70 hover:text-white hover:border-white/40 transition-all carousel-arrow-btn cursor-pointer",children:e.jsx(F,{className:"w-6 h-6"})}),e.jsx("button",{onClick:()=>w("left"),"aria-label":"×××× ×©××××",className:"absolute left-3 top-1/2 -translate-y-1/2 z-20 w-12 h-12 rounded-full flex items-center justify-center bg-black/50 backdrop-blur-sm border border-white/15 text-white hover:bg-black/70 hover:text-white hover:border-white/40 transition-all carousel-arrow-btn cursor-pointer",children:e.jsx(P,{className:"w-6 h-6"})}),e.jsx("div",{ref:n,onMouseDown:t,onMouseMove:y,onMouseUp:j,onMouseLeave:j,onClickCapture:M,className:"flex gap-2.5 overflow-x-auto px-6 md:px-10 select-none",style:{scrollbarWidth:"none",msOverflowStyle:"none",cursor:x?"grabbing":"grab"},children:r.map(u=>e.jsx(K,{item:u,size:i?"fill":l,showTitle:!1},u.id))})]})]}):null}function I({section:a}){const r=ie(a.filtered,a.title);return r.length===0?null:e.jsx(Z,{title:a.title,items:r,fillRow:a.title==="סר×× × ×©××"||a.title==="× ×§×× ×××××ת"})}function D({children:a,minHeight:r=280}){const[l,i]=m.useState(!1),c=m.useRef(null);return m.useEffect(()=>{const n=c.current;if(!n)return;const d=new IntersectionObserver(f=>{f[0].isIntersecting&&(i(!0),d.disconnect())},{rootMargin:"300px"});return d.observe(n),()=>d.disconnect()},[]),l?a:e.jsxs("div",{ref:c,style:{minHeight:r},className:"mb-10 px-6 md:px-10",children:[e.jsx("div",{className:"h-5 w-40 bg-secondary/50 rounded animate-pulse mb-4"}),e.jsx("div",{className:"flex gap-1.5 overflow-hidden",children:Array.from({length:6}).map((n,d)=>e.jsx("div",{className:"shrink-0 w-60 bg-secondary/40 rounded animate-pulse",style:{aspectRatio:"16/9",minWidth:"240px"}},d))})]})}const be="https://media.base44.com/images/public/6a17491cf769054c50754fbe/131292494_.png",T="6a4798f0cf1868f71d228dce";function fe(){var l;const a=S(),{data:r}=_({queryKey:["product",T],queryFn:()=>k.entities.Product.get(T),staleTime:300*1e3});return e.jsx("div",{className:"w-full px-4 md:px-8 py-1",dir:"rtl",children:e.jsxs("button",{onClick:()=>a(`/bundle/${T}`),className:"relative block w-full max-w-[1400px] mx-auto rounded-lg overflow-hidden shadow-2xl shadow-black/50 hover:scale-[1.01] transition-transform duration-300",children:[e.jsx("img",{src:C(be,640,131),alt:"120 סר×× ×ר××××× ×××× ×§× ××× - 650 ש״×",width:1024,height:209,className:"w-full h-auto",style:{aspectRatio:"1024 / 209"},loading:"lazy",decoding:"async"}),((l=r==null?void 0:r.promotion_tags)==null?void 0:l.length)>0&&e.jsx("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10 flex flex-col items-end gap-1.5",children:r.promotion_tags.map((i,c)=>e.jsx("span",{className:"text-[10px] sm:text-xs font-bold px-2.5 py-1 rounded-full text-white shadow-lg",style:{backgroundColor:i.color},children:i.text},c))})]})})}const ge="https://media.base44.com/images/public/6a17491cf769054c50754fbe/e1c96e653_.png",E="6a26df650d68c31ad3e1e9c2";function ve(){var l;const a=S(),{data:r}=_({queryKey:["product",E],queryFn:()=>k.entities.Product.get(E),staleTime:300*1e3});return e.jsx("div",{className:"w-full",dir:"rtl",children:e.jsxs("button",{onClick:()=>a(`/bundle/${E}`),className:"relative block w-full max-w-[1400px] mx-auto overflow-hidden",children:[e.jsx("img",{src:C(ge,640,131),alt:"×× ×§×× ××××××ת - ×× ×ס××¨× ×-150 ש״×",width:1024,height:209,className:"w-full h-auto block",style:{aspectRatio:"1024 / 209"},loading:"lazy",decoding:"async"}),((l=r==null?void 0:r.promotion_tags)==null?void 0:l.length)>0&&e.jsx("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10 flex flex-col items-end gap-1.5",children:r.promotion_tags.map((i,c)=>e.jsx("span",{className:"text-[10px] sm:text-xs font-bold px-2.5 py-1 rounded-full text-white shadow-lg",style:{backgroundColor:i.color},children:i.text},c))})]})})}let ee=0;const Q=a=>{try{ee=a||0}catch{}},we=()=>ee;function Se(){S();const a=ae(),{addItem:r}=le();oe({fullTitle:"×ר××××ס | סר××× ×ת××× ××××× ×¢×¨××",description:"פ××פ×ר×ת ×ס×ר×××× × ××××××× ×סר××× ×שר××××, ס×ר×ת ××××××ת ×ת××× ×¢×¨×× ××× ××שפ××. ×¦×¤× ×¢×ש×× ××××ת סר××× ×××××ת HD."});const l=s=>{const t=s.sale_price&&parseFloat(s.sale_price)<parseFloat(s.base_price),y=parseFloat(t?s.sale_price:s.base_price);r({key:`product_${s.id}`,name:s.name,price:y,type_label:s.type==="subscription"?"×× ××":s.type==="bundle"?"×××××"
11:"××צר",product_id:s.id,allow_multiple_quantity:!!s.allow_multiple_quantity,image_url:s.banner_image_url||s.image_url})},{data:i=[],isLoading:c,isError:n}=_({queryKey:["content","published"],queryFn:()=>k.entities.Content.filter({status:"published"}),staleTime:300*1e3}),{data:d=[]}=_({queryKey:["products","featured"],queryFn:()=>k.entities.Product.filter({status:"published",is_featured:!0}),staleTime:300*1e3}),{data:f=[]}=_({queryKey:["homeSections"],queryFn:()=>k.entities.HomeSection.list("sort_order"),staleTime:300*1e3}),x=m.useMemo(()=>i.filter(s=>s.is_featured),[i]),o=m.useMemo(()=>{const s=d.map(t=>({...t,_isProduct:!0,title:t.name,description:t.description,thumbnail_horizontal:t.banner_image_url||t.image_url,hero_image_url:t.banner_image_url||t.image_url}));return[...x,...s]},[x,d]),h=m.useMemo(()=>(f.length>0?f:[]).filter(s=>s.is_active),[f]),w=m.useMemo(()=>h.map(s=>{const y=[...i.filter(j=>(j.sections||[]).includes(s.id))].sort((j,M)=>j.id.localeCompare(M.id));return{...s,filtered:y}}),[h,i]);return m.useEffect(()=>{if(i.length&&a==="POP"){const s=we();s>0&&requestAnimationFrame(()=>window.scrollTo(0,s))}},[i.length,a]),m.useEffect(()=>{let s=0;const t=()=>{s||(s=requestAnimationFrame(()=>{Q(window.scrollY),s=0}))};return window.addEventListener("scroll",t,{passive:!0}),()=>{s&&cancelAnimationFrame(s),Q(window.scrollY),window.removeEventListener("scroll",t)}},[]),c?e.jsxs("div",{className:"bg-background min-h-screen",children:[e.jsx("div",{className:"hero-section relative w-full",style:{height:"80vh",minHeight:560},children:e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-secondary to-background animate-pulse"})}),e.jsx("div",{className:"mt-2 px-4 space-y-8",children:[1,2,3].map(s=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 w-32 bg-muted rounded animate-pulse"}),e.jsx("div",{className:"flex gap-3 overflow-hidden",children:[1,2,3,4,5,6].map(t=>e.jsxs("div",{className:"shrink-0 w-[240px]",children:[e.jsx("div",{className:"aspect-video bg-muted rounded-xl animate-pulse",style:{aspectRatio:"16/9"}}),e.jsx("div",{className:"mt-2 h-4 w-3/4 bg-muted rounded animate-pulse"})]},t))})]},s))})]}):n||!i.length?e.jsxs("div",{className:"bg-background min-h-screen flex flex-col items-center justify-center gap-2",dir:"rtl",children:[e.jsx("p",{className:"text-lg font-bold text-white",children:n?"×××¨×¢× ×©×××× ×××¢×× ×ª ×ת×××":"××× ×ª××× ×××× ×ר××¢"}),e.jsx("p",{className:"text-white/40 text-sm",children:n?"× ×¡× ××¨×¢× × ×ת ×××£":"×××¨× ×קר××"})]}):e.jsxs("div",{className:"bg-background min-h-screen",children:[o.length>0&&e.jsx("div",{className:"pt-4",children:e.jsx(V,{items:o,onProductClick:l})}),e.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-3 pt-6 pb-2 px-4",dir:"rtl",children:[e.jsxs("a",{href:"https://grovais-event-hub.base44.app",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2.5 px-6 py-3 rounded-full bg-primary/15 border border-primary/40 text-primary font-bold text-sm hover:bg-primary/25 hover:border-primary/70 transition-all duration-200 shadow-lg shadow-primary/10",children:[e.jsx(de,{className:"w-5 h-5 transition-transform group-hover:scale-110"}),"×××¢×× ××§×¨× ×ת ××¡×¨× ×××× ××××ת"]}),e.jsxs("a",{href:"https://secure-drive-pass.base44.app",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2.5 px-6 py-3 rounded-full bg-emerald-500/15 border border-emerald-500/40 text-emerald-300 font-bold text-sm hover:bg-emerald-500/25 hover:border-emerald-500/70 transition-all duration-200 shadow-lg shadow-emerald-500/10",children:[e.jsx(ne,{className:"w-5 h-5 transition-transform group-hover:scale-110"}),"פתר×× ××××§ ××××ש×ר×× ××שר××"]})]}),e.jsx("div",{className:"mt-6",children:e.jsx(xe,{})}),e.jsxs("div",{className:"pb-4",children:[w.slice(0,3).map(s=>e.jsx(D,{children:e.jsx(I,{section:s})},s.id)),e.jsx("div",{className:"my-10",children:e.jsx(ve,{})}),w.slice(3,-3).map(s=>e.jsx(D,{children:e.jsx(I,{section:s})},s.id)),e.jsx("div",{className:"my-10",children:e.jsx(fe,{})}),w.slice(-3).map(s=>e.jsx(D,{children:e.jsx(I,{section:s})},s.id))]}),e.jsx("div",{className:"h-8 w-full",style:{background:"linear-gradient(to bottom, hsl(222 48% 8%), hsl(188 58% 14%))"}}),o.length>0&&e.jsx("div",{className:"pb-10",style:{background:"hsl(188 58% 14%)"},children:e.jsx(V,{items:o,onProductClick:l})}),e.jsx("div",{className:"pb-10",children:e.jsx(D,{children:e.jsx(Z,{title:"×× ×סר×××",items:i.slice(0,40),cardSize:"md",viewAllUrl:"/all-movies"})})})]})}export{Se as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.