@wcag-checkr/ci 1.0.0-rc.57 → 1.0.0-rc.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/forensic-log-BhEDrPEy.js","assets/crash-reporter-Dc5lvxvY.js","assets/state-PELIq3oj.js","assets/site-report-renderer-CGcbDtk9.js"])))=>i.map(i=>d[i]);
2
- var Yt=Object.defineProperty;var Xt=(t,s,a)=>s in t?Yt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var Ye=(t,s,a)=>Xt(t,typeof s!="symbol"?s+"":s,a);import{R as xe,i as X,r as f,j as e,M as ce,C as Pe,l as Zt,o as We,t as Be,m as jt,s as wt,k as $e}from"./styles-BQt6R4jA.js";import{_ as Ne}from"./preload-helper-D7HrI6pR.js";import{o as Y,r as W,s as G,c as Nt,b as Z,d as fe}from"./crash-reporter-Dc5lvxvY.js";import{g as es,a as K,u as ts,b as ss,c as as,d as ns,e as Xe,f as kt,l as rs,h as St,A as B,i as He,s as is,O as os,j as ls,k as cs,m as Ze,n as ds,o as At,p as us,q as ps,r as hs,t as ms,T as xs,v as gs,w as fs}from"./forensic-log-BhEDrPEy.js";import{B as _e,i as Ct,b as Rt,T as Et}from"./state-PELIq3oj.js";const et=t=>{let s;const a=new Set,n=(p,l)=>{const u=typeof p=="function"?p(s):p;if(!Object.is(u,s)){const h=s;s=l??(typeof u!="object"||u===null)?u:Object.assign({},s,u),a.forEach(x=>x(s,h))}},r=()=>s,c={setState:n,getState:r,getInitialState:()=>d,subscribe:p=>(a.add(p),()=>a.delete(p))},d=s=t(n,r,c);return c},bs=t=>t?et(t):et,vs=t=>t;function ys(t,s=vs){const a=xe.useSyncExternalStore(t.subscribe,xe.useCallback(()=>s(t.getState()),[t,s]),xe.useCallback(()=>s(t.getInitialState()),[t,s]));return xe.useDebugValue(a),a}const tt=t=>{const s=bs(t),a=n=>ys(s,n);return Object.assign(a,s),a},js=t=>t?tt(t):tt,g=js(t=>({status:"idle",progress:null,results:[],delta:null,componentId:null,errorMessage:null,freshThisSession:!1,baselineList:[],tier:"trial",trialDaysRemaining:null,seatsUsed:null,seatsTotal:null,planCode:null,licenseDaysRemaining:null,pastDue:!1,messages:[],unreadMessageCount:0,criticalUnacked:!1,view:"matrix",userMode:null,siteCrawlStatus:"idle",siteCrawlProgress:null,siteCrawlReport:null,siteCrawlError:null,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null,acknowledgedKeys:new Set,setStatus:s=>t({status:s}),startNewScan:()=>t({status:"running",results:[],delta:null,errorMessage:null,progress:null,componentId:null,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null}),setProgress:s=>t({progress:s}),setResults:(s,a,n)=>t({results:s,delta:a,componentId:n,status:"complete",errorMessage:null,freshThisSession:!0,aiProgress:null,pinnedMatchKey:null,pinnedFound:!0}),setDelta:s=>t({delta:s}),setError:s=>t({errorMessage:s,status:"failed"}),setBaselineList:s=>t({baselineList:s}),clearResults:()=>t({results:[],delta:null,componentId:null,errorMessage:null,progress:null,status:"idle",freshThisSession:!1,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null}),setTier:(s,a)=>t({tier:s,trialDaysRemaining:(a==null?void 0:a.trialDaysRemaining)??null,seatsUsed:(a==null?void 0:a.seatsUsed)??null,seatsTotal:(a==null?void 0:a.seatsTotal)??null,planCode:(a==null?void 0:a.planCode)??null,licenseDaysRemaining:(a==null?void 0:a.licenseDaysRemaining)??null,pastDue:(a==null?void 0:a.pastDue)??!1}),setView:s=>t({view:s}),setUserMode:s=>t({userMode:s}),setSiteCrawlStatus:s=>t({siteCrawlStatus:s}),setSiteCrawlProgress:s=>t({siteCrawlProgress:s}),setSiteCrawlReport:s=>t({siteCrawlReport:s}),setSiteCrawlError:s=>t({siteCrawlError:s}),setPinned:(s,a=!0)=>t({pinnedMatchKey:s,pinnedFound:a}),setAiFailure:s=>t({aiFailure:s}),clearAiFailure:()=>t({aiFailure:null}),setAiProgress:s=>t({aiProgress:s}),setAcknowledgedKeys:s=>t({acknowledgedKeys:s}),markAcknowledged:s=>t(a=>({acknowledgedKeys:new Set(a.acknowledgedKeys).add(s)})),markUnacknowledged:s=>t(a=>{const n=new Set(a.acknowledgedKeys);return n.delete(s),{acknowledgedKeys:n}}),setMessages:(s,a,n)=>t({messages:s,unreadMessageCount:a,criticalUnacked:n}),applyMessageAck:(s,a)=>t(n=>{const r=n.messages.map(c=>c.id!==s?c:a==="seen"?{...c,seen:!0}:a==="dismissed"?{...c,dismissed:!0}:a==="acknowledged"?{...c,acknowledged:!0}:a==="clicked"?{...c,clicked:!0}:c).filter(c=>c.severity==="critical"?!c.acknowledged:!c.dismissed),i=r.filter(c=>!c.seen).length,o=r.some(c=>c.severity==="critical"&&!c.acknowledged);return{messages:r,unreadMessageCount:i,criticalUnacked:o}})})),ke="sidePanel:lastAudit";function ws(){const t=[];return t.push(Y("AUDIT_PROGRESS_EVENT",s=>{const a=g.getState().status==="running";g.getState().setProgress({current:s.current,total:s.total,currentState:s.currentState}),g.getState().setStatus("running"),a||X.polite(`Audit running, scanning ${s.total} state${s.total===1?"":"s"}.`)})),t.push(Y("AUDIT_COMPLETE_EVENT",s=>{var i;g.getState().setResults(s.results,s.delta,s.componentId);const a=s.results.reduce((o,c)=>o+c.violations.length,0),n=((i=s.delta)==null?void 0:i.newCount)??0,r=s.delta?`Audit complete. ${n} new violation${n===1?"":"s"} versus baseline.`:`Audit complete. ${a} violation${a===1?"":"s"} found across ${s.results.length} state${s.results.length===1?"":"s"}.`;X.polite(r),Ns({results:s.results,delta:s.delta,componentId:s.componentId})})),t.push(Y("AUDIT_FAILED_EVENT",s=>{g.getState().setError(s.error.message)})),t.push(Y("AI_AUGMENTATION_PROGRESS_EVENT",s=>{const a=g.getState().aiProgress;g.getState().setAiProgress({currentCheckLabel:s.currentCheckLabel,current:s.current,total:s.total,candidatesDone:s.candidatesDone,candidatesTotal:s.candidatesTotal}),a||X.polite(`AI augmentation running ${s.total} check${s.total===1?"":"s"}.`)})),t.push(Y("AI_AUGMENTATION_FAILED_EVENT",s=>{g.getState().setAiFailure({severity:s.severity,reason:s.reason,checksAttempted:s.checksAttempted,checksSucceeded:s.checksSucceeded,checksErrored:s.checksErrored,errorDetails:s.errorDetails})})),t.push(Y("SCORECARD_UPDATED_EVENT",()=>{Se()})),t.push(Y("LICENSE_CHANGED_EVENT",()=>{Tt()})),t.push(Y("SITE_CRAWL_PROGRESS_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("running"),a.setSiteCrawlProgress({current:s.current,total:s.total,url:s.url,lastViolations:s.violations}),s.status==="auditing"&&s.current===1&&X.polite(`Site crawl started, scanning up to ${s.total} pages.`)})),t.push(Y("SITE_CRAWL_COMPLETE_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("complete"),a.setSiteCrawlReport(s.report),a.setSiteCrawlProgress(null),X.polite(`Site crawl complete. Grade ${s.report.siteGrade}, ${s.report.totalUniqueViolations} unique violation${s.report.totalUniqueViolations===1?"":"s"}.`)})),t.push(Y("SITE_CRAWL_FAILED_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("failed"),a.setSiteCrawlError(s.error.message),a.setSiteCrawlProgress(null),X.assertive(`Site crawl failed: ${s.error.message}`)})),()=>t.forEach(s=>s())}async function Ns(t){const s={...t,results:t.results.map(({screenshotDataUrl:a,...n})=>n)};try{await chrome.storage.local.set({[ke]:s})}catch(a){console.warn("[wire-messaging] persistLastAudit failed; results stay in-memory only",a)}}async function ks(){const s=(await chrome.storage.local.get(ke))[ke];s&&g.setState({results:s.results,delta:s.delta,componentId:s.componentId,status:"complete"})}async function Ss(){await chrome.storage.local.remove(ke)}async function ze(){g.getState().clearResults(),await Ss()}async function Se(){const t=await W({type:"BASELINE_LIST"});g.getState().setBaselineList(t.items)}async function Tt(t){const s=await W({type:"TIER_GET",forceRefresh:(t==null?void 0:t.forceRefresh)===!0});g.getState().setTier(s.tier,{trialDaysRemaining:s.trialDaysRemaining,seatsUsed:s.seatsUsed,seatsTotal:s.seatsTotal,planCode:s.planCode,licenseDaysRemaining:s.licenseDaysRemaining,pastDue:s.pastDue}),It()}async function It(){const{fetchMessages:t}=await Ne(async()=>{const{fetchMessages:n}=await Promise.resolve().then(()=>Ls);return{fetchMessages:n}},void 0),s=g.getState().userMode,a=await t(s);a&&g.getState().setMessages(a.messages,a.unreadCount,a.criticalUnacked)}async function As(){const s=(await W({type:"SETTINGS_GET",key:"userMode"})).data,a=s==="owner"||s==="dev"?s:null;g.getState().setUserMode(a)}function Cs(){return chrome.runtime.connect({name:"audit-keepalive"})}let Ae=null;async function Rs(){if(Ae===null)try{const t=await chrome.windows.getCurrent();typeof t.id=="number"&&(Ae=t.id)}catch{}}function $t(){if(Ae===null)return;const t=chrome.sidePanel;!t||typeof t.open!="function"||t.open({windowId:Ae}).catch(()=>{})}function se(t){$t(),G(t)}function Es({onClose:t}){const[s,a]=f.useState(""),[n,r]=f.useState(""),[i,o]=f.useState(!0),[c,d]=f.useState(""),[p,l]=f.useState(!1),[u,h]=f.useState(null);async function x(b){var w;if(b.preventDefault(),!(!s.trim()||!n.trim())){l(!0),h(null);try{const N=await W({type:"SUPPORT_MESSAGE_REQUEST",subject:s.trim(),body:n.trim(),includeContext:i,replyEmail:c.trim()||void 0});N.success?(h({ok:!0,msg:`Sent (ref: ${N.ticketRef??"n/a"})`}),setTimeout(t,1200)):h({ok:!1,msg:((w=N.error)==null?void 0:w.message)??"Failed to send"})}finally{l(!1)}}}return e.jsxs("form",{onSubmit:x,className:"space-y-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-subject",className:"block text-xs font-medium mb-1",children:"Subject"}),e.jsx("input",{id:"support-subject",type:"text",value:s,onChange:b=>a(b.target.value),required:!0,className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-body",className:"block text-xs font-medium mb-1",children:"Message"}),e.jsx("textarea",{id:"support-body",value:n,onChange:b=>r(b.target.value),required:!0,rows:6,className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-reply",className:"block text-xs font-medium mb-1",children:"Reply email (optional)"}),e.jsx("input",{id:"support-reply",type:"email",autoComplete:"email",value:c,onChange:b=>d(b.target.value),className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("label",{className:"flex items-start gap-2 text-xs",children:[e.jsx("input",{type:"checkbox",checked:i,onChange:b=>o(b.target.checked),className:"mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"Include extension version, browser platform, and license tier (no URLs, page content, or audit data is sent)."})]}),u&&e.jsx("p",{id:"support-form-result",role:u.ok?"status":"alert",className:`text-xs ${u.ok?"text-green-700":"text-red-700"}`,children:u.msg}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:t,className:"text-xs px-3 py-1 hover:bg-slate-100 rounded",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:p,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",children:p?"Sending…":"Send"})]})]})}function st({onClick:t,ariaLabel:s,title:a,children:n,className:r}){return e.jsx("button",{onClick:t,"aria-label":s,title:a??s,className:`inline-flex items-center justify-center min-w-[24px] min-h-[24px] text-xs text-slate-500 hover:text-slate-900 ${r??""}`,children:n})}const Ce=Nt("messages-client"),Ts="https://api.wcagcheckr.com",_t="wcagcheckr",Is=1e4;function $s(){try{return chrome.runtime.getManifest().version}catch{return"0.0.0"}}async function Lt(t,s){const a=await es();if(!a)throw new Error("no_license_token");const n={...(s==null?void 0:s.headers)??{},Authorization:`Bearer ${a}`,"X-Extension-Version":$s()};return s!=null&&s.userMode&&(n["X-User-Mode"]=s.userMode),fetch(`${Ts}${t}`,{...s,headers:n,signal:AbortSignal.timeout(Is)})}async function _s(t){try{const s=await Lt(`/v1/products/${_t}/messages`,{userMode:t??null});return s.ok?await s.json():(Ce.warn("fetchMessages http",s.status),null)}catch(s){return Ce.warn("fetchMessages failed",s),null}}async function ie(t,s){try{const a=await Lt(`/v1/products/${_t}/messages/${t}/ack`,{method:"POST",body:JSON.stringify({action:s}),headers:{"content-type":"application/json"}});return a.ok?!0:(Ce.warn("ackMessage http",a.status,"action",s),!1)}catch(a){return Ce.warn("ackMessage failed",a),!1}}const Ls=Object.freeze(Object.defineProperty({__proto__:null,ackMessage:ie,fetchMessages:_s},Symbol.toStringTag,{value:"Module"})),Us=["http:","https:"];function Ds(t){try{const s=new URL(t);return Us.includes(s.protocol)}catch{return!1}}function at(t){const s=[];let a=0,n=0;for(;a<t.length;){if(t[a]==="["){const i=t.indexOf("]",a+1);if(i!==-1&&t[i+1]==="("){const o=t.indexOf(")",i+2);if(o!==-1){const c=t.slice(a+1,i),d=t.slice(i+2,o);Ds(d)?s.push(e.jsx("a",{href:d,target:"_blank",rel:"noopener",className:"text-brand-700 underline",children:c},`l-${n++}`)):s.push(e.jsx(f.Fragment,{children:c},`l-${n++}`)),a=o+1;continue}}}if(t[a]==="*"&&t[a+1]==="*"){const i=t.indexOf("**",a+2);if(i!==-1){s.push(e.jsx("strong",{children:t.slice(a+2,i)},`b-${n++}`)),a=i+2;continue}}if(t[a]==="*"&&t[a+1]!=="*"){const i=t.indexOf("*",a+1);if(i!==-1&&t[i+1]!=="*"){s.push(e.jsx("em",{children:t.slice(a+1,i)},`i-${n++}`)),a=i+1;continue}}let r=a+1;for(;r<t.length&&t[r]!=="*"&&t[r]!=="[";)r++;s.push(e.jsx(f.Fragment,{children:t.slice(a,r)},`t-${n++}`)),a=r}return s}function Ut({source:t}){const s=t.split(/\r?\n/),a=[];let n=[],r=[],i=0;function o(){if(r.length===0)return;const d=r.join(" ");a.push(e.jsx("p",{className:"leading-snug",children:at(d)},`p-${i++}`)),r=[]}function c(){n.length!==0&&(a.push(e.jsx("ul",{className:"list-disc pl-5 space-y-0.5",children:n.map((d,p)=>e.jsx("li",{children:at(d)},p))},`u-${i++}`)),n=[])}for(const d of s){const p=d.trimEnd();if(p===""){o(),c();continue}const l=/^[-*]\s+(.*)$/.exec(p);if(l){o(),n.push(l[1]);continue}c(),r.push(p)}return o(),c(),e.jsx("div",{className:"space-y-1.5",children:a})}const Fs={info:"bg-blue-500",promo:"bg-purple-500",warning:"bg-amber-500",critical:"bg-rose-500"},Os={critical:"bg-rose-50 border-rose-200"};function Dt(){const t=g(h=>h.unreadMessageCount),s=g(h=>h.messages),a=g(h=>h.applyMessageAck),[n,r]=f.useState(!1),i=f.useRef(-1),[o,c]=f.useState(!1);f.useEffect(()=>{const h=s.filter(b=>!b.seen);if(h.length===0)return;const x=Math.max(...h.map(b=>b.id));if(x>i.current){i.current=x,c(!0);const b=setTimeout(()=>c(!1),1500);return()=>clearTimeout(b)}},[s]);async function d(){const h=s.filter(x=>!x.seen);if(h.length!==0)for(const x of h)a(x.id,"seen"),ie(x.id,"seen")}function p(){const h=!n;r(h),h&&d()}async function l(h){a(h.id,"dismissed"),await ie(h.id,"dismissed")}async function u(h){h.ctaUrl&&(a(h.id,"clicked"),ie(h.id,"clicked"),chrome.tabs.create({url:h.ctaUrl}).catch(()=>{window.open(h.ctaUrl,"_blank","noopener")}))}return e.jsxs("div",{className:"relative",children:[e.jsxs("button",{type:"button",onClick:p,"aria-label":t>0?`Notifications (${t} unread)`:"Notifications","aria-expanded":n,"aria-haspopup":"dialog",className:`relative grid place-items-center w-7 h-7 rounded text-slate-500 hover:bg-slate-100 hover:text-slate-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand-500 ${o?"animate-bell-pulse":""}`,title:t>0?`${t} new message${t===1?"":"s"}`:"No new messages",children:[e.jsx(Ms,{active:t>0}),t>0&&e.jsx("span",{"aria-hidden":"true",className:"absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-rose-500 ring-2 ring-white"})]}),n&&e.jsx(Ps,{messages:s,onClose:()=>r(!1),onDismiss:l,onCtaClick:u})]})}function Ms({active:t}){return e.jsx("svg",{viewBox:"0 0 20 20",width:"16",height:"16","aria-hidden":"true",fill:"currentColor",className:t?"text-rose-500":"",children:e.jsx("path",{d:"M10 2a5 5 0 00-5 5v3l-1.6 2.4a1 1 0 00.84 1.6h11.52a1 1 0 00.84-1.6L15 10V7a5 5 0 00-5-5zm-1.5 13a1.5 1.5 0 003 0h-3z"})})}function Ps({messages:t,onClose:s,onDismiss:a,onCtaClick:n}){const r=f.useRef(null);return f.useEffect(()=>{const i=c=>{r.current&&(r.current.contains(c.target)||s())},o=c=>{c.key==="Escape"&&s()};return document.addEventListener("mousedown",i),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",o)}},[s]),e.jsxs("div",{ref:r,role:"dialog","aria-label":"Notifications",className:"absolute right-0 top-full mt-1 w-80 max-h-[420px] overflow-y-auto bg-white border border-slate-200 rounded shadow-lg z-50 text-xs",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-slate-200",children:[e.jsx("span",{className:"font-medium",children:"Notifications"}),e.jsx("button",{type:"button",onClick:()=>{It()},className:"text-[11px] text-brand-700 hover:underline",children:"Refresh"})]}),t.length===0?e.jsx("div",{className:"p-4 text-center text-slate-500 text-[11px]",children:"No messages."}):e.jsx("ul",{className:"divide-y divide-slate-100",children:t.map(i=>e.jsx("li",{className:`p-3 ${i.seen?"":"bg-slate-50"}`,children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:`shrink-0 w-1 self-stretch rounded ${Fs[i.severity]}`,"aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"font-medium text-slate-800",children:i.title}),i.dismissible&&i.severity!=="critical"&&e.jsx("button",{type:"button",onClick:()=>a(i),"aria-label":"Dismiss message",className:"text-slate-400 hover:text-slate-700 shrink-0",children:"✕"})]}),e.jsx("div",{className:"mt-1 text-slate-700",children:e.jsx(Ut,{source:i.bodyMd})}),i.ctaLabel&&i.ctaUrl&&e.jsx("button",{type:"button",onClick:()=>n(i),className:"mt-2 text-[11px] px-2 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:i.ctaLabel}),e.jsx("div",{className:"mt-1 text-[10px] text-slate-400",children:new Date(i.createdAt).toLocaleString()})]})]})},i.id))})]})}function Ft(){const t=g(i=>i.messages),s=g(i=>i.applyMessageAck),a=t.find(i=>i.severity==="critical"&&!i.acknowledged);if(!a)return null;async function n(){s(a.id,"acknowledged"),await ie(a.id,"acknowledged")}async function r(){a.ctaUrl&&(s(a.id,"clicked"),ie(a.id,"clicked"),chrome.tabs.create({url:a.ctaUrl}).catch(()=>{}))}return e.jsxs("div",{role:"alert",className:`border-y ${Os.critical} px-3 py-2 text-xs flex items-start gap-2`,children:[e.jsx("span",{"aria-hidden":"true",className:"text-rose-600 text-sm leading-none mt-0.5",children:"⚠"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-rose-900",children:a.title}),e.jsx("div",{className:"mt-0.5 text-rose-900/90",children:e.jsx(Ut,{source:a.bodyMd})}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[a.ctaLabel&&a.ctaUrl&&e.jsx("button",{type:"button",onClick:r,className:"text-[11px] px-2 py-1 bg-rose-600 text-white rounded hover:bg-rose-700",children:a.ctaLabel}),e.jsx("button",{type:"button",onClick:n,className:"text-[11px] px-2 py-1 border border-rose-300 text-rose-800 rounded hover:bg-rose-100",children:"Acknowledge"})]})]})]})}const ue=["matrix","delta","activity","guided","flows","scorecard","crawl","forensic","compliance"];function Gs(t){if(!t)return null;try{return new URL(t).hostname}catch{return t}}function Vs(){var u,h;const t=g(x=>x.view),s=g(x=>x.setView),a=g(x=>x.setUserMode),n=g(x=>x.results),r=g(x=>x.status),[i,o]=f.useState(!1),c=((u=n[0])==null?void 0:u.pageUrl)??((h=n[0])==null?void 0:h.scope),d=Gs(c),p=n.length>0&&r!=="running";function l(){a("owner"),G({type:"SETTINGS_SET",key:"userMode",value:"owner"})}return e.jsxs("header",{className:"border-b border-slate-200 bg-white px-3 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-semibold text-sm leading-tight",children:"wcagcheckr"}),e.jsxs("p",{className:"text-[10px] text-slate-500 leading-tight font-mono",children:["v",chrome.runtime.getManifest().version]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:l,title:"Switch to the simplified site-owner view",className:"text-[11px] px-2 py-1 border border-slate-300 rounded text-slate-600 hover:bg-slate-50",children:"Owner mode"}),e.jsx(Dt,{}),e.jsx(st,{onClick:()=>void G({type:"OPEN_SETTINGS"}),ariaLabel:"Open settings",children:"⚙"}),e.jsx(st,{onClick:()=>o(!0),ariaLabel:"Send support message",children:"?"})]})]}),p&&d&&e.jsxs("div",{className:"flex items-center gap-2 mb-2 px-2 py-1 rounded bg-brand-50 border border-brand-200 text-[11px]",title:c??"",children:[e.jsx("span",{className:"text-slate-500 shrink-0",children:"Audit:"}),e.jsx("span",{className:"font-mono font-medium text-slate-800 truncate flex-1","aria-label":`Showing audit results for ${d}`,children:d}),e.jsx("button",{type:"button",onClick:()=>void ze(),className:"shrink-0 text-[11px] px-2 py-0.5 rounded border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 hover:border-slate-400",title:"Clear these results so you can run a fresh audit",children:"Clear"})]}),e.jsx(Ws,{view:t,setView:s}),e.jsx(ce,{open:i,onClose:()=>o(!1),title:"Send support message",children:e.jsx(Es,{onClose:()=>o(!1)})})]})}function Ws({view:t,setView:s}){const a=f.useRef([]);function n(i){var d;const o=(i+ue.length)%ue.length,c=ue[o];c&&(s(c),(d=a.current[o])==null||d.focus())}function r(i,o){switch(i.key){case"ArrowRight":i.preventDefault(),n(o+1);break;case"ArrowLeft":i.preventDefault(),n(o-1);break;case"Home":i.preventDefault(),n(0);break;case"End":i.preventDefault(),n(ue.length-1);break}}return e.jsx("nav",{className:"flex flex-wrap gap-1","aria-label":"Audit views",role:"tablist",children:ue.map((i,o)=>{const c=t===i;return e.jsx("button",{ref:d=>{a.current[o]=d},role:"tab","aria-selected":c,tabIndex:c?0:-1,onClick:()=>s(i),onKeyDown:d=>r(d,o),className:c?"text-xs px-3 py-1 rounded bg-brand-500 text-white":"text-xs px-3 py-1 rounded text-slate-600 hover:bg-slate-100",children:i[0].toUpperCase()+i.slice(1)},i)})})}function Bs({feature:t,upgradeUrl:s}){const[a,n]=f.useState(!1);return e.jsxs("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded",children:[e.jsxs("p",{className:"text-xs text-amber-900 mb-2",children:[e.jsx("strong",{children:t})," requires a higher tier."]}),e.jsx("button",{type:"button",onClick:()=>n(!0),className:"text-xs text-brand-600 hover:underline font-medium",children:"Upgrade →"}),e.jsx(Pe,{open:a,onClose:()=>n(!1)})]})}const Hs="https://wcagcheckr.com/upgrade";function zs(){const[t,s]=f.useState("single-element"),[a,n]=f.useState(!1),[r,i]=f.useState(null),[o,c]=f.useState(null),[d,p]=f.useState(_e),[l,u]=f.useState(_e[0].id),h=g(S=>S.status),x=g(S=>S.tier),b=g(S=>S.results.length>0),w=h==="running";f.useEffect(()=>{Promise.all([W({type:"SETTINGS_GET",key:"matrixPresets"}),W({type:"SETTINGS_GET",key:"activePresetId"})]).then(([S,E])=>{const V=Array.isArray(S.data)?S.data:null;p(V&&V.length>0?V:_e),typeof E.data=="string"&&u(E.data)})},[]);function N(S){const E=d.find(V=>V.id===S);E&&(u(S),G({type:"SETTINGS_SET",key:"activePresetId",value:S}),G({type:"SETTINGS_SET",key:"stateMatrix",value:E.matrix}))}const T=Ct(x,"storybookAutoIterate");f.useEffect(()=>{const S=Y("ELEMENT_PICKED_EVENT",(V,I)=>{n(!1);const F=I.frameId;k(F),i({selector:V.selector,frameId:F})}),E=Y("PICKER_CANCELLED_EVENT",()=>n(!1));return()=>{S(),E()}},[]);async function m(){const S=await K();S&&(n(!0),await Z(S,{type:"PICKER_ACTIVATE_REQUEST",tabId:S}))}function v(){r&&(k(r.frameId),se({type:"START_AUDIT",mode:"single-element",scope:r.selector,frameId:r.frameId}),g.getState().startNewScan())}function y(){if(!T){c("storybook:auto-iterate");return}k(),se({type:"START_AUDIT",mode:"storybook-all"}),g.getState().startNewScan()}function R(){k(),se({type:"START_AUDIT",mode:"all-frames"}),g.getState().startNewScan()}function L(){k(),se({type:"START_AUDIT",mode:"full-page"}),g.getState().startNewScan()}function j(){G({type:"CANCEL_AUDIT"})}async function k(S){g.getState().setPinned(null);const E=await K();if(E)try{await Z(E,{type:"HIGHLIGHT_CLEAR_REQUEST",tabId:E},S)}catch{}}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-3 py-2 border-b border-slate-200 bg-white space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("select",{"aria-label":"Audit mode",value:t,onChange:S=>s(S.target.value),disabled:w||a,className:"text-xs border border-slate-300 rounded px-2 py-1",children:[e.jsx("option",{value:"single-element",children:"Single element"}),e.jsx("option",{value:"full-page",children:"Full page"}),e.jsx("option",{value:"all-frames",children:"All iframes"}),e.jsxs("option",{value:"storybook-all",children:["All stories (Storybook / Ladle)",T?"":" (paid)"]})]}),e.jsx("select",{"aria-label":"State-matrix preset",value:l,onChange:S=>N(S.target.value),disabled:w||a,title:"Switch the state-matrix preset used for the next audit",className:"text-xs border border-slate-300 rounded px-2 py-1",children:d.map(S=>e.jsx("option",{value:S.id,children:S.name},S.id))}),t==="single-element"?e.jsx(Ks,{picking:a,picked:r,isRunning:w,onPick:m,onRun:v,onClearPick:()=>i(null)}):t==="full-page"?e.jsx("button",{onClick:L,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Scan page"}):t==="all-frames"?e.jsx("button",{onClick:R,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Audit all iframes"}):e.jsx("button",{onClick:y,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Audit all stories"}),w&&e.jsx("button",{onClick:j,className:"text-xs px-3 py-1 border border-slate-300 text-slate-700 rounded hover:bg-slate-100",children:"Stop"}),!w&&b&&e.jsx("button",{type:"button",onClick:()=>void ze(),className:"text-xs text-slate-500 hover:text-slate-800 hover:underline ml-auto",title:"Clear current results",children:"Clear"})]}),t==="single-element"&&r&&!a&&!w&&e.jsx(qs,{selector:r.selector,onRepick:m,onClear:()=>i(null)})]}),e.jsx(ce,{open:o!==null,onClose:()=>c(null),title:"Upgrade to continue",children:e.jsx(Bs,{feature:o??"",upgradeUrl:Hs})})]})}function Ks({picking:t,picked:s,isRunning:a,onPick:n,onRun:r,onClearPick:i}){return a?e.jsx("button",{disabled:!0,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded opacity-50",children:"Auditing…"}):t?e.jsx("button",{disabled:!0,className:"text-xs px-3 py-1 bg-brand-400 text-white rounded",children:"Click an element on the page"}):s?e.jsx("button",{onClick:r,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Run audit"}):e.jsx("button",{onClick:n,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Pick element"})}function qs({selector:t,onRepick:s,onClear:a}){return e.jsxs("div",{className:"text-[11px] text-slate-600 flex items-center gap-2 flex-wrap",children:[e.jsx("span",{children:"Selected:"}),e.jsx("code",{className:"font-mono bg-slate-100 px-1.5 py-0.5 rounded text-slate-700 truncate max-w-[180px]",title:t,children:t}),e.jsx("button",{type:"button",onClick:s,className:"text-brand-600 hover:underline",children:"Re-pick"}),e.jsx("span",{"aria-hidden":"true",className:"text-slate-300",children:"·"}),e.jsx("button",{type:"button",onClick:a,className:"text-slate-500 hover:text-slate-700 hover:underline",children:"Clear"})]})}const Qs={outline:"OUTLINE_HIDE_REQUEST","tab-order":"TAB_ORDER_HIDE_REQUEST","reading-order":"READING_ORDER_HIDE_REQUEST","target-size":"TARGET_SIZE_HIDE_REQUEST"},Js={outline:"OUTLINE_SHOW_REQUEST","tab-order":"TAB_ORDER_SHOW_REQUEST","reading-order":"READING_ORDER_SHOW_REQUEST","target-size":"TARGET_SIZE_SHOW_REQUEST"};function Ys(){const[t,s]=f.useState(null),[a,n]=f.useState(!1),[r,i]=f.useState(null),[o,c]=f.useState("off"),p=g(x=>x.results).flatMap(x=>x.violations);async function l(x){const b=await K();b&&(c(x),x==="off"?await Z(b,{type:"VISION_SIMULATOR_CLEAR",tabId:b}).catch(()=>{}):await Z(b,{type:"VISION_SIMULATOR_APPLY",tabId:b,mode:x}).catch(()=>{}))}async function u(x){const b=await K();if(b){if(t&&await Z(b,{type:Qs[t],tabId:b}).catch(()=>{}),t===x){s(null);return}await Z(b,{type:Js[x],tabId:b}).catch(()=>{}),s(x)}}async function h(){const x=await K();if(x){if(a){await Z(x,{type:"FIX_PREVIEW_HIDE_REQUEST",tabId:x}).catch(()=>{}),n(!1),i(null);return}if(p.length===0){i("Run an audit first.");return}try{const b=await fe(x,{type:"FIX_PREVIEW_SHOW_REQUEST",tabId:x,violations:p});n(!0),i(`Previewing ${b.visualFixCount} visual fix${b.visualFixCount===1?"":"es"} + ${b.annotationCount} annotation${b.annotationCount===1?"":"s"}.`)}catch{i("Preview failed.")}}}return e.jsxs("div",{className:"px-3 py-2 border-b border-slate-200 bg-white flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-[11px] uppercase tracking-wide text-slate-500 mr-1",title:"Page overlays — these draw information on the live page. They do NOT change what the audit detects.",children:"Visualizers"}),e.jsx(pe,{label:"Outline",title:"Show heading + landmark structure overlay",on:t==="outline",onClick:()=>u("outline")}),e.jsx(pe,{label:"Tab order",title:"Number focusables in tab sequence. Red = tab order doesn't follow visual layout (focus jumps around). Amber = positive tabindex reordered the DOM sequence.",on:t==="tab-order",onClick:()=>u("tab-order")}),e.jsx(pe,{label:"Reading order",title:"Number content in DOM order (what a screen reader reads). Red = element's DOM position differs from its visual position; badge shows DOM→Visual.",on:t==="reading-order",onClick:()=>u("reading-order")}),e.jsx(pe,{label:"Targets",title:"Show interactive-element dimensions vs WCAG 2.5.8 (24px AA) / 2.5.5 (44px AAA)",on:t==="target-size",onClick:()=>u("target-size")}),e.jsx("span",{className:"w-px h-4 bg-slate-200 mx-1","aria-hidden":"true"}),e.jsx(pe,{label:"Preview fixes ✨",title:"Apply contrast/target-size/focus-ring fixes to the live page + annotate where labels and alt text are missing. Toggle off to revert.",on:a,onClick:h}),e.jsx("span",{className:"w-px h-4 bg-slate-200 mx-1","aria-hidden":"true"}),e.jsxs("label",{className:"text-[11px] text-slate-700 flex items-center gap-1.5",children:[e.jsx("span",{title:"Apply a CSS filter that simulates how the page looks for users with color-vision or low-vision impairments. Visual only — does NOT change what the audit detects.",children:"Vision sim:"}),e.jsxs("select",{"aria-label":"Vision-impairment simulator",value:o,onChange:x=>void l(x.target.value),className:`text-xs border rounded px-1.5 py-0.5 ${o==="off"?"border-slate-300 bg-white text-slate-700":"border-brand-500 bg-brand-50 text-brand-700 font-medium"}`,children:[e.jsx("option",{value:"off",children:"Off"}),e.jsxs("optgroup",{label:"Color blindness",children:[e.jsx("option",{value:"deuteranomaly",children:"Deuteranomaly (green-weak — most common)"}),e.jsx("option",{value:"deuteranopia",children:"Deuteranopia (green-blind)"}),e.jsx("option",{value:"protanomaly",children:"Protanomaly (red-weak)"}),e.jsx("option",{value:"protanopia",children:"Protanopia (red-blind)"}),e.jsx("option",{value:"tritanomaly",children:"Tritanomaly (blue-weak)"}),e.jsx("option",{value:"tritanopia",children:"Tritanopia (blue-blind)"}),e.jsx("option",{value:"achromatomaly",children:"Achromatomaly (partial color blindness)"}),e.jsx("option",{value:"achromatopsia",children:"Achromatopsia (no color)"})]}),e.jsxs("optgroup",{label:"Low vision",children:[e.jsx("option",{value:"cataract",children:"Cataract (blur)"}),e.jsx("option",{value:"low-contrast",children:"Low contrast sensitivity"}),e.jsx("option",{value:"glaucoma",children:"Glaucoma (tunnel vision)"}),e.jsx("option",{value:"macular",children:"Macular degeneration (central loss)"})]})]})]}),r&&e.jsx("span",{className:"text-[11px] text-slate-500 basis-full",children:r})]})}function pe({label:t,title:s,on:a,onClick:n}){return e.jsx("button",{type:"button",title:s,"aria-pressed":a,onClick:n,className:`text-xs px-2 py-1 rounded border transition-colors ${a?"bg-brand-500 text-white border-brand-500 hover:bg-brand-600":"bg-white text-slate-700 border-slate-300 hover:bg-slate-50"}`,children:t})}function Xs(t){if(!t)return"";const s=[t.pseudoState];return t.theme!=="light"&&s.push(t.theme),t.direction!=="ltr"&&s.push(t.direction),s.join(" · ")}function Zs(){const t=g(p=>p.status),s=g(p=>p.progress),a=g(p=>p.aiProgress);if(t!=="running"||!s)return null;const n=a!=null,r=!n&&s.current>=s.total,i=n?a.current/a.total*100:s.current/s.total*100,o=n?a.current:s.current,c=n?a.total:s.total,d=n?`AI augmentation: ${a.current} of ${a.total} checks. ${a.currentCheckLabel}`:r?"Running deep analyzers: reading order, tab order, typography, custom properties, AI candidates.":`Audit progress: ${s.current} of ${s.total} states`;return e.jsxs("div",{className:"px-3 py-2 bg-slate-100 border-b border-slate-200",children:[e.jsxs("div",{className:"flex justify-between items-center gap-2 text-xs text-slate-600 mb-1",children:[e.jsx("span",{children:n?e.jsxs(e.Fragment,{children:["AI augmentation… ",a.current,"/",a.total]}):r?e.jsx(e.Fragment,{children:"Running deep analyzers…"}):e.jsxs(e.Fragment,{children:["Auditing… ",s.current,"/",s.total]})}),e.jsx("span",{className:"text-slate-500 truncate flex-1",children:n?a.candidatesTotal&&a.candidatesTotal>0?`${a.currentCheckLabel} (${a.candidatesDone??0}/${a.candidatesTotal})`:a.currentCheckLabel:r?"reading order · tab order · typography · CSS vars · AI candidates":Xs(s.currentState)}),e.jsx("button",{type:"button",onClick:()=>void G({type:"CANCEL_AUDIT"}),className:"text-[11px] px-2 py-0.5 border border-slate-400 bg-white text-slate-700 rounded hover:bg-slate-200 shrink-0",children:"Stop"})]}),e.jsx("div",{className:`h-1 rounded-full overflow-hidden ${n?"bg-violet-100":"bg-slate-200"}`,role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":c,"aria-label":d,children:e.jsx("div",{className:`h-full transition-all ${n?"bg-violet-500":"bg-brand-500"}`,style:{width:`${i}%`}})})]})}const he={"ada-iii":{id:"ada-iii",name:"ADA Title III",region:"US",blurb:"US civil-rights law; courts treat WCAG 2.1 AA as the de facto digital standard."},508:{id:"508",name:"Section 508",region:"US federal",blurb:"US federal procurement requirement; references WCAG 2.0 AA via 36 CFR Part 1194."},eaa:{id:"eaa",name:"EAA",region:"EU",blurb:"European Accessibility Act, in force 2025-06-28; references EN 301 549 → WCAG 2.1 AA."},"en-301-549":{id:"en-301-549",name:"EN 301 549",region:"EU",blurb:"European harmonized accessibility standard, baseline WCAG 2.1 AA."},aoda:{id:"aoda",name:"AODA",region:"Ontario",blurb:"Accessibility for Ontarians with Disabilities Act; WCAG 2.0 AA required since 2021."}};function ea(t){return/^wcag\d/.test(t.wcagCriterion)?[he["ada-iii"],he[508],he.eaa,he["en-301-549"],he.aoda]:[]}const ta={minor:"bg-blue-100 text-blue-700",moderate:"bg-yellow-100 text-yellow-700",serious:"bg-orange-100 text-orange-700",critical:"bg-red-100 text-red-700"};function Re({violation:t,alreadyAcknowledged:s}){const a=g(m=>m.pinnedMatchKey),n=g(m=>m.pinnedFound),r=g(m=>m.setPinned),i=g(m=>{var v;return(v=m.results[0])==null?void 0:v.frameId}),o=g(m=>{var v;return(v=m.results[0])==null?void 0:v.scope}),c=g(m=>m.results),d=g(m=>m.acknowledgedKeys.has(t.matchKey)),p=g(m=>m.markAcknowledged),l=g(m=>m.markUnacknowledged),u=s||d,h=a===t.matchKey,x=h&&!n;async function b(m){try{return(await fe(m,{type:"HIGHLIGHT_SHOW_REQUEST",tabId:m,selector:t.target.selector},i)).found}catch{return!0}}async function w(){const m=await K();if(!m)return;if(h){r(null);try{await Z(m,{type:"HIGHLIGHT_CLEAR_REQUEST",tabId:m},i)}catch{}return}const v=await b(m);r(t.matchKey,v)}function N(m){m.stopPropagation(),t.currentState.breakpoint.width<=640&&$t(),(async()=>{const v=await K();if(!v)return;try{await W({type:"STATE_DRIVE_REQUEST",tabId:v,state:t.currentState,scope:o,frameId:i})}catch{}const y=await b(v);r(t.matchKey,y)})()}async function T(m){m.stopPropagation();const v=await K();if(!v)return;try{await W({type:"STATE_DRIVE_REQUEST",tabId:v,state:ra(),scope:o,frameId:i})}catch{G({type:"STATE_RESET_REQUEST",tabId:v})}const y=await b(v);r(t.matchKey,y)}return e.jsxs("button",{type:"button",onClick:w,"aria-pressed":h,className:`w-full text-left border rounded p-2 bg-white block transition-shadow
3
- ${h?"border-rose-400 ring-2 ring-rose-300":"border-slate-200 hover:border-slate-300"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-1 gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-medium text-xs truncate",children:t.ruleId}),e.jsxs("div",{className:"text-xs text-slate-500",children:[t.wcagCriterion," · ",t.wcagLevel]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t.flakyAcrossRuns&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-100 text-amber-700",title:"Did not appear in every audit run — likely a transient environment artifact",children:"flaky"}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${ta[t.impact]}`,children:t.impact})]})]}),e.jsx("p",{className:"text-xs text-slate-700 mb-2",children:t.description}),e.jsx("code",{className:"text-[11px] bg-slate-50 p-1.5 rounded block text-slate-600 font-mono whitespace-pre-wrap break-all",children:t.target.outerHTML}),e.jsx(ia,{violation:t}),e.jsx(ca,{violation:t}),e.jsx(la,{violation:t}),e.jsx(oa,{text:t.target.failureSummary}),e.jsx(da,{ruleId:t.ruleId}),h&&e.jsxs("div",{className:"text-[11px] text-slate-600 mt-2 flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsxs("span",{children:["State: ",sa(t.currentState)]}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{role:"button",tabIndex:0,onClick:N,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),N(m))},className:"text-brand-600 hover:underline cursor-pointer",children:"Load state"}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{role:"button",tabIndex:0,onClick:T,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),T(m))},className:"text-brand-600 hover:underline cursor-pointer",children:"Load default"}),x&&e.jsx("span",{className:"text-amber-700 basis-full",children:"Couldn't find this element on the page. The story may have re-rendered or unmounted."})]}),t.needsReview&&e.jsx("div",{className:"mt-2 flex items-center gap-2 text-xs",children:u?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-emerald-100 text-emerald-800 font-semibold",children:"✓ Acknowledged"}),e.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),l(t.matchKey),na(t,c)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),m.target.click())},className:"text-slate-600 hover:text-slate-900 hover:underline cursor-pointer",children:"Un-acknowledge"})]}):e.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),p(t.matchKey),aa(t,c)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),m.target.click())},title:"Mark this finding as 'reviewed, not an issue.' It won't appear in future audits unless the content changes.",className:"px-2 py-0.5 border border-slate-300 bg-white text-slate-700 rounded hover:bg-slate-50 cursor-pointer",children:"Acknowledge as not an issue"})}),t.helpUrl&&e.jsx("a",{href:t.helpUrl,target:"_blank",rel:"noreferrer",onClick:m=>m.stopPropagation(),className:"text-xs text-brand-600 hover:underline mt-2 inline-block",children:"Learn more →"})]})}function sa(t){const s=[];return s.push(t.pseudoState==="default"?"default":`:${t.pseudoState}`),t.theme!=="light"&&s.push(t.theme),t.direction!=="ltr"&&s.push(t.direction),t.breakpoint.id!=="desktop"&&s.push(t.breakpoint.id),t.ariaVariation&&s.push(t.ariaVariation.id),s.join(" · ")}async function aa(t,s){await ss({componentId:t.componentId,matchKey:t.matchKey,ruleId:t.ruleId}),await Ot(t.componentId,s)}async function na(t,s){await ts(t.componentId,t.matchKey),await Ot(t.componentId,s)}async function Ot(t,s){const a=s.flatMap(n=>n.violations);try{const n=await W({type:"BASELINE_COMPARE",componentId:t,currentViolations:a});g.getState().setDelta(n.delta)}catch{}}function ra(){const t=Rt.breakpointPresets;return{pseudoState:"default",ariaVariation:null,theme:"light",direction:"ltr",breakpoint:t.find(a=>a.id==="desktop")??t[0]}}function Mt(t){if(t.ruleId!=="color-contrast"&&t.ruleId!=="color-contrast-enhanced")return null;const s=t.target.failureSummary||"",a=/contrast of (\d+(?:\.\d+)?)/i.exec(s),n=/Expected contrast ratio of (\d+(?:\.\d+)?):1/i.exec(s),r=/foreground color:\s*(#[0-9a-fA-F]+)/i.exec(s),i=/background color:\s*(#[0-9a-fA-F]+)/i.exec(s);return!a||!n?null:{ratio:parseFloat(a[1]),required:parseFloat(n[1]),fg:(r==null?void 0:r[1])??"#000000",bg:(i==null?void 0:i[1])??"#ffffff"}}function ia({violation:t}){const s=Mt(t);if(!s)return null;const a=s.ratio>=s.required;return e.jsxs("div",{className:"mt-2 flex items-center gap-2 text-[11px]",children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-6 rounded border border-slate-300",style:{background:s.bg,color:s.fg},title:`fg ${s.fg} on bg ${s.bg}`,children:"Aa"}),e.jsxs("span",{className:a?"text-green-700":"text-rose-700 font-medium",children:[s.ratio.toFixed(2)," : 1"]}),e.jsxs("span",{className:"text-slate-500",children:["needs ",s.required.toFixed(1)," : 1"]})]})}function oa({text:t}){return t?e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:"text-[11px] text-slate-500 cursor-pointer hover:text-slate-700",children:"Show failure detail"}),e.jsx("pre",{className:"text-[11px] text-slate-600 whitespace-pre-wrap mt-1 bg-slate-50 p-1.5 rounded",children:t})]}):null}function la({violation:t}){const s=ea(t);return s.length===0?null:e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:s.map(a=>e.jsx("span",{title:`${a.region} — ${a.blurb}`,className:"text-[10px] px-1.5 py-0.5 rounded bg-slate-100 text-slate-600 border border-slate-200",children:a.name},a.id))})}function ca({violation:t}){const s=Mt(t),[a,n]=f.useState({kind:"idle"});if(!s)return null;async function r(){n({kind:"loading"});try{const i=t.ruleId==="color-contrast-enhanced"?"AAA":"AA",o=await W({type:"AI_COLOR_SUGGEST_REQUEST",inputs:[{matchKey:t.matchKey,foreground:s.fg,background:s.bg,fontSize:16,fontWeight:400,targetLevel:i}]}),c=o.results.find(d=>d.matchKey===t.matchKey);n(c?{kind:"ready",suggestion:c}:{kind:"empty",reason:o.unavailableReason??"AI returned no suggestions for this contrast pair."})}catch(i){n({kind:"empty",reason:i instanceof Error?i.message:String(i)})}}return e.jsxs("div",{className:"mt-2",children:[a.kind==="idle"&&e.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),r()},className:"text-[11px] px-2 py-1 rounded border border-brand-300 bg-brand-50 text-brand-700 hover:bg-brand-100 font-medium",title:"Ask the configured AI for in-palette color replacements that pass WCAG contrast.",children:"✨ AI fix suggestions"}),a.kind==="loading"&&e.jsx("span",{className:"text-[11px] text-slate-500",children:"Asking AI for color suggestions…"}),a.kind==="empty"&&e.jsx("p",{className:"text-[11px] text-slate-500 bg-slate-50 border border-slate-200 rounded p-2",children:a.reason}),a.kind==="ready"&&e.jsxs("div",{className:"border border-brand-200 rounded bg-brand-50 p-2 space-y-2",children:[e.jsxs("p",{className:"text-[11px] text-brand-900 font-medium",children:["AI suggestions (",a.suggestion.suggestions.length,")"]}),e.jsx("ul",{className:"space-y-1.5",children:a.suggestion.suggestions.map((i,o)=>e.jsxs("li",{className:"flex items-start gap-2 text-[11px]",children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-6 rounded border border-slate-300 shrink-0",style:{background:i.background,color:i.foreground},title:`fg ${i.foreground} on bg ${i.background}`,children:"Aa"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-1.5",children:[e.jsx("code",{className:"font-mono",children:i.foreground}),e.jsx("span",{className:"text-slate-500",children:"on"}),e.jsx("code",{className:"font-mono",children:i.background}),e.jsxs("span",{className:"text-emerald-700 font-medium",children:[i.contrast.toFixed(2)," : 1"]})]}),i.rationale&&e.jsx("p",{className:"text-slate-600 mt-0.5",children:i.rationale})]})]},o))}),a.suggestion.reasoning&&e.jsx("p",{className:"text-[10px] text-slate-500 italic",children:a.suggestion.reasoning})]})]})}function da({ruleId:t}){const s=as(t);return s?e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:"text-[11px] text-emerald-700 cursor-pointer hover:text-emerald-900 font-medium",children:"How to fix"}),e.jsxs("div",{className:"mt-1 bg-emerald-50 border border-emerald-200 rounded p-2 space-y-2",children:[e.jsx("p",{className:"text-[11px] text-slate-700 leading-relaxed",children:s.summary}),s.snippet&&e.jsx("pre",{className:"text-[11px] text-slate-700 bg-white p-1.5 rounded border border-emerald-100 overflow-x-auto",children:e.jsx("code",{children:s.snippet})})]})]}):null}const ua=[{id:"contrast",label:"Color & contrast",axeRules:["color-contrast","color-contrast-enhanced","link-in-text-block"],igtWorkflowIds:["visual-indicators"]},{id:"alt-text",label:"Alt text",axeRules:["image-alt","input-image-alt","object-alt","svg-img-alt","area-alt","role-img-alt"],igtWorkflowIds:[]},{id:"forms",label:"Forms",axeRules:["label","select-name","aria-input-field-name","aria-toggle-field-name","form-field-multiple-labels","label-content-name-mismatch","autocomplete-valid","label-title-only"],igtWorkflowIds:["forms"]},{id:"keyboard",label:"Keyboard",axeRules:["nested-interactive","tabindex","frame-focusable-content","no-focusable-content","focus-order-semantics"],igtWorkflowIds:["keyboard","focus-management"]},{id:"tab-order",label:"Tab order",axeRules:[],igtWorkflowIds:[],verifiedByWorkflowIds:["keyboard"],heuristic:"tab-order"},{id:"screen-reader",label:"Screen reader / ARIA",axeRules:["aria-allowed-attr","aria-required-attr","aria-required-children","aria-required-parent","aria-roles","aria-valid-attr-value","aria-valid-attr","aria-hidden-body","aria-hidden-focus","button-name","input-button-name","link-name","frame-title","presentation-role-conflict","aria-allowed-role","aria-prohibited-attr","aria-text","aria-deprecated-role","aria-conditional-attr","aria-braille-equivalent","empty-button","empty-heading","empty-link"],igtWorkflowIds:["screen-reader"]},{id:"reading-order",label:"Reading order",axeRules:[],igtWorkflowIds:[],verifiedByWorkflowIds:["page-structure"],heuristic:"reading-order"},{id:"page-structure",label:"Page structure",axeRules:["heading-order","page-has-heading-one","landmark-one-main","landmark-no-duplicate-banner","landmark-no-duplicate-contentinfo","landmark-no-duplicate-main","region","bypass","empty-table-header","landmark-banner-is-top-level","landmark-complementary-is-top-level","landmark-contentinfo-is-top-level","landmark-main-is-top-level","landmark-unique"],igtWorkflowIds:["page-structure"]},{id:"other-manual",label:"Other manual checks",axeRules:[],igtWorkflowIds:["reflow","hover-focus-content","pointer","time-based","error-prevention","consistency"]}];function pa(t){const s=ua.map(i=>ha(i,t)),a=s.reduce((i,o)=>i+ma(o.letter),0)/Math.max(1,s.length),n=xa(Math.round(a)),r=s.filter(i=>i.letter==="D"||i.letter==="F");return{overallLetter:n,subGrades:s,warningAreas:r,isLawsuitRisk:r.length>0}}function ha(t,s){const a=new Set(t.axeRules),n=s.violations.filter(j=>a.has(j.ruleId)),r=s.manualRuns.filter(j=>t.igtWorkflowIds.includes(j.workflowId)),i=t.igtWorkflowIds.map(j=>s.workflows.find(k=>k.id===j)).filter(j=>j!=null);let o=i.length>0;for(const j of i){const k=r.find(E=>E.workflowId===j.id);if((k?Object.keys(k.steps).length:0)!==j.steps.length){o=!1;break}}const c=r.some(j=>Object.keys(j.steps).length>0),d=t.verifiedByWorkflowIds??[],p=s.manualRuns.filter(j=>d.includes(j.workflowId)),l=d.map(j=>s.workflows.find(k=>k.id===j)).filter(j=>j!=null);let u=d.length>0&&l.length===d.length;for(const j of l){const k=p.find(E=>E.workflowId===j.id);if((k?Object.keys(k.steps).length:0)!==j.steps.length){u=!1;break}}let h=null;if(u)for(const j of p)j.completedAt&&(h===null||j.completedAt>h)&&(h=j.completedAt);const x=t.heuristic==="tab-order"?s.heuristicCounts.tabOrder??0:t.heuristic==="reading-order"?s.heuristicCounts.readingOrder??0:0,b=d[0]??t.igtWorkflowIds[0]??null;if(u&&d.length>0)return{id:t.id,label:t.label,letter:"A",untested:!1,needsIgt:!1,igtCompleted:!0,verifiedByIgt:!0,verifiedAt:h,suppressedHeuristicCount:x,primaryVerifierWorkflowId:b,counts:{critical:0,serious:0,moderate:0,minor:0},caps:{cappedAtC:!1,cappedAtB:!1}};const w=t.axeRules.length>0||t.heuristic!=null,N=t.igtWorkflowIds.length>0;let T=!1;if(w&&N?T=!s.auditRan&&!c:w?T=!s.auditRan:N?T=!c:T=!0,T)return{id:t.id,label:t.label,letter:"F",untested:!0,needsIgt:N||d.length>0,igtCompleted:!1,verifiedByIgt:!1,verifiedAt:null,suppressedHeuristicCount:0,primaryVerifierWorkflowId:b,counts:{critical:0,serious:0,moderate:0,minor:0},caps:{cappedAtC:!1,cappedAtB:!1}};const m={critical:0,serious:0,moderate:0,minor:0};for(const j of ns(n))m[j.impact]++;m.serious+=x;for(const j of r){const k=i.find(S=>S.id===j.workflowId);if(k)for(const S of k.steps){const E=j.steps[S.id];(E==null?void 0:E.status)==="fail"&&(S.severity==="required"?m.serious++:m.moderate++)}}const v=m.critical>0,y=m.serious>0;let R;m.critical>=5?R="F":m.critical>=1?R="D":m.serious>=1?R="C":m.moderate>=1?R="B":R="A";const L=N&&!o||d.length>0&&!u;return{id:t.id,label:t.label,letter:R,untested:!1,needsIgt:L,igtCompleted:o,verifiedByIgt:!1,verifiedAt:null,suppressedHeuristicCount:0,primaryVerifierWorkflowId:b,counts:m,caps:{cappedAtC:v,cappedAtB:y}}}function ma(t){return t==="A"?4:t==="B"?3:t==="C"?2:t==="D"?1:0}function xa(t){return t>=4?"A":t>=3?"B":t>=2?"C":t>=1?"D":"F"}const ga={A:"bg-emerald-500",B:"bg-lime-500",C:"bg-yellow-500",D:"bg-orange-500",F:"bg-rose-600"},fa={A:"bg-emerald-500 text-white",B:"bg-lime-500 text-white",C:"bg-yellow-500 text-slate-900",D:"bg-orange-500 text-white",F:"bg-rose-600 text-white"};function ba({violations:t,componentId:s}){var E,V,I,F,O,H,M;const[a,n]=f.useState([]),[r,i]=f.useState([]),[o,c]=f.useState(new Set),[d,p]=f.useState(null),l=g($=>$.status),u=g($=>$.progress),h=g($=>$.freshThisSession),x=g($=>$.results),b=(E=x[0])==null?void 0:E.startedAt,w=((V=x[0])==null?void 0:V.pageUrl)??((I=x[0])==null?void 0:I.scope)??null;if(f.useEffect(()=>{if(!s){n([]);return}let $=!1;return chrome.storage.local.get("igtRuns").then(P=>{if($)return;const q=((P==null?void 0:P.igtRuns)??{})[s]??{};n(Object.values(q))}),()=>{$=!0}},[s]),f.useEffect(()=>{if(!w){i([]);return}let $=!1;return Xe(w).then(P=>{$||i(P)}),()=>{$=!0}},[w]),l==="running")return e.jsx(Sa,{current:u==null?void 0:u.current,total:u==null?void 0:u.total});const N=pa({violations:t,auditRan:x.length>0,manualRuns:a,workflows:B,heuristicCounts:{tabOrder:((O=(F=x[0])==null?void 0:F.tabOrderIssues)==null?void 0:O.length)??0,readingOrder:((M=(H=x[0])==null?void 0:H.readingOrderIssues)==null?void 0:M.length)??0}}),T=g($=>$.acknowledgedKeys),m=x.length>0?kt(x,{runs:a,workflows:B},"2.1","AA",T,r):void 0,v=x.length>0?rs(St({audits:x,igtRuns:a,workflows:B,acknowledgedMatchKeys:T,incompleteResolutions:r}),B):void 0,y=m?!m.canClaimConformance:!1,R=y&&N.overallLetter==="A"?"B":N.overallLetter;async function L($){var q;if(!w||!((q=m==null?void 0:m.inconclusiveReasons)!=null&&q[$]))return;const _=m.inconclusiveReasons[$].filter(U=>U.source==="axe-incomplete"&&U.elements&&U.elements.length>0);if(_.length!==0){c(U=>new Set(U).add($)),p(null);try{for(const U of _){const te=await G({type:"AI_RESOLVE_INCOMPLETE_REQUEST",ruleId:U.ruleOrStepId,pageUrl:U.pageUrl??w,wcagCriterion:$,elements:(U.elements??[]).map(C=>({selector:C.selector,failureSummary:C.failureSummary})),targetLevel:"AA"});if(te!=null&&te.unavailableReason){p(te.unavailableReason);break}}if(w){const U=await Xe(w);i(U)}}finally{c(U=>{const te=new Set(U);return te.delete($),te})}}}const j=(()=>{if(!y||N.overallLetter!=="A"||!m)return null;const $=m.untestedCriteria.length,P=m.inconclusiveCriteria.length,_=[];return $>0&&_.push(`${$} WCAG ${m.targetLevel} ${$===1?"criterion":"criteria"} still untested`),P>0&&_.push(`${P} WCAG ${m.targetLevel} ${P===1?"criterion":"criteria"} inconclusive`),`Capped at B — ${_.join(" + ")}. ${P>0?"Resolve axe-incomplete + IGT-skip items to claim conformance.":"Open Guided Tests to evaluate them."}`})();let k=0;for(const $ of B){const P=a.find(q=>q.workflowId===$.id);if(!P)continue;$.steps.every(q=>{const U=P.steps[q.id];return(U==null?void 0:U.status)==="pass"||(U==null?void 0:U.status)==="fail"||(U==null?void 0:U.status)==="skip"||(U==null?void 0:U.status)==="not-applicable"})&&k++}const S=t.length;return e.jsxs("div",{className:"border border-slate-200 rounded-lg bg-white overflow-hidden",children:[!h&&b&&e.jsx(Aa,{scannedAt:b}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:`flex items-center justify-center w-24 ${ga[R]} text-white shrink-0`,children:e.jsx("span",{className:"text-5xl font-bold leading-none",children:R})}),e.jsxs("div",{className:"flex-1 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-900",children:"Overall grade"}),e.jsxs("p",{className:"text-[11px] text-slate-600 leading-snug",children:["Mean of ",N.subGrades.length," verification areas below. Untested areas count as F until verified."]}),j&&e.jsx("p",{className:"text-[11px] text-amber-800 leading-snug mt-1 bg-amber-50 border border-amber-200 rounded px-2 py-1",children:j})]})]}),N.isLawsuitRisk&&e.jsx(ja,{areas:N.warningAreas}),e.jsx(wa,{grades:N.subGrades}),m&&e.jsx(va,{coverage:m,onResolveWithAi:L,resolving:o,resolveError:d}),v&&e.jsx(ya,{layers:v}),e.jsx(ka,{violationsRemaining:S,manualCompleted:k,manualTotal:B.length}),k>0||x.length>0?e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2 bg-slate-50",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Manual coverage (Guided Tests)"}),e.jsxs("div",{className:"text-[11px] text-slate-700 mb-1.5",children:[e.jsx("strong",{children:k})," of ",e.jsx("strong",{children:B.length})," workflows complete"]}),e.jsx("div",{className:"flex h-1 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-emerald-500",style:{width:`${k/B.length*100}%`}})})]}):null]})}function va({coverage:t,onResolveWithAi:s,resolving:a,resolveError:n}){const r=t.untestedCriteria.length+t.inconclusiveCriteria.length,[i,o]=f.useState(r>0&&r<=3),c=t.totalApplicable===0?0:Math.round(t.evaluated/t.totalApplicable*100),d=t.canClaimConformance,p=[];return t.untestedCriteria.length>0&&p.push({kind:"untested",ids:t.untestedCriteria}),t.inconclusiveCriteria.length>0&&p.push({kind:"inconclusive",ids:t.inconclusiveCriteria}),e.jsxs("div",{className:`border-t ${d?"border-emerald-200 bg-emerald-50":"border-amber-200 bg-amber-50"} px-3 py-2 text-[11px] leading-snug`,children:[e.jsxs("div",{className:`flex items-center justify-between gap-2 ${d?"text-emerald-900":"text-amber-900"}`,children:[e.jsxs("div",{children:[e.jsxs("span",{className:"font-semibold",children:["WCAG ",t.targetVersion," ",t.targetLevel," coverage:"," ",t.evaluated," of ",t.totalApplicable," criteria evaluated (",c,"%)"]}),d&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:["Every applicable criterion has been evaluated and either passes or is N/A. This audit can be presented as a conformance-claim for ",t.targetVersion," ",t.targetLevel," for the audited URL(s)."]}),!d&&e.jsxs("p",{className:"text-[11px] mt-0.5 font-semibold",children:["Cannot claim ",t.targetLevel," conformance — applicable criteria remain",t.untestedCriteria.length>0?" untested":"",t.untestedCriteria.length>0&&t.inconclusiveCriteria.length>0?" or":"",t.inconclusiveCriteria.length>0?" inconclusive":"","."]}),!d&&t.untestedCriteria.length>0&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:[e.jsxs("strong",{children:[t.untestedCriteria.length," untested"]})," ",t.untestedCriteria.length===1?"criterion":"criteria"," — mark Pass / Fail / N/A in Guided Tests below."]}),!d&&t.inconclusiveCriteria.length>0&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:[e.jsxs("strong",{children:[t.inconclusiveCriteria.length," inconclusive"]})," ",t.inconclusiveCriteria.length===1?"criterion":"criteria"," — axe couldn't fully determine OR an IGT step was skipped. Resolve before claiming conformance."]})]}),!d&&p.length>0&&e.jsx("button",{type:"button",onClick:()=>o(l=>!l),className:"text-[11px] underline shrink-0 self-start",children:i?"hide":"show list"})]}),i&&!d&&e.jsxs("div",{className:"mt-1.5 space-y-1.5",children:[p.map(l=>e.jsxs("div",{children:[e.jsxs("div",{className:"text-[10.5px] font-semibold uppercase tracking-wide text-amber-900",children:[l.kind==="untested"?"Untested":"Inconclusive"," (",l.ids.length,")"]}),e.jsx("ul",{className:"text-[10.5px] text-amber-900 space-y-1",children:l.ids.map(u=>{var w;const h=l.kind==="inconclusive"?(w=t.inconclusiveReasons)==null?void 0:w[u]:void 0,x=h==null?void 0:h.some(N=>N.source==="axe-incomplete"&&N.elements&&N.elements.length>0),b=(a==null?void 0:a.has(u))??!1;return e.jsxs("li",{className:"leading-snug",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2 flex-wrap",children:[e.jsxs("code",{className:"font-mono",children:["· ",u]}),l.kind==="inconclusive"&&x&&s&&e.jsx("button",{type:"button",disabled:b,onClick:()=>s(u),className:"text-[10px] px-1.5 py-0.5 border border-brand-400 text-brand-700 rounded hover:bg-brand-50 disabled:opacity-50",title:"Ask AI to determine pass/fail for the specific elements axe couldn't sample.",children:b?"Resolving…":"Resolve with AI →"})]}),h&&h.length>0?e.jsx("ul",{className:"ml-3 mt-0.5 space-y-0.5",children:h.map((N,T)=>e.jsxs("li",{className:"text-[10px] text-amber-800",children:[N.source==="axe-incomplete"&&e.jsxs(e.Fragment,{children:["axe rule ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," — "]}),N.source==="igt-skip"&&e.jsxs(e.Fragment,{children:["Guided Test step ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," skipped — "]}),N.source==="ai-uncertain"&&e.jsxs(e.Fragment,{children:["AI rule ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," — "]}),N.resolutionHint,N.elements&&N.elements.length>0&&e.jsxs("span",{className:"block ml-1 mt-0.5 text-[10px] text-amber-700",children:["on ",N.elements.length===1?"element":`${N.elements.length} elements`,":"," ",N.elements.slice(0,3).map((m,v)=>e.jsx("code",{className:"font-mono mr-1",children:m.selector},v)),N.elements.length>3&&e.jsxs("span",{children:["+",N.elements.length-3," more"]})]})]},T))}):l.kind==="inconclusive"&&e.jsx("p",{className:"ml-3 mt-0.5 text-[10px] text-amber-800 italic",children:"Re-run the audit to see the specific axe rule or Guided Test step responsible. (Cached data from a pre-rc.53 build doesn't carry the reason metadata.)"})]},u)})})]},l.kind)),n&&e.jsx("p",{className:"text-[10px] text-rose-700 bg-rose-50 border border-rose-200 rounded px-1.5 py-1 mt-1",children:n})]})]})}const nt={automation:{label:"Automation",hint:"axe-core rules — runs on every scan."},ai:{label:"AI judgment",hint:"wcagcheckr AI analyzers (alt-text, contrast, vision)."},human:{label:"Human verification",hint:"Independent Guided Tests — manual checks."}};function ya({layers:t}){const s=g(n=>n.setView),a=["automation","ai","human"];return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Evidence layers"}),e.jsx("ul",{className:"space-y-1",children:a.map(n=>{const r=t[n],i=r.coveredCriteria.length,o=r.blocked.length,c=r.unevaluated.length,d=r.cleared,p=i>0&&o===0&&c===0,l=p?"text-emerald-700":o>0?"text-rose-700":"text-amber-700";return e.jsxs("li",{className:"flex items-start gap-2 text-[11px]",children:[e.jsx("span",{className:`w-5 h-5 inline-flex items-center justify-center rounded text-[10px] font-bold shrink-0 ${p?"bg-emerald-500 text-white":o>0?"bg-rose-500 text-white":"bg-amber-500 text-white"}`,"aria-hidden":"true",children:p?"✓":o>0?"!":"?"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5 flex-wrap",children:[e.jsx("span",{className:"font-medium text-slate-800",children:nt[n].label}),e.jsx("span",{className:`font-mono text-[10px] ${l}`,children:i===0?"no coverage yet":`${d}/${i}`}),o>0&&e.jsxs("span",{className:"text-[10px] text-rose-700",children:["· ",o," blocked"]}),c>0&&e.jsxs("span",{className:"text-[10px] text-amber-700",children:["· ",c," pending"]})]}),e.jsx("p",{className:"text-[10px] text-slate-500 leading-snug",children:nt[n].hint}),n==="human"&&c>0&&e.jsx("button",{type:"button",onClick:()=>s("guided"),className:"text-[10px] text-brand-600 hover:underline mt-0.5",children:"Open Guided Tests →"})]})]},n)})})]})}function ja({areas:t}){const s=t.map(a=>a.label);return e.jsxs("div",{className:"border-t border-rose-200 bg-rose-50 px-3 py-2 text-[11px] text-rose-900 leading-snug",children:[e.jsx("p",{className:"font-semibold mb-0.5",children:"⚠ Not lawsuit-safe"}),e.jsx("p",{children:s.length===1?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s[0]})," scored ",t[0].letter,". Even a high overall grade doesn't help if one area is failing — demand-letter mills target the weakest link."]}):e.jsxs(e.Fragment,{children:[s.length," areas are at lawsuit-risk:"," ",s.map((a,n)=>e.jsxs("span",{children:[e.jsx("strong",{children:a}),n<s.length-1?", ":""]},a)),". Fix these before relying on the overall grade."]})})]})}function wa({grades:t}){const s=g(a=>a.setView);return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-2",children:"Verification areas"}),e.jsx("ul",{className:"grid grid-cols-1 gap-1.5",children:t.map(a=>e.jsxs("li",{className:"flex items-center gap-2 text-[11px]",children:[e.jsx("span",{className:`w-6 h-6 inline-flex items-center justify-center rounded text-xs font-bold ${fa[a.letter]}`,"aria-label":`Grade ${a.letter}`,children:a.letter}),e.jsx("span",{className:"font-medium text-slate-800 flex-1 min-w-0",children:a.label}),e.jsx(Na,{grade:a,onOpenGuided:()=>s("guided")})]},a.id))})]})}function Na({grade:t,onOpenGuided:s}){const a=n=>{if(!n)return"";const r=B.find(i=>i.id===n);return(r==null?void 0:r.name)??n};if(t.untested)return e.jsxs("span",{className:"text-slate-500 text-[10px] italic",children:["not graded —"," ",t.primaryVerifierWorkflowId?e.jsxs("button",{type:"button",onClick:s,className:"text-brand-600 hover:underline not-italic",children:["run ",a(t.primaryVerifierWorkflowId)," →"]}):"no data yet"]});if(t.verifiedByIgt){const n=t.verifiedAt?Pt(Date.now()-new Date(t.verifiedAt).getTime()):null;return e.jsxs("span",{className:"text-emerald-700 text-[10px]",title:t.suppressedHeuristicCount>0?`Heuristic flagged ${t.suppressedHeuristicCount} issue${t.suppressedHeuristicCount===1?"":"s"}, but you verified this area in Guided Tests — those are treated as noise unless you re-verify.`:"Verified via Guided Tests",children:["✓ verified",n?` ${n} ago`:""]})}return t.needsIgt?e.jsxs("button",{type:"button",onClick:s,className:"text-amber-700 hover:underline text-[10px]",title:"Verify this area by running the relevant Guided Tests workflow",children:["verify with ",a(t.primaryVerifierWorkflowId)," →"]}):t.counts.critical>0||t.counts.serious>0?e.jsxs("span",{className:"text-slate-500 text-[10px]",children:[t.counts.critical>0&&e.jsxs("span",{className:"text-rose-700",children:[t.counts.critical," critical"]}),t.counts.critical>0&&t.counts.serious>0&&" · ",t.counts.serious>0&&e.jsxs("span",{className:"text-orange-700",children:[t.counts.serious," serious"]})]}):e.jsx("span",{className:"text-emerald-700 text-[10px]",children:"clean"})}function ka({violationsRemaining:t,manualCompleted:s,manualTotal:a}){const n=g(o=>o.setView),r=[{done:t===0,label:t===0?"Automated checks pass":`Fix ${t} automated violation${t===1?"":"s"}`,action:void 0,tooltip:void 0},{done:s===a,label:`Run Guided Tests (${s}/${a} workflows complete)`,action:()=>n("guided"),tooltip:'12 separate workflows total. Click → pick a workflow → mark each step pass/fail/skip → "Back to workflows" → click again for the next. Repeat until 12/12.'},{done:!1,label:"Export AI fix prompt + complete manual checklist",action:()=>n("delta"),tooltip:`Switches to the Delta tab. Click the Export menu and pick "AI fix prompt" — markdown for ChatGPT/Claude/Copilot, with manual checklist for the WCAG criteria automation can't detect.`}],i=r.findIndex(o=>!o.done);return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2 bg-slate-50",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Path to full WCAG compliance"}),e.jsx("ol",{className:"space-y-1 text-[11px]",children:r.map((o,c)=>{const d=c===i,p=o.done;return e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:p?"font-mono text-emerald-700 shrink-0":d?"font-mono text-brand-600 font-semibold shrink-0":"font-mono text-slate-400 shrink-0","aria-hidden":"true",children:p?"✓":`${c+1}.`}),o.action?e.jsxs("button",{type:"button",onClick:o.action,title:o.tooltip,className:d?"text-brand-700 font-semibold underline-offset-2 hover:underline text-left leading-snug":"text-slate-600 underline-offset-2 hover:underline hover:text-slate-900 text-left leading-snug",children:[o.label," →"]}):e.jsx("span",{className:p?"text-slate-500 line-through leading-snug":d?"text-slate-900 font-medium leading-snug":"text-slate-500 leading-snug",children:o.label})]},c)})})]})}function Sa({current:t,total:s}){return e.jsxs("div",{role:"status","aria-live":"polite",className:"border border-slate-200 rounded-lg bg-white p-4 flex items-center gap-3",children:[e.jsx("span",{className:"inline-block w-5 h-5 border-2 border-brand-500 border-t-transparent rounded-full animate-spin motion-reduce:animate-none","aria-hidden":"true"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:"Scanning…"}),e.jsx("p",{className:"text-[11px] text-slate-500",children:typeof t=="number"&&typeof s=="number"?`State ${t} of ${s}. Grade will appear when the scan completes.`:"Grade will appear when the scan completes."})]})]})}function Aa({scannedAt:t}){const s=Date.now()-new Date(t).getTime();return e.jsxs("div",{className:"bg-amber-50 border-b border-amber-200 px-3 py-1.5 text-[11px] text-amber-900 flex items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",children:"↻"}),e.jsxs("span",{children:["Showing a previous scan (",Pt(s)," old). Re-scan to grade the current page state."]})]})}function Pt(t){const s=Math.floor(t/1e3);if(s<60)return"less than a minute";if(s<120)return"1 minute";if(s<3600)return`${Math.floor(s/60)} minutes`;if(s<7200)return"1 hour";if(s<86400)return`${Math.floor(s/3600)} hours`;const a=Math.floor(s/86400);return a===1?"1 day":`${a} days`}const Ge="dismissedFindings";function Te(t){try{const s=new URL(t);return`${s.origin}${s.pathname.replace(/\/+$/,"")}`}catch{return t}}function oe(t){return`reading-order::${t}`}function le(t){return`tab-order::${t}`}async function Ie(){try{const t=await chrome.storage.local.get(Ge),s=t==null?void 0:t[Ge];if(s&&typeof s=="object")return s}catch{}return{}}async function Ke(t){await chrome.storage.local.set({[Ge]:t})}async function Ee(t){return(await Ie())[Te(t)]??{}}async function Gt(t,s,a,n){const r=await Ie(),i=Te(t),o=r[i]??{};o[s]={reason:a,dismissedAt:new Date().toISOString(),snippet:n},r[i]=o,await Ke(r)}async function be(t,s){if(s.length===0)return;const a=await Ie(),n=Te(t),r=a[n]??{},i=new Date().toISOString();for(const o of s)r[o.key]={reason:o.reason,dismissedAt:i,snippet:o.snippet};a[n]=r,await Ke(a)}async function Vt(t,s){const a=await Ie(),n=Te(t),r=a[n];!r||!(s in r)||(delete r[s],Object.keys(r).length===0?delete a[n]:a[n]=r,await Ke(a))}const Ca=Object.freeze(Object.defineProperty({__proto__:null,addDismissal:Gt,addDismissals:be,dismissalKeyForReadingOrder:oe,dismissalKeyForTabOrder:le,getDismissalsForUrl:Ee,removeDismissal:Vt},Symbol.toStringTag,{value:"Module"}));function Wt(t){return[t.pseudoState,t.theme,t.direction,t.breakpoint.id].join(" · ")}function Bt(t){return`${He(t.ruleId,t.target.selector)}::${t.target.outerHTML.slice(0,64)}`}function Ra(t){const s=new Map;for(const a of t)for(const n of a.violations){const r=Bt(n),i=s.get(r);i?i.states.push(n.currentState):s.set(r,{representative:n,states:[n.currentState]})}return Array.from(s.values())}const rt={critical:0,serious:1,moderate:2,minor:3};function Ea(){var b,w,N,T;const t=g(m=>m.results),s=g(m=>m.componentId),a=g(m=>m.setView),n=((b=t[0])==null?void 0:b.pageUrl)??((w=t[0])==null?void 0:w.scope)??"",[r,i]=f.useState({}),[o,c]=f.useState(new Set);if(f.useEffect(()=>{if(!n)return;Ee(n).then(i);const m=()=>{document.visibilityState==="visible"&&n&&Ee(n).then(i)};return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[n]),f.useEffect(()=>{if(!s){c(new Set);return}let m=!1;const v=async()=>{const R=await chrome.storage.local.get("igtRuns");if(m)return;const j=((R==null?void 0:R.igtRuns)??{})[s]??{},k=new Set;for(const S of B){const E=j[S.id];E&&Object.keys(E.steps).length===S.steps.length&&k.add(S.id)}c(k)};v();const y=()=>{document.visibilityState==="visible"&&v()};return document.addEventListener("visibilitychange",y),()=>{m=!0,document.removeEventListener("visibilitychange",y)}},[s]),t.length===0)return e.jsx("div",{className:"p-4 text-center text-slate-500 text-sm",children:"No audit results yet. Pick an element to start."});const d=t.reduce((m,v)=>m+v.durationMs,0),p=t.reduce((m,v)=>m+v.violations.length,0),l=Ra(t);l.sort((m,v)=>{const y=rt[m.representative.impact]??99,R=rt[v.representative.impact]??99;return y!==R?y-R:v.states.length-m.states.length});const u=t.map(m=>Wt(m.state)).join(`
2
+ var Yt=Object.defineProperty;var Xt=(t,s,a)=>s in t?Yt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var Ye=(t,s,a)=>Xt(t,typeof s!="symbol"?s+"":s,a);import{R as xe,i as X,r as f,j as e,M as ce,C as Pe,l as Zt,o as We,t as Be,m as jt,s as wt,k as $e}from"./styles-CQEpK17b.js";import{_ as Ne}from"./preload-helper-D7HrI6pR.js";import{o as Y,r as W,s as G,c as Nt,b as Z,d as fe}from"./crash-reporter-Dc5lvxvY.js";import{g as es,a as K,u as ts,b as ss,c as as,d as ns,e as Xe,f as kt,l as rs,h as St,A as B,i as He,s as is,O as os,j as ls,k as cs,m as Ze,n as ds,o as At,p as us,q as ps,r as hs,t as ms,T as xs,v as gs,w as fs}from"./forensic-log-BhEDrPEy.js";import{B as _e,i as Ct,b as Rt,T as Et}from"./state-PELIq3oj.js";const et=t=>{let s;const a=new Set,n=(p,l)=>{const u=typeof p=="function"?p(s):p;if(!Object.is(u,s)){const h=s;s=l??(typeof u!="object"||u===null)?u:Object.assign({},s,u),a.forEach(x=>x(s,h))}},r=()=>s,c={setState:n,getState:r,getInitialState:()=>d,subscribe:p=>(a.add(p),()=>a.delete(p))},d=s=t(n,r,c);return c},bs=t=>t?et(t):et,vs=t=>t;function ys(t,s=vs){const a=xe.useSyncExternalStore(t.subscribe,xe.useCallback(()=>s(t.getState()),[t,s]),xe.useCallback(()=>s(t.getInitialState()),[t,s]));return xe.useDebugValue(a),a}const tt=t=>{const s=bs(t),a=n=>ys(s,n);return Object.assign(a,s),a},js=t=>t?tt(t):tt,g=js(t=>({status:"idle",progress:null,results:[],delta:null,componentId:null,errorMessage:null,freshThisSession:!1,baselineList:[],tier:"trial",trialDaysRemaining:null,seatsUsed:null,seatsTotal:null,planCode:null,licenseDaysRemaining:null,pastDue:!1,messages:[],unreadMessageCount:0,criticalUnacked:!1,view:"matrix",userMode:null,siteCrawlStatus:"idle",siteCrawlProgress:null,siteCrawlReport:null,siteCrawlError:null,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null,acknowledgedKeys:new Set,setStatus:s=>t({status:s}),startNewScan:()=>t({status:"running",results:[],delta:null,errorMessage:null,progress:null,componentId:null,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null}),setProgress:s=>t({progress:s}),setResults:(s,a,n)=>t({results:s,delta:a,componentId:n,status:"complete",errorMessage:null,freshThisSession:!0,aiProgress:null,pinnedMatchKey:null,pinnedFound:!0}),setDelta:s=>t({delta:s}),setError:s=>t({errorMessage:s,status:"failed"}),setBaselineList:s=>t({baselineList:s}),clearResults:()=>t({results:[],delta:null,componentId:null,errorMessage:null,progress:null,status:"idle",freshThisSession:!1,pinnedMatchKey:null,pinnedFound:!0,aiFailure:null,aiProgress:null}),setTier:(s,a)=>t({tier:s,trialDaysRemaining:(a==null?void 0:a.trialDaysRemaining)??null,seatsUsed:(a==null?void 0:a.seatsUsed)??null,seatsTotal:(a==null?void 0:a.seatsTotal)??null,planCode:(a==null?void 0:a.planCode)??null,licenseDaysRemaining:(a==null?void 0:a.licenseDaysRemaining)??null,pastDue:(a==null?void 0:a.pastDue)??!1}),setView:s=>t({view:s}),setUserMode:s=>t({userMode:s}),setSiteCrawlStatus:s=>t({siteCrawlStatus:s}),setSiteCrawlProgress:s=>t({siteCrawlProgress:s}),setSiteCrawlReport:s=>t({siteCrawlReport:s}),setSiteCrawlError:s=>t({siteCrawlError:s}),setPinned:(s,a=!0)=>t({pinnedMatchKey:s,pinnedFound:a}),setAiFailure:s=>t({aiFailure:s}),clearAiFailure:()=>t({aiFailure:null}),setAiProgress:s=>t({aiProgress:s}),setAcknowledgedKeys:s=>t({acknowledgedKeys:s}),markAcknowledged:s=>t(a=>({acknowledgedKeys:new Set(a.acknowledgedKeys).add(s)})),markUnacknowledged:s=>t(a=>{const n=new Set(a.acknowledgedKeys);return n.delete(s),{acknowledgedKeys:n}}),setMessages:(s,a,n)=>t({messages:s,unreadMessageCount:a,criticalUnacked:n}),applyMessageAck:(s,a)=>t(n=>{const r=n.messages.map(c=>c.id!==s?c:a==="seen"?{...c,seen:!0}:a==="dismissed"?{...c,dismissed:!0}:a==="acknowledged"?{...c,acknowledged:!0}:a==="clicked"?{...c,clicked:!0}:c).filter(c=>c.severity==="critical"?!c.acknowledged:!c.dismissed),i=r.filter(c=>!c.seen).length,o=r.some(c=>c.severity==="critical"&&!c.acknowledged);return{messages:r,unreadMessageCount:i,criticalUnacked:o}})})),ke="sidePanel:lastAudit";function ws(){const t=[];return t.push(Y("AUDIT_PROGRESS_EVENT",s=>{const a=g.getState().status==="running";g.getState().setProgress({current:s.current,total:s.total,currentState:s.currentState}),g.getState().setStatus("running"),a||X.polite(`Audit running, scanning ${s.total} state${s.total===1?"":"s"}.`)})),t.push(Y("AUDIT_COMPLETE_EVENT",s=>{var i;g.getState().setResults(s.results,s.delta,s.componentId);const a=s.results.reduce((o,c)=>o+c.violations.length,0),n=((i=s.delta)==null?void 0:i.newCount)??0,r=s.delta?`Audit complete. ${n} new violation${n===1?"":"s"} versus baseline.`:`Audit complete. ${a} violation${a===1?"":"s"} found across ${s.results.length} state${s.results.length===1?"":"s"}.`;X.polite(r),Ns({results:s.results,delta:s.delta,componentId:s.componentId})})),t.push(Y("AUDIT_FAILED_EVENT",s=>{g.getState().setError(s.error.message)})),t.push(Y("AI_AUGMENTATION_PROGRESS_EVENT",s=>{const a=g.getState().aiProgress;g.getState().setAiProgress({currentCheckLabel:s.currentCheckLabel,current:s.current,total:s.total,candidatesDone:s.candidatesDone,candidatesTotal:s.candidatesTotal}),a||X.polite(`AI augmentation running ${s.total} check${s.total===1?"":"s"}.`)})),t.push(Y("AI_AUGMENTATION_FAILED_EVENT",s=>{g.getState().setAiFailure({severity:s.severity,reason:s.reason,checksAttempted:s.checksAttempted,checksSucceeded:s.checksSucceeded,checksErrored:s.checksErrored,errorDetails:s.errorDetails})})),t.push(Y("SCORECARD_UPDATED_EVENT",()=>{Se()})),t.push(Y("LICENSE_CHANGED_EVENT",()=>{Tt()})),t.push(Y("SITE_CRAWL_PROGRESS_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("running"),a.setSiteCrawlProgress({current:s.current,total:s.total,url:s.url,lastViolations:s.violations}),s.status==="auditing"&&s.current===1&&X.polite(`Site crawl started, scanning up to ${s.total} pages.`)})),t.push(Y("SITE_CRAWL_COMPLETE_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("complete"),a.setSiteCrawlReport(s.report),a.setSiteCrawlProgress(null),X.polite(`Site crawl complete. Grade ${s.report.siteGrade}, ${s.report.totalUniqueViolations} unique violation${s.report.totalUniqueViolations===1?"":"s"}.`)})),t.push(Y("SITE_CRAWL_FAILED_EVENT",s=>{const a=g.getState();a.setSiteCrawlStatus("failed"),a.setSiteCrawlError(s.error.message),a.setSiteCrawlProgress(null),X.assertive(`Site crawl failed: ${s.error.message}`)})),()=>t.forEach(s=>s())}async function Ns(t){const s={...t,results:t.results.map(({screenshotDataUrl:a,...n})=>n)};try{await chrome.storage.local.set({[ke]:s})}catch(a){console.warn("[wire-messaging] persistLastAudit failed; results stay in-memory only",a)}}async function ks(){const s=(await chrome.storage.local.get(ke))[ke];s&&g.setState({results:s.results,delta:s.delta,componentId:s.componentId,status:"complete"})}async function Ss(){await chrome.storage.local.remove(ke)}async function ze(){g.getState().clearResults(),await Ss()}async function Se(){const t=await W({type:"BASELINE_LIST"});g.getState().setBaselineList(t.items)}async function Tt(t){const s=await W({type:"TIER_GET",forceRefresh:(t==null?void 0:t.forceRefresh)===!0});g.getState().setTier(s.tier,{trialDaysRemaining:s.trialDaysRemaining,seatsUsed:s.seatsUsed,seatsTotal:s.seatsTotal,planCode:s.planCode,licenseDaysRemaining:s.licenseDaysRemaining,pastDue:s.pastDue}),It()}async function It(){const{fetchMessages:t}=await Ne(async()=>{const{fetchMessages:n}=await Promise.resolve().then(()=>Ls);return{fetchMessages:n}},void 0),s=g.getState().userMode,a=await t(s);a&&g.getState().setMessages(a.messages,a.unreadCount,a.criticalUnacked)}async function As(){const s=(await W({type:"SETTINGS_GET",key:"userMode"})).data,a=s==="owner"||s==="dev"?s:null;g.getState().setUserMode(a)}function Cs(){return chrome.runtime.connect({name:"audit-keepalive"})}let Ae=null;async function Rs(){if(Ae===null)try{const t=await chrome.windows.getCurrent();typeof t.id=="number"&&(Ae=t.id)}catch{}}function $t(){if(Ae===null)return;const t=chrome.sidePanel;!t||typeof t.open!="function"||t.open({windowId:Ae}).catch(()=>{})}function se(t){$t(),G(t)}function Es({onClose:t}){const[s,a]=f.useState(""),[n,r]=f.useState(""),[i,o]=f.useState(!0),[c,d]=f.useState(""),[p,l]=f.useState(!1),[u,h]=f.useState(null);async function x(b){var w;if(b.preventDefault(),!(!s.trim()||!n.trim())){l(!0),h(null);try{const N=await W({type:"SUPPORT_MESSAGE_REQUEST",subject:s.trim(),body:n.trim(),includeContext:i,replyEmail:c.trim()||void 0});N.success?(h({ok:!0,msg:`Sent (ref: ${N.ticketRef??"n/a"})`}),setTimeout(t,1200)):h({ok:!1,msg:((w=N.error)==null?void 0:w.message)??"Failed to send"})}finally{l(!1)}}}return e.jsxs("form",{onSubmit:x,className:"space-y-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-subject",className:"block text-xs font-medium mb-1",children:"Subject"}),e.jsx("input",{id:"support-subject",type:"text",value:s,onChange:b=>a(b.target.value),required:!0,className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-body",className:"block text-xs font-medium mb-1",children:"Message"}),e.jsx("textarea",{id:"support-body",value:n,onChange:b=>r(b.target.value),required:!0,rows:6,className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-reply",className:"block text-xs font-medium mb-1",children:"Reply email (optional)"}),e.jsx("input",{id:"support-reply",type:"email",autoComplete:"email",value:c,onChange:b=>d(b.target.value),className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("label",{className:"flex items-start gap-2 text-xs",children:[e.jsx("input",{type:"checkbox",checked:i,onChange:b=>o(b.target.checked),className:"mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"Include extension version, browser platform, and license tier (no URLs, page content, or audit data is sent)."})]}),u&&e.jsx("p",{id:"support-form-result",role:u.ok?"status":"alert",className:`text-xs ${u.ok?"text-green-700":"text-red-700"}`,children:u.msg}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:t,className:"text-xs px-3 py-1 hover:bg-slate-100 rounded",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:p,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",children:p?"Sending…":"Send"})]})]})}function st({onClick:t,ariaLabel:s,title:a,children:n,className:r}){return e.jsx("button",{onClick:t,"aria-label":s,title:a??s,className:`inline-flex items-center justify-center min-w-[24px] min-h-[24px] text-xs text-slate-500 hover:text-slate-900 ${r??""}`,children:n})}const Ce=Nt("messages-client"),Ts="https://api.wcagcheckr.com",_t="wcagcheckr",Is=1e4;function $s(){try{return chrome.runtime.getManifest().version}catch{return"0.0.0"}}async function Lt(t,s){const a=await es();if(!a)throw new Error("no_license_token");const n={...(s==null?void 0:s.headers)??{},Authorization:`Bearer ${a}`,"X-Extension-Version":$s()};return s!=null&&s.userMode&&(n["X-User-Mode"]=s.userMode),fetch(`${Ts}${t}`,{...s,headers:n,signal:AbortSignal.timeout(Is)})}async function _s(t){try{const s=await Lt(`/v1/products/${_t}/messages`,{userMode:t??null});return s.ok?await s.json():(Ce.warn("fetchMessages http",s.status),null)}catch(s){return Ce.warn("fetchMessages failed",s),null}}async function ie(t,s){try{const a=await Lt(`/v1/products/${_t}/messages/${t}/ack`,{method:"POST",body:JSON.stringify({action:s}),headers:{"content-type":"application/json"}});return a.ok?!0:(Ce.warn("ackMessage http",a.status,"action",s),!1)}catch(a){return Ce.warn("ackMessage failed",a),!1}}const Ls=Object.freeze(Object.defineProperty({__proto__:null,ackMessage:ie,fetchMessages:_s},Symbol.toStringTag,{value:"Module"})),Us=["http:","https:"];function Ds(t){try{const s=new URL(t);return Us.includes(s.protocol)}catch{return!1}}function at(t){const s=[];let a=0,n=0;for(;a<t.length;){if(t[a]==="["){const i=t.indexOf("]",a+1);if(i!==-1&&t[i+1]==="("){const o=t.indexOf(")",i+2);if(o!==-1){const c=t.slice(a+1,i),d=t.slice(i+2,o);Ds(d)?s.push(e.jsx("a",{href:d,target:"_blank",rel:"noopener",className:"text-brand-700 underline",children:c},`l-${n++}`)):s.push(e.jsx(f.Fragment,{children:c},`l-${n++}`)),a=o+1;continue}}}if(t[a]==="*"&&t[a+1]==="*"){const i=t.indexOf("**",a+2);if(i!==-1){s.push(e.jsx("strong",{children:t.slice(a+2,i)},`b-${n++}`)),a=i+2;continue}}if(t[a]==="*"&&t[a+1]!=="*"){const i=t.indexOf("*",a+1);if(i!==-1&&t[i+1]!=="*"){s.push(e.jsx("em",{children:t.slice(a+1,i)},`i-${n++}`)),a=i+1;continue}}let r=a+1;for(;r<t.length&&t[r]!=="*"&&t[r]!=="[";)r++;s.push(e.jsx(f.Fragment,{children:t.slice(a,r)},`t-${n++}`)),a=r}return s}function Ut({source:t}){const s=t.split(/\r?\n/),a=[];let n=[],r=[],i=0;function o(){if(r.length===0)return;const d=r.join(" ");a.push(e.jsx("p",{className:"leading-snug",children:at(d)},`p-${i++}`)),r=[]}function c(){n.length!==0&&(a.push(e.jsx("ul",{className:"list-disc pl-5 space-y-0.5",children:n.map((d,p)=>e.jsx("li",{children:at(d)},p))},`u-${i++}`)),n=[])}for(const d of s){const p=d.trimEnd();if(p===""){o(),c();continue}const l=/^[-*]\s+(.*)$/.exec(p);if(l){o(),n.push(l[1]);continue}c(),r.push(p)}return o(),c(),e.jsx("div",{className:"space-y-1.5",children:a})}const Fs={info:"bg-blue-500",promo:"bg-purple-500",warning:"bg-amber-500",critical:"bg-rose-500"},Os={critical:"bg-rose-50 border-rose-200"};function Dt(){const t=g(h=>h.unreadMessageCount),s=g(h=>h.messages),a=g(h=>h.applyMessageAck),[n,r]=f.useState(!1),i=f.useRef(-1),[o,c]=f.useState(!1);f.useEffect(()=>{const h=s.filter(b=>!b.seen);if(h.length===0)return;const x=Math.max(...h.map(b=>b.id));if(x>i.current){i.current=x,c(!0);const b=setTimeout(()=>c(!1),1500);return()=>clearTimeout(b)}},[s]);async function d(){const h=s.filter(x=>!x.seen);if(h.length!==0)for(const x of h)a(x.id,"seen"),ie(x.id,"seen")}function p(){const h=!n;r(h),h&&d()}async function l(h){a(h.id,"dismissed"),await ie(h.id,"dismissed")}async function u(h){h.ctaUrl&&(a(h.id,"clicked"),ie(h.id,"clicked"),chrome.tabs.create({url:h.ctaUrl}).catch(()=>{window.open(h.ctaUrl,"_blank","noopener")}))}return e.jsxs("div",{className:"relative",children:[e.jsxs("button",{type:"button",onClick:p,"aria-label":t>0?`Notifications (${t} unread)`:"Notifications","aria-expanded":n,"aria-haspopup":"dialog",className:`relative grid place-items-center w-7 h-7 rounded text-slate-500 hover:bg-slate-100 hover:text-slate-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand-500 ${o?"animate-bell-pulse":""}`,title:t>0?`${t} new message${t===1?"":"s"}`:"No new messages",children:[e.jsx(Ms,{active:t>0}),t>0&&e.jsx("span",{"aria-hidden":"true",className:"absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-rose-500 ring-2 ring-white"})]}),n&&e.jsx(Ps,{messages:s,onClose:()=>r(!1),onDismiss:l,onCtaClick:u})]})}function Ms({active:t}){return e.jsx("svg",{viewBox:"0 0 20 20",width:"16",height:"16","aria-hidden":"true",fill:"currentColor",className:t?"text-rose-500":"",children:e.jsx("path",{d:"M10 2a5 5 0 00-5 5v3l-1.6 2.4a1 1 0 00.84 1.6h11.52a1 1 0 00.84-1.6L15 10V7a5 5 0 00-5-5zm-1.5 13a1.5 1.5 0 003 0h-3z"})})}function Ps({messages:t,onClose:s,onDismiss:a,onCtaClick:n}){const r=f.useRef(null);return f.useEffect(()=>{const i=c=>{r.current&&(r.current.contains(c.target)||s())},o=c=>{c.key==="Escape"&&s()};return document.addEventListener("mousedown",i),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",o)}},[s]),e.jsxs("div",{ref:r,role:"dialog","aria-label":"Notifications",className:"absolute right-0 top-full mt-1 w-80 max-h-[420px] overflow-y-auto bg-white border border-slate-200 rounded shadow-lg z-50 text-xs",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-slate-200",children:[e.jsx("span",{className:"font-medium",children:"Notifications"}),e.jsx("button",{type:"button",onClick:()=>{It()},className:"text-[11px] text-brand-700 hover:underline",children:"Refresh"})]}),t.length===0?e.jsx("div",{className:"p-4 text-center text-slate-500 text-[11px]",children:"No messages."}):e.jsx("ul",{className:"divide-y divide-slate-100",children:t.map(i=>e.jsx("li",{className:`p-3 ${i.seen?"":"bg-slate-50"}`,children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:`shrink-0 w-1 self-stretch rounded ${Fs[i.severity]}`,"aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"font-medium text-slate-800",children:i.title}),i.dismissible&&i.severity!=="critical"&&e.jsx("button",{type:"button",onClick:()=>a(i),"aria-label":"Dismiss message",className:"text-slate-400 hover:text-slate-700 shrink-0",children:"✕"})]}),e.jsx("div",{className:"mt-1 text-slate-700",children:e.jsx(Ut,{source:i.bodyMd})}),i.ctaLabel&&i.ctaUrl&&e.jsx("button",{type:"button",onClick:()=>n(i),className:"mt-2 text-[11px] px-2 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:i.ctaLabel}),e.jsx("div",{className:"mt-1 text-[10px] text-slate-400",children:new Date(i.createdAt).toLocaleString()})]})]})},i.id))})]})}function Ft(){const t=g(i=>i.messages),s=g(i=>i.applyMessageAck),a=t.find(i=>i.severity==="critical"&&!i.acknowledged);if(!a)return null;async function n(){s(a.id,"acknowledged"),await ie(a.id,"acknowledged")}async function r(){a.ctaUrl&&(s(a.id,"clicked"),ie(a.id,"clicked"),chrome.tabs.create({url:a.ctaUrl}).catch(()=>{}))}return e.jsxs("div",{role:"alert",className:`border-y ${Os.critical} px-3 py-2 text-xs flex items-start gap-2`,children:[e.jsx("span",{"aria-hidden":"true",className:"text-rose-600 text-sm leading-none mt-0.5",children:"⚠"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-rose-900",children:a.title}),e.jsx("div",{className:"mt-0.5 text-rose-900/90",children:e.jsx(Ut,{source:a.bodyMd})}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[a.ctaLabel&&a.ctaUrl&&e.jsx("button",{type:"button",onClick:r,className:"text-[11px] px-2 py-1 bg-rose-600 text-white rounded hover:bg-rose-700",children:a.ctaLabel}),e.jsx("button",{type:"button",onClick:n,className:"text-[11px] px-2 py-1 border border-rose-300 text-rose-800 rounded hover:bg-rose-100",children:"Acknowledge"})]})]})]})}const ue=["matrix","delta","activity","guided","flows","scorecard","crawl","forensic","compliance"];function Gs(t){if(!t)return null;try{return new URL(t).hostname}catch{return t}}function Vs(){var u,h;const t=g(x=>x.view),s=g(x=>x.setView),a=g(x=>x.setUserMode),n=g(x=>x.results),r=g(x=>x.status),[i,o]=f.useState(!1),c=((u=n[0])==null?void 0:u.pageUrl)??((h=n[0])==null?void 0:h.scope),d=Gs(c),p=n.length>0&&r!=="running";function l(){a("owner"),G({type:"SETTINGS_SET",key:"userMode",value:"owner"})}return e.jsxs("header",{className:"border-b border-slate-200 bg-white px-3 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-semibold text-sm leading-tight",children:"wcagcheckr"}),e.jsxs("p",{className:"text-[10px] text-slate-500 leading-tight font-mono",children:["v",chrome.runtime.getManifest().version]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:l,title:"Switch to the simplified site-owner view",className:"text-[11px] px-2 py-1 border border-slate-300 rounded text-slate-600 hover:bg-slate-50",children:"Owner mode"}),e.jsx(Dt,{}),e.jsx(st,{onClick:()=>void G({type:"OPEN_SETTINGS"}),ariaLabel:"Open settings",children:"⚙"}),e.jsx(st,{onClick:()=>o(!0),ariaLabel:"Send support message",children:"?"})]})]}),p&&d&&e.jsxs("div",{className:"flex items-center gap-2 mb-2 px-2 py-1 rounded bg-brand-50 border border-brand-200 text-[11px]",title:c??"",children:[e.jsx("span",{className:"text-slate-500 shrink-0",children:"Audit:"}),e.jsx("span",{className:"font-mono font-medium text-slate-800 truncate flex-1","aria-label":`Showing audit results for ${d}`,children:d}),e.jsx("button",{type:"button",onClick:()=>void ze(),className:"shrink-0 text-[11px] px-2 py-0.5 rounded border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 hover:border-slate-400",title:"Clear these results so you can run a fresh audit",children:"Clear"})]}),e.jsx(Ws,{view:t,setView:s}),e.jsx(ce,{open:i,onClose:()=>o(!1),title:"Send support message",children:e.jsx(Es,{onClose:()=>o(!1)})})]})}function Ws({view:t,setView:s}){const a=f.useRef([]);function n(i){var d;const o=(i+ue.length)%ue.length,c=ue[o];c&&(s(c),(d=a.current[o])==null||d.focus())}function r(i,o){switch(i.key){case"ArrowRight":i.preventDefault(),n(o+1);break;case"ArrowLeft":i.preventDefault(),n(o-1);break;case"Home":i.preventDefault(),n(0);break;case"End":i.preventDefault(),n(ue.length-1);break}}return e.jsx("nav",{className:"flex flex-wrap gap-1","aria-label":"Audit views",role:"tablist",children:ue.map((i,o)=>{const c=t===i;return e.jsx("button",{ref:d=>{a.current[o]=d},role:"tab","aria-selected":c,tabIndex:c?0:-1,onClick:()=>s(i),onKeyDown:d=>r(d,o),className:c?"text-xs px-3 py-1 rounded bg-brand-500 text-white":"text-xs px-3 py-1 rounded text-slate-600 hover:bg-slate-100",children:i[0].toUpperCase()+i.slice(1)},i)})})}function Bs({feature:t,upgradeUrl:s}){const[a,n]=f.useState(!1);return e.jsxs("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded",children:[e.jsxs("p",{className:"text-xs text-amber-900 mb-2",children:[e.jsx("strong",{children:t})," requires a higher tier."]}),e.jsx("button",{type:"button",onClick:()=>n(!0),className:"text-xs text-brand-600 hover:underline font-medium",children:"Upgrade →"}),e.jsx(Pe,{open:a,onClose:()=>n(!1)})]})}const Hs="https://wcagcheckr.com/upgrade";function zs(){const[t,s]=f.useState("single-element"),[a,n]=f.useState(!1),[r,i]=f.useState(null),[o,c]=f.useState(null),[d,p]=f.useState(_e),[l,u]=f.useState(_e[0].id),h=g(S=>S.status),x=g(S=>S.tier),b=g(S=>S.results.length>0),w=h==="running";f.useEffect(()=>{Promise.all([W({type:"SETTINGS_GET",key:"matrixPresets"}),W({type:"SETTINGS_GET",key:"activePresetId"})]).then(([S,E])=>{const V=Array.isArray(S.data)?S.data:null;p(V&&V.length>0?V:_e),typeof E.data=="string"&&u(E.data)})},[]);function N(S){const E=d.find(V=>V.id===S);E&&(u(S),G({type:"SETTINGS_SET",key:"activePresetId",value:S}),G({type:"SETTINGS_SET",key:"stateMatrix",value:E.matrix}))}const T=Ct(x,"storybookAutoIterate");f.useEffect(()=>{const S=Y("ELEMENT_PICKED_EVENT",(V,I)=>{n(!1);const F=I.frameId;k(F),i({selector:V.selector,frameId:F})}),E=Y("PICKER_CANCELLED_EVENT",()=>n(!1));return()=>{S(),E()}},[]);async function m(){const S=await K();S&&(n(!0),await Z(S,{type:"PICKER_ACTIVATE_REQUEST",tabId:S}))}function v(){r&&(k(r.frameId),se({type:"START_AUDIT",mode:"single-element",scope:r.selector,frameId:r.frameId}),g.getState().startNewScan())}function y(){if(!T){c("storybook:auto-iterate");return}k(),se({type:"START_AUDIT",mode:"storybook-all"}),g.getState().startNewScan()}function R(){k(),se({type:"START_AUDIT",mode:"all-frames"}),g.getState().startNewScan()}function L(){k(),se({type:"START_AUDIT",mode:"full-page"}),g.getState().startNewScan()}function j(){G({type:"CANCEL_AUDIT"})}async function k(S){g.getState().setPinned(null);const E=await K();if(E)try{await Z(E,{type:"HIGHLIGHT_CLEAR_REQUEST",tabId:E},S)}catch{}}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-3 py-2 border-b border-slate-200 bg-white space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("select",{"aria-label":"Audit mode",value:t,onChange:S=>s(S.target.value),disabled:w||a,className:"text-xs border border-slate-300 rounded px-2 py-1",children:[e.jsx("option",{value:"single-element",children:"Single element"}),e.jsx("option",{value:"full-page",children:"Full page"}),e.jsx("option",{value:"all-frames",children:"All iframes"}),e.jsxs("option",{value:"storybook-all",children:["All stories (Storybook / Ladle)",T?"":" (paid)"]})]}),e.jsx("select",{"aria-label":"State-matrix preset",value:l,onChange:S=>N(S.target.value),disabled:w||a,title:"Switch the state-matrix preset used for the next audit",className:"text-xs border border-slate-300 rounded px-2 py-1",children:d.map(S=>e.jsx("option",{value:S.id,children:S.name},S.id))}),t==="single-element"?e.jsx(Ks,{picking:a,picked:r,isRunning:w,onPick:m,onRun:v,onClearPick:()=>i(null)}):t==="full-page"?e.jsx("button",{onClick:L,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Scan page"}):t==="all-frames"?e.jsx("button",{onClick:R,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Audit all iframes"}):e.jsx("button",{onClick:y,disabled:w,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50",children:w?"Auditing…":"Audit all stories"}),w&&e.jsx("button",{onClick:j,className:"text-xs px-3 py-1 border border-slate-300 text-slate-700 rounded hover:bg-slate-100",children:"Stop"}),!w&&b&&e.jsx("button",{type:"button",onClick:()=>void ze(),className:"text-xs text-slate-500 hover:text-slate-800 hover:underline ml-auto",title:"Clear current results",children:"Clear"})]}),t==="single-element"&&r&&!a&&!w&&e.jsx(qs,{selector:r.selector,onRepick:m,onClear:()=>i(null)})]}),e.jsx(ce,{open:o!==null,onClose:()=>c(null),title:"Upgrade to continue",children:e.jsx(Bs,{feature:o??"",upgradeUrl:Hs})})]})}function Ks({picking:t,picked:s,isRunning:a,onPick:n,onRun:r,onClearPick:i}){return a?e.jsx("button",{disabled:!0,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded opacity-50",children:"Auditing…"}):t?e.jsx("button",{disabled:!0,className:"text-xs px-3 py-1 bg-brand-400 text-white rounded",children:"Click an element on the page"}):s?e.jsx("button",{onClick:r,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Run audit"}):e.jsx("button",{onClick:n,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Pick element"})}function qs({selector:t,onRepick:s,onClear:a}){return e.jsxs("div",{className:"text-[11px] text-slate-600 flex items-center gap-2 flex-wrap",children:[e.jsx("span",{children:"Selected:"}),e.jsx("code",{className:"font-mono bg-slate-100 px-1.5 py-0.5 rounded text-slate-700 truncate max-w-[180px]",title:t,children:t}),e.jsx("button",{type:"button",onClick:s,className:"text-brand-600 hover:underline",children:"Re-pick"}),e.jsx("span",{"aria-hidden":"true",className:"text-slate-300",children:"·"}),e.jsx("button",{type:"button",onClick:a,className:"text-slate-500 hover:text-slate-700 hover:underline",children:"Clear"})]})}const Qs={outline:"OUTLINE_HIDE_REQUEST","tab-order":"TAB_ORDER_HIDE_REQUEST","reading-order":"READING_ORDER_HIDE_REQUEST","target-size":"TARGET_SIZE_HIDE_REQUEST"},Js={outline:"OUTLINE_SHOW_REQUEST","tab-order":"TAB_ORDER_SHOW_REQUEST","reading-order":"READING_ORDER_SHOW_REQUEST","target-size":"TARGET_SIZE_SHOW_REQUEST"};function Ys(){const[t,s]=f.useState(null),[a,n]=f.useState(!1),[r,i]=f.useState(null),[o,c]=f.useState("off"),p=g(x=>x.results).flatMap(x=>x.violations);async function l(x){const b=await K();b&&(c(x),x==="off"?await Z(b,{type:"VISION_SIMULATOR_CLEAR",tabId:b}).catch(()=>{}):await Z(b,{type:"VISION_SIMULATOR_APPLY",tabId:b,mode:x}).catch(()=>{}))}async function u(x){const b=await K();if(b){if(t&&await Z(b,{type:Qs[t],tabId:b}).catch(()=>{}),t===x){s(null);return}await Z(b,{type:Js[x],tabId:b}).catch(()=>{}),s(x)}}async function h(){const x=await K();if(x){if(a){await Z(x,{type:"FIX_PREVIEW_HIDE_REQUEST",tabId:x}).catch(()=>{}),n(!1),i(null);return}if(p.length===0){i("Run an audit first.");return}try{const b=await fe(x,{type:"FIX_PREVIEW_SHOW_REQUEST",tabId:x,violations:p});n(!0),i(`Previewing ${b.visualFixCount} visual fix${b.visualFixCount===1?"":"es"} + ${b.annotationCount} annotation${b.annotationCount===1?"":"s"}.`)}catch{i("Preview failed.")}}}return e.jsxs("div",{className:"px-3 py-2 border-b border-slate-200 bg-white flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-[11px] uppercase tracking-wide text-slate-500 mr-1",title:"Page overlays — these draw information on the live page. They do NOT change what the audit detects.",children:"Visualizers"}),e.jsx(pe,{label:"Outline",title:"Show heading + landmark structure overlay",on:t==="outline",onClick:()=>u("outline")}),e.jsx(pe,{label:"Tab order",title:"Number focusables in tab sequence. Red = tab order doesn't follow visual layout (focus jumps around). Amber = positive tabindex reordered the DOM sequence.",on:t==="tab-order",onClick:()=>u("tab-order")}),e.jsx(pe,{label:"Reading order",title:"Number content in DOM order (what a screen reader reads). Red = element's DOM position differs from its visual position; badge shows DOM→Visual.",on:t==="reading-order",onClick:()=>u("reading-order")}),e.jsx(pe,{label:"Targets",title:"Show interactive-element dimensions vs WCAG 2.5.8 (24px AA) / 2.5.5 (44px AAA)",on:t==="target-size",onClick:()=>u("target-size")}),e.jsx("span",{className:"w-px h-4 bg-slate-200 mx-1","aria-hidden":"true"}),e.jsx(pe,{label:"Preview fixes ✨",title:"Apply contrast/target-size/focus-ring fixes to the live page + annotate where labels and alt text are missing. Toggle off to revert.",on:a,onClick:h}),e.jsx("span",{className:"w-px h-4 bg-slate-200 mx-1","aria-hidden":"true"}),e.jsxs("label",{className:"text-[11px] text-slate-700 flex items-center gap-1.5",children:[e.jsx("span",{title:"Apply a CSS filter that simulates how the page looks for users with color-vision or low-vision impairments. Visual only — does NOT change what the audit detects.",children:"Vision sim:"}),e.jsxs("select",{"aria-label":"Vision-impairment simulator",value:o,onChange:x=>void l(x.target.value),className:`text-xs border rounded px-1.5 py-0.5 ${o==="off"?"border-slate-300 bg-white text-slate-700":"border-brand-500 bg-brand-50 text-brand-700 font-medium"}`,children:[e.jsx("option",{value:"off",children:"Off"}),e.jsxs("optgroup",{label:"Color blindness",children:[e.jsx("option",{value:"deuteranomaly",children:"Deuteranomaly (green-weak — most common)"}),e.jsx("option",{value:"deuteranopia",children:"Deuteranopia (green-blind)"}),e.jsx("option",{value:"protanomaly",children:"Protanomaly (red-weak)"}),e.jsx("option",{value:"protanopia",children:"Protanopia (red-blind)"}),e.jsx("option",{value:"tritanomaly",children:"Tritanomaly (blue-weak)"}),e.jsx("option",{value:"tritanopia",children:"Tritanopia (blue-blind)"}),e.jsx("option",{value:"achromatomaly",children:"Achromatomaly (partial color blindness)"}),e.jsx("option",{value:"achromatopsia",children:"Achromatopsia (no color)"})]}),e.jsxs("optgroup",{label:"Low vision",children:[e.jsx("option",{value:"cataract",children:"Cataract (blur)"}),e.jsx("option",{value:"low-contrast",children:"Low contrast sensitivity"}),e.jsx("option",{value:"glaucoma",children:"Glaucoma (tunnel vision)"}),e.jsx("option",{value:"macular",children:"Macular degeneration (central loss)"})]})]})]}),r&&e.jsx("span",{className:"text-[11px] text-slate-500 basis-full",children:r})]})}function pe({label:t,title:s,on:a,onClick:n}){return e.jsx("button",{type:"button",title:s,"aria-pressed":a,onClick:n,className:`text-xs px-2 py-1 rounded border transition-colors ${a?"bg-brand-500 text-white border-brand-500 hover:bg-brand-600":"bg-white text-slate-700 border-slate-300 hover:bg-slate-50"}`,children:t})}function Xs(t){if(!t)return"";const s=[t.pseudoState];return t.theme!=="light"&&s.push(t.theme),t.direction!=="ltr"&&s.push(t.direction),s.join(" · ")}function Zs(){const t=g(p=>p.status),s=g(p=>p.progress),a=g(p=>p.aiProgress);if(t!=="running"||!s)return null;const n=a!=null,r=!n&&s.current>=s.total,i=n?a.current/a.total*100:s.current/s.total*100,o=n?a.current:s.current,c=n?a.total:s.total,d=n?`AI augmentation: ${a.current} of ${a.total} checks. ${a.currentCheckLabel}`:r?"Running deep analyzers: reading order, tab order, typography, custom properties, AI candidates.":`Audit progress: ${s.current} of ${s.total} states`;return e.jsxs("div",{className:"px-3 py-2 bg-slate-100 border-b border-slate-200",children:[e.jsxs("div",{className:"flex justify-between items-center gap-2 text-xs text-slate-600 mb-1",children:[e.jsx("span",{children:n?e.jsxs(e.Fragment,{children:["AI augmentation… ",a.current,"/",a.total]}):r?e.jsx(e.Fragment,{children:"Running deep analyzers…"}):e.jsxs(e.Fragment,{children:["Auditing… ",s.current,"/",s.total]})}),e.jsx("span",{className:"text-slate-500 truncate flex-1",children:n?a.candidatesTotal&&a.candidatesTotal>0?`${a.currentCheckLabel} (${a.candidatesDone??0}/${a.candidatesTotal})`:a.currentCheckLabel:r?"reading order · tab order · typography · CSS vars · AI candidates":Xs(s.currentState)}),e.jsx("button",{type:"button",onClick:()=>void G({type:"CANCEL_AUDIT"}),className:"text-[11px] px-2 py-0.5 border border-slate-400 bg-white text-slate-700 rounded hover:bg-slate-200 shrink-0",children:"Stop"})]}),e.jsx("div",{className:`h-1 rounded-full overflow-hidden ${n?"bg-violet-100":"bg-slate-200"}`,role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":c,"aria-label":d,children:e.jsx("div",{className:`h-full transition-all ${n?"bg-violet-500":"bg-brand-500"}`,style:{width:`${i}%`}})})]})}const he={"ada-iii":{id:"ada-iii",name:"ADA Title III",region:"US",blurb:"US civil-rights law; courts treat WCAG 2.1 AA as the de facto digital standard."},508:{id:"508",name:"Section 508",region:"US federal",blurb:"US federal procurement requirement; references WCAG 2.0 AA via 36 CFR Part 1194."},eaa:{id:"eaa",name:"EAA",region:"EU",blurb:"European Accessibility Act, in force 2025-06-28; references EN 301 549 → WCAG 2.1 AA."},"en-301-549":{id:"en-301-549",name:"EN 301 549",region:"EU",blurb:"European harmonized accessibility standard, baseline WCAG 2.1 AA."},aoda:{id:"aoda",name:"AODA",region:"Ontario",blurb:"Accessibility for Ontarians with Disabilities Act; WCAG 2.0 AA required since 2021."}};function ea(t){return/^wcag\d/.test(t.wcagCriterion)?[he["ada-iii"],he[508],he.eaa,he["en-301-549"],he.aoda]:[]}const ta={minor:"bg-blue-100 text-blue-700",moderate:"bg-yellow-100 text-yellow-700",serious:"bg-orange-100 text-orange-700",critical:"bg-red-100 text-red-700"};function Re({violation:t,alreadyAcknowledged:s}){const a=g(m=>m.pinnedMatchKey),n=g(m=>m.pinnedFound),r=g(m=>m.setPinned),i=g(m=>{var v;return(v=m.results[0])==null?void 0:v.frameId}),o=g(m=>{var v;return(v=m.results[0])==null?void 0:v.scope}),c=g(m=>m.results),d=g(m=>m.acknowledgedKeys.has(t.matchKey)),p=g(m=>m.markAcknowledged),l=g(m=>m.markUnacknowledged),u=s||d,h=a===t.matchKey,x=h&&!n;async function b(m){try{return(await fe(m,{type:"HIGHLIGHT_SHOW_REQUEST",tabId:m,selector:t.target.selector},i)).found}catch{return!0}}async function w(){const m=await K();if(!m)return;if(h){r(null);try{await Z(m,{type:"HIGHLIGHT_CLEAR_REQUEST",tabId:m},i)}catch{}return}const v=await b(m);r(t.matchKey,v)}function N(m){m.stopPropagation(),t.currentState.breakpoint.width<=640&&$t(),(async()=>{const v=await K();if(!v)return;try{await W({type:"STATE_DRIVE_REQUEST",tabId:v,state:t.currentState,scope:o,frameId:i})}catch{}const y=await b(v);r(t.matchKey,y)})()}async function T(m){m.stopPropagation();const v=await K();if(!v)return;try{await W({type:"STATE_DRIVE_REQUEST",tabId:v,state:ra(),scope:o,frameId:i})}catch{G({type:"STATE_RESET_REQUEST",tabId:v})}const y=await b(v);r(t.matchKey,y)}return e.jsxs("button",{type:"button",onClick:w,"aria-pressed":h,className:`w-full text-left border rounded p-2 bg-white block transition-shadow
3
+ ${h?"border-rose-400 ring-2 ring-rose-300":"border-slate-200 hover:border-slate-300"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-1 gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-medium text-xs truncate",children:t.ruleId}),e.jsxs("div",{className:"text-xs text-slate-500",children:[t.wcagCriterion," · ",t.wcagLevel]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t.flakyAcrossRuns&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-100 text-amber-700",title:"Did not appear in every audit run — likely a transient environment artifact",children:"flaky"}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${ta[t.impact]}`,children:t.impact})]})]}),e.jsx("p",{className:"text-xs text-slate-700 mb-2",children:t.description}),e.jsx("code",{className:"text-[11px] bg-slate-50 p-1.5 rounded block text-slate-600 font-mono whitespace-pre-wrap break-all",children:t.target.outerHTML}),e.jsx(ia,{violation:t}),e.jsx(ca,{violation:t}),e.jsx(la,{violation:t}),e.jsx(oa,{text:t.target.failureSummary}),e.jsx(da,{ruleId:t.ruleId}),h&&e.jsxs("div",{className:"text-[11px] text-slate-600 mt-2 flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsxs("span",{children:["State: ",sa(t.currentState)]}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{role:"button",tabIndex:0,onClick:N,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),N(m))},className:"text-brand-600 hover:underline cursor-pointer",children:"Load state"}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{role:"button",tabIndex:0,onClick:T,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),T(m))},className:"text-brand-600 hover:underline cursor-pointer",children:"Load default"}),x&&e.jsx("span",{className:"text-amber-700 basis-full",children:"Couldn't find this element on the page. The story may have re-rendered or unmounted."})]}),t.needsReview&&e.jsx("div",{className:"mt-2 flex items-center gap-2 text-xs",children:u?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-emerald-100 text-emerald-800 font-semibold",children:"✓ Acknowledged"}),e.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),l(t.matchKey),na(t,c)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),m.target.click())},className:"text-slate-600 hover:text-slate-900 hover:underline cursor-pointer",children:"Un-acknowledge"})]}):e.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),p(t.matchKey),aa(t,c)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),m.target.click())},title:"Mark this finding as 'reviewed, not an issue.' It won't appear in future audits unless the content changes.",className:"px-2 py-0.5 border border-slate-300 bg-white text-slate-700 rounded hover:bg-slate-50 cursor-pointer",children:"Acknowledge as not an issue"})}),t.helpUrl&&e.jsx("a",{href:t.helpUrl,target:"_blank",rel:"noreferrer",onClick:m=>m.stopPropagation(),className:"text-xs text-brand-600 hover:underline mt-2 inline-block",children:"Learn more →"})]})}function sa(t){const s=[];return s.push(t.pseudoState==="default"?"default":`:${t.pseudoState}`),t.theme!=="light"&&s.push(t.theme),t.direction!=="ltr"&&s.push(t.direction),t.breakpoint.id!=="desktop"&&s.push(t.breakpoint.id),t.ariaVariation&&s.push(t.ariaVariation.id),s.join(" · ")}async function aa(t,s){await ss({componentId:t.componentId,matchKey:t.matchKey,ruleId:t.ruleId}),await Ot(t.componentId,s)}async function na(t,s){await ts(t.componentId,t.matchKey),await Ot(t.componentId,s)}async function Ot(t,s){const a=s.flatMap(n=>n.violations);try{const n=await W({type:"BASELINE_COMPARE",componentId:t,currentViolations:a});g.getState().setDelta(n.delta)}catch{}}function ra(){const t=Rt.breakpointPresets;return{pseudoState:"default",ariaVariation:null,theme:"light",direction:"ltr",breakpoint:t.find(a=>a.id==="desktop")??t[0]}}function Mt(t){if(t.ruleId!=="color-contrast"&&t.ruleId!=="color-contrast-enhanced")return null;const s=t.target.failureSummary||"",a=/contrast of (\d+(?:\.\d+)?)/i.exec(s),n=/Expected contrast ratio of (\d+(?:\.\d+)?):1/i.exec(s),r=/foreground color:\s*(#[0-9a-fA-F]+)/i.exec(s),i=/background color:\s*(#[0-9a-fA-F]+)/i.exec(s);return!a||!n?null:{ratio:parseFloat(a[1]),required:parseFloat(n[1]),fg:(r==null?void 0:r[1])??"#000000",bg:(i==null?void 0:i[1])??"#ffffff"}}function ia({violation:t}){const s=Mt(t);if(!s)return null;const a=s.ratio>=s.required;return e.jsxs("div",{className:"mt-2 flex items-center gap-2 text-[11px]",children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-6 rounded border border-slate-300",style:{background:s.bg,color:s.fg},title:`fg ${s.fg} on bg ${s.bg}`,children:"Aa"}),e.jsxs("span",{className:a?"text-green-700":"text-rose-700 font-medium",children:[s.ratio.toFixed(2)," : 1"]}),e.jsxs("span",{className:"text-slate-500",children:["needs ",s.required.toFixed(1)," : 1"]})]})}function oa({text:t}){return t?e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:"text-[11px] text-slate-500 cursor-pointer hover:text-slate-700",children:"Show failure detail"}),e.jsx("pre",{className:"text-[11px] text-slate-600 whitespace-pre-wrap mt-1 bg-slate-50 p-1.5 rounded",children:t})]}):null}function la({violation:t}){const s=ea(t);return s.length===0?null:e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:s.map(a=>e.jsx("span",{title:`${a.region} — ${a.blurb}`,className:"text-[10px] px-1.5 py-0.5 rounded bg-slate-100 text-slate-600 border border-slate-200",children:a.name},a.id))})}function ca({violation:t}){const s=Mt(t),[a,n]=f.useState({kind:"idle"});if(!s)return null;async function r(){n({kind:"loading"});try{const i=t.ruleId==="color-contrast-enhanced"?"AAA":"AA",o=await W({type:"AI_COLOR_SUGGEST_REQUEST",inputs:[{matchKey:t.matchKey,foreground:s.fg,background:s.bg,fontSize:16,fontWeight:400,targetLevel:i}]}),c=o.results.find(d=>d.matchKey===t.matchKey);n(c?{kind:"ready",suggestion:c}:{kind:"empty",reason:o.unavailableReason??"AI returned no suggestions for this contrast pair."})}catch(i){n({kind:"empty",reason:i instanceof Error?i.message:String(i)})}}return e.jsxs("div",{className:"mt-2",children:[a.kind==="idle"&&e.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),r()},className:"text-[11px] px-2 py-1 rounded border border-brand-300 bg-brand-50 text-brand-700 hover:bg-brand-100 font-medium",title:"Ask the configured AI for in-palette color replacements that pass WCAG contrast.",children:"✨ AI fix suggestions"}),a.kind==="loading"&&e.jsx("span",{className:"text-[11px] text-slate-500",children:"Asking AI for color suggestions…"}),a.kind==="empty"&&e.jsx("p",{className:"text-[11px] text-slate-500 bg-slate-50 border border-slate-200 rounded p-2",children:a.reason}),a.kind==="ready"&&e.jsxs("div",{className:"border border-brand-200 rounded bg-brand-50 p-2 space-y-2",children:[e.jsxs("p",{className:"text-[11px] text-brand-900 font-medium",children:["AI suggestions (",a.suggestion.suggestions.length,")"]}),e.jsx("ul",{className:"space-y-1.5",children:a.suggestion.suggestions.map((i,o)=>e.jsxs("li",{className:"flex items-start gap-2 text-[11px]",children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-6 rounded border border-slate-300 shrink-0",style:{background:i.background,color:i.foreground},title:`fg ${i.foreground} on bg ${i.background}`,children:"Aa"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-1.5",children:[e.jsx("code",{className:"font-mono",children:i.foreground}),e.jsx("span",{className:"text-slate-500",children:"on"}),e.jsx("code",{className:"font-mono",children:i.background}),e.jsxs("span",{className:"text-emerald-700 font-medium",children:[i.contrast.toFixed(2)," : 1"]})]}),i.rationale&&e.jsx("p",{className:"text-slate-600 mt-0.5",children:i.rationale})]})]},o))}),a.suggestion.reasoning&&e.jsx("p",{className:"text-[10px] text-slate-500 italic",children:a.suggestion.reasoning})]})]})}function da({ruleId:t}){const s=as(t);return s?e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:"text-[11px] text-emerald-700 cursor-pointer hover:text-emerald-900 font-medium",children:"How to fix"}),e.jsxs("div",{className:"mt-1 bg-emerald-50 border border-emerald-200 rounded p-2 space-y-2",children:[e.jsx("p",{className:"text-[11px] text-slate-700 leading-relaxed",children:s.summary}),s.snippet&&e.jsx("pre",{className:"text-[11px] text-slate-700 bg-white p-1.5 rounded border border-emerald-100 overflow-x-auto",children:e.jsx("code",{children:s.snippet})})]})]}):null}const ua=[{id:"contrast",label:"Color & contrast",axeRules:["color-contrast","color-contrast-enhanced","link-in-text-block"],igtWorkflowIds:["visual-indicators"]},{id:"alt-text",label:"Alt text",axeRules:["image-alt","input-image-alt","object-alt","svg-img-alt","area-alt","role-img-alt"],igtWorkflowIds:[]},{id:"forms",label:"Forms",axeRules:["label","select-name","aria-input-field-name","aria-toggle-field-name","form-field-multiple-labels","label-content-name-mismatch","autocomplete-valid","label-title-only"],igtWorkflowIds:["forms"]},{id:"keyboard",label:"Keyboard",axeRules:["nested-interactive","tabindex","frame-focusable-content","no-focusable-content","focus-order-semantics"],igtWorkflowIds:["keyboard","focus-management"]},{id:"tab-order",label:"Tab order",axeRules:[],igtWorkflowIds:[],verifiedByWorkflowIds:["keyboard"],heuristic:"tab-order"},{id:"screen-reader",label:"Screen reader / ARIA",axeRules:["aria-allowed-attr","aria-required-attr","aria-required-children","aria-required-parent","aria-roles","aria-valid-attr-value","aria-valid-attr","aria-hidden-body","aria-hidden-focus","button-name","input-button-name","link-name","frame-title","presentation-role-conflict","aria-allowed-role","aria-prohibited-attr","aria-text","aria-deprecated-role","aria-conditional-attr","aria-braille-equivalent","empty-button","empty-heading","empty-link"],igtWorkflowIds:["screen-reader"]},{id:"reading-order",label:"Reading order",axeRules:[],igtWorkflowIds:[],verifiedByWorkflowIds:["page-structure"],heuristic:"reading-order"},{id:"page-structure",label:"Page structure",axeRules:["heading-order","page-has-heading-one","landmark-one-main","landmark-no-duplicate-banner","landmark-no-duplicate-contentinfo","landmark-no-duplicate-main","region","bypass","empty-table-header","landmark-banner-is-top-level","landmark-complementary-is-top-level","landmark-contentinfo-is-top-level","landmark-main-is-top-level","landmark-unique"],igtWorkflowIds:["page-structure"]},{id:"other-manual",label:"Other manual checks",axeRules:[],igtWorkflowIds:["reflow","hover-focus-content","pointer","time-based","error-prevention","consistency"]}];function pa(t){const s=ua.map(i=>ha(i,t)),a=s.reduce((i,o)=>i+ma(o.letter),0)/Math.max(1,s.length),n=xa(Math.round(a)),r=s.filter(i=>i.letter==="D"||i.letter==="F");return{overallLetter:n,subGrades:s,warningAreas:r,isLawsuitRisk:r.length>0}}function ha(t,s){const a=new Set(t.axeRules),n=s.violations.filter(j=>a.has(j.ruleId)),r=s.manualRuns.filter(j=>t.igtWorkflowIds.includes(j.workflowId)),i=t.igtWorkflowIds.map(j=>s.workflows.find(k=>k.id===j)).filter(j=>j!=null);let o=i.length>0;for(const j of i){const k=r.find(E=>E.workflowId===j.id);if((k?Object.keys(k.steps).length:0)!==j.steps.length){o=!1;break}}const c=r.some(j=>Object.keys(j.steps).length>0),d=t.verifiedByWorkflowIds??[],p=s.manualRuns.filter(j=>d.includes(j.workflowId)),l=d.map(j=>s.workflows.find(k=>k.id===j)).filter(j=>j!=null);let u=d.length>0&&l.length===d.length;for(const j of l){const k=p.find(E=>E.workflowId===j.id);if((k?Object.keys(k.steps).length:0)!==j.steps.length){u=!1;break}}let h=null;if(u)for(const j of p)j.completedAt&&(h===null||j.completedAt>h)&&(h=j.completedAt);const x=t.heuristic==="tab-order"?s.heuristicCounts.tabOrder??0:t.heuristic==="reading-order"?s.heuristicCounts.readingOrder??0:0,b=d[0]??t.igtWorkflowIds[0]??null;if(u&&d.length>0)return{id:t.id,label:t.label,letter:"A",untested:!1,needsIgt:!1,igtCompleted:!0,verifiedByIgt:!0,verifiedAt:h,suppressedHeuristicCount:x,primaryVerifierWorkflowId:b,counts:{critical:0,serious:0,moderate:0,minor:0},caps:{cappedAtC:!1,cappedAtB:!1}};const w=t.axeRules.length>0||t.heuristic!=null,N=t.igtWorkflowIds.length>0;let T=!1;if(w&&N?T=!s.auditRan&&!c:w?T=!s.auditRan:N?T=!c:T=!0,T)return{id:t.id,label:t.label,letter:"F",untested:!0,needsIgt:N||d.length>0,igtCompleted:!1,verifiedByIgt:!1,verifiedAt:null,suppressedHeuristicCount:0,primaryVerifierWorkflowId:b,counts:{critical:0,serious:0,moderate:0,minor:0},caps:{cappedAtC:!1,cappedAtB:!1}};const m={critical:0,serious:0,moderate:0,minor:0};for(const j of ns(n))m[j.impact]++;m.serious+=x;for(const j of r){const k=i.find(S=>S.id===j.workflowId);if(k)for(const S of k.steps){const E=j.steps[S.id];(E==null?void 0:E.status)==="fail"&&(S.severity==="required"?m.serious++:m.moderate++)}}const v=m.critical>0,y=m.serious>0;let R;m.critical>=5?R="F":m.critical>=1?R="D":m.serious>=1?R="C":m.moderate>=1?R="B":R="A";const L=N&&!o||d.length>0&&!u;return{id:t.id,label:t.label,letter:R,untested:!1,needsIgt:L,igtCompleted:o,verifiedByIgt:!1,verifiedAt:null,suppressedHeuristicCount:0,primaryVerifierWorkflowId:b,counts:m,caps:{cappedAtC:v,cappedAtB:y}}}function ma(t){return t==="A"?4:t==="B"?3:t==="C"?2:t==="D"?1:0}function xa(t){return t>=4?"A":t>=3?"B":t>=2?"C":t>=1?"D":"F"}const ga={A:"bg-emerald-500",B:"bg-lime-500",C:"bg-yellow-500",D:"bg-orange-500",F:"bg-rose-600"},fa={A:"bg-emerald-500 text-white",B:"bg-lime-500 text-white",C:"bg-yellow-500 text-slate-900",D:"bg-orange-500 text-white",F:"bg-rose-600 text-white"};function ba({violations:t,componentId:s}){var E,V,I,F,O,H,M;const[a,n]=f.useState([]),[r,i]=f.useState([]),[o,c]=f.useState(new Set),[d,p]=f.useState(null),l=g($=>$.status),u=g($=>$.progress),h=g($=>$.freshThisSession),x=g($=>$.results),b=(E=x[0])==null?void 0:E.startedAt,w=((V=x[0])==null?void 0:V.pageUrl)??((I=x[0])==null?void 0:I.scope)??null;if(f.useEffect(()=>{if(!s){n([]);return}let $=!1;return chrome.storage.local.get("igtRuns").then(P=>{if($)return;const q=((P==null?void 0:P.igtRuns)??{})[s]??{};n(Object.values(q))}),()=>{$=!0}},[s]),f.useEffect(()=>{if(!w){i([]);return}let $=!1;return Xe(w).then(P=>{$||i(P)}),()=>{$=!0}},[w]),l==="running")return e.jsx(Sa,{current:u==null?void 0:u.current,total:u==null?void 0:u.total});const N=pa({violations:t,auditRan:x.length>0,manualRuns:a,workflows:B,heuristicCounts:{tabOrder:((O=(F=x[0])==null?void 0:F.tabOrderIssues)==null?void 0:O.length)??0,readingOrder:((M=(H=x[0])==null?void 0:H.readingOrderIssues)==null?void 0:M.length)??0}}),T=g($=>$.acknowledgedKeys),m=x.length>0?kt(x,{runs:a,workflows:B},"2.1","AA",T,r):void 0,v=x.length>0?rs(St({audits:x,igtRuns:a,workflows:B,acknowledgedMatchKeys:T,incompleteResolutions:r}),B):void 0,y=m?!m.canClaimConformance:!1,R=y&&N.overallLetter==="A"?"B":N.overallLetter;async function L($){var q;if(!w||!((q=m==null?void 0:m.inconclusiveReasons)!=null&&q[$]))return;const _=m.inconclusiveReasons[$].filter(U=>U.source==="axe-incomplete"&&U.elements&&U.elements.length>0);if(_.length!==0){c(U=>new Set(U).add($)),p(null);try{for(const U of _){const te=await G({type:"AI_RESOLVE_INCOMPLETE_REQUEST",ruleId:U.ruleOrStepId,pageUrl:U.pageUrl??w,wcagCriterion:$,elements:(U.elements??[]).map(C=>({selector:C.selector,failureSummary:C.failureSummary})),targetLevel:"AA"});if(te!=null&&te.unavailableReason){p(te.unavailableReason);break}}if(w){const U=await Xe(w);i(U)}}finally{c(U=>{const te=new Set(U);return te.delete($),te})}}}const j=(()=>{if(!y||N.overallLetter!=="A"||!m)return null;const $=m.untestedCriteria.length,P=m.inconclusiveCriteria.length,_=[];return $>0&&_.push(`${$} WCAG ${m.targetLevel} ${$===1?"criterion":"criteria"} still untested`),P>0&&_.push(`${P} WCAG ${m.targetLevel} ${P===1?"criterion":"criteria"} inconclusive`),`Capped at B — ${_.join(" + ")}. ${P>0?"Resolve axe-incomplete + IGT-skip items to claim conformance.":"Open Guided Tests to evaluate them."}`})();let k=0;for(const $ of B){const P=a.find(q=>q.workflowId===$.id);if(!P)continue;$.steps.every(q=>{const U=P.steps[q.id];return(U==null?void 0:U.status)==="pass"||(U==null?void 0:U.status)==="fail"||(U==null?void 0:U.status)==="skip"||(U==null?void 0:U.status)==="not-applicable"})&&k++}const S=t.length;return e.jsxs("div",{className:"border border-slate-200 rounded-lg bg-white overflow-hidden",children:[!h&&b&&e.jsx(Aa,{scannedAt:b}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:`flex items-center justify-center w-24 ${ga[R]} text-white shrink-0`,children:e.jsx("span",{className:"text-5xl font-bold leading-none",children:R})}),e.jsxs("div",{className:"flex-1 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-900",children:"Overall grade"}),e.jsxs("p",{className:"text-[11px] text-slate-600 leading-snug",children:["Mean of ",N.subGrades.length," verification areas below. Untested areas count as F until verified."]}),j&&e.jsx("p",{className:"text-[11px] text-amber-800 leading-snug mt-1 bg-amber-50 border border-amber-200 rounded px-2 py-1",children:j})]})]}),N.isLawsuitRisk&&e.jsx(ja,{areas:N.warningAreas}),e.jsx(wa,{grades:N.subGrades}),m&&e.jsx(va,{coverage:m,onResolveWithAi:L,resolving:o,resolveError:d}),v&&e.jsx(ya,{layers:v}),e.jsx(ka,{violationsRemaining:S,manualCompleted:k,manualTotal:B.length}),k>0||x.length>0?e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2 bg-slate-50",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Manual coverage (Guided Tests)"}),e.jsxs("div",{className:"text-[11px] text-slate-700 mb-1.5",children:[e.jsx("strong",{children:k})," of ",e.jsx("strong",{children:B.length})," workflows complete"]}),e.jsx("div",{className:"flex h-1 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-emerald-500",style:{width:`${k/B.length*100}%`}})})]}):null]})}function va({coverage:t,onResolveWithAi:s,resolving:a,resolveError:n}){const r=t.untestedCriteria.length+t.inconclusiveCriteria.length,[i,o]=f.useState(r>0&&r<=3),c=t.totalApplicable===0?0:Math.round(t.evaluated/t.totalApplicable*100),d=t.canClaimConformance,p=[];return t.untestedCriteria.length>0&&p.push({kind:"untested",ids:t.untestedCriteria}),t.inconclusiveCriteria.length>0&&p.push({kind:"inconclusive",ids:t.inconclusiveCriteria}),e.jsxs("div",{className:`border-t ${d?"border-emerald-200 bg-emerald-50":"border-amber-200 bg-amber-50"} px-3 py-2 text-[11px] leading-snug`,children:[e.jsxs("div",{className:`flex items-center justify-between gap-2 ${d?"text-emerald-900":"text-amber-900"}`,children:[e.jsxs("div",{children:[e.jsxs("span",{className:"font-semibold",children:["WCAG ",t.targetVersion," ",t.targetLevel," coverage:"," ",t.evaluated," of ",t.totalApplicable," criteria evaluated (",c,"%)"]}),d&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:["Every applicable criterion has been evaluated and either passes or is N/A. This audit can be presented as a conformance-claim for ",t.targetVersion," ",t.targetLevel," for the audited URL(s)."]}),!d&&e.jsxs("p",{className:"text-[11px] mt-0.5 font-semibold",children:["Cannot claim ",t.targetLevel," conformance — applicable criteria remain",t.untestedCriteria.length>0?" untested":"",t.untestedCriteria.length>0&&t.inconclusiveCriteria.length>0?" or":"",t.inconclusiveCriteria.length>0?" inconclusive":"","."]}),!d&&t.untestedCriteria.length>0&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:[e.jsxs("strong",{children:[t.untestedCriteria.length," untested"]})," ",t.untestedCriteria.length===1?"criterion":"criteria"," — mark Pass / Fail / N/A in Guided Tests below."]}),!d&&t.inconclusiveCriteria.length>0&&e.jsxs("p",{className:"text-[11px] mt-0.5",children:[e.jsxs("strong",{children:[t.inconclusiveCriteria.length," inconclusive"]})," ",t.inconclusiveCriteria.length===1?"criterion":"criteria"," — axe couldn't fully determine OR an IGT step was skipped. Resolve before claiming conformance."]})]}),!d&&p.length>0&&e.jsx("button",{type:"button",onClick:()=>o(l=>!l),className:"text-[11px] underline shrink-0 self-start",children:i?"hide":"show list"})]}),i&&!d&&e.jsxs("div",{className:"mt-1.5 space-y-1.5",children:[p.map(l=>e.jsxs("div",{children:[e.jsxs("div",{className:"text-[10.5px] font-semibold uppercase tracking-wide text-amber-900",children:[l.kind==="untested"?"Untested":"Inconclusive"," (",l.ids.length,")"]}),e.jsx("ul",{className:"text-[10.5px] text-amber-900 space-y-1",children:l.ids.map(u=>{var w;const h=l.kind==="inconclusive"?(w=t.inconclusiveReasons)==null?void 0:w[u]:void 0,x=h==null?void 0:h.some(N=>N.source==="axe-incomplete"&&N.elements&&N.elements.length>0),b=(a==null?void 0:a.has(u))??!1;return e.jsxs("li",{className:"leading-snug",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[e.jsxs("code",{className:"font-mono text-[11px]",children:["· ",u]}),l.kind==="inconclusive"&&x&&s&&e.jsx("button",{type:"button",disabled:b,onClick:()=>s(u),className:"text-[11px] font-semibold px-2 py-1 bg-brand-500 text-white rounded hover:bg-brand-600 disabled:opacity-50 shadow-sm",title:"Ask AI to determine pass/fail for the specific elements axe couldn't sample.",children:b?"Resolving…":"✨ Resolve with AI →"})]}),h&&h.length>0?e.jsx("ul",{className:"ml-3 mt-0.5 space-y-0.5",children:h.map((N,T)=>e.jsxs("li",{className:"text-[10px] text-amber-800",children:[N.source==="axe-incomplete"&&e.jsxs(e.Fragment,{children:["axe rule ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," — "]}),N.source==="igt-skip"&&e.jsxs(e.Fragment,{children:["Guided Test step ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," skipped — "]}),N.source==="ai-uncertain"&&e.jsxs(e.Fragment,{children:["AI rule ",e.jsx("code",{className:"font-mono",children:N.ruleOrStepId})," — "]}),N.resolutionHint,N.elements&&N.elements.length>0&&e.jsxs("span",{className:"block ml-1 mt-0.5 text-[10px] text-amber-700",children:["on ",N.elements.length===1?"element":`${N.elements.length} elements`,":"," ",N.elements.slice(0,3).map((m,v,y)=>e.jsxs("span",{children:[e.jsx("code",{className:"font-mono bg-amber-100 px-1 rounded",children:m.selector}),v<y.length-1&&e.jsx("span",{className:"text-amber-600",children:", "})]},v)),N.elements.length>3&&e.jsxs("span",{className:"text-amber-600",children:[", +",N.elements.length-3," more"]})]})]},T))}):l.kind==="inconclusive"&&e.jsx("p",{className:"ml-3 mt-0.5 text-[10px] text-amber-800 italic",children:"Re-run the audit to see the specific axe rule or Guided Test step responsible. (Cached data from a pre-rc.53 build doesn't carry the reason metadata.)"})]},u)})})]},l.kind)),n&&e.jsx("p",{className:"text-[10px] text-rose-700 bg-rose-50 border border-rose-200 rounded px-1.5 py-1 mt-1",children:n})]})]})}const nt={automation:{label:"Automation",hint:"axe-core rules — runs on every scan."},ai:{label:"AI judgment",hint:"wcagcheckr AI analyzers (alt-text, contrast, vision)."},human:{label:"Human verification",hint:"Independent Guided Tests — manual checks."}};function ya({layers:t}){const s=g(n=>n.setView),a=["automation","ai","human"];return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Evidence layers"}),e.jsx("ul",{className:"space-y-1",children:a.map(n=>{const r=t[n],i=r.coveredCriteria.length,o=r.blocked.length,c=r.unevaluated.length,d=r.cleared,p=i>0&&o===0&&c===0,l=p?"text-emerald-700":o>0?"text-rose-700":"text-amber-700";return e.jsxs("li",{className:"flex items-start gap-2 text-[11px]",children:[e.jsx("span",{className:`w-5 h-5 inline-flex items-center justify-center rounded text-[10px] font-bold shrink-0 ${p?"bg-emerald-500 text-white":o>0?"bg-rose-500 text-white":"bg-amber-500 text-white"}`,"aria-hidden":"true",children:p?"✓":o>0?"!":"?"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5 flex-wrap",children:[e.jsx("span",{className:"font-medium text-slate-800",children:nt[n].label}),e.jsx("span",{className:`font-mono text-[10px] ${l}`,children:i===0?"no coverage yet":`${d}/${i}`}),o>0&&e.jsxs("span",{className:"text-[10px] text-rose-700",children:["· ",o," blocked"]}),c>0&&e.jsxs("span",{className:"text-[10px] text-amber-700",children:["· ",c," pending"]})]}),e.jsx("p",{className:"text-[10px] text-slate-500 leading-snug",children:nt[n].hint}),n==="human"&&c>0&&e.jsx("button",{type:"button",onClick:()=>s("guided"),className:"text-[10px] text-brand-600 hover:underline mt-0.5",children:"Open Guided Tests →"})]})]},n)})})]})}function ja({areas:t}){const s=t.map(a=>a.label);return e.jsxs("div",{className:"border-t border-rose-200 bg-rose-50 px-3 py-2 text-[11px] text-rose-900 leading-snug",children:[e.jsx("p",{className:"font-semibold mb-0.5",children:"⚠ Not lawsuit-safe"}),e.jsx("p",{children:s.length===1?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s[0]})," scored ",t[0].letter,". Even a high overall grade doesn't help if one area is failing — demand-letter mills target the weakest link."]}):e.jsxs(e.Fragment,{children:[s.length," areas are at lawsuit-risk:"," ",s.map((a,n)=>e.jsxs("span",{children:[e.jsx("strong",{children:a}),n<s.length-1?", ":""]},a)),". Fix these before relying on the overall grade."]})})]})}function wa({grades:t}){const s=g(a=>a.setView);return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-2",children:"Verification areas"}),e.jsx("ul",{className:"grid grid-cols-1 gap-1.5",children:t.map(a=>e.jsxs("li",{className:"flex items-center gap-2 text-[11px]",children:[e.jsx("span",{className:`w-6 h-6 inline-flex items-center justify-center rounded text-xs font-bold ${fa[a.letter]}`,"aria-label":`Grade ${a.letter}`,children:a.letter}),e.jsx("span",{className:"font-medium text-slate-800 flex-1 min-w-0",children:a.label}),e.jsx(Na,{grade:a,onOpenGuided:()=>s("guided")})]},a.id))})]})}function Na({grade:t,onOpenGuided:s}){const a=n=>{if(!n)return"";const r=B.find(i=>i.id===n);return(r==null?void 0:r.name)??n};if(t.untested)return e.jsxs("span",{className:"text-slate-500 text-[10px] italic",children:["not graded —"," ",t.primaryVerifierWorkflowId?e.jsxs("button",{type:"button",onClick:s,className:"text-brand-600 hover:underline not-italic",children:["run ",a(t.primaryVerifierWorkflowId)," →"]}):"no data yet"]});if(t.verifiedByIgt){const n=t.verifiedAt?Pt(Date.now()-new Date(t.verifiedAt).getTime()):null;return e.jsxs("span",{className:"text-emerald-700 text-[10px]",title:t.suppressedHeuristicCount>0?`Heuristic flagged ${t.suppressedHeuristicCount} issue${t.suppressedHeuristicCount===1?"":"s"}, but you verified this area in Guided Tests — those are treated as noise unless you re-verify.`:"Verified via Guided Tests",children:["✓ verified",n?` ${n} ago`:""]})}return t.needsIgt?e.jsxs("button",{type:"button",onClick:s,className:"text-amber-700 hover:underline text-[10px]",title:"Verify this area by running the relevant Guided Tests workflow",children:["verify with ",a(t.primaryVerifierWorkflowId)," →"]}):t.counts.critical>0||t.counts.serious>0?e.jsxs("span",{className:"text-slate-500 text-[10px]",children:[t.counts.critical>0&&e.jsxs("span",{className:"text-rose-700",children:[t.counts.critical," critical"]}),t.counts.critical>0&&t.counts.serious>0&&" · ",t.counts.serious>0&&e.jsxs("span",{className:"text-orange-700",children:[t.counts.serious," serious"]})]}):e.jsx("span",{className:"text-emerald-700 text-[10px]",children:"clean"})}function ka({violationsRemaining:t,manualCompleted:s,manualTotal:a}){const n=g(o=>o.setView),r=[{done:t===0,label:t===0?"Automated checks pass":`Fix ${t} automated violation${t===1?"":"s"}`,action:void 0,tooltip:void 0},{done:s===a,label:`Run Guided Tests (${s}/${a} workflows complete)`,action:()=>n("guided"),tooltip:'12 separate workflows total. Click → pick a workflow → mark each step pass/fail/skip → "Back to workflows" → click again for the next. Repeat until 12/12.'},{done:!1,label:"Export AI fix prompt + complete manual checklist",action:()=>n("delta"),tooltip:`Switches to the Delta tab. Click the Export menu and pick "AI fix prompt" — markdown for ChatGPT/Claude/Copilot, with manual checklist for the WCAG criteria automation can't detect.`}],i=r.findIndex(o=>!o.done);return e.jsxs("div",{className:"border-t border-slate-200 px-3 py-2 bg-slate-50",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500 mb-1.5",children:"Path to full WCAG compliance"}),e.jsx("ol",{className:"space-y-1 text-[11px]",children:r.map((o,c)=>{const d=c===i,p=o.done;return e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:p?"font-mono text-emerald-700 shrink-0":d?"font-mono text-brand-600 font-semibold shrink-0":"font-mono text-slate-400 shrink-0","aria-hidden":"true",children:p?"✓":`${c+1}.`}),o.action?e.jsxs("button",{type:"button",onClick:o.action,title:o.tooltip,className:d?"text-brand-700 font-semibold underline-offset-2 hover:underline text-left leading-snug":"text-slate-600 underline-offset-2 hover:underline hover:text-slate-900 text-left leading-snug",children:[o.label," →"]}):e.jsx("span",{className:p?"text-slate-500 line-through leading-snug":d?"text-slate-900 font-medium leading-snug":"text-slate-500 leading-snug",children:o.label})]},c)})})]})}function Sa({current:t,total:s}){return e.jsxs("div",{role:"status","aria-live":"polite",className:"border border-slate-200 rounded-lg bg-white p-4 flex items-center gap-3",children:[e.jsx("span",{className:"inline-block w-5 h-5 border-2 border-brand-500 border-t-transparent rounded-full animate-spin motion-reduce:animate-none","aria-hidden":"true"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:"Scanning…"}),e.jsx("p",{className:"text-[11px] text-slate-500",children:typeof t=="number"&&typeof s=="number"?`State ${t} of ${s}. Grade will appear when the scan completes.`:"Grade will appear when the scan completes."})]})]})}function Aa({scannedAt:t}){const s=Date.now()-new Date(t).getTime();return e.jsxs("div",{className:"bg-amber-50 border-b border-amber-200 px-3 py-1.5 text-[11px] text-amber-900 flex items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",children:"↻"}),e.jsxs("span",{children:["Showing a previous scan (",Pt(s)," old). Re-scan to grade the current page state."]})]})}function Pt(t){const s=Math.floor(t/1e3);if(s<60)return"less than a minute";if(s<120)return"1 minute";if(s<3600)return`${Math.floor(s/60)} minutes`;if(s<7200)return"1 hour";if(s<86400)return`${Math.floor(s/3600)} hours`;const a=Math.floor(s/86400);return a===1?"1 day":`${a} days`}const Ge="dismissedFindings";function Te(t){try{const s=new URL(t);return`${s.origin}${s.pathname.replace(/\/+$/,"")}`}catch{return t}}function oe(t){return`reading-order::${t}`}function le(t){return`tab-order::${t}`}async function Ie(){try{const t=await chrome.storage.local.get(Ge),s=t==null?void 0:t[Ge];if(s&&typeof s=="object")return s}catch{}return{}}async function Ke(t){await chrome.storage.local.set({[Ge]:t})}async function Ee(t){return(await Ie())[Te(t)]??{}}async function Gt(t,s,a,n){const r=await Ie(),i=Te(t),o=r[i]??{};o[s]={reason:a,dismissedAt:new Date().toISOString(),snippet:n},r[i]=o,await Ke(r)}async function be(t,s){if(s.length===0)return;const a=await Ie(),n=Te(t),r=a[n]??{},i=new Date().toISOString();for(const o of s)r[o.key]={reason:o.reason,dismissedAt:i,snippet:o.snippet};a[n]=r,await Ke(a)}async function Vt(t,s){const a=await Ie(),n=Te(t),r=a[n];!r||!(s in r)||(delete r[s],Object.keys(r).length===0?delete a[n]:a[n]=r,await Ke(a))}const Ca=Object.freeze(Object.defineProperty({__proto__:null,addDismissal:Gt,addDismissals:be,dismissalKeyForReadingOrder:oe,dismissalKeyForTabOrder:le,getDismissalsForUrl:Ee,removeDismissal:Vt},Symbol.toStringTag,{value:"Module"}));function Wt(t){return[t.pseudoState,t.theme,t.direction,t.breakpoint.id].join(" · ")}function Bt(t){return`${He(t.ruleId,t.target.selector)}::${t.target.outerHTML.slice(0,64)}`}function Ra(t){const s=new Map;for(const a of t)for(const n of a.violations){const r=Bt(n),i=s.get(r);i?i.states.push(n.currentState):s.set(r,{representative:n,states:[n.currentState]})}return Array.from(s.values())}const rt={critical:0,serious:1,moderate:2,minor:3};function Ea(){var b,w,N,T;const t=g(m=>m.results),s=g(m=>m.componentId),a=g(m=>m.setView),n=((b=t[0])==null?void 0:b.pageUrl)??((w=t[0])==null?void 0:w.scope)??"",[r,i]=f.useState({}),[o,c]=f.useState(new Set);if(f.useEffect(()=>{if(!n)return;Ee(n).then(i);const m=()=>{document.visibilityState==="visible"&&n&&Ee(n).then(i)};return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[n]),f.useEffect(()=>{if(!s){c(new Set);return}let m=!1;const v=async()=>{const R=await chrome.storage.local.get("igtRuns");if(m)return;const j=((R==null?void 0:R.igtRuns)??{})[s]??{},k=new Set;for(const S of B){const E=j[S.id];E&&Object.keys(E.steps).length===S.steps.length&&k.add(S.id)}c(k)};v();const y=()=>{document.visibilityState==="visible"&&v()};return document.addEventListener("visibilitychange",y),()=>{m=!0,document.removeEventListener("visibilitychange",y)}},[s]),t.length===0)return e.jsx("div",{className:"p-4 text-center text-slate-500 text-sm",children:"No audit results yet. Pick an element to start."});const d=t.reduce((m,v)=>m+v.durationMs,0),p=t.reduce((m,v)=>m+v.violations.length,0),l=Ra(t);l.sort((m,v)=>{const y=rt[m.representative.impact]??99,R=rt[v.representative.impact]??99;return y!==R?y-R:v.states.length-m.states.length});const u=t.map(m=>Wt(m.state)).join(`
4
4
  `),h=o.has("keyboard")?0:(((N=t[0])==null?void 0:N.tabOrderIssues)??[]).filter(m=>!(le(m.selector)in r)).length,x=o.has("page-structure")?0:(((T=t[0])==null?void 0:T.readingOrderIssues)??[]).filter(m=>!(oe(m.selector)in r)).length;return e.jsxs("div",{className:"p-3 space-y-3",children:[e.jsx(ba,{violations:t.flatMap(m=>m.violations),componentId:s}),(h>0||x>0)&&e.jsxs("button",{type:"button",onClick:()=>a("activity"),className:"w-full text-left border border-rose-200 rounded bg-rose-50 px-3 py-2 hover:bg-rose-100 transition-colors",children:[e.jsx("p",{className:"text-xs font-semibold text-rose-900",children:"⚠ Keyboard / screen-reader concerns axe-core can't see"}),e.jsxs("p",{className:"text-[11px] text-rose-800 leading-snug mt-0.5",children:[h>0&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:h})," tab-order issue",h===1?"":"s"," (WCAG 2.4.3)"]}),h>0&&x>0&&" · ",x>0&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:x})," reading-order issue",x===1?"":"s"," (WCAG 1.3.2)"]})," ","— click to view in ",e.jsx("span",{className:"underline",children:"Activity"})," tab."]})]}),e.jsxs("div",{className:"text-xs text-slate-500 border-b border-slate-200 pb-2",children:[e.jsxs("span",{title:u,"aria-label":`${t.length} states tested: ${u.replace(/\n/g,", ")}`,className:"underline decoration-dotted decoration-slate-400 cursor-help",children:[t.length," ",t.length===1?"state":"states"]})," · ",l.length," unique ",l.length===1?"violation":"violations"," ",e.jsxs("span",{className:"text-slate-500",children:["(",p," across all states)"]})," · ",(d/1e3).toFixed(1),"s"]}),l.length===0?e.jsx("p",{className:"text-xs text-slate-500 italic px-1",children:"No violations found."}):e.jsx("div",{className:"space-y-1.5",children:l.map(m=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(Re,{violation:m.representative}),e.jsx(Ta,{states:m.states,totalStates:t.length})]},Bt(m.representative)))})]})}function Ta({states:t,totalStates:s}){if(t.length===s)return e.jsxs("p",{className:"text-[11px] text-slate-500 px-1",children:["Found in ",e.jsxs("span",{className:"font-medium",children:["all ",s," states"]}),"."]});const a=Array.from(new Set(t.map(Wt))),n=a.slice(0,3).join(", "),r=a.length>3?`, +${a.length-3} more`:"",i=a.join(`
5
5
  `);return e.jsxs("p",{className:"text-[11px] text-slate-500 px-1",title:i,children:["Found in ",a.length," of ",s," states:"," ",e.jsxs("span",{className:"text-slate-600",children:[n,r]})]})}const Ia={minor:"bg-blue-100 text-blue-700",moderate:"bg-yellow-100 text-yellow-700",serious:"bg-orange-100 text-orange-700",critical:"bg-red-100 text-red-700"};function $a({ruleId:t,violations:s}){const[a,n]=f.useState(s.length===1),r=s[0];if(!r)return null;const i=r.impact,o=r.description,c=s.length;return c===1?e.jsx(Re,{violation:r}):e.jsxs("div",{className:"border border-slate-200 rounded bg-white",children:[e.jsxs("button",{type:"button",onClick:()=>n(d=>!d),className:"w-full text-left p-2 hover:bg-slate-50 flex items-center justify-between gap-2","aria-expanded":a,children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-semibold uppercase tracking-wide shrink-0 ${Ia[i]}`,children:i}),e.jsx("span",{className:"text-[11px] font-mono text-slate-500 shrink-0",children:t}),e.jsx("span",{className:"text-xs text-slate-700 truncate",children:o})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("span",{className:"text-[11px] font-semibold text-slate-600",children:["×",c]}),e.jsx("span",{className:"text-slate-400 text-xs",children:a?"▾":"▸"})]})]}),a&&e.jsx("div",{className:"border-t border-slate-200 p-2 space-y-1.5 bg-slate-50/50",children:s.map((d,p)=>e.jsx(Re,{violation:d},p))})]})}function _a(t){const s=[],a=new Map;for(const n of t)a.has(n.ruleId)||(s.push(n.ruleId),a.set(n.ruleId,[])),a.get(n.ruleId).push(n);return s.map(n=>({ruleId:n,violations:a.get(n)}))}const La={"defense-bundle":"Defense report ready","evidence-bundle":"Evidence bundle ready"};function Ht({open:t,onClose:s,format:a,content:n,filename:r}){const i=Zt(new Blob([n]).size);function o(){Be(n,r),s()}function c(){We(n),s()}return e.jsxs(ce,{open:t,onClose:s,title:La[a],description:`Generated bundle — ${i}. Save to your Downloads folder, or open in a new tab to preview.`,children:[e.jsxs("div",{className:"space-y-3 text-xs text-slate-700",children:[e.jsxs("p",{children:["File: ",e.jsx("code",{className:"bg-slate-100 px-1 py-0.5 rounded text-[11px]",children:r})]}),e.jsxs("p",{className:"text-slate-500",children:["Tip: open the report and press Ctrl+P (Cmd+P on Mac) → ",e.jsx("em",{children:"Save as PDF"})," if you want a sealed-format version for legal use."]}),e.jsxs("p",{className:"text-[10px] text-slate-400",children:["To skip this prompt and download immediately on future exports, enable",e.jsx("em",{children:' "Skip the download confirmation"'})," in Settings → Advanced."]})]}),e.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[e.jsx("button",{onClick:s,className:"text-xs px-3 py-1.5 rounded border border-slate-300 text-slate-700 hover:bg-slate-50",children:"Cancel"}),e.jsx("button",{onClick:c,className:"text-xs px-3 py-1.5 rounded border border-slate-300 text-slate-700 hover:bg-slate-50",children:"Open preview"}),e.jsx("button",{onClick:o,className:"text-xs px-3 py-1.5 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Download HTML"})]})]})}const it=7800;function Ua(t,s,a){const n=t.replace(/\/$/,""),r=[];for(const l of a){const u=`${l.ruleId}::${l.target.selector}`,h=`:${l.currentState.pseudoState} · ${l.currentState.theme} · ${l.currentState.direction}`,x=r.find(b=>`${b.ruleId}::${b.target.selector}`===u);if(x){x._states.includes(h)||x._states.push(h);continue}r.push({...l,_states:[h]})}const i=`a11y: ${r.length} new violation${r.length===1?"":"s"} in ${s??"audited component"}`,o=[];o.push(`**Component:** \`${s??"unknown"}\``),o.push(""),o.push("Detected by WCAG Component Auditor as **new** vs the saved baseline — these are violations introduced since the last accepted baseline."),o.push(""),o.push("---"),o.push("");for(const l of r)o.push(`### \`${l.ruleId}\` — ${l.impact}`),o.push(""),o.push(l.description),o.push(""),o.push(`- **WCAG:** ${l.wcagCriterion} (${l.wcagLevel})`),o.push(`- **Selector:** \`${l.target.selector}\``),o.push(`- **Found in state(s):** ${l._states.join(", ")}`),l.helpUrl&&o.push(`- **More info:** ${l.helpUrl}`),o.push(""),o.push("```html"),o.push(l.target.outerHTML),o.push("```"),o.push("");o.push("---"),o.push(""),o.push("_Filed via WCAG Component Auditor (delta-only — inherited debt not included)._");const c=o.join(`
6
6
  `),d=new URLSearchParams({title:i,body:c});let p=`${n}/issues/new?${d.toString()}`;return p.length>it&&(p=p.slice(0,it)),{url:p,title:i,body:c}}const ot=7800;function Da(t,s,a){const n=t.replace(/\/$/,""),r=[];for(const l of a){const u=`${l.ruleId}::${l.target.selector}`,h=`:${l.currentState.pseudoState} · ${l.currentState.theme} · ${l.currentState.direction}`,x=r.find(b=>`${b.ruleId}::${b.target.selector}`===u);if(x){x._states.includes(h)||x._states.push(h);continue}r.push({...l,_states:[h]})}const i=`a11y: ${r.length} new violation${r.length===1?"":"s"} in ${s??"audited component"}`,o=[];o.push(`Component: ${s??"unknown"}`),o.push(""),o.push("Detected by WCAG Component Auditor as NEW vs the saved baseline — these are violations introduced since the last accepted baseline."),o.push(""),o.push("---"),o.push("");for(const l of r)o.push(`Rule: ${l.ruleId} (${l.impact})`),o.push(`WCAG: ${l.wcagCriterion} ${l.wcagLevel}`),o.push(`Description: ${l.description}`),o.push(`Selector: ${l.target.selector}`),o.push(`Found in state(s): ${l._states.join(", ")}`),l.helpUrl&&o.push(`More info: ${l.helpUrl}`),o.push(""),o.push(`HTML: ${l.target.outerHTML}`),o.push(""),o.push("---"),o.push("");o.push("Filed via WCAG Component Auditor (delta-only — inherited debt not included).");const c=o.join(`
@@ -1 +1 @@
1
- import"./modulepreload-polyfill-B5Qt9EMX.js";import{c as t,j as o,R as e}from"./styles-BQt6R4jA.js";import{E as s,A as i}from"./ErrorBoundary-BkUd_ynj.js";import{i as m}from"./crash-reporter-Dc5lvxvY.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./state-PELIq3oj.js";import"./preload-helper-D7HrI6pR.js";import"./forensic-log-BhEDrPEy.js";m("devtools-panel");const r=document.getElementById("root");if(!r)throw new Error("devtools panel: #root not found");t(r).render(o.jsx(e.StrictMode,{children:o.jsx(s,{children:o.jsx(i,{})})}));
1
+ import"./modulepreload-polyfill-B5Qt9EMX.js";import{c as t,j as o,R as e}from"./styles-CQEpK17b.js";import{E as s,A as i}from"./ErrorBoundary-BxF2xduT.js";import{i as m}from"./crash-reporter-Dc5lvxvY.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./state-PELIq3oj.js";import"./preload-helper-D7HrI6pR.js";import"./forensic-log-BhEDrPEy.js";m("devtools-panel");const r=document.getElementById("root");if(!r)throw new Error("devtools panel: #root not found");t(r).render(o.jsx(e.StrictMode,{children:o.jsx(s,{children:o.jsx(i,{})})}));
@@ -1,4 +1,4 @@
1
- import"./modulepreload-polyfill-B5Qt9EMX.js";import{a as z,R as M,u as W,j as e,b as X,r as i,d as he,P,e as L,f as pe,g as Ue,h as Oe,i as R,C as $e,A as K,k as Ge,c as Be}from"./styles-BQt6R4jA.js";import{c as be,r as w,o as Ke,s as C,O as Z,a as Ve}from"./crash-reporter-Dc5lvxvY.js";import{T as He,P as _,r as Je,D as Ye,l as We,g as qe,a as ze,b as ee}from"./state-PELIq3oj.js";import{c as Qe,D as V,l as Xe,a as Ze}from"./ai-usage-log-Dj9Ub_DT.js";import{l as et,s as te,v as tt}from"./custom-rules-CAe0nbES.js";import"./_commonjsHelpers-Cpj98o6Y.js";function st(t){const s=t+"CollectionProvider",[a,n]=z(s),[r,x]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=j=>{const{scope:p,children:c}=j,f=M.useRef(null),N=M.useRef(new Map).current;return e.jsx(r,{scope:p,itemMap:N,collectionRef:f,children:c})};d.displayName=s;const l=t+"CollectionSlot",m=X(l),o=M.forwardRef((j,p)=>{const{scope:c,children:f}=j,N=x(l,c),S=W(p,N.collectionRef);return e.jsx(m,{ref:S,children:f})});o.displayName=l;const u=t+"CollectionItemSlot",h="data-radix-collection-item",b=X(u),g=M.forwardRef((j,p)=>{const{scope:c,children:f,...N}=j,S=M.useRef(null),A=W(p,S),T=x(u,c);return M.useEffect(()=>(T.itemMap.set(S,{ref:S,...N}),()=>void T.itemMap.delete(S))),e.jsx(b,{[h]:"",ref:A,children:f})});g.displayName=u;function v(j){const p=x(t+"CollectionConsumer",j);return M.useCallback(()=>{const f=p.collectionRef.current;if(!f)return[];const N=Array.from(f.querySelectorAll(`[${h}]`));return Array.from(p.itemMap.values()).sort((T,F)=>N.indexOf(T.ref.current)-N.indexOf(F.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:d,Slot:o,ItemSlot:g},v,n]}var at=i.createContext(void 0);function fe(t){const s=i.useContext(at);return t||s||"ltr"}var H="rovingFocusGroup.onEntryFocus",nt={bubbles:!1,cancelable:!0},O="RovingFocusGroup",[q,ge,rt]=st(O),[lt,ye]=z(O,[rt]),[ot,it]=lt(O),ve=i.forwardRef((t,s)=>e.jsx(q.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(q.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(ct,{...t,ref:s})})}));ve.displayName=O;var ct=i.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,orientation:n,loop:r=!1,dir:x,currentTabStopId:d,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:m,onEntryFocus:o,preventScrollOnEntryFocus:u=!1,...h}=t,b=i.useRef(null),g=W(s,b),v=fe(x),[j,p]=pe({prop:d,defaultProp:l??null,onChange:m,caller:O}),[c,f]=i.useState(!1),N=Ue(o),S=ge(a),A=i.useRef(!1),[T,F]=i.useState(0);return i.useEffect(()=>{const y=b.current;if(y)return y.addEventListener(H,N),()=>y.removeEventListener(H,N)},[N]),e.jsx(ot,{scope:a,orientation:n,dir:v,loop:r,currentTabStopId:j,onItemFocus:i.useCallback(y=>p(y),[p]),onItemShiftTab:i.useCallback(()=>f(!0),[]),onFocusableItemAdd:i.useCallback(()=>F(y=>y+1),[]),onFocusableItemRemove:i.useCallback(()=>F(y=>y-1),[]),children:e.jsx(P.div,{tabIndex:c||T===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...t.style},onMouseDown:L(t.onMouseDown,()=>{A.current=!0}),onFocus:L(t.onFocus,y=>{const k=!A.current;if(y.target===y.currentTarget&&k&&!c){const I=new CustomEvent(H,nt);if(y.currentTarget.dispatchEvent(I),!I.defaultPrevented){const E=S().filter(D=>D.focusable),Me=E.find(D=>D.active),De=E.find(D=>D.id===j),Pe=[Me,De,...E].filter(Boolean).map(D=>D.ref.current);Se(Pe,u)}}A.current=!1}),onBlur:L(t.onBlur,()=>f(!1))})})}),je="RovingFocusGroupItem",Ne=i.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,focusable:n=!0,active:r=!1,tabStopId:x,children:d,...l}=t,m=he(),o=x||m,u=it(je,a),h=u.currentTabStopId===o,b=ge(a),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:j}=u;return i.useEffect(()=>{if(n)return g(),()=>v()},[n,g,v]),e.jsx(q.ItemSlot,{scope:a,id:o,focusable:n,active:r,children:e.jsx(P.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...l,ref:s,onMouseDown:L(t.onMouseDown,p=>{n?u.onItemFocus(o):p.preventDefault()}),onFocus:L(t.onFocus,()=>u.onItemFocus(o)),onKeyDown:L(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const c=xt(p,u.orientation,u.dir);if(c!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let N=b().filter(S=>S.focusable).map(S=>S.ref.current);if(c==="last")N.reverse();else if(c==="prev"||c==="next"){c==="prev"&&N.reverse();const S=N.indexOf(p.currentTarget);N=u.loop?mt(N,S+1):N.slice(S+1)}setTimeout(()=>Se(N))}}),children:typeof d=="function"?d({isCurrentTabStop:h,hasTabStop:j!=null}):d})})});Ne.displayName=je;var dt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ut(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function xt(t,s,a){const n=ut(t.key,a);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dt[n]}function Se(t,s=!1){const a=document.activeElement;for(const n of t)if(n===a||(n.focus({preventScroll:s}),document.activeElement!==a))return}function mt(t,s){return t.map((a,n)=>t[(s+n)%t.length])}var ht=ve,pt=Ne,B="Tabs",[bt]=z(B,[ye]),ke=ye(),[ft,Q]=bt(B),Te=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,onValueChange:r,defaultValue:x,orientation:d="horizontal",dir:l,activationMode:m="automatic",...o}=t,u=fe(l),[h,b]=pe({prop:n,onChange:r,defaultProp:x??"",caller:B});return e.jsx(ft,{scope:a,baseId:he(),value:h,onValueChange:b,orientation:d,dir:u,activationMode:m,children:e.jsx(P.div,{dir:u,"data-orientation":d,...o,ref:s})})});Te.displayName=B;var we="TabsList",Ce=i.forwardRef((t,s)=>{const{__scopeTabs:a,loop:n=!0,...r}=t,x=Q(we,a),d=ke(a);return e.jsx(ht,{asChild:!0,...d,orientation:x.orientation,dir:x.dir,loop:n,children:e.jsx(P.div,{role:"tablist","aria-orientation":x.orientation,...r,ref:s})})});Ce.displayName=we;var Ee="TabsTrigger",Ie=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,disabled:r=!1,...x}=t,d=Q(Ee,a),l=ke(a),m=_e(d.baseId,n),o=Le(d.baseId,n),u=n===d.value;return e.jsx(pt,{asChild:!0,...l,focusable:!r,active:u,children:e.jsx(P.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":o,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:m,...x,ref:s,onMouseDown:L(t.onMouseDown,h=>{!r&&h.button===0&&h.ctrlKey===!1?d.onValueChange(n):h.preventDefault()}),onKeyDown:L(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&d.onValueChange(n)}),onFocus:L(t.onFocus,()=>{const h=d.activationMode!=="manual";!u&&!r&&h&&d.onValueChange(n)})})})});Ie.displayName=Ee;var Ae="TabsContent",Re=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,forceMount:r,children:x,...d}=t,l=Q(Ae,a),m=_e(l.baseId,n),o=Le(l.baseId,n),u=n===l.value,h=i.useRef(u);return i.useEffect(()=>{const b=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(b)},[]),e.jsx(Oe,{present:r||u,children:({present:b})=>e.jsx(P.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":m,hidden:!b,id:o,tabIndex:0,...d,ref:s,style:{...t.style,animationDuration:h.current?"0s":void 0},children:b&&x})})});Re.displayName=Ae;function _e(t,s){return`${t}-trigger-${s}`}function Le(t,s){return`${t}-content-${s}`}var gt=Te,yt=Ce,vt=Ie,$=Re;const jt=["default","hover","focus","focus-visible","active","disabled"],Nt=["light","dark","forced-colors-active","forced-colors-none"],St=["ltr","rtl"];function kt({value:t,onChange:s}){function a(r,x){return r.includes(x)?r.filter(d=>d!==x):[...r,x]}function n(){const r=t.ariaVariations.length===0?1:t.ariaVariations.length;return t.pseudoStates.length*r*t.themes.length*t.directions.length*t.breakpoints.length}return e.jsxs("div",{className:"space-y-3 border border-slate-200 rounded p-3 bg-white",children:[e.jsx(G,{label:"Pseudo-states",all:jt,selected:t.pseudoStates,onToggle:r=>s({...t,pseudoStates:a(t.pseudoStates,r)})}),e.jsx(G,{label:"Themes",all:Nt,selected:t.themes,onToggle:r=>s({...t,themes:a(t.themes,r)})}),e.jsx(G,{label:"Directions",all:St,selected:t.directions,onToggle:r=>s({...t,directions:a(t.directions,r)})}),e.jsx(G,{label:"Breakpoints",all:t.breakpointPresets.map(r=>r.id),selected:t.breakpoints,onToggle:r=>s({...t,breakpoints:a(t.breakpoints,r)})}),e.jsxs("p",{className:"text-xs text-slate-500 pt-2 border-t border-slate-100",children:[e.jsx("strong",{children:n()})," audits per component"]})]})}function G({label:t,all:s,selected:a,onToggle:n}){return e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium mb-1.5",children:t}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(r=>{const x=a.includes(r);return e.jsx("button",{type:"button",onClick:()=>n(r),className:x?"text-xs px-2 py-1 rounded bg-brand-500 text-white":"text-xs px-2 py-1 rounded bg-slate-100 text-slate-700 hover:bg-slate-200",children:r},r)})})]})}function Tt({value:t,onChange:s}){const[a,n]=i.useState(""),[r,x]=i.useState("");function d(o){o.preventDefault();const u=a.trim(),h=r.trim();!u||!h||(s({...t,[u]:h}),n(""),x(""))}function l(o){const u={...t};delete u[o],s(u)}const m=Object.entries(t);return e.jsxs("div",{className:"space-y-3 border border-slate-200 rounded p-3 bg-white",children:[m.length===0?e.jsx("p",{className:"text-xs text-slate-500 italic",children:"no aliases"}):e.jsx("ul",{className:"space-y-1",children:m.map(([o,u])=>e.jsxs("li",{className:"text-xs flex items-center justify-between gap-2 border border-slate-100 rounded p-1.5",children:[e.jsxs("span",{className:"font-mono truncate",title:`${o} → ${u}`,children:[o," ",e.jsx("span",{className:"text-slate-500",children:"→"})," ",u]}),e.jsx("button",{onClick:()=>l(o),className:"text-slate-500 hover:text-red-600 shrink-0","aria-label":`Remove alias ${o}`,children:"×"})]},o))}),e.jsxs("form",{onSubmit:d,className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-end",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"From"}),e.jsx("input",{type:"text",value:a,onChange:o=>n(o.target.value),placeholder:"https://example.com::testid:btn-a",className:"w-full text-xs border border-slate-300 rounded px-2 py-1 font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Treat as"}),e.jsx("input",{type:"text",value:r,onChange:o=>x(o.target.value),placeholder:"https://example.com::testid:btn-canonical",className:"w-full text-xs border border-slate-300 rounded px-2 py-1 font-mono"})]}),e.jsx("button",{type:"submit",className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",disabled:!a.trim()||!r.trim(),children:"Add"})]})]})}const se=be("billing-portal-client"),wt="https://api.wcagcheckr.com",Ct="wcagcheckr",Et=15e3;async function It(t){const s=`${wt}/v1/products/${Ct}/billing-portal`;try{const a=await fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({licenseToken:t.licenseToken}),signal:AbortSignal.timeout(Et)}),n=await a.json().catch(()=>null);return a.ok?n!=null&&n.url?{ok:!0,url:n.url}:{ok:!1,error:"malformed response — no url",status:a.status}:(se.warn(`billing portal HTTP ${a.status}`,n),{ok:!1,status:a.status,error:(n==null?void 0:n.hint)??(n==null?void 0:n.error)??`HTTP ${a.status}`})}catch(a){return se.warn("billing portal request failed",a),{ok:!1,error:a instanceof Error?a.message:String(a)}}}const ae=be("subscription-resume-client"),At="https://api.wcagcheckr.com",Rt="wcagcheckr",_t=1e4;async function Lt(t){try{const s=await fetch(`${At}/v1/products/${Rt}/subscription/resume`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({licenseToken:t.licenseToken}),signal:AbortSignal.timeout(_t)}),a=await s.json().catch(()=>null);return s.ok?{ok:!0,alreadyActive:(a==null?void 0:a.alreadyActive)===!0}:(ae.warn(`resume http ${s.status}`,a),{ok:!1,status:s.status,error:(a==null?void 0:a.hint)??(a==null?void 0:a.error)??`HTTP ${s.status}`})}catch(s){return ae.warn("resume request failed",s),{ok:!1,error:s instanceof Error?s.message:String(s)}}}const Ft={trial:"Trial",free:"Free",solo:"Solo",team:"Team"},Mt={free:"Free",solo:"Solo (monthly)","solo-yearly":"Solo (yearly)","solo-single-month":"Solo (single month — non-recurring)",team:"Team (5 seats, monthly)","team-yearly":"Team (5 seats, yearly)","team-15":"Team (15 seats, monthly)","team-15-yearly":"Team (15 seats, yearly)"},Dt=new Set(["solo-single-month"]);function Pt(t){if(!t)return null;const s=new Date(t).getTime()-Date.now();return Number.isFinite(s)?Math.ceil(s/(24*60*60*1e3)):null}function U(t){return t?Mt[t]??t:"—"}function J(t){if(!t)return"no expiry on file";try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return t}}function Ut({tier:t,onTierChange:s}){const[a,n]=i.useState(null),[r,x]=i.useState(null),[d,l]=i.useState(!1),[m,o]=i.useState(""),[u,h]=i.useState(!1),[b,g]=i.useState(null),[v,j]=i.useState(!1),[p,c]=i.useState(!1),f=i.useCallback(async y=>{const I=(await chrome.storage.local.get("licenseToken")).licenseToken??null;if(n(I),!I){x(null);return}try{const E=await w({type:"LICENSE_VALIDATE_REQUEST",token:I,forceRefresh:(y==null?void 0:y.forceRefresh)===!0});x(E)}catch{x(null)}},[]);i.useEffect(()=>(f({forceRefresh:!0}),Ke("LICENSE_CHANGED_EVENT",()=>{f()})),[f]);async function N(){if(m.trim()){h(!0),g(null);try{const y=await w({type:"LICENSE_SET_REQUEST",token:m.trim()}),k=await w({type:"LICENSE_VALIDATE_REQUEST",token:m.trim()});if(k.valid&&k.plan){const I=Gt(k.plan);s(I);let E=`Activated as ${U(k.plan)}.`;y.seatClaim.ok?y.seatClaim.overCapacity&&(E=`Activated as ${U(k.plan)}. Note: this license is currently OVER its seat cap (${y.seatClaim.seatsUsed} of ${y.seatClaim.seatsTotal} seats). Release one or upgrade.`):y.seatClaim.reason==="cap-reached"?E=`Activated as ${U(k.plan)}, BUT this license is at its seat capacity (${y.seatClaim.seatsUsed} of ${y.seatClaim.seatsTotal} seats used). Release a seat from another device, or upgrade to a higher-seat plan. This device's seat won't be active until you do.`:y.seatClaim.reason==="network"&&(E=`Activated as ${U(k.plan)}. (Seat-tracking ping failed — retrying in the background.)`),g(E),y.seatClaim.ok&&!y.seatClaim.overCapacity?R.polite(E):R.assertive(E),o(""),l(!1),await f()}else{const I="Token did not validate. Check the value and try again.";g(I),R.assertive(I)}}catch(y){const k=y instanceof Error?y.message:String(y);g(k),R.assertive(k)}finally{h(!1)}}}async function S(){if(a)try{await navigator.clipboard.writeText(a),j(!0),setTimeout(()=>j(!1),2e3)}catch{}}async function A(){if(window.confirm(`Remove the active license token from this extension?
1
+ import"./modulepreload-polyfill-B5Qt9EMX.js";import{a as z,R as M,u as W,j as e,b as X,r as i,d as he,P,e as L,f as pe,g as Ue,h as Oe,i as R,C as $e,A as K,k as Ge,c as Be}from"./styles-CQEpK17b.js";import{c as be,r as w,o as Ke,s as C,O as Z,a as Ve}from"./crash-reporter-Dc5lvxvY.js";import{T as He,P as _,r as Je,D as Ye,l as We,g as qe,a as ze,b as ee}from"./state-PELIq3oj.js";import{c as Qe,D as V,l as Xe,a as Ze}from"./ai-usage-log-Dj9Ub_DT.js";import{l as et,s as te,v as tt}from"./custom-rules-CAe0nbES.js";import"./_commonjsHelpers-Cpj98o6Y.js";function st(t){const s=t+"CollectionProvider",[a,n]=z(s),[r,x]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=j=>{const{scope:p,children:c}=j,f=M.useRef(null),N=M.useRef(new Map).current;return e.jsx(r,{scope:p,itemMap:N,collectionRef:f,children:c})};d.displayName=s;const l=t+"CollectionSlot",m=X(l),o=M.forwardRef((j,p)=>{const{scope:c,children:f}=j,N=x(l,c),S=W(p,N.collectionRef);return e.jsx(m,{ref:S,children:f})});o.displayName=l;const u=t+"CollectionItemSlot",h="data-radix-collection-item",b=X(u),g=M.forwardRef((j,p)=>{const{scope:c,children:f,...N}=j,S=M.useRef(null),A=W(p,S),T=x(u,c);return M.useEffect(()=>(T.itemMap.set(S,{ref:S,...N}),()=>void T.itemMap.delete(S))),e.jsx(b,{[h]:"",ref:A,children:f})});g.displayName=u;function v(j){const p=x(t+"CollectionConsumer",j);return M.useCallback(()=>{const f=p.collectionRef.current;if(!f)return[];const N=Array.from(f.querySelectorAll(`[${h}]`));return Array.from(p.itemMap.values()).sort((T,F)=>N.indexOf(T.ref.current)-N.indexOf(F.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:d,Slot:o,ItemSlot:g},v,n]}var at=i.createContext(void 0);function fe(t){const s=i.useContext(at);return t||s||"ltr"}var H="rovingFocusGroup.onEntryFocus",nt={bubbles:!1,cancelable:!0},O="RovingFocusGroup",[q,ge,rt]=st(O),[lt,ye]=z(O,[rt]),[ot,it]=lt(O),ve=i.forwardRef((t,s)=>e.jsx(q.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(q.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(ct,{...t,ref:s})})}));ve.displayName=O;var ct=i.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,orientation:n,loop:r=!1,dir:x,currentTabStopId:d,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:m,onEntryFocus:o,preventScrollOnEntryFocus:u=!1,...h}=t,b=i.useRef(null),g=W(s,b),v=fe(x),[j,p]=pe({prop:d,defaultProp:l??null,onChange:m,caller:O}),[c,f]=i.useState(!1),N=Ue(o),S=ge(a),A=i.useRef(!1),[T,F]=i.useState(0);return i.useEffect(()=>{const y=b.current;if(y)return y.addEventListener(H,N),()=>y.removeEventListener(H,N)},[N]),e.jsx(ot,{scope:a,orientation:n,dir:v,loop:r,currentTabStopId:j,onItemFocus:i.useCallback(y=>p(y),[p]),onItemShiftTab:i.useCallback(()=>f(!0),[]),onFocusableItemAdd:i.useCallback(()=>F(y=>y+1),[]),onFocusableItemRemove:i.useCallback(()=>F(y=>y-1),[]),children:e.jsx(P.div,{tabIndex:c||T===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...t.style},onMouseDown:L(t.onMouseDown,()=>{A.current=!0}),onFocus:L(t.onFocus,y=>{const k=!A.current;if(y.target===y.currentTarget&&k&&!c){const I=new CustomEvent(H,nt);if(y.currentTarget.dispatchEvent(I),!I.defaultPrevented){const E=S().filter(D=>D.focusable),Me=E.find(D=>D.active),De=E.find(D=>D.id===j),Pe=[Me,De,...E].filter(Boolean).map(D=>D.ref.current);Se(Pe,u)}}A.current=!1}),onBlur:L(t.onBlur,()=>f(!1))})})}),je="RovingFocusGroupItem",Ne=i.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:a,focusable:n=!0,active:r=!1,tabStopId:x,children:d,...l}=t,m=he(),o=x||m,u=it(je,a),h=u.currentTabStopId===o,b=ge(a),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:j}=u;return i.useEffect(()=>{if(n)return g(),()=>v()},[n,g,v]),e.jsx(q.ItemSlot,{scope:a,id:o,focusable:n,active:r,children:e.jsx(P.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...l,ref:s,onMouseDown:L(t.onMouseDown,p=>{n?u.onItemFocus(o):p.preventDefault()}),onFocus:L(t.onFocus,()=>u.onItemFocus(o)),onKeyDown:L(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const c=xt(p,u.orientation,u.dir);if(c!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let N=b().filter(S=>S.focusable).map(S=>S.ref.current);if(c==="last")N.reverse();else if(c==="prev"||c==="next"){c==="prev"&&N.reverse();const S=N.indexOf(p.currentTarget);N=u.loop?mt(N,S+1):N.slice(S+1)}setTimeout(()=>Se(N))}}),children:typeof d=="function"?d({isCurrentTabStop:h,hasTabStop:j!=null}):d})})});Ne.displayName=je;var dt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ut(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function xt(t,s,a){const n=ut(t.key,a);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dt[n]}function Se(t,s=!1){const a=document.activeElement;for(const n of t)if(n===a||(n.focus({preventScroll:s}),document.activeElement!==a))return}function mt(t,s){return t.map((a,n)=>t[(s+n)%t.length])}var ht=ve,pt=Ne,B="Tabs",[bt]=z(B,[ye]),ke=ye(),[ft,Q]=bt(B),Te=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,onValueChange:r,defaultValue:x,orientation:d="horizontal",dir:l,activationMode:m="automatic",...o}=t,u=fe(l),[h,b]=pe({prop:n,onChange:r,defaultProp:x??"",caller:B});return e.jsx(ft,{scope:a,baseId:he(),value:h,onValueChange:b,orientation:d,dir:u,activationMode:m,children:e.jsx(P.div,{dir:u,"data-orientation":d,...o,ref:s})})});Te.displayName=B;var we="TabsList",Ce=i.forwardRef((t,s)=>{const{__scopeTabs:a,loop:n=!0,...r}=t,x=Q(we,a),d=ke(a);return e.jsx(ht,{asChild:!0,...d,orientation:x.orientation,dir:x.dir,loop:n,children:e.jsx(P.div,{role:"tablist","aria-orientation":x.orientation,...r,ref:s})})});Ce.displayName=we;var Ee="TabsTrigger",Ie=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,disabled:r=!1,...x}=t,d=Q(Ee,a),l=ke(a),m=_e(d.baseId,n),o=Le(d.baseId,n),u=n===d.value;return e.jsx(pt,{asChild:!0,...l,focusable:!r,active:u,children:e.jsx(P.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":o,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:m,...x,ref:s,onMouseDown:L(t.onMouseDown,h=>{!r&&h.button===0&&h.ctrlKey===!1?d.onValueChange(n):h.preventDefault()}),onKeyDown:L(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&d.onValueChange(n)}),onFocus:L(t.onFocus,()=>{const h=d.activationMode!=="manual";!u&&!r&&h&&d.onValueChange(n)})})})});Ie.displayName=Ee;var Ae="TabsContent",Re=i.forwardRef((t,s)=>{const{__scopeTabs:a,value:n,forceMount:r,children:x,...d}=t,l=Q(Ae,a),m=_e(l.baseId,n),o=Le(l.baseId,n),u=n===l.value,h=i.useRef(u);return i.useEffect(()=>{const b=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(b)},[]),e.jsx(Oe,{present:r||u,children:({present:b})=>e.jsx(P.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":m,hidden:!b,id:o,tabIndex:0,...d,ref:s,style:{...t.style,animationDuration:h.current?"0s":void 0},children:b&&x})})});Re.displayName=Ae;function _e(t,s){return`${t}-trigger-${s}`}function Le(t,s){return`${t}-content-${s}`}var gt=Te,yt=Ce,vt=Ie,$=Re;const jt=["default","hover","focus","focus-visible","active","disabled"],Nt=["light","dark","forced-colors-active","forced-colors-none"],St=["ltr","rtl"];function kt({value:t,onChange:s}){function a(r,x){return r.includes(x)?r.filter(d=>d!==x):[...r,x]}function n(){const r=t.ariaVariations.length===0?1:t.ariaVariations.length;return t.pseudoStates.length*r*t.themes.length*t.directions.length*t.breakpoints.length}return e.jsxs("div",{className:"space-y-3 border border-slate-200 rounded p-3 bg-white",children:[e.jsx(G,{label:"Pseudo-states",all:jt,selected:t.pseudoStates,onToggle:r=>s({...t,pseudoStates:a(t.pseudoStates,r)})}),e.jsx(G,{label:"Themes",all:Nt,selected:t.themes,onToggle:r=>s({...t,themes:a(t.themes,r)})}),e.jsx(G,{label:"Directions",all:St,selected:t.directions,onToggle:r=>s({...t,directions:a(t.directions,r)})}),e.jsx(G,{label:"Breakpoints",all:t.breakpointPresets.map(r=>r.id),selected:t.breakpoints,onToggle:r=>s({...t,breakpoints:a(t.breakpoints,r)})}),e.jsxs("p",{className:"text-xs text-slate-500 pt-2 border-t border-slate-100",children:[e.jsx("strong",{children:n()})," audits per component"]})]})}function G({label:t,all:s,selected:a,onToggle:n}){return e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium mb-1.5",children:t}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(r=>{const x=a.includes(r);return e.jsx("button",{type:"button",onClick:()=>n(r),className:x?"text-xs px-2 py-1 rounded bg-brand-500 text-white":"text-xs px-2 py-1 rounded bg-slate-100 text-slate-700 hover:bg-slate-200",children:r},r)})})]})}function Tt({value:t,onChange:s}){const[a,n]=i.useState(""),[r,x]=i.useState("");function d(o){o.preventDefault();const u=a.trim(),h=r.trim();!u||!h||(s({...t,[u]:h}),n(""),x(""))}function l(o){const u={...t};delete u[o],s(u)}const m=Object.entries(t);return e.jsxs("div",{className:"space-y-3 border border-slate-200 rounded p-3 bg-white",children:[m.length===0?e.jsx("p",{className:"text-xs text-slate-500 italic",children:"no aliases"}):e.jsx("ul",{className:"space-y-1",children:m.map(([o,u])=>e.jsxs("li",{className:"text-xs flex items-center justify-between gap-2 border border-slate-100 rounded p-1.5",children:[e.jsxs("span",{className:"font-mono truncate",title:`${o} → ${u}`,children:[o," ",e.jsx("span",{className:"text-slate-500",children:"→"})," ",u]}),e.jsx("button",{onClick:()=>l(o),className:"text-slate-500 hover:text-red-600 shrink-0","aria-label":`Remove alias ${o}`,children:"×"})]},o))}),e.jsxs("form",{onSubmit:d,className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-end",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"From"}),e.jsx("input",{type:"text",value:a,onChange:o=>n(o.target.value),placeholder:"https://example.com::testid:btn-a",className:"w-full text-xs border border-slate-300 rounded px-2 py-1 font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Treat as"}),e.jsx("input",{type:"text",value:r,onChange:o=>x(o.target.value),placeholder:"https://example.com::testid:btn-canonical",className:"w-full text-xs border border-slate-300 rounded px-2 py-1 font-mono"})]}),e.jsx("button",{type:"submit",className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",disabled:!a.trim()||!r.trim(),children:"Add"})]})]})}const se=be("billing-portal-client"),wt="https://api.wcagcheckr.com",Ct="wcagcheckr",Et=15e3;async function It(t){const s=`${wt}/v1/products/${Ct}/billing-portal`;try{const a=await fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({licenseToken:t.licenseToken}),signal:AbortSignal.timeout(Et)}),n=await a.json().catch(()=>null);return a.ok?n!=null&&n.url?{ok:!0,url:n.url}:{ok:!1,error:"malformed response — no url",status:a.status}:(se.warn(`billing portal HTTP ${a.status}`,n),{ok:!1,status:a.status,error:(n==null?void 0:n.hint)??(n==null?void 0:n.error)??`HTTP ${a.status}`})}catch(a){return se.warn("billing portal request failed",a),{ok:!1,error:a instanceof Error?a.message:String(a)}}}const ae=be("subscription-resume-client"),At="https://api.wcagcheckr.com",Rt="wcagcheckr",_t=1e4;async function Lt(t){try{const s=await fetch(`${At}/v1/products/${Rt}/subscription/resume`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({licenseToken:t.licenseToken}),signal:AbortSignal.timeout(_t)}),a=await s.json().catch(()=>null);return s.ok?{ok:!0,alreadyActive:(a==null?void 0:a.alreadyActive)===!0}:(ae.warn(`resume http ${s.status}`,a),{ok:!1,status:s.status,error:(a==null?void 0:a.hint)??(a==null?void 0:a.error)??`HTTP ${s.status}`})}catch(s){return ae.warn("resume request failed",s),{ok:!1,error:s instanceof Error?s.message:String(s)}}}const Ft={trial:"Trial",free:"Free",solo:"Solo",team:"Team"},Mt={free:"Free",solo:"Solo (monthly)","solo-yearly":"Solo (yearly)","solo-single-month":"Solo (single month — non-recurring)",team:"Team (5 seats, monthly)","team-yearly":"Team (5 seats, yearly)","team-15":"Team (15 seats, monthly)","team-15-yearly":"Team (15 seats, yearly)"},Dt=new Set(["solo-single-month"]);function Pt(t){if(!t)return null;const s=new Date(t).getTime()-Date.now();return Number.isFinite(s)?Math.ceil(s/(24*60*60*1e3)):null}function U(t){return t?Mt[t]??t:"—"}function J(t){if(!t)return"no expiry on file";try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return t}}function Ut({tier:t,onTierChange:s}){const[a,n]=i.useState(null),[r,x]=i.useState(null),[d,l]=i.useState(!1),[m,o]=i.useState(""),[u,h]=i.useState(!1),[b,g]=i.useState(null),[v,j]=i.useState(!1),[p,c]=i.useState(!1),f=i.useCallback(async y=>{const I=(await chrome.storage.local.get("licenseToken")).licenseToken??null;if(n(I),!I){x(null);return}try{const E=await w({type:"LICENSE_VALIDATE_REQUEST",token:I,forceRefresh:(y==null?void 0:y.forceRefresh)===!0});x(E)}catch{x(null)}},[]);i.useEffect(()=>(f({forceRefresh:!0}),Ke("LICENSE_CHANGED_EVENT",()=>{f()})),[f]);async function N(){if(m.trim()){h(!0),g(null);try{const y=await w({type:"LICENSE_SET_REQUEST",token:m.trim()}),k=await w({type:"LICENSE_VALIDATE_REQUEST",token:m.trim()});if(k.valid&&k.plan){const I=Gt(k.plan);s(I);let E=`Activated as ${U(k.plan)}.`;y.seatClaim.ok?y.seatClaim.overCapacity&&(E=`Activated as ${U(k.plan)}. Note: this license is currently OVER its seat cap (${y.seatClaim.seatsUsed} of ${y.seatClaim.seatsTotal} seats). Release one or upgrade.`):y.seatClaim.reason==="cap-reached"?E=`Activated as ${U(k.plan)}, BUT this license is at its seat capacity (${y.seatClaim.seatsUsed} of ${y.seatClaim.seatsTotal} seats used). Release a seat from another device, or upgrade to a higher-seat plan. This device's seat won't be active until you do.`:y.seatClaim.reason==="network"&&(E=`Activated as ${U(k.plan)}. (Seat-tracking ping failed — retrying in the background.)`),g(E),y.seatClaim.ok&&!y.seatClaim.overCapacity?R.polite(E):R.assertive(E),o(""),l(!1),await f()}else{const I="Token did not validate. Check the value and try again.";g(I),R.assertive(I)}}catch(y){const k=y instanceof Error?y.message:String(y);g(k),R.assertive(k)}finally{h(!1)}}}async function S(){if(a)try{await navigator.clipboard.writeText(a),j(!0),setTimeout(()=>j(!1),2e3)}catch{}}async function A(){if(window.confirm(`Remove the active license token from this extension?
2
2
 
3
3
  Your subscription stays active server-side — you can paste the same token back in any time. The extension will fall back to trial / free until then.`)){a&&await Je(a),await chrome.storage.local.remove("licenseToken"),n(null),x(null);try{const k=await w({type:"TIER_GET"});s(k.tier)}catch{s("free")}R.polite("License token removed.")}}const T=He[t],F=a!==null&&(r==null?void 0:r.valid)===!0;return e.jsxs("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-slate-500",children:"Current tier"}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-slate-100 text-slate-700",children:Ft[t]})]}),e.jsxs("ul",{className:"text-xs text-slate-600 space-y-1",children:[e.jsxs("li",{children:["Components:"," ",Number.isFinite(T.maxComponents)?T.maxComponents:"unlimited"]}),e.jsxs("li",{children:["Baselines:"," ",Number.isFinite(T.maxBaselines)?T.maxBaselines:"unlimited"]}),e.jsxs("li",{children:["State matrix: ",T.stateMatrix]}),e.jsxs("li",{children:["Storybook auto-iterate: ",T.storybookAutoIterate?"yes":"no"]}),e.jsxs("li",{children:["JSON export: ",T.exportJson?"yes":"no"]}),e.jsxs("li",{children:["SARIF / JUnit export: ",T.exportSarif?"yes":"no"]})]}),F&&r?e.jsx(Ot,{token:a,info:r,copied:v,onCopy:S,onRemove:A,onUseDifferent:()=>l(!0),onManageSubscription:async()=>{const y=await It({licenseToken:a});y.ok?window.open(y.url,"_blank","noopener,noreferrer"):(g(`Couldn't open billing portal: ${y.error}`),R.assertive("Could not open billing portal."))},onResumeSubscription:async()=>{const y=await Lt({licenseToken:a});if(y.ok){const k=y.alreadyActive?"Subscription was already active — no change needed.":"Subscription resumed. Cancellation has been reversed.";g(k),R.polite(k),await f({forceRefresh:!0})}else g(`Couldn't resume subscription: ${y.error}`),R.assertive("Could not resume subscription.")},onRenew:()=>c(!0),message:b}):a?e.jsx($t,{token:a,onRemove:A,onUseDifferent:()=>l(!0)}):e.jsx(ne,{token:m,onTokenChange:o,submitting:u,message:b,onSubmit:N}),F&&d&&e.jsx(ne,{token:m,onTokenChange:o,submitting:u,message:b,onSubmit:N,replacing:!0,onCancel:()=>{l(!1),o(""),g(null)}}),!F&&(t==="trial"||t==="free")&&e.jsxs("div",{className:"border-t border-slate-100 pt-3 space-y-2",children:[e.jsxs("p",{className:"text-xs text-slate-600",children:[e.jsx("strong",{children:"Solo"}),": $",_.solo.monthlyUsd,"/mo (recurring) ·"," ","$",_.solo.yearlyUsd,"/yr (save ",Math.round(100-_.solo.yearlyUsd/(_.solo.monthlyUsd*12)*100),"%) ·"," ","$",_.solo.singleMonthUsd," single month (no recurring) · single user."]}),e.jsxs("p",{className:"text-xs text-slate-600",children:[e.jsx("strong",{children:"Team"}),": $",_.team.fiveSeatMonthlyUsd,"/mo for 5 seats ·"," ","$",_.team.fifteenSeatMonthlyUsd,"/mo for 15 seats."]}),e.jsx("button",{type:"button",onClick:()=>c(!0),className:"inline-block text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Upgrade →"})]}),e.jsx($e,{open:p,onClose:()=>c(!1)})]})}function Ot({token:t,info:s,copied:a,onCopy:n,onRemove:r,onUseDifferent:x,onManageSubscription:d,onResumeSubscription:l,onRenew:m,message:o}){const u=s.features,h=typeof(u==null?void 0:u.seatsUsed)=="number"?u.seatsUsed:null,b=typeof(u==null?void 0:u.seatsTotal)=="number"?u.seatsTotal:null,g=b!==null,v=h!==null&&b!==null&&h>b,j=h!==null&&b!==null&&h===b,p=s.plan?Dt.has(s.plan):!1,c=Pt(s.expiresAt),f=p&&c!==null&&c<=7;return e.jsxs("div",{className:"border-t border-slate-100 pt-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-slate-700",children:"Active license"}),e.jsx("span",{className:s.cancelAtPeriodEnd?"text-[10px] px-1.5 py-0.5 rounded-full bg-amber-100 text-amber-900":"text-[10px] px-1.5 py-0.5 rounded-full bg-emerald-100 text-emerald-800",children:s.cancelAtPeriodEnd?"cancellation scheduled":s.status??"unknown"})]}),s.pastDueSince&&e.jsxs("div",{className:"bg-rose-50 border border-rose-200 rounded p-2 text-[11px] text-rose-900",children:[e.jsx("strong",{children:"Payment failed."})," Stripe couldn't charge your card. Access continues during the grace period (usually up to 7 days while Stripe retries), then this license will cancel automatically."," ",e.jsx("button",{type:"button",onClick:d,className:"font-medium underline-offset-2 hover:underline",children:"Update your card via the Stripe portal →"})]}),s.cancelAtPeriodEnd&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded p-2 text-[11px] text-amber-900 space-y-1",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Cancellation scheduled."})," Your subscription was cancelled via Stripe. Access continues until ",e.jsx("strong",{children:J(s.expiresAt)}),", then this license stops working."]}),e.jsx("button",{type:"button",onClick:l,className:"text-[11px] font-medium underline-offset-2 hover:underline",children:"Resume subscription →"})]}),v&&e.jsxs("div",{className:"bg-rose-50 border border-rose-200 rounded p-2 text-[11px] text-rose-900",children:[e.jsx("strong",{children:"Over seat capacity."})," This license has"," ",e.jsx("strong",{children:h})," seats in use but the plan only includes"," ",e.jsx("strong",{children:b}),". New devices will be rejected. Release a seat from another device, or upgrade to a higher-seat plan via Manage subscription below."]}),j&&!v&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded p-2 text-[11px] text-amber-900",children:[e.jsx("strong",{children:"At seat capacity."})," All ",e.jsx("strong",{children:b})," seats are in use. The next new device that tries to activate this license will be rejected until a seat is released."]}),e.jsxs("dl",{className:"text-xs text-slate-600 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1",children:[e.jsx("dt",{className:"text-slate-500",children:"Plan"}),e.jsx("dd",{children:U(s.plan)}),e.jsx("dt",{className:"text-slate-500",children:"Email"}),e.jsx("dd",{className:"truncate",children:s.email??"—"}),e.jsx("dt",{className:"text-slate-500",children:p?"Expires":"Renews / ends"}),e.jsxs("dd",{children:[J(s.expiresAt),c!==null&&c>=0&&c<=14?e.jsx("span",{className:f?"ml-2 text-[10px] text-amber-900 bg-amber-100 rounded px-1.5 py-0.5":"ml-2 text-[10px] text-slate-500",children:c===0?"today":c===1?"1 day left":`${c} days left`}):null]}),s.trialEndsAt?e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-slate-500",children:"Trial ends"}),e.jsx("dd",{children:J(s.trialEndsAt)})]}):null,g?e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-slate-500",children:"Seats"}),e.jsx("dd",{children:h!==null?`${h} of ${b} used`:`${b} total`})]}):null]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-medium text-slate-500 mb-1",children:"Token"}),e.jsxs("div",{className:"flex items-stretch gap-1",children:[e.jsx("code",{className:"flex-1 font-mono text-[11px] bg-slate-100 border border-slate-200 rounded px-2 py-1.5 select-all break-all",children:t}),e.jsx("button",{type:"button",onClick:n,className:"text-[11px] px-2 py-1.5 border border-slate-300 rounded bg-white hover:bg-slate-50 shrink-0",children:a?"Copied ✓":"Copy"})]})]}),e.jsx("div",{className:"pt-1 flex flex-wrap gap-2",children:p?e.jsx("button",{type:"button",onClick:m,className:f?"text-xs px-3 py-1.5 bg-amber-500 text-white rounded hover:bg-amber-600":"text-xs px-3 py-1.5 bg-brand-500 text-white rounded hover:bg-brand-600",title:"Buy another month — extends your existing license, no new token to copy",children:f?`Renew now — $${_.solo.singleMonthUsd} →`:`Buy another month — $${_.solo.singleMonthUsd} →`}):e.jsx("button",{type:"button",onClick:d,className:"text-xs px-3 py-1.5 bg-brand-500 text-white rounded hover:bg-brand-600",title:"Open Stripe's billing portal — change plan or seat count, update card, view invoices, cancel",children:"Manage subscription →"})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[e.jsx("button",{type:"button",onClick:x,className:"text-[11px] text-brand-600 hover:underline",children:"Use a different token"}),e.jsx("span",{className:"text-slate-300","aria-hidden":"true",children:"·"}),e.jsx("button",{type:"button",onClick:r,className:"text-[11px] text-rose-700 hover:underline",children:"Remove license from this extension"})]}),o&&e.jsx("p",{className:"text-xs text-slate-600 pt-1",children:o})]})}function $t({token:t,onRemove:s,onUseDifferent:a}){return e.jsxs("div",{className:"border-t border-rose-100 pt-3 space-y-2 bg-rose-50/40 -mx-3 px-3 pb-2 rounded-b",children:[e.jsxs("p",{className:"text-xs text-rose-800",children:[e.jsx("strong",{children:"License token rejected by the server."})," The token may have been revoked, the subscription canceled, or the network is down. Verify your subscription and try a different token — or remove this one and continue on the trial / free tier."]}),e.jsx("p",{className:"text-[11px] text-rose-700 font-mono break-all",children:t}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:a,className:"text-[11px] text-brand-600 hover:underline",children:"Use a different token"}),e.jsx("span",{className:"text-slate-300","aria-hidden":"true",children:"·"}),e.jsx("button",{type:"button",onClick:s,className:"text-[11px] text-rose-700 hover:underline",children:"Remove and continue without a license"})]})]})}function ne({token:t,onTokenChange:s,submitting:a,message:n,onSubmit:r,replacing:x,onCancel:d}){return e.jsxs("div",{className:"border-t border-slate-100 pt-3 space-y-2",children:[e.jsx("label",{htmlFor:"opt-license-token",className:"block text-xs font-medium",children:x?"Replace with a different token":"Activate license token"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{id:"opt-license-token",type:"text",value:t,onChange:l=>s(l.target.value),placeholder:"00000000-0000-0000-0000-000000000000",className:"flex-1 text-xs border border-slate-300 rounded px-2 py-1 font-mono"}),e.jsx("button",{onClick:r,disabled:a||!t.trim(),className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",children:a?"Validating…":x?"Replace":"Activate"}),x&&d&&e.jsx("button",{type:"button",onClick:d,className:"text-xs px-3 py-1 border border-slate-300 rounded text-slate-700 hover:bg-slate-50",children:"Cancel"})]}),n&&e.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Gt(t){return t==="solo"||t==="solo-yearly"||t==="solo-single-month"?"solo":t==="team"||t==="team-15"||t==="team-yearly"||t==="team-15-yearly"?"team":"free"}const Bt=new Set(Ye.map(t=>t.id));function Kt({presets:t,onChange:s}){const[a,n]=i.useState({id:"",label:"",width:1024,height:768,deviceScaleFactor:1,mobile:!1});function r(l){l.preventDefault();const m=a.id.trim();!m||t.some(o=>o.id===m)||(s([...t,{...a,id:m,label:a.label.trim()||`${m} (${a.width}×${a.height})`}]),n({id:"",label:"",width:1024,height:768,deviceScaleFactor:1,mobile:!1}))}function x(l){s(t.filter(m=>m.id!==l))}function d(l,m){s(t.map(o=>o.id===l?{...o,...m}:o))}return e.jsxs("div",{className:"space-y-3 border border-slate-200 rounded p-3 bg-white",children:[t.length===0?e.jsx("p",{className:"text-xs text-slate-500 italic",children:"no breakpoints"}):e.jsx("ul",{className:"space-y-1.5",children:t.map(l=>{const m=Bt.has(l.id);return e.jsxs("li",{className:"grid grid-cols-[1fr_70px_70px_auto_auto] gap-2 items-center text-xs",children:[e.jsxs("span",{className:"font-medium truncate",title:l.id,children:[l.label,m&&e.jsx("span",{className:"text-slate-500 font-normal ml-1",children:"(default)"})]}),e.jsx("input",{type:"number",value:l.width,onChange:o=>d(l.id,{width:Number(o.target.value)||0}),className:"text-xs border border-slate-300 rounded px-1.5 py-1 w-full","aria-label":`Width for ${l.label}`,min:1}),e.jsx("input",{type:"number",value:l.height,onChange:o=>d(l.id,{height:Number(o.target.value)||0}),className:"text-xs border border-slate-300 rounded px-1.5 py-1 w-full","aria-label":`Height for ${l.label}`,min:1}),e.jsxs("label",{className:"flex items-center gap-1 text-slate-600",children:[e.jsx("input",{type:"checkbox",checked:l.mobile,onChange:o=>d(l.id,{mobile:o.target.checked})}),"mobile"]}),m?e.jsx("span",{className:"w-4","aria-hidden":"true"}):e.jsx("button",{onClick:()=>x(l.id),className:"text-slate-500 hover:text-red-600","aria-label":`Remove ${l.label}`,children:"×"})]},l.id)})}),e.jsxs("form",{onSubmit:r,className:"grid grid-cols-[1fr_1fr_70px_70px_auto] gap-2 items-end pt-3 border-t border-slate-100",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"bp-draft-id",className:"block text-xs text-slate-500 mb-1",children:"ID"}),e.jsx("input",{id:"bp-draft-id",type:"text",value:a.id,onChange:l=>n({...a,id:l.target.value}),placeholder:"laptop",className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"bp-draft-label",className:"block text-xs text-slate-500 mb-1",children:"Label"}),e.jsx("input",{id:"bp-draft-label",type:"text",value:a.label,onChange:l=>n({...a,label:l.target.value}),placeholder:"Laptop (1440×900)",className:"w-full text-xs border border-slate-300 rounded px-2 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"bp-draft-width",className:"block text-xs text-slate-500 mb-1",children:"W"}),e.jsx("input",{id:"bp-draft-width",type:"number",value:a.width,onChange:l=>n({...a,width:Number(l.target.value)||0}),min:1,className:"w-full text-xs border border-slate-300 rounded px-1.5 py-1"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"bp-draft-height",className:"block text-xs text-slate-500 mb-1",children:"H"}),e.jsx("input",{id:"bp-draft-height",type:"number",value:a.height,onChange:l=>n({...a,height:Number(l.target.value)||0}),min:1,className:"w-full text-xs border border-slate-300 rounded px-1.5 py-1"})]}),e.jsx("button",{type:"submit",disabled:!a.id.trim()||t.some(l=>l.id===a.id.trim()),className:"text-xs px-3 py-1 bg-brand-500 text-white rounded disabled:opacity-50",children:"Add"})]})]})}function Vt({stateMatrix:t,componentIdAliases:s,onImport:a}){const n=i.useRef(null),[r,x]=i.useState(null);function d(){const m={schemaVersion:1,exportedAt:new Date().toISOString(),stateMatrix:t,componentIdAliases:s},o=new Blob([JSON.stringify(m,null,2)],{type:"application/json"}),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=`wcag-auditor-settings-${new Date().toISOString().slice(0,10)}.json`,h.click(),URL.revokeObjectURL(u),x("Exported.")}async function l(m){var o,u;x(null);try{const h=await m.text(),b=JSON.parse(h);if(b.schemaVersion!==1)throw new Error(`Unsupported schemaVersion: ${b.schemaVersion}`);if(!((o=b.stateMatrix)!=null&&o.pseudoStates)||!((u=b.stateMatrix)!=null&&u.breakpointPresets))throw new Error("stateMatrix is malformed");await C({type:"SETTINGS_SET",key:"stateMatrix",value:b.stateMatrix}),await C({type:"SETTINGS_SET",key:"componentIdAliases",value:b.componentIdAliases??{}}),a({stateMatrix:b.stateMatrix,componentIdAliases:b.componentIdAliases??{}}),x("Imported.")}catch(h){x(`Import failed: ${h instanceof Error?h.message:String(h)}`)}}return e.jsxs("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:d,className:"text-xs px-3 py-1 bg-slate-100 hover:bg-slate-200 rounded",children:"Export settings"}),e.jsx("button",{onClick:()=>{var m;return(m=n.current)==null?void 0:m.click()},className:"text-xs px-3 py-1 bg-slate-100 hover:bg-slate-200 rounded",children:"Import settings…"}),e.jsx("input",{ref:n,type:"file",accept:"application/json,.json",className:"hidden",onChange:m=>{var u;const o=(u=m.target.files)==null?void 0:u[0];o&&l(o),m.target.value=""}})]}),r&&e.jsx("p",{className:"text-xs text-slate-600",children:r})]})}function Ht(){const[t,s]=i.useState(null);i.useEffect(()=>{chrome.storage.local.get(Z).then(n=>s(n[Z]===!0))},[]);async function a(){const n=!t;s(n),await Ve(n)}return t===null?e.jsx("p",{className:"text-xs text-slate-500",children:"Loading…"}):e.jsx("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:e.jsxs("label",{className:"flex items-start gap-2 text-xs cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t,onChange:a,className:"mt-0.5"}),e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Send anonymized crash reports"}),e.jsx("span",{className:"block text-slate-500 mt-0.5",children:"When the extension hits an unexpected error, send the error message + redacted stack trace + extension version. URLs, emails, and license tokens are stripped before sending. No audit data, page content, or browsing history is included."})]})]})})}function Jt(){const[t,s]=i.useState(null);i.useEffect(()=>{chrome.storage.local.get(K).then(n=>s(n[K]===!0))},[]);async function a(){const n=!t;s(n),await chrome.storage.local.set({[K]:n})}return t===null?e.jsx("p",{className:"text-xs text-slate-500",children:"Loading…"}):e.jsx("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:e.jsxs("label",{className:"flex items-start gap-2 text-xs cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t,onChange:a,className:"mt-0.5"}),e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Skip the download confirmation"}),e.jsx("span",{className:"block text-slate-500 mt-0.5",children:"By default, generating a defense or evidence bundle pops up a small confirmation asking whether to download or preview. Enable this to skip the prompt and have the file land directly in your Downloads folder. Keep it off if you'd rather decide each time (recommended for non-technical users — surprise downloads can be alarming)."})]})]})})}function Yt(){const[t,s]=i.useState(null),[a,n]=i.useState(!1);async function r(){const d=await chrome.storage.local.get(null),l=Object.keys(d).filter(m=>m.startsWith("auditCache:"));s(l.length)}i.useEffect(()=>{r()},[]);async function x(){n(!0);try{await Qe(),await r()}finally{n(!1)}}return e.jsxs("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:[e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:"font-medium",children:"Audit cache"}),e.jsx("span",{className:"block text-slate-500 mt-0.5",children:"Repeat audits of the same component skip the state-matrix iteration when the DOM is unchanged from the last audit (10-50× faster). The fingerprint is DOM-only — if you change ONLY CSS, the cache won't notice and will return stale results. Clear it here when that happens."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:x,disabled:a||(t??0)===0,className:"text-xs px-3 py-1 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-300 rounded",children:a?"Clearing…":"Clear audit cache"}),e.jsx("span",{className:"text-xs text-slate-500",children:t===null?"Loading…":t===0?"Cache is empty.":`${t} cached audit${t===1?"":"s"}.`})]})]})}const re="licenseToken";function le(t){const s=Date.now()-new Date(t).getTime(),a=Math.floor(s/6e4);if(a<1)return"just now";if(a<60)return`${a} min ago`;const n=Math.floor(a/60);if(n<24)return`${n}h ago`;const r=Math.floor(n/24);return r<30?`${r}d ago`:new Date(t).toLocaleDateString()}function Wt(t){return t.slice(0,8)+"…"}function qt(t){return t?/Edg\//.test(t)?"Edge":/Chrome\//.test(t)?"Chrome":/Firefox\//.test(t)?"Firefox":/Safari\//.test(t)?"Safari":t.slice(0,30):"unknown"}function zt(){const[t,s]=i.useState(null),[a,n]=i.useState(null),[r,x]=i.useState(null),[d,l]=i.useState(0),[m,o]=i.useState(null),[u,h]=i.useState(!1),[b,g]=i.useState(null),v=i.useCallback(async()=>{h(!0),g(null);try{const c=(await chrome.storage.local.get(re))[re]??null;if(s(c),!c){n(null);return}const f=await We(c);if(!f){g("Could not load seats — check network or license validity.");return}n(f.seats),x(f.seatsTotal),l(f.seatsUsed),o(await qe())}finally{h(!1)}},[]);i.useEffect(()=>{v()},[v]);async function j(p){if(!t)return;const f=p===m?"Revoke THIS device? You will have to re-claim a seat on the next audit (if a seat is available).":"Revoke this seat? The device will be denied audits until it re-claims a seat (subject to the seat cap).";if(window.confirm(f)){h(!0);try{if(!await ze(t,p)){g("Revoke failed — try again or check network.");return}await v()}finally{h(!1)}}}return t?r===null?e.jsx("div",{className:"text-xs text-slate-500",children:"This license has no seat cap (Solo / single-month / free / trial). Upgrade to a Team plan to see and manage seats here."}):e.jsxs("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:"font-medium",children:"Team seats"}),e.jsxs("span",{className:"text-slate-500 ml-2",children:[d," of ",r," used",d>r&&e.jsx("span",{className:"ml-2 text-amber-700",children:"(over capacity — release to bring under limit)"})]})]}),e.jsx("button",{onClick:v,disabled:u,className:"text-xs px-2 py-0.5 border border-slate-300 rounded hover:bg-slate-50 disabled:opacity-50",children:u?"Loading…":"Refresh"})]}),b&&e.jsx("p",{className:"text-xs text-red-700",children:b}),a&&a.length>0?e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-slate-500",children:[e.jsx("th",{className:"font-normal py-1",children:"Device"}),e.jsx("th",{className:"font-normal py-1",children:"Browser"}),e.jsx("th",{className:"font-normal py-1",children:"Claimed"}),e.jsx("th",{className:"font-normal py-1",children:"Last active"}),e.jsx("th",{className:"font-normal py-1"})]})}),e.jsx("tbody",{children:a.map(p=>e.jsxs("tr",{className:"border-t border-slate-100",children:[e.jsxs("td",{className:"py-1",children:[e.jsx("code",{className:"text-[10px] text-slate-600",children:Wt(p.deviceId)}),p.deviceId===m&&e.jsx("span",{className:"ml-1 text-[10px] text-brand-700",children:"(this device)"})]}),e.jsx("td",{className:"py-1 text-slate-700",children:qt(p.userAgent)}),e.jsx("td",{className:"py-1 text-slate-500",children:le(p.claimedAt)}),e.jsx("td",{className:"py-1 text-slate-500",children:le(p.lastSeenAt)}),e.jsx("td",{className:"py-1 text-right",children:e.jsx("button",{onClick:()=>j(p.deviceId),disabled:u,className:"text-[11px] px-2 py-0.5 border border-slate-300 rounded hover:bg-red-50 hover:text-red-800 hover:border-red-300 disabled:opacity-50",children:"Revoke"})})]},p.deviceId))})]}):e.jsx("p",{className:"text-xs text-slate-500",children:"No seats claimed yet."})]}):e.jsx("div",{className:"text-xs text-slate-500",children:"Activate a Team license to manage seats here."})}const Qt=[{id:"use-our-button",description:"Use the design-system Button, not raw <button>.",impact:"moderate",selector:"button:not([data-component='Button']):not([data-component^='ds-'])",check:{type:"fail-on-match",message:"Replace raw <button> with the design-system Button component."},enabled:!0},{id:"no-inline-styles",description:"Inline style attribute escapes the design tokens.",impact:"minor",selector:"[style]",check:{type:"fail-on-match",message:"Move this style into a design-token-aware CSS class."},enabled:!0},{id:"cta-needs-testid",description:"Every call-to-action button must have data-testid for E2E.",impact:"serious",selector:'button.cta, [data-component="Button"][data-variant="primary"]',check:{type:"attribute-required",attribute:"data-testid",message:"Add a data-testid attribute so QA can target this element."},enabled:!1}];function Xt(){const[t,s]=i.useState(""),[a,n]=i.useState([]),[r,x]=i.useState(!1),[d,l]=i.useState(null);i.useEffect(()=>{et().then(u=>{s(u.length>0?JSON.stringify(u,null,2):""),x(!0)})},[]);function m(){if(t.trim().length===0){te([]),n([]),l(Date.now());return}let u;try{u=JSON.parse(t)}catch(g){n([`Invalid JSON: ${g instanceof Error?g.message:String(g)}`]);return}const{valid:h,errors:b}=tt(u);if(b.length>0){n(b);return}n([]),te(h),l(Date.now()),s(JSON.stringify(h,null,2))}function o(){s(JSON.stringify(Qt,null,2)),n([])}return r?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-xs text-slate-500",children:["Custom rules check your design-system contracts during every audit. Three check types supported:"," ",e.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"fail-on-match"})," (every element matching the selector is a violation),"," ",e.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"attribute-required"})," ","(the named attribute must be present), and"," ",e.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"attribute-equals"})," ","(attribute must equal a specific value). Output appears in audit results alongside built-in WCAG rules."]}),e.jsx("textarea",{value:t,onChange:u=>s(u.target.value),rows:14,spellCheck:!1,placeholder:"[]",className:"w-full text-xs font-mono border border-slate-300 rounded p-2 resize-y"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:m,className:"text-xs px-3 py-1 bg-brand-500 text-white rounded hover:bg-brand-600",children:"Save"}),e.jsx("button",{onClick:o,className:"text-xs px-3 py-1 border border-slate-300 rounded hover:bg-slate-50",children:"Load example rules"}),d&&a.length===0&&e.jsxs("span",{className:"text-[11px] text-slate-500",children:["Saved at ",new Date(d).toLocaleTimeString(),"."]})]}),a.length>0&&e.jsx("div",{className:"border border-red-200 bg-red-50 rounded p-2 text-xs text-red-800 space-y-1",children:a.map((u,h)=>e.jsx("div",{children:u},h))})]}):e.jsx("div",{className:"text-xs text-slate-500",children:"Loading…"})}const Zt="com.wcagcheckr.native_host",es=5e3;async function ts(){return new Promise(t=>{let s=null;const a=Date.now(),n=setTimeout(()=>{try{s==null||s.disconnect()}catch{}t({reachable:!1,reason:"timeout after 5s"})},es);try{s=chrome.runtime.connectNative(Zt)}catch(r){clearTimeout(n),t({reachable:!1,reason:`connectNative failed: ${r instanceof Error?r.message:String(r)}`});return}s.onMessage.addListener(r=>{clearTimeout(n),(r==null?void 0:r.type)==="PONG"&&typeof r.version=="string"?t({reachable:!0,version:r.version,roundTripMs:Date.now()-a}):t({reachable:!1,reason:`unexpected response: ${JSON.stringify(r).slice(0,100)}`});try{s==null||s.disconnect()}catch{}}),s.onDisconnect.addListener(()=>{var x;clearTimeout(n);const r=(x=chrome.runtime.lastError)==null?void 0:x.message;t({reachable:!1,reason:r??"host disconnected before PONG (not installed?)"})});try{s.postMessage({type:"PING"})}catch(r){clearTimeout(n),t({reachable:!1,reason:`postMessage failed: ${r instanceof Error?r.message:String(r)}`})}})}function ss(){const[t,s]=i.useState(null),[a,n]=i.useState(!1);async function r(){n(!0);try{s(await ts())}finally{n(!1)}}return e.jsxs("div",{className:"border border-slate-200 rounded p-3 bg-white space-y-2",children:[e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:"font-medium",children:"Native messaging host (optional)"}),e.jsxs("span",{className:"block text-slate-500 mt-0.5",children:["Alternative state-driver for environments where"," ",e.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"chrome.debugger"})," is blocked by enterprise IT policy. Today's host responds to PING and reports its version; the full CDP attach replacement is on the roadmap. See ",e.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"native-host/README.md"})," ","for installation instructions."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:r,disabled:a,className:"text-xs px-3 py-1 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-300 rounded",children:a?"Testing…":"Test connection"}),t&&t.reachable&&e.jsxs("span",{className:"text-xs text-green-700",children:["Reachable — version ",t.version," (",t.roundTripMs,"ms)"]}),t&&!t.reachable&&e.jsxs("span",{className:"text-xs text-amber-700",children:["Not reachable: ",t.reason]})]})]})}const oe="disabledRules";function as(){const[t,s]=i.useState(""),[a,n]=i.useState(!1),[r,x]=i.useState(null);i.useEffect(()=>{w({type:"SETTINGS_GET",key:oe}).then(l=>{const m=Array.isArray(l.data)?l.data:[];s(m.join(`
4
4
  `)),n(!0)})},[]);function d(l){const m=l.split(`
@@ -1 +1 @@
1
- import"./modulepreload-polyfill-B5Qt9EMX.js";import{c as t,j as r,R as e}from"./styles-BQt6R4jA.js";import{E as i,A as s}from"./ErrorBoundary-BkUd_ynj.js";import{i as m}from"./crash-reporter-Dc5lvxvY.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./state-PELIq3oj.js";import"./preload-helper-D7HrI6pR.js";import"./forensic-log-BhEDrPEy.js";m("side-panel");const o=document.getElementById("root");if(!o)throw new Error("side-panel: #root not found");t(o).render(r.jsx(e.StrictMode,{children:r.jsx(i,{children:r.jsx(s,{})})}));
1
+ import"./modulepreload-polyfill-B5Qt9EMX.js";import{c as t,j as r,R as e}from"./styles-CQEpK17b.js";import{E as i,A as s}from"./ErrorBoundary-BxF2xduT.js";import{i as m}from"./crash-reporter-Dc5lvxvY.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./state-PELIq3oj.js";import"./preload-helper-D7HrI6pR.js";import"./forensic-log-BhEDrPEy.js";m("side-panel");const o=document.getElementById("root");if(!o)throw new Error("side-panel: #root not found");t(o).render(r.jsx(e.StrictMode,{children:r.jsx(i,{children:r.jsx(s,{})})}));
@@ -1 +1 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.right-0\.5{right:.125rem}.top-0\.5{top:.125rem}.top-1\/2{top:50%}.top-3{top:.75rem}.top-full{top:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.-m-4{margin:-1rem}.m-0{margin:0}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[420px\]{max-height:420px}.max-h-\[60vh\]{max-height:60vh}.min-h-\[24px\]{min-height:24px}.min-h-\[540px\]{min-height:540px}.w-1{width:.25rem}.w-1\/3{width:33.333333%}.w-2{width:.5rem}.w-2\/3{width:66.666667%}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[min\(28rem\,90vw\)\]{width:min(28rem,90vw)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.min-w-\[24px\]{min-width:24px}.max-w-2xl{max-width:42rem}.max-w-\[180px\]{max-width:180px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bell-pulse{0%,to{transform:rotate(0)}20%{transform:rotate(12deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(8deg)}80%{transform:rotate(-6deg)}}.animate-bell-pulse{animation:bell-pulse .9s ease-in-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-y{resize:vertical}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_1fr_70px_70px_auto\]{grid-template-columns:1fr 1fr 70px 70px auto}.grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.grid-cols-\[1fr_70px_70px_auto_auto\]{grid-template-columns:1fr 70px 70px auto auto}.grid-cols-\[400px_1fr\]{grid-template-columns:400px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(241 245 249 / var(--tw-divide-opacity, 1))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-500{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.border-emerald-100{--tw-border-opacity: 1;border-color:rgb(209 250 229 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-rose-100{--tw-border-opacity: 1;border-color:rgb(255 228 230 / var(--tw-border-opacity, 1))}.border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-rose-400{--tw-border-opacity: 1;border-color:rgb(251 113 133 / var(--tw-border-opacity, 1))}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity, 1))}.border-sky-200{--tw-border-opacity: 1;border-color:rgb(186 230 253 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-brand-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-brand-50\/40{background-color:#eef2ff66}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-lime-500{--tw-bg-opacity: 1;background-color:rgb(132 204 22 / var(--tw-bg-opacity, 1))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-rose-50\/40{background-color:#fff1f266}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-600{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.bg-sky-50{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-50\/50{background-color:#f8fafc80}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-violet-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-brand-50{--tw-gradient-from: #eef2ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(238 242 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.p-0{padding:0}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.06em\]{letter-spacing:.06em}.tracking-wide{letter-spacing:.025em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-600{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-brand-700{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity, 1))}.text-rose-900{--tw-text-opacity: 1;color:rgb(136 19 55 / var(--tw-text-opacity, 1))}.text-rose-900\/90{color:#881337e6}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-sky-900{--tw-text-opacity: 1;color:rgb(12 74 110 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.decoration-slate-400{text-decoration-color:#94a3b8}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(120\,53\,15\,0\.12\)\]{--tw-shadow: 0 2px 8px -2px rgba(120,53,15,.12);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(159\,18\,57\,0\.16\)\]{--tw-shadow: 0 2px 8px -2px rgba(159,18,57,.16);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(6\,78\,59\,0\.12\)\]{--tw-shadow: 0 2px 8px -2px rgba(6,78,59,.12);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_-4px_rgba\(31\,41\,55\,0\.14\)\]{--tw-shadow: 0 4px 16px -4px rgba(31,41,55,.14);--tw-shadow-colored: 0 4px 16px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-brand-500\/30{--tw-ring-color: rgb(79 70 229 / .3)}.ring-rose-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 164 175 / var(--tw-ring-opacity, 1))}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#root{height:100%}:focus-visible{outline:2px solid #3730a3;outline-offset:2px}.last\:border-r-0:last-child{border-right-width:0px}.hover\:border-brand-500:hover{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.hover\:border-red-300:hover{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:border-slate-400:hover{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-100:hover{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-50:hover{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-100:hover{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-600:hover{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-700:hover{--tw-bg-opacity: 1;background-color:rgb(190 18 60 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-300:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-brand-600:hover{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.hover\:text-emerald-900:hover{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\:text-red-900:hover{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.hover\:text-rose-600:hover{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.hover\:text-rose-700:hover{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.hover\:text-rose-900:hover{--tw-text-opacity: 1;color:rgb(136 19 55 / var(--tw-text-opacity, 1))}.hover\:text-slate-700:hover{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.hover\:text-slate-800:hover{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-70:hover{opacity:.7}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:fixed:focus{position:fixed}.focus\:left-2:focus{left:.5rem}.focus\:top-2:focus{top:.5rem}.focus\:z-50:focus{z-index:50}.focus\:rounded:focus{border-radius:.25rem}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus\:px-3:focus{padding-left:.75rem;padding-right:.75rem}.focus\:py-1\.5:focus{padding-top:.375rem;padding-bottom:.375rem}.focus\:text-slate-900:focus{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.focus\:shadow:focus{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline:focus{outline-style:solid}.focus\:outline-2:focus{outline-width:2px}.focus\:outline-brand-500:focus{outline-color:#4f46e5}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-1:focus-visible{outline-offset:1px}.focus-visible\:outline-brand-500:focus-visible{outline-color:#4f46e5}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-50:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.disabled\:text-slate-500:disabled{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=active\]\:border-b-2[data-state=active]{border-bottom-width:2px}.data-\[state\=active\]\:border-brand-500[data-state=active]{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.data-\[state\=active\]\:text-brand-700[data-state=active]{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}@media (prefers-reduced-motion: reduce){.motion-reduce\:animate-none{animation:none}}@media (min-width: 640px){.sm\:p-6{padding:1.5rem}}
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.right-0\.5{right:.125rem}.top-0\.5{top:.125rem}.top-1\/2{top:50%}.top-3{top:.75rem}.top-full{top:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.-m-4{margin:-1rem}.m-0{margin:0}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[420px\]{max-height:420px}.max-h-\[60vh\]{max-height:60vh}.min-h-\[24px\]{min-height:24px}.min-h-\[540px\]{min-height:540px}.w-1{width:.25rem}.w-1\/3{width:33.333333%}.w-2{width:.5rem}.w-2\/3{width:66.666667%}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[min\(28rem\,90vw\)\]{width:min(28rem,90vw)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.min-w-\[24px\]{min-width:24px}.max-w-2xl{max-width:42rem}.max-w-\[180px\]{max-width:180px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bell-pulse{0%,to{transform:rotate(0)}20%{transform:rotate(12deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(8deg)}80%{transform:rotate(-6deg)}}.animate-bell-pulse{animation:bell-pulse .9s ease-in-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-y{resize:vertical}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_1fr_70px_70px_auto\]{grid-template-columns:1fr 1fr 70px 70px auto}.grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.grid-cols-\[1fr_70px_70px_auto_auto\]{grid-template-columns:1fr 70px 70px auto auto}.grid-cols-\[400px_1fr\]{grid-template-columns:400px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(241 245 249 / var(--tw-divide-opacity, 1))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-500{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.border-emerald-100{--tw-border-opacity: 1;border-color:rgb(209 250 229 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-rose-100{--tw-border-opacity: 1;border-color:rgb(255 228 230 / var(--tw-border-opacity, 1))}.border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-rose-400{--tw-border-opacity: 1;border-color:rgb(251 113 133 / var(--tw-border-opacity, 1))}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity, 1))}.border-sky-200{--tw-border-opacity: 1;border-color:rgb(186 230 253 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-brand-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-brand-50\/40{background-color:#eef2ff66}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-lime-500{--tw-bg-opacity: 1;background-color:rgb(132 204 22 / var(--tw-bg-opacity, 1))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-rose-50\/40{background-color:#fff1f266}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-600{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.bg-sky-50{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-50\/50{background-color:#f8fafc80}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-violet-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-brand-50{--tw-gradient-from: #eef2ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(238 242 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.p-0{padding:0}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.06em\]{letter-spacing:.06em}.tracking-wide{letter-spacing:.025em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-600{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-brand-700{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity, 1))}.text-rose-900{--tw-text-opacity: 1;color:rgb(136 19 55 / var(--tw-text-opacity, 1))}.text-rose-900\/90{color:#881337e6}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-sky-900{--tw-text-opacity: 1;color:rgb(12 74 110 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.decoration-slate-400{text-decoration-color:#94a3b8}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(120\,53\,15\,0\.12\)\]{--tw-shadow: 0 2px 8px -2px rgba(120,53,15,.12);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(159\,18\,57\,0\.16\)\]{--tw-shadow: 0 2px 8px -2px rgba(159,18,57,.16);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(6\,78\,59\,0\.12\)\]{--tw-shadow: 0 2px 8px -2px rgba(6,78,59,.12);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_-4px_rgba\(31\,41\,55\,0\.14\)\]{--tw-shadow: 0 4px 16px -4px rgba(31,41,55,.14);--tw-shadow-colored: 0 4px 16px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-brand-500\/30{--tw-ring-color: rgb(79 70 229 / .3)}.ring-rose-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 164 175 / var(--tw-ring-opacity, 1))}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#root{height:100%}:focus-visible{outline:2px solid #3730a3;outline-offset:2px}.last\:border-r-0:last-child{border-right-width:0px}.hover\:border-brand-500:hover{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.hover\:border-red-300:hover{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:border-slate-400:hover{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-100:hover{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-50:hover{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-100:hover{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-600:hover{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-700:hover{--tw-bg-opacity: 1;background-color:rgb(190 18 60 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-300:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-brand-600:hover{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.hover\:text-emerald-900:hover{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\:text-red-900:hover{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.hover\:text-rose-600:hover{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.hover\:text-rose-700:hover{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.hover\:text-rose-900:hover{--tw-text-opacity: 1;color:rgb(136 19 55 / var(--tw-text-opacity, 1))}.hover\:text-slate-700:hover{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.hover\:text-slate-800:hover{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-70:hover{opacity:.7}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:fixed:focus{position:fixed}.focus\:left-2:focus{left:.5rem}.focus\:top-2:focus{top:.5rem}.focus\:z-50:focus{z-index:50}.focus\:rounded:focus{border-radius:.25rem}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus\:px-3:focus{padding-left:.75rem;padding-right:.75rem}.focus\:py-1\.5:focus{padding-top:.375rem;padding-bottom:.375rem}.focus\:text-slate-900:focus{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.focus\:shadow:focus{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline:focus{outline-style:solid}.focus\:outline-2:focus{outline-width:2px}.focus\:outline-brand-500:focus{outline-color:#4f46e5}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-1:focus-visible{outline-offset:1px}.focus-visible\:outline-brand-500:focus-visible{outline-color:#4f46e5}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-50:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.disabled\:text-slate-500:disabled{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=active\]\:border-b-2[data-state=active]{border-bottom-width:2px}.data-\[state\=active\]\:border-brand-500[data-state=active]{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.data-\[state\=active\]\:text-brand-700[data-state=active]{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}@media (prefers-reduced-motion: reduce){.motion-reduce\:animate-none{animation:none}}@media (min-width: 640px){.sm\:p-6{padding:1.5rem}}
@@ -3,16 +3,16 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <title>wcagcheckr</title>
6
- <script type="module" crossorigin src="/assets/devtools-panel-CbbT30gK.js"></script>
6
+ <script type="module" crossorigin src="/assets/devtools-panel-CXQX1G5r.js"></script>
7
7
  <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
8
8
  <link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-Cpj98o6Y.js">
9
9
  <link rel="modulepreload" crossorigin href="/assets/crash-reporter-Dc5lvxvY.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/state-PELIq3oj.js">
11
- <link rel="modulepreload" crossorigin href="/assets/styles-BQt6R4jA.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/styles-CQEpK17b.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-D7HrI6pR.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/forensic-log-BhEDrPEy.js">
14
- <link rel="modulepreload" crossorigin href="/assets/ErrorBoundary-BkUd_ynj.js">
15
- <link rel="stylesheet" crossorigin href="/assets/styles-B2kGiUw-.css">
14
+ <link rel="modulepreload" crossorigin href="/assets/ErrorBoundary-BxF2xduT.js">
15
+ <link rel="stylesheet" crossorigin href="/assets/styles-DLXlcjb3.css">
16
16
  </head>
17
17
  <body class="bg-slate-50">
18
18
  <div id="root"></div>
@@ -2,8 +2,8 @@
2
2
  "manifest_version": 3,
3
3
  "name": "wcagcheckr",
4
4
  "description": "Audit components across hover, focus, dark mode, forced colors, RTL — every state your users actually encounter. Per-component baselines surface only NEW violations.",
5
- "version": "1.0.0.57",
6
- "version_name": "1.0.0-rc.57",
5
+ "version": "1.0.0.58",
6
+ "version_name": "1.0.0-rc.58",
7
7
  "author": "Locustware",
8
8
  "homepage_url": "https://wcagcheckr.com",
9
9
  "icons": {
@@ -4,15 +4,15 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>wcagcheckr — Settings</title>
7
- <script type="module" crossorigin src="/assets/options-CXKmEUbk.js"></script>
7
+ <script type="module" crossorigin src="/assets/options-BG8a6Hxm.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
9
9
  <link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-Cpj98o6Y.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/crash-reporter-Dc5lvxvY.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/state-PELIq3oj.js">
12
- <link rel="modulepreload" crossorigin href="/assets/styles-BQt6R4jA.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/styles-CQEpK17b.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/ai-usage-log-Dj9Ub_DT.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/custom-rules-CAe0nbES.js">
15
- <link rel="stylesheet" crossorigin href="/assets/styles-B2kGiUw-.css">
15
+ <link rel="stylesheet" crossorigin href="/assets/styles-DLXlcjb3.css">
16
16
  </head>
17
17
  <body class="m-0 p-0 bg-slate-50">
18
18
  <div id="root"></div>
@@ -4,16 +4,16 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>WCAG Component Auditor</title>
7
- <script type="module" crossorigin src="/assets/side-panel-DqamZjz9.js"></script>
7
+ <script type="module" crossorigin src="/assets/side-panel-Ds82Qs4x.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
9
9
  <link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-Cpj98o6Y.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/crash-reporter-Dc5lvxvY.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/state-PELIq3oj.js">
12
- <link rel="modulepreload" crossorigin href="/assets/styles-BQt6R4jA.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/styles-CQEpK17b.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-D7HrI6pR.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/forensic-log-BhEDrPEy.js">
15
- <link rel="modulepreload" crossorigin href="/assets/ErrorBoundary-BkUd_ynj.js">
16
- <link rel="stylesheet" crossorigin href="/assets/styles-B2kGiUw-.css">
15
+ <link rel="modulepreload" crossorigin href="/assets/ErrorBoundary-BxF2xduT.js">
16
+ <link rel="stylesheet" crossorigin href="/assets/styles-DLXlcjb3.css">
17
17
  </head>
18
18
  <body class="m-0 p-0">
19
19
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wcag-checkr/ci",
3
- "version": "1.0.0-rc.57",
3
+ "version": "1.0.0-rc.58",
4
4
  "private": false,
5
5
  "description": "Headless wcagcheckr accessibility audit runner for CI/CD pipelines. Drives the wcagcheckr Chrome extension via Playwright, runs full-page audits across the state matrix (108 combinations: hover, focus, dark mode, RTL, breakpoints), outputs JSON / SARIF / JUnit, exits with severity-aware codes.",
6
6
  "license": "UNLICENSED",