1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="911938fc-8fb7-4546-9df0-ba28b7b040a5",e._sentryDebugIdIdentifier="sentry-dbid-911938fc-8fb7-4546-9df0-ba28b7b040a5")}catch(O){}import{j as e}from"./chunk-CgByYZHX.js";import{A as n}from"./chunk-DoDzyWnT.js";import{a as t}from"./chunk-BeYjNzwJ.js";import{y as s,c1 as r,l as a,cA as i,q as o,v as l,w as c,x as d,t as u,b2 as h,b3 as g,b4 as p,cB as m,j as f}from"./index-DL-fWBsy.js";import{Q as x,U as j,W as w,X as b,Y as y}from"./chunk-D5Ty02c-.js";import"./chunk-CEwvejrK.js";import"./chunk-B7bX_pGK.js";import"./chunk-CVCxDu2f.js";import"./chunk-tENHbp4v.js";import"./chunk-ZAVbCnbv.js";import"./chunk-3QDBqjNP.js";const v=t.forwardRef(({className:n,children:t,...r},a)=>e.jsxs(x,{ref:a,className:s("relative overflow-hidden",n),...r,children:[e.jsx(j,{className:"h-full w-full rounded-[inherit]",children:t}),e.jsx(N,{}),e.jsx(w,{})]}));v.displayName=x.displayName;const N=t.forwardRef(({className:n,orientation:t="vertical",...r},a)=>e.jsx(b,{ref:a,orientation:t,className:s("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...r,children:e.jsx(y,{className:"relative flex-1 rounded-full bg-border"})}));function S(){const e=[],n=[];let t=100;const s=function(){const e=[],n=[],t=document.head.querySelectorAll('link[rel="alternate"][hreflang]');if(0===t.length)return e.push("No hreflang tags found - critical for international SEO"),{errors:e,warnings:n};const s=Array.from(t).map(e=>e.getAttribute("hreflang")).filter(Boolean);return r.forEach(n=>{s.includes(n.code)||e.push(`Missing hreflang tag for locale: ${n.code} (${n.name})`)}),s.includes("x-default")||n.push("Missing x-default hreflang tag - recommended for international sites"),t.forEach(n=>{const t=n.getAttribute("href"),s=n.getAttribute("hreflang");if(t)try{new URL(t)}catch{e.push(`Invalid URL in hreflang tag for ${s}: ${t}`)}else e.push(`Hreflang tag for ${s} missing href attribute`)}),{errors:e,warnings:n}}();e.push(...s.errors),n.push(...s.warnings),s.errors.length>0&&(t-=30),s.warnings.length>0&&(t-=10);const a=function(){const e=[],n=[];document.title&&""!==document.title.trim()?document.title.length>60&&n.push(`Title too long (${document.title.length} chars) - may be truncated in search results`):e.push("Missing or empty page title - critical for SEO");const t=document.head.querySelector('meta[name="description"]');if(t&&t.getAttribute("content")){const e=t.getAttribute("content")?.length||0;e>160&&n.push(`Meta description too long (${e} chars) - may be truncated`)}else e.push("Missing meta description - critical for SEO");return["og:title","og:description","og:type","og:url","og:image"].forEach(e=>{const t=document.head.querySelector(`meta[property="${e}"]`);t&&t.getAttribute("content")||("og:image"===e?n.push(`Missing Open Graph tag: ${e} - important for social sharing`):n.push(`Missing Open Graph tag: ${e}`))}),document.head.querySelector('link[rel="canonical"]')||n.push("Missing canonical URL - can cause duplicate content issues"),{errors:e,warnings:n}}();e.push(...a.errors),n.push(...a.warnings),a.errors.length>0&&(t-=25),a.warnings.length>0&&(t-=5);const i=function(){const e=[],n=[],t=document.head.querySelectorAll('script[type="application/ld+json"]');return 0===t.length?(n.push("No structured data found - missing rich snippet opportunities"),{errors:e,warnings:n}):(t.forEach((t,s)=>{try{const r=JSON.parse(t.textContent||"{}");r["@context"]||e.push(`Structured data script ${s+1} missing @context`),r["@type"]||r["@graph"]||e.push(`Structured data script ${s+1} missing @type or @graph`),"Organization"!==r["@type"]||r.url||n.push("Organization schema missing URL property")}catch(r){e.push(`Invalid JSON in structured data script ${s+1}`)}}),{errors:e,warnings:n})}();e.push(...i.errors),n.push(...i.warnings),i.errors.length>0&&(t-=20),i.warnings.length>0&&(t-=5);const o=function(){const e=[],n=[],t=document.documentElement.lang;t?r.some(e=>e.code===t)||n.push(`Document language "${t}" not in supported locales`):e.push("Missing lang attribute on html element");const s=window.location.pathname.split("/")[1];return r.some(e=>e.code===s&&"en"!==s)&&t!==s&&n.push(`Document language "${t}" doesn't match URL locale "${s}"`),{errors:e,warnings:n}}();return e.push(...o.errors),n.push(...o.warnings),o.errors.length>0&&(t-=25),o.warnings.length>0&&(t-=10),{isValid:0===e.length,errors:e,warnings:n,score:Math.max(0,t)}}N.displayName=b.displayName;const E=()=>{const{locale:n,setLocale:s,localeHref:x}=i(),[j,w]=t.useState("");return e.jsxs(o,{className:"mx-auto w-full max-w-4xl",children:[e.jsx(l,{children:e.jsxs(c,{className:"flex items-center gap-2",children:["ð i18n Debug Panel",e.jsxs(d,{variant:"secondary",children:["Current: ",n]})]})}),e.jsx(u,{children:e.jsxs(h,{defaultValue:"locale",className:"w-full",children:[e.jsxs(g,{className:"grid w-full grid-cols-3",children:[e.jsx(p,{value:"locale",children:"Locale Testing"}),e.jsx(p,{value:"seo",children:"SEO Validation"}),e.jsx(p,{value:"routes",children:"Route Testing"})]}),e.jsxs(m,{value:"locale",className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"mb-4 text-lg font-semibold",children:"Locale Switching Test"}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:r.map(t=>e.jsxs(f,{variant:n===t.code?"primary":"outline",onClick:()=>{return e=t.code,void s(e,window.location.pathname);var e},className:"text-sm",children:[t.flag," ",t.code.toUpperCase()]},t.code))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"mb-4 text-lg font-semibold",children:"Current State"}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Active Locale:"})," ",n]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Browser Language:"})," ",navigator.language]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Stored Language:"})," ",localStorage.getItem("glint-language")||"None"]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Document Language:"})," ",document.documentElement.lang]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Current Path:"})," ",window.location.pathname]})]})]})]}),e.jsx(m,{value:"seo",className:"space-y-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 flex items-center gap-4",children:[e.jsx(f,{onClick:()=>{const e=function(){const e=S();let n="# SEO Validation Report\n\n";return e.score>=90?n+=`â
**Status**: Excellent SEO (${e.score}/100)\n\n`:e.score>
1=70?n+=`â ï¸ **Status**: Good SEO with room for improvement (${e.score}/100)\n\n`:n+=`â **Status**: SEO needs attention (${e.score}/100)\n\n`,n+=`**Current Page**: ${window.location.pathname}\n`,n+=`**Document Language**: ${document.documentElement.lang||"not set"}\n`,n+=`**Supported Locales**: ${r.map(e=>e.code).join(", ")}\n\n`,e.errors.length>0&&(n+="## ð¨ Critical Issues\n",e.errors.forEach(e=>{n+=`- â ${e}\n`}),n+="\n"),e.warnings.length>0&&(n+="## â ï¸ Optimization Opportunities\n",e.warnings.forEach(e=>{n+=`- â ï¸ ${e}\n`}),n+="\n"),0===e.errors.length&&0===e.warnings.length&&(n+="## â
All Checks Passed\n",n+="- â
Hreflang tags implemented correctly\n",n+="- â
Meta tags present and valid\n",n+="- â
Structured data implemented\n",n+="- â
Locale implementation correct\n"),n+="## ð¯ Next Steps\n",e.score<100?(n+="- Fix critical issues first (errors)\n",n+="- Address optimization opportunities (warnings)\n",n+="- Test with Google Search Console\n",n+="- Monitor international search performance\n"):(n+="- Your SEO implementation is excellent!\n",n+="- Continue monitoring search performance\n",n+="- Consider A/B testing meta descriptions\n"),n}();w(e),function(){const e=S();a.info("SEO Validation Report",{score:e.score,locale:document.documentElement.lang,path:window.location.pathname,isValid:e.isValid,errorCount:e.errors.length,warningCount:e.warnings.length}),e.isValid?a.info("SEO validation passed - all critical checks successful"):a.warn("SEO issues detected",{errors:e.errors,warnings:e.warnings})}()},children:"Run SEO Validation"}),e.jsxs(d,{variant:"outline",children:["Current Page: ",window.location.pathname]})]}),j&&e.jsx(v,{className:"h-96 w-full rounded-md border p-4",children:e.jsx("pre",{className:"whitespace-pre-wrap text-sm",children:j})})]})}),e.jsx(m,{value:"routes",className:"space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"mb-4 text-lg font-semibold",children:"Route Generation Test"}),e.jsx("div",{className:"space-y-2",children:["/pricing","/features","/blog","/signin","/signup"].map(n=>e.jsxs("div",{className:"grid grid-cols-2 gap-4 rounded border p-2",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Route:"})," ",n]}),e.jsx("div",{className:"space-y-1",children:r.map(t=>e.jsxs("div",{className:"text-sm",children:[e.jsx(d,{variant:"outline",className:"mr-2",children:t.code}),e.jsx("span",{children:x(n,t.code)})]},t.code))})]},n))})]})})]})})]})},$=()=>(useSEO({title:"i18n Testing - Glintly",description:"Internationalization testing and validation panel for Glintly"}),e.jsx(n,{title:"i18n Testing Panel",description:"Comprehensive testing and validation for our internationalization implementation",children:e.jsxs("div",{className:"mx-auto max-w-4xl",children:[e.jsx(E,{}),e.jsx("div",{className:"mt-8 text-center text-sm text-muted-foreground",children:e.jsx("p",{children:"This page is for development testing only and should not appear in production."})})]})}));export{$ 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.