PageSourceSearch

https://sendunlimitedemail.com/sue/mod-J-THbLO2.js

js sendunlimitedemail.com collected 2026-10-05 06:25:43 UTC 29,164 bytes, 10 lines download raw bytes

1import{k as I,r as h,j as e,G as U,e as L,h as f,t as S,Z as M,C as z,a0 as R}from"./edge-BOITG1XR.js";import{L as N}from"./mod-DxqX0N6D.js";import{C as B}from"./mod-BkAFdgbh.js";import{A as G}from"./mod-CCqBvA5G.js";import{S as D}from"./mod-CIn4OWcr.js";import{L as $}from"./mod-_xyCpLpz.js";import{S as P}from"./mod-CKg_ZYcm.js";import{P as V}from"./mod-BHbsKpbp.js";import{X as H}from"./mod-C3kaoPgB.js";import{S as E}from"./mod-C9xhOiHj.js";import{I as J}from"./mod-ClnwnFZu.js";import{B as W}from"./mod-BKUdxeTS.js";import{I as X}from"./mod-CIBNvfiF.js";import{R as Y}from"./mod-RPxq32x0.js";import{E as q}from"./mod-B_npTkgx.js";import{C as Z}from"./mod-CdBQyGbT.js";import{C as Q}from"./mod-gbHpssdV.js";const ee=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],F=I("map",ee);const se=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],K=I("share-2",se);const ae=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],te=I("twitter",ae),m="w-full rounded-xl border border-slate-200 px-4 py-2.5 text-sm outline-none focus:border-violet-400 focus:ring-2 focus:ring-violet-100 bg-white transition",O=`${m} resize-none`,le="block text-sm font-semibold text-slate-700 mb-1.5",d=({label:s,hint:a,children:c})=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:le,children:s}),a&&e.jsx("p",{className:"text-xs text-slate-400 -mt-1 mb-1.5",children:a}),c]}),b=({children:s,className:a=""})=>e.jsx("div",{className:f("rounded-2xl border border-slate-200 bg-white p-6 shadow-sm",a),children:s}),v=({icon:s,title:a,sub:c})=>e.jsxs("div",{className:"flex items-center gap-3 mb-5 pb-4 border-b border-slate-100",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-violet-100 text-violet-600 flex-shrink-0",children:e.jsx(s,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900",children:a}),c&&e.jsx("p",{className:"text-xs text-slate-400",children:c})]})]}),ie=({active:s,onClick:a,icon:c,label:o})=>e.jsxs("button",{onClick:a,className:f("flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold transition-all",s?"bg-violet-600 text-white shadow-md shadow-violet-200":"text-slate-600 hover:bg-slate-100"),children:[e.jsx(c,{className:"h-4 w-4"}),o]}),re=({score:s})=>{const a=s>=80?"bg-emerald-100 text-emerald-700":s>=50?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700";return e.jsxs("span",{className:f("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold",a),children:[s,"%"]})},A=({ok:s})=>s?e.jsx(Z,{className:"h-4 w-4 text-emerald-500 flex-shrink-0"}):e.jsx(Q,{className:"h-4 w-4 text-red-400 flex-shrink-0"}),oe=[{id:"general",label:"General",icon:U},{id:"social",label:"Social",icon:K},{id:"schema",label:"Schema",icon:B},{id:"health",label:"Health",icon:G},{id:"sitemap",label:"Sitemap",icon:F}],ne={seo_site_name:"AIKart DigiLicense",seo_title_pattern:"%title% | %site%",seo_default_description:"Shop the best products at AIKart DigiLicense. Fast delivery across UAE.",seo_default_keywords:"online shopping, UAE, ecommerce, AIKart DigiLicense",canonical_domain:"",noindex_paths:"/admin,/checkout,/cart",og_image:"",og_locale:"en_US",twitter_handle:"",twitter_card:"summary_large_image",google_verification:"",bing_verification:"",ga4_measurement_id:"",custom_verifications:"[]",schema_org_type:"Organization",schema_org_name:"AIKart DigiLicense",schema_org_url:"",schema_org_logo:"",schema_org_phone:"",schema_org_address:"",sitemap_include_products:"1",sitemap_include_categories:"1",sitemap_include_blog:"1",robots_additional:""},ce=({settings:s,onChange:a,onSave:c,saving:o})=>{const[i,r]=h.useState(!1),[x,j]=h.useState(()=>{try{return JSON.parse(s.custom_verifications||"[]")}catch{return[]}});h.useEffect(()=>{a("custom_verifications",JSON.stringify(x))},[x]);const _=()=>j(t=>[...t,{name:"",content:""}]),y=t=>j(n=>n.filter((g,k)=>k!==t)),p=(t,n,g)=>j(k=>k.map((C,w)=>w===t?{...C,[n]:g}:C)),u=async()=>{r(!0);try{const n=(await L.post("/ai/generate-seo-settings",{site_name:s.seo_site_name,canonical_domain:s.canonical_domain,category:"ecommerce"})).data;n.description&&a("seo_default_description",n.description),n.keywords&&a("seo_default_keywords",n.keywords),n.title_pattern&&a("seo_title_pattern",n.title_pattern),S.success("AI SEO suggestions applied!")}catch{const t=s.seo_site_name||"AIKart DigiLicense";a("seo_default_description",`Shop the best products at ${t}. Fast delivery across UAE. Discover deals on electronics, fashion, home & more.`),a("seo_default_keywords",`${t}, online shopping UAE, buy online, ecommerce UAE, deals, electronics, fashion`),S.success("Smart defaults applied")}finally{r(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4 roun
1ded-2xl bg-gradient-to-r from-violet-600 to-purple-600 p-4 text-white",children:[e.jsx(D,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-bold text-sm",children:"AI SEO Auto-Fill"}),e.jsx("p",{className:"text-xs text-violet-200 mt-0.5",children:"AI generates optimised descriptions, keywords & patterns for your store"})]}),e.jsxs("button",{onClick:u,disabled:i,className:"flex items-center gap-2 rounded-xl bg-white/20 hover:bg-white/30 px-4 py-2 text-sm font-bold transition disabled:opacity-50 whitespace-nowrap",children:[i?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(D,{className:"h-4 w-4"}),i?"Generating...":"Auto-Fill with AI"]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:U,title:"Site Identity",sub:"Core SEO identity settings"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsx(d,{label:"Site Name",hint:"Used in title patterns and meta tags",children:e.jsx("input",{className:m,value:s.seo_site_name,onChange:t=>a("seo_site_name",t.target.value),placeholder:"AIKart DigiLicense"})}),e.jsx(d,{label:"Title Pattern",hint:"Variables: %title%, %site%, %page%",children:e.jsx("input",{className:m,value:s.seo_title_pattern,onChange:t=>a("seo_title_pattern",t.target.value),placeholder:"%title% | %site%"})}),e.jsx("div",{className:"md:col-span-2",children:e.jsx(d,{label:"Default Meta Description",hint:"Used when a page has no specific description (120-155 chars)",children:e.jsx("textarea",{className:O,rows:3,value:s.seo_default_description,onChange:t=>a("seo_default_description",t.target.value)})})}),e.jsx("div",{className:"md:col-span-2",children:e.jsx(d,{label:"Default Keywords",hint:"Fallback keywords for pages without specific keywords",children:e.jsx("input",{className:m,value:s.seo_default_keywords,onChange:t=>a("seo_default_keywords",t.target.value),placeholder:"keyword1, keyword2, ..."})})})]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:$,title:"URL & Indexing",sub:"Control how search engines crawl your site"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsx(d,{label:"Canonical Domain",hint:"e.g. https://yourstore.com (no trailing slash)",children:e.jsx("input",{className:m,value:s.canonical_domain,onChange:t=>a("canonical_domain",t.target.value),placeholder:"https://yourstore.com"})}),e.jsx(d,{label:"Noindex Paths",hint:"Comma-separated paths to exclude from indexing",children:e.jsx("input",{className:m,value:s.noindex_paths,onChange:t=>a("noindex_paths",t.target.value),placeholder:"/admin,/checkout,/cart"})})]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:P,title:"Webmaster Verification",sub:"Verify site ownership with search engines"}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsx(d,{label:"Google Verification Code",hint:"Paste the content= value from Google Search Console",children:e.jsx("input",{className:m,value:s.google_verification,onChange:t=>a("google_verification",t.target.value),placeholder:"google-site-verification=..."})}),e.jsx(d,{label:"Bing Verification Code",hint:"Paste the content= value from Bing Webmaster Tools",children:e.jsx("input",{className:m,value:s.bing_verification,onChange:t=>a("bing_verification",t.target.value),placeholder:"msvalidate.01=..."})}),e.jsx(d,{label:"Google Analytics 4 Measurement ID",hint:"From analytics.google.com — Admin > Data Streams > your stream",children:e.jsx("input",{className:m,value:s.ga4_measurement_id,onChange:t=>a("ga4_measurement_id",t.target.value),placeholder:"G-XXXXXXXXXX"})})]}),e.jsxs("div",{className:"border-t border-slate-100 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-slate-700",children:"Custom Verification Meta Tags"}),e.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:'Add meta tags for Pinterest, Yandex, Naver, or any custom <meta name="" content="">'})]}),e.jsxs("button",{onClick:_,className:"flex items-center gap-1.5 rounded-xl border border-violet-200 bg-vi
1olet-50 px-3 py-1.5 text-xs font-bold text-violet-600 hover:bg-violet-100 transition",children:[e.jsx(V,{className:"h-3.5 w-3.5"})," Add Tag"]})]}),x.length===0?e.jsx("div",{className:"rounded-xl border-2 border-dashed border-slate-200 py-6 text-center text-slate-400 text-sm",children:'No custom tags yet — click "Add Tag" to add Pinterest, Yandex, Naver, or any other verification'}):e.jsx("div",{className:"space-y-2",children:x.map((t,n)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{value:t.name,onChange:g=>p(n,"name",g.target.value),placeholder:'name (e.g. "p:domain_verify")',className:"flex-1 rounded-xl border border-slate-200 px-3 py-2 text-xs outline-none focus:border-violet-400 focus:ring-2 focus:ring-violet-100"}),e.jsx("input",{value:t.content,onChange:g=>p(n,"content",g.target.value),placeholder:"content value",className:"flex-1 rounded-xl border border-slate-200 px-3 py-2 text-xs outline-none focus:border-violet-400 focus:ring-2 focus:ring-violet-100"}),e.jsx("button",{onClick:()=>y(n),className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg text-red-400 hover:bg-red-50 transition",children:e.jsx(H,{className:"h-4 w-4"})})]},n))})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:c,disabled:o,className:"flex items-center gap-2 rounded-xl bg-violet-600 px-6 py-2.5 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60 transition shadow-md shadow-violet-200",children:[o?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),o?"Saving...":"Save Settings"]})})]})},de=({settings:s,onChange:a,onSave:c,saving:o})=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs(b,{children:[e.jsx(v,{icon:K,title:"Open Graph (Facebook / LinkedIn)",sub:"Controls how your pages appear when shared"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"md:col-span-2",children:[e.jsx(d,{label:"Default OG Image URL",hint:"Recommended: 1200x630px, < 1MB",children:e.jsx("input",{className:m,value:s.og_image,onChange:i=>a("og_image",i.target.value),placeholder:"https://yourstore.com/og-image.jpg"})}),s.og_image&&e.jsxs("div",{className:"mt-3 rounded-xl overflow-hidden border border-slate-200 max-w-sm",children:[e.jsx("img",{src:s.og_image,alt:"OG preview",className:"w-full h-40 object-cover",onError:i=>i.target.style.display="none"}),e.jsxs("div",{className:"p-3 bg-slate-50 border-t border-slate-100",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-700 truncate",children:s.seo_site_name||"AIKart DigiLicense"}),e.jsx("p",{className:"text-xs text-slate-500 truncate mt-0.5",children:s.seo_default_description?.slice(0,80)||""})]})]})]}),e.jsx(d,{label:"OG Locale",children:e.jsxs("select",{className:m,value:s.og_locale,onChange:i=>a("og_locale",i.target.value),children:[e.jsx("option",{value:"en_US",children:"English (US)"}),e.jsx("option",{value:"ar_AE",children:"Arabic (UAE)"}),e.jsx("option",{value:"en_GB",children:"English (UK)"}),e.jsx("option",{value:"en_AE",children:"English (UAE)"})]})})]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:te,title:"Twitter / X Card",sub:"How your links appear when shared on Twitter"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsx(d,{label:"Twitter Handle",hint:"Your brand's Twitter/X username",children:e.jsx("input",{className:m,value:s.twitter_handle,onChange:i=>a("twitter_handle",i.target.value),placeholder:"@yourbrand"})}),e.jsx(d,{label:"Twitter Card Type",children:e.jsxs("select",{className:m,value:s.twitter_card,onChange:i=>a("twitter_card",i.target.value),children:[e.jsx("option",{value:"summary",children:"Summary (small image)"}),e.jsx("option",{value:"summary_large_image",children:"Summary Large Image (recommended)"})]})})]}),e.jsxs("div",{className:"mt-5 rounded-xl border-2 border-slate-200 overflow-hidden max-w-sm",children:[e.jsx("div",{className:"h-32 bg-gradient-to-br from-violet-100 to-purple-100 flex items-center justify-center",children:s.og_image?e.jsx("img",{src:s.og_image,alt:"",className:"w-full h-full object-cover",onError:i=>i.target.style.display="none"}):e.jsx(J,{className:"h-10 w-10 text-slate-300"})}),e.jsxs("div",{className:"p-3 bg-white border-t border-slate-100",children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider",children:s.canonical_domain?.replace("https://","")||"yourstore.com"}),e.jsxs("p",{className:"text-sm font-bold text-slate-800 mt-1 line-clamp-2",children:[s.seo_site_name||"AIKart DigiLicense"," — ",s.seo_default_description?.slice(0,50)||"Shop now"]}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5 line-clamp-2",children:s.seo_default_description?.slice(0,100)||""})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:c,disabled:o,className:"flex items-center gap-2 rounded-xl bg-violet-600 px-6 py-2.5 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60 transition shadow-md shadow-violet-200",children:[o?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),o?"Saving...":"Save Settings"]})})]}),xe=({settings:s,onChange:a,onSave:c,saving:o})=>{const i={"@context":"https://schema.org","@type":s.schema_org_type||"Organization",name:s.schema_org_name||"AIKart DigiLicense",url:s.schema_org_url||s.canonical_domain||"",logo:s.schema_org_logo||"",telephone:s.schema_org_phone||"",address:s.schema_org_address?{"@type":"PostalAddress",streetAddress:s.schema_org_address}:void 0};
1return Object.keys(i).forEach(r=>{i[r]||delete i[r]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(b,{children:[e.jsx(v,{icon:W,title:"Organization Schema",sub:"JSON-LD structured data injected on every page"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsx(d,{label:"Organization Type",children:e.jsxs("select",{className:m,value:s.schema_org_type,onChange:r=>a("schema_org_type",r.target.value),children:[e.jsx("option",{value:"Organization",children:"Organization"}),e.jsx("option",{value:"LocalBusiness",children:"LocalBusiness"}),e.jsx("option",{value:"Store",children:"Store"}),e.jsx("option",{value:"OnlineStore",children:"OnlineStore"})]})}),e.jsx(d,{label:"Organization Name",children:e.jsx("input",{className:m,value:s.schema_org_name,onChange:r=>a("schema_org_name",r.target.value),placeholder:"AIKart DigiLicense"})}),e.jsx(d,{label:"Organization URL",children:e.jsx("input",{className:m,value:s.schema_org_url,onChange:r=>a("schema_org_url",r.target.value),placeholder:"https://yourstore.com"})}),e.jsx(d,{label:"Logo URL",children:e.jsx("input",{className:m,value:s.schema_org_logo,onChange:r=>a("schema_org_logo",r.target.value),placeholder:"https://yourstore.com/logo.png"})}),e.jsx(d,{label:"Phone Number",hint:"Include country code e.g. +971 4 123 4567",children:e.jsx("input",{className:m,value:s.schema_org_phone,onChange:r=>a("schema_org_phone",r.target.value),placeholder:"+971 4 123 4567"})}),e.jsx("div",{className:"md:col-span-2",children:e.jsx(d,{label:"Business Address",children:e.jsx("textarea",{className:O,rows:2,value:s.schema_org_address,onChange:r=>a("schema_org_address",r.target.value),placeholder:"123 Main Street, Dubai, UAE"})})})]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:B,title:"JSON-LD Preview",sub:"This script tag will be injected in your site <head>"}),e.jsx("div",{className:"rounded-xl bg-slate-900 p-4 overflow-auto max-h-64",children:e.jsx("pre",{className:"text-xs text-emerald-400 leading-relaxed whitespace-pre-wrap",children:`<script type="application/ld+json">
2${JSON.stringify(i,null,2)}
3<\/script>`})}),e.jsxs("p",{className:"mt-3 text-xs text-slate-400 flex items-center gap-1.5",children:[e.jsx(X,{className:"h-3.5 w-3.5 flex-shrink-0"}),"This structured data helps Google understand your business and may enable rich results in search."]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:c,disabled:o,className:"flex items-center gap-2 rounded-xl bg-violet-600 px-6 py-2.5 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60 transition shadow-md shadow-violet-200",children:[o?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),o?"Saving...":"Save Settings"]})})]})},me=[{id:"all",label:"All"},{id:"missing_title",label:"Missing Title"},{id:"missing_keyword",label:"Missing Keyword"},{id:"poor",label:"Poor (<50%)"}],he=({settings:s,onChange:a,onSave:c,saving:o})=>{const[i,r]=h.useState(null),[x,j]=h.useState(!0),[_,y]=h.useState(!1),[p,u]=h.useState("all"),[t,n]=h.useState(""),g=h.useCallback(async()=>{j(!0);try{const l=await L.get("/admin/seo/issues");r(l.data)}catch{r({products:[],summary:{total:0,perfect:0,good:0,poor:0}})}finally{j(!1)}},[]);h.useEffect(()=>{g()},[g]);const k=async()=>{y(!0);try{const l=await L.post("/admin/seo/bulk-generate");S.success(l.data?.message||"Bulk SEO generation complete"),await g()}catch{S.error("Bulk generation failed")}finally{y(!1)}},C=(i?.products||[]).filter(l=>!t||l.name.toLowerCase().includes(t.toLowerCase())?p==="missing_title"?!l.has_title:p==="missing_keyword"?!l.has_keyword:p==="poor"?l.score<50:!0:!1),w=i?.summary||{};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"Total Products",val:w.total??"—",color:"text-slate-700",bg:"bg-slate-50"},{label:"Perfect (100%)",val:w.perfect??"—",color:"text-emerald-700",bg:"bg-emerald-50"},{label:"Good (60-99%)",val:w.good??"—",color:"text-amber-700",bg:"bg-amber-50"},{label:"Needs Work (<60%)",val:w.poor??"—",color:"text-red-700",bg:"bg-red-50"}].map(l=>e.jsxs("div",{className:f("rounded-2xl p-4",l.bg),children:[e.jsx("p",{className:f("text-2xl font-bold",l.color),children:l.val}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:l.label})]},l.label))}),e.jsxs(b,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-bold text-slate-900",children:"Product SEO Health"}),i&&e.jsx("span",{className:"rounded-full bg-slate-100 text-slate-600 text-xs font-semibold px-2 py-0.5",children:i.products.length})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(P,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-400"}),e.jsx("input",{value:t,onChange:l=>n(l.target.value),placeholder:"Search products...",className:"pl-8 pr-4 py-2 rounded-xl border border-slate-200 text-sm outline-none focus:border-violet-400 focus:ring-2 focus:ring-violet-100 w-48"})]}),e.jsxs("button",{onClick:k,disabled:_,className:"flex items-center gap-2 rounded-xl bg-violet-600 px-4 py-2 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60 transition whitespace-nowrap",children:[_?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(M,{className:"h-4 w-4"}),"Bulk Generate SEO"]}),e.jsx("button",{onClick:g,disabled:x,className:"rounded-xl border border-slate-200 p-2 hover:bg-slate-50 transition",children:e.jsx(Y,{className:f("h-4 w-4 text-slate-500",x&&"animate-spin")})})]})]}),e.jsx("div",{className:"flex gap-2 flex-wrap mb-4",children:me.map(l=>e.jsx("button",{onClick:()=>u(l.id),className:f("px-3 py-1.5 rounded-full text-xs font-semibold transition",p===l.id?"bg-violet-600 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"),children:l.label},l.id))}),x?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(N,{className:"h-6 w-6 animate-spin text-violet-500"})}):C.length===0?e.jsxs("div",{className:"text-center py-12 text-slate-400",children:[e.jsx(G,{className:"h-10 w-10 mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm font-medium",children:"No products found"})]}):e.jsx("div",{className:"overflow-x-auto rounded-xl border border-slate-100",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50 border-b border-slate-100",children:[e.jsx("th",{className:"text-left px-4 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Product"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Score"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Title"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Meta"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Keyword"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Image"}),e.jsx("th",{className:"text-center px-3 py-3 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Slug"}),e.jsx("th",{className:"px-3 py-3"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-50",children:C.map(l=>e.jsxs("tr",{className:"hover:bg-slate-50 transition",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-medium text-slate-800 truncate max-w-[200px]",children:l.name}),e.jsxs("p",{className:"text-xs text-slate-400",children:["#",l.id]})]}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(re,{score:l.score})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(A,{ok:l.has_title})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(A,{ok:l.has_desc})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(A,{ok:l.has_keyword})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(A,{ok:l.has_image})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsx(A,{ok:l.has_slug})}),e.jsx("td",{className:"px-3 py-3 text-center",children:e.jsxs("a",{href:`/admin/products/edit/${l.id}`,className:"inline-flex items-center gap-1 rounded-lg border border-violet-200 px-2.5 py-1 text-xs font-semibold text-violet-600 hover:bg-violet-50 transition",children:["Edit ",e.jsx(z,{className:"h-3 w-3"})]})})]},l.id))})]})})]})]})},T=({checked:s,onChange:a,label:c,hint:o})=>e.jsxs("label",{className:"flex items-center justify-between gap-4 py-3 border-b border-slate-50 last:border-0 cursor-pointer",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:c}),o&&e.jsx("p",{className:"text-xs text-slate-400",children:o})]}),e.jsx("div",{onClick:()=>a(!s),className:f("relative h-5 w-9 rounded-full transition-colors duration-200 flex-shrink-0",s?"bg-violet-600":"bg-slate-200"),children:e.jsx("span",{className:f("absolute top-0.5 left-0.5 h-4 w-4 roun
3ded-full bg-white shadow transition-transform duration-200",s?"translate-x-4":"translate-x-0")})})]}),pe=({settings:s,onChange:a,onSave:c,saving:o})=>{const r=`${window.location.origin.replace(":5173",":8080")}/api/sitemap.xml`;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(b,{children:[e.jsx(v,{icon:F,title:"Sitemap Configuration",sub:"Control what appears in your XML sitemap"}),e.jsxs("div",{className:"mb-5",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Sitemap URL"}),e.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-slate-50 border border-slate-200 px-4 py-3",children:[e.jsx("code",{className:"flex-1 text-sm text-slate-700 break-all",children:r}),e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 rounded-lg border border-slate-200 px-3 py-1.5 text-xs font-semibold text-slate-600 hover:bg-white transition whitespace-nowrap",children:[e.jsx(q,{className:"h-3.5 w-3.5"}),"Open"]})]})]}),e.jsxs("div",{className:"rounded-xl bg-blue-50 border border-blue-100 p-4 flex gap-3 mb-5",children:[e.jsx(X,{className:"h-4 w-4 text-blue-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-blue-800",children:"Submit to Google Search Console"}),e.jsx("p",{className:"text-xs text-blue-600 mt-0.5",children:"Copy the sitemap URL above and submit it in Google Search Console under Sitemaps to get your pages indexed faster."})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-3 uppercase tracking-wider",children:"Include in Sitemap"}),e.jsx(T,{checked:s.sitemap_include_products==="1",onChange:x=>a("sitemap_include_products",x?"1":"0"),label:"Products",hint:"Include all active product pages"}),e.jsx(T,{checked:s.sitemap_include_categories==="1",onChange:x=>a("sitemap_include_categories",x?"1":"0"),label:"Categories",hint:"Include category browse pages"}),e.jsx(T,{checked:s.sitemap_include_blog==="1",onChange:x=>a("sitemap_include_blog",x?"1":"0"),label:"Blog Posts",hint:"Include published blog articles"})]})]}),e.jsxs(b,{children:[e.jsx(v,{icon:R,title:"robots.txt",sub:"Control how bots crawl your site"}),e.jsx("div",{className:"mb-4 rounded-xl bg-slate-50 border border-slate-200 px-4 py-3",children:e.jsx("p",{className:"text-xs font-mono text-slate-600 leading-relaxed whitespace-pre",children:`User-agent: *
4Allow: /
5Disallow: /admin
6Disallow: /checkout
7Disallow: /cart
8Sitemap: ${r}`})}),e.jsx(d,{label:"Additional robots.txt Rules",hint:"Appended to the default rules above",children:e.jsx("textarea",{className:O,rows:4,value:s.robots_additional,onChange:x=>a("robots_additional",x.target.value),placeholder:`# Additional rules
9Disallow: /private-page
10Allow: /public-page`})})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:c,disabled:o,className:"flex items-center gap-2 rounded-xl bg-violet-600 px-6 py-2.5 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60 transition shadow-md shadow-violet-200",children:[o?e.jsx(N,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),o?"Saving...":"Save Settings"]})})]})},Oe=()=>{const[s,a]=h.useState("general"),[c,o]=h.useState(ne),[i,r]=h.useState(!0),[x,j]=h.useState(!1);h.useEffect(()=>{(async()=>{try{const t=await L.get("/admin/seo/settings");o(n=>({...n,...t.data}))}catch{}finally{r(!1)}})()},[]);const _=h.useCallback((u,t)=>{o(n=>({...n,[u]:t}))},[]),y=async()=>{j(!0);try{await L.put("/admin/seo/settings",c),S.success("SEO settings saved successfully")}catch{S.error("Failed to save SEO settings")}finally{j(!1)}};if(i)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(N,{className:"h-8 w-8 animate-spin text-violet-500"})});const p={settings:c,onChange:_,onSave:y,saving:x};return e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"SEO Settings"}),e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure search engine optimization for your entire store"})]}),e.jsxs("div",{className:"flex items-center gap-2 rounded-xl bg-emerald-50 border border-emerald-100 px-3 py-2",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),e.jsx("span",{className:"text-xs font-semibold text-emerald-700",children:"SEO Active"})]})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:oe.map(u=>e.jsx(ie,{active:s===u.id,onClick:()=>a(u.id),icon:u.icon,label:u.label},u.id))}),s==="general"&&e.jsx(ce,{...p}),s==="social"&&e.jsx(de,{...p}),s==="schema"&&e.jsx(xe,{...p}),s==="health"&&e.jsx(he,{...p}),s==="sitemap"&&e.jsx(pe,{...p})]})};export{Oe as default};

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.