PageSourceSearch

https://solarmait.com/_next/static/chunks/app/(home)/products/page-2e23583904c9cb73.js

js solarmait.com collected 2026-10-04 03:04:43 UTC 51,913 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[155],{10671:function(e,t,a){Promise.resolve().then(a.bind(a,68702))},68702:function(e,t,a){"use strict";a.d(t,{default:function(){return X}});var s=a(57437),r=a(2265),l=a(87833),n=a(63433),i=a(48614),o=a(49089),c=a(99376),d=a(88231),x=a(43917),m=a(27648),u=a(94242),p=a(28199),b=a(7653),g=a(62492),f=a(18655);let h=Object.fromEntries(p.Zy.filter(e=>e.apiValue).map(e=>[e.apiValue,e.label]));var y=e=>{var t,a;let{product:n}=e,{user:i,setUserAndSync:c}=(0,b.a)(),[x,p]=(0,r.useState)(!1),y=(0,f.R)(null==i?void 0:i.cart,n._id),j=async e=>{if(e.preventDefault(),e.stopPropagation(),!i){u.Am.error("Please log in to add items to your cart.");return}p(!0);try{let e=await d.axiosInstance.post("/products/add-to-cart/".concat(n._id));e.data.success&&(c({...i,cart:(0,f.$)(e.data.cart)}),u.Am.success("Added to cart!"))}catch(e){console.error("Error adding to cart:",e),u.Am.error("Failed to add product to cart.")}finally{p(!1)}},v=async e=>{if(e.preventDefault(),e.stopPropagation(),i){p(!0);try{let e=await d.axiosInstance.post("/products/remove-from-cart/".concat(n._id));e.data.success&&(c({...i,cart:(0,f.$)(e.data.cart)}),u.Am.success("Removed from cart."))}catch(e){console.error("Error removing from cart:",e),u.Am.error("Failed to remove product from cart.")}finally{p(!1)}}},N=!0===n.isSolarKit||"solarkit"===n.category,w=n.category?null!==(a=h[n.category])&&void 0!==a?a:n.category:null,k=(N?(0,g.zd)(n):null)||(null===(t=n.product_images)||void 0===t?void 0:t[0])||n.cover_image||"/default-product.png",S=N?(0,g.nL)(n.solarKitCategory):null,E=N?(0,g.PE)(n):0,C=(0,g.M3)(n),I=C<(Number(n.price)||0);return(0,s.jsxs)(l.E.div,{className:"bg-white rounded-2xl border border-gray-100 overflow-hidden flex flex-col h-full group",style:{boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},whileHover:{y:-4,boxShadow:"0 16px 40px rgba(245,158,11,0.13)"},transition:{duration:.22},children:[(0,s.jsxs)(m.default,{href:"/products/".concat(n._id),className:"block relative overflow-hidden bg-gray-50 flex-shrink-0",style:{height:200},children:[(0,s.jsx)("div",{className:"absolute top-0 left-0 right-0 h-0.5 bg-gradient-to-r from-amber-400 to-yellow-300 z-10"}),(0,s.jsx)("img",{src:k,alt:n.name,loading:"lazy",decoding:"async",className:"w-full h-full object-contain p-4 transition-transform duration-500 group-hover:scale-105"}),w&&(0,s.jsxs)("span",{className:"absolute top-3 left-3 z-10 flex items-center gap-1 bg-white/90 backdrop-blur-sm text-[10px] font-bold text-amber-700 border border-amber-200 rounded-full px-2 py-0.5 shadow-sm",children:[N?(0,s.jsx)(o.ZUW,{className:"text-[8px] text-sky-500"}):(0,s.jsx)(o.fxx,{className:"text-[8px] text-amber-400"}),w]}),S&&n.solarKitCategory&&(0,s.jsxs)("span",{className:"absolute top-3 right-3 z-10 flex items-center gap-1.5 bg-white/90 backdrop-blur-sm text-[10px] font-bold rounded-full px-2 py-0.5 shadow-sm border ".concat(S.border," ").concat(S.text),children:[(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(S.dot)}),S.label]}),(0,s.jsx)("div",{className:"absolute inset-0 bg-amber-400/0 group-hover:bg-amber-400/6 transition-all duration-300 flex items-center justify-center",children:(0,s.jsxs)("span",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-white/95 backdrop-blur-sm rounded-full px-4 py-2 flex items-center gap-2 text-xs font-bold text-gray-800 shadow-lg",children:[(0,s.jsx)(o.dSq,{className:"text-amber-500"})," View Details"]})})]}),(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1",children:[(0,s.jsx)("h3",{className:"font-bold text-gray-900 text-sm leading-snug line-clamp-2 mb-1.5",children:n.name}),N&&E>0&&(0,s.jsxs)("p",{className:"text-[10px] font-semibold text-sky-600 mb-1.5",children:[E," component",1!==E?"s":""," included"]}),n.description&&(0,s.jsx)("p",{className:"text-gray-400 text-xs leading-relaxed line-clamp-2 mb-3",children:n.description}),(0,s.jsxs)("div",{className:"mt-auto mb-4",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-0.5",children:[(0,s.jsx)(o.t9y,{className:"text-amber-500 text-xs mt-0.5 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xl font-extrabold text-gray-900 leading-none",children:C.toLocaleStr
1ing("en-IN")}),(0,s.jsx)("span",{className:"text-[10px] text-gray-400 ml-1",children:"incl. GST"})]}),I&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,s.jsxs)("span",{className:"text-[11px] text-gray-400 line-through",children:["₹",Number(n.price).toLocaleString("en-IN")]}),(0,s.jsxs)("span",{className:"text-[10px] font-bold text-emerald-700 bg-emerald-50 border border-emerald-200 rounded px-1.5 py-0.5",children:["Save ₹",(Number(n.price)-C).toLocaleString("en-IN")]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(m.default,{href:"/products/".concat(n._id),className:"block",children:(0,s.jsxs)(l.E.div,{className:"w-full flex items-center justify-center gap-2 bg-amber-400 hover:bg-amber-500 text-gray-900 font-bold text-xs py-2.5 rounded-xl transition-colors cursor-pointer shadow-sm shadow-amber-200",whileTap:{scale:.97},children:[(0,s.jsx)(o.dSq,{className:"text-xs"})," View Details"]})}),N&&(0,s.jsx)(m.default,{href:(0,g.tc)(n._id),className:"block",children:(0,s.jsxs)(l.E.div,{className:"w-full flex items-center justify-center gap-2 border-2 border-sky-200 bg-sky-50 hover:bg-sky-100 hover:border-sky-300 text-sky-700 font-bold text-xs py-2.5 rounded-xl transition-all cursor-pointer",whileTap:{scale:.97},children:[(0,s.jsx)(o.pno,{className:"text-xs"})," Compare this kit"]})}),(0,s.jsxs)(l.E.button,{type:"button",onClick:y?v:j,disabled:x,whileTap:{scale:.97},className:"w-full flex items-center justify-center gap-2 font-bold text-xs py-2.5 rounded-xl transition-all cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed ".concat(y?"border-2 border-red-200 bg-red-50 hover:bg-red-100 hover:border-red-300 text-red-700":"border-2 border-amber-300 bg-white hover:bg-amber-50 text-amber-700"),children:[x?(0,s.jsx)(o.fCD,{className:"text-xs animate-spin"}):(0,s.jsx)(o.FeP,{className:"text-xs"}),y?"Remove from Cart":"Add to Cart"]}),(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsxs)("a",{href:"tel:+918448446252",className:"flex-1 flex items-center justify-center gap-1.5 border-2 border-emerald-200 bg-emerald-50 hover:bg-emerald-100 hover:border-emerald-300 text-emerald-700 font-bold text-xs py-2.5 rounded-xl transition-all",children:[(0,s.jsx)(o.I7T,{className:"text-[10px]"})," Call"]}),(0,s.jsxs)("a",{href:"https://wa.me/918448446252",target:"_blank",rel:"noopener noreferrer",className:"flex-1 flex items-center justify-center gap-1.5 border-2 border-green-200 bg-green-50 hover:bg-green-100 hover:border-green-300 text-green-700 font-bold text-xs py-2.5 rounded-xl transition-all",children:[(0,s.jsx)(o.xpo,{className:"text-[11px]"})," WhatsApp"]})]}),(0,s.jsx)("p",{className:"text-center text-[10px] text-gray-400 font-medium",children:"+91 844-844-6252"})]})]})]})},j=a(2069),v=a(35389),N=a(67208),w=a(5002),k=a(97494),S=a(36137),E=a(64411),C=()=>{let[e,t]=(0,r.useState)(null),[a,l]=(0,r.useState)(!0),n=(0,c.useRouter)(),{defaultAddress:i,setDefaultAddressAndSync:o}=(0,b.a)();return((0,r.useEffect)(()=>{(async()=>{try{let e=await d.axiosInstance.get("/order/address/default-address/");if(e.data.success&&e.data.address.length>0){let a=e.data.address[0];t(a),i!==a._id&&o(a._id)}else t(null)}catch(e){console.error("Failed to fetch default address:",e)}finally{l(!1)}})()},[i,o]),a)?(0,s.jsx)(j.Z,{sx:{display:"flex",justifyContent:"center",my:3},children:(0,s.jsx)(v.Z,{})}):(0,s.jsxs)(N.Z,{sx:{padding:2,mb:3},children:[(0,s.jsx)(w.Z,{variant:"h6",fontWeight:"bold",children:"Delivering to"}),(0,s.jsx)(k.Z,{sx:{my:2}}),(0,s.jsxs)(S.Z,{children:[e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.Z,{variant:"body1",fontWeight:"bold",children:e.concernedPersonName}),(0,s.jsxs)(w.Z,{variant:"body2",children:[e.addressLine1,", ",e.addressLine2,","," ",e.city,", ",e.state,","," ",e.pinCode,", ",e.country]}),(0,s.jsxs)(w.Z,{variant:"body2",color:"text.secondary",children:["Contact: ",e.concernedPersonContact]})]}):(0,s.jsx)(w.Z,{variant:"body2",color:"error",children:"No default address found. Please add one."}),(0,s.jsx)(j.Z,{sx:{mt:2},children:(0,s.jsx)(E.Z,{variant:"text",onClick:()=>{n.push("/profile/addresses")},children:"Change Address"})})]})]})},I=a(45121),A=a(40257);
1let P={amc:{pill:"bg-amber-100 text-amber-700 border-amber-200",dot:"#f59e0b",Icon:o.bri},inspection:{pill:"bg-blue-100 text-blue-700 border-blue-200",dot:"#3b82f6",Icon:o.U41},repair:{pill:"bg-red-100 text-red-700 border-red-200",dot:"#ef4444",Icon:o.LDL},cleaning:{pill:"bg-emerald-100 text-emerald-700 border-emerald-200",dot:"#10b981",Icon:o.LDL},default:{pill:"bg-orange-100 text-orange-700 border-orange-200",dot:"#f97316",Icon:o.LDL}},_=e=>{var t;return null!==(t=P[e.toLowerCase()])&&void 0!==t?t:P.default};var T=e=>{let{service:t}=e,[a,n]=(0,r.useState)(!1),{user:c,defaultAddress:x}=(0,b.a)(),[,m]=(0,r.useState)(null),[u,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=document.createElement("script");e.src="https://checkout.razorpay.com/v1/checkout.js",e.async=!0,document.body.appendChild(e)},[]);let g=async(e,t)=>{try{(await d.axiosInstance.put("/services/booking/verify",{razorpay_orderID:t,razorpay_paymentID:e.razorpay_payment_id,razorpay_signature:e.razorpay_signature})).data.success?(alert("Payment successful! Your service is booked."),n(!1)):alert("Payment verification failed.")}catch(e){console.error("Verification failed",e),alert("An error occurred while verifying payment.")}},f=async()=>{if(!x){alert("Please select an address first.");return}p(!0);try{let{success:e,booking:a}=(await d.axiosInstance.post("/services/booking/create",{service:t._id,address:x})).data;if(!e||!a){alert("Failed to create order. Please try again.");return}m(a);let{razorpay_order:s}=a,r={key:A.env.NEXT_PUBLIC_RAZORPAY_KEY_ID||"",amount:s.amount_due.toString(),currency:"INR",name:"SolarMait Service",description:t.name,order_id:s.id,handler:async e=>{await g(e,s.id)},prefill:{name:(null==c?void 0:c.name)||"",email:(null==c?void 0:c.email)||""},theme:{color:"#f59e0b"}};new window.Razorpay(r).open()}catch(e){console.error("Payment initiation failed",e),alert("Failed to initiate payment.")}finally{p(!1)}},h=_(t.category),y=h.Icon;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.E.div,{className:"bg-white rounded-2xl border border-gray-100 overflow-hidden flex flex-col h-full",style:{boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},whileHover:{y:-6,boxShadow:"0 18px 44px rgba(245,158,11,0.14)"},transition:{duration:.25},children:[(0,s.jsx)("div",{className:"h-1 rounded-t-2xl",style:{background:"linear-gradient(90deg, ".concat(h.dot,", ").concat(h.dot,"80)")}}),(0,s.jsxs)("div",{className:"p-5 flex flex-col flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"".concat(h.dot,"15"),border:"1.5px solid ".concat(h.dot,"30")},children:(0,s.jsx)(y,{style:{color:h.dot,fontSize:"1rem"}})}),(0,s.jsx)("span",{className:"inline-block text-[9px] font-bold uppercase tracking-wide rounded-full px-2.5 py-0.5 border ".concat(h.pill),children:t.category})]}),(0,s.jsx)("h3",{className:"font-bold text-gray-900 text-sm leading-snug line-clamp-2 mb-2",children:t.name}),(0,s.jsx)("p",{className:"text-gray-400 text-xs leading-relaxed line-clamp-3 mb-4",children:t.description}),(0,s.jsxs)("div",{className:"flex items-baseline gap-1 mt-auto mb-4",children:[(0,s.jsx)(o.t9y,{className:"text-amber-500 text-sm"}),(0,s.jsx)("span",{className:"text-xl font-extrabold text-gray-900",children:t.price.toLocaleString("en-IN")})]}),(0,s.jsxs)(l.E.button,{onClick:()=>n(!0),className:"w-full flex items-center justify-center gap-2 font-bold text-xs py-3 rounded-xl text-gray-900 shadow-md transition-colors",style:{background:"linear-gradient(135deg, ".concat(I.lT,", ").concat(I.A4,")"),boxShadow:"0 4px 14px rgba(245,158,11,0.3)"},whileHover:{scale:1.02,boxShadow:"0 6px 20px rgba(245,158,11,0.4)"},whileTap:{scale:.97},children:["Book Now ",(0,s.jsx)(o.Z1Y,{className:"text-[9px]"})]})]})]}),(0,s.jsx)(i.M,{children:a&&(0,s.jsxs)(l.E.div,{className:"fixed inset-0 z-50 flex items-center justify-center px-4 py-8",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[(0,s.jsx)(l.E.div,{className:"absolute inset-0 bg-black/55 backdrop-blur-sm",onClick:()=>n(!1)}),(0,s.jsxs)(l.E.div,{className:"relative z-10 bg-white rounded-2xl shadow-2xl w-full max-w-md overflow-hidden",initial:{scale:.94,y:24},animate:{scale:1,y:0},exit:{scale:.94,y:24},transition:{duration:.28,ease:[.22,1,.36,1]},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",style:{background:"linear-gradient(135deg, #fffbeb, #fff)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center",style:{background:"".concat(h.dot,"18"),border:"1.5px solid ".concat(h.dot,"30")},children:(0,s.jsx)(y,{style:{color:h.dot,fontSize:"0.9rem"}})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-bold text-gray-900 text-sm",children:"Confirm Booking"}),(0,s.jsx)("p",{className:"text-[10px] text-gray-500",children:"Review and pay"})]})]}),(0,s.jsx)(l.E.button,{onClick:()=>n(!1),className:"w-8 h-8 rounded-full bg-gray-100 hover:bg-gray-200 flex items-center justify-center text-gray-500 transition-colors",whileTap:{scale:.93},children:(0,s.jsx)(o.aHS,{className:"text-xs"})})]}),(0,s.jsxs)("div",{className:"px-6 py-5 space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs font-bold uppercase tracking-wider text-gray-500 mb-2 flex items-center gap-1.5",children:[(0,s.jsx)(o.Nh4,{className:"text-amber-500 text-[10px]"})," Delivery Address"]}),(0,s.jsx)(C,{})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-100 p-4",style:{background:"linear-gradient(135deg, #fffbeb, #fff7ed)"},children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-bold text-gray-900 text-sm line-clamp-2",children:t.name}),(0,s.jsx)("span",{className:"inline-block text-[9px] font-bold uppercase tracking-wide rounded-full px-2 py-0.5 border mt-1 ".concat(h.pill),children:t.category})]}),(0,s.jsx)("div",{className:"text-right flex-shrink-0",children:(0,s.jsxs)("div",{className:"flex items-baseline gap-0.5",children:[(0,s.jsx)(o.t9y,{className:"text-amber-500 text-xs"}),(0,s.jsx)("span",{className:"text-lg font-extrabold text-gray-900",children:t.price.toLocaleString("en-IN")})]})})]})}),(0,s.jsx)("div",{className:"flex items-center gap-4 text-[10px] text-gray-500",children:["Certified engineers","Secure payment","Booking confirmed via email"].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(o.FJM,{className:"text-emerald-500 text-[9px] flex-shrink-0"}),e]},e))}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1",children:[(0,s.jsxs)(l.E.button,{onClick:f,disabled:u,className:"w-full flex items-center justify-center gap-2 font-bold text-sm py-3.5 rounded-xl text-gray-900 transition-all disabled:opacity-60",style:{background:"linear-gradient(135deg, ".concat(I.lT,", ").concat(I.A4,")"),boxShadow:"0 4px 14px rgba(245,158,11,0.35)"},whileHover:{scale:u?1:1.02},whileTap:{scale:.97},children:[u?"Processing…":"Continue to Payment"," ",!u&&(0,s.jsx)(o.Z1Y,{className:"text-[10px]"})]}),(0,s.jsx)(l.E.button,{onClick:()=>n(!1),className:"w-full flex items-center justify-center border-2 border-gray-200 hover:border-gray-300 text-gray-600 font-semibold text-sm py-3 rounded-xl transition-colors",whileTap:{scale:.97},children:"Cancel"})]})]})]})]})})]})};let z=["Panel efficiency & output measurement","Inverter diagnostics & error-log review","String voltage and current testing","Wiring, junction box & earthing inspection","Bird / dust / shading damage assessment","Detailed report with recommended action plan"],Z=()=>{let e=(0,r.useRef)(null),t=(0,n.Y)(e,{once:!0,amount:.12});return(0,s.jsxs)("section",{ref:e,className:"w-full py-20 md:py-28 relative overflow-hidden",style:{background:"linear-gradient(160deg, #fffbeb 0%, #ffffff 55%, #f0f9ff 100%)"},children:[(0,s.jsxs)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[300px] rounded-full bg-amber-100/40 blur-3xl"}),(0,s.jsx)("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"radial-gradient(#92400e 1px, transparent 1px)",backgroundSize:"28px 28px"}})]}),(0,s.jsxs)("div",{className:"relative max-w-7xl mx-auto px-6 sm:px-10",children:[(0,s.jsxs)(l.E.div,{className:"text-center mb-14",initial:{opacity:0,y:24},animate:t?{opacity:1,y:0}:{},transition:{duration:.6},children:[(0,s.jsxs)(l.E.span,{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-amber-700 bg-amber-100 border border-amber-200 rounded-full px-4 py-1.5 mb-5",initial:{opacity:0,scale:.88},animate:t?{opacity:1,scale:1}:{},transition:{duration:.45,delay:.1},children:[(0,s.jsx)(o.F9M,{className:"text-amber-500"})," Diagnostic Service"]}),(0,s.jsxs)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:["Solar System"," ",(0,s.jsxs)("span",{className:"relative inline-block",children:[(0,s.jsx)("span",{className:"relative z-10 text-amber-500",children:"Health Checkup"}),(0,s.jsx)(l.E.span,{className:"absolute -bottom-1 left-0 w-full h-2 bg-amber-200/70 rounded-full",initial:{scaleX:0},animate:t?{scaleX:1}:{},transition:{duration:.8,delay:.5,ease:"easeOut"},style:{transformOrigin:"left",zIndex:-1,display:"block"}})]})]}),(0,s.jsx)("p",{className:"mt-4 text-gray-500 text-base md:text-lg max-w-xl mx-auto",children:"Get a complete diagnostic of your solar system to restore peak performance and maximise your savings."})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-5 ga
1p-8 items-start",children:[(0,s.jsxs)(l.E.div,{className:"lg:col-span-3 bg-white rounded-2xl border border-gray-100 p-8",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.06)"},initial:{opacity:0,x:-28},animate:t?{opacity:1,x:0}:{},transition:{duration:.65,delay:.2},children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-800 uppercase tracking-wider mb-6 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"h-5 w-1.5 bg-amber-400 rounded-full"})," What's Included"]}),(0,s.jsx)("ul",{className:"space-y-4",children:z.map((e,a)=>(0,s.jsxs)(l.E.li,{className:"flex items-start gap-3",initial:{opacity:0,x:-16},animate:t?{opacity:1,x:0}:{},transition:{duration:.4,delay:.3+.08*a},children:[(0,s.jsx)("span",{className:"w-5 h-5 rounded-full bg-amber-400/15 border border-amber-400/30 flex items-center justify-center flex-shrink-0 mt-0.5",children:(0,s.jsx)(o.l_A,{className:"text-amber-500 text-[9px]"})}),(0,s.jsx)("span",{className:"text-gray-700 text-sm leading-relaxed",children:e})]},e))}),(0,s.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-100 grid grid-cols-3 gap-4",children:[{value:"2–3 hrs",label:"Visit duration"},{value:"48 hrs",label:"Report delivery"},{value:"Certified",label:"Engineers"}].map(e=>{let{value:t,label:a}=e;return(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-lg font-extrabold text-gray-900",children:t}),(0,s.jsx)("p",{className:"text-[10px] text-gray-400 uppercase tracking-wide mt-0.5",children:a})]},a)})})]}),(0,s.jsxs)(l.E.div,{className:"lg:col-span-2 relative rounded-3xl overflow-hidden",style:{boxShadow:"0 20px 56px rgba(245,158,11,0.3)"},initial:{opacity:0,x:28},animate:t?{opacity:1,x:0}:{},transition:{duration:.65,delay:.3},children:[(0,s.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, ".concat(I.lT," 0%, ").concat(I.A4," 55%, #fde68a 100%)")}}),(0,s.jsx)(l.E.div,{className:"absolute -top-10 -right-10 w-40 h-40 opacity-[0.12]",animate:{rotate:360},transition:{duration:40,repeat:1/0,ease:"linear"},children:[...Array(12)].map((e,t)=>(0,s.jsx)("div",{className:"absolute bg-white rounded-full",style:{width:2.5,height:44,top:"50%",left:"50%",transform:"rotate(".concat(30*t,"deg) translateY(-100%) translateX(-50%)"),transformOrigin:"50% 100%"}},t))}),(0,s.jsx)(l.E.div,{className:"absolute bottom-4 left-4 w-20 h-20 rounded-full bg-white/10 blur-xl",animate:{scale:[1,1.3,1]},transition:{duration:3.5,repeat:1/0,ease:"easeInOut"}}),(0,s.jsxs)("div",{className:"relative z-10 p-8",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 bg-amber-900/20 text-amber-950/80 text-[10px] font-black uppercase tracking-widest rounded-full px-3 py-1 mb-5",children:[(0,s.jsx)(o.LkT,{className:"text-[9px]"})," Introductory Offer"]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("p",{className:"text-amber-950/60 text-sm line-through mb-1",children:"₹2,999"}),(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"text-5xl font-black text-gray-900",children:"₹1,499"}),(0,s.jsx)("span",{className:"text-gray-900/70 text-sm font-semibold",children:"only"})]}),(0,s.jsxs)("div",{className:"mt-2 inline-flex items-center gap-1.5 bg-white/30 text-gray-900 font-bold text-xs rounded-full px-3 py-1",children:["Save 50% ",(0,s.jsx)("span",{className:"text-gray-900/70",children:"— limited period"})]})]}),(0,s.jsxs)(l.E.button,{className:"w-full flex items-center justify-center gap-2 bg-gray-900 hover:bg-gray-800 text-white font-bold py-4 rounded-xl text-sm shadow-xl transition-colors mb-3",whileHover:{scale:1.03,boxShadow:"0 8px 24px rgba(0,0,0,0.35)"},whileTap:{scale:.97},children:["Book Health Checkup ",(0,s.jsx)(o.Z1Y,{className:"text-[10px]"})]}),(0,s.jsx)("p",{className:"text-center text-amber-950/50 text-[10px]",children:"*18% GST extra \xb7 Pan-India service"})]})]})]})]})]})},L=["Renew your expired AMC plan","Upgrade to a higher-tier package","Get additional site visits"],M=["Unhappy with your current service provider","Seeing reduced output & higher bills","Want a one-time diagnostic (₹1,499)","Ready to switch to SolarMait AMC"],F=()=>{let e=(0,r.useRef)(null),t=(0,n.Y)(e,{once:!0,amount:.12});return(0,s.jsxs)("section",{ref:e,className:"w-full py-20 md:py-24 relative overflow-hidden",style:{background:"linear-gradient(160deg, #f0f9ff 0%, #ffffff 50%, #fffbeb 100%)"},children:[(0,s.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,s.jsx)("div",{className:"absolute bottom-0 right-0 w-[400px] h-[300px] rounded-full bg-amber-50/50 blur-3xl"}),(0,s.jsx)("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"radial-gradient(#1e40af 1px, transparent 1px)",backgroundSize:"28px 28px"}})]}),(0,s.jsxs)("div",{className:"relative max-w-7xl mx-auto px-6 sm:px-10",children:[(0,s.jsxs)(l.E.div,{className:"text-center mb-14",initial:{opacity:0,y:24},animate:t?{opacity:1,y:0}:{},transition:{duration:.6},children:[(0,s.jsxs)(l.E.span,{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-blue-700 bg-blue-50 border border-blue-200 rounded-full px-4 py-1.5 mb-5",initial:{opacity:0,scale:.88},animate:t?{opacity:1,scale:1}:{},transition:{duration:.45,delay:.1},children:[(0,s.jsx)(o.bri,{className:"text-blue-500"})," Who Should Enrol"]}),(0,s.jsxs)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:["Who Can"," ",(0,s.jsxs)("span",{className:"relative inline-block",children:[(0,s.jsx)("span",{className:"relative z-10 text-amber-500",children:"Buy / Renew"}),(0,s.jsx)(l.E.span,{className:"absolute -bottom-1 left-0 w-full h-2 bg-amber-200/70 rounded-full",initial:{scaleX:0},animate:t?{scaleX:1}:{},transition:{duration:.8,delay:.5,ease:"easeOut"},style:{transformOrigin:"left",zIndex:-1,display:"block"}})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-7",children:[(0,s.jsxs)(l.E.div,{className:"relative rounded-3xl overflow-hidden",style:{boxShadow:"0 16px 48px rgba(245,158,11,0.2)"},initial:{opacity:0,x:-28},animate:t?{opacity:1,x:0}:{},transition:{duration:.65,delay:.2},whileHover:{y:-4,boxShadow:"0 24px 60px rgba(245,158,11,0.28)"},children:[(0,s.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, ".concat(I.lT," 0%, ").concat(I.A4," 60%, #fde68a 100%)")}}),(0,s.jsx)(l.E.div,{className:"absolute -bottom-8 -right-8 w-32 h-32 rounded-full bg-white/15 blur-xl",animate:{scale:[1,1.2,1]},transition:{duration:4,repeat:1/0}}),(0,s.jsxs)("div",{className:"relative z-10 p-8",children:[(0,s.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-white/25 flex items-center justify-center mb-5",children:(0,s.jsx)(o.xng,{className:"text-white text-lg"})}),(0,s.jsx)("h3",{className:"text-xl font-black text-gray-900 mb-2",children:"SolarMait Existing Customers"}),(0,s.jsx)("p",{className:"text-amber-950/65 text-sm mb-6",children:"Already with us? Keep your system in top shape."}),(0,s.jsx)("ul",{className:"space-y-3",children:L.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,s.jsx)("span",{className:"w-5 h-5 rounded-full bg-white/30 flex items-center justify-center flex-shrink-0 mt-0.5",children:(0,s.jsx)(o.l_A,{className:"text-white text-[9px]"})}),(0,s.jsx)("span",{className:"text-sm font-medium text-amber-950/80",children:e})]},e))})]})]}),(0,s.jsxs)(l.E.div,{className:"relative rounded-3xl overflow-hidden",style:{boxShadow:"0 16px 48px rgba(0,0,0,0.2)"},initial:{opacity:0,x:28},animate:t?{opacity:1,x:0}:{},transition:{duration:.65,delay:.32},whileHover:{y:-4,boxShadow:"0 24px 60px rgba(0,0,0,0.28)"},children:[(0,s.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%)"}}),(0,s.jsx)("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(#fbbf24 1px, transparent 1px)",backgroundSize:"22px 22px"}}),(0,s.jsx)(l.E.div,{className:"absolute -top-8 -left-8 w-32 h-32 rounded-full bg-amber-400/10 blur-2xl",animate:{scale:[1,1.3,1]},transition:{duration:4.5,repeat:1/0}}),(0,s.jsxs)("div",{className:"relative z-10 p-8",children:[(0,s.jsx)("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center mb-5",style:{background:"rgba(251,191,36,0.15)",border:"1px solid rgba(251,191,36,0.3)"},children:(0,s.jsx)(o.m17,{className:"text-amber-400 text-lg"})}),(0,s.jsx)("h3",{className:"text-xl font-black text-white mb-2",children:"Non-SolarMait Customers"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm mb-6",children:"Thinking of switching? Here's why it's worth it."}),(0,s.jsx)("ul",{className:"space-y-3",children:M.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,s.jsx)("span",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:"rgba(251,191,36,0.15)",border:"1px solid rgba(251,191,36,0.3)"},children:(0,s.jsx)(o.l_A,{className:"text-amber-400 text-[9px]"})}),(0,s.jsx)("span",{className:"text-sm font-medium text-slate-400",children:e})]},e))})]})]})]})]})]})},R=[{name:"Silver",badge:null,discount:"25% off",oldPrice:"₹3,999",newPrice:"₹2,999",color:"#64748b",bg:"linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)",border:"#e2e8f0",features:["2 cleaning visits / year","Annual performance report","Phone support (9 AM–6 PM)","Monitoring dashboard access"]},{name:"Gold",badge:"Most Popular",discount:"30% off",oldPrice:"₹9,999",newPrice:"₹6,999",color:"#f59e0b",bg:"linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%)",border:"#fde68a",features:["4 cleaning visits / year","Quarterly performance reports","Priority WhatsApp & phone support","Free minor parts replacement","Real-time alerts & monitoring"]},{name:"Platinum",badge:"Best Value",discount:"25% off",oldPrice:"₹15,999",newPrice:"₹11,999",color:"#8b5cf6",bg:"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)",border:"#3730a3",dark:!0,features:["6 cleaning visits / year","Monthly performance reports","Dedicated account manager","All parts replacement free","Emergency same-day service","24/7 remote monitoring"]}],H=()=>{let e=(0,r.useRef)(null),t=(0,n.Y)(e,{once:!0,amount:.1});return(0,s.jsxs)("section",{ref:e,className:"w-full py-20 md:py-28 relative overflow-hidden",style:{background:"linear-gradient(160deg, #fffbeb 0%, #ffffff 50%, #f5f3ff 100%)"},children:[(0,s.jsxs)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute top-0 right-1/4 w-[500px] h-[300px] rounded-full bg-purple-50/40 blur-3xl"}),(0,s.jsx)("div",{className:"absolute bottom-0 left-0 w-[450px] h-[300px] rounded-full bg-amber-50/50 blur-3xl"}),(0,s.jsx)("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"radial-gradient(#92400e 1px, transparent 1px)",backgroundSize:"28px 28px"}})]}),(0,s.jsxs)("div",{className:"relative max-w-7xl mx-auto px-6 sm:px-10",children:[(0,s.jsxs)(l.E.div,{className:"text-center mb-14",initial:{opacity:0,y:24},animate:t?{opacity:1,y:0}:{},transition:{duration:.6},children:[(0,s.jsxs)(l.E.span,{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-amber-700 bg-amber-100 border border-amber-200 rounded-full px-4 py-1.5 mb-5",initial:{opacity:0,scale:.88},animate:t?{opacity:1,scale:1}:{},transition:{duration:.45,delay:.1},children:[(0,s.jsx)(o.bri,{className:"text-amber-500"})," SolarMait Care"]}),(0,s.jsxs)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:["AMC Packages"," ",(0,s.jsxs)("span",{className:"relative inline-block",children:[(0,s.jsx)("span",{className:"relative z-10 text-amber-500",children:"to Choose From"}),(0,s.jsx)(l.E.span,{className:"absolute -bottom-1 left-0 w-full h-2 bg-amber-200/70 rounded-full",initial:{scaleX:0},animate:t?{scaleX:1}:{},transition:{duration:.8,delay:.5,ease:"easeOut"},style:{transformOrigin:"left",zIndex:-1,display:"block"}})]})]}),(0,s.jsx)("p",{className:"mt-4 text-gray-500 text-base md:text-lg max-w-xl mx-auto",children:"Tailored maintenance contracts for complete peace of mind across your system's full 25-year life."})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:R.map((e,a)=>(0,s.jsxs)(l.E.div,{className:"relative rounded-3xl overflow-hidden flex flex-col",style:{background:e.bg,border:"2px s
1olid ".concat(e.border),boxShadow:"0 8px 32px ".concat(e.color,"20")},initial:{opacity:0,y:28},animate:t?{opacity:1,y:0}:{},transition:{duration:.55,delay:.2+.12*a,ease:[.22,1,.36,1]},whileHover:{y:-6,boxShadow:"0 24px 56px ".concat(e.color,"35")},children:[e.badge&&(0,s.jsx)("div",{className:"absolute top-4 right-4 text-[9px] font-black uppercase tracking-wide text-white rounded-full px-2.5 py-1",style:{background:e.color,boxShadow:"0 4px 12px ".concat(e.color,"50")},children:e.badge}),"Gold"===e.name&&(0,s.jsx)(l.E.div,{className:"absolute -top-4 -right-4 w-24 h-24 rounded-full blur-2xl opacity-40",style:{background:e.color},animate:{scale:[1,1.2,1]},transition:{duration:3,repeat:1/0}}),(0,s.jsxs)("div",{className:"p-7 flex flex-col flex-1 relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,s.jsx)("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center",style:{background:"".concat(e.color,"18"),border:"1.5px solid ".concat(e.color,"40")},children:(0,s.jsx)(o.CP_,{style:{color:e.color,fontSize:"1rem"}})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-black text-lg ".concat(e.dark?"text-white":"text-gray-900"),children:e.name}),(0,s.jsx)("span",{className:"text-[10px] font-bold rounded-full px-2 py-0.5",style:{background:"".concat(e.color,"18"),color:e.color},children:e.discount})]})]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("p",{className:"text-sm line-through mb-0.5 ".concat(e.dark?"text-slate-500":"text-gray-400"),children:[e.oldPrice,"/yr"]}),(0,s.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,s.jsx)("span",{className:"text-4xl font-black ".concat(e.dark?"text-white":"text-gray-900"),children:e.newPrice}),(0,s.jsx)("span",{className:"text-xs font-semibold ".concat(e.dark?"text-slate-400":"text-gray-500"),children:"/year"})]})]}),(0,s.jsx)("ul",{className:"space-y-3 mb-7 flex-1",children:e.features.map(t=>(0,s.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,s.jsx)("span",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:"".concat(e.color,"18"),border:"1.5px solid ".concat(e.color,"35")},children:(0,s.jsx)(o.l_A,{style:{color:e.color,fontSize:"0.5rem"}})}),(0,s.jsx)("span",{className:"text-xs leading-relaxed ".concat(e.dark?"text-slate-400":"text-gray-600"),children:t})]},t))}),"Gold"===e.name&&(0,s.jsx)("div",{className:"flex gap-0.5 mb-3",children:[1,2,3,4,5].map(e=>(0,s.jsx)(o.QJe,{className:"text-amber-400 text-xs"},e))}),(0,s.jsxs)(l.E.button,{className:"w-full flex items-center justify-center gap-2 font-bold text-sm py-3.5 rounded-xl transition-all",style:e.dark?{background:"linear-gradient(135deg, ".concat(I.lT,", ").concat(I.A4,")"),color:"#111827",boxShadow:"0 4px 14px rgba(245,158,11,0.4)"}:{background:e.color,color:e.dark?"#111":"#fff",boxShadow:"0 4px 14px ".concat(e.color,"40")},whileHover:{scale:1.03},whileTap:{scale:.97},children:["Buy ",e.name," ",(0,s.jsx)(o.Z1Y,{className:"text-[10px]"})]}),(0,s.jsx)("p",{className:"text-center text-[10px] mt-2 ".concat(e.dark?"text-slate-600":"text-gray-400"),children:"*18% GST extra"})]})]},e.name))})]})]})};var O=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Z,{}),(0,s.jsx)(F,{}),(0,s.jsx)(H,{})]});let D={"solar-panels":{Icon:o.Mei,color:"#f59e0b",bg:"bg-amber-50",border:"border-amber-200",text:"text-amber-700"},inverters:{Icon:o.LkT,color:"#3b82f6",bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},batteries:{Icon:o.Lr7,color:"#10b981",bg:"bg-emerald-50",border:"border-emerald-200",text:"text-emerald-700"},components:{Icon:o.rU2,color:"#8b5cf6",bg:"bg-violet-50",border:"border-violet-200",text:"text-violet-700"},"solar-kits":{Icon:o.ZUW,color:"#0ea5e9",bg:"bg-sky-50",border:"border-sky-200",text:"text-sky-700"},services:{Icon:o.LDL,color:"#f97316",bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},W=p.Zy.map(e=>({...e,...D[e.slug]})),Y=e=>{let{query:t,onClear:a}=e;return(0,s.jsxs)(l.E.div,{className:"col-span-full flex flex-col items-center justify-center py-24 text-center",initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,s.jsx)(l.E.div,{className:"w-20 h-20 rounded-full bg-gray-50 border-2 border-gray-100 flex items-center justify-center mb-5",animate:{scale:[1,1.05,1]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"},children:(0,s.jsx)(o.U41,{className:"text-gray-300 text-2xl"})}),(0,s.jsxs)("p",{className:"text-gray-700 font-bold text-lg mb-1",children:["No matches for “",t,"”"]}),(0,s.jsx)("p",{className:"text-gray-400 text-sm max-w-xs mb-5",children:"Try a different keyword, or clear your search to browse the full category."}),(0,s.jsxs)(l.E.button,{onClick:a,className:"inline-flex items-center gap-2 bg-gray-900 hover:bg-gray-800 text-white font-bold text-sm px-6 py-3 rounded-xl transition-colors",whileHover:{y:-2},whileTap:{scale:.96},children:[(0,s.jsx)(o.aHS,{className:"text-xs"})," Clear search"]})]})},B=e=>{let{categoryLabel:t,categoryColor:a,onGetQuote:r,siblingCategories:n,onSelectCategory:i}=e;return(0,s.jsxs)(l.E.div,{className:"col-span-full flex flex-col items-center justify-center py-20 px-6 text-center rounded-3xl border border-dashed",style:{borderColor:"".concat(a,"40"),background:"".concat(a,"06")},initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.55},children:[(0,s.jsx)(l.E.div,{className:"w-20 h-20 rounded-full flex items-center justify-center mb-6",style:{background:"".concat(a,"15"),border:"2px solid ".concat(a,"30")},animate:{scale:[1,1.08,1]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"},children:(0,s.jsx)(o.AFA,{style:{color:a},className:"text-3xl"})}),(0,s.jsx)("span",{className:"inline-flex items-center gap-2 text-[11px] font-bold uppercase tracking-widest rounded-full px-3 py-1 mb-3",style:{background:"".concat(a,"15"),color:a},children:"Catalog coming soon"}),(0,s.jsxs)("p",{className:"text-gray-800 font-extrabold text-xl mb-2 max-w-md",children:[t," listings are being added"]}),(0,s.jsx)("p",{className:"text-gray-500 text-sm max-w-sm mb-7 leading-relaxed",children:"We're onboarding vetted vendors for this category. Tell us what you need and one of our solar experts will send a tailored quote within 24 hours — no obligation."}),(0,s.jsxs)(l.E.button,{onClick:r,className:"inline-flex items-center gap-2 font-bold text-sm px-7 py-3.5 rounded-xl text-white shadow-lg mb-6",style:{background:a,boxShadow:"0 10px 28px ".concat(a,"45")},whileHover:{y:-2,scale:1.02},whileTap:{scale:.96},children:[(0,s.jsx)(o.Zlo,{className:"text-sm"})," Get a custom quote",(0,s.jsx)(o.Z1Y,{className:"text-xs"})]}),n.length>0&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-gray-400 mr-1",children:"Or browse:"}),n.map(e=>(0,s.jsx)(l.E.button,{onClick:()=>i(e.slug),className:"text-xs font-semibold text-gray-600 bg-white border border-gray-200 rounded-full px-3.5 py-1.5 hover:border-gray-300 hover:text-gray-900 transition-colors",whileHover:{y:-1},whileTap:{scale:.95},children:e.label},e.slug))]})]})},U=e=>{let{page:t,totalPages:a,onPageChange:r}=e;if(a<=1)return null;let n=Array.from({length:a},(e,t)=>t+1).filter(e=>1===e||e===a||1>=Math.abs(e-t)),i=[],c=0;for(let e of n)e-c>1&&i.push((0,s.jsx)("span",{className:"px-1 text-gray-400",children:"…"},"ellipsis-".concat(e))),i.push((0,s.jsx)(l.E.button,{onClick:()=>r(e),"aria-current":e===t?"page":void 0,className:"w-9 h-9 rounded-xl font-bold text-sm transition-all ".concat(e===t?"bg-amber-500 text-white shadow-lg shadow-amber-200":"bg-white border border-gray-200 text-gray-600 hover:border-amber-300 hover:text-amber-600"),whileTap:{scale:.93},children:e},e)),c=e;return(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-10",children:[(0,s.jsx)(l.E.button,{onClick:()=>r(Math.max(1,t-1)),disabled:1===t,"aria-label":"Previous page",className:"w-9 h-9 rounded-xl bg-white border border-gray-200 text-gray-500 hover:border-amber-300 hover:text-amber-600 disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center transition-all",whileTap:{scale:.93},children:(0,s.jsx)(o.bUI,{className:"text-xs"})}),i,(0,s.jsx)(l.E.button,{onClick:()=>r(Math.min(a,t+1)),disabled:t===a,"aria-label":"Next page",className:"w-9 h-9 rounded-xl bg-white border border-gray-200 text-gray-500 hover:border-amber-300 hover:text-amber-600 disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center transition-all",whileTap:{scale:.93},children:(0,s.jsx)(o.Dli,{className:"text-xs"})})]})},G=e=>{let{isService:t}=e;return(0,s.jsx)("div",{className:"grid gap-5 ".concat(t?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"),children:Array.from({length:t?6:8}).map((e,t)=>(0,s.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 overflow-hidden animate-pulse",style:{boxShadow:"0 4px 16px rgba(0,0,0,0.04)"},children:[(0,s.jsx)("div",{className:"h-48 bg-gray-100"}),(0,s.jsxs)("div",{className:"p-5 space-y-3",children:[(0,s.jsx)("div",{className:"h-4 bg-gray-100 rounded-full w-3/4"}),(0,s.jsx)("div",{className:"h-3 bg-gray-100 rounded-full w-full"}),(0,s.jsx)("div",{className:"h-3 bg-gray-100 rounded-full w-2/3"}),(0,s.jsx)("div",{className:"h-8 bg-gray-100 rounded-xl mt-4"})]})]},t))})},J=()=>{var e;let t=(0,c.useRouter)(),a=(0,c.usePathname)(),m=(0,c.useSearchParams)(),u=null!==(e=(0,p.wx)(m.get("
1category")))&&void 0!==e?e:p.Rl,b=W[(0,p.hW)(u)],f=b.isService,[h,j]=(0,r.useState)([]),[v,N]=(0,r.useState)([]),[w,k]=(0,r.useState)(1),[S,E]=(0,r.useState)(1),[C,I]=(0,r.useState)(""),[A,P]=(0,r.useState)(""),[_,z]=(0,r.useState)(!0),[Z,L]=(0,r.useState)(!1),[M,F]=(0,r.useState)(0),R=(0,r.useRef)(null),H=(0,n.Y)(R,{once:!0,amount:.05});(0,r.useEffect)(()=>{k(1),I(""),P("")},[u]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{P(C.trim()),k(1)},350);return()=>clearTimeout(e)},[C]),(0,r.useEffect)(()=>{let e=new AbortController;return(async()=>{z(!0),L(!1);try{if(f){let t=await d.axiosInstance.get("/services/get-all",{signal:e.signal});N(t.data.services||[]),E(1)}else{let t=await d.axiosInstance.get("/products/b2c-listing",{signal:e.signal,params:{category:b.apiValue,page:w,limit:8,search:A||void 0}});if(t.data.success){let e=t.data.data||[],a=Number(t.data.total)||0;j(e),E(a>0?Math.max(1,Math.ceil(a/8)):1)}else j([]),E(1)}}catch(e){if((0,g.D_)(e))return;console.error("Failed to fetch catalog data:",e),L(!0),f?N([]):j([])}finally{e.signal.aborted||z(!1)}})(),()=>e.abort()},[b.apiValue,f,w,A,M]);let D=(0,r.useCallback)(e=>{let s=new URLSearchParams(m.toString());s.set("category",e),t.replace("".concat(a,"?").concat(s.toString()),{scroll:!1})},[a,t,m]),J=(0,r.useCallback)(()=>{t.push((0,x.EB)(a,"category:".concat(b.slug),m),{scroll:!1}),(0,x.Nj)()},[b.slug,a,t,m]),X=(0,r.useMemo)(()=>W.filter(e=>e.slug!==b.slug).map(e=>({slug:e.slug,label:e.label})),[b.slug]),V=A.length>0,q=f?0===v.length:0===h.length;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"relative overflow-hidden pt-28 pb-14",style:{background:"linear-gradient(160deg, #fffbeb 0%, #ffffff 60%, #f0fdf4 100%)"},children:[(0,s.jsxs)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute top-0 left-1/4 w-[460px] h-[260px] rounded-full bg-amber-100/60 blur-3xl"}),(0,s.jsx)("div",{className:"absolute bottom-0 right-1/4 w-[360px] h-[220px] rounded-full bg-blue-50/50 blur-3xl"}),(0,s.jsx)("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"radial-gradient(#92400e 1px, transparent 1px)",backgroundSize:"28px 28px"}})]}),(0,s.jsxs)("div",{className:"relative max-w-7xl mx-auto px-6 sm:px-10",children:[(0,s.jsxs)(l.E.div,{className:"text-center mb-10",initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,s.jsxs)(l.E.span,{className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-amber-700 bg-amber-100 border border-amber-200 rounded-full px-4 py-1.5 mb-5",initial:{opacity:0,scale:.88},animate:{opacity:1,scale:1},transition:{duration:.45,delay:.1},children:[(0,s.jsx)(o.Mei,{className:"text-amber-500"})," India's Solar Marketplace"]}),(0,s.jsxs)("h1",{className:"text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:["Shop"," ",(0,s.jsxs)("span",{className:"relative inline-block",children:[(0,s.jsx)("span",{className:"relative z-10 text-amber-500",children:"Solar Products"}),(0,s.jsx)(l.E.span,{className:"absolute -bottom-1 left-0 w-full h-2 bg-amber-200/70 rounded-full",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.8,delay:.5,ease:"easeOut"},style:{transformOrigin:"left",zIndex:-1,display:"block"}})]})," ","& Services"]}),(0,s.jsx)("p",{className:"mt-3 text-gray-500 text-base md:text-lg max-w-xl mx-auto",children:"Premium panels, inverters, batteries and expert services — all in one place."})]}),(0,s.jsx)(l.E.div,{className:"flex justify-center mb-8",initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.55,delay:.25},children:(0,s.jsxs)("div",{className:"relative w-full max-w-lg",children:[(0,s.jsx)(o.U41,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"}),(0,s.jsxs)("label",{htmlFor:"product-search",className:"sr-only",children:["Search ",b.label.toLowerCase()]}),(0,s.jsx)("input",{id:"product-search",type:"text",placeholder:"Search ".concat(b.label.toLowerCase(),"…"),value:C,onChange:e=>I(e.target.value),className:"w-full pl-11 pr-11 py-3.5 rounded-2xl border border-gray-200 bg-white text-sm text-gray-800 placeholder-gray-400 shadow-sm focus:outline-none focus:border-amber-400 focus:ring-2 focus:ring-amber-100 transition-all"}),C&&(0,s.jsx)("button",{type:"button",onClick:()=>I(""),"aria-label":"Clear search",className:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-300 hover:text-gray-500 transition-colors",children:(0,s.jsx)(o.aHS,{className:"text-xs"})})]})}),(0,s.jsx)(l.E.div,{role:"tablist","aria-label":"Product categories",className:"flex gap-2.5 overflow-x-auto pb-2 justify-center flex-wrap",initial:{opacity:0,y:12}
1,animate:{opacity:1,y:0},transition:{duration:.5,delay:.35},children:W.map(e=>{let t=e.slug===b.slug,a=e.Icon;return(0,s.jsxs)(l.E.button,{role:"tab","aria-selected":t,onClick:()=>D(e.slug),className:"flex items-center gap-2 px-5 py-2.5 rounded-2xl font-bold text-sm border whitespace-nowrap transition-all ".concat(t?"text-white shadow-lg border-transparent":"".concat(e.bg," ").concat(e.border," ").concat(e.text," hover:brightness-95")),style:t?{background:e.color,boxShadow:"0 6px 18px ".concat(e.color,"40")}:{},whileHover:{y:-2},whileTap:{scale:.96},children:[(0,s.jsx)(a,{className:"text-xs ".concat(t?"text-white":""),style:t?{}:{color:e.color}}),e.label]},e.slug)})})]})]}),(0,s.jsx)("section",{className:"w-full py-12 bg-gray-50/50",ref:R,children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto px-6 sm:px-10",children:[(0,s.jsxs)(l.E.div,{className:"flex items-center gap-3 mb-8",initial:{opacity:0,x:-16},animate:H?{opacity:1,x:0}:{},transition:{duration:.5},children:[(0,s.jsx)("div",{className:"w-1 h-6 rounded-full",style:{background:b.color}}),(0,s.jsx)("h2",{className:"text-lg font-bold text-gray-800",children:b.label}),!_&&(0,s.jsx)("span",{className:"ml-auto text-xs text-gray-400 font-medium",children:f?"".concat(v.length," service").concat(1!==v.length?"s":""):"Page ".concat(w," of ").concat(S)})]}),Z?(0,s.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-24 text-center",children:[(0,s.jsx)("p",{className:"text-gray-700 font-bold text-lg mb-1",children:"Couldn't load the catalog"}),(0,s.jsx)("p",{className:"text-gray-400 text-sm max-w-xs mb-5",children:"Something went wrong on our end. Please try again in a moment."}),(0,s.jsx)(l.E.button,{onClick:()=>F(e=>e+1),className:"inline-flex items-center gap-2 bg-amber-400 hover:bg-amber-500 text-gray-900 font-bold text-sm px-6 py-3 rounded-xl transition-colors",whileHover:{y:-2},whileTap:{scale:.96},children:"Retry"})]}):_?(0,s.jsx)(G,{isService:f}):(0,s.jsx)(i.M,{mode:"wait",children:(0,s.jsx)(l.E.div,{className:"grid gap-5 ".concat(f?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"),initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.35},children:q?V?(0,s.jsx)(Y,{query:A,onClear:()=>I("")}):(0,s.jsx)(B,{categoryLabel:b.label,categoryColor:b.color,onGetQuote:J,siblingCategories:X,onSelectCategory:D}):f?v.map((e,t)=>(0,s.jsx)(l.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.06*t},children:(0,s.jsx)(T,{service:e})},e._id)):h.map((e,t)=>(0,s.jsx)(l.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.05*t},children:(0,s.jsx)(y,{product:e})},e._id))},"".concat(b.slug,"-").concat(w,"-").concat(A))}),!f&&!_&&!Z&&(0,s.jsx)(U,{page:w,totalPages:S,onPageChange:k})]})}),f&&(0,s.jsx)(O,{})]})};var X=()=>(0,s.jsx)(r.Suspense,{fallback:(0,s.jsx)("section",{className:"pt-28 pb-20",children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-6 sm:px-10",children:(0,s.jsx)(G,{isService:!1})})}),children:(0,s.jsx)(J,{})})},45121:function(e,t,a){"use strict";a.d(t,{A4:function(){return i},GJ:function(){return o},Lx:function(){return l},lT:function(){return n},r4:function(){return r},zr:function(){return s}});let s="#07111F",r="#0c111d",l="#080d18",n="#f59e0b",i="#fbbf24",o={inkHero:"linear-gradient(135deg, ".concat(s," 0%, #0c1a2e 55%, #12213a 100%)"),ink:"linear-gradient(180deg, ".concat(s," 0%, ").concat(r," 100%)"),inkFooter:"linear-gradient(180deg, ".concat(r," 0%, ").concat(l," 100%)"),warm:"linear-gradient(180deg, #F8FAFC 0%, #FFFBEB 100%)",amberCta:"linear-gradient(135deg, ".concat(n," 0%, ").concat(i," 50%, #fde68a 100%)")}},7653:function(e,t,a){"use strict";a.d(t,{AuthProvider:function(){return p},a:function(){return b}});var s=a(57437),r=a(2265),l=a(99376),n=a(64131),i=a(94242),o=a(88231),c=a(95617);let d=e=>!e||!e.startsWith("/")||e.startsWith("//")?null:e,x=e=>/^https?:\/\//i.test(e),m=(e,t)=>{let a=d(t);if(a)return a;if((null==e?void 0:e.role)==="admin"){let e=(0,c.Jj)();if(e)return(0,c.JZ)(e,"/admin")}return"/"},u=(0,r.createContext)(void 0),p=e=>{let{children:t}=e,[a,d]=(0,r.useState)(null),[p,b]=(0,r.useState)(null),[g,f]=(0,r.useState)(null),[h,y]=(0,r.useState)(!0),j=(0,l.useRouter)();(0,r.useEffect)(()=>{let e=localStorage.getItem("token"),t=localStorage.getItem("user"),a=localStorage.getItem("defaultAddress");if(e&&t){b(e);try{d(JSON.parse(t))}catch(e){localStorage.removeItem("user")}f(a||null)}y(!1)},[]),(0,r.useEffect)(()=>
1{if(!p)return;let e=new AbortController;return fetch((0,c.JZ)((0,c.k2)(),"/current-user"),{headers:{Authorization:"Bearer ".concat(p)},signal:e.signal}).then(e=>e.ok?e.json():null).then(e=>{(null==e?void 0:e.success)&&e.user&&v(e.user)}).catch(()=>{}),()=>e.abort()},[p]);let v=(0,r.useCallback)(e=>{d(e),localStorage.setItem("user",JSON.stringify(e))},[]),N=(0,r.useCallback)(e=>{f(e),e?localStorage.setItem("defaultAddress",e):localStorage.removeItem("defaultAddress")},[]),w=(0,r.useCallback)((e,t)=>{let{token:a,user:s,default_address:r}=e;b(a),v(s),N(null!=r?r:null),localStorage.setItem("token",a),n.Z.set("token",a,{expires:7}),y(!1);let l=m(s,t);x(l)?window.location.href=l:j.push(l)},[j,v,N]),k=(0,r.useCallback)(async(e,t,a)=>{y(!0);let s=await fetch((0,c.JZ)((0,c.k2)(),"/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:t})}),r=await s.json();if(r.success)w({token:r.token,user:r.user,default_address:r.default_address},a);else throw y(!1),Error(r.message||"Login failed")},[w]),S=(0,r.useCallback)(e=>{y(!0),b(null),d(null),f(null);let t="";if(null==e?void 0:e.expired){let{pathname:e,search:a}=window.location;e&&"/login"!==e&&(t="?next=".concat(encodeURIComponent(e+a)))}localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("defaultAddress"),n.Z.remove("token"),y(!1),(null==e?void 0:e.expired)&&i.Am.info("Your session expired. Sign in again and we'll take you straight back."),j.replace("/login".concat(t))},[j]);return(0,r.useEffect)(()=>((0,o.setSessionExpiredHandler)(()=>{localStorage.getItem("token")&&S({expired:!0})}),()=>(0,o.setSessionExpiredHandler)(null)),[S]),(0,s.jsx)(u.Provider,{value:{user:a,token:p,defaultAddress:g,loading:h,establishSession:w,login:k,logout:S,setUserAndSync:v,setDefaultAddressAndSync:N},children:t})},b=()=>{let e=(0,r.useContext)(u);if(!e)throw Error("useAuth must be used within an AuthProvider");return e}},18655:function(e,t,a){"use strict";function s(e){if(!Array.isArray(e))return[];let t=[];for(let a of e){if("string"==typeof a){t.push(a);continue}if(!a||"object"!=typeof a)continue;let e=a.product;if("string"==typeof e)t.push(e);else if(e&&"object"==typeof e){let a=e._id;"string"==typeof a&&t.push(a)}}return t}a.d(t,{$:function(){return s},R:function(){return r}});let r=(e,t)=>!!t&&s(e).includes(t)}},function(e){e.O(0,[7699,7833,3464,2972,5572,8705,1600,4411,2381,2254,2971,2117,1744],function(){return e(e.s=10671)}),_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.