1import{d as C,aX as R,aY as T,aZ as M,r as x,s as D,j as e,B as g,Y as v,w as p,av as E}from"./index-CSRj_zsB.js";import{C as B,a as I,b as O,d as P}from"./card-CRF01Jkn.js";import{C as z}from"./circle-x-DtIPTZwl.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const A=C("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const w=C("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),X=R,Y=T,G=M,t="https://casinobonusfinders.com",H=[{url:`${t}/de/casino/zetcasino`,expectedStatus:301,expectedLocation:`${t}/de/casino-reviews/zetcasino`,label:"Pattern: /de/casino/ â /de/casino-reviews/"},{url:`${t}/ca/casino/jackpotcity`,expectedStatus:301,expectedLocation:`${t}/ca/casino-reviews/jackpotcity`,label:"Pattern: /ca/casino/ â /ca/casino-reviews/"},{url:`${t}/fr/promo1`,expectedStatus:301,expectedLocation:`${t}/fr/`,label:"Promo: /fr/promo1 â /fr/"},{url:`${t}/promo-summer`,expectedStatus:301,expectedLocation:`${t}/`,label:"Promo: /promo-summer â /"},{url:`${t}/ca/bonus/welcome-bonus`,expectedStatus:301,expectedLocation:`${t}/ca/bonuses/welcome-bonus`,label:"Legacy bonus: /ca/bonus/ â /ca/bonuses/"},{url:`${t}/en/news/four-of-a-kind-poker`,expectedStatus:301,expectedLocation:`${t}/news/four-of-a-kind-poker`,label:"EN news strip: /en/news/ â /news/"},{url:`${t}/en/casino-reviews`,expectedStatus:301,expectedLocation:`${t}/casino-reviews`,label:"EN strip: /en/casino-reviews â /casino-reviews"},{url:"https://premiumcasinobonus.com/de/casino/zetcasino",expectedStatus:301,label:"Old domain redirect"}],J=[{url:t,checkMeta:!0,label:"Homepage"},{url:`${t}/casino-reviews`,checkMeta:!0,label:"Casino reviews listing"},{url:`${t}/de`,checkMeta:!0,label:"DE homepage"},{url:`${t}/news`,checkMeta:!0,label:"News listing"},{url:`${t}/bonuses`,checkMeta:!0,label:"Bonuses listing"},{url:`${t}/guides`,checkMeta:!0,label:"Guides listing"}],U=[{url:`${t}/sitemap.xml`,checkMeta:!1,label:"Sitemap XML"},{url:`${t}/robots.txt`,checkMeta:!1,label:"Robots.txt"}];function Z(r,c){var l;if(r.expectedStatus&&c.status!==r.expectedStatus)return!1;if(r.expectedLocation){const d=((l=c.location)==null?void 0:l.replace(/\/$/,"").toLowerCase())||"",i=r.expectedLocation.replace(/\/$/,"").toLowerCase();if(d!==i)return!1}return c.status>=300&&c.status<400}function _(r,c){if(c.status!==200||!c.meta)return!1;const l=c.meta;return!!(l.title&&l.description&&l.canonical&&l.ogTitle&&!l.noindex)}function q(r,c){return c.status===200}const N=[{name:"Redirects",tests:H,evaluate:Z,includeDbRedirects:!0},{name:"Indexability",tests:J,evaluate:_},{name:"Infrastructure",tests:U,evaluate:q}];function F({pass:r}){return r===null?e.jsx("div",{className:"w-5 h-5 rounded-full bg-muted"}):r?e.jsx(A,{className:"w-5 h-5 text-green-500"}):e.jsx(z,{className:"w-5 h-5 text-red-500"})}function ee(){const[r,c]=x.useState({}),[l,d]=x.useState(null),i=x.useCallback(async a=>{d(a.name);try{const o=a.tests.map(n=>({url:n.url,expectedStatus:n.expectedStatus,expectedLocation:n.expectedLocation,checkMeta:n.checkMeta})),{data:u,error:s}=await D.functions.invoke("seo-check",{body:{tests:o,includeDbRedirects:a.includeDbRedirects}});if(s)throw s;const h=u.results||[],$=u.dbTests||[],y=[...a.tests,...$.map(n=>({url:n.url,expectedStatus:n.expectedStatus,expectedLocation:n.expectedLocation,label:`DB redirect: ${new URL(n.url).pathname}`}))].map(n=>{const f=h.find(L=>L.url===n.url);return{def:n,result:f,pass:f?a.evaluate(n,f):null}});c(n=>({...n,[a.name]:y}))}catch(o){console.error("Suite error:",o)}finally{d(null)}},[]),S=x.useCallback(async()=>{for(const a of N)await i(a)},[i]),m=Object.values(r).flat(),b=m.length,k=m.filter(a=>a.pass===!0).length,j=m.filter(a=>a.pass===!1).length;return e.jsxs("div",{className:"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",children:"SEO Diagnostics"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Tests run against casinobonusfinders.com via edge function"})]}),e.jsxs(g,{onClick:S,disabled:!!l,children:[l?e.jsx(v,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(w,{className:"mr-2 h-4 w-4"}),"Run All Tests"]})]}),b>0&&e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(p,{variant:"outline",className:"text-green-500 border-green-500",children:[k," passed"]}),j>0&&e.jsxs(p,{variant:"outline",className:"text-red-500 border-red-500",children:[j," failed"]}),e.jsxs(p,{variant:"outline",children:[b," total"]})]}),N.map(a=>{const o=r[a.name]||[],u=o.filter(s=>s.pass===!0).length;return o.filter(s=>s.pass===!1).length,e.jsx(X,{defaultOpen:!0,children:e.jsxs(B,{children:[e.jsx(I,{className:"pb-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(Y,{className:"flex items-center gap-2 hover:opacity-80",children:[e.jsx(E,{className:"h-4 w-4"}),e.jsx(O,{className:"text-lg",children:a.name}),o.length>0&&e.jsxs("span",{className:"text-sm text-muted-foreground ml-2",children:[u,"/",o.length," passed"]})]}),e.jsx(g,{size:"sm",variant:"outline",onClick:()=>i(a),disabled:!!l,children:l===a.name?e.jsx(v,{className:"h-3 w-3 animate-spin"}):e.jsx(w,{className:"h-3 w-3"})})]})}),e.jsx(G,{children:e.jsx(P,{className:"pt-0",children:e.jsx("div",{className:"space-y-2",children:(o.length>0?o:a.tests.map(s=>
11({def:s,result:void 0,pass:null}))).map((s,h)=>e.jsxs("div",{className:`flex items-start gap-3 p-3 rounded-md border text-sm ${s.pass===!0?"border-green-500/30 bg-green-500/5":s.pass===!1?"border-red-500/30 bg-red-500/5":"border-border"}`,children:[e.jsx(F,{pass:s.pass}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium",children:s.def.label}),e.jsx("div",{className:"text-muted-foreground truncate text-xs mt-0.5",children:s.def.url}),"result"in s&&s.result&&e.jsxs("div",{className:"mt-1 text-xs space-y-0.5",children:[e.jsxs("div",{children:["Status: ",e.jsx("span",{className:"font-mono",children:s.result.status}),s.result.location&&e.jsxs("span",{children:[" â ",e.jsx("span",{className:"font-mono",children:s.result.location})]})]}),s.result.meta&&e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1",children:[e.jsxs("div",{children:["Title: ",s.result.meta.title?"â
":"â"]}),e.jsxs("div",{children:["Description: ",s.result.meta.description?"â
":"â"]}),e.jsxs("div",{children:["Canonical: ",s.result.meta.canonical?"â
":"â"]}),e.jsxs("div",{children:["OG Title: ",s.result.meta.ogTitle?"â
":"â"]}),e.jsxs("div",{children:["noindex: ",s.result.meta.noindex?"â ï¸ YES":"â
No"]}),e.jsxs("div",{children:["JSON-LD: ",s.result.meta.hasJsonLd?"â
":"â"]})]}),s.result.error&&e.jsxs("div",{className:"text-red-400",children:["Error: ",s.result.error]})]})]}),s.def.expectedStatus&&e.jsxs(p,{variant:"outline",className:"shrink-0 text-xs",children:["expect ",s.def.expectedStatus]})]},h))})})})]})},a.name)})]})}export{ee 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.