PageSourceSearch

https://halal.or.id/_next/static/chunks/app/(public)/products/page-6e4645e1a7634504.js

js halal.or.id collected 2026-09-27 02:50:05 UTC 8,764 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2788],{4887:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var s=r(5155),i=r(2619),o=r.n(i);function l(e){let{id:t,title:r,description:i,price:l,category_name:n,warranty_days:a=0,available_stock:d,total_sold:x,image_url:c}=e,p=Math.round(5*l),f=Math.round((p-l)/p*100),h=[];a>0?h.push("".concat(a," HARI")):h.push("NEW");let u=e=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0}).format(e);return(0,s.jsxs)("div",{style:{backgroundColor:"#ffffff",borderRadius:"16px",overflow:"hidden",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",border:"1px solid #f1f5f9",display:"flex",flexDirection:"column",height:"100%",transition:"box-shadow 0.3s ease"},children:[(0,s.jsxs)("div",{style:{position:"relative",aspectRatio:"4/3",overflow:"hidden",backgroundColor:"#f1f5f9"},children:[(0,s.jsx)("img",{src:c||"/assets/default_image.png",alt:r,style:{width:"100%",height:"100%",objectFit:"cover",transition:"transform 0.7s ease"},onError:e=>{e.currentTarget.src="/assets/default_image.png"}}),(0,s.jsx)("div",{style:{position:"absolute",top:"16px",left:"16px",display:"flex",flexWrap:"wrap",gap:"8px"},children:h.map((e,t)=>(0,s.jsx)("span",{style:{padding:"4px 12px",borderRadius:"8px",fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",backgroundColor:"NEW"===e?"#ef4444":"rgba(255,255,255,0.9)",color:"NEW"===e?"#ffffff":"#0f172a"},children:e},t))})]}),(0,s.jsxs)("div",{style:{padding:"20px",display:"flex",flexDirection:"column",flexGrow:1},children:[(0,s.jsxs)("div",{style:{fontSize:"0.75rem",color:"#94a3b8",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},children:["Stock ",d," | Sold ",x]}),(0,s.jsx)("h3",{style:{fontSize:"1.125rem",fontWeight:700,color:"#0f172a",marginBottom:"8px",lineHeight:1.4,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:r}),(0,s.jsxs)("p",{style:{fontSize:"0.875rem",color:"#64748b",marginBottom:"8px"},children:["A course by ",(0,s.jsx)("span",{style:{color:"#059669",fontWeight:500},children:"multiple teachers"})]}),(0,s.jsxs)("p",{style:{fontSize:"0.875rem",color:"#94a3b8",marginBottom:"16px",flexGrow:1,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:[(i?i.replace(/<[^>]*>/g,""):"").substring(0,100),"..."]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px"},children:[f>0&&(0,s.jsxs)("span",{style:{color:"#ef4444",fontWeight:700,fontSize:"0.875rem"},children:[f,"% Disc."]}),p>l&&(0,s.jsx)("span",{style:{color:"#94a3b8",fontSize:"0.875rem",textDecoration:"line-through"},children:u(p)})]}),(0,s.jsxs)(o(),{href:"/products/".concat(t),style:{width:"100%",backgroundColor:"#059669",color:"#ffffff",fontWeight:700,padding:"12px 16px",borderRadius:"12px",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textDecoration:"none",transition:"background-color 0.2s ease"},children:[(0,s.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),(0,s.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,s.jsx)("path",{d:"M16 10a4 4 0 0 1-8 0"})]}),"Buy ",u(l)]})]})]})}},8672:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var s=r(5155),i=r(2115),o=r(3750),l=r(1461),n=r(4887),a=r(4649);function d(){let[e,t]=(0,i.useState)(!1),[r,d]=(0,i.useState)([]),[x,c]=(0,i.useState)(!0),[p,f]=(0,i.useState)(!1),[h,u]=(0,i.useState)(null),[g,m]=(0,i.useState)(1),y=(0,i.useRef)(null);(0,i.useRef)(null),(0,i.useEffect)(()=>{j(1,!0)},[]);let j=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{t?c(!0):f(!0);let r=await a.T.getProducts({page:e,limit:8,sort:"newest"});t?d(r.products):d(e=>[...e,...r.products]),u(r.pagination),m(e)}catch(e){console.error("Error fetching products:",e)}finally{c(!1),f(!1)}},b=(0,i.useCallback)(e=>{x||p||(y.current&&y.current.disconnect(),y.current=new IntersectionObserver(e=>{e[0].isIntersecting&&(null==h?void 0:h.hasNext)&&j(g+1,!1)},{threshold:.1,rootMargin:"100px"}),e&&y.current.observe(e))},[x,p,h,g]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{}),(0,s.jsx)("div",{style:{backgroundColor:"#f8fafc",minHeight:"100vh",paddingTop:"96px",paddingBottom:"80px"},children:(0,s.jsxs)("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"0 16px"},children:[(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"16px",marginBottom:"40px"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{style:{fontSize:"2rem",fontWeight:900,color:"#0f172a",marginBottom:"8px"},children:"All Products"}),(0,s.jsxs)("p",{style:{color:"#64748b"},children:["Get access to the best ",(0,s.jsx)("span",{style:{textDecoration:"underline",textDecorationColor:"#10b981",textUnderlineOffset:"4px",fontWeight:600,color:"#334155"},children:"Online courses for creative professionals"}),".",h&&(0,s.jsxs)("span",{style:{marginLeft:"8px",fontSize:"0.875rem",color:"#94a3b8"},children:["(",h.total," products)"]})]})]}),(0,s.jsxs)("button",{onClick:()=>t(!e),style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 20px",border:"1px solid #e2e8f0",borderRadius:"12px",backgroundColor:"#ffffff",fontWeight:500,fontSize:"0.875rem",cursor:"pointer",width:"fit-content"},children:[(0,s.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),(0,s.jsx)("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),(0,s.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),(0,s.jsx)("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),(0,s.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),(0,s.jsx)("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),(0,s.jsx)("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),(0,s.jsx)("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]}),"Filters"]})]}),(0,s.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"24px"},children:x?Array.from({length:8}).map((e,t)=>(0,s.jsxs)("div",{style:{backgroundColor:"#ffffff",borderRadius:"16px",overflow:"hidden",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",border:"1px solid #f1f5f9"},children:[(0,s.jsx)("div",{style:{aspectRatio:"4/3",backgroundColor:"#e2e8f0"}}),(0,s.jsxs)("div",{style:{padding:"20px"},children:[(0,s.jsx)("div",{style:{height:"16px",backgroundColor:"#e2e8f0",borderRadius:"4px",marginBottom:"8px",width:"50%"}}),(0,s.jsx)("div",{style:{height:"24px",backgroundColor:"#e2e8f0",borderRadius:"4px",marginBottom:"8px"}}),(0,s.jsx)("div",{style:{height:"16px",backgroundColor:"#e2e8f0",borderRadius:"4px",marginBottom:"16
1px",width:"75%"}}),(0,s.jsx)("div",{style:{height:"48px",backgroundColor:"#e2e8f0",borderRadius:"12px"}})]})]},t)):r.map((e,t)=>(0,s.jsx)("div",{ref:t===r.length-1?b:null,style:{height:"100%"},children:(0,s.jsx)(n.A,{id:e.id,title:e.title,description:e.description,price:e.price,category_name:e.category_name,warranty_days:e.warranty_days,available_stock:e.available_stock,total_sold:e.total_sold,image_url:e.image_url})},e.id))}),p&&(0,s.jsx)("div",{className:"flex justify-center py-8",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 text-slate-500",children:[(0,s.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,s.jsx)("span",{children:"Loading more products..."})]})}),!x&&h&&!h.hasNext&&r.length>0&&(0,s.jsx)("div",{className:"flex justify-center py-12",children:(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"You've reached the end of products"})}),!x&&0===r.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,s.jsxs)("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",className:"text-slate-300 mb-4",children:[(0,s.jsx)("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),(0,s.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,s.jsx)("path",{d:"M16 10a4 4 0 0 1-8 0"})]}),(0,s.jsx)("p",{className:"text-slate-500 text-lg font-medium",children:"No products available"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Check back later for new products"})]})]})}),(0,s.jsx)(l.A,{})]})}},9210:(e,t,r)=>{Promise.resolve().then(r.bind(r,8672))}},e=>{e.O(0,[2619,7050,8441,1255,7358],()=>e(e.s=9210)),_N_E=e.O()}]);

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.