1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9263],{19263:function(e,n,t){t.d(n,{U:function(){return N},w:function(){return w}});var r=t(10253),a=t(36305),l=t(85893),s=t(67294),o=t(41664),c=t.n(o),i=t(25675),u=t.n(i),d=t(11163),h=t(47568),m=t(70655);function g(){var e=(0,d.useRouter)(),n=(0,r.Z)((0,s.useState)(!1),2),t=n[0],a=n[1],o=(0,r.Z)((0,s.useState)(""),2),i=o[0],g=o[1],f=(0,r.Z)((0,s.useState)([]),2),b=f[0],p=f[1],x=(0,r.Z)((0,s.useState)(!1),2),j=x[0],_=x[1],v=(0,s.useRef)(null),w=(0,s.useRef)(null);(0,s.useEffect)(function(){var e;t&&(null===(e=w.current)||void 0===e||e.focus())},[t]),(0,s.useEffect)(function(){if(t){var e=function(e){v.current&&!v.current.contains(e.target)&&a(!1)},n=function(e){return"Escape"===e.key&&a(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n)}}},[t]),(0,s.useEffect)(function(){var e=i.trim();if(e.length<2){p([]);return}var n=!1;_(!0);var t=setTimeout((0,h.Z)(function(){var t,r;return(0,m.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,4,5]),[4,fetch("/api/blog/posts?q=".concat(encodeURIComponent(e),"&pageSize=5"))];case 1:return[4,a.sent().json()];case 2:return t=a.sent(),n||p(null!==(r=null==t?void 0:t.data)&&void 0!==r?r:[]),[3,5];case 3:return a.sent(),n||p([]),[3,5];case 4:return n||_(!1),[7];case 5:return[2]}})}),250);return function(){n=!0,clearTimeout(t)}},[i]);var N=function(){i.trim()&&(a(!1),e.push("/blog/search?q=".concat(encodeURIComponent(i.trim()))))};return(0,l.jsxs)("div",{className:"blog-search",ref:v,children:[(0,l.jsx)("button",{type:"button",className:"blog-iconbtn","aria-label":"جستâÙØ¬Ù در Ù
ÙØ§ÙÙâÙØ§","aria-expanded":t,onClick:function(){return a(function(e){return!e})},children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,l.jsx)("path",{d:"M20 20l-3.2-3.2",strokeLinecap:"round"})]})}),t&&(0,l.jsxs)("div",{className:"blog-search__panel",children:[(0,l.jsx)("form",{onSubmit:function(e){e.preventDefault(),N()},children:(0,l.jsx)("input",{ref:w,value:i,onChange:function(e){return g(e.target.value)},placeholder:"جستâÙØ¬Ù در Ù
ÙØ§ÙÙâÙØ§â¦",className:"blog-search__input",autoComplete:"off"})}),i.trim().length>=2&&(0,l.jsxs)("div",{className:"blog-search__results",children:[j&&0===b.length&&(0,l.jsx)("p",{className:"blog-search__note",children:"در ØØ§Ù جستâÙØ¬Ùâ¦"}),!j&&0===b.length&&(0,l.jsx)("p",{className:"blog-search__note",children:"ÚÛØ²Û Ù¾ÛØ¯Ø§ ÙØ´Ø¯."}),b.map(function(e){return(0,l.jsxs)(c(),{href:"/blog/".concat(encodeURIComponent(e.slug)),className:"blog-search__hit",onClick:function(){return a(!1)},children:[(0,l.jsx)("span",{className:"blog-search__thumb",children:e.featuredImageUrl?(0,l.jsx)(u(),{src:e.featuredImageUrl,alt:"",fill:!0,sizes:"46px",className:"object-cover"}):null}),(0,l.jsxs)("span",{className:"blog-search__hitbody",children:[(0,l.jsx)("span",{className:"blog-search__hittitle blog-clamp-2",children:e.title}),e.category&&(0,l.jsx)("span",{className:"blog-search__hitcat",children:e.category.name})]})]},e.slug)}),b.length>0&&(0,l.jsxs)("button",{type:"button",className:"blog-search__all",onClick:N,children:["ÙÙ
Ø§ÛØ´ ÙÙ
ÙâÛ ÙØªØ§Ûج Ø¨Ø±Ø§Û \xab",i.trim(),"\xbb"]})]})]})]})}var f={home:{dedupe:!0,sections:[]},header:{brand:{text:"Ù
جÙÙ",accent:"ÙÛØ¯ÙÙ
ا",imageUrl:null},showSearch:!0,cta:{label:"Ø±Ø²Ø±Ù Ø§ÙØ§Ù
تگاÙ",href:"/"},menuMode:"auto",menu:[]},footer:{brand:{text:"Ù
جÙÙ",accent:"ÙÛØ¯ÙÙ
ا",imageUrl:null},about:"راÙÙÙ
Ø§Û Ø³ÙØ± Ù Ø§ÙØ§Ù
ت در Ø§ÛØ±Ø§Ù.",columns:[],support:null,newsletter:null,socials:[],badges:[],copyright:"ÙÙ
ÙâÛ ØÙÙÙ Ù
Ø§Ø¯Û Ù Ù
عÙÙÛ Ø§ÛÙ Ø³Ø§ÛØª Ù
تعÙ٠ب٠ÙÛØ¯ÙÙ
اترÛÙ¾ است."}},b="blog-shell";function p(e){var n=e.brand;return e.light,(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"blog-logo__mark",children:n.imageUrl?(0,l.jsx)(u(),{src:n.imageUrl,alt:"",width:30,height:30,className:"object-contain"}):(n.accent||"Ù").slice(0,1)}),(0,l.jsxs)("span",{className:"blog-logo__text",children:[n.text," ",(0,l.jsx)("b",{children:n.accent})]})]})}var x={instagram:"اÛÙØ³ØªØ§Ú¯Ø±Ø§Ù
",telegram:"تÙگراÙ
",whatsapp:"ÙØ§ØªØ³âاپ",linkedin:"ÙÛÙکدÛÙ",twitter:"اÛکس",youtube:"ÛÙØªÛÙØ¨",aparat:"آپارات"},j={instagram:"M12 2.16c3.2 0 3.58.01 4.85.07 1.17.05 1.8.25 2.23.41.56.22.96.48 1.38.9.42.42.68.82.9 1.38.16.42.36 1.06.41 2.23.06 1.27.07 1.65.07 4.85s-.01 3.58-.07 4.85c-.05 1.17-.25 1.8-.41 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.16-1.06.36-2.23.41-1.27.06-1.65.07-4.85.07s-3.58-.01-4.85-.07c-1.17-.05-1.8-.25-2.23-.41a3.7 3.7 0 0 1-1.38-.9 3.7 3.7 0 0 1-.9-1.38c-.16-.42-.36-1.06-.41-2.23C2.17 15.58 2.16 15.2 2.16 12s.01-3.58.07-4.85c.05-1.17.25-1.8.41-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.16 1.06-.36 2.23-.41C8.42 2.17 8.8 2.16 12 2.16Zm0 5.5a4.34 4.34 0 1 0 0 8.68 4.34 4.34 0 0 0 0-8.68Zm0 7.16a2.82 2.82 0 1 1 0-5.64 2.82 2.82 0 0 1 0 5.64Zm5.52-7.33a1.01 1.01 0 1 1-2.03 0 1.01 1.01 0 0 1 2.03 0Z",telegram:"M21.94 4.3 18.9 19.1c-.23 1.02-.84 1.27-1.7.79l-4.7-3.46-2.27 2.18c-.25.25-.46.46-.94.46l.33-4.78 8.7-7.86c.38-.34-.08-.53-.59-.19l-10.75 6.77-4.63-1.45c-1-.32-1.02-1.01.21-1.5l18.1-6.98c.84-.3 1.57.2 1.28 1.22Z",whatsapp:"M12.04 2c-5.46 0-9.9 4.44-9.9 9.9 0 1.75.46 3.45 1.32 4.95L2 22l5.3-1.38a9.86 9.86 0 0 0 4.74 1.21c5.46 0 9.9-4.44 9.9-9.9 0-2.65-1.03-5.14-2.9-7.01A9.82 9.82 0 0 0 12.04 2Zm4.52 13.86c-.25-.12-1.47-.72-1.69-.81-.23-.08-.39-.12-.56.13-.16.24-.64.8-.78.97-.15.16-.29.18-.54.06-.25-.13-1.05-.39-1.99-1.23-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.01-.38.11-.5.11-.11.25-.29.37-.44.13-.15.17-.25.25-.42.08-.16.04-.31-.02-.43-.06-.
112-.56-1.34-.76-1.84-.2-.48-.4-.42-.56-.43h-.47c-.16 0-.43.06-.65.31-.22.25-.85.83-.85 2.03s.87 2.35.99 2.51c.12.16 1.71 2.61 4.15 3.66.58.25 1.03.4 1.39.51.58.19 1.11.16 1.53.1.47-.07 1.47-.6 1.68-1.18.21-.58.21-1.07.14-1.18-.06-.1-.22-.16-.47-.28Z",linkedin:"M4.98 3.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5ZM3 9h4v12H3V9Zm7 0h3.8v1.64h.05c.53-.95 1.83-1.95 3.77-1.95 4.03 0 4.78 2.5 4.78 5.76V21h-4v-5.78c0-1.38-.03-3.15-2-3.15-2 0-2.3 1.5-2.3 3.05V21h-4V9Z",twitter:"M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.66l-5.22-6.82-5.96 6.82H1.67l7.73-8.84L1.25 2.25h6.83l4.71 6.23 5.45-6.23Zm-1.16 17.52h1.83L7.02 4.13H5.06l12.02 15.64Z",youtube:"M23 12s0-3.62-.46-5.36a2.77 2.77 0 0 0-1.95-1.96C18.85 4.22 12 4.22 12 4.22s-6.85 0-8.59.46a2.77 2.77 0 0 0-1.95 1.96C1 8.38 1 12 1 12s0 3.62.46 5.36c.25.96 1 1.72 1.95 1.98 1.74.44 8.59.44 8.59.44s6.85 0 8.59-.44a2.77 2.77 0 0 0 1.95-1.98C23 15.62 23 12 23 12ZM9.75 15.32V8.68L15.5 12l-5.75 3.32Z",aparat:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 4.6a5.4 5.4 0 1 1 0 10.8 5.4 5.4 0 0 1 0-10.8Zm0 2.3a3.1 3.1 0 1 0 0 6.2 3.1 3.1 0 0 0 0-6.2ZM6.1 4.3a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Zm11.8 0a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4ZM6.1 16.3a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Zm11.8 0a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Z"};function _(e){var n,t,r=e.items;return r.length?(0,l.jsx)("div",{className:"blog-socials",children:r.map(function(e){return(0,l.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer nofollow","aria-label":null!==(n=x[e.network])&&void 0!==n?n:e.network,title:null!==(t=x[e.network])&&void 0!==t?t:e.network,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,l.jsx)("path",{d:j[e.network]})})},e.network)})}):null}function v(e){var n=e.item,t=e.className;return n.external||/^https?:\/\//i.test(n.href)?(0,l.jsx)("a",{href:n.href,className:t,target:"_blank",rel:"noopener noreferrer nofollow",children:n.label}):(0,l.jsx)(c(),{href:n.href,className:t,children:n.label})}function w(e){var n=e.categories,t=e.settings,a=null!=t?t:f,o=(0,d.useRouter)(),i=(0,r.Z)((0,s.useState)(!1),2),u=i[0],h=i[1],m=(0,r.Z)((0,s.useState)(!1),2),x=m[0],j=m[1],w="custom"===a.header.menuMode&&a.header.menu.length?a.header.menu:(void 0===n?[]:n).map(function(e){return{label:e.name,href:"/blog/category/".concat(encodeURIComponent(e.slug))}});return(0,s.useEffect)(function(){var e=window.scrollY,n=function(){var n=window.scrollY;Math.abs(n-e)>8&&(h(n>e&&n>160),e=n)};return window.addEventListener("scroll",n,{passive:!0}),function(){return window.removeEventListener("scroll",n)}},[]),(0,s.useEffect)(function(){return j(!1)},[o.asPath]),(0,s.useEffect)(function(){if(x){var e=document.body.style.overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}},[x]),(0,s.useEffect)(function(){var e=function(e){return"Escape"===e.key&&j(!1)};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("header",{className:"blog-header ".concat(u?"is-hidden":""),children:(0,l.jsxs)("div",{className:"".concat(b," blog-header__inner"),children:[(0,l.jsx)("button",{type:"button",className:"blog-menubtn","aria-label":x?"بست٠Ù
ÙÙ":"Ù
ÙÙ","aria-expanded":x,onClick:function(){return j(function(e){return!e})},children:(0,l.jsx)("i",{className:"icon-Menu","aria-hidden":!0})}),(0,l.jsx)(c(),{href:"/blog",className:"blog-logo",children:(0,l.jsx)(p,{brand:a.header.brand})}),(0,l.jsx)("nav",{className:"blog-nav","aria-label":"دستÙâØ¨ÙØ¯ÛâÙØ§Û Ù
جÙÙ",children:w.slice(0,6).map(function(e){return(0,l.jsx)(v,{item:e,className:"blog-nav__link"},e.href+e.label)})}),(0,l.jsxs)("div",{className:"blog-header__tools",children:[a.header.showSearch&&(0,l.jsx)(g,{}),a.header.cta&&(0,l.jsx)(v,{item:a.header.cta,className:"blog-header__cta"})]})]})}),(0,l.jsx)("div",{className:"blog-header__spacer"}),(0,l.jsx)("div",{className:"blog-scrim ".concat(x?"is-open":""),onClick:function(){return j(!1)},"aria-hidden":!0}),(0,l.jsxs)("aside",{className:"blog-drawer ".concat(x?"is-open":""),"aria-hidden":!x,"aria-label":"Ù
ÙÙÛ Ù
جÙÙ",children:[(0,l.jsxs)("div",{className:"blog-drawer__head",children:[(0,l.jsx)(c(),{href:"/blog",className:"blog-logo",children:(0,l.jsx)(p,{brand:a.header.brand})}),(0,l.jsx)("button",{type:"button",className:"blog-drawer__close","aria-label":"بستÙ",onClick:function(){return j(!1)},children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("path",{d:"M6 6l12 12M18 6L6 18",strokeLinecap:"round"})})})]}),(0,l.jsxs)("nav",{className:"blog-drawer__nav",children:[(0,l.jsx)(c(),{href:"/blog",className:"blog-drawer__link",children:"ØµÙØÙâÛ ÙØ®Ø³Øª Ù
جÙÙ"}),w.map(function(e){return(0,l.jsx)(v,{item:e,className:"blog-drawer__link"},e.href+e.label)}),(0,l.jsx)(c(),{href:"/blog/search",className:"blog-drawer__link",children:"جستâÙØ¬Ù در Ù
ÙØ§ÙÙâÙØ§"})]}),(0,l.jsxs)("div",{className:"blog-drawer__foot",children:[a.header.cta&&(0,l.jsx)(v,{item:a.header.cta,className:"blog-drawer__cta"}),(0,l.jsx)(_,{items:a.footer.socials})]})]})]})}
1function N(e){var n,t=e.categories,r=void 0===t?[]:t,s=e.settings,o=(null!=s?s:f).footer,c=(0,a.Z)(r.length?[{title:"دستÙâØ¨ÙØ¯ÛâÙØ§",links:r.slice(0,8).map(function(e){return{label:e.name,href:"/blog/category/".concat(encodeURIComponent(e.slug))}})}]:[]).concat((0,a.Z)(o.columns));return(0,l.jsxs)("footer",{className:"blog-footer",children:[(0,l.jsxs)("div",{className:"".concat(b," blog-footer__top"),children:[(0,l.jsxs)("div",{className:"blog-footer__brand",children:[(0,l.jsx)("div",{className:"blog-logo blog-logo--light",children:(0,l.jsx)(p,{brand:o.brand,light:!0})}),o.about&&(0,l.jsx)("p",{className:"blog-footer__about",children:o.about}),o.support&&o.support.phone&&(0,l.jsxs)("div",{className:"blog-footer__support",children:[(0,l.jsx)("span",{className:"blog-footer__support-label",children:o.support.title}),(0,l.jsx)("a",{href:"tel:".concat(o.support.phone.replace(/[^\d+]/g,"")),className:"blog-footer__phone",children:o.support.phone}),o.support.note&&(0,l.jsx)("span",{className:"blog-footer__support-note",children:o.support.note})]}),(0,l.jsx)(_,{items:o.socials})]}),(null===(n=o.newsletter)||void 0===n?void 0:n.enabled)&&(0,l.jsx)(k,{title:o.newsletter.title,note:o.newsletter.note})]}),c.length>0&&(0,l.jsx)("div",{className:"".concat(b," blog-footer__cols"),children:c.map(function(e){return(0,l.jsxs)("details",{className:"blog-footer__col",children:[(0,l.jsxs)("summary",{children:[e.title,(0,l.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:(0,l.jsx)("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,l.jsx)("ul",{children:e.links.map(function(e){return(0,l.jsx)("li",{children:(0,l.jsx)(v,{item:e})},e.href+e.label)})})]},e.title)})}),o.badges.length>0&&(0,l.jsx)("div",{className:"".concat(b," blog-footer__badges"),children:o.badges.map(function(e,n){return e.href?(0,l.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer nofollow",children:(0,l.jsx)("img",{src:e.imageUrl,alt:e.alt,loading:"lazy"})},n):(0,l.jsx)("img",{src:e.imageUrl,alt:e.alt,loading:"lazy"},n)})}),(0,l.jsx)("div",{className:"blog-footer__bar",children:(0,l.jsxs)("div",{className:b,children:["\xa9 ",new Date().toLocaleDateString("fa-IR",{year:"numeric"})," â ",o.copyright]})})]})}function k(e){var n=e.title,t=e.note,a=(0,r.Z)((0,s.useState)(""),2),o=a[0],c=a[1],i=(0,r.Z)((0,s.useState)(!1),2),u=i[0],d=i[1],h=/^09\d{9}$/.test(o.replace(/[Û°-Û¹]/g,function(e){return String("Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹".indexOf(e))}));return(0,l.jsxs)("form",{className:"blog-newsletter",onSubmit:function(e){e.preventDefault(),h&&d(!0)},children:[n&&(0,l.jsx)("p",{className:"blog-newsletter__title",children:n}),t&&(0,l.jsx)("p",{className:"blog-newsletter__note",children:t}),u?(0,l.jsx)("p",{className:"blog-newsletter__done",children:"Ø´Ù
ارÙâØªØ§Ù Ø«Ø¨Øª شد. بÙâØ²ÙØ¯Û از تازÙâÙØ§Û Ù
جÙÙ Ø¨Ø±Ø§ÛØªØ§Ù Ù
ÛâÙØ±Ø³ØªÛÙ
."}):(0,l.jsxs)("div",{className:"blog-newsletter__row",children:[(0,l.jsx)("input",{type:"tel",inputMode:"numeric",dir:"ltr",placeholder:"Û°Û¹Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹",value:o,onChange:function(e){return c(e.target.value)},"aria-label":"Ø´Ù
ار٠Ù
ÙØ¨Ø§ÛÙ"}),(0,l.jsx)("button",{type:"submit",disabled:!h,children:"عضÙÛØª"})]})]})}}}]);
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.