1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9740],{65645:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/settings/sitemap",function(){return n(56937)}])},56937:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var a=n(47568),r=n(26042),i=n(69396),s=n(10253),l=n(70655),o=n(85893),c=n(67294),d=n(41664),u=n.n(d),x=n(44389),m=n(49759),g=n(84858),h=n(32474),p=[{value:"ALWAYS",label:"ÙÙ
ÛØ´Ù"},{value:"HOURLY",label:"ساعتÛ"},{value:"DAILY",label:"Ø±ÙØ²Ø§ÙÙ"},{value:"WEEKLY",label:"ÙÙØªÚ¯Û"},{value:"MONTHLY",label:"Ù
Ø§ÙØ§ÙÙ"},{value:"YEARLY",label:"Ø³Ø§ÙØ§ÙÙ"},{value:"NEVER",label:"ÙØ±Ú¯Ø²"}];function b(){var e,t=(0,x.u)("/api/admin/sitemap",function(e){return(0,g.SC)(e)}),n=t.data,r=t.isLoading,i=t.mutate,d=(0,x.u)("/api/admin/robots-rules",function(e){return(0,g.SC)(e)}),p=d.data,b=d.mutate,j=(0,s.Z)((0,c.useState)(null),2),C=j[0],F=j[1],Z=(0,s.Z)((0,c.useState)(null),2),w=Z[0],E=Z[1],A=(0,s.Z)((0,c.useState)(!1),2),D=A[0],S=A[1],I=(e=(0,a.Z)(function(e){return(0,l.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,g.SC)("/api/admin/sitemap/preview/".concat(e))];case 1:return F({title:"robots"===e?"robots.txt":"sitemap.xml",content:t.sent().content}),[2]}})}),function(t){return e.apply(this,arguments)});return(0,o.jsxs)(m.Z,{title:"sitemap Ù robots",breadcrumb:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u(),{href:"/admin",children:"Ø¯Ø§Ø´Ø¨ÙØ±Ø¯"}),(0,o.jsx)("span",{className:"mx-6 text-gray-B0AFBC",children:"/"}),(0,o.jsx)(u(),{href:"/admin/settings",children:"ØªÙØ¸ÛÙ
ات"})]}),toolbar:(0,o.jsxs)(h.Zb,{className:"px-8 py-6 flex items-center gap-x-4 overflow-x-auto",children:[(0,o.jsx)(u(),{href:"/admin/settings",className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"اÙ
Ú©Ø§ÙØ§Øª Ù ÙÙØ§ÙÛÙ"}),(0,o.jsx)(u(),{href:"/admin/settings/locations",className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"دستÙâØ¨ÙØ¯Û Ù
کاÙâÙØ§"}),(0,o.jsx)(u(),{href:"/admin/settings/tags",className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"تگâÙØ§Û سئÙ"}),(0,o.jsx)("span",{className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap bg-primary-main text-white",children:"sitemap Ù robots"}),(0,o.jsx)(u(),{href:"/admin/settings/faqs",className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"Ø³ÙØ§Ùات Ù
تداÙÙ"}),(0,o.jsx)(u(),{href:"/admin/settings/home",className:"px-14 py-8 rounded-10 text-13 leading-20 font-m whitespace-nowrap text-gray-6C6A7D hover:bg-gray-F0F0F0",children:"ØµÙØÙ Ø§ØµÙÛ"})]}),children:[r||!n?(0,o.jsx)("div",{className:"flex flex-col gap-12",children:Array.from({length:5}).map(function(e,t){return(0,o.jsx)(h.Od,{className:"h-64"},t)})}):(0,o.jsxs)("div",{className:"flex flex-col gap-y-16",children:[!n.settings.allowIndexing&&(0,o.jsxs)(h.Zb,{className:"px-20 py-16 border-r-4 border-r-[#DC2626]",children:[(0,o.jsx)("div",{className:"text-13 leading-22 font-m text-[#B91C1C] mb-4",children:"اÛÙØ¯Ú©Ø³âØ´Ø¯Ù Ø³Ø§ÛØª خاÙ
ÙØ´Ù"}),(0,o.jsxs)("p",{className:"text-12 leading-22 text-gray-6C6A7D",children:["robots.txt Ø§ÙØ§Ù Ø¨Ø±Ø§Û ÙÙ
ÙâÛ Ø®Ø²ÙØ¯ÙâÙØ§ ",(0,o.jsx)("span",{dir:"ltr",className:"font-m",children:"Disallow: /"})," ","Ù
ÛâÙØ±Ø³ØªÙ Ù sitemap.xml ÙÙ
Û´Û°Û´ Ù
ÛâØ¯Ù. اÛÙ ØØ§Ùت Ù
Ø®ØµÙØµ ÙØ¨Ù از ÙØ§ÙÚÙ â Ø¨Ø±Ø§Û Ø³Ø§ÛØª Ø²ÙØ¯Ù Ø¨Ø§ÛØ¯ Ø±ÙØ´Ù باشÙ."]})]}),(0,o.jsx)(v,{settings:n.settings,onSaved:function(){return i()},onPreview:I}),(0,o.jsx)(f,{sections:n.sections,stats:n.stats,total:n.total,onSaved:function(){return i()}}),(0,o.jsx)(y,{rules:null!=p?p:[],onEdit:E,onCreate:function(){return S(!0)},onChanged:function(){return b()}})]}),C&&(0,o.jsx)(h.u_,{open:!0,title:C.title,onClose:function(){return F(null)},width:"max-w-[780px]",children:(0,o.jsx)("pre",{dir:"ltr",className:"text-12 leading-20 bg-gray-FAFAFA rounded-10 p-16 overflow-auto max-h-[60vh] whitespace-pre-wrap",children:C.content||"(خاÙÛ)"})}),(w||D)&&(0,o.jsx)(N,{rule:w,onClose:function(){E(null),S(!1)},onSaved:function(){E(null),S(!1),b(),i()}})]})}function v(e){var t,n,d,u=e.settings,x=e.onSaved,m=e.onPreview,p=(0,s.Z)((0,c.useState)({siteUrl:u.siteUrl,allowIndexing:u.allowIndexing,sitemapEnabled:u.sitemapEnabled,robotsEnabled:u.robotsEnabled,maxUrlsPerFile:u.maxUrlsPerFile,robotsExtra:null!==(n=u.robotsExtra)&&void 0!==n?n:"",crawlDelay:null!==(d=u.crawlDelay)&&void 0!==d?d:"",imagesEnabled:u.imagesEnabled,imageUrlMode:u.imageUrlMode,imageOptimizerWidth:u.imageOptimizerWidth,listCitySitemapsInRobots:u.listCitySitemapsInRobots}),2),b=p[0],v=p[1],f=(0,s.Z)((0,c.useState)(!1),2),j=f[0],y=f[1],N=(0,s.Z)((0,c.useState)(null),2),C=N[0],F=N[1],Z=(t=(0,a.Z)(function(){var e,t;return(0,l.__generator)(this,function(n){switch(n.label){case 0:y(!0),F(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,(0,g.SC)("/api/admin/sitemap/settings",{method:"PATCH",body:JSON.stringify({siteUrl:b.siteUrl.trim(),allowIndexing:b.allowIndexing,sitemapEnabled:b.sitemapEnabled,robotsEnabled:b.robotsEnabled,maxUrlsPerFile:Number(b.maxUrlsPerFile),robotsExtra:b.robotsExtra.trim()||null,crawlDelay:""===b.crawlDelay?null:Number(b.crawlDelay),imagesEnabled:b.imagesEnabled,imageUrlMode:b.imageUrlMode,imageOptimizerWidth:Number(b.imageOptimizerWidth),listCitySitemapsInRobots:b.listCitySitemapsInRobots})})];case 2:return n.sent(),x(),[3,5];case 3:return F(null!==(t=null==(e=n.sent())?void 0:e.message)&&void 0!==t?t:"Ø°Ø®ÛØ±Ù ÙØ´Ø¯."),[3,5];case 4:return y(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)});return(0,o.jsxs)(h.Zb,{className:"px-20 py-18",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between mb-14",children:[(0,o.jsx)("span",{className:"text-14 leading-22 font-m text-gray-1E1D28",children:"ØªÙØ¸ÛÙ
ات Ú©ÙÛ"}),(0,o.jsxs)("div",{className:"flex gap-x-8",children:[(0,o.jsx)(h.zx,{variant:"ghost",onClick:function(){return m("robots")},children:"Ù¾ÛØ´âÙÙ
Ø§ÛØ´ robots.txt"}),(0,o.jsx)(h.zx,{variant:"ghost",onClick:function(){return m("index")},children:"Ù¾ÛØ´âÙÙ
Ø§ÛØ´ sitemap.xml"})]})]}),(0,o.jsxs)("div",{className:"grid md:grid-cols-2 gap-14",children:[(0,o.jsx)(h.gN,{label:"آدرس Ø³Ø§ÛØª",hint:"ÙÙ
ÙâÛ Ø¢Ø¯Ø±Ø³âÙØ§Û sitemap Ù
Ø·Ù٠٠با ÙÙ
Û٠داÙ
Ù٠ساخت٠Ù
ÛâØ´Ù.",children:(0,o.jsx)(h.II,{dir:"ltr",value:b.siteUrl,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{siteUrl:e.target.value}))}})}),(0,o.jsx)(h.gN,{label:"ØØ¯Ø§Ú©Ø«Ø± آدرس در ÙØ± ÙØ§ÛÙ",hint:"Ø§Ø³ØªØ§ÙØ¯Ø§Ø±Ø¯ sitemap سÙÙ ÛµÛ°Ù¬Û°Û°Û° آدرس Ø¯Ø§Ø±ÙØ Ø¨ÛØ´ØªØ± از اÛÙ Ø¨Ø´Ù ÙØ§ÛÙ Ø®ÙØ¯Ú©Ø§Ø± تک٠Ù
ÛâØ´Ù.",children:(0,o.jsx)(h.II,{type:"number",value:b.maxUrlsPerFile,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{maxUrlsPerFile:Number(e.target.value)}))}})}),(0,o.jsx)(h.gN,{label:"Crawl-delay",hint:"ثاÙÛÙØ ÙÙØ· Ø¨Ø±Ø§Û *. خاÙÛ ÛØ¹ÙÛ Ø¨Ø¯ÙÙ Ù
ØØ¯ÙØ¯ÛØª.",children:(0,o.jsx)(h.II,{type:"number",dir:"ltr",value:b.crawlDelay,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{crawlDelay:e.target.value}))}})}),(0,o.jsxs)("div",{className:"flex flex-col justify-center gap-y-10",children:[(0,o.jsx)(h.ZD,{checked:b.allowIndexing,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{allowIndexing:e}))},label:"اجازÙâÛ Ø§ÛÙØ¯Ú©Ø³âØ´Ø¯Ù Ø³Ø§ÛØª"}),(0,o.jsx)(h.ZD,{checked:b.sitemapEnabled,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{sitemapEnabled:e}))},label:"ÙØ¹Ø§ÙâØ¨ÙØ¯Ù sitemap"}),(0,o.jsx)(h.ZD,{checked:b.robotsEnabled,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{robotsEnabled:e}))},label:"ÙØ¹Ø§ÙâØ¨ÙØ¯Ù robots.txt"}),(0,o.jsx)(h.ZD,{checked:b.listCitySitemapsInRobots,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{listCitySitemapsInRobots:e}))},label:"ÙÛØ³Øªâکرد٠sitemap ÙØ± Ø´ÙØ± در robots.txt"})]})]}),(0,o.jsxs)("div",{className:"mt-16 pt-16 border-t border-gray-EFEFEF",children:[(0,o.jsx)("div",{className:"text-13 leading-22 font-m text-gray-1E1D28 mb-10",children:"sitemap عکسâÙØ§"}),(0,o.jsxs)("div",{className:"grid md:grid-cols-3 gap-14",children:[(0,o.jsx)("div",{className:"flex items-center",children:(0,o.jsx)(h.ZD,{checked:b.imagesEnabled,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{imagesEnabled:e}))},label:"ÙØ¹Ø§Ù"})}),(0,o.jsx)(h.gN,{label:"ÙØÙÙâÛ Ø¢Ø¯Ø±Ø³âØ¯ÙÛ Ø¹Ú©Ø³",children:(0,o.jsxs)(h.Ph,{value:b.imageUrlMode,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{imageUrlMode:e.target.value}))},children:[(0,o.jsx)("option",{value:"optimizer",children:"از طرÛ٠بÙÛÙÙâØ³Ø§Ø² Next"}),(0,o.jsx)("option",{value:"direct",children:"آدرس Ù
ستÙÛÙ
Ø§Ø³ØªÙØ±Ûج"})]})}),(0,o.jsx)(h.gN,{label:"عرض تصÙÛØ± بÙÛÙÙâØ´Ø¯Ù",hint:"Ù¾ÛکسÙ",children:(0,o.jsx)(h.II,{type:"number",value:b.imageOptimizerWidth,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{imageOptimizerWidth:Number(e.target.value)}))}})})]}),"direct"===b.imageUrlMode&&(0,o.jsx)("p",{className:"text-11 leading-20 text-[#B45309] mt-8",children:"ÙØ´Ø¯Ø§Ø±: باکت ÙÛØ§Ø±Ø§ Ø¨Ù ÙØ± User-Agent شاÙ
Ù \xabMozilla\xbb Ø¬ÙØ§Ø¨ Û´Û°Û´ Ù
ÛâØ¯Ù â ÛØ¹ÙÛ Ø¨Ù Ú¯ÙÚ¯ÙâØ¨Ø§Øª Ù ÙÙ
ÙâÛ Ø®Ø²ÙØ¯ÙâÙØ§Û عکس. تا ÙÙØªÛ اÛÙ ØÙاظت Ø¨Ø±Ø¯Ø§Ø´ØªÙ ÙØ´Ø¯ÙØ Ø¢Ø¯Ø±Ø³ Ù
ستÙÛÙ
ÛØ¹Ù
1Û ÙØ±Ø³ØªØ§Ø¯Ù Û´Û°Û´ ب٠گÙÚ¯Ù. ØØ§Ùت \xabبÙÛÙÙâØ³Ø§Ø²\xbb تÙÙØ§ Ø´Ú©ÙÛÙ Ú©Ù Ø®Ø²ÙØ¯Ù Ù
ÛâØªÙÙÙ Ø¨Ú¯ÛØ±Ù."})]}),(0,o.jsx)(h.gN,{label:"Ø®Ø·ÙØ· اضاÙÙâÛ robots.txt",className:"mt-14",hint:"عÛÙØ§Ù Ø¨Ù Ø§ÙØªÙØ§Û ÙØ§Û٠اضاÙÙ Ù
ÛâØ´Ù â Ø¨Ø±Ø§Û Ø¯Ø³ØªÙØ±ÙاÛÛ Ú©Ù Ø§ÛÙØ¬Ø§ ÙÛÙØ¯ ÙØ¯Ø§Ø±Ù.",children:(0,o.jsx)("textarea",{dir:"ltr",rows:3,value:b.robotsExtra,onChange:function(e){return v((0,i.Z)((0,r.Z)({},b),{robotsExtra:e.target.value}))},className:"w-full rounded-10 border border-gray-EFEFEF px-14 py-10 text-12 leading-20 outline-none focus:border-primary-main font-mono"})}),C&&(0,o.jsx)("p",{className:"text-12 leading-20 text-[#DC2626] mt-8",children:C}),(0,o.jsx)("div",{className:"flex justify-end mt-14",children:(0,o.jsx)(h.zx,{onClick:Z,disabled:j,children:j?"در ØØ§Ù Ø°Ø®ÛØ±Ùâ¦":"Ø°Ø®ÛØ±Ù ØªÙØ¸ÛÙ
ات"})})]})}function f(e){var t=e.sections,n=e.stats,a=e.total,r=e.onSaved;return(0,o.jsxs)(h.Zb,{className:"p-0 overflow-hidden",children:[(0,o.jsxs)("div",{className:"px-20 py-16 border-b border-gray-EFEFEF flex items-center justify-between",children:[(0,o.jsx)("span",{className:"text-14 leading-22 font-m text-gray-1E1D28",children:"بخشâÙØ§Û sitemap"}),(0,o.jsxs)("span",{className:"text-12 text-gray-6C6A7D",children:["Ù
جÙ
ÙØ¹ آدرسâÙØ§: ",(0,o.jsx)("span",{className:"font-m text-gray-1E1D28",children:(0,h.N)(a)})]})]}),(0,o.jsx)("div",{className:"divide-y divide-gray-F5F5F5",children:t.map(function(e){return(0,o.jsx)(j,{section:e,stat:n.find(function(t){return t.key===e.key}),onSaved:r},e.id)})})]})}function j(e){var t,n=e.section,d=e.stat,u=e.onSaved,x=(0,s.Z)((0,c.useState)({isEnabled:n.isEnabled,changeFreq:n.changeFreq,priority:n.priority,minResidenceCount:n.minResidenceCount,includeLastmod:n.includeLastmod,requireSitemapFlag:n.requireSitemapFlag,tagPriority:n.tagPriority,tagChangeFreq:n.tagChangeFreq,listingPriority:n.listingPriority,listingChangeFreq:n.listingChangeFreq}),2),m=x[0],b=x[1],v=(0,s.Z)((0,c.useState)(!1),2),f=v[0],j=v[1],y=(0,s.Z)((0,c.useState)(!1),2),N=y[0],C=y[1],F=function(e){b((0,r.Z)({},m,e)),C(!0)},Z=(t=(0,a.Z)(function(){return(0,l.__generator)(this,function(e){switch(e.label){case 0:j(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,(0,g.SC)("/api/admin/sitemap/sections/".concat(n.id),{method:"PATCH",body:JSON.stringify((0,i.Z)((0,r.Z)({},m),{priority:Number(m.priority),minResidenceCount:Number(m.minResidenceCount),tagPriority:Number(m.tagPriority),listingPriority:Number(m.listingPriority)}))})];case 2:return e.sent(),C(!1),u(),[3,4];case 3:return j(!1),[7];case 4:return[2]}})}),function(){return t.apply(this,arguments)});return(0,o.jsxs)("div",{className:"px-20 py-16",children:[(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-x-12 gap-y-8 mb-12",children:[(0,o.jsx)(h.ZD,{checked:m.isEnabled,onChange:function(e){return F({isEnabled:e})}}),(0,o.jsx)("span",{className:"text-13 leading-22 font-m text-gray-1E1D28",children:n.label}),(0,o.jsx)("span",{dir:"ltr",className:"text-11 text-gray-B0AFBC",children:"cities"===n.key?"/sitemaps/sitemap-<Ø´ÙØ±>.xml":n.key.startsWith("magazine-")?"/blog/sitemap.xml":"/sitemaps/".concat(n.key,"-1.xml")}),d&&(0,o.jsxs)(h.Ct,{tone:d.included>0?"green":"gray",children:[(0,h.N)(d.included)," ","cities"===n.key?"ÙØ§ÛÙ":"آدرس"]}),N&&(0,o.jsx)(h.zx,{onClick:Z,disabled:f,className:"mr-auto",children:f?"â¦":"Ø°Ø®ÛØ±Ù"})]}),(0,o.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-12",children:[(0,o.jsx)(h.gN,{label:"ÙØ±Ø® تغÛÛØ±",children:(0,o.jsx)(h.Ph,{value:m.changeFreq,onChange:function(e){return F({changeFreq:e.target.value})},children:p.map(function(e){return(0,o.jsx)("option",{value:e.value,children:e.label},e.value)})})}),(0,o.jsx)(h.gN,{label:"اÙÙÙÛØª",hint:"بÛÙ Û° تا Û±",children:(0,o.jsx)(h.II,{type:"number",step:"0.1",min:"0",max:"1",value:m.priority,onChange:function(e){return F({priority:Number(e.target.value)})}})}),(0,o.jsx)(h.gN,{label:"ØØ¯Ø§ÙÙ Ø§ÙØ§Ù
تگاÙ",hint:"Û° ÛØ¹ÙÛ Ø¨Ø¯ÙÙ ÙÛÙØªØ±",children:(0,o.jsx)(h.II,{type:"number",min:"0",value:m.minResidenceCount,onChange:function(e){return F({minResidenceCount:Number(e.target.value)})}})}),(0,o.jsxs)("div",{className:"flex flex-col justify-center gap-y-8",children:[(0,o.jsx)(h.ZD,{checked:m.includeLastmod,onChange:function(e){return F({includeLastmod:e})},label:"درج lastmod"}),"tag-pages"===n.key&&(0,o.jsx)(h.ZD,{checked:m.requireSitemapFlag,onChange:function(e){return F({requireSitemapFlag:e})},label:"ÙÙØ· ØµÙØØ§Øª ÙÙÚ¯âØ¯Ø§Ø± Ø§ÙØ¯Ù"})]})]}),"cities"===n.key&&(0,o.jsxs)("div",{className:"mt-14 pt-14 border-t border-gray-F5F5F5",children:[(0,o.jsx)("p",{className:"text-11 leading-20 text-gray-B0AFBC mb-10",children:"ÙØ§ÛÙ ÙØ± Ø´ÙØ± س٠ÙÙØ¹ آدرس دارÙ. Ø¨Ø§ÙØ§ ÙØ²Ù \xabØµÙØÙâÛ Ø´ÙØ±\xbb ØªÙØ¸ÛÙ
Ù
ÛâØ´ÙØ اÛÙâØ¬Ø§ ÙØ²Ù Ø¯Ù ØªØ§Û Ø¯ÛÚ¯Ù â ØµÙØØ§Øª تگ ÙÙ
ÙÙ Ø´ÙØ± Ù Ø§ÙØ§Ù
تگاÙâÙØ§Ø´."}),(0,o.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-12",children:[(0,o.jsx)(h.gN,{label:"اÙÙÙÛØª ØµÙØØ§Øª تگ",children:(0,o.jsx)(h.II,{type:"number",step:"0.1",min:"0",max:"1",value:m.tagPriority,onChange:function(e){return F({tagPriority:Number(e.target.value)})}})}),(0,o.jsx)(h.gN,{label:"ÙØ±Ø® تغÛÛØ± ØµÙØØ§Øª تگ",children:(0,o.jsx)(h.Ph,{value:m.tagChangeFreq,onChange:function(e){return F({tagChangeFreq:e.target.value})},children:p.map(function(e){return(0,o.jsx)("option",{value:e.value,children:e.label},e.value)})})}),(0,o.jsx)(h.gN,{label:"اÙÙÙÛØª Ø§ÙØ§Ù
تگاÙâÙØ§",children:(0,o.jsx)(h.II,{type:"number",step:"0.1",min:"0",max:"1",value:m.listingPriority,onChange:function(e){return F({listingPriority:Number(e.target.value)})}})}),(0,o.jsx)(h.gN,{label:"ÙØ±Ø® تغÛÛØ± Ø§ÙØ§Ù
تگاÙâÙØ§",children:(0,o.jsx)(h.Ph,{value:m.listingChangeFreq,onChange:function(e){return F({listingChangeFreq:e.target.value})},children:p.map(function(e){return(0,o.jsx)("option",{value:e.value,children:e.label},e.value)})})})]})]}),"tag-pages"===n.key&&m.requireSitemapFlag&&(0,o.jsx)("p",{className:"text-11 leading-20 text-gray-B0AFBC mt-8",children:"Ø§ÙØ¯Ù ÙÙØ· ÛµÛ¸ ØµÙØÙ Ø§Ø² Û¹Ù¬Û³Û±Û² ØµÙØÙ Ø±Ù Ø¨Ø±Ø§Û sitemap ÙÙÚ¯ Ú©Ø±Ø¯Ù Ø¨ÙØ¯. اگ٠اÛ٠گزÛÙ٠ر٠خاÙ
ÙØ´ Ú©ÙÛØ ÙØ± ØµÙØÙâÛ ØªÚ¯Ù ÙØ¹Ø§Ù ک٠از ØØ¯ \xabØØ¯Ø§ÙÙ Ø§ÙØ§Ù
تگاÙ\xbb Ø¨Ú¯Ø°Ø±Ù ÙØ§Ø±Ø¯ sitemap Ù
ÛâØ´Ù."}),d&&d.excluded.length>0&&(0,o.jsxs)("div",{className:"mt-10 text-11 leading-20 text-gray-6C6A7D",children:[(0,o.jsx)("span",{className:"font-m text-gray-1E1D28",children:"Ú©ÙØ§Ø± گذاشت٠شد: "}),d.excluded.map(function(e,t){return(0,o.jsxs)("span",{children:[t>0&&" \xb7 ",e.reason," (",(0,h.N)(e.count),")"]},e.reason)})]})]})}
1function y(e){var t=e.rules,n=e.onEdit,r=e.onCreate,i=e.onChanged;return(0,o.jsxs)(h.Zb,{className:"p-0 overflow-hidden",children:[(0,o.jsxs)("div",{className:"px-20 py-16 border-b border-gray-EFEFEF flex items-center justify-between",children:[(0,o.jsx)("span",{className:"text-14 leading-22 font-m text-gray-1E1D28",children:"ÙÙØ§ÙÛÙ robots.txt"}),(0,o.jsx)(h.zx,{onClick:r,children:"Ø§ÙØ²ÙØ¯Ù ÙØ§ÙÙÙ"})]}),0===t.length?(0,o.jsx)(h.ub,{text:"ÙØ§ÙÙÙÛ ØªØ¹Ø±ÛÙ ÙØ´Ø¯Ù â robots.txt ÙÙ
ÙâÚÛØ² ر٠Ù
جاز Ù
ÛâÚ©ÙÙ."}):(0,o.jsx)("div",{className:"divide-y divide-gray-F5F5F5",children:t.map(function(e){return(0,o.jsxs)("div",{className:"px-20 py-12 flex flex-wrap items-center gap-x-10 gap-y-4",children:[(0,o.jsx)("span",{dir:"ltr",className:"text-12 font-mono text-gray-1E1D28",children:e.userAgent}),(0,o.jsx)(h.Ct,{tone:"Allow"===e.directive?"green":"gray",children:e.directive}),(0,o.jsx)("span",{dir:"ltr",className:"text-12 font-mono text-gray-6C6A7D",children:e.path}),e.note&&(0,o.jsx)("span",{className:"text-11 text-gray-B0AFBC",children:e.note}),!e.isActive&&(0,o.jsx)(h.Ct,{tone:"red",children:"ØºÛØ±ÙعاÙ"}),(0,o.jsxs)("div",{className:"mr-auto flex gap-x-10",children:[(0,o.jsx)("button",{onClick:function(){return n(e)},className:"text-12 text-primary-main hover:underline",children:"ÙÛØ±Ø§ÛØ´"}),(0,o.jsx)("button",{onClick:(0,a.Z)(function(){return(0,l.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,g.SC)("/api/admin/robots-rules/".concat(e.id),{method:"DELETE"})];case 1:return t.sent(),i(),[2]}})}),className:"text-12 text-[#DC2626] hover:underline",children:"ØØ°Ù"})]})]},e.id)})})]})}function N(e){var t,n,d,u,x,m,p,b=e.rule,v=e.onClose,f=e.onSaved,j=(0,s.Z)((0,c.useState)({userAgent:null!==(n=null==b?void 0:b.userAgent)&&void 0!==n?n:"*",directive:null!==(d=null==b?void 0:b.directive)&&void 0!==d?d:"Disallow",path:null!==(u=null==b?void 0:b.path)&&void 0!==u?u:"",note:null!==(x=null==b?void 0:b.note)&&void 0!==x?x:"",isActive:null===(m=null==b?void 0:b.isActive)||void 0===m||m,sortOrder:null!==(p=null==b?void 0:b.sortOrder)&&void 0!==p?p:0}),2),y=j[0],N=j[1],C=(0,s.Z)((0,c.useState)(!1),2),F=C[0],Z=C[1],w=(0,s.Z)((0,c.useState)(null),2),E=w[0],A=w[1],D=(t=(0,a.Z)(function(){var e,t;return(0,l.__generator)(this,function(n){switch(n.label){case 0:Z(!0),A(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,(0,g.SC)(b?"/api/admin/robots-rules/".concat(b.id):"/api/admin/robots-rules",{method:b?"PATCH":"POST",body:JSON.stringify({userAgent:y.userAgent.trim()||"*",directive:y.directive,path:y.path.trim(),note:y.note.trim()||null,isActive:y.isActive,sortOrder:Number(y.sortOrder)||0})})];case 2:return n.sent(),f(),[3,5];case 3:return A(null!==(t=null==(e=n.sent())?void 0:e.message)&&void 0!==t?t:"Ø°Ø®ÛØ±Ù ÙØ´Ø¯."),[3,5];case 4:return Z(!1),[7];case 5:return[2]}})}),function(){return t.apply(this,arguments)});return(0,o.jsx)(h.u_,{open:!0,title:b?"ÙÛØ±Ø§ÛØ´ ÙØ§ÙÙÙ":"Ø§ÙØ²ÙØ¯Ù ÙØ§ÙÙÙ",onClose:v,children:(0,o.jsxs)("div",{className:"flex flex-col gap-y-14",children:[(0,o.jsxs)("div",{className:"grid grid-cols-2 gap-14",children:[(0,o.jsx)(h.gN,{label:"User-agent",hint:"* ÛØ¹ÙÛ ÙÙ
ÙâÛ Ø®Ø²ÙØ¯ÙâÙØ§",children:(0,o.jsx)(h.II,{dir:"ltr",value:y.userAgent,onChange:function(e){return N((0,i.Z)((0,r.Z)({},y),{userAgent:e.target.value}))}})}),(0,o.jsx)(h.gN,{label:"Ø¯Ø³ØªÙØ±",children:(0,o.jsxs)(h.Ph,{value:y.directive,onChange:function(e){return N((0,i.Z)((0,r.Z)({},y),{directive:e.target.value}))},children:[(0,o.jsx)("option",{value:"Disallow",children:"Disallow"}),(0,o.jsx)("option",{value:"Allow",children:"Allow"})]})})]}),(0,o.jsx)(h.gN,{label:"Ù
Ø³ÛØ±",hint:"Ù
ث٠/admin ÛØ§ /api/ â Ø¨Ø§ Ø§Ø³ÙØ´ Ø´Ø±ÙØ¹ بشÙ.",children:(0,o.jsx)(h.II,{dir:"ltr",value:y.path,onChange:function(e){return N((0,i.Z)((0,r.Z)({},y),{path:e.target.value}))},placeholder:"/admin"})}),(0,o.jsx)(h.gN,{label:"ÛØ§Ø¯Ø¯Ø§Ø´Øª",hint:"ÙÙØ· Ø¨Ø±Ø§Û ØªÛÙ
Ø ØªÙÛ ÙØ§ÛÙ ÙÙ
ÛØ§Ø¯.",children:(0,o.jsx)(h.II,{value:y.note,onChange:function(e){return N((0,i.Z)((0,r.Z)({},y),{note:e.target.value}))}})}),(0,o.jsx)(h.ZD,{checked:y.isActive,onChange:function(e){return N((0,i.Z)((0,r.Z)({},y),{isActive:e}))},label:"ÙØ¹Ø§Ù"}),E&&(0,o.jsx)("p",{className:"text-12 leading-20 text-[#DC2626]",children:E}),(0,o.jsxs)("div",{className:"flex gap-x-8 justify-end",children:[(0,o.jsx)(h.zx,{variant:"ghost",onClick:v,children:"Ø§ÙØµØ±Ø§Ù"}),(0,o.jsx)(h.zx,{onClick:D,disabled:F||!y.path.trim(),children:F?"در ØØ§Ù Ø°Ø®ÛØ±Ùâ¦":"Ø°Ø®ÛØ±Ù"})]})]})})}}},function(e){e.O(0,[9791,9759,9774,2888,179],function(){return e(e.s=65645)}),_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.