!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7fa7280e-7a4d-4318-8e31-d1c7eec9fd9a",e._sentryDebugIdIdentifier="sentry-dbid-7fa7280e-7a4d-4318-8e31-d1c7eec9fd9a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1855],{27232:function(e,t,l){Promise.resolve().then(l.bind(l,15767)),Promise.resolve().then(l.bind(l,26438))},15767:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return K}});var a=l(57437),s=l(2265),r=l(69036),i=l(224),n=l(95601),d=l.n(n),o=l(24232),c=l(67535),x=l(88024),m=l(51367),u=e=>{var t;let{selectedImage:l,selectedProductName:r,defaultProductImage:i,productInfo:n,setSelectedImage:d,discount:o}=e,[u,f]=(0,s.useState)({image_alt:"",image_url:""}),p=(0,s.useRef)(null),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,a.jsx)("div",{className:(0,m.m6)("flex gap-2 overflow-x-hidden shrink-0 py-6 mdx:max-w-[100vw] mdx:py-4 flex-row",e),ref:p,children:(0,a.jsx)("div",{className:(0,m.m6)("flex flex-row mdx:gap-x-4 gap-y-4 h-full overflow-y-auto",e),children:n.images.map((e,t)=>(0,a.jsx)("div",{onClick:()=>{d(e),u.image_url&&f(e)},className:(0,m.m6)("max-w-[82px] min-w-[82px] w-fit h-fit flex border-2 justify-center items-center max-h-[82px] min-h-[82px] overflow-hidden rounded-md ",l.image_url===e.image_url?"border-[#1ca2bd]":"border-gray-100"),children:(0,a.jsx)("img",{className:"object-cover max-w-auto w-full h-full cursor-pointer",alt:e.image_alt?e.image_alt:r||l.image_alt,width:82,height:82,src:e.image_url+"?size=164x164&rs=fit"})},t))})})};return(0,a.jsxs)("div",{className:"flex md:py-4 md:px-4 flex-col md:flex-row-reverse md:flex-1 gap-x-2",children:[u.image_url?(0,a.jsxs)("div",{className:"fixed flex-col not-scroll top-0 z-40 bottom-0 h-screen flex items-start md:items-center justify-center left-0 object-cover bg-white w-screen",children:[(0,a.jsx)(x.G,{className:"absolute top-4 left-4 p-2 w-[20px] md:w-[28px] h-[20px] md:h-[28px] bg-white rounded-full text-base",icon:c.YIN,onClick:()=>{f({image_alt:"",image_url:""})}}),(0,a.jsx)("img",{className:"object-contain h-[calc(100vh-200px)] mx-auto",src:u.image_url,alt:u.image_alt}),g("md:flex-row")]}):null,(0,a.jsxs)("div",{className:"mx-auto relative md:rounded-xl overflow-hidden",children:[(0,a.jsx)("img",{className:"aspect-[0.8] cursor-zoom-in w-fit max-h-[540px] h-full object-cover",onClick:()=>{f(l)},src:l.image_url?l.image_url+"?size=750x820&rs=fit":i,alt:null!==(t=l.image_alt)&&void 0!==t?t:r}),(0,a.jsx)("div",{className:"absolute bottom-4 flex flex-row gap-x-2 -translate-x-1/2 left-1/2",children:n.images.map((e,t)=>(0,a.jsx)("div",{onClick:()=>{d(e)},className:(0,m.m6)("bg-red-500 p-1 rounded-full border",l.image_url===e.image_url?"bg-white border-black":"bg-black border-white")},t))})]}),n.images.length>1?g("md:flex-col max-h-[500px] mdx:hidden"):null]})};(0,o.default)(()=>Promise.all([l.e(7674),l.e(1796),l.e(7061)]).then(l.bind(l,87061)),{loadableGenerated:{webpack:()=>[87061]},loading:()=>(0,a.jsx)("div",{}),ssr:!1});var f=e=>{let{defaultProductImage:t,productInfo:l}=e,[n,o]=(0,s.useState)(!1),c=(0,i.CG)(e=>e.selectedProduct.product),[x,m]=(0,s.useState)(!1),[f,p]=(0,s.useState)(l.images.find(e=>e.default)||l.images[0]||{url:t});return(0,s.useEffect)(()=>{(null==c?void 0:c.image_url)&&c.name&&p({image_url:c.image_url,default:!1,id:c.id,image_alt:c.image_alt})},[null==c?void 0:c.image_url]),(0,a.jsxs)("section",{className:"xl:col-span-2 md:col-span-5 col-span-1 lg:col-span-4",children:[(0,a.jsx)(d(),{children:(0,a.jsx)("link",{rel:"preload",href:f.image_url?f.image_url+"?size=750x820&rs=fit":t,as:"image"})}),(l.special_offer&&!l.special_offer_end||l.special_offer&&l.special_offer_end&&new Date(l.special_offer_end).getTime()-new Date().getTime()>0)&&(0,a.jsxs)("div",{className:"flex flex-row w-full justify-between border-b border-red-500 pb-2 mb-2",children:[(0,a.jsx)("img",{src:"/images/special_offer.png",className:"object-contain h-fit",alt:"پیشنهاد ویژه",width:183,height:19}),l.special_offer_end&&new Date(l.special_offer_end).getTime()-new Date().getTime()>0&&(0,a.jsx)(r.default,{finalTime:l.special_offer_end})]}),(0,a.jsx)("section",{className:"flex flex-row md:flex-col mdx:items-center mdx:justify-center",children:(0,a.jsx)(u,{setSelectedImage:p,defaultProductImage:t,selectedImage:f,selectedProductName:c.name,productInfo:l,discount:2})})]})},p=l(65480),g=l(65950),h=l(47907),b=l(30828),v=e=>{let{mainAttributes:t,productInfo:l,hasVariant:r,varients:i}=e,n=(0,h.useSearchParams)(),d=(0,h.usePathname)(),o=(0,b.I0)(),[c,x]=(0,s.useState)(Array(t.length).fill(0)),u=e=>{let t=new URLSearchParams(n);t.delete("vid"),t.append("vid","".concat(e)),history.replaceState({},"","".concat(d,"?").concat(t))};return(0,s.useEffect)(()=>{if(0===i.length||!r){o((0,p.CE)(l));return}let e=Number(n.get("vid"));if(e){let s=i.find(t=>t.id===e);if(s){var t,a;x(s.attributes),o((0,p.CE)(s.image_url?s:{...s,image_url:null===(a=l.images)||void 0===a?void 0:null===(t=a.find(e=>e.default))||void 0===t?void 0:t.image_url}))}else o((0,p.CE)({id:0,name:"string",attributes:[1,2],show_price:!1,price:0,compare_at_price:0,discount_percent:0,is_default:!1,image:""}))}else{let e=i.find(e=>e.is_default)||i[0];e&&(x(e.attributes),u(e.id))}},[n.get("vid")]),(0,s.useEffect)(()=>{if(0===c.length||0===c[0])return;let e=i.find(e=>(0,g.Hj)(e.attributes,c));e?u(e.id):u(-1)},[c]),(0,a.jsx)(a.Fragment,{children:t.map((e,t)=>(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("div",{className:"text-[13px]",children:e.name}),(0,a.jsxs)("div",{className:"flex flex-row flex-wrap py-4 select-none gap-1",children:[e.values.map(e=>(0,a.jsx)("div",{onClick:()=>{x(l=>{let a=l.map(e=>e);return a[t]=e.id,a})},className:(0,m.m6)("border  rounded-md cursor-pointer w-[84px] text-center justify-center h-[54px] py-[2px] text-[13px] flex items-center",c.find(t=>e.id===t)?"border-banimode-green text-banimode-green font-[600] bg-banimode-gray-x-light":""),children:e.value},e.value))," "]})]},e.name))})},j=e=>{var t;let{attributes:l,textStyle:r}=e,i=l.length-4>0?l.length-4:0,n=(0,s.useRef)(null),[d,o]=(0,s.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[l.slice(0,4).map(e=>(0,a.jsxs)("div",{className:(0,m.m6)("text-sm text-banimode-gray-dark",r),children:[e.name," "," : ",(0,a.jsx)("span",{className:"text-banimode-orange ",children:e.value})]},e.value+e.name)),(0,a.jsx)("div",{ref:n,className:"flex flex-col gap-3",style:{transition:"max-height 0.6s ease-out",overflow:"hidden",maxHeight:d?"".concat(null===(t=n.current)||void 0===t?void 0:t.scrollHeight,"px"):"0px"},children:i?l.slice(4).map(e=>(0,a.jsxs)("div",{className:(0,m.m6)("text-sm text-banimode-gray-dark",r),children:[e.name," "," : ",(0,a.jsx)("span",{className:"text-banimode-orange",children:e.value})]},e.value+e.name)):null}),i?(0,a.jsx)("span",{className:"cursor-pointer w-fit text-xs text-banimode-green pb-1",onClick:()=>o(!d),children:d?"- بستن":"+ موارد بیشتر"}):null]})},w=l(51171),_=e=>{let{productInfo:t,showTags:l}=e,s=[...t.brand?[{key:"برند",value:t.brand.name,url:t.brand.url}]:[],{key:"دسته‌بندی",value:t.main_category.name,url:t.main_category.url}];return(0,a.jsxs)("section",{className:"md:col-span-4 col-span-1 xl:col-span-2 lg:col-span-3 flex flex-col gap-3 md:py-6 p-5 md:pl-5 md:pr-5",children:[(0,a.jsx)("h1",{className:"text-base font-[600] leading-6 text-black",children:t.name}),(0,a.jsxs)("article",{className:"flex flex-col text-sm gap-2 pb-2",children:[s.map(e=>(0,a.jsxs)("div",{children:[e.key," : ",(0,a.jsx)(w.default,{target:"_blank",className:"text-banimode-green mdx:text-xs md:font-[600]",href:e.url,children:e.value})]},e.key)),t.tags&&l&&t.tags.length>0&&(0,a.jsxs)("div",{className:"flex flex-row",children:[(0,a.jsx)("div",{className:"whitespace-nowrap",children:"برچسب‌ها : "})," ",(0,a.jsx)("div",{className:"flex-grow flex flex-row flex-wrap gap-3",children:t.tags.map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(w.default,{target:"_blank",className:"text-banimode-green mdx:text-xs font-light",href:e.url,children:e.value})},e.url))})]}),t.product_identifier?(0,a.jsxs)("div",{children:["شناسه کالا ",t.product_identifier]}):null]}),(0,a.jsx)(v,{productInfo:t,hasVariant:t.has_variants,varients:t.variants,mainAttributes:t.main_attributes}),(0,a.jsx)(j,{attributes:t.secondary_attributes})]})},N=l(9631),y=l(10971),k=l(54884),S=l(40109),C=l(87546),I=l(95071),E=e=>{var t,l;let{productInfo:r,productId:n,vid:d,config:o}=e,[u,f]=(0,s.useState)(!0),[p,h]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),j=(0,i.CG)(e=>e.selectedProduct.product),_=(0,s.useRef)(null),E=(0,i.TL)(),P=""!==j.name?j:r.has_variants&&r.variants.length>0?null!==(l=r.variants.find(e=>String(e.id)===d))&&void 0!==l?l:r.variants[0]:r,z=null===(t=(0,i.CG)(e=>e.cart.cart.items))||void 0===t?void 0:t.find(e=>(null==e?void 0:e.variant)?String(e.variant)===String(P.id)&&String(e.product)==n:String(e.product)==n),Z=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;h(!0),(0,k.SD)("cart/item/",{product_id:n,...P.id?{variant_id:String(P.id)}:{},...t?{quantity:"".concat(t)}:{}}).then(async e=>e.json()).then(t=>{o.ga_tracking_id&&(0,I.z)("add_to_cart",t),E((0,S.Z5)(t)),v(e)}).finally(()=>h(!1))},F=()=>{h(!0),(0,k.SD)("cart/item/delete/",{product_id:"".concat(n),...P.id?{variant_id:"".concat(P.id)}:{}}).then(e=>e.json()).then(e=>{o.ga_tracking_id&&(0,I.z)("remove_from_cart",e),E((0,S.Z5)(e))}).catch(e=>console.log("err",e)).finally(()=>h(!1))};return((0,s.useEffect)(()=>{if(document&&window){if(_.current&&_.current.clientHeight&&window.innerWidth<1024){var e;E((0,C.Zg)(null===(e=_.current)||void 0===e?void 0:e.clientHeight))}window.addEventListener("scroll",()=>{let e=document.querySelector("footer");f(!(0,g.XS)(e))})}},[]),"call"===r.stock_type)?(0,a.jsx)(w.default,{href:"tel:".concat(null==o?void 0:o.shop_phone),className:"w-full mt-16 rounded-md text-2xl phone-icon flex text-[#515151] gap-x-2 flex-row-reverse border h-fit items-center col-span-7 xl:col-span-1 lg:col-span-2 text-center justify-center font-semibold py-3 px-4 bg-[#ddd]",children:(0,a.jsx)("span",{className:"text-sm",children:"جهت اطلاع از قیمت و موجودی تماس بگیرید"})}):P.show_price?(0,a.jsxs)("div",{className:"w-[96%] mx-1 mt-4 xl:mt-16 rounded-md overflow-hidden border h-fit flex flex-col items-center col-span-7 xl:col-span-1 lg:col-span-2 xl:p-2 bg-banimode-gray-x-light",children:[r.guarantee?(0,a.jsx)("div",{className:"border-b text-xs guarantee-icon text-[#9b9b9b] w-full pb-3 xlx:p-4",children:(0,a.jsx)("span",{className:"text-black",children:"boolean"==typeof r.guarantee?"گارانتی اصالت و سلامت فیزیکی کالا":r.guarantee})}):null,r.is_digital?null:(0,a.jsxs)("section",{className:"w-full text-xs text-black leading-8 xlx:p-4",children:[(0,a.jsxs)("div",{className:"flex flex-row gap-3 gap-x-2 items-center",children:[(0,a.jsx)(x.G,{icon:c.Diu,className:"text-xl text-banimode-green"}),"موجود در انبار ",o.shop_name]}),(0,a.jsxs)("div",{className:"text-[rgb(98,102,109)] flex flex-row gap-x-1 items-center",children:[(0,a.jsx)(x.G,{icon:c.x6G,className:"text-lg text-banimode-green"}),"ارسال توسط ",o.shop_name]})]}),(0,a.jsxs)("section",{ref:_,className:(0,m.m6)("w-full border-t flex mdx:items-center flex-col mdx:grid mdx:grid-cols-2 mdx:gap-x-2 items-end z-[11] justify-between bg-white lg:bg-inherit px-2 py-1 lg:static fixed bottom-0 left-0",u?"lgx:animate-appear0_2":"lgx:animate-disappear0_2 lgx:-z-10"),children:[(0,a.jsxs)("div",{className:"flex flex-col lgx:flex-grow xl:flex-grow lgx:py-2 lgx:pt-3 mdx:py-0 xl:flex-col xlx:gap-4 mdx:gap-1 items-center xlx:items-end justify-start",children:[!!P.discount_percent&&(0,a.jsxs)("p",{className:"text-left gap-x-2 items-end flex xl:block flex-row text-xs",children:[(0,a.jsx)("span",{className:"text-[#acacac] tracking-[0.5] line-through",children:P.compare_at_price.toLocaleString()})," ",(0,a.jsxs)("span",{className:"text-white bg-gradient-to-l bg-banimode-green mdx:bg-black w-fit xl:mr-2 font-semibold px-1 rounded-[20px]",children:[P.discount_percent,"%"]})]}),(0,a.jsxs)("p",{className:"text-left md:py-4 text-banimode-green mdx:text-black mdx:text-sm flex flex-row gap-x-1",children:[(0,a.jsxs)("span",{className:"text-[20px] lg:text-[28px] mdx:text-base",children:[" ",P.price.toLocaleString()," "]}),(0,a.jsx)("img",{className:"md:hidden",src:"/icons/toman-icon.svg"}),(0,a.jsx)("span",{className:"mdx:hidden",children:"تومان"})]})]}),(null==z?void 0:z.quantity)?(0,a.jsxs)("div",{className:"text-sm my-2 lgx:flex-grow flex flex-row xl:flex-grow px-4 py-4 rounded-md bg-banimode-green text-white w-full max-w-[300px] mb-1",children:[(0,a.jsx)("button",{disabled:p||z.max_available&&z.max_available===z.quantity,children:(0,a.jsx)(x.G,{onClick:()=>Z(),icon:c.r8p})}),p?(0,a.jsx)(N.Z,{className:"max-h-[16px] flex-grow  min-w-[60px] ",color:"#FFF"}):(0,a.jsxs)("div",{className:"flex min-w-[60px] flex-grow  flex-col items-center",children:[(0,a.jsx)("span",{className:"inline-block text-center font-bold",children:z.quantity}),z.max_available&&z.max_available===z.quantity?(0,a.jsx)("span",{className:"text-[10px]",children:"حداکثر"}):null]}),1===z.quantity?(0,a.jsx)("button",{disabled:p,children:(0,a.jsx)(x.G,{className:"cursor-pointer",onClick:()=>F(),icon:c.Vui})}):(0,a.jsx)("button",{onClick:()=>Z(!1,Math.max(z.quantity-1,0)),disabled:p,children:(0,a.jsx)(x.G,{icon:c.Kl4})})]}):(0,a.jsxs)("button",{disabled:p,onClick:()=>Z(!0),className:"text-white rounded-md flex flex-row items-center justify-center gap-x-2 lgx:flex-grow my-1 w-full bg-gradient-to-l from-banimode-green to-green-700 h-fit py-4 leading-4 px-[18px] font-semibold xl:font-normal text-base md:text-sm 2xl:text-lg",children:[(0,a.jsx)(x.G,{className:"text-lg mdx:hidden",icon:c.Ycs}),"افزودن به سبد",p?(0,a.jsx)(N.Z,{className:"max-w-[16px] max-h-[16px]",color:"#FFFFFF"}):null]}),(0,a.jsxs)(y.Z,{hasHeader:!1,setIsOpen:v,isOpen:b,headerText:"",className:"sm:max-w-[600px] md:min-w-[500px] p-10 pb-16 px-12 z-50",children:[(0,a.jsx)("img",{src:"/icons/thank-success.svg",className:"mx-auto"}),(0,a.jsx)("p",{className:"text-center w-full py-6 text-banimode-green",children:"سبد خرید شما به روز شد!"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 text-base",children:[(0,a.jsx)("button",{className:"border rounded-xl",onClick:()=>{v(!1)},children:"ادامه دادن خرید"}),(0,a.jsx)(w.default,{target:"_blank",href:"/cart/",className:"text-white rounded-xl text-center bg-banimode-green py-3",children:"مشاهده سبد خرید"})]})]})]})]}):(0,a.jsxs)("div",{ref:_,className:(0,m.m6)("md:mt-16 rounded-md border h-fit items-center col-span-7 xl:col-span-1 lg:col-span-2 xl:p-4 md:bg-[#f5f5f5]","w-full border-t flex flex-col items-end z-[11] justify-between bg-white px-2 py-1 lg:static fixed bottom-0 left-0",u?"lgx:animate-appear0_2":"lgx:animate-disappear0_2 lgx:-z-10"),children:[" ",(0,a.jsx)("div",{className:"mb-2 font-[600] text-banimode-orange text-lg flex flex-row items-center w-full",children:"ناموجود"}),(0,a.jsx)("p",{className:"text-xs mdx:hidden text-banimode-gray-medium py-2",children:"متاسفانه این کالا در حال حاضر موجود نیست. می‌توانید از طریق لیست بالای صفحه، از محصولات مشابه این کالا دیدن نمایید."}),r.main_category.url?(0,a.jsxs)(w.default,{target:"_blank",href:r.main_category.url,className:"text-white rounded-md flex flex-row items-center justify-center gap-x-2 lgx:flex-grow my-1 w-full bg-banimode-green h-fit py-4 leading-4 px-[18px] font-semibold xl:font-normal text-sm 2xl:text-lg",children:[(0,a.jsx)(x.G,{icon:c.l9f}),"مشاهده محصولات مرتبط"]}):null]})},P=e=>{let{productInfo:t,vid:l,contextData:s,productId:r}=e;return(0,a.jsxs)("section",{className:"bg-white pb-2 md:px-2 md:grid flex flex-col md:grid-cols-9 xl:grid-cols-5 shadow-sm w-full max-w-[1625px] mx-auto",children:[(0,a.jsx)(f,{defaultProductImage:s.config.default_product_image,productInfo:t}),(0,a.jsx)(_,{productInfo:t,showTags:s.config.show_product_tags}),(0,a.jsx)(E,{productId:r,vid:l,config:s.config,productInfo:t})]})},z=l(59074),Z=l(37195),F=l(18009);let T=[{title:"عنوان نظر شما",id:"title",placeholder:"عنوان نظر خود را بنویسید",hasPlus:!1},{title:(0,a.jsx)("span",{className:"before:min-w-[8px] before:mt-2 pr-1 before:min-h-[8px] before:max-h-[8px] before:rounded-full before:ml-1 before:bg-red-500 inline-flex",children:"نقاط ضعف"}),id:"negative",className:"text-red-500 bg-red-100 border border-red-500",hasPlus:!0},{title:(0,a.jsx)("span",{className:"before:min-w-[8px] before:mt-2 pr-1 before:min-h-[8px] before:max-h-[8px] before:rounded-full before:ml-1 before:bg-green-500 inline-flex",children:"نقاط قوت"}),id:"positive",className:"text-green-500 bg-green-100 border border-green-500",hasPlus:!0}],D={title:"",positive:"",negative:"",text:""},G={title:[],positive:[],negative:[],text:[]};var L=e=>{let{isOpen:t,setIsOpen:l,productId:r,baseUrl:i}=e,[n,d]=(0,s.useState)(D),[o,u]=(0,s.useState)(G),[f,p]=(0,s.useState)(null);return(0,s.useEffect)(()=>{f&&(d(e=>({...e,[f]:""})),p(null))},[f]),(0,a.jsx)(Z.Z,{isOpen:t,setIsOpen:l,headerClassName:"asasas",headerText:"نظر شما",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault()},className:"w-[1110px] overflow-y-auto flex flex-col gap-5 max-w-[90vw] max-h-[80vh] text-base",children:[T.map(e=>{var t;return(0,a.jsx)(s.Fragment,{children:(0,a.jsxs)("label",{children:[(0,a.jsx)("span",{children:e.title}),(0,a.jsxs)("div",{className:"h-fit relative",children:[(0,a.jsx)("input",{value:n[e.id],onChange:t=>{d(l=>{let a=JSON.parse(JSON.stringify(l));return a[e.id]=t.target.value,a})},placeholder:e.placeholder,className:"p-3 outline-none rounded-lg w-full border border-[#c8c8c8] text-[#717171] text-sm"}),e.hasPlus?(0,a.jsx)(x.G,{className:"text-xl absolute left-4 bottom-3 cursor-pointer hover:opacity-80 opacity-60",icon:c.KtF,onClick:()=>{u(t=>{let l={...t,[e.id]:[...t[e.id],n[e.id]]};return p(e.id),l})}}):null]}),e.hasPlus?(0,a.jsx)("div",{className:"mr-2 mt-1 flex flex-row",children:null===(t=o[e.id])||void 0===t?void 0:t.map((t,l)=>(0,a.jsxs)("span",{onClick:()=>{u(t=>({...t,[e.id]:t[e.id].filter((e,t)=>t!==l)}))},className:(0,m.m6)("rounded-full text-xs ml-1 px-1 py-[2px] cursor-pointer",e.className),children:[t,(0,a.jsx)(x.G,{icon:c.YIN,className:"mr-1"})]},t))}):null]})},e.id)}),(0,a.jsxs)("label",{className:"flex flex-col",children:[(0,a.jsx)("span",{children:"متن نظر شما (اجباری)"}),(0,a.jsx)("textarea",{value:n.text,onChange:e=>{d(t=>({...t,text:e.target.value}))},className:"p-3 text-sm outline-none min-h-[140px] rounded-lg w-full border border-[#c8c8c8]",placeholder:"متن نظر خود را بنویسید"})]}),(0,a.jsx)("button",{onClick:()=>{""===n.text?F.default.error("نوشتن متن نظر اجباریست!"):(0,k.SD)("".concat(i,"/"),{["".concat(i.split("-").at(0),"_id")]:r,...""!==n.title?{title:n.title}:{},positive_points:o.positive,negative_points:o.negative,...""!==n.text?{text:n.text}:{}}).then(e=>{e.ok?(F.default.success("نظر شما با موفقیت ثبت شد و پس از تایید ادمین در سایت قرار خواهد گرفت"),d(D),u(G),l(!1)):F.default.error("متاسفانه نظر شما با موفقیت ثبت نشد. لطفا مجددا تلاش کنید!")}).catch(e=>{F.default.error("متاسفانه نظر شما با موفقیت ثبت نشد. لطفا مجددا تلاش کنید!"),console.log("err",e)})},type:"submit",className:"text-white my-2 rounded-md w-fit bg-[#00bfd6] py-[10px] mr-auto px-10 text-[16px]",children:"ثبت نظر"})]})})},O=e=>{var t,l,r,i;let{comment:n,replyText:d,setReplayText:o,handleReply:c,displayTextArea:x,setDisplayTextArea:u,handleClickLikeDislike:f,isReply:p=!1,productId:g}=e,[h,b]=(0,s.useState)();return(0,a.jsxs)("article",{className:(0,m.m6)("grid md:grid-cols-3 px-4 my-4 grid-cols-1 py-[20px]",p&&"bg-[#f8f8f8] rounded-xl border mx-4"),children:[(0,a.jsxs)("div",{className:"col-span-1 flex flex-col gap-4",children:[(0,a.jsx)("span",{className:"text-[15px] font-[600]",children:n.user||"کاربر مهمان"}),(0,a.jsxs)("span",{className:"font-[300] mdx:pb-4",children:["تاریخ ",n.creation_date]})]}),(0,a.jsxs)("div",{className:"md:col-span-2 flex flex-col text-justify",children:[n.title?(0,a.jsx)("h4",{className:"border-b py-4",children:n.title}):null,(0,a.jsxs)("p",{className:p?"":"py-4",children:[" ",n.text]}),n.positive_points&&n.positive_points.length>0?(0,a.jsxs)("div",{className:"text-[#00bfd6] flex flex-row comment-box",children:[(0,a.jsx)("span",{className:"min-w-[80px] inline-block",children:" نقاط قوت:"}),(0,a.jsx)("div",{className:"flex flex-col",children:n.positive_points?null===(t=n.positive_points)||void 0===t?void 0:t.map(e=>(0,a.jsx)("span",{className:"before:min-w-[6px]  text-black before:mt-3 pr-1 before:min-h-[6px] before:max-h-[6px] before:rounded-full before:ml-1 before:bg-[#00bfd6] inline-flex",children:e},e)):null})]}):null,n.negative_points&&n.negative_points.length>0?(0,a.jsxs)("div",{className:"text-[#ff637d] flex flex-row my-4",children:[(0,a.jsx)("span",{className:"min-w-[80px] inline-block",children:" نقاط ضعف:"}),(0,a.jsx)("div",{className:"flex flex-col",children:n.negative_points?null===(l=n.negative_points)||void 0===l?void 0:l.map(e=>(0,a.jsx)("span",{className:"before:min-w-[6px] text-black before:mt-3 pr-1 before:min-h-[6px] before:max-h-[6px] before:rounded-full before:ml-1 before:bg-[#ff637d] inline-flex",children:e},e)):null})]}):null,(0,a.jsxs)("div",{className:"flex flex-row gap-2 mt-2",children:[(0,a.jsxs)("button",{onClick:()=>{f(String(n.id),"like",b)},className:"bg-[#4caf50] dislike-icon leading-6 rounded-md text-white text-xs px-[10px] py-0",children:["موافقم (",null!==(r=null==h?void 0:h.likes_count)&&void 0!==r?r:n.likes,")"]}),(0,a.jsxs)("button",{onClick:()=>{f(String(n.id),"dislike",b)},className:"bg-[#fb3449] leading-6 like-icon rounded-md text-white text-xs px-[10px] py-0",children:["مخالفم (",null!==(i=null==h?void 0:h.dislikes_count)&&void 0!==i?i:n.dislikes,")"]})]}),p||x===n.id?!p&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("textarea",{className:"border-[#ccc] border p-1 rounded-md bg-[#f9f9f9]",placeholder:"متن پاسخ",value:d,onChange:e=>null==o?void 0:o(e.target.value)}),(0,a.jsx)("button",{onClick:()=>{c(n.id,d,g)},className:"bg-[#00bfd6] text-white hover:brightness-90 rounded-md text-xs w-fit leading-7 px-[10px]",children:"ثبت پاسخ"})]}):(0,a.jsx)("button",{onClick:()=>{u(n.id)},className:"bg-[#eee] hover:brightness-90 rounded-md text-xs w-fit leading-7 px-[10px] mt-8",children:"پاسخ به این نظر"})]})]},n.id)},q=e=>{let{id:t,comments:l,user:r,isProduct:i=!0,baseUrl:n="product-comment"}=e,[d,o]=(0,s.useState)(),[m,u]=(0,s.useState)(!1),[f,p]=(0,s.useState)(""),g=(e,t,l)=>{(0,k.SD)("".concat(n,"/").concat(t,"/"),{comment_id:e}).then(async e=>{403===e.status?F.default.error("جهت اعلام موافقت یا مخالفت با این نظر وارد حساب کاربری خود شوید."):l(await e.json())}).catch(e=>F.default.error("مشکلی پیش آمده است. لطفا مجددا تلاش کنید!"))},h=(e,t,l)=>{(0,k.SD)("".concat(n,"/"),{["".concat(n.split("-").at(0),"_id")]:l,text:t,parent_id:String(e)}).then(e=>{e.ok?(F.default.success("پاسخ شما با موفقیت ثبت شد و پس از تایید ادمین در سایت قرار خواهد گرفت"),p("")):403===e.status?F.default.error("برای ثبت پاسخ باید ابتدا وارد حساب کاربری خود شوید."):F.default.error("متاسفانه پاسخ شما با موفقیت ثبت نشد. لطفا مجددا تلاش کنید!")}).catch(e=>{F.default.error("متاسفانه پاسخ شما با موفقیت ثبت نشد. لطفا مجددا تلاش کنید!")})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{productId:t,isOpen:m,setIsOpen:u,baseUrl:n}),(0,a.jsxs)("div",{className:"flex flex-row items-center gap-x-2",children:[(0,a.jsx)(x.G,{icon:c.vto}),"نظرت برای ما ارزشمنده!"]}),(0,a.jsx)("p",{className:"text-xs my-4",children:r&&""!==r?"":"برای ثبت نظر، لازم است ابتدا وارد حساب کاربری خود شوید."}),(0,a.jsxs)("button",{onClick:()=>{r&&""!==r?u(!0):F.default.error("برای ثبت نظر باید ابتدا وارد حساب کاربری خود شوید!")},className:"text-white justify-center gap-x-2 flex items-center my-2 rounded-lg bg-gradient-to-l from-banimode-green to-green-700 w-full py-[6px] px-10 text-[16px]",children:["ثبت نظر",(0,a.jsx)(x.G,{icon:c.r8p})]}),l&&(null==l?void 0:l.length)>0&&(0,a.jsx)("section",{className:"border-t mt-6 border-dashed border-[#ddd]",children:null==l?void 0:l.map(e=>{var l;return(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)(O,{comment:e,replyText:f,setReplayText:p,handleReply:h,displayTextArea:d,setDisplayTextArea:o,handleClickLikeDislike:g,productId:t}),null===(l=e.replies)||void 0===l?void 0:l.map(e=>(0,a.jsx)(O,{handleClickLikeDislike:g,productId:t,comment:e,isReply:!0},"1-".concat(e.id)))]},e.id)})})]})},R=e=>{let{productInfo:t,productId:l,setSelectedButton:r,selectedButton:n,sections:d}=e,[o,c]=(0,s.useState)(),x=(0,i.CG)(e=>e.user.user.username);return(0,s.useEffect)(()=>{var e;n||r((null===(e=d.find(e=>e.conditions))||void 0===e?void 0:e.id)||"comments"),"comments"===n&&(0,k.Be)("product-comment/".concat(l)).then(e=>e.json()).then(e=>{c(e.results)}).catch(e=>console.log("err",e))},[n]),(0,a.jsxs)("div",{className:"md:bg-banimode-gray-xx-light rounded-xl mb-2 mx-2",children:[(0,a.jsxs)("article",{className:(0,m.m6)("md:px-14 p-5 md:py-8 flex rounded-xl flex-col gap-y-2 gap-x-8","details"!==n&&"hidden"),children:[t.main_attributes.length&&t.secondary_attributes.length?(0,a.jsx)("h3",{className:"text-sm mb-1 md:text-lg text-banimode-green",children:"مشخصات اصلی"}):"",t.main_attributes.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:(0,m.m6)("text-banimode-gray-dark mdx:grid mdx:grid-cols-5 flex flex-row mdx:text-[13px] md:py-3 px-4 ",t%2==0?"bg-white":""),children:[(0,a.jsxs)("span",{className:"pl-10 mdx:text-[13px] mdx:col-span-2 mdx:py-3 text-base",children:[" ",e.name]})," ",(0,a.jsx)("div",{className:"flex flex-col gap-y-2 mdx:py-3 mdx:border-b mdx:w-full mdx:col-span-3 mdx:gap-y-1",children:e.values.map((e,t)=>(0,a.jsx)("span",{className:"text-banimode-gray-dark block",children:e.value},e.id))})]})},"q"+t)),t.main_attributes.length&&t.secondary_attributes.length?(0,a.jsx)("h3",{className:"text-sm mb-1 md:text-lg text-banimode-orange",children:"مشخصات فرعی"}):"",t.secondary_attributes.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsxs)("p",{className:(0,m.m6)("text-banimode-gray-dark mdx:grid mdx:grid-cols-5 mdx:text-[13px] md:py-3 px-4 flex flex-row",t%2==0?"bg-white":""),children:[(0,a.jsx)("span",{className:"mdx:col-span-2 mdx:text-[13px] md:min-w-[240px] md:max-w-[240px] text-base mdx:py-3 inline-block",children:e.name}),(0,a.jsx)("span",{className:"text-banimode-gray-dark mdx:col-span-3 mdx:border-b mdx:py-3",children:e.value})]})},t))]}),"comments"===n?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 leading-8 mdx:border mdx:mt-2 mdx:rounded-xl border-gray-100",children:(0,a.jsx)(q,{user:x,id:l,comments:o})}):null,"description"===n?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 py-8 leading-8 parser max-w-[100vw] [&>p]:whitespace-pre-line",children:(0,a.jsx)(z.default,{html:t.description})}):null,"analysis"===n?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 py-8 leading-8 parser max-w-[100vw] [&>p]:whitespace-pre-line",children:(0,a.jsx)(z.default,{html:t.analysis})}):null]})},H=e=>{let{productInfo:t,contextData:l,productId:r}=e,[i,n]=(0,s.useState)(),d=[{text:"بررسی",id:"analysis",conditions:!!(t.analysis&&""!==t.analysis)},{text:"توضیحات",id:"description",conditions:!!(t.description&&""!==t.description)},{text:"مشخصات",id:"details",conditions:!!(t.main_attributes.length||t.secondary_attributes.length)},{text:"نظرات کاربران",id:"comments",conditions:!0}];return(0,a.jsxs)("section",{className:"bg-white p-1 mdx:mt-2 shadow-sm all-links-colored w-full max-w-[1625px] mx-auto flex flex-col",children:[(0,a.jsx)("div",{className:"flex mdx:border-b flex-row text-base mx-2",children:d.map(e=>e.conditions?(0,a.jsx)("button",{onClick:()=>{n(e.id)},className:(0,m.m6)("flex min-w-fit py-1 mdx:text-sm md:py-6 md:w-auto px-2 md:px-10 gap-1",i===e.id?"text-black font-[600] border-b-2 border-banimode-green":"text-banimode-gray-medium hover:text-gray-700 transition duration-300"),children:e.text},e.id):null)}),(0,a.jsx)(R,{productId:r,productInfo:t,sections:d,selectedButton:null!=i?i:d.find(e=>e.conditions&&e.id).id,setSelectedButton:n})]})},M=l(2603),B=l(34160),A=l(49539);let U=(0,o.default)(()=>Promise.all([l.e(5338),l.e(2065),l.e(3626)]).then(l.bind(l,53323)),{loadableGenerated:{webpack:()=>[53323]},loading:()=>(0,a.jsx)("div",{className:"px-4 pb-2 flex flex-row w-full  mx-auto max-w-[1625px] bg-white py-4",children:(0,a.jsx)(M.Z,{inline:!0,count:6,className:"min-w-[200px] w-full flex-grow",containerClassName:"flex flex-row gap-2 overflow-hidden w-full h-[300px]"})}),ssr:!1});var K=e=>{let{vid:t,ssrProductInfo:l,ssrProductId:r,contextData:n}=e,[d,o]=(0,s.useState)(),[c,x]=(0,s.useState)(),m=(0,i.TL)();(0,s.useEffect)(()=>{n.config.ga_tracking_id&&(f.special_offer&&(0,I.z)("view_promotion",{}),(0,I.z)("view_item",{}))},[]),(0,s.useEffect)(()=>{d&&(0,k.Be)("product/".concat(d,"/")).then(e=>e.json()).then(e=>{x(e),m((0,p.CE)(e.variants.length>0?e.variants.find(e=>e.is_default):{...e,...e.images[0]}))})},[d]);let u=null!=d?d:r,f=null!=c?c:l;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(B.Z,{theme:"banimode-1403",shopName:n.config.shop_name,shopUrl:n.shop_url,textColor:(0,g.EC)(n.config.shop_background_complementary_color),breadCrumbData:f.main_category_breadcrumb}),(0,a.jsx)(P,{contextData:n,productId:u,vid:t,productInfo:f}),(0,a.jsx)(H,{productInfo:f,productId:u,contextData:n}),(0,a.jsx)(U,{theme:A.includes(n.shop_url)?"banimode-1403":"digikala-1400",autoplay:!!n.config.products_auto_slide,setProductId:o,productId:u})]})}},26438:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return K}});var a=l(57437),s=l(2265),r=l(20703),i=l(81722),n=e=>{let{src:t,srcZoom:l,alt:r}=e,n=(0,s.useRef)(null),d=(0,s.useRef)(null),o=(0,s.useRef)(null);return(0,s.useEffect)(()=>{new i.Z(n.current,{inlinePane:900,containInline:!0,hoverBoundingBox:!0,paneContainer:d.current,inlineContainer:o.current,zoomFactor:3})},[]),(0,a.jsxs)("div",{className:"h-[345px] [&>img]:object-contain flex items-center justify-center tryxyz",children:[(0,a.jsx)("img",{className:"object-contain max-w-full h-[345px] w-auto object-cotain",style:{objectFit:"contain"},height:345,width:345,ref:n,src:t,"data-zoom":l,alt:r,fetchPriority:"high",loading:"eager"}),(0,a.jsx)("div",{ref:o}),(0,a.jsx)("div",{className:"zoom-item mx-0",ref:d})]})},d=l(69036),o=l(51367),c=l(88024),x=l(67535),m=l(224),u=l(95601),f=l.n(u),p=l(24232),g=l(51171),h=l(37399),b=l(95071),v=l(67822);let j=[{location:"facebook_address",picPosition:"0px 0px",address:"https://www.facebook.com/sharer.php?u="},{location:"whatsapp_address",picPosition:"-25px 0px",address:"https://web.whatsapp.com/send?text="},{location:"telegram_address",picPosition:"-50px 0px",address:"https://t.me/share/url?url="},{location:"twitter_address",picPosition:"-75px 0px",address:"https://twitter.com/intent/tweet?url="}];var w=e=>{let{isOpen:t,setIsOpen:l,shopUrl:i,gaTrackingId:n,data:d}=e,[c,x]=(0,s.useState)(!1),m=(0,s.useRef)(null),[u,f]=(0,s.useState)(!1);(0,v.Z)(m,()=>l(!1));let{isClosed:p}=(0,h.Z)(t,l,500);return(0,a.jsxs)("div",{ref:m,className:"relative",children:[(0,a.jsx)(r.default,{className:"cursor-pointer",onClick:()=>{l(!t)},src:"/icons/share.svg",alt:"share",width:28,height:28}),p?null:(0,a.jsxs)("div",{className:(0,o.m6)("bg-[rgba(255,255,255,0.9)] py-1 px-2 -top-1 border absolute overflow-hidden gap-1 right-full flex flex-row",t?"appear-drawer-x":"disappear-drawer-x"),children:[j.map(e=>(0,a.jsx)(g.default,{style:{backgroundImage:"url(/images/social-networks.png)",backgroundPosition:e.picPosition},onClick:()=>{n&&(0,b.z)("share",{})},className:"w-[25px] h-[25px] inline-block min-w-[25px] min-h-[25px]",href:e.address+i+"/product/".concat(d.id,"/").concat(d.productName)},e.location)),(0,a.jsxs)("div",{onClick:()=>{navigator&&location&&navigator.clipboard.writeText(location.href),f(!0)},className:(0,o.m6)("border cursor-pointer w-max gap-1 items-center flex flex-row border-[rgb(102,102,102)] px-2 py-1 text-xs whitespace-nowrap"),children:[(0,a.jsx)(r.default,{alt:"copy",width:18,height:18,src:"/icons/copy.svg"}),u?"کپی شد":"کپی لینک"]})]})]})};let _=(0,p.default)(()=>Promise.all([l.e(7674),l.e(1796),l.e(7061)]).then(l.bind(l,87061)),{loadableGenerated:{webpack:()=>[87061]},loading:()=>(0,a.jsx)("div",{}),ssr:!1});var N=e=>{var t;let{defaultProductImage:l,productInfo:i,productId:u,shopUrl:p,gaTrackingId:g}=e,[h,b]=(0,s.useState)(!1),v=(0,m.CG)(e=>e.selectedProduct.product),[j,N]=(0,s.useState)(!1),y=(0,s.useRef)(null),[k,S]=(0,s.useState)(i.images.find(e=>e.default)||i.images[0]||{url:l}),C=e=>{if(y.current){if(y.current.scrollLeft>=0&&"left"===e)return null;y.current.scrollBy({left:"left"===e?90:-90,top:0,behavior:"smooth"})}};return(0,s.useEffect)(()=>{(null==v?void 0:v.image_url)&&v.name&&S({image_url:v.image_url,default:!1,id:v.id,image_alt:v.image_alt})},[null==v?void 0:v.image_url]),(0,a.jsxs)("section",{className:"xl:col-span-2 col-span-3",children:[(0,a.jsx)(f(),{children:(0,a.jsx)("link",{rel:"preload",href:k.image_url?k.image_url+"?size=750x820&rs=fit":l,as:"image"})}),(0,a.jsx)(_,{productId:u,productName:i.name,isOpen:h,setIsOpen:b}),(i.special_offer&&!i.special_offer_end||i.special_offer&&i.special_offer_end&&new Date(i.special_offer_end).getTime()-new Date().getTime()>0)&&(0,a.jsxs)("div",{className:"flex flex-row w-full justify-between border-b border-red-500 pb-2 mb-2",children:[(0,a.jsx)("img",{src:"/images/special_offer.png",className:"object-contain h-fit",alt:"پیشنهاد ویژه",width:183,height:19}),i.special_offer_end&&new Date(i.special_offer_end).getTime()-new Date().getTime()>0&&(0,a.jsx)(d.default,{finalTime:i.special_offer_end})]}),(0,a.jsxs)("section",{className:"flex flex-row",children:[(0,a.jsxs)("div",{className:"mt-12 p-4 flex flex-col gap-4 -ml-2 -mr-6 min-w-[60px]",children:[(0,a.jsx)(w,{gaTrackingId:g,shopUrl:p,data:{id:i.id,productName:i.slug},isOpen:j,setIsOpen:N}),(0,a.jsx)(r.default,{className:"cursor-pointer",onClick:()=>{b(!0)},src:"/icons/chartline.svg",alt:"share",width:28,height:28})]}),(0,a.jsxs)("div",{className:"w-[calc(100%-20px)] flex-col flex justify-center items-center",children:[(0,a.jsx)(n,{src:k.image_url?k.image_url+"?size=750x820&rs=fit":l,alt:null!==(t=k.image_alt)&&void 0!==t?t:v.name,srcZoom:k.image_url}),i.images.length>1?(0,a.jsx)("div",{className:"relative w-[calc(100%-20px)]",children:(0,a.jsxs)("div",{className:"flex  pt-4 gap-2 max-w-full overflow-x-hidden flex-row",ref:y,children:[i.images.length>=4?(0,a.jsx)("button",{"aria-label":"scroll to left images",className:"absolute cursor-pointer text-xl -mr-4 mt-[28px]",children:(0,a.jsx)(c.G,{role:"button",onClick:()=>C("left"),icon:x.yOZ})}):null,i.images.map((e,t)=>(0,a.jsx)("div",{onClick:()=>{S(e)},className:(0,o.m6)("max-w-[82px] min-w-[82px] flex border justify-center items-center max-h-[82px] min-h-[82px] overflow-hidden rounded-md ",k.image_url===e.image_url?"border-[#1ca2bd]":"border-gray-100"),children:(0,a.jsx)("img",{className:"object-cover max-w-auto cursor-pointer",alt:e.image_alt?e.image_alt:v.name?v.name:k.image_alt,width:82,height:82,src:e.image_url+"?size=164x164&rs=fit"})},t)),i.images.length>=4?(0,a.jsx)("button",{"aria-label":"scroll to right images",className:"absolute right-full text-xl cursor-pointer mr-1 mt-[28px]",children:(0,a.jsx)(c.G,{role:"button",onClick:()=>C("right"),icon:x.EyR})}):null]})}):null]})]})]})},y=l(9631),k=l(10971),S=l(54884),C=l(40109),I=l(87546),E=l(65950),P=e=>{var t,l;let{productInfo:i,productId:n,vid:d,config:u}=e,[f,p]=(0,s.useState)(!0),[h,v]=(0,s.useState)(!1),[j,w]=(0,s.useState)(!1),_=(0,m.CG)(e=>e.selectedProduct.product),N=(0,s.useRef)(null),P=(0,m.TL)(),z=""!==_.name?_:i.has_variants&&i.variants.length>0?null!==(l=i.variants.find(e=>String(e.id)===d))&&void 0!==l?l:i.variants[0]:i,Z=null===(t=(0,m.CG)(e=>e.cart.cart.items))||void 0===t?void 0:t.find(e=>(null==e?void 0:e.variant)?String(e.variant)===String(z.id)&&String(e.product)==n:String(e.product)==n),F=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;v(!0),(0,S.SD)("cart/item/",{product_id:n,...z.id?{variant_id:String(z.id)}:{},...t?{quantity:"".concat(t)}:{}}).then(async e=>e.json()).then(t=>{u.ga_tracking_id&&(0,b.z)("add_to_cart",t),P((0,C.Z5)(t)),w(e)}).finally(()=>v(!1))},T=()=>{v(!0),(0,S.SD)("cart/item/delete/",{product_id:"".concat(n),...z.id?{variant_id:"".concat(z.id)}:{}}).then(e=>e.json()).then(e=>{u.ga_tracking_id&&(0,b.z)("remove_from_cart",e),P((0,C.Z5)(e))}).catch(e=>console.log("err",e)).finally(()=>v(!1))};return((0,s.useEffect)(()=>{if(document&&window){if(N.current&&N.current.clientHeight&&window.innerWidth<1024){var e;P((0,I.Zg)(null===(e=N.current)||void 0===e?void 0:e.clientHeight))}window.addEventListener("scroll",()=>{if(window.innerWidth<768){let e=document.querySelector("footer");p(!(0,E.XS)(e))}})}},[]),(0,s.useEffect)(()=>{let e;return j&&setTimeout(()=>{w(!1)},4e3),()=>e&&clearTimeout(e)},[j]),"call"===i.stock_type)?(0,a.jsx)(g.default,{href:"tel:".concat(null==u?void 0:u.shop_phone),className:"w-full mt-16 rounded-md text-2xl phone-icon flex text-[#515151] gap-x-2 flex-row-reverse border h-fit items-center col-span-7 xl:col-span-2 text-center justify-center font-semibold py-3 px-4 bg-[#ddd]",children:(0,a.jsx)("span",{className:"text-sm",children:"جهت اطلاع از قیمت و موجودی تماس بگیرید"})}):z.show_price?(0,a.jsxs)("div",{className:"w-full mt-4 xl:mt-16 rounded-md overflow-hidden border h-fit flex flex-col items-center col-span-7 xl:col-span-2 xl:p-4 bg-[#f5f5f5]",children:[i.guarantee?(0,a.jsx)("div",{className:"border-b text-xs guarantee-icon text-[#9b9b9b] w-full pb-3 xlx:p-4",children:(0,a.jsx)("span",{className:"text-black",children:"boolean"==typeof i.guarantee?"گارانتی اصالت و سلامت فیزیکی کالا":i.guarantee})}):null,i.is_digital?null:(0,a.jsxs)("section",{className:"w-full text-xs text-black leading-8 xlx:p-4",children:[(0,a.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,a.jsx)(r.default,{alt:"checkboard",width:24,height:24,src:"/icons/check-clipboard.svg"}),"موجود در انبار ",u.shop_name]}),(0,a.jsxs)("div",{className:"text-[rgb(98,102,109)] before:ml-2 before:min-h-2 inline-block before:inline-block before:absolute before:top-0 before:right-[2px] pr-8 mr-2 before:bg-gray-300 after:bg-[#0fabc6] after:min-w-[6px] after:rounded-full after:-translate-y-1/2 after:min-h-[6px] after:absolute relative after:top-1/2 after:right-0 before:min-w-[2px]",children:["ارسال توسط ",u.shop_name]})]}),(0,a.jsxs)("section",{ref:N,className:(0,o.m6)("w-full border-t flex lg:flex-row xl:flex-row-reverse flex-row-reverse gap-4 items-center z-[11] justify-between bg-white lg:bg-inherit px-2 py-1 lg:pb-0 lg:p-4 lg:static fixed bottom-0 left-0",f?"lgx:animate-appear0_2":"lgx:animate-disappear0_2 lgx:z-0"),children:[(0,a.jsxs)("div",{className:"flex flex-col lgx:flex-grow xl:flex-grow lgx:py-2 lgx:pt-3 xl:flex-col xlx:gap-4 items-center xlx:items-end justify-start",children:[!!z.discount_percent&&(0,a.jsxs)("p",{className:"text-left gap-x-2 items-end flex xl:block flex-row text-xs",children:[(0,a.jsx)("span",{className:"text-[#acacac] tracking-[0.5] line-through",children:z.compare_at_price.toLocaleString()})," ",(0,a.jsxs)("span",{className:"text-white bg-[#fb3449] w-fit xl:mr-2 font-semibold px-1 rounded-[20px]",children:[z.discount_percent,"%"]})]}),(0,a.jsxs)("p",{className:"text-left text-[#fb3449]",children:[(0,a.jsxs)("span",{className:"text-[20px] lg:text-[32px] xl:text-[20px]",children:[" ",z.price.toLocaleString()," "]}),"تومان"]})]}),(null==Z?void 0:Z.quantity)?(0,a.jsxs)("div",{className:"shadow-all-dir-md text-sm my-2 lgx:flex-grow flex flex-row xl:flex-grow px-4 py-3 rounded-md text-[#ef394e] w-fit xl:mx-auto mb-1",children:[(0,a.jsx)("button",{disabled:h||Z.max_available&&Z.max_available===Z.quantity,children:(0,a.jsx)(c.G,{onClick:()=>F(),icon:x.r8p})}),h?(0,a.jsx)(y.Z,{className:"max-h-[16px] flex-grow  min-w-[60px] ",color:"#ef394e"}):(0,a.jsxs)("div",{className:"flex min-w-[60px] flex-grow  flex-col items-center",children:[(0,a.jsx)("span",{className:"inline-block text-center font-bold",children:Z.quantity}),Z.max_available&&Z.max_available===Z.quantity?(0,a.jsx)("span",{className:"text-[10px]",children:"حداکثر"}):null]}),1===Z.quantity?(0,a.jsx)("button",{disabled:h,children:(0,a.jsx)(c.G,{onClick:()=>T(),icon:x.Vui})}):(0,a.jsx)("button",{onClick:()=>F(!1,Math.max(Z.quantity-1,0)),disabled:h,children:(0,a.jsx)(c.G,{icon:x.Kl4})})]}):(0,a.jsxs)("button",{disabled:h,onClick:()=>F(!0),className:"text-white rounded-md lgx:flex-grow my-1 bg-[#ef394e] h-fit py-4 xl:py-[10px] leading-4 px-[18px] font-semibold xl:font-normal text-sm 2xl:text-lg w-fit",children:["افزودن به سبد خرید"," ",h?(0,a.jsx)(y.Z,{className:"max-w-[16px] max-h-[16px]",color:"#FFFFFF"}):null]}),(0,a.jsxs)(k.Z,{setIsOpen:w,isOpen:j,headerText:"این کالا به سبد خرید اضافه شد!",className:"sm:max-w-[600px] md:min-w-[400px] z-30",children:[(0,a.jsxs)("div",{className:"flex flex-row gap-6 items-center",children:[(0,a.jsx)("img",{width:80,alt:null==Z?void 0:Z.image_alt,height:80,className:"object-cover my-1 h-[80px] w-[80px]",src:(null==Z?void 0:Z.image_url)+"?size=160x160&rs=fit"}),(0,a.jsx)("p",{children:null==Z?void 0:Z.name})]}),(0,a.jsx)(g.default,{target:"_blank",href:"/cart/",className:"text-white rounded-md block text-center bg-[#ef394e] h-fit py-4 xl:py-[10px] leading-4 px-[18px] font-semibold xl:font-normal text-sm xl:text-lg w-full lg:w-full ",children:"برو به سبد خرید"})]})]})]}):(0,a.jsxs)("div",{className:"w-full mt-16 rounded-md p-2 text-[#515151] border h-fit items-center col-span-7 xl:col-span-2 xl:p-4 bg-[#f5f5f5]",children:[(0,a.jsx)("div",{className:"before:h-[1px] mb-2 text-[#969696] text-lg after:h-[1px] after:mr-2 before:ml-2 before:grow flex flex-row items-center after:grow before:inline-flex w-full after:bg-[#969696] before:bg-[#969696]",children:"ناموجود"}),"متاسفانه این کالا در حال حاضر موجود نیست. می‌توانید از طریق لیست بالای صفحه، از محصولات مشابه این کالا دیدن نمایید."]})},z=l(65480),Z=l(47907),F=l(30828),T=e=>{let{mainAttributes:t,productInfo:l,hasVariant:r,varients:i}=e,n=(0,Z.useSearchParams)(),d=(0,Z.usePathname)(),c=(0,F.I0)(),[x,m]=(0,s.useState)(Array(t.length).fill(0)),u=e=>{let t=new URLSearchParams(n);t.delete("vid"),t.append("vid","".concat(e)),history.replaceState({},"","".concat(d,"?").concat(t))};return(0,s.useEffect)(()=>{if(0===i.length||!r){c((0,z.CE)(l));return}let e=Number(n.get("vid"));if(e){let s=i.find(t=>t.id===e);if(s){var t,a;m(s.attributes),c((0,z.CE)(s.image_url?s:{...s,image_url:null===(a=l.images)||void 0===a?void 0:null===(t=a.find(e=>e.default))||void 0===t?void 0:t.image_url}))}else c((0,z.CE)({id:0,name:"string",attributes:[1,2],show_price:!1,price:0,compare_at_price:0,discount_percent:0,is_default:!1,image:""}))}else{let e=i.find(e=>e.is_default)||i[0];e&&(m(e.attributes),u(e.id))}},[n.get("vid")]),(0,s.useEffect)(()=>{if(0===x.length||0===x[0])return;let e=i.find(e=>(0,E.Hj)(e.attributes,x));e?u(e.id):u(-1)},[x]),(0,a.jsx)(a.Fragment,{children:t.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-row gap-2 flex-wrap ",children:[(0,a.jsx)("div",{className:"before:bg-gray-300 text-[13px] before:inline-block before:h-[6px] before:w-[6px] before:rounded-full inline-block before:ml-2 ",children:e.name}),e.values.map(e=>(0,a.jsx)("div",{onClick:()=>{m(l=>{let a=l.map(e=>e);return a[t]=e.id,a})},className:(0,o.m6)("border rounded-sm cursor-pointer py-[2px] px-4 text-[13px]  before:w-[10px] flex items-center before:inline-flex before:rounded-full before:ml-1 before:h-[10px]",x.find(t=>e.id===t)?"border-[#1ca2bd] before:bg-[#1ca2bd] border-2 py-[1px] px-[15px] text-[#1ca2bd]":"before:bg-gray-200 before:hover:bg-gray-400"),children:e.value},e.value))]},e.name))})},D=l(16223),G=e=>{let{productInfo:t,showTags:l}=e,s=[...t.brand?[{key:"برند",value:t.brand.name,url:t.brand.url}]:[],{key:"دسته‌بندی",value:t.main_category.name,url:t.main_category.url}];return(0,a.jsxs)("section",{className:"col-span-4 xl:col-span-3 flex flex-col gap-3 md:py-6 p-5 md:pl-5 md:pr-5",children:[(0,a.jsx)("h1",{className:"text-[19px] font-[600] leading-6 text-black",children:t.name}),(0,a.jsx)("div",{className:"after:min-h-[1px] after:max-h-[1px] after:flex-grow after:inline-flex after:mr-2 items-center truncate flex text-xs text-[#ccc] after:bg-[#ccc] whitespace-nowrap",children:t.english_name}),(0,a.jsx)("article",{className:"flex flex-col md:flex-row gap-4 pb-2",children:s.map(e=>(0,a.jsxs)("div",{children:[e.key," : ",(0,a.jsx)(g.default,{target:"_blank",className:"text-[#1ca2bd] border-b pb-1 border-[#1ca2bd] border-dashed",href:e.url,children:e.value})]},e.key))}),t.main_attributes.length>0&&(0,a.jsx)("p",{className:"w-full",children:" ویژگی‌های محصول"}),(0,a.jsx)(T,{productInfo:t,hasVariant:t.has_variants,varients:t.variants,mainAttributes:t.main_attributes}),t.product_identifier?(0,a.jsxs)("div",{children:["شناسه کالا ",t.product_identifier]}):null,t.tags&&l&&t.tags.length>0&&(0,a.jsxs)("div",{className:"flex flex-row gap-2 pb-4",children:[(0,a.jsx)("div",{className:"whitespace-nowrap",children:"برچسب‌ها:"}),(0,a.jsx)("div",{className:"flex-grow flex flex-row flex-wrap gap-3",children:t.tags.map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(g.default,{target:"_blank",className:"text-[#1ca2bd] text-xs inline border-b pb-1 border-[#1ca2bd] border-dashed",href:e.url,children:e.value})},e.url))})]}),(0,a.jsx)(D.Z,{attributes:t.secondary_attributes})]})},L=e=>{let{productInfo:t,vid:l,contextData:s,productId:r}=e;return(0,a.jsxs)("section",{className:"bg-white p-5 border shadow-sm border-[#e8e8e8] w-full max-w-[1625px] mx-auto flex flex-col md:grid grid-cols-7",children:[(0,a.jsx)(N,{productId:r,defaultProductImage:s.config.default_product_image,gaTrackingId:s.config.ga_tracking_id,shopUrl:s.shop_url,productInfo:t}),(0,a.jsx)(G,{productInfo:t,showTags:s.config.show_product_tags}),(0,a.jsx)(P,{productId:r,vid:l,config:s.config,productInfo:t})]})},O=l(59074),q=l(7509),R=e=>{let{productInfo:t,productId:l,setSelectedButton:r,selectedButton:i,sections:n}=e,[d,c]=(0,s.useState)(),x=(0,m.CG)(e=>e.user.user.username);return(0,s.useEffect)(()=>{var e;i||r((null===(e=n.find(e=>e.conditions))||void 0===e?void 0:e.id)||"comments"),"comments"===i&&(0,S.Be)("product-comment/".concat(l)).then(e=>e.json()).then(e=>{c(e.results)}).catch(e=>console.log("err",e))},[i]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("article",{className:(0,o.m6)("md:px-14 p-5 md:py-8 flex flex-col gap-y-2 gap-x-8","details"!==i&&"hidden"),children:[t.main_attributes.length&&t.secondary_attributes.length?(0,a.jsx)("h3",{className:"text-[16px] mb-5 before:inline-block before:min-w-2 before:min-h-2 before:bg-emerald-500 before:ml-2 before:rotate-45 before:-mr-1 overflow-hidden before:max-w-2",children:"مشخصات اصلی"}):"",t.main_attributes.map((e,t)=>(0,a.jsxs)("div",{className:"md:grid flex flex-col gap-y-1 mb-4 md:mb-0 md:grid-cols-4 gap-x-4",children:[(0,a.jsx)("p",{className:"md:bg-[#f5f5f5] bg-[#ddd] md:pt-[14px] leading-7 text-[13px] px-2 md:px-[18px] py-1 md:pb-[12px]",children:e.name}),(0,a.jsx)("p",{className:"bg-[#f5f5f5] md:pt-[14px] leading-7 text-[13px] md:px-[18px] px-2 py-1 md:pb-[12px] col-span-3",children:e.values.map((e,t)=>(0,a.jsxs)("span",{children:[(0,a.jsxs)("span",{className:0===t?"hidden":"",children:[" "," / "," "]}),e.value]},e.id))})]},"q"+t)),t.main_attributes.length&&t.secondary_attributes.length?(0,a.jsx)("h3",{className:"text-[16px] my-5 before:inline-block before:min-w-2 before:min-h-2 before:bg-emerald-500 before:ml-2 before:rotate-45 before:-mr-1 overflow-hidden before:max-w-2",children:"مشخصات فرعی"}):"",t.secondary_attributes.map((e,t)=>(0,a.jsxs)("div",{className:"md:grid flex flex-col gap-y-1 mb-4 md:mb-0 md:grid-cols-4 gap-x-4",children:[(0,a.jsx)("p",{className:"md:bg-[#f5f5f5] bg-[#ddd] md:pt-[14px] leading-7 text-[13px] px-2 md:px-[18px] py-1 md:pb-[12px]",children:e.name}),(0,a.jsx)("p",{className:"bg-[#f5f5f5] md:pt-[14px] leading-7 text-[13px] md:px-[18px] px-2 py-1 md:pb-[12px] col-span-3",children:e.value})]},t))]}),"comments"===i?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 leading-8",children:(0,a.jsx)(q.Z,{user:x,id:l,comments:d})}):null,"description"===i?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 py-8 leading-8 parser max-w-[100vw] [&>p]:whitespace-pre-line",children:(0,a.jsx)(O.default,{html:t.description})}):null,"analysis"===i?(0,a.jsx)("article",{className:"md:px-14 p-5 md:py-8 py-8 leading-8 parser max-w-[100vw] [&>p]:whitespace-pre-line",children:(0,a.jsx)(O.default,{html:t.analysis})}):null]})},H=e=>{let{productInfo:t,contextData:l,productId:i}=e,[n,d]=(0,s.useState)(),c=[{text:"نقد و بررسی",icon:"/icons/glasses.svg",id:"analysis",conditions:!!(t.analysis&&""!==t.analysis)},{text:"توضیحات",icon:"/icons/page-blank.svg",id:"description",conditions:!!(t.description&&""!==t.description)},{text:"مشخصات",icon:"/icons/checkbox.svg",id:"details",conditions:!!(t.main_attributes.length||t.secondary_attributes.length)},{text:"نظرات",icon:"/icons/comments.svg",id:"comments",conditions:!0}];return(0,a.jsxs)("section",{className:"bg-white shadow-sm border-[#e8e8e8] all-links-colored w-full max-w-[1625px] mx-auto flex flex-col",children:[(0,a.jsx)("div",{className:"flex  mdx:grid mdx:grid-cols-2 flex-row flex-wrap bg-[#f8f8f8] text-base",children:c.map(e=>e.conditions?(0,a.jsxs)("button",{onClick:()=>{d(e.id)},className:(0,o.m6)("flex justify-center min-w-fit  text-[#6f6f6f] flex-grow w-full md:w-auto md:flex-grow-0 items-center gap-1 px-5 py-3",n===e.id?"border-t-4 border-[#00bfd6] bg-white":"border-[#dfdfdf] border-b sm:border-b-0 border-t border-l"),children:[(0,a.jsx)(r.default,{alt:e.id,src:e.icon,width:22,height:22}),e.text]},e.id):null)}),(0,a.jsx)(R,{productId:i,productInfo:t,sections:c,selectedButton:null!=n?n:c.find(e=>e.conditions&&e.id).id,setSelectedButton:d})]})},M=l(2603),B=l(34160),A=l(49539);let U=(0,p.default)(()=>Promise.all([l.e(5338),l.e(2065),l.e(8443)]).then(l.bind(l,36587)),{loadableGenerated:{webpack:()=>[36587]},loading:()=>(0,a.jsx)("div",{className:"px-4 pb-2 flex flex-row w-full  mx-auto max-w-[1625px] bg-white py-4",children:(0,a.jsx)(M.Z,{inline:!0,count:6,className:"min-w-[200px] w-full flex-grow",containerClassName:"flex flex-row gap-2 overflow-hidden w-full h-[300px]"})}),ssr:!1});var K=e=>{let{vid:t,ssrProductInfo:l,ssrProductId:r,contextData:i}=e,[n,d]=(0,s.useState)(),[o,c]=(0,s.useState)(),x=(0,m.TL)();(0,s.useEffect)(()=>{i.config.ga_tracking_id&&(f.special_offer&&(0,b.z)("view_promotion",{}),(0,b.z)("view_item",{}))},[]),(0,s.useEffect)(()=>{n&&(0,S.Be)("product/".concat(n,"/")).then(e=>e.json()).then(e=>{c(e),x((0,z.CE)(e.variants.length>0?e.variants.find(e=>e.is_default):{...e,...e.images[0]}))})},[n]);let u=null!=n?n:r,f=null!=o?o:l;return(0,a.jsxs)("div",{className:"flex flex-col gap-6 px-5",children:[(0,a.jsx)(B.Z,{shopName:i.config.shop_name,shopUrl:i.shop_url,textColor:(0,E.EC)(i.config.shop_background_complementary_color),breadCrumbData:f.main_category_breadcrumb}),(0,a.jsx)(L,{contextData:i,productId:u,vid:t,productInfo:f}),(0,a.jsx)(H,{productInfo:f,productId:u,contextData:i}),(0,a.jsx)(U,{theme:A.includes(i.shop_url)?"banimode-1403":"digikala-1400",autoplay:!!i.config.products_auto_slide,setProductId:d,productId:u})]})}},16223:function(e,t,l){"use strict";var a=l(57437),s=l(2265),r=l(51367);t.Z=e=>{var t;let{attributes:l,textStyle:i}=e,n=l.length-4>0?l.length-4:0,d=(0,s.useRef)(null),[o,c]=(0,s.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[l.slice(0,4).map(e=>(0,a.jsxs)("div",{className:(0,r.m6)("before:ml-1 before:rounded-full before:bg-gray-300 before:inline-block before:w-[6px]  before:h-[6px]",i),children:[e.name," "," : ",(0,a.jsx)("span",{className:"font-semibold",children:e.value})]},e.value+e.name)),(0,a.jsx)("div",{ref:d,className:"flex flex-col gap-3",style:{transition:"max-height 0.6s ease-out",overflow:"hidden",maxHeight:o?"".concat(null===(t=d.current)||void 0===t?void 0:t.scrollHeight,"px"):"0px"},children:n?l.slice(4).map(e=>(0,a.jsxs)("div",{className:(0,r.m6)("before:ml-1 before:rounded-full before:bg-gray-300 before:inline-block before:w-[6px]  before:h-[6px]",i),children:[e.name," "," : ",(0,a.jsx)("span",{className:"font-semibold",children:e.value})]},e.value+e.name)):null}),n?(0,a.jsx)("span",{className:"cursor-pointer w-fit text-xs text-[#1ca2bd] border-b pb-1 border-[#1ca2bd] border-dashed",onClick:()=>c(!o),children:o?"- بستن":"+ موارد بیشتر"}):null]})}},34160:function(e,t,l){"use strict";l.d(t,{Z:function(){return o}});var a=l(57437),s=l(51171),r=l(2265),i=l(51367),n=e=>{let{breadCrumbData:t,shopName:l,shopUrl:n,textColor:d}=e;return(0,a.jsxs)("div",{style:{color:d},className:(0,i.m6)("max-w-[1625px] mx-auto w-full text-xs cursor-pointer"),children:[(0,a.jsxs)(s.default,{target:"_blank",href:n,className:"hover:font-semibold",children:[" ","فروشگاه اینترنتی ",l]})," ",t.map(e=>(0,a.jsxs)(r.Fragment,{children:["/"," ",(0,a.jsx)(s.default,{target:"_blank",href:e.url,className:"hover:font-semibold leading-7",children:e.name},e.id)]},e.url))]})},d=e=>{let{breadCrumbData:t,shopName:l,shopUrl:n,textColor:d}=e;return(0,a.jsx)("div",{className:"px-4 md:py-2 -mt-4 text-gray-800  md:bg-gray-50 border-b",children:(0,a.jsxs)("div",{style:{color:d},className:(0,i.m6)("overflow-x-auto max-w-full whitespace-nowrap w-[1440px] py-1 mx-auto ml-auto text-sm md:font-semibold mdx:text-xs cursor-pointer"),children:[(0,a.jsxs)(s.default,{target:"_blank",href:n,className:"hover:font-semibold",children:[" ","فروشگاه اینترنتی ",l]})," ",t.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("span",{className:"mdx:text-[10px] text-sm md:font-light px-1",children:[" ",">"]}),(0,a.jsx)(s.default,{target:"_blank",href:e.url,className:"hover:font-semibold leading-7 text-banimode-gray-medium last:text-banimode-green",children:e.name},e.id)]},e.url))]})})},o=e=>{let{theme:t="digikala-1400",...l}=e;return({"digikala-1400":(0,a.jsx)(n,{...l}),"banimode-1403":(0,a.jsx)(d,{...l})})[t]}},9631:function(e,t,l){"use strict";var a=l(57437);l(2265);var s=l(51367);t.Z=e=>{let{className:t,color:l="FFFFFF"}=e;return(0,a.jsx)("svg",{width:"28px",height:"28px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:(0,s.m6)("hds-flight-icon--animation-loading animate-spin inline",t),children:(0,a.jsxs)("g",{fill:l,fillRule:"evenodd",clipRule:"evenodd",children:[(0,a.jsx)("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8z",opacity:".2"}),(0,a.jsx)("path",{d:"M7.25.75A.75.75 0 018 0a8 8 0 018 8 .75.75 0 01-1.5 0A6.5 6.5 0 008 1.5a.75.75 0 01-.75-.75z"})]})})}},10971:function(e,t,l){"use strict";var a=l(57437),s=l(37399),r=l(16098),i=l(88024);l(2265);var n=l(51367);t.Z=e=>{let{children:t,className:l,isOpen:d,setIsOpen:o,headerText:c,hasHeader:x=!0,...m}=e,{isClosed:u}=(0,s.Z)(d,o,200);return u?null:(0,a.jsx)("div",{onClick:e=>{e.target===e.currentTarget&&o(!1)},className:(0,n.m6)("bg-black fixed w-full flex sm:justify-center sm:items-center items-end h-full top-0 left-0 bg-opacity-20 z-40",!d&&"disappear0_1",d&&"appear0_1"),children:(0,a.jsxs)("div",{className:(0,n.m6)("bg-white w-full md:w-fit md:rounded-lg rounded-t-lg p-4 ",!d&&"disappear0_1",d&&"appear0_1",l),...m,children:[x?(0,a.jsxs)("div",{className:"inline-flex flex-row pb-2 border-b mb-2 gap-x-4 sm:mb-8 px-2 w-full grow justify-between",children:[(0,a.jsx)("p",{className:"text-base font-[400] flex-grow",children:c}),(0,a.jsx)(i.G,{onClick:()=>{o(!1)},icon:r.YI,className:"text-lg font-black cursor-pointer"})]}):null,t]})})}},69036:function(e,t,l){"use strict";l.r(t);var a=l(57437),s=l(65950),r=l(2265),i=l(51367);t.default=e=>{let{finalTime:t,className:l}=e,[n,d]=(0,r.useState)();return((0,r.useEffect)(()=>{let e=setInterval(()=>{d((0,s.jK)(new Date(t).getTime()/1e3-new Date().getTime()/1e3))},1e3);return()=>clearInterval(e)},[]),n)?(0,a.jsxs)("div",{className:(0,i.m6)("text-[#fb3449] text-[14px] whitespace-nowrap",l),children:[n.day," روز و ",n.hour,":",n.minutes,":",n.seconds]}):(0,a.jsx)(a.Fragment,{})}},40109:function(e,t,l){"use strict";l.d(t,{Z5:function(){return s}});let a=(0,l(28166).oM)({name:"cart",initialState:{cart:{total_quantity:0,items_price_sum_without_discount:0,items_discount_sum:0,items_discount_percent:0,items_price_sum:0,shipping_price:"",shipping_cash_on_delivery:!1,final_price:0,items:[],tax_amount:0}},reducers:{addCart(e,t){e.cart=t.payload}}}),{addCart:s}=a.actions;t.ZP=a},224:function(e,t,l){"use strict";l.d(t,{CG:function(){return r},TL:function(){return s}});var a=l(30828);let s=a.I0,r=a.v9},65480:function(e,t,l){"use strict";l.d(t,{CE:function(){return s}});let a=(0,l(28166).oM)({name:"pdp-selected-product",initialState:{product:{id:0,attributes:[],compare_at_price:0,discount_percent:0,image_url:"",image_alt:"",show_price:!1,is_default:!1,name:"",price:0}},reducers:{setSelectedProduct(e,t){e.product=t.payload}}}),{setSelectedProduct:s}=a.actions;t.ZP=a},87546:function(e,t,l){"use strict";l.d(t,{Zg:function(){return s}});let a=(0,l(28166).oM)({name:"social-icons",initialState:{bottom:10},reducers:{setSocialIconBottom(e,t){e.bottom=t.payload}}}),{setSocialIconBottom:s}=a.actions;t.ZP=a},95071:function(e,t,l){"use strict";l.d(t,{z:function(){return s}});var a=l(80946);let s=(e,t)=>(0,a.Nf)("event",e,t)},65950:function(e,t,l){"use strict";let a;l.d(t,{Ds:function(){return c},EC:function(){return x},H:function(){return m},Hj:function(){return d},Q3:function(){return u},UL:function(){return r},Uf:function(){return o},XS:function(){return s},jK:function(){return n},oH:function(){return f}});let s=e=>{if(!document||!e)return!1;let t=e.getBoundingClientRect(),l=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-l>=0)},r=e=>e.replace(/[۰-۹]/g,e=>"۰۱۲۳۴۵۶۷۸۹".indexOf(e)),i=e=>e>=10?"".concat(e):"0".concat(e),n=e=>{let t=i(Math.floor(e/31104e3)),l=i(Math.floor(e/2592e3)),a=i(Math.floor(e/86400));return{year:t,month:l,day:a,hour:i(Math.floor(e/3600%24)),minutes:i(Math.floor(e/60%60)),seconds:i(Math.floor(e%60))}},d=(e,t)=>{if(e===t)return!0;if(null==e||null==t||e.length!==t.length)return!1;let l=e.map(e=>e).sort(),a=t.map(e=>e).sort();for(var s=0;s<l.length;++s)if(l[s]!==a[s])return!1;return!0},o=(e,t)=>{let l={};return Object.keys(e).forEach(e=>{t[e]&&(l[e]=t[e])}),l},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return function(){for(var l=arguments.length,s=Array(l),r=0;r<l;r++)s[r]=arguments[r];clearTimeout(a),a=setTimeout(()=>{e(...s)},t)}},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgb(107,114,128)";return e?e.startsWith("#")||e.startsWith("rg")?e:"#"+e:t},m={0:"یکشنبه",1:"دوشنبه",2:"سه‌شنبه",3:"چهارشنبه",4:"پنج‌شنبه",5:"جمعه",6:"شنبه"},u=e=>{for(let t in e)e[t]||delete e[t];return e},f=e=>String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},67822:function(e,t,l){"use strict";var a=l(2265);t.Z=function(e,t){(0,a.useEffect)(()=>{let l=l=>{!e.current||e.current.contains(l.target)||t(l)};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l)}},[e,t])}},49539:function(e){"use strict";e.exports=JSON.parse('["https://originaldeylam.ir","https://228studio.ir","https://darjeans.ir","https://jameposh.ir","https://kottaktehran.ir","https://slash-market.ir","https://groucci.ir","https://angellonlineshop.ir","https://niniland1401.ir","https://nimamezoon.ir","https://poshakduremavi.ir","https://ermia-shop.ir","https://mashika-shop.ir","https://naabaat.com"]')}},function(e){e.O(0,[3676,1367,8792,1070,828,8009,8166,703,946,3279,6780,991,2971,3432,1744],function(){return e(e.s=27232)}),_N_E=e.O()}]);
//# sourceMappingURL=page-e057be3903bbf500.js.map