PageSourceSearch

https://saharfood.co/_next/static/chunks/pages/product/%5BproductGroupSlug%5D/%5Bslug%5D-8e5c088dcf616dff.js

js saharfood.co collected 2026-10-07 18:05:00 UTC 15,127 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9243],{7814:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/product/[productGroupSlug]/[slug]",function(){return i(3723)}])},133:function(e,t,i){"use strict";var l=i(5893),n=i(5675),r=i.n(n),s=i(7294);let a=e=>{try{return new URL(e)}catch(e){return null}},o=e=>{let{fill:t,className:i="",showLoader:n=!0,src:o,...c}=e,[d,u]=(0,s.useState)(!1),p=(0,s.useMemo)(()=>{if(!o)return"";if("string"!=typeof o)return o;let e="https://api.saharfoodco.ir";if(o.startsWith("/uploads/"))return e+o;let t=a(e),i=a(o);return t&&i?(i.host=t.host,i.href):o},[o]);return(0,l.jsxs)(l.Fragment,{children:[n&&!d&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,l.jsx)("div",{className:"animate-spin border-solid border-8 border-gray-300 rounded-full border-t-red-600 size-10"})}),(0,l.jsx)(r(),{fill:t,src:p,className:"transition-opacity ".concat(i," ").concat(t?"object-cover":""," ").concat(d?"opacity-100":"opacity-0"),placeholder:"blur",blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN8/5+pPwAFfAJ4j8M+8wAAAABJRU5ErkJggg==",onLoad:()=>{u(!0)},...c},"string"==typeof o?o:JSON.stringify(o))]})};t.Z=o},3701:function(e,t,i){"use strict";i.d(t,{$:function(){return m}});var l=i(5893),n=i(7294),r=i(3546),s=i(9234),a=i(133),o=i(5865),c=i.n(o);let d=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.filter(Boolean).join(" ")},u=(e,t)=>(null==e?void 0:e.type)==="element"&&e.tagName===t,p=e=>{var t;return null===(t=e.children)||void 0===t?void 0:t.every(e=>u(e,"img")||(null==e?void 0:e.type)==="text"&&""===e.value.trim())},h=(e,t)=>{let i="number"==typeof e?e:"string"==typeof e?parseInt(e.replace("px",""),10):NaN;return Number.isFinite(i)&&i>0?i:t},v=e=>n.Children.map(e,e=>n.isValidElement(e)&&u(e.props.node,"img")?n.cloneElement(e,{renderInline:!0}):e),x={figure:e=>{var t,i,n,r;let{children:s,className:a,node:o,style:p,...h}=e,v=null===(t=o.children)||void 0===t?void 0:t.find(e=>u(e,"img"));if(v){let e=(null===(i=v.properties)||void 0===i?void 0:i.alt)||"",t=e.toLowerCase().includes("{caption:"),x=null===(n=e.match(/{caption: (.*?)}/))||void 0===n?void 0:n[1],m=null===(r=o.children)||void 0===r?void 0:r.some(e=>u(e,"figcaption"));return(0,l.jsxs)("figure",{...h,className:d("postImgWrapper text-center relative",a),style:p,children:[s,t&&!m&&(0,l.jsx)("figcaption",{className:d(c().caption,"caption"),"aria-label":x,children:x})]})}return(0,l.jsx)("figure",{...h,className:a,style:p,children:s})},p:e=>{var t,i,n;let{children:r,className:s,node:a,style:o,...h}=e,x=null===(t=a.children)||void 0===t?void 0:t.find(e=>u(e,"img"));if(x&&p(a)){let e=(null===(i=x.properties)||void 0===i?void 0:i.alt)||"",t=e.toLowerCase().includes("{caption:"),a=null===(n=e.match(/{caption: (.*?)}/))||void 0===n?void 0:n[1];return(0,l.jsxs)("div",{...h,className:d("postImgWrapper text-center relative",s),style:o,children:[r,t&&(0,l.jsx)("span",{className:d(c().caption,"caption"),"aria-label":a,children:a})]})}return(0,l.jsx)("p",{...h,className:s,style:o,children:v(r)})},img:e=>{var t,i,n,r,s;let{alt:o,className:c,height:u,node:p,renderInline:v=!1,sizes:x,src:m,style:g,width:f,...j}=e,b=o||(null===(t=p.properties)||void 0===t?void 0:t.alt)||"",y=b.replace(/ *\{[^}]*\} */g,""),w=b.match(/x([^}]+)}/),N=h(null!=f?f:null===(i=p.properties)||void 0===i?void 0:i.width,768),A=h(null!==(s=null!=u?u:null==w?void 0:w[1])&&void 0!==s?s:null===(n=p.properties)||void 0===n?void 0:n.height,432),k=b.toLowerCase().includes("{priority}");return delete j.node,(0,l.jsx)(a.Z,{...j,src:m||p.properties.src,sizes:x||(null===(r=p.properties)||void 0===r?void 0:r.sizes)||"",width:N,height:A,className:d("postImg rounded-[1.25rem]",c),alt:y,priority:k,showLoader:!v&&!c,style:{...g,height:"auto",maxWidth:"100%"}})},a:e=>{let{children:t,className:i,...n}=e;return delete n.node,(0,l.jsx)("a",{...n,className:d(c().link,i),children:t})},table:e=>{let{children:t,className:i,style:n,...r}=e;return delete r.node,(0,l.jsx)("div",{className:c().tableWrapper,children:(0,l.jsx)("table",{...r,className:i,style:n,children:t})})}},m=e=>{let{text:t,additionalClassNames:i=""}=e;
1return(0,l.jsx)("div",{className:d(c().content,i),children:(0,l.jsx)(r.D,{components:x,rehypePlugins:[s.Z],children:t})})}},3723:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return j},default:function(){return b}});var l=i(5893),n=i(4685),r=i(1664),s=i.n(r),a=i(1163),o=i(7294),c=i(7561);let d=e=>{let{si:t,title:i,value:n}=e;return(0,l.jsxs)("div",{className:"nutcell",children:[(0,l.jsx)("div",{className:"nutnum ft1val text-e5002c",children:n}),(0,l.jsx)("div",{className:"nutunit ft1unit",children:t}),(0,l.jsx)("div",{className:"nuttitle ft1title",children:i})]})};function u(e,t){if(!e)throw Error("Invariant failed")}var p=new Map([["Win","Meta"],["Scroll","ScrollLock"],["Spacebar"," "],["Down","ArrowDown"],["Left","ArrowLeft"],["Right","ArrowRight"],["Up","ArrowUp"],["Del","Delete"],["Crsel","CrSel"],["Exsel","ExSel"],["Apps","ContextMenu"],["Esc","Escape"],["Decimal","."],["Multiply","*"],["Add","+"],["Subtract","-"],["Divide","/"]]),h=function(e){if(p.has(e.key)){var t=p.get(e.key);Object.defineProperty(e,"key",{configurable:!0,enumerable:!0,get:function(){return t}})}},v=function(e,t){Array.isArray(e)||"string"==typeof e||u(!1),Array.isArray(e)&&e.forEach(function(e,t){"string"!=typeof e&&u(!1)}),"function"==typeof t||null==t||u(!1);var i=(0,o.useRef)();(0,o.useEffect)(function(){i.current=function(i){h(i),(Array.isArray(e)?e.includes(i.key):e===i.key)&&(null==t||t(i))}},[e,t]),(0,o.useEffect)(function(){var e=function(e){i.current(e)};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[])},x=i(3623),m=i(3701),g=i(133);let f=e=>{var t,i,r,u,p,h,f,j,b,y,w,N,A,k,_,E,z,L,S,C,R,W,D,M,I,B;let{products:P,categories:U,socials:F,brands:Z,categorySlug:G,product:J}=e,{t:O}=(0,c.$G)(),{push:V}=(0,a.useRouter)(),T=(0,o.useMemo)(()=>P.findIndex(e=>e.id===J.id),[P]),[X]=(0,o.useState)(!1),[$,q]=(0,o.useState)(!1),H=(0,a.useRouter)(),K=e=>{let t;return t="next"==e?T+1>P.length-1?0:T+1:T<=0?P.length-1:T-1,"/product/".concat(G,"/").concat(P[t].attributes.slug)};function Q(e){"ArrowLeft"===e.key?V(K("prev")):V(K("next"))}return v("ArrowRight",Q),v("ArrowLeft",Q),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Z,{title:null===(t=J.attributes)||void 0===t?void 0:null===(i=t.seo)||void 0===i?void 0:i.metaTitle,description:null===(r=J.attributes)||void 0===r?void 0:null===(u=r.seo)||void 0===u?void 0:u.metaDescription}),(0,l.jsxs)(n.Z,{isProduct:!0,isInnerPage:!0,footerSocials:F,menuBrands:Z,children:[(0,l.jsx)("div",{id:"loadingSpinner",className:"loading",hidden:!X,children:"Loading…"}),(0,l.jsx)(s(),{passHref:!0,href:K("next"),children:(0,l.jsx)("div",{id:"rightbtn"})}),(0,l.jsx)(s(),{passHref:!0,href:K("prev"),children:(0,l.jsx)("div",{id:"leftbtn"})}),(0,l.jsxs)("ul",{className:"simple-breadcrumb",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)(s(),{href:"/",children:O("crumbs.title")}),(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})]}),(0,l.jsxs)("li",{children:[(0,l.jsx)(s(),{href:"/category",children:G.replaceAll("-"," ")}),(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"})})]}),(0,l.jsx)("li",{children:(0,l.jsx)("span",{children:null===(p=P[T])||void 0===p?void 0:null===(h=p.attributes)||void 0===h?void 0:null===(f=h.slug)||void 0===f?void 0:f.replaceAll("-"," ")})})]}),(0,l.jsx)("div",{className:"productbar",children:U.map(e=>{var t,i;let n=null===(t=e.attributes.products)||void 0===t?void 0:null===(i=t.attributes)||void 0===i?void 0:i.slug;return n?(0,l.jsx)(s(),{href:"/product/".concat(e.attributes.slug,"/").concat(n),className:"pbarcell ".concat(H.query.productGroupSlug===e.attributes.slug?"disabled":""),style:{backgroundImage:"url('/img/".concat(e.attributes.icon,".svg') ")}},e.id):null})}),J&&(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)("div",{className:"circles ",children:[(0,l.jsxs)("div",{className:"product_index",children:[(0,l.jsx)("span",{className:"current-item",children:T+1}),(0,l.jsx)("i",{children:"/"}),(0,l.jsx)("span",{className:"all-items",children:P.length})]}),(0,l.jsxs)("div",{className:"mobile-product-index",children:[(0,l.jsx)("span",{className:"current-item",children:T+1}),(0,l.jsx)("i",{children:"/"}),(0,l.jsx)("span",{className:"all-items",children:P.length})]})]}
1),(0,l.jsx)("div",{className:"slide h-110 product-info",id:"detail",children:(0,l.jsxs)("div",{id:"detailcon",children:[(null==J?void 0:null===(j=J.attributes)||void 0===j?void 0:null===(b=j.image)||void 0===b?void 0:null===(y=b.data)||void 0===y?void 0:null===(w=y.attributes)||void 0===w?void 0:w.url)?(0,l.jsx)("div",{className:"relative flex justify-center items-center flex-1",children:(0,l.jsx)(g.Z,{src:"https://api.saharfoodco.ir"+J.attributes.image.data.attributes.url,alt:J.attributes.title,width:null!==(I=J.attributes.image.data.attributes.width)&&void 0!==I?I:0,height:null!==(B=J.attributes.image.data.attributes.height)&&void 0!==B?B:0,className:"w-1/2 h-auto aspect-auto"},J.attributes.image.data.attributes.url)}):null,(0,l.jsxs)("div",{className:"detailbox flex-1",children:[(null==J?void 0:null===(N=J.attributes)||void 0===N?void 0:N.title)?(0,l.jsx)("h1",{className:"detailtitle text-e5002c",children:J.attributes.title}):null,(null==J?void 0:null===(A=J.attributes)||void 0===A?void 0:A.sub_title)?(0,l.jsx)("h2",{className:"detailsubtitle",children:J.attributes.sub_title}):null,(null==J?void 0:null===(k=J.attributes)||void 0===k?void 0:k.product_content)?(0,l.jsx)("div",{className:"product-content",children:(0,l.jsx)("div",{className:"product-text",children:(0,l.jsx)(m.$,{text:J.attributes.product_content.replaceAll('<p class="MsoNormal" style="text-align:justify;" dir="RTL">&nbsp;</p>',"")})})}):null,(null==J?void 0:null===(_=J.attributes)||void 0===_?void 0:_.pure_weight)?(0,l.jsxs)("div",{className:"detailweight",children:[O("product.netWeight"),":",(0,l.jsx)("span",{className:"detailweight_inner",children:J.attributes.pure_weight}),"g"]}):null,(0,l.jsx)("div",{className:"weight_per_100_g",id:"gram",children:O("product.nutritionalValue")}),(0,l.jsxs)("div",{className:"nutrition",children:[(null==J?void 0:null===(E=J.attributes)||void 0===E?void 0:E.energy)?(0,l.jsx)(d,{title:O("product.energy"),si:"kcal",value:J.attributes.energy}):null,(null==J?void 0:null===(z=J.attributes)||void 0===z?void 0:z.fat)?(0,l.jsx)(d,{title:O("product.fat"),si:"g",value:J.attributes.fat}):null,(null==J?void 0:null===(L=J.attributes)||void 0===L?void 0:L.carbohydrate)?(0,l.jsx)(d,{title:O("product.carbohydrate"),si:"g",value:J.attributes.carbohydrate}):null,(null==J?void 0:null===(S=J.attributes)||void 0===S?void 0:S.protein)?(0,l.jsx)(d,{title:O("product.salt"),si:"g",value:J.attributes.protein}):null]}),(0,l.jsx)("div",{className:"button moredetails",onClick:()=>q(!0),children:O("product.moreInformation")})]}),(0,l.jsx)("div",{className:"detailmodal ".concat($?"opened":""),children:(0,l.jsxs)("div",{className:"modalbody",children:[(0,l.jsxs)("h3",{className:"modaltitle",children:[" ",O("product.productDetails")," "]}),(null==J?void 0:null===(C=J.attributes)||void 0===C?void 0:C.pure_weight)?(0,l.jsxs)("span",{className:"weight",children:[O("product.netWeight"),":"," ",(0,l.jsx)("span",{className:"pureweight",children:J.attributes.pure_weight}),"g"]}):null,(0,l.jsx)("p",{children:O("product.nutritionalValue")}),(0,l.jsxs)("div",{className:"nutrition",children:[(null==J?void 0:null===(R=J.attributes)||void 0===R?void 0:R.energy)?(0,l.jsx)(d,{title:O("product.energy"),si:"kcal",value:J.attributes.energy}):null,(null==J?void 0:null===(W=J.attributes)||void 0===W?void 0:W.fat)?(0,l.jsx)(d,{title:O("product.fat"),si:"g",value:J.attributes.fat}):null,(null==J?void 0:null===(D=J.attributes)||void 0===D?void 0:D.carbohydrate)?(0,l.jsx)(d,{title:O("product.carbohydrate"),si:"g",value:J.attributes.carbohydrate}):null,(null==J?void 0:null===(M=J.attributes)||void 0===M?void 0:M.protein)?(0,l.jsx)(d,{title:O("product.salt"),si:"g",value:J.attributes.protein}):null]}),(0,l.jsx)("button",{className:"button closemodal",onClick:()=>q(!1),children:O("product.closeWindow")})]})})]})})]}),(0,l.jsx)("div",{id:"kaj"})]})]})};var j=!0,b=f},3623:function(e,t,i){"use strict";var l=i(5893),n=i(9008),r=i.n(n),s=i(1163),a=i(7294);let o=e=>{let{title:t,description:i,ogImage:n,ogUrl:o}=e,{asPath:c,locale:d}=(0,s.useRouter)(),u=(0,a.useMemo)(()=>{let e=c.split(/[?#]/)[0];return"".concat("https://saharfoodco.ir").concat("fa"!==d?"/".concat(d):"").concat(e)},[d,c]);
1return(0,l.jsxs)(r(),{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:i}),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),n&&(0,l.jsx)("meta",{property:"og:image",content:n}),o&&(0,l.jsx)("meta",{property:"og:url",content:o}),(0,l.jsx)("link",{rel:"canonical",href:u}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/img/icon/apple-icon-57x57.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/img/icon/apple-icon-60x60.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/img/icon/apple-icon-72x72.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/img/icon/apple-icon-76x76.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/img/icon/apple-icon-114x114.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/img/icon/apple-icon-120x120.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/img/icon/apple-icon-144x144.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/img/icon/apple-icon-152x152.png"}),(0,l.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/icon/apple-icon-180x180.png"}),(0,l.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/img/icon/android-icon-192x192.png"}),(0,l.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/icon/favicon-32x32.png"}),(0,l.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/img/icon/favicon-96x96.png"}),(0,l.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/icon/favicon-16x16.png"})]})};t.Z=o},5865:function(e){e.exports={content:"markdown_content__qChBp",caption:"markdown_caption__oBwF3",link:"markdown_link__pyjdX",tableWrapper:"markdown_tableWrapper__eyG8m"}}},function(e){e.O(0,[5445,296,9866,8802,3996,7099,5675,6001,4685,9774,2888,179],function(){return e(e.s=7814)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.