1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1799],{90956:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var l=r(24246),i=r(27378),n=r(93967),s=r.n(n),a=r(12023),o=r(51526),d=r(49948),c=r(84353);let u=e=>{let{i:t,expanded:r,setExpanded:i,titleKey:n,title:u,content:m,contentKey:x,translatorNS:h,variant:v="gray"}=e,p=t===r,g=(0,c.t)({description:x||m}),{t:f}=(0,d.$G)(h);return(0,l.jsxs)("div",{className:s()({"rounded-md bg-gray-200":"gray"===v,"shadow-sm":p}),children:[(0,l.jsxs)(a.E.header,{initial:!1,onClick:()=>i(!p&&t),className:s()("cursor-pointer flex items-center justify-between transition-colors py-5 md:py-6",{"px-6 md:px-8 lg:px-10":"gray"===v,"border-t border-gray-300":"transparent"===v}),children:[(0,l.jsx)("h2",{className:s()("text-sm font-semibold leading-relaxed text-heading ltr:pr-2 rtl:pl-2",{"md:text-base":"gray"===v,"md:text-base lg:text-lg":"transparent"===v}),children:n?f(n):u}),(0,l.jsxs)("div",{className:"flex-shrink-0 relative w-4 h-4 flex justify-center items-center",children:[(0,l.jsx)("div",{className:"w-full h-0.5 bg-heading rounded-sm"}),(0,l.jsx)("div",{className:"origin-bottom transform w-0.5 h-full bg-heading rounded-sm absolute bottom-0 transition-transform duration-500 ease-in-out ".concat(p?"scale-0":"scale-100")})]})]}),(0,l.jsx)(o.M,{initial:!1,children:p&&(0,l.jsx)(a.E.div,{initial:"from",animate:"to",exit:"from",variants:{from:{opacity:0,height:0,transition:{ease:[.04,.62,.23,.98]}},to:{opacity:1,height:"auto",transition:{ease:[.04,.62,.23,.98]}}},children:(0,l.jsx)("div",{className:s()("pb-6 md:pb-7 leading-7 text-sm text-gray-600",{"pt-5 border-t border-gray-300 px-6 md:px-8 lg:px-10":"gray"===v}),children:g?(0,l.jsx)("div",{className:"react-editor-description",dangerouslySetInnerHTML:{__html:g}}):""})},"content")})]})};var m=e=>{let{items:t,translatorNS:r,variant:n="gray"}=e,[s,a]=(0,i.useState)(0);return(0,l.jsx)(l.Fragment,{children:null==t?void 0:t.map((e,t)=>(0,l.jsx)(u,{i:t,titleKey:null==e?void 0:e.faq_title,contentKey:null==e?void 0:e.faq_description,expanded:s,setExpanded:a,variant:n,translatorNS:r},t))})}},43279:function(e,t,r){"use strict";r.d(t,{x:function(){return c},Z:function(){return u}});var l=r(24246),i=r(27378),n=r(49421),s=r(11163),a=r(49948);let o=e=>{let{children:t,...r}=e;return(0,l.jsx)("li",{className:"text-sm text-body px-2.5 transition duration-200 ease-in ltr:first:pl-0 rtl:first:pr-0 ltr:last:pr-0 rtl:last:pl-0 hover:text-heading",...r,children:t})},d=e=>{let{children:t,...r}=e;return(0,l.jsx)("li",{className:"text-base text-body mt-0.5",...r,children:t})},c=e=>{let t=i.Children.toArray(e.children);t=t.map((e,t)=>(0,l.jsx)(o,{children:e},"breadcrumb_item".concat(t)));let r=t.length-1;return t=t.reduce((t,i,n)=>(n<r?t.push(i,(0,l.jsx)(d,{children:e.separator},"breadcrumb_sep".concat(n))):t.push(i),t),[]),(0,l.jsx)("div",{className:"flex items-center mayaBreadcrumb",children:(0,l.jsx)("ol",{className:"flex items-center w-full overflow-hidden",children:t})})};var u=e=>{let{separator:t="/"}=e,r=function(){let e=(0,s.useRouter)(),[t,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(e){let t=e.asPath.split("/");t.shift();let l=t.map((e,r)=>({breadcrumb:e,href:"/"+t.slice(0,r+1).join("/")}));r(l)}},[e]),t}(),{t:o}=(0,a.$G)("common");return(0,l.jsxs)(c,{separator:t,children:[(0,l.jsx)(n.Z,{href:"/",activeClassName:"font-semibold text-heading",children:o("breadcrumb-home")}),null==r?void 0:r.map(e=>(0,l.jsx)(n.Z,{href:e.href,className:"capitalize",activeClassName:"font-semibold text-heading",children:e.breadcrumb.replace(/-/g," ").replace(/oe/g,"\xf6").replace(/ae/g,"\xe4").replace(/ue/g,"\xfc").toLowerCase()},e.href))]})}},33365:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var l=r(24246),i=e=>{let{color:t="currentColor",width:r="10px",height:i="2px"}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:i,viewBox:"0 0 12 1.5",children:(0,l.jsx)("rect",{"data-name":"Rectangle 970",width:r,height:i,fill:t})})};let n=e=>{let{color:t="currentColor",width:r="10px",height:i="10px"}=e;return(0,l.jsx)("svg",{"data-name":"plus (2)",xmlns:"http://www.w3.org/2000/svg",width:r,height:i,viewBox:"0 0 12 12",children:(0,l.jsx)("g",{"data-name":"Group 5367",children:(0,l.jsx)("path",{"data-name":"Path 17138",d:"M6.749,5.251V0h-1.5V5.251H0v1.5H5.251V12h1.5V6.749H12v-1.5Z",fill:t})})})};var s=r(93967),a=r.n(s),o=e=>{let{quantity:t,onDecrement:r,onIncrement:s,disableIncrement:o=!1,disableDecrement:d=!1,variant:c="default"}=e,u="dark"!==c?"12px":"10px";return(0,l.jsxs)("div",{className:a()("group flex items-center justify-between rounded-md overflow-hidden flex-shrink-0",{"border h-11 md:h-12 border-gray-300":"default"===c,"h-8 md:h-9 shadow-navigation bg-heading":"dark"===c}),children:[(0,l.jsx)("button",{onClick:r,className:a()("flex items-center justify-center flex-shrink-0 h-full transition ease-in-out duration-300 focus:outline-none",{"w-10 md:w-12 text-heading ltr:border-r rtl:border-l border-gray-300 hover:text-white hover:bg-heading":"default"===c,"w-8 md:w-9 text-white bg-heading hover:bg-gray-600 focus:outline-none":"dark"===c}),disabled:d,children:(0,l.jsx)(i,{width:u})}),(0,l.jsx)("span",{className:a()("font-semibold flex items-center justify-center h-full transition-colors duration-250 ease-in-out cursor-default flex-shrink-0",{"text-base text-heading w-12 md:w-20 xl:w-24":"default"===c,"text-sm text-white w-8 md:w-10 ":"dark"===c}),children:t}),(0,l.jsx)("button",{onClick:s,className:a()("flex items-center justify-center h-full flex-shrink-0 transition ease-in-out duration-300 focus:outline-none",{"w-10 md:w-12 text-heading ltr:border-l rtl:border-r border-gray-300 hover:text-white hover:bg-heading":"default"===c,"w-8 md:w-9 text-white bg-heading hover:bg-gray-600 focus:outline-none":"dark"===c}),disabled:o,children:(0,l.jsx)(n,{width:u,height:u})})]})}},84306:function(e,t,r){"use strict";r.d(t,{G:function(){return d}});
1var l=r(24246),i=r(86506),n=r(57460),s=r(29004),a=r(79395);let o=e=>{let{children:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,l.jsx)(i.Z,{}),(0,l.jsx)("main",{className:"relative flex-grow",style:{minHeight:"-webkit-fill-available",WebkitOverflowScrolling:"touch"},children:t}),(0,l.jsx)(n.Z,{}),(0,l.jsx)(s.Z,{}),(0,l.jsx)(a.Z,{})]})},d=e=>(0,l.jsx)(o,{children:e});t.Z=o},70634:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var l=r(24246);let i=e=>(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M13.73 3.51014L15.49 7.03014C15.73 7.52014 16.37 7.99014 16.91 8.08014L20.1 8.61014C22.14 8.95014 22.62 10.4301 21.15 11.8901L18.67 14.3701C18.25 14.7901 18.02 15.6001 18.15 16.1801L18.86 19.2501C19.42 21.6801 18.13 22.6201 15.98 21.3501L12.99 19.5801C12.45 19.2601 11.56 19.2601 11.01 19.5801L8.02 21.3501C5.88 22.6201 4.58 21.6701 5.14 19.2501L5.85 16.1801C5.98 15.6001 5.75 14.7901 5.33 14.3701L2.85 11.8901C1.39 10.4301 1.86 8.95014 3.9 8.61014L7.09 8.08014C7.62 7.99014 8.26 7.52014 8.5 7.03014L10.26 3.51014C11.22 1.60014 12.78 1.60014 13.73 3.51014Z",stroke:"currentColor","stroke-width":"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),n=e=>(0,l.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M5.74 16C5.85 15.51 5.65 14.81 5.3 14.46L2.87 12.03C2.11 11.27 1.81 10.46 2.03 9.76C2.26 9.06 2.97 8.58 4.03 8.4L7.15 7.88C7.6 7.8 8.15 7.4 8.36 6.99L10.08 3.54C10.58 2.55 11.26 2 12 2C12.74 2 13.42 2.55 13.92 3.54L15.64 6.99C15.77 7.25 16.04 7.5 16.33 7.67L5.56 18.44C5.42 18.58 5.18 18.45 5.22 18.25L5.74 16Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M18.7 14.4599C18.34 14.8199 18.14 15.5099 18.26 15.9999L18.95 19.0099C19.24 20.2599 19.06 21.1999 18.44 21.6499C18.19 21.8299 17.89 21.9199 17.54 21.9199C17.03 21.9199 16.43 21.7299 15.77 21.3399L12.84 19.5999C12.38 19.3299 11.62 19.3299 11.16 19.5999L8.23 21.3399C7.12 21.9899 6.17 22.0999 5.56 21.6499C5.33 21.4799 5.16 21.2499 5.05 20.9499L17.21 8.7899C17.67 8.3299 18.32 8.1199 18.95 8.2299L19.96 8.3999C21.02 8.5799 21.73 9.0599 21.96 9.7599C22.18 10.4599 21.88 11.2699 21.12 12.0299L18.7 14.4599Z",fill:"currentColor"})]}),s=e=>(0,l.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{opacity:"0.4",d:"M5.74 16C5.85 15.51 5.65 14.81 5.3 14.46L2.87 12.03C2.11 11.27 1.81 10.46 2.03 9.76C2.26 9.06 2.97 8.58 4.03 8.4L7.15 7.88C7.6 7.8 8.15 7.4 8.36 6.99L10.08 3.54C10.58 2.55 11.26 2 12 2C12.74 2 13.42 2.55 13.92 3.54L15.64 6.99C15.77 7.25 16.04 7.5 16.33 7.67L5.56 18.44C5.42 18.58 5.18 18.45 5.22 18.25L5.74 16Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M18.7 14.4599C18.34 14.8199 18.14 15.5099 18.26 15.9999L18.95 19.0099C19.24 20.2599 19.06 21.1999 18.44 21.6499C18.19 21.8299 17.89 21.9199 17.54 21.9199C17.03 21.9199 16.43 21.7299 15.77 21.3399L12.84 19.5999C12.38 19.3299 11.62 19.3299 11.16 19.5999L8.23 21.3399C7.12 21.9899 6.17 22.0999 5.56 21.6499C5.33 21.4799 5.16 21.2499 5.05 20.9499L17.21 8.7899C17.67 8.3299 18.32 8.1199 18.95 8.2299L19.96 8.3999C21.02 8.5799 21.73 9.0599 21.96 9.7599C22.18 10.4599 21.88 11.2699 21.12 12.0299L18.7 14.4599Z",fill:"currentColor"})]});r(27378);var a=r(33575);function o(e){let{rating:t,editable:r=!1,onChange:o}=e;return(0,l.jsx)(a.Z,{value:t,count:5,edit:!!r&&r,size:24,emptyIcon:(0,l.jsx)(i,{}),fullIcon:(0,l.jsx)(n,{}),halfIcon:(0,l.jsx)(s,{}),onChange:o})}},28092:function(e,t,r){"use strict";r.d(t,{P:function(){return o}});var l=r(24246),i=r(93967),n=r.n(i),s=r(27378),a=r(24360);let o=e=>{let{className:t="mb-4",title:r,attributes:i,active:o,onClick:d,clearAttribute:c,variant:u="default"}
1=e,[m,x]=(0,s.useState)({[r]:o});return(0,l.jsxs)("div",{className:t,children:[(0,l.jsx)("h3",{className:n()("font-semibold capitalize","default"===u?"text-base md:text-lg text-heading mb-2.5":"text-base text-black tracking-[-0.16px] mb-2"),children:r}),(0,l.jsx)("ul",{className:n()("colors flex flex-wrap","default"===u?"ltr:-mr-3 rtl:-ml-3":"gap-2 mb-1"),children:null==i?void 0:i.map(e=>{let{id:t,value:i,meta:s}=e;return(0,l.jsx)("li",{className:(0,a.m6)(n()("cursor-pointer","default"===u?n()("rounded border min-w-[36px] md:min-w-[44px] min-h-[36px] md:min-h-[44px] p-1 mb-2 md:mb-3 ltr:mr-2 rtl:ml-2 ltr:md:mr-3 rtl:md:ml-3 flex justify-center items-center text-heading text-xs md:text-sm uppercase font-semibold transition duration-200 ease-in-out hover:border-black",i===m[r]?"border-black":"border-gray-100",{"px-3 md:px-3.5":"size"===r}):n()("rounded-md overflow-hidden relative","size"===r?"px-[12px] py-[7px] text-sm text-black tracking-[-0.14px] bg-[#F1F1F1] border border-solid border-[#E6E6E6]":"w-8 h-8 before:absolute before:top-0 before:left-0 before:h-full before:w-full before:border-2 before:border-solid before:border-transparent before:rounded-md",i===m[r]?"size"===r?"bg-white border-black border-2":"before:border-black shadow-variationButton":""))),onClick:()=>{d({[r]:i}),x({[r]:i})},children:"color"===r||"colors"===r?(0,l.jsx)("span",{className:"h-full w-full rounded block",style:{backgroundColor:null!=s?s:i}}):i},"".concat(i,"-").concat(t))})}),m[r]?(0,l.jsx)("span",{className:"cursor-pointer text-red-500 text-xs",onClick:()=>{x({[r]:""}),c()},children:"Clear"}):""]})}},13603:function(e,t,r){"use strict";r.d(t,{Z:function(){return eo}});var l=r(24246),i=r(27378),n=r(60802),s=r(33365),a=r(57297),o=r(28173),d=r(71246),c=r(5294),u=r(28092),m=r(90104),x=r.n(m),h=r(8152),v=r(25675),p=r.n(v),g=r(51454),f=r(84905),b=r(60485),j=r(9035),y=r(56141),w=r.n(y),N=r(5259),C=r(49948),k=r(97425),_=r(43739),q=r.n(_),Z=r(5152),L=r.n(Z),R=r(84353),S=r(66613);let A={768:{slidesPerView:5,spaceBetween:12},0:{slidesPerView:1}};function I(e){var t,r;let{product:n}=e,[s,a]=i.useState(null==n?void 0:n.image),o=[null==n?void 0:n.image,...null==n?void 0:n.gallery],d=n.variation_options;function c(e){let t=(null==e?void 0:e.image)||e;a(t)}return(0,i.useEffect)(()=>{(null==n?void 0:n.image)&&a(n.image)},[null==n?void 0:n.id]),(0,l.jsxs)("div",{className:"col-span-4 space-y-4",children:[s&&(0,l.jsx)("div",{className:"w-full aspect-square bg-gray-300 rounded-xl relative",children:(0,l.jsx)(p(),{fill:!0,loading:"lazy",quality:100,sizes:"(max-width: 768px) 100vw",src:null==s?void 0:s.original,alt:"".concat(null==n?void 0:n.name),className:"object-contain w-full rounded-xl h-full"})}),(0,l.jsx)(b.Z,{breakpoints:A,className:"",prevActivateId:"productLightboxPrev",nextActivateId:"productLightboxNext",children:(null==o?void 0:o.length)>1?(0,l.jsxs)(l.Fragment,{children:[null==o?void 0:o.map((e,t)=>{var r;return(0,l.jsx)(j.o5,{className:"p-2 mb-2",children:(0,l.jsx)("div",{className:(0,S.cn)("relative flex col-span-1 transition duration-150 ease-in hover:opacity-90 bg-gray-300 cursor-pointer aspect-square rounded-xl overflow-hidden",(null==s?void 0:s.id)===(null==e?void 0:e.id)&&"ring-2 ring-offset-2 ring-primary-default ring-offset-white"),onClick:()=>c(e),children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(r=null==e?void 0:e.original)&&void 0!==r?r:"/assets/placeholder/products/product-gallery.svg",alt:"".concat(null==n?void 0:n.name,"--").concat(t),className:"object-contain w-full "})})},"product-lightbox-key-".concat(t))}),null==d?void 0:d.map((e,t)=>{var r,i,a,o;return(null==e?void 0:null===(r=e.image)||void 0===r?void 0:r.original)?(0,l.jsx)(j.o5,{className:"p-2 mb-2",children:(0,l.jsx)("div",{className:(0,S.cn)("relative flex col-span-1 transition duration-150 ease-in hover:opacity-90 bg-gray-300 cursor-pointer aspect-square rounded-xl overflow-hidden",(null==s?void 0:s.id)===(null==e?void 0:null===(i=e.image)||void 0===i?void 0:i.id)&&"ring-2 ring-offset-2 ring-primary-default ring-offset-white"),onClick:()=>c(e),children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(o=null==e?void 0:null===(a=e.image)||void 0===a?void 0:a.original)&&void 0!==o?o:"/assets/placeholder/products/product-gallery.svg",alt:"".concat(null==n?void 0:n.name,"--").concat(t),className:"object-contain w-full"})})},"product-lightbox-key-".concat(t)):null})]}):(0,l.jsx)(j.o5,{children:(0,l.jsx)("div",{className:"flex col-span-1 transition duration-150 ease-in hover:opacity-90",children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(r=null==o?void 0:null===(t=o[0])||void 0===t?void 0:t.original)&&void 0!==r?r:"/assets/placeholder/products/product-gallery.svg",alt:null==n?void 0:n.name,className:"object-cover w-full"})})},"product-gallery-key")})]})}var P=r(50163),T=r(70634),E=r(55484),B=r(88039),O=r(43647),V=r(23091),F=r(95414),z=r(30764),D=r(49260),Q=r(56552),H=r(37786),M=r(12511);function $(e,t){if(!t||0===e.length)return null;let r=e.find(e=>e.products.find(e=>e.id==t));return r?r.id:null}let W=E.Ry().shape({rating:E.Rx().required("Rating is required").min(1,"Rating must be at least 1").max(5,"Rating cannot be more than 5"),comment:E.Z_().required("Comment is required").min(10,"Comment must be at least 10 characters").max(500,"Comment cannot be more than 500 characters")});function G(e){var t,r;let{product:i}=e,{width:s}=(0,z.Z)(),{me:a,loading:o,isAuthorized:d}=(0,M.aF)(),{isLoading:c,mutate:u,isSuccess:m}=function(e){let t=(0,Q.useQueryClient)();return(0,Q.useMutation)(D.Z.productReviews.create,{onSuccess:()=>{t.invalidateQueries(H.P.REVIEWS)},onSettled:()=>{(0,g.Am)("Review Added",{type:"dark",progressClassName:"fancy-progress-bar",position:e>768?"bottom-right":"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0})}})}(s),{register:x,handleSubmit:h,setValue:v,formState:p}=(0,B.cI)({defaultValues:{rating:0,comment:""},resolver:(0,O.X)(W)});return(0,l.jsxs)("div",{className:"py-10",children:[(0,l.jsx)("h4",{className:"text-xl font-semibold",children:"Add Review"}),(0,l.jsxs)("form",{onSubmit:h(e=>{var t;let r=null==i?void 0:null===(t=i.shop)||void 0===t?void 0:t.id,l=i.id,n=$((null==a?void 0:a.last_orders)||[],l);if(!d){(0,g.Am)("You must be logged in to add a review",{type:"dark",progressClassName:"fancy-progress-bar",position:s>768?"bottom-right":"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0});return}if(!n||!r||!l){(0,g.Am)("You must purchase the product before adding a review",{type:"dark",progressClassName:"fancy-progress-bar",position:s>768?"bottom-right":"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0});return}let o={...e,shop_id:r,product_id:l,order_id:n};u(o),m&&(v("rating",0),v("comment",""),(0,g.Am)("Review Added",{type:"dark",progressClassName:"fancy-progress-bar",position:s>768?"bottom-right":"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}))}),className:"space-y-6 mt-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,l.jsx)(V.Z,{htmlFor:"comment",className:"!mb-0",children:"Your Rating"}),(0,l.jsx)(T.Z,{rating:0,editable:!0,onChange:e=>{console.log("New rating is ",e),v("rating",e,{shouldValidate:!0})}})]}),(null==p?void 0:null===(t=p.errors)||void 0===t?void 0:t.rating)&&(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"text-sm text-red-600",children:p.errors.rating.message})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(V.Z,{htmlFor:"comment",children:"Review"}),(0,l.jsx)(F.Z,{id:"comment",...x("comment"),className:"mt-4"}),(null==p?void 0:null===(r=p.errors)||void 0===r?void 0:r.comment)&&(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"text-sm text-red-600",children:p.errors.comment.message})})]}
1),(0,l.jsx)(n.Z,{type:"submit",disabled:p.isSubmitting||c||(()=>{if(!d)return!0;let e=i.id,t=$((null==a?void 0:a.last_orders)||[],e);return!t})(),children:"Submit Review"})]})]})}function U(e){var t,r,i,n,s;let{review:a}=e,o=(null==a?void 0:null===(i=a.user)||void 0===i?void 0:null===(r=i.profile)||void 0===r?void 0:null===(t=r.avatar)||void 0===t?void 0:t.thumbnail)||"/assets/images/avatars/avatar-1.jpg";return(0,l.jsxs)("section",{className:"flex space-x-4 items-start",children:[(0,l.jsx)("div",{className:"relative w-14 aspect-square",children:(0,l.jsx)(p(),{width:60,height:60,src:o,alt:"review avatar",className:"w-full h-full rounded-full object-cover"})}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("div",{className:"",children:(null==a?void 0:null===(n=a.user)||void 0===n?void 0:n.name)&&(0,l.jsx)("h3",{className:"text-lg font-semibold text-black",children:null==a?void 0:null===(s=a.user)||void 0===s?void 0:s.name})}),(0,l.jsx)(T.Z,{rating:null==a?void 0:a.rating}),(0,l.jsx)("p",{children:null==a?void 0:a.comment})]})]})}var K=function(e){let{product:t}=e,{productReviews:r,error:i,isLoading:n}=t?function(e,t){var r;let{data:l,isLoading:i,error:n}=(0,Q.useQuery)([H.P.REVIEWS,e],()=>D.Z.productReviews.all(e));return{productReviews:null!==(r=null==l?void 0:l.data)&&void 0!==r?r:[],isLoading:i,error:n}}({product_id:t.id}):{productReviews:[],error:null,isLoading:!1};return n?(0,l.jsx)("section",{children:(0,l.jsx)("p",{children:"Loading..."})}):i?(0,l.jsx)("section",{children:(0,l.jsx)("p",{children:"Error loading reviews"})}):(0,l.jsxs)("section",{children:[(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(l.Fragment,{children:0===r.length&&(0,l.jsx)("p",{children:"No reviews yet. Be the first to review!"})}),(0,l.jsx)(l.Fragment,{children:r.map(e=>(0,l.jsx)(U,{review:e},e.id))})]}),(0,l.jsx)(G,{product:t})]})},Y=r(36370),X=function(e){var t,r;let{product:i}=e,{productTipsAndTricks:n,error:s,isLoading:a}=(null==i?void 0:i.id)?(0,Y.A)(i.id):{productTipsAndTricks:[],isLoading:!1,error:null};return a?(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Loading..."})}):s?(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Error loading tips and tricks"})}):n&&n.tips&&(null===(t=n.tips)||void 0===t?void 0:t.length)!==0?(0,l.jsx)("div",{className:"px-2",children:(0,l.jsx)("ul",{className:"space-y-3 lg:space-y-5",children:null===(r=n.tips)||void 0===r?void 0:r.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsxs)("strong",{className:"text-heading",children:[t+1,"."]})," ",e]},e.id))})}):(0,l.jsx)("div",{children:"No tips and tricks available for this product."})},J=r(90956);let ee=E.Ry().shape({question:E.Z_().required("Comment is required").min(10,"Comment must be at least 10 characters").max(500,"Comment cannot be more than 500 characters")});var et=function(e){var t;let{product:r}=e,{me:i}=(0,M.aF)(),{askQuestion:s,isLoading:a,error:o}=function(){let{mutate:e,isLoading:t,error:r}=(0,Q.useMutation)(D.Z.productQuestions.create,{onSuccess:()=>{g.Am.success("Question submitted successfully")},onError:e=>{var t,r;g.Am.error((null==e?void 0:null===(r=e.response)||void 0===r?void 0:null===(t=r.data)||void 0===t?void 0:t.message)||"Something went wrong")}});return{askQuestion:e,isLoading:t,error:r}}(),{register:d,handleSubmit:c,setValue:u,formState:m}=(0,B.cI)({defaultValues:{question:""},resolver:(0,O.X)(ee)});return(0,l.jsx)("div",{children:(0,l.jsxs)("form",{onSubmit:c(function(e){var t;if(console.log("ASK QUESTION",s,r),!r.shop.id)return;let l={question:e.question,product_id:r.id,shop_id:(null==i?void 0:i.shop_id)||(null===(t=r.shop)||void 0===t?void 0:t.id)};s(l)}),className:"space-y-6 mt-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(V.Z,{htmlFor:"question",children:"Question"}),(0,l.jsx)(F.Z,{id:"question",...d("question"),className:"mt-4"}),(null==m?void 0:null===(t=m.errors)||void 0===t?void 0:t.question)&&(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"text-sm text-red-600",children:m.errors.question.message})})]}),(0,l.jsx)(n.Z,{type:"submit",disabled:m.isSubmitting||a,children:"Ask Question"})]})})};function er(e){let{children:t,product:r}=e;return(0,l.jsxs)("div",{className:"space-y-6",children:[t,(0,l.jsx)(et,{product:r})]})}var el=function(e){let{product:t}=e,{questions:r,isLoading:i,error:n}=t.id?function(e,t){var r;let{data:l,isLoading:i,error:n}=(0,Q.useQuery)([H.P.REVIEWS,t],()=>D.Z.productQuestions.all({...t},e)),s=[];return(null==l?void 0:l.data)&&(null===(r=l.data)||void 0===r?void 0:r.length)>0&&(s=l.data.filter(e=>e.answer)),{questions:s,isLoading:i,error:n}}(t.id):{questions:[],isLoading:!1,error:null};if(i)return(0,l.jsx)(er,{product:t,children:(0,l.jsx)("p",{children:"Loading..."})});if(n)return(0,l.jsx)(er,{product:t,children:(0,l.jsx)("p",{children:"Error loading questions and answers"})});if(0===r.length)return(0,l.jsx)(er,{product:t,children:(0,l.jsx)("div",{children:"No questions and answers available for this product."})});let s=r.map(e=>({faq_title:e.question,faq_description:e.answer||"No answer yet."}));return(0,l.jsx)(er,{product:t,children:(0,l.jsx)(J.Z,{items:s,translatorNS:"faq"})})},ei=function(e){let{product:t}=e;return(0,l.jsx)("div",{className:"pb-10 pt-7 lg:pb-14 mb-10 max-w-screen-lg w-full mx-auto",children:(0,l.jsxs)(P.mQ,{defaultValue:"reviews",className:"w-full",children:[(0,l.jsx)(P.dr,{className:"mb-10 lg:w-[500px] flex mx-auto justify-evenly gap-3 bg-transparent ",children:(0,l.jsx)(P.SP,{value:"reviews",className:"w-full data-[state=active]:bg-primary-default data-[state=active]:text-white bg-gray-300 text-semibold",children:"Customer Review"})}),(0,l.jsx)(P.nU,{value:"reviews",children:(0,l.jsx)(K,{product:t})}),(0,l.jsx)(P.nU,{value:"tips-and-tricks",children:(0,l.jsx)(X,{product:t})}),(0,l.jsx)(P.nU,{value:"question-and-answer",children:(0,l.jsx)(el,{product:t})})]})})},en=r(5511);let es=L()(()=>r.e(3419).then(r.bind(r,79234)),{loadableGenerated:{webpack:()=>[79234]},ssr:!1}),ea={768:{slidesPerView:2,spaceBetween:12},0:{slidesPerView:1}};var eo=e=>{var t,r,m,v,y;let{product:_}=e,{t:Z}=(0,C.$G)(),{width:L}=(0,f.Z)(),{addItemToCart:S}=(0,o.jD)(),[A,P]=(0,i.useState)({}),[T,E]=(0,i.useState)(1),[B,O]=(0,i.useState)(!1);(0,i.useEffect)(()=>{en.R9(_)},[_]);let{price:V,basePrice:F}=(0,d.ZP)({amount:(null==_?void 0:_.sale_price)?null==_?void 0:_.sale_price:null==_?void 0:_.price,baseAmount:null==_?void 0:_.price}),z=(0,a.y)(null==_?void 0:_.variations),D=!!x()(z)||!x()(A)&&Object.keys(z).every(e=>A.hasOwnProperty(e)),Q={};function H(e){q()(A,e)||E(1),P(t=>({...t,...e}))}function M(){P(()=>({}))}
1D&&(Q=null==_?void 0:null===(v=_.variation_options)||void 0===v?void 0:v.find(e=>w()(e.options.map(e=>e.value).sort(),Object.values(A).sort())));let $=[...null==_?void 0:_.gallery,null==_?void 0:_.image],W=_.variation_options,G=(0,R.t)({description:null==_?void 0:_.description});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"items-start block grid-cols-9 pb-10 lg:grid gap-x-10 xl:gap-x-14 pt-7 lg:pb-14",children:[L<1025?(0,l.jsx)(b.Z,{pagination:{clickable:!0},breakpoints:ea,className:"product-gallery",buttonClassName:"hidden",children:(null==$?void 0:$.length)>1?(0,l.jsxs)(l.Fragment,{children:[null==$?void 0:$.map((e,t)=>{var r;return(0,l.jsx)(j.o5,{children:(0,l.jsx)("div",{className:"relative flex col-span-1 transition duration-150 ease-in hover:opacity-90",children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(r=null==e?void 0:e.original)&&void 0!==r?r:"/assets/placeholder/products/product-gallery.svg",alt:"".concat(null==_?void 0:_.name,"--").concat(t),className:"object-cover w-full"})})},"product-gallery-key-".concat(t))}),null==W?void 0:W.map((e,t)=>{var r,i,n;return(null==e?void 0:null===(r=e.image)||void 0===r?void 0:r.original)?(0,l.jsx)(j.o5,{children:(0,l.jsx)("div",{className:"relative flex col-span-1 transition duration-150 ease-in hover:opacity-90",children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(n=null==e?void 0:null===(i=e.image)||void 0===i?void 0:i.original)&&void 0!==n?n:"/assets/placeholder/products/product-gallery.svg",alt:"".concat(null==_?void 0:_.name,"--").concat(t),className:"object-cover w-full"})})},"product-gallery-key-".concat(t)):null})]}):(0,l.jsx)(j.o5,{children:(0,l.jsx)("div",{className:"flex col-span-1 transition duration-150 ease-in hover:opacity-90",children:(0,l.jsx)(p(),{width:475,height:618,src:null!==(y=null==$?void 0:null===(t=$[0])||void 0===t?void 0:t.original)&&void 0!==y?y:"/assets/placeholder/products/product-gallery.svg",alt:null==_?void 0:_.name,className:"object-cover w-full"})})},"product-gallery-key")}):(0,l.jsx)(I,{product:_}),(0,l.jsxs)("div",{className:"col-span-5 pt-8 lg:pt-0",children:[(0,l.jsxs)("div",{className:"border-b border-gray-300 pb-7",children:[(0,l.jsxs)("div",{className:"flex w-full items-start justify-between space-x-8 rtl:space-x-reverse mb-2",children:[(0,l.jsx)("h2",{className:"text-heading text-lg md:text-xl lg:text-2xl 2xl:text-3xl font-bold hover:text-black mb-3.5",children:null==_?void 0:_.name}),(0,l.jsx)("div",{children:(0,l.jsx)(es,{productId:null==_?void 0:_.id})})]}),(0,l.jsx)("div",{className:"flex items-center mt-5",children:x()(z)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-base font-semibold text-heading md:text-xl lg:text-2xl",children:V}),F&&(0,l.jsx)("del",{className:"font-segoe text-gray-400 text-base lg:text-xl ltr:pl-2.5 rtl:pr-2.5 -mt-0.5 md:mt-0",children:F})]}):(0,l.jsx)(N.Z,{selectedVariation:Q,minPrice:_.min_price,maxPrice:_.max_price})})]}),!x()(z)&&(0,l.jsx)("div",{className:"pb-3 border-b border-gray-300 pt-7",children:Object.keys(z).map(e=>(0,l.jsx)(u.P,{title:e,attributes:z[e],active:A[e],onClick:H,clearAttribute:M},e))}),(0,l.jsxs)("div",{className:"flex items-center py-8 space-x-4 border-b border-gray-300 rtl:space-x-reverse ltr:md:pr-32 ltr:lg:pr-12 ltr:2xl:pr-32 ltr:3xl:pr-48 rtl:md:pl-32 rtl:lg:pl-12 rtl:2xl:pl-32 rtl:3xl:pl-48",children:[x()(z)&&(0,l.jsx)(l.Fragment,{children:Number(_.quantity)>0?(0,l.jsx)(s.Z,{quantity:T,onIncrement:()=>E(e=>e+1),onDecrement:()=>E(e=>1!==e?e-1:1),disableDecrement:1===T,disableIncrement:Number(_.quantity)===T}):(0,l.jsx)("div",{className:"text-base text-red-500 whitespace-nowrap ltr:lg:ml-7 rtl:lg:mr-7",children:Z("text-out-stock")})}),!x()(Q)&&(0,l.jsx)(l.Fragment,{children:(null==Q?void 0:Q.is_disable)||0===Q.quantity?(0,l.jsx)("div",{className:"text-base text-red-500 whitespace-nowrap ltr:lg:ml-7 rtl:lg:mr-7",children:Z("text-out-stock")}):(0,l.jsx)(s.Z,{quantity:T,onIncrement:()=>E(e=>e+1),onDecrement:()=>E(e=>1!==e?e-1:1),disableDecrement:1===T,disableIncrement:Number(Q.quantity)===T})}),(0,l.jsx)(n.Z,{onClick:function(){if(!D)return;O(!0),setTimeout(()=>{O(!1)},600);let e=(0,c.z)(_,Q);S(e,T),en.Xq(_,T),(0,g.Am)(Z("add-to-cart"),{type:"dark",progressClassName:"fancy-progress-bar",position:L>768?"bottom-right":"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0})},variant:"slim",className:"".concat(!D&&"bg-gray-400 hover:bg-gray-400"),disabled:!D||!(null==_?void 0:_.quantity)||"publish"!=_.status.toLowerCase()||!x()(Q)&&!(null==Q?void 0:Q.quantity)||!x()(Q)&&(null==Q?void 0:Q.is_disable),loading:B,children:(0,l.jsx)("span",{className:"py-2 3xl:px-8",children:(null==_?void 0:_.quantity)||!x()(Q)&&(null==Q?void 0:Q.quantity)?Z("text-add-to-cart"):Z("text-out-stock")})})]}),(0,l.jsx)("div",{className:"py-6",children:(0,l.jsxs)("ul",{className:"pb-1 space-y-5 text-sm",children:[(null==_?void 0:_.sku)&&(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"inline-block font-semibold text-heading ltr:pr-2 rtl:pl-2",children:"SKU:"}),null==_?void 0:_.sku]}),(null==_?void 0:_.categories)&&Array.isArray(_.categories)&&_.categories.length>0&&(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"inline-block font-semibold text-heading ltr:pr-2 rtl:pl-2",children:"Category:"}),_.categories.map((e,t)=>{var r;return(0,l.jsx)(h.Z,{href:"".concat(k.Z.CATEGORY,"/").concat(null==e?void 0:e.slug),className:"transition hover:underline hover:text-heading",children:(null==_?void 0:null===(r=_.categories)||void 0===r?void 0:r.length)===t+1?e.name:"".concat(e.name,", ")},t)})]}),(null==_?void 0:_.tags)&&Array.isArray(_.tags)&&_.tags.length>0&&(0,l.jsxs)("li",{className:"productTags",children:[(0,l.jsx)("span",{className:"inline-block font-semibold text-heading ltr:pr-2 rtl:pl-2",children:"Tags:"}),_.tags.map(e=>(0,l.jsxs)(h.Z,{href:"".concat(k.Z.COLLECTIONS,"/").concat(null==e?void 0:e.slug),className:"inline-block ltr:pr-1.5 rtl:pl-1.5 transition hover:underline hover:text-heading ltr:last:pr-0 rtl:last:pl-0",children:[e.name,(0,l.jsx)("span",{className:"text-heading",children:","})]},e.id))]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"inline-block font-semibold text-heading ltr:pr-2 rtl:pl-2",children:Z("text-brand-colon")}),(0,l.jsx)(h.Z,{href:"".concat(k.Z.BRAND,"=").concat(null==_?void 0:null===(r=_.type)||void 0===r?void 0:r.slug),className:"inline-block ltr:pr-1.5 rtl:pl-1.5 transition hover:underline hover:text-heading ltr:last:pr-0 rtl:last:pl-0",children:null==_?void 0:null===(m=_.type)||void 0===m?void 0:m.name})]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"inline-block font-semibold text-heading ltr:pr-2 rtl:pl-2",children:"Available Unit:"}),(0,l.jsx)(l.Fragment,{children:(null==_?void 0:_.sold_quantity)?Math.max((null==_?void 0:_.quantity)-(null==_?void 0:_.sold_quantity),0)>0?"In stock":"Out of stock":(null==_?void 0:_.quantity)>0?"In stock":"Out of stock"})]})]})}),G?(0,l.jsx)("div",{className:"text-sm leading-6 text-body lg:text-base lg:leading-8 react-editor-description",dangerouslySetInnerHTML:{__html:G}}):""]})]}),(0,l.jsx)(ei,{product:_})]})}},49421:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var l=r(24246),i=r(11163),n=r(93967),s=r.n(n),a=r(41664),o=r.n(a),d=e=>{let{href:t,...r}=e;return(0,l.jsx)(o(),{href:t,...r})},c=e=>{let{href:t,className:r,activeClassName:n="active",...a}=e,{pathname:o}=(0,i.useRouter)();return(0,l.jsx)(d,{href:t,className:s()(r,{[n]:o===t}),...a})}},60485:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var l=r(24246),i=r(27378),n=r(9035),s=r(11163),a=r(26835),o=r(58446);r(83313);var d=r(12305),c=r(32362);function u(e){let{buttonClassName:t,nextActivateId:r,prevActivateId:i,buttonSize:n,buttonPosition:s,dir:a}=e;return(0,l.jsxs)("div",{className:"absolute z-10 flex items-center w-full top-1/2 -translate-y-1/2",children:[(0,l.jsx)("button",{id:i,"aria-label":"prev-button",className:"".concat(t," ").concat("default"===n?"w-7 h-7 md:w-7 md:h-7 lg:w-9 lg:h-9 xl:w-10 xl:h-10 3xl:w-12 3xl:h-12 text-sm md:text-base lg:text-xl 3xl:text-2xl":"w-7 h-7 md:w-7 md:h-7 lg:w-8 lg:h-8 text-sm md:text-base lg:text-lg"," text-black flex items-center justify-center rounded-md text-gray-0 bg-white absolute transition duration-250 hover:bg-gray-900 hover:text-white focus:outline-none ").concat("inside"===s?"ltr:left-16 rtl:right-16":"ltr:left-0 rtl:right-0"," transform ").concat("rtl"===a?"rotate-180 shadow-navigationReverse translate-x-1/2":"shadow-navigation -translate-x-1/2"),children:(0,l.jsx)(c.u1R,{})}),(0,l.jsx)("button",{id:r,"aria-label":"next-button",className:"".concat(t," ").concat("default"===n?"w-7 h-7 lg:w-9 lg:h-9 xl:w-10 xl:h-10 3xl:w-12 3xl:h-12 text-sm md:text-base lg:text-xl 3xl:text-2xl":"w-7 h-7 lg:w-8 lg:h-8 text-sm md:text-base lg:text-lg"," text-black flex items-center justify-center rounded-md bg-white absolute transition duration-250 hover:bg-gray-900 hover:text-white focus:outline-none ").concat("inside"===s?"ltr:right-16 rtl:left-16":"ltr:right-0 rtl:left-0"," transform ").concat("rtl"===a?"rotate-180 shadow-navigationReverse -translate-x-1/2":"shadow-navigation translate-x-1/2"),children:(0,l.jsx)(c.hjJ,{})})]})}a.Z.use([o.W_,o.tl,o.pt,o.LW]);var m=e=>{let{children:t,className:r="",prevActivateId:a="",nextActivateId:c="",buttonClassName:m="",buttonSize:x="default",paginationVariant:h="default",breakpoints:v,loop:p,autoplay:g=!1,buttonPosition:f="outside",showNavigation:b=!0,...j}=e,{locale:y}=(0,s.useRouter)(),w=(0,d.M)(y),N=(0,i.useRef)(null),C=(0,i.useRef)(null);return(0,l.jsxs)("div",{className:"carouselWrapper relative ".concat(r," ").concat("circle"===h?"dotsCircle":""),children:[(0,l.jsx)(n.tq,{modules:[o.pt,o.tl,o.W_,o.LW],loop:null==p||p,autoplay:g,breakpoints:v,speed:800,dir:w,navigation:{prevEl:a.length?"#".concat(a):N.current,nextEl:c.length?"#".concat(c):C.current},...j,children:t}),b?(0,l.jsx)(u,{buttonPosition:f,buttonSize:x,dir:w,buttonClassName:m,prevActivateId:a,nextActivateId:c}):""]})}},31967:function(e,t,r){"use strict";var l=r(24246);t.Z=e=>{let{className:t="mb-12 lg:mb-14 xl:mb-16 pb-0.5 lg:pb-1 xl:pb-0"}=e;return(0,l.jsx)("div",{className:"border-t border-gray-300 ".concat(t)})}},23091:function(e,t,r){"use strict";var l=r(24246),i=r(93967),n=r.n(i);t.Z=e=>{let{className:t,...r}=e;return(0,l.jsx)("label",{className:n()("block text-gray-600 font-semibold text-sm leading-none mb-3",t),...r})}},50163:function(e,t,r){"use strict";r.d(t,{SP:function(){return d},dr:function(){return o},mQ:function(){return a},nU:function(){return c}});var l=r(24246),i=r(27378),n=r(66122),s=r(66613);let a=n.fC,o=i.forwardRef((e,t)=>
1{let{className:r,...i}=e;return(0,l.jsx)(n.aV,{ref:t,className:(0,s.cn)("inline-flex h-10 items-center justify-center rounded-lg bg-secondary-100 p-1 text-tertiary",r),...i})});o.displayName=n.aV.displayName;let d=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,l.jsx)(n.xz,{ref:t,className:(0,s.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 lg:px-4 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-black data-[state=active]:shadow",r),...i})});d.displayName=n.xz.displayName;let c=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,l.jsx)(n.VY,{ref:t,className:(0,s.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...i})});c.displayName=n.VY.displayName},95414:function(e,t,r){"use strict";var l=r(24246),i=r(27378),n=r(93967),s=r.n(n),a=r(49948);let o={normal:"bg-white border border-gray-300 focus:shadow focus:outline-none focus:border-heading placeholder-body",solid:"bg-gray-100 border border-gray-100 focus:bg-white focus:border-primary",outline:"border border-gray-300 focus:border-primary"},d=i.forwardRef((e,t)=>{let{t:r}=(0,a.$G)(),{className:i,labelKey:n,name:d,placeholderKey:c,errorKey:u,variant:m="normal",shadow:x=!1,inputClassName:h,...v}=e;return(0,l.jsxs)("div",{className:i,children:[n&&(0,l.jsx)("label",{htmlFor:d,className:"block text-gray-600 font-semibold text-sm leading-none mb-3",children:r(n)}),(0,l.jsx)("textarea",{id:d,name:d,className:s()("px-4 py-3 flex items-center w-full rounded appearance-none transition duration-300 ease-in-out text-heading text-sm focus:outline-none focus:ring-0",x&&"focus:shadow",o[m],h),autoComplete:"off",spellCheck:"false",rows:4,ref:t,placeholder:r(c),...v}),u&&(0,l.jsx)("p",{className:"my-2 text-xs text-red-500",children:r(u)})]})});t.Z=d},36370:function(e,t,r){"use strict";r.d(t,{A:function(){return a},H:function(){return s}});var l=r(49260),i=r(56552),n=r(37786);function s(e,t){var r;let{data:s,isLoading:a,error:o}=(0,i.useQuery)([n.P.TIPS_AND_TRICKS,e],()=>l.Z.tipsAndTricks.all(e));return{tipsAndTricks:null!==(r=null==s?void 0:s.data)&&void 0!==r?r:[],isLoading:a,error:o}}function a(e){let{data:t,isLoading:r,error:s}=(0,i.useQuery)([n.P.TIPS_AND_TRICKS,e],()=>l.Z.tipsAndTricks.getTipsByProductId(e),{enabled:!!e}),a=null==t?void 0:t.find(t=>t.product_id==e);return{productTipsAndTricks:null!=a?a:null,isLoading:r,error:s}}},5511:function(e,t,r){"use strict";r.d(t,{R9:function(){return i},Xq:function(){return n},eD:function(){return a},e_:function(){return o},hP:function(){return s}});let l=(e,t)=>{window.dataLayer?window.dataLayer.push({event:e,...t}):window.gtag&&window.gtag("event",e,t)},i=e=>{var t;l("view_item",{ecommerce:{currency:"BDT",value:e.price,items:[{item_id:e.id,item_name:e.name,price:e.price,item_category:null===(t=e.category)||void 0===t?void 0:t.name}]}})},n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;l("add_to_cart",{ecommerce:{currency:"BDT",value:e.price*t,items:[{item_id:e.id,item_name:e.name,price:e.price,quantity:t}]}})},s=e=>{l("view_cart",{ecommerce:{currency:"BDT",value:e.reduce((e,t)=>e+t.price*t.quantity,0),items:e.map(e=>({item_id:e.id,item_name:e.name,price:e.price,quantity:e.quantity}))}})},a=e=>{l("begin_checkout",{ecommerce:{currency:"BDT",value:e.reduce((e,t)=>e+t.price*t.quantity,0),items:e.map(e=>({item_id:e.id,item_name:e.name,price:e.price,quantity:e.quantity}))}})},o=e=>{l("purchase",{ecommerce:{transaction_id:(null==e?void 0:e.tracking_number)||(null==e?void 0:e.id),currency:"BDT",value:(null==e?void 0:e.paid_total)||(null==e?void 0:e.total),tax:(null==e?void 0:e.sales_tax)||(null==e?void 0:e.tax)||0,shipping:(null==e?void 0:e.delivery_fee)||(null==e?void 0:e.shipping)||0,items:((null==e?void 0:e.products)||(null==e?void 0:e.items)||[]).map(e=>{var t;return{item_id:e.id,item_name:e.name,price:e.price,quantity:(null===(t=e.pivot)||void 0===t?void 0:t.quantity)||e.quantity}})}})}},84353:function(e,t,r){"use strict";r.d(t,{t:function(){return s}});var l=r(27378),i=r(64926),n=r.n(i);function s(e){var t,r;let{description:i}=e,[s,a]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{a(!0)},[]),!i)return;let o=n()(i,{allowedTags:null===n()||void 0===n()?void 0:null===(r=n().defaults)||void 0===r?void 0:null===(t=r.allowedTags)||void 0===t?void 0:t.concat(["img","iframe"]),allowedAttributes:{p:["style","class"],strong:["style","class"],em:["style","class"],u:["style","class"],pre:["style","class"],sub:["style"],sup:["style"],span:["style","class"],a:["style","href","data-*","name","target","class"],img:["src","srcset","alt","title","width","height","loading","class"],li:["style","class"],iframe:["src","frameborder","allowfullscreen","class"]},allowedIframeHostnames:["www.youtube.com","player.vimeo.com"],allowedStyles:{"*":{color:[/^#(0x)?[0-9a-f]+$/i,/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/],"background-color":[/^#(0x)?[0-9a-f]+$/i,/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/],"text-align":[/^left$/,/^right$/,/^center$/],"font-size":[/^\d+(?:px|em|%)$/]}},allowedSchemesByTag:{img:["data","http","https"]}});return s?o:""}},5294:function(e,t,r){"use strict";r.d(t,{z:function(){return n}});var l=r(90104),i=r.n(l);function n(e,t){let{id:r,name:l,slug:n,image:s,price:a,sale_price:o,quantity:d,unit:c}=e;return i()(t)?{id:r,name:l,slug:n,unit:c,image:null==s?void 0:s.thumbnail,stock:d,price:o||a}:{id:"".concat(r,".").concat(t.id),productId:r,name:"".concat(l," - ").concat(t.title),slug:n,unit:c,stock:t.quantity,price:t.sale_price?t.sale_price:t.price,image:null==s?void 0:s.thumbnail,variationId:t.id}}},15710:function(){},90473:function(){},35426:function(){},80984:function(){}}]);
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.