https://www.serviceplug.in/_next/static/chunks/pages/Spares&Access…&Accessories]-4f9a11839b88fa32.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5189],{44510:function(e,o,t){"use strict";var i=t(64836);o.Z=void 0;var r=i(t(64938)),n=t(85893);o.Z=(0,r.default)((0,n.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},35956:function(e,o,t){"use strict";var i=t(64836);o.Z=void 0;var r=i(t(64938)),n=t(85893);o.Z=(0,r.default)((0,n.jsx)("path",{d:"m21.9 21.9-6.1-6.1-2.69-2.69L5 5 3.59 3.59 2.1 2.1.69 3.51 3 5.83V19c0 1.1.9 2 2 2h13.17l2.31 2.31zM5 19V7.83l6.84 6.84-.84 1.05L9 13l-3 4h8.17l2 2zM7.83 5l-2-2H19c1.1 0 2 .9 2 2v13.17l-2-2V5z"}),"ImageNotSupportedOutlined")},41609:function(e,o,t){var i=t(280),r=t(64160),n=t(35694),l=t(1469),a=t(98612),d=t(44144),s=t(25726),c=t(36719),u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(l(e)||"string"==typeof e||"function"==typeof e.splice||d(e)||c(e)||n(e)))return!e.length;var o=r(e);if("[object Map]"==o||"[object Set]"==o)return!e.size;if(s(e))return!i(e).length;for(var t in e)if(u.call(e,t))return!1;return!0}},20412:function(e,o,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/Spares&Accessories/[...Spares&Accessories]",function(){return t(87377)}])},48435:function(e,o,t){"use strict";t.d(o,{Z:function(){return d}});var i=t(85893),r=t(45697),n=t.n(r),l=t(72679),a=t(87357);function d(e){let{ratio:o,disabledEffect:t=!1,effect:r="blur",sx:n,...d}=e;return o?(0,i.jsx)(a.Z,{component:"span",sx:{width:1,lineHeight:0,display:"block",overflow:"hidden",position:"relative",pt:s(o),"& .wrapper":{top:0,left:0,right:0,bottom:0,lineHeight:0,position:"absolute",backgroundSize:"cover !important"},...n},children:(0,i.jsx)(a.Z,{component:l.LazyLoadImage,wrapperClassName:"wrapper",effect:t?void 0:r,sx:{width:1,height:1,objectFit:"fill"},...d})}):(0,i.jsx)(a.Z,{component:"span",sx:{lineHeight:0,display:"block",overflow:"hidden","& .wrapper":{width:1,height:1,backgroundSize:"cover !important"},...n},children:(0,i.jsx)(a.Z,{component:l.LazyLoadImage,wrapperClassName:"wrapper",effect:t?void 0:r,sx:{width:1,height:1,objectFit:"cover"},...d})})}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1/1";return{"4/3":"calc(100% / 4 * 3)","3/4":"calc(100% / 3 * 4)","6/4":"calc(100% / 6 * 4)","4/6":"calc(100% / 4 * 6)","16/9":"calc(100% / 16 * 9)","9/16":"calc(100% / 9 * 16)","21/9":"calc(100% / 21 * 9)","9/21":"calc(100% / 9 * 21)","1/1":"100%"}[e]}d.propTypes={disabledEffect:n().bool,effect:n().string,ratio:n().oneOf(["4/3","3/4","6/4","4/6","16/9","9/16","21/9","9/21","1/1"]),sx:n().object}},44547:function(e,o,t){"use strict";var i=t(85893),r=t(51233),n=t(23972),l=t(35956);o.Z=function(){return(0,i.jsxs)(r.Z,{alignItems:"center",justifyContent:"center",spacing:1,sx:{height:"354px",borderRadius:"5px",background:"#F5F6FA",border:"1px dashed #DFE3EE"},children:[(0,i.jsx)(l.Z,{sx:{fontSize:48,color:"#C4C9DB"}}),(0,i.jsx)(n.Z,{sx:{fontSize:15,fontWeight:600,color:"#9FA5C0"},children:"No Image Found"})]})}},91630:function(e,o,t){"use strict";var i=t(85893),r=t(67294),n=t(51233),l=t(69397),a=t(10615),d=t(76172),s=t(48317),c=t(10940),u=t(77236),p=t(11894);o.Z=function(e){var o;const{arrowStyles:t,imageList:v,bottomBanner:h}=e,x=(0,p.I0)();return(0,r.useEffect)((()=>{if(h&&0!==(null===h||void 0===h?void 0:h.length)){var e,o;let t=localStorage.getItem("uid"),i={userId:t,moduleId:null===(e=h[0])||void 0===e?void 0:e.url};if(t&&(null===(o=h[0])||void 0===o?void 0:o._id)){let e=x((0,c.V)(i));(0,u.SI)(e)}}}),[]),(0,i.jsxs)(n.Z,{sx:{},children:[(0,i.jsx)(a.lr,{statusFormatter:()=>"",renderArrowPrev:(e,o,r)=>o&&(0,i.jsx)(l.Z,{type:"button",onClick:e,title:r,style:{...t,left:15},children:(0,i.jsx)(d.Z,{})}),renderArrowNext:(e,o,r)=>o&&(0,i.jsx)(l.Z,{type:"button",onClick:e,title:r,style:{...t,right:15},children:(0,i.jsx)(s.Z,{})}),children:v&&v.map(((e,o)=>(0,i.jsx)("div",{style:{height:"354px"},children:(0,i.jsx)("img",{className:"h-full",src:(null===e||void 0===e?void 0:e.docURL)?null===e||void 0===e?void 0:e.docURL:"/list4.png",alt:"images",style:{borderRadius:"5px",width:"100%",height:"100%",objectFit:"contain"}})},(null===e||void 0===e?void 0:e.key)?null===e||void 0===e?void 0:e.key:o)))}),h&&(0,i.jsx)("img",{src:0!==(null===h||void 0===h?void 0:h.length)?null===h||void 0===h||null===(o=h[0])||void 0===o?void 0:o.url:"/Untitled (498 \xd7 100px).png",alt:"banner",style:{marginTop:"24px",borderRadius:"8px"}})]})}},87071:function(e,o,t){"use strict";t.d(o,{Z:function(){return v}});var i=t(85893),r=(t(67294),t(2734)),n=t(61730),l=t(79957),a=t(87357),d=t(54799),s=t(23972),c=t(37786),u=t(44510),p=t(48435);function v(e){let{open:o,onClose:t}=e;const v=(0,r.Z)(),h=(0,n.Z)(v.breakpoints.down("sm"));return(0,i.jsx)(l.Z,{open:o,onClose:t,children:(0,i.jsxs)(a.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:h?"95%":"50%",bgcolor:"background.paper",boxShadow:24,borderRadius:"12px",p:h?2:4,textAlign:"center"},children:[(0,i.jsx)(d.Z,{"aria-label":"close modal",onClick:t,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,i.jsx)(u.Z,{sx:{color:"black"}})}),(0,i.jsx)(s.Z,{variant:"h4",component:"h2",fontWeight:"bold",sx:{fontSize:h?"1.3rem":"1.5rem"},children:"For Full Vehicle Details, Download Our App"}),(0,i.jsxs)(s.Z,{sx:{mt:2,fontSize:h?"0.9rem":"1rem"},children:["\ud83d\ude97 Get access to complete vehicle information.",(0,i.jsx)("br",{}),"\ud83d\udcf2 Receive real-time updates and offers.",(0,i.jsx)("br",{}),"\ud83d\udee0 Manage your vehicle services easily."]}),(0,i.jsxs)(a.Z,{display:"flex",flexDirection:h?"column":"row",justifyContent:"center",alignItems:"center",gap:2,children:[(0,i.jsx)(c.Z,{target:"_blank",rel:"noopener noreferrer",m:{xs:"auto",md:"0"},href:"https://play.google.com/store/apps/details?id=com.service_plug_customer_app&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1","aria-label":"Download from Google Play",children:(0,i.jsx)(p.Z,{src:"/google-play-badge.png",alt:"Get it on Google Play",sx:{width:h?"150px":"180px",mt:2}})}),(0,i.jsx)(c.Z,{target:"_blank",rel:"noopener noreferrer",m:{xs:"auto",md:"0"},href:"https://apps.apple.com/in/app/serviceplug-nearby-mechanics/id6476918833","aria-label":"Download from App Store",children:(0,i.jsx)(p.Z,{src:"/appstore.png",alt:"Download on the App Store",sx:{width:h?"150px":"180px",mt:2}})})]})]})})}},87377:function(e,o,t){"use strict";t.r(o);var i=t(85893),r=t(67294),n=t(90948),l=t(2261),a=t(87357),d=t(48263),s=t(62623),c=t(28492),u=t(23972),p=t(69397),v=t(44781),h=t(72299),x=t(65582),g=t(66832),f=t(13575),m=t(40703),y=(t(60439),t(7025),t(31748)),b=t(11163),j=t(41609),Z=t.n(j),C=t(91630),w=t(44547),P=t(87071),S=t(59466);const D=e=>{var o,t,i,r,n,l;const a=(0,S.H3)({brand:(null===e||void 0===e?void 0:e.manufactureName)||(null===e||void 0===e||null===(t=e.brandName)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.catalogName),productName:null===e||void 0===e?void 0:e.productSuggest,category:null===e||void 0===e||null===(r=e.productCategory)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.catalogName,subCategory:null===e||void 0===e||null===(l=e.productSubCategory)||void 0===l||null===(n=l[0])||void 0===n?void 0:n.catalogName});return"/Spares&Accessories/".concat(a,"/").concat(null===e||void 0===e?void 0:e._id)},k=()=>{var e,o,t,n,x,f,m,j,k,F,N,_;const q=(0,b.useRouter)(),L=q.query["Spares&Accessories"],z=Array.isArray(L)?L:[L].filter(
1Boolean),A=z[z.length-1],{data:R}=(0,y.aF)(A),I=(0,r.useMemo)((()=>{var e,o;return{pageNo:0,pageSize:12,productCategory:(null===R||void 0===R||null===(o=R.productCategory)||void 0===o||null===(e=o[0])||void 0===e?void 0:e.catalogName)||void 0}}),[null===R||void 0===R?void 0:R.productCategory]),{data:W=[]}=(0,y.FJ)(I),[E,M]=(0,r.useState)(!1);(0,r.useEffect)((()=>{if(!(null===R||void 0===R?void 0:R._id))return;const e=D(R);q.asPath.split("?")[0].replace(/\/$/,"")!==e&&q.replace(e,void 0,{shallow:!0})}),[null===R||void 0===R?void 0:R._id]);const T=((null===R||void 0===R?void 0:R.colorCodeList)||[]).flatMap((e=>[null===e||void 0===e?void 0:e.image1,null===e||void 0===e?void 0:e.image2,null===e||void 0===e?void 0:e.image3])).filter((e=>null===e||void 0===e?void 0:e.docURL)),B=[["Brand",(null===R||void 0===R?void 0:R.manufactureName)||(null===R||void 0===R||null===(e=R.brandName)||void 0===e?void 0:e.map((e=>e.catalogName)).join(", "))],["Category",null===R||void 0===R||null===(o=R.productCategory)||void 0===o?void 0:o.map((e=>e.catalogName)).join(", ")],["Sub Category",null===R||void 0===R||null===(t=R.productSubCategory)||void 0===t?void 0:t.map((e=>e.catalogName)).join(", ")],["Vehicle Type",null===R||void 0===R||null===(n=R.vehicleType)||void 0===n?void 0:n.map((e=>e.name)).join(", ")],["MRP",(null===R||void 0===R||null===(f=R.priceDetail)||void 0===f||null===(x=f[0])||void 0===x?void 0:x.mrp)?"\u20b9 ".concat(R.priceDetail[0].mrp):null],["Selling Price",(null===R||void 0===R?void 0:R.showPrice)?(0,S.T4)(null===R||void 0===R||null===(j=R.priceDetail)||void 0===j||null===(m=j[0])||void 0===m?void 0:m.sellingPrice):"Contact for price"],["Warranty",null===R||void 0===R?void 0:R.warranty],["Made In",null===R||void 0===R?void 0:R.madeIn]].filter((e=>{let[,o]=e;return null!==o&&void 0!==o&&""!==o})),V=e=>{q.push(D(e))};return(0,i.jsxs)(a.Z,{sx:{maxWidth:"1200px",margin:"0 auto",p:2},children:[(0,i.jsxs)(d.ZP,{container:!0,spacing:4,children:[(0,i.jsx)(d.ZP,{item:!0,xs:12,md:8,children:(0,i.jsx)(s.Z,{children:(0,i.jsx)(c.Z,{sx:{p:0},children:T.length>0?(0,i.jsx)(C.Z,{arrowStyles:{position:"absolute",zIndex:2,top:"calc(50% - 15px)",minWidth:"10px",height:"40px",cursor:"pointer",borderRadius:"50%",background:"#fff",border:"1px solid #1FCC79"},imageList:T}):(0,i.jsx)(w.Z,{})})})}),(0,i.jsx)(d.ZP,{item:!0,xs:20,md:4,children:(0,i.jsx)(s.Z,{children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(u.Z,{variant:"h4",sx:{fontWeight:"bold",mb:1},children:null===R||void 0===R?void 0:R.productSuggest}),(0,i.jsx)(u.Z,{sx:{fontSize:22,fontWeight:"bold",color:"#1FCC79",mb:1},children:"\u20b9XXX"}),(null===R||void 0===R||null===(F=R.priceDetail)||void 0===F||null===(k=F[0])||void 0===k?void 0:k.mrp)&&(0,i.jsxs)(u.Z,{sx:{fontSize:14,color:"#9FA5C0",textDecoration:"line-through",mb:1},children:["MRP: \u20b9",R.priceDetail[0].mrp]}),(0,i.jsx)(a.Z,{sx:{display:"flex",gap:1,mt:1,flexWrap:"wrap"},children:[null===R||void 0===R||null===(_=R.productCategory)||void 0===_||null===(N=_[0])||void 0===N?void 0:N.catalogName,null===R||void 0===R?void 0:R.manufactureName].filter(Boolean).map(((e,o)=>(0,i.jsx)(u.Z,{variant:"body2",sx:{backgroundColor:"#f5f5f5",padding:.5,paddingLeft:1,paddingRight:1,borderRadius:0,fontSize:12},children:e},o)))}),(0,i.jsx)(p.Z,{variant:"contained",onClick:()=>M(!0),sx:{mt:2,width:"fit-content",minHeight:{md:"44px",sm:"40px",xs:"40px"},borderRadius:"8px",background:"#1FCC79",textTransform:"none",px:2},children:"Contact Seller - Click for Details"})]})})}),(0,i.jsx)(d.ZP,{item:!0,xs:12,children:(0,i.jsx)(s.Z,{children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(u.Z,{variant:"h5",sx:{fontWeight:"bold",mb:2},children:"Product Specifications"}),(0,i.jsx)(d.ZP,{container:!0,spacing:2,children:B.map(((e,o)=>{let[t,r]=e;return(0,i.jsx)(d.ZP,{item:!0,xs:12,sm:6,md:4,children:(0,i.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",borderBottom:"1px solid #eee",py:1},children:[(0,i.jsxs)(u.Z,{variant:"body1",sx:{fontWeight:"bold"},children:[t,":"]}),(0,i.jsx)(u.Z,{variant:"body1",color:"text.secondary",children:r})]})},o)}))})]})})}),(null===R||void 0===R?void 0:R.productDescription)&&(0,i.jsx)(d.ZP,{item:!0,xs:12,children:(0,i.jsx)(s.Z,{children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(u.Z,{variant:"h5",sx:{fontWeight:"bold",mb:2},children:"Description"}),(0,i.jsx)(u.Z,{variant:"body1",color:"text.secondary",sx:{whiteSpace:"pre-line"},children:R.productDescription})]})})}),!Z()(W)&&W.filter((e=>(null===e||void 0===e?void 0:e._id)!==A)).length>0&&(0,i.jsx)(d.ZP,{item:!0,xs:12,children:(0,i.jsx)(s.Z,{children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(u.Z,{variant:"h5",sx:{fontWeight:"bold",mb:2},children:"Similar Products"}),(0,i.jsx)(l.tq,{navigation:!0,modules:[g.W_],spaceBetween:20,slidesPerView:3,breakpoints:{320:{slidesPerView:1},600:{slidesPerView:2},900:{slidesPerView:3}},children:W.filter((e=>(null===e||void 0===e?void 0:e._id)!==A)).map(((e,o)=>{var t,r,n,a,d;
1return(0,i.jsx)(l.o5,{children:(0,i.jsxs)(s.Z,{onClick:()=>V(e),sx:{maxWidth:300,margin:"auto",padding:2,cursor:"pointer"},children:[(0,i.jsx)(v.Z,{component:"img",height:"140",image:null===e||void 0===e||null===(n=e.colorCodeList)||void 0===n||null===(r=n[0])||void 0===r||null===(t=r.image1)||void 0===t?void 0:t.docURL,alt:null===e||void 0===e?void 0:e.productSuggest,sx:{cursor:"pointer",objectFit:"contain",transition:"transform 0.3s ease-in-out","&:hover":{transform:"scale(1.05)"}}}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(u.Z,{variant:"h6",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:null===e||void 0===e?void 0:e.productSuggest}),(0,i.jsx)(u.Z,{variant:"body2",color:"textSecondary",children:null===e||void 0===e?void 0:e.manufactureName}),(0,i.jsx)(u.Z,{variant:"subtitle1",sx:{mt:0},children:(null===e||void 0===e?void 0:e.showPrice)?(0,S.T4)(null===e||void 0===e||null===(d=e.priceDetail)||void 0===d||null===(a=d[0])||void 0===a?void 0:a.sellingPrice):"Contact for Price"})]}),(0,i.jsx)(h.Z,{children:(0,i.jsx)(p.Z,{size:"small",color:"primary",onClick:o=>{o.stopPropagation(),V(e)},children:"View Details"})})]})},o)}))})]})})})]}),(0,i.jsx)(P.Z,{open:E,onClose:()=>M(!1)})]})},F=(0,n.ZP)("div")((e=>{let{theme:o}=e;return{overflow:"hidden",position:"relative",backgroundColor:o.palette.background.default}}));function N(){return(0,i.jsx)(m.Z,{title:"ServicePlug | Spare Part Details",children:(0,i.jsx)(F,{children:(0,i.jsx)(a.Z,{sx:{py:4},children:(0,i.jsx)(x.Z,{children:(0,i.jsx)(k,{})})})})})}N.getLayout=function(e){return(0,i.jsx)(f.Z,{variant:"main",children:e})},o.default=N},31748:function(e,o,t){"use strict";t.d(o,{FJ:function(){return S},PE:function(){return j},RR:function(){return Z},_d:function(){return P},aF:function(){return D},ju:function(){return w},sX:function(){return C}});var i=t(63213),r=t(36492);const n="spareCategories",l="spareSubCategories",a="sparePartnerCatalog",d="spareBrands",s="spareManufacturers",c="sparePartnerProducts",u="sparePartnerProductDetail",p="/category",v="/subCategory",h="/brand",x="/productBrand",g="/product/partner/public/getAllCustomerCategoriesAndSubCategories",f="/product/partner/public/getAllProducts",m="/product/partner/getProductDetailByProductId/productId";async function y(){var e;const o=await i.Z.get(p,{params:{catalogType:"productCategory"}});return(null===o||void 0===o||null===(e=o.data)||void 0===e?void 0:e.list)||[]}async function b(){var e;const o=await i.Z.get(g);return(null===o||void 0===o||null===(e=o.data)||void 0===e?void 0:e.result)||{uniqueProductCategory:[],uniqueProductSubCategory:[]}}const j=()=>(0,r.a)({queryKey:[n],queryFn:y,placeholderData:[]}),Z=e=>(0,r.a)({queryKey:[l,e],queryFn:()=>async function(e){var o;const t=await i.Z.post(v,{categoryList:e,catalogType:"productSubCategory"});return(null===t||void 0===t||null===(o=t.data)||void 0===o?void 0:o.list)||[]}(e),enabled:!!e,placeholderData:[]}),C=()=>(0,r.a)({queryKey:[a],queryFn:b,placeholderData:{uniqueProductCategory:[],uniqueProductSubCategory:[]}}),w=e=>(0,r.a)({queryKey:[d,e],queryFn:()=>async function(e){var o;const t=await i.Z.post(h,{category:"Showroom",subCategoryList:[e]});return(null===t||void 0===t||null===(o=t.data)||void 0===o?void 0:o.list)||[]}(e),enabled:!!e,placeholderData:[]}),P=e=>(0,r.a)({queryKey:[s,null===e||void 0===e?void 0:e._id],queryFn:()=>async function(e){var o;const t=await i.Z.post(x,{subCategoryList:[e]});return(null===t||void 0===t||null===(o=t.data)||void 0===o?void 0:o.list)||[]}(e),enabled:!!e,placeholderData:[]}),S=e=>(0,r.a)({queryKey:[c,e],queryFn:()=>async function(e){var o;const t=await i.Z.get(f,{params:e});return(null===t||void 0===t||null===(o=t.data)||void 0===o?void 0:o.result)||[]}(e),placeholderData:[]}),D=e=>(0,r.a)({queryKey:[u,e],queryFn:()=>async function(e){var o;const t=await i.Z.get(m,{params:{partnerProductId:e}});return(null===t||void 0===t||null===(o=t.data)||void 0===o?void 0:o.result)||null}(e),enabled:!!e,placeholderData:null})}},function(e){e.O(0,[12,3888,8674,6854,4559,2679,2019,254,5776,3575,9774,2888,179],(function(){return o=20412,e(e.s=o);var o}));var o=e.O();_N_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.