1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1204],{76599:function(e,t,o){o.d(t,{Z:function(){return u}});var n=o(85893),l=o(45785),s=o(6250),r=o(67294),a=o(73935),i=o(57851),c=o(65478);function u(e){var t;let{children:o,showModal:u,overflow:d,closeModal:f,titleTextStyle:x="text-sm font-semibold lg:text-[1rem] lg:text-base",showClose:m,newPopup:p,title:h,titleExtraStyle:g,containerExtraStyle:v,modalExtraStyle:b,height:w,flatBorder:j,closeIcon:y,hideHeader:_,hBorder:N=!1,scrollDisable:k,duration:E=500,allowClose:q=!0,w:S="w-[100%] lg:w-[60%] lg:max-w-[700px]",contentStyle:F={}}=e,[C,M]=(0,r.useState)(Object),[A,D]=(0,r.useState)(u),[O,B]=(0,r.useState)((null==e?void 0:e.position)||"default"),{isDesktop:L}=(0,s.Z)();(0,r.useEffect)(()=>{B(e.position)},[e.position]),(0,r.useEffect)(()=>{A&&(!0===L||"center"===O?M({content:{bottom:"50vh",transform:"translateY(50%)"},footer:{opacity:1}}):M({content:{bottom:"0px",transform:"none"},footer:{opacity:1}}))},[L]),(0,r.useEffect)(()=>{u?P():T("initial")},[u]);let P=()=>{D(!0),document.body.style.overflow="hidden",setTimeout(()=>{M({...C,content:{bottom:window.innerWidth>1023||"center"===O?"50vh":"0px",transform:window.innerWidth>1023||"center"===O?"translateY(50%)":"none"},footer:{opacity:1}})},Math.max(100,Math.floor(E/2)))},T=e=>{document.body.style.overflow="unset",M({...C,content:{bottom:"-1000px"},footer:{opacity:.2}}),setTimeout(()=>{f(e),D(!1)},Math.max(100,Math.floor(E/2)))};return((0,r.useEffect)(()=>{if(e.onScroll)return window.addEventListener("scroll",e.onScroll,!0),()=>{window.removeEventListener("scroll",e.onScroll,!0)}},[e.onScroll]),(0,r.useEffect)(()=>(A&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="unset"}),[A]),(0,l.sk)())?null:(0,n.jsx)(n.Fragment,{children:a.createPortal((0,n.jsx)(n.Fragment,{children:A&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-[1050] outline-none focus:outline-none ".concat(b||""),children:[(0,n.jsx)("div",{className:"absolute w-full h-full",onClick:e=>{e.stopPropagation(),q&&T("outside_click")}}),(0,n.jsxs)("div",{style:{...C.content,...null!==(t=e.contentStyles)&&void 0!==t?t:{}},className:"fixed mx-auto ".concat(S," transition-all ").concat(d||""," duration-[").concat(E,"ms] ease-in-out opacity-1 -bottom-[1000px]"),children:[null==e?void 0:e.topSibling,(0,n.jsxs)("div",{style:{height:w,...F},className:"border-0 shadow-lg flex flex-col w-full outline-none focus:outline-none ".concat(p?"lg:hide-scrollbar overflow-y-auto max-h-full":"relative"," ").concat(j?"":"".concat(!0===L||"center"===O?"rounded-2xl":"rounded-t-2xl")," ").concat(k?"":"overflow-y-auto"," ").concat(v||"bg-[#fff]"),children:[!_&&(0,n.jsx)("div",{className:"p-4 pb-[.88rem] pt-5 flex items-start justify-between rounded-t-2xl ".concat(N?"border-b border-[#F5F5F5]":""," "),children:h&&(0,n.jsx)("div",{className:"flex-1 ".concat(e.primary?"text-[#152F6D]":""," ").concat(x," ").concat(g),children:h})}),m&&(0,n.jsx)("button",{"aria-label":"close",className:(0,i.m)("float-right p-2 ml-auto border-0 ".concat(p?"absolute top-0 Mlg:top-[1rem] right-[3rem] Mlg:right-[1rem] bg-[#fff] rounded-[50%] p-1.5":""),e.closeClasses),onClick:()=>q&&T("close_icon"),children:y||(0,n.jsx)(c.hU,{className:"w-[1rem] lg:w-[1.11rem] h-auto text-[#152F6D]",src:"/static/images/big-cross.svg",alt:"cross icon"})}),o]})]})]}),(0,n.jsx)("div",{style:{...C.footer},className:"fixed inset-0 z-[1040] bg-[#00000080] transition-all duration-[".concat(E,"ms] ease-in-out ")})]})}),document.body)})}},18585:function(e,t,o){function n(e,t){let o=Object.keys(e).length>0;return o?t.filter(t=>{var o;let n=null!==(o=t.attributes)&&void 0!==o?o:{},l=Object.keys(n),s=l.some(t=>e[t]);return!!s&&l.every(t=>{let o=e[t];return!o||o.includes(n[t])})}).map(e=>e.sku_id):[]}function l(e,t,o,n){var l,s;return{id:e.id,title:e.title,slug:e.group_slug||e.slug,sku:e.default_sku,image:e.image,categoryName:(null===(l=e.generic_name)||void 0===l?void 0:null===(s=l.category)||void 0===s?void 0:s.name)||"",attrList:t,selectedAttributes:o,variants:n}}o.d(t,{Q:function(){return l},t:function(){return n}})},91204:function(e,t,o){o.d(t,{Z:function(){return v}});var n=o(85893),l=o(87599),s=o(76599),r=o(18585),a=o(5152),i=o.n(a),c=o(65478),u=o(67294),d=o(45785),f=
1o(72074),x=o(95578),m=o(9021),p=o(18853);let h=i()(()=>o.e(577).then(o.bind(o,20577)),{loadableGenerated:{webpack:()=>[20577]},ssr:!1}),g=i()(()=>o.e(2494).then(o.bind(o,82494)),{loadableGenerated:{webpack:()=>[82494]},ssr:!1});function v(e){var t,o,a,i;let{product:v,category:b=""}=e,w=null!==(i=v.variant_attributes_values)&&void 0!==i?i:{},[j,y]=(0,u.useState)({}),[_,N]=(0,u.useState)([]),[k,E]=(0,u.useState)(null),q=(0,u.useCallback)((e,t)=>{y(o=>{var n;let l=null!==(n=o[e])&&void 0!==n?n:[],s=l.includes(t)?l.filter(e=>e!==t):[...l,t];if(0===s.length){let{[e]:t,...n}=o;return n}return{...o,[e]:s}})},[]),S=Object.keys(j).length>0,F=1===v.variant_count,C=(0,u.useRef)(!1),M=(0,u.useMemo)(()=>F?v.default_sku?[v.default_sku]:[]:(0,r.t)(j,_),[F,v.default_sku,j,_]),A=e=>{if(e.stopPropagation(),e.preventDefault(),(0,f.X2)(p.L.ExportRequestQuote,{source:"product_card",product_name:v.title,product_sku:v.default_sku}),F){let e={};Object.entries(w).forEach(t=>{let[o,n]=t;e[o]=[...n]}),y(e),E("quote")}else E("variants"),(0,x.Pj)(v.group_slug||v.slug).then(e=>{var t,o;N((null!==(t=null==e?void 0:e.variants)&&void 0!==t?t:[]).map(e=>({sku_id:e.sku_id,attributes:null!==(o=e.attributes)&&void 0!==o?o:{}})))}).catch(()=>{})},D=()=>{C.current=!0,E("quote")},O=()=>{if(C.current){C.current=!1;return}E(null),y({})},B=()=>{E(null),y({})},L="string"==typeof v.generic_name?v.generic_name:(null===(t=v.generic_name)||void 0===t?void 0:t.name)||"Lorem Ipsum....",P="/export/products/".concat(v.slug,"?sku_id=").concat(v.default_sku);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.Gw,{new:!0,href:P,className:"bg-white rounded-lg border border-[#DBDFE8] overflow-hidden flex flex-col cursor-pointer hover:shadow-lg transition-shadow w-full lg:h-[335px]",children:[(0,n.jsx)("div",{className:"w-full flex items-center justify-center p-2 h-[100px] lg:h-[180px]",children:(0,n.jsx)(l.Z,{src:v.image||"/static/images/no-image-found.svg",alt:v.title,className:"object-contain max-w-full max-h-full"})}),(0,n.jsx)("div",{className:"border-t border-[#E9EBEF]"}),(0,n.jsxs)("div",{className:"flex flex-col items-start text-left px-2 lg:px-3 py-2 lg:py-3 flex-1",children:[(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)("h3",{className:"font-jost font-600 text-[#1F3580] leading-tight text-left line-clamp-2 mb-1 lg:mb-4 text-[11px] lg:text-[14px] h-[28px] lg:h-[35px] overflow-hidden",children:v.title}),(0,n.jsxs)("p",{className:"font-jost leading-tight text-left line-clamp-1 text-[8px] lg:text-[12px]",children:[(0,n.jsx)("span",{className:"font-400 text-[#5A6274]",children:"Generic Name: "}),(0,n.jsx)("span",{className:"font-600 text-[#22262E]",children:L})]})]}),(0,n.jsxs)("div",{className:"mt-auto w-full",children:[(0,n.jsx)("div",{className:"w-full border-t border-dashed border-[#DBDFE8] my-2 lg:my-2"}),(0,n.jsxs)("button",{onClick:A,className:"w-full h-[44px] rounded-[10px] border border-[#1A73E8] text-[#1A73E8] text-[13px] lg:text-[14px] font-600 transition-colors flex flex-col items-center justify-center leading-tight",children:[(0,n.jsx)("span",{children:"Enquire now"}),!F&&v.variant_count>1&&(0,n.jsxs)("span",{className:"text-[10px] lg:text-[11px] font-400 text-[#5A6274] mt-0.5",children:[v.variant_count," Options"]})]})]})]})]}),(0,n.jsx)(s.Z,{showModal:"variants"===k,closeModal:O,showClose:!0,closeIcon:(0,n.jsx)("span",{className:"text-[18px] text-[#555]",children:"â"}),closeClasses:"absolute top-4 right-4 w-8 h-8 rounded-full bg-[#f0f0f0] flex items-center justify-center p-0 z-10",title:"Select Variants",hBorder:!0,w:"w-[95%] lg:w-[500px]",containerExtraStyle:"bg-white max-h-[90vh]",children:(0,n.jsxs)("div",{className:"overflow-y-auto px-4 pb-6",children:[(0,n.jsx)("p",{className:"text-sm text-gray-700 font-500 mb-4",children:v.title}),(0,n.jsx)(h,{attrList:w,selectedAttributes:j,onToggle:q}),!S&&(0,n.jsx)("p",{className:"text-xs text-[#E86A18] mt-3",children:"Please select at least one variant to request a quote"}),(0,n.jsxs)("button",{disabled:!S,onClick:D,className:"mt-4 w-full flex items-center justify-center gap-2 py-3 rounded-md text-white text-sm font-600 transition-opacity ".concat(S?"bg-orange hover:opacity-90":"bg-[#ccc] cursor-not-allowed"),children:["REQUEST QUOTE",(0,n.jsx)("span",{className:"w-5 h-5 rounded-full border border-white flex items-center justify-center text-xs leading-none",children:"+"})]})]})}),"quote"===k&&(0,n.jsx)(g,{onClose:B,onBack:F?void 0:()=>E("variants"),onSuccess:()=>(0,d.PY)(m.Y.ExportEnquireNow),products:[{title:v.title,slug:v.slug,sku:v.default_sku,categoryName:null===(o=v.generic_name)||void 0===o?void 0:null===(a=o.category)||void 0===a?void 0:a.name,selectedAttributes:j,skuIds:M}]})]})}},9021:function(e,t,o){var n,l;o.d(t,{Y:function(){return n}}),(l=n||(n={})).ViewItem="view_item",l.AddToCart="add_to_cart",l.BuyNow="buy_now_new",l.LeadEnquiryFormSubmit="lead_enquiry_form_submit",l.ExportUploadRfq="export_upload_rfq",l.ExportRequestQuote="export_request_quote",l.ExportEnquireNow="export_enquire_now"}}]);
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.