@siteping/widget 0.9.10 → 0.9.12

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,28 +1,28 @@
1
- function c(o){let s=document.createRange().createContextualFragment(o).firstElementChild;if(!s||s.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let r of [...s.attributes])r.name.startsWith("on")&&s.removeAttribute(r.name);for(let r of s.querySelectorAll("*"))for(let i of [...r.attributes])i.name.startsWith("on")&&r.removeAttribute(i.name);return s}function n(o,e){let t=document.createElement(o);if(e)for(let[s,r]of Object.entries(e))s==="class"?t.className=r:s==="style"?t.style.cssText=r:t.setAttribute(s,r);return t}function a(o,e){o.textContent=e;}function L(o){let e=Array.from(o.childNodes).map(t=>t.cloneNode(true));return o.disabled=true,o.replaceChildren(n("div",{class:"sp-spinner sp-spinner--sm"})),()=>{o.replaceChildren(...e),o.disabled=false;}}function Re(o,e="en"){let t=Date.now()-new Date(o).getTime(),s=Math.floor(t/1e3);if(s<60)return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"second");let r=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),i=Math.floor(s/60);if(i<60)return r.format(-i,"minute");let l=Math.floor(i/60);if(l<24)return r.format(-l,"hour");let d=Math.floor(l/24);return d<7?r.format(-d,"day"):new Date(o).toLocaleDateString(e)}var Oe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',Fe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',Ne='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>',je='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',De='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',_e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',$e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Pe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',Ie='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',ze='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 9h2"/><path d="M3 9h2"/><path d="M19 13h2"/><path d="M3 13h2"/><path d="M19 17h2"/><path d="M3 17h2"/><path d="M10 2h4"/></svg>',Ge='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',Ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>',Ye='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/></svg>',qe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',Ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',Qe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>';var F="#0066ff",J=/^#[0-9a-fA-F]{6}$/,O=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,Z=/^#[0-9a-fA-F]{8}$/;function ee(o){if(J.test(o))return o;let e=O.test(o)?o.match(O):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:Z.test(o)?o.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${o}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),F)}function te(o,e){let t=Math.max(0,Math.round(parseInt(o.slice(1,3),16)*(1-e))),s=Math.max(0,Math.round(parseInt(o.slice(3,5),16)*(1-e))),r=Math.max(0,Math.round(parseInt(o.slice(5,7),16)*(1-e)));return `#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function se(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function oe(o){return o==="dark"||o==="auto"&&se()?"dark":"light"}function Xe(o=F,e){let t=ee(o),s=te(t,.15);return oe(e)==="dark"?{accent:t,accentLight:t+"22",accentDark:s,accentGlow:t+"44",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.78)",glassBgHeavy:"rgba(15, 23, 42, 0.88)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#94a3b8",statusResolvedBg:"rgba(148, 163, 184, 0.15)"}:{accent:t,accentLight:t+"14",accentDark:s,accentGlow:t+"33",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#3b82f6",typeChange:"#b45309",typeBug:"#ef4444",typeOther:"#64748b",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#16a34a",statusOpenBg:"#f0fdf4",statusResolved:"#64748b",statusResolvedBg:"#f1f5f9"}}function A(o,e){switch(o){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function N(o,e){switch(o){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function Je(o){return `
2
- --sp-accent: ${o.accent};
3
- --sp-accent-light: ${o.accentLight};
4
- --sp-accent-dark: ${o.accentDark};
5
- --sp-accent-glow: ${o.accentGlow};
6
- --sp-accent-gradient: ${o.accentGradient};
7
- --sp-bg: ${o.bg};
8
- --sp-bg-hover: ${o.bgHover};
9
- --sp-text: ${o.text};
10
- --sp-text-secondary: ${o.textSecondary};
11
- --sp-text-tertiary: ${o.textTertiary};
12
- --sp-border: ${o.border};
13
- --sp-shadow: ${o.shadow};
14
- --sp-glass-bg: ${o.glassBg};
15
- --sp-glass-bg-heavy: ${o.glassBgHeavy};
16
- --sp-glass-border: ${o.glassBorder};
17
- --sp-glass-border-subtle: ${o.glassBorderSubtle};
18
- --sp-type-question: ${o.typeQuestion};
19
- --sp-type-change: ${o.typeChange};
20
- --sp-type-bug: ${o.typeBug};
21
- --sp-type-other: ${o.typeOther};
22
- --sp-type-question-bg: ${o.typeQuestionBg};
23
- --sp-type-change-bg: ${o.typeChangeBg};
24
- --sp-type-bug-bg: ${o.typeBugBg};
25
- --sp-type-other-bg: ${o.typeOtherBg};
1
+ function c(t){let s=document.createRange().createContextualFragment(t).firstElementChild;if(!s||s.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let r of [...s.attributes])r.name.startsWith("on")&&s.removeAttribute(r.name);for(let r of s.querySelectorAll("*"))for(let i of [...r.attributes])i.name.startsWith("on")&&r.removeAttribute(i.name);return s}function o(t,e){let n=document.createElement(t);if(e)for(let[s,r]of Object.entries(e))s==="class"?n.className=r:s==="style"?n.style.cssText=r:n.setAttribute(s,r);return n}function a(t,e){t.textContent=e;}function R(t){let e=Array.from(t.childNodes).map(n=>n.cloneNode(true));return t.disabled=true,t.replaceChildren(o("div",{class:"sp-spinner sp-spinner--sm"})),()=>{t.replaceChildren(...e),t.disabled=false;}}function $e(t,e="en"){let n=Date.now()-new Date(t).getTime(),s=Math.floor(n/1e3);if(s<60)return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"second");let r=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),i=Math.floor(s/60);if(i<60)return r.format(-i,"minute");let l=Math.floor(i/60);if(l<24)return r.format(-l,"hour");let d=Math.floor(l/24);return d<7?r.format(-d,"day"):new Date(t).toLocaleDateString(e)}var ze='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',Ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',Ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>',Ye='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',Ge='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',qe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',We='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Xe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',Qe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',Je='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Ze='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 9h2"/><path d="M3 9h2"/><path d="M19 13h2"/><path d="M3 13h2"/><path d="M19 17h2"/><path d="M3 17h2"/><path d="M10 2h4"/></svg>',et='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',tt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>',st='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/></svg>',nt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',rt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',ot='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>';var j="#0066ff",oe=/^#[0-9a-fA-F]{6}$/,I=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,ie=/^#[0-9a-fA-F]{8}$/;function ae(t){if(oe.test(t))return t;let e=I.test(t)?t.match(I):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:ie.test(t)?t.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${t}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),j)}function le(t,e){let n=Math.max(0,Math.round(parseInt(t.slice(1,3),16)*(1-e))),s=Math.max(0,Math.round(parseInt(t.slice(3,5),16)*(1-e))),r=Math.max(0,Math.round(parseInt(t.slice(5,7),16)*(1-e)));return `#${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function pe(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function de(t){return t==="dark"||t==="auto"&&pe()?"dark":"light"}function at(t=j,e){let n=ae(t),s=le(n,.15);return de(e)==="dark"?{accent:n,accentLight:n+"22",accentDark:s,accentGlow:n+"44",accentGradient:`linear-gradient(135deg, ${n}, ${s})`,bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.78)",glassBgHeavy:"rgba(15, 23, 42, 0.88)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#94a3b8",statusResolvedBg:"rgba(148, 163, 184, 0.15)"}:{accent:n,accentLight:n+"14",accentDark:s,accentGlow:n+"33",accentGradient:`linear-gradient(135deg, ${n}, ${s})`,bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#3b82f6",typeChange:"#b45309",typeBug:"#ef4444",typeOther:"#64748b",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#16a34a",statusOpenBg:"#f0fdf4",statusResolved:"#64748b",statusResolvedBg:"#f1f5f9"}}function M(t,e){switch(t){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function _(t,e){switch(t){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function lt(t){return `
2
+ --sp-accent: ${t.accent};
3
+ --sp-accent-light: ${t.accentLight};
4
+ --sp-accent-dark: ${t.accentDark};
5
+ --sp-accent-glow: ${t.accentGlow};
6
+ --sp-accent-gradient: ${t.accentGradient};
7
+ --sp-bg: ${t.bg};
8
+ --sp-bg-hover: ${t.bgHover};
9
+ --sp-text: ${t.text};
10
+ --sp-text-secondary: ${t.textSecondary};
11
+ --sp-text-tertiary: ${t.textTertiary};
12
+ --sp-border: ${t.border};
13
+ --sp-shadow: ${t.shadow};
14
+ --sp-glass-bg: ${t.glassBg};
15
+ --sp-glass-bg-heavy: ${t.glassBgHeavy};
16
+ --sp-glass-border: ${t.glassBorder};
17
+ --sp-glass-border-subtle: ${t.glassBorderSubtle};
18
+ --sp-type-question: ${t.typeQuestion};
19
+ --sp-type-change: ${t.typeChange};
20
+ --sp-type-bug: ${t.typeBug};
21
+ --sp-type-other: ${t.typeOther};
22
+ --sp-type-question-bg: ${t.typeQuestionBg};
23
+ --sp-type-change-bg: ${t.typeChangeBg};
24
+ --sp-type-bug-bg: ${t.typeBugBg};
25
+ --sp-type-other-bg: ${t.typeOtherBg};
26
26
  --sp-radius: 12px;
27
27
  --sp-radius-lg: 16px;
28
28
  --sp-radius-xl: 20px;
@@ -35,7 +35,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
35
35
  --sp-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
36
36
  --sp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
37
37
  --sp-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
38
- `}var j={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedbacks","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedbacks for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedbacks","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.showLess":"Show less","panel.resolve":"Resolve","panel.reopen":"Reopen","panel.delete":"Delete","panel.cancel":"Cancel","panel.confirmDelete":"Delete","panel.loadMore":"Load more ({remaining} remaining)","panel.statusAll":"All","panel.statusOpen":"Open","panel.statusResolved":"Resolved","type.label":"Type","type.question":"Question","type.change":"Change","type.bug":"Bug","type.other":"Other","status.label":"Status","scope.label":"Scope","scope.thisPage":"This page","scope.thisType":"This type","scope.all":"All pages","fab.aria":"Siteping \u2014 Feedback menu","fab.messages":"Messages","fab.annotate":"Annotate","fab.annotations":"Annotations","annotator.instruction":"Draw a rectangle on the area to comment","annotator.cancel":"Cancel","popup.ariaLabel":"Feedback form","popup.placeholder":"Describe your feedback...","popup.textareaAria":"Feedback message","popup.submitHintMac":"\u2318+Enter to send","popup.submitHintOther":"Ctrl+Enter to send","popup.cancel":"Cancel","popup.submit":"Send","identity.title":"Identify yourself","identity.nameLabel":"Name","identity.namePlaceholder":"Your name","identity.emailLabel":"Email","identity.emailPlaceholder":"your@email.com","identity.cancel":"Cancel","identity.submit":"Continue","marker.approximate":"Approximate position (confidence: {confidence}%)","marker.aria":"Feedback #{number}: {type} \u2014 {message}","marker.count":"{count} feedback markers displayed","fab.badge":"{count} unresolved feedbacks","feedback.sent.confirmation":"Feedback sent successfully","feedback.error.message":"Failed to send feedback","feedback.deleted.confirmation":"Feedback deleted","badge.count":"{count} unresolved feedbacks","bulk.selectAll":"Select all","bulk.selected":"{count} selected","bulk.resolve":"Resolve","bulk.delete":"Delete","bulk.deselect":"Deselect","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.byType":"By type","sort.openFirst":"Open first","sort.label":"Sort","group.byPage":"By page","group.feedbacks":"{count} feedbacks","stats.open":"Open","stats.resolved":"Resolved","stats.bugs":"Bugs","stats.progress":"{percent}% resolved","detail.back":"Back","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Message","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot of the annotated area","detail.metadata":"Details","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Author","detail.date":"Created","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Resolved at","detail.goToAnnotation":"Go to annotation","detail.element":"Element","detail.selector":"Selector","detail.position":"Position","detail.resolve":"Resolve","detail.reopen":"Reopen","detail.delete":"Delete","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"Failed network","detail.diagnostics.expand":"Show diagnostics","detail.diagnostics.collapse":"Hide diagnostics","detail.diagnostics.noEntries":"No entries","shortcuts.title":"Keyboard shortcuts","shortcuts.navigate":"Navigate feedbacks","shortcuts.resolve":"Resolve / Reopen","shortcuts.delete":"Delete","shortcuts.search":"Focus search","shortcuts.select":"Toggle selection","shortcuts.help":"Show shortcuts","shortcuts.close":"Close","shortcuts.hint":"Keyboard shortcuts","export.label":"Export","export.csv":"Export CSV","export.json":"Export JSON"};var w={en:j},D=new Set(["de","es","fr","it","pt","ru"]);async function st(o){let e=(o.split("-")[0]??o).toLowerCase();if(w[e])return w[e];if(!D.has(e))return null;let t;switch(e){case "de":t=await import('./de-32TXJQIE.js');break;case "es":t=await import('./es-GFAPKPTK.js');break;case "fr":t=await import('./fr-W2JZ3EUC.js');break;case "it":t=await import('./it-GASU527B.js');break;case "pt":t=await import('./pt-AYXM6FG4.js');break;case "ru":t=await import('./ru-5DW2JCKR.js');break;default:return null}let s=t[e];return s?(w[e]=s,s):null}function ot(o){let e=(o.split("-")[0]??o).toLowerCase();return e!=="en"&&!w[e]&&!D.has(e)&&console.warn(`[siteping] Unknown locale "${o}", falling back to "en"`),t=>(w[e]??w.en??{})[t]??w.en?.[t]??t}function rt(o,e){switch(o){case "question":return e("type.question");case "change":return e("type.change");case "bug":return e("type.bug");case "other":return e("type.other");default:return o}}var re='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',ne='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>',ie='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H6a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2"/><path d="M16 3h2a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2"/></svg>',at=`
38
+ `}var S=class extends Error{code;retryable;constructor(e,n,s){super(e),this.code=n,this.retryable=s,this.name="SitepingError";}},F=class extends S{constructor(e){super(e,"NETWORK",true),this.name="SitepingNetworkError";}},P=class extends S{constructor(e){super(e,"VALIDATION",false),this.name="SitepingValidationError";}},O=class extends S{constructor(e){super(e,"AUTH",false),this.name="SitepingAuthError";}};function $(t){return typeof t=="object"&&t!==null}function ce(t,e){return $(t)&&e in t}var N=["en","fr","de","es","it","pt","ru"];function ue(t){return {cssSelector:t.anchor.cssSelector,xpath:t.anchor.xpath,textSnippet:t.anchor.textSnippet,elementTag:t.anchor.elementTag,elementId:t.anchor.elementId,textPrefix:t.anchor.textPrefix,textSuffix:t.anchor.textSuffix,fingerprint:t.anchor.fingerprint,neighborText:t.anchor.neighborText,anchorKey:t.anchor.anchorKey??null,xPct:t.rect.xPct,yPct:t.rect.yPct,wPct:t.rect.wPct,hPct:t.rect.hPct,scrollX:t.scrollX,scrollY:t.scrollY,viewportW:t.viewportW,viewportH:t.viewportH,devicePixelRatio:t.devicePixelRatio}}var K={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedbacks","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedbacks for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedbacks","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.showLess":"Show less","panel.resolve":"Resolve","panel.reopen":"Reopen","panel.delete":"Delete","panel.cancel":"Cancel","panel.confirmDelete":"Delete","panel.loadMore":"Load more ({remaining} remaining)","panel.statusAll":"All","panel.statusOpen":"Open","panel.statusResolved":"Resolved","type.label":"Type","type.question":"Question","type.change":"Change","type.bug":"Bug","type.other":"Other","status.label":"Status","scope.label":"Scope","scope.thisPage":"This page","scope.thisType":"This type","scope.all":"All pages","fab.aria":"Siteping \u2014 Feedback menu","fab.messages":"Messages","fab.annotate":"Annotate","fab.annotations":"Annotations","annotator.instruction":"Draw a rectangle on the area to comment","annotator.cancel":"Cancel","popup.ariaLabel":"Feedback form","popup.placeholder":"Describe your feedback...","popup.textareaAria":"Feedback message","popup.submitHintMac":"\u2318+Enter to send","popup.submitHintOther":"Ctrl+Enter to send","popup.cancel":"Cancel","popup.submit":"Send","identity.title":"Identify yourself","identity.nameLabel":"Name","identity.namePlaceholder":"Your name","identity.emailLabel":"Email","identity.emailPlaceholder":"your@email.com","identity.cancel":"Cancel","identity.submit":"Continue","marker.approximate":"Approximate position (confidence: {confidence}%)","marker.aria":"Feedback #{number}: {type} \u2014 {message}","marker.count":"{count} feedback markers displayed","fab.badge":"{count} unresolved feedbacks","feedback.sent.confirmation":"Feedback sent successfully","feedback.error.message":"Failed to send feedback","feedback.deleted.confirmation":"Feedback deleted","badge.count":"{count} unresolved feedbacks","bulk.selectAll":"Select all","bulk.selected":"{count} selected","bulk.resolve":"Resolve","bulk.delete":"Delete","bulk.deselect":"Deselect","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.byType":"By type","sort.openFirst":"Open first","sort.label":"Sort","group.byPage":"By page","group.feedbacks":"{count} feedbacks","stats.open":"Open","stats.resolved":"Resolved","stats.bugs":"Bugs","stats.progress":"{percent}% resolved","detail.back":"Back","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Message","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot of the annotated area","detail.metadata":"Details","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Author","detail.date":"Created","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Resolved at","detail.goToAnnotation":"Go to annotation","detail.element":"Element","detail.selector":"Selector","detail.position":"Position","detail.resolve":"Resolve","detail.reopen":"Reopen","detail.delete":"Delete","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"Failed network","detail.diagnostics.expand":"Show diagnostics","detail.diagnostics.collapse":"Hide diagnostics","detail.diagnostics.noEntries":"No entries","shortcuts.title":"Keyboard shortcuts","shortcuts.navigate":"Navigate feedbacks","shortcuts.resolve":"Resolve / Reopen","shortcuts.delete":"Delete","shortcuts.search":"Focus search","shortcuts.select":"Toggle selection","shortcuts.help":"Show shortcuts","shortcuts.close":"Close","shortcuts.hint":"Keyboard shortcuts","export.label":"Export","export.csv":"Export CSV","export.json":"Export JSON"};var E={en:K},he=new Set(N.filter(t=>t!=="en"));function z(t){return he.has(t)}function U(t){return (t.split("-")[0]??t).toLowerCase()}async function Tt(t){let e=U(t),n=E[e];if(n)return n;if(!z(e))return null;let s;switch(e){case "de":s=await import('./de-32TXJQIE.js');break;case "es":s=await import('./es-GFAPKPTK.js');break;case "fr":s=await import('./fr-W2JZ3EUC.js');break;case "it":s=await import('./it-GASU527B.js');break;case "pt":s=await import('./pt-AYXM6FG4.js');break;case "ru":s=await import('./ru-5DW2JCKR.js');break;default:return null}let r=s[e];return r?(E[e]=r,r):null}function Bt(t){let e=U(t);return e!=="en"&&!E[e]&&!z(e)&&console.warn(`[siteping] Unknown locale "${t}", falling back to "en"`),n=>(E[e]??E.en)?.[n]??E.en?.[n]??n}function At(t,e){switch(t){case "question":return e("type.question");case "change":return e("type.change");case "bug":return e("type.bug");case "other":return e("type.other");default:return t}}var ge='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',be='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>',ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H6a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2"/><path d="M16 3h2a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2"/></svg>',Mt=`
39
39
  /* ============================
40
40
  Export Button & Menu
41
41
  ============================ */
@@ -153,9 +153,9 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
153
153
  outline: 3px solid Highlight !important;
154
154
  }
155
155
  }
156
- `,_=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function ae(o){return o.includes('"')||o.includes(",")||o.includes(`
157
- `)||o.includes("\r")?`"${o.replace(/"/g,'""')}"`:o}function le(o){let e=_.join(","),t=o.map(s=>_.map(r=>{let i=s[r];return ae(i==null?"":String(i))}).join(","));return [e,...t].join(`
158
- `)}function pe(o){return JSON.stringify(o,null,2)}function $(o,e,t){let s=new Blob([o],{type:t}),r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=e,i.style.display="none",document.body.appendChild(i),i.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(r),i.remove();});}var P=class{constructor(e,t,s){this.getFeedbacks=t;this.element=n("div",{style:"position: relative; display: inline-flex;"});let r=document.createElement("button");r.className="sp-export-btn",r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(c(re));let i=document.createElement("span");a(i,s("export.label")),r.appendChild(i),r.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=n("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(ne,s("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ie,s("export.json"),()=>{this.exportAs("json");});this.menu.appendChild(l),this.menu.appendChild(d),this.element.appendChild(r),this.element.appendChild(this.menu),this.onDocumentClick=p=>{this.isOpen&&!this.element.contains(p.target)&&this.close();},document.addEventListener("click",this.onDocumentClick,true);}getFeedbacks;element;menu;isOpen=false;onDocumentClick;createOption(e,t,s){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let i=n("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=n("span",{class:"sp-export-option-label"});return a(l,t),r.appendChild(i),r.appendChild(l),r.addEventListener("click",d=>{d.stopPropagation(),s(),this.close();}),r}toggle(){this.isOpen?this.close():this.open();}open(){this.isOpen=true,this.menu.classList.add("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","true");}close(){this.isOpen=false,this.menu.classList.remove("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","false");}exportAs(e){let t=this.getFeedbacks();if(t.length===0)return;let s=t[0]?.projectName??"feedbacks",r=new Date().toISOString().slice(0,10),i=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=le(t);$(l,`feedbacks-${i}-${r}.csv`,"text/csv;charset=utf-8");}else {let l=pe(t);$(l,`feedbacks-${i}-${r}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var T='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="2"/></svg>',I='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" fill="url(#sp-cb-grad)" stroke="none"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="sp-cb-grad" x1="0" y1="0" x2="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="var(--sp-accent)"/><stop offset="100%" stop-color="var(--sp-accent-dark)"/></linearGradient></defs></svg>',dt=`
156
+ `,V=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function xe(t){return t.includes('"')||t.includes(",")||t.includes(`
157
+ `)||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t}function fe(t){let e=V.join(","),n=t.map(s=>V.map(r=>{let i=s[r];return xe(i==null?"":String(i))}).join(","));return [e,...n].join(`
158
+ `)}function me(t){return JSON.stringify(t,null,2)}function Y(t,e,n){let s=new Blob([t],{type:n}),r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=e,i.style.display="none",document.body.appendChild(i),i.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(r),i.remove();});}var G=class{constructor(e,n,s){this.getFeedbacks=n;this.element=o("div",{style:"position: relative; display: inline-flex;"});let r=document.createElement("button");r.className="sp-export-btn",r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(c(ge));let i=document.createElement("span");a(i,s("export.label")),r.appendChild(i),r.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=o("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(be,s("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ve,s("export.json"),()=>{this.exportAs("json");});this.menu.appendChild(l),this.menu.appendChild(d),this.element.appendChild(r),this.element.appendChild(this.menu),this.onDocumentClick=p=>{this.isOpen&&!this.element.contains(p.target)&&this.close();},document.addEventListener("click",this.onDocumentClick,true);}getFeedbacks;element;menu;isOpen=false;onDocumentClick;createOption(e,n,s){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let i=o("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=o("span",{class:"sp-export-option-label"});return a(l,n),r.appendChild(i),r.appendChild(l),r.addEventListener("click",d=>{d.stopPropagation(),s(),this.close();}),r}toggle(){this.isOpen?this.close():this.open();}open(){this.isOpen=true,this.menu.classList.add("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","true");}close(){this.isOpen=false,this.menu.classList.remove("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","false");}exportAs(e){let n=this.getFeedbacks();if(n.length===0)return;let s=n[0]?.projectName??"feedbacks",r=new Date().toISOString().slice(0,10),i=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=fe(n);Y(l,`feedbacks-${i}-${r}.csv`,"text/csv;charset=utf-8");}else {let l=me(n);Y(l,`feedbacks-${i}-${r}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var B='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="2"/></svg>',q='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" fill="url(#sp-cb-grad)" stroke="none"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="sp-cb-grad" x1="0" y1="0" x2="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="var(--sp-accent)"/><stop offset="100%" stop-color="var(--sp-accent-dark)"/></linearGradient></defs></svg>',Ot=`
159
159
  /* ============================
160
160
  Bulk Checkbox
161
161
  ============================ */
@@ -453,7 +453,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
453
453
  transition-duration: 0.01ms !important;
454
454
  }
455
455
  }
456
- `,z=class{constructor(e,t,s){this.callbacks=t;this.t=s,this.barElement=n("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=n("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let r=n("div",{class:"sp-bulk-bar-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.className="sp-bulk-btn-resolve",this.resolveBtn.type="button",this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.className="sp-bulk-btn-delete",this.deleteBtn.type="button",this.deleteBtn.addEventListener("click",()=>this.handleDelete());let i=document.createElement("button");i.className="sp-bulk-btn-deselect",i.type="button",i.setAttribute("aria-label",this.t("bulk.deselect")),i.appendChild(c('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>')),i.addEventListener("click",()=>this.deselectAll()),r.appendChild(this.resolveBtn),r.appendChild(this.deleteBtn),r.appendChild(i),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(r),this.updateButtonLabels();}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=false;t;createCheckbox(e){let t=n("div",{class:"sp-bulk-checkbox"});return t.setAttribute("role","checkbox"),t.setAttribute("aria-checked","false"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`Select feedback ${e}`),t.appendChild(c(T)),t.addEventListener("click",s=>{s.stopPropagation(),this.toggle(e);}),t.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),s.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,t),t}createSelectAllBar(e,t){let s=n("div",{class:"sp-bulk-select-all"}),r=n("div",{class:"sp-bulk-checkbox"});r.appendChild(c(T)),this.selectAllCheckbox=r;let i=n("span");return a(i,t),s.appendChild(r),s.appendChild(i),s.addEventListener("click",()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);}),s}setListContainer(e){this.listContainer=e;}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e));}selectAll(e){if(!this.isProcessing){for(let t of e)this.selected.add(t),this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let t of e)this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}get selectedIds(){return [...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=false,this.updateBar(),this.updateListSelectionClass();}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove();}updateBar(){let e=this.selected.size,t=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",t),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,t=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");a(r,e>0?`${t} ${e}`:t),this.resolveBtn.appendChild(r),this.deleteBtn.replaceChildren();let i=document.createElement("span");a(i,e>0?`${s} ${e}`:s),this.deleteBtn.appendChild(i);}updateCheckbox(e){let t=this.checkboxMap.get(e);if(!t)return;let s=this.selected.has(e);t.classList.toggle("sp-bulk-checkbox--checked",s),t.setAttribute("aria-checked",String(s)),t.replaceChildren(),t.appendChild(c(s?I:T));}updateSelectAllCheckbox(){if(!this.selectAllCheckbox)return;let e=this.selected.size>0&&this.selected.size===this.checkboxMap.size;this.selectAllCheckbox.classList.toggle("sp-bulk-checkbox--checked",e),this.selectAllCheckbox.setAttribute("aria-checked",String(e)),this.selectAllCheckbox.replaceChildren(),this.selectAllCheckbox.appendChild(c(e?I:T));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let t=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);s&&s.classList.toggle("sp-card--selected",this.selected.has(e));}async handleResolve(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{t(),this.deleteBtn.disabled=false;}finally{this.isProcessing=false;}}async handleDelete(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{t(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var de='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>',R='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>',ce='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',he='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>',ge='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>',H='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',V='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',G='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>',be='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="22" y1="12" x2="18" y2="12"/><line x1="6" y1="12" x2="2" y2="12"/><line x1="12" y1="6" x2="12" y2="2"/><line x1="12" y1="22" x2="12" y2="18"/></svg>',xe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',fe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',gt=`
456
+ `,W=class{constructor(e,n,s){this.callbacks=n;this.t=s,this.barElement=o("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=o("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let r=o("div",{class:"sp-bulk-bar-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.className="sp-bulk-btn-resolve",this.resolveBtn.type="button",this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.className="sp-bulk-btn-delete",this.deleteBtn.type="button",this.deleteBtn.addEventListener("click",()=>this.handleDelete());let i=document.createElement("button");i.className="sp-bulk-btn-deselect",i.type="button",i.setAttribute("aria-label",this.t("bulk.deselect")),i.appendChild(c('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>')),i.addEventListener("click",()=>this.deselectAll()),r.appendChild(this.resolveBtn),r.appendChild(this.deleteBtn),r.appendChild(i),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(r),this.updateButtonLabels();}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=false;t;createCheckbox(e){let n=o("div",{class:"sp-bulk-checkbox"});return n.setAttribute("role","checkbox"),n.setAttribute("aria-checked","false"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label",`Select feedback ${e}`),n.appendChild(c(B)),n.addEventListener("click",s=>{s.stopPropagation(),this.toggle(e);}),n.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),s.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,n),n}createSelectAllBar(e,n){let s=o("div",{class:"sp-bulk-select-all"}),r=o("div",{class:"sp-bulk-checkbox"});r.appendChild(c(B)),this.selectAllCheckbox=r;let i=o("span");return a(i,n),s.appendChild(r),s.appendChild(i),s.addEventListener("click",()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);}),s}setListContainer(e){this.listContainer=e;}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e));}selectAll(e){if(!this.isProcessing){for(let n of e)this.selected.add(n),this.updateCheckbox(n),this.updateCardSelectedState(n);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let n of e)this.updateCheckbox(n),this.updateCardSelectedState(n);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}get selectedIds(){return [...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=false,this.updateBar(),this.updateListSelectionClass();}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove();}updateBar(){let e=this.selected.size,n=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",n),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,n=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");a(r,e>0?`${n} ${e}`:n),this.resolveBtn.appendChild(r),this.deleteBtn.replaceChildren();let i=document.createElement("span");a(i,e>0?`${s} ${e}`:s),this.deleteBtn.appendChild(i);}updateCheckbox(e){let n=this.checkboxMap.get(e);if(!n)return;let s=this.selected.has(e);n.classList.toggle("sp-bulk-checkbox--checked",s),n.setAttribute("aria-checked",String(s)),n.replaceChildren(),n.appendChild(c(s?q:B));}updateSelectAllCheckbox(){if(!this.selectAllCheckbox)return;let e=this.selected.size>0&&this.selected.size===this.checkboxMap.size;this.selectAllCheckbox.classList.toggle("sp-bulk-checkbox--checked",e),this.selectAllCheckbox.setAttribute("aria-checked",String(e)),this.selectAllCheckbox.replaceChildren(),this.selectAllCheckbox.appendChild(c(e?q:B));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let n=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${n}"]`);s&&s.classList.toggle("sp-card--selected",this.selected.has(e));}async handleResolve(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],n=R(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{n(),this.deleteBtn.disabled=false;}finally{this.isProcessing=false;}}async handleDelete(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],n=R(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{n(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var ye='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>',D='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>',ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',Ce='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',we='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>',Se='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>',H='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',X='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',Q='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>',Ee='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',Te='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="22" y1="12" x2="18" y2="12"/><line x1="6" y1="12" x2="2" y2="12"/><line x1="12" y1="6" x2="12" y2="2"/><line x1="12" y1="22" x2="12" y2="18"/></svg>',Be='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',Ae='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',It=`
457
457
  /* ============================
458
458
  Detail View \u2014 Panel-in-Panel
459
459
  ============================ */
@@ -1165,7 +1165,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1165
1165
  animation-duration: 0.01ms !important;
1166
1166
  }
1167
1167
  }
1168
- `;function me(o){if(/Edg\//i.test(o)){let e=o.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(o)||/Opera/i.test(o)){let e=o.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(o)){let e=o.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(o)&&!/Chromium/i.test(o)){let e=o.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(o)&&!/Chrome/i.test(o)){let e=o.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function U(o,e){try{return new Date(o).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return o}}function ye(o){try{return new URL(o).pathname}catch{return o}}function ke(o){return !!(/^data:image\/(jpeg|png|webp);/i.test(o)||/^https:\/\//i.test(o))}function S(o,e){return o.length<=e?o:o.slice(0,e-1)+"\u2026"}function Ce(o){if(!o)return false;let e=Array.isArray(o.console)?o.console.length:0,t=Array.isArray(o.network)?o.network.length:0;return e>0||t>0}function we(o){return !Number.isFinite(o)||o<0?"\u2014":o<1e3?`${Math.round(o)} ms`:`${(o/1e3).toFixed(1)} s`}var Y=class{constructor(e,t,s,r){this.colors=e;this.callbacks=t;this.t=s,this.locale=r,this.element=n("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=n("div",{class:"sp-detail-header"}),l=document.createElement("button");l.type="button",l.className="sp-detail-back",l.setAttribute("aria-label",this.t("detail.back")),l.appendChild(c(de)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=n("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;element;_isVisible=false;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;isProcessing=false;show(e,t){this.currentFeedback=e,this.isProcessing=false;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let r=s.querySelector(".sp-detail-back");if(!r)return;s.replaceChildren(r);let i=n("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(t))),s.appendChild(i);let l=n("span",{class:"sp-badge"});l.style.background=N(e.type,this.colors),l.style.color=A(e.type,this.colors),a(l,e.type),s.appendChild(l),this.content.replaceChildren();let d=0,p=this.buildSection(d++);this.buildStatusActions(p,e),this.content.appendChild(p);let u=this.buildSection(d++),h=n("div",{class:"sp-detail-section-title"});a(h,this.t("detail.message")),u.appendChild(h);let v=n("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=A(e.type,this.colors),a(v,e.message),u.appendChild(v),this.content.appendChild(u),e.screenshotUrl&&ke(e.screenshotUrl)){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});a(x,this.t("detail.screenshot")),g.appendChild(x);let b=document.createElement("img");b.className="sp-detail-screenshot",b.src=e.screenshotUrl,b.alt=this.t("detail.screenshotAlt"),b.loading="lazy",b.referrerPolicy="no-referrer",g.appendChild(b),this.content.appendChild(g);}let m=this.buildSection(d++),f=n("div",{class:"sp-detail-section-title"});if(a(f,this.t("detail.metadata")),m.appendChild(f),this.buildMetadata(m,e),this.content.appendChild(m),e.annotations.length>0){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});x.appendChild(c(R));let b=n("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Ce(e.diagnostics)){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});x.appendChild(c(fe));let b=n("span");a(b,this.t("detail.diagnostics")),x.appendChild(b),g.appendChild(x),this.buildDiagnostics(g,e),this.content.appendChild(g);}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),requestAnimationFrame(()=>{r.focus();});}hide(){this._isVisible&&(this._isVisible=false,this.element.classList.remove("sp-detail--visible"),this.element.setAttribute("aria-hidden","true"),this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null);}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let t=n("div",{class:"sp-detail-section"});return t.style.animationDelay=`${e*40}ms`,t}buildStatusActions(e,t){let s=t.status==="resolved",r=n("div",{class:"sp-detail-section-title"});a(r,this.t("detail.status")),e.appendChild(r);let i=n("div",{class:"sp-detail-status"}),l=n("span",{class:`sp-detail-status-pill ${s?"sp-detail-status-pill--resolved":"sp-detail-status-pill--open"}`}),d=n("span",{class:"sp-detail-status-dot"});d.style.background=s?"#9ca3af":"#22c55e",l.appendChild(d);let p=n("span");a(p,s?this.t("detail.reopen"):this.t("detail.resolve")),a(p,s?"Resolved":"Open"),l.appendChild(p),i.appendChild(l),e.appendChild(i);let u=n("div",{class:"sp-detail-actions"});if(this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",s){this.resolveBtn.className="sp-detail-btn-reopen",this.resolveBtn.appendChild(c(V));let v=document.createElement("span");a(v,this.t("detail.reopen")),this.resolveBtn.appendChild(v);}else {this.resolveBtn.className="sp-detail-btn-resolve",this.resolveBtn.appendChild(c(H));let v=document.createElement("span");a(v,this.t("detail.resolve")),this.resolveBtn.appendChild(v);}this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.deleteBtn.appendChild(c(G));let h=document.createElement("span");a(h,this.t("detail.delete")),this.deleteBtn.appendChild(h),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),u.appendChild(this.resolveBtn),u.appendChild(this.deleteBtn),e.appendChild(u);}buildMetadata(e,t){let s=n("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,ce,this.t("detail.page"),()=>{let r=n("div",{class:"sp-detail-meta-value"}),i=ye(t.url);return a(r,S(i,60)),r.title=t.url,r}),this.addMetaRow(s,he,this.t("detail.author"),()=>{let r=n("div",{class:"sp-detail-meta-value"}),i=t.authorName||"Anonymous",l=t.authorEmail;return a(r,l?`${i} (${l})`:i),r}),this.addMetaRow(s,ue,this.t("detail.date"),()=>{let r=n("div",{class:"sp-detail-meta-value"});return a(r,U(t.createdAt,this.locale.startsWith("fr")?"fr":"en")),r}),this.addMetaRow(s,ge,this.t("detail.viewport"),()=>{let r=n("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(r,t.viewport||"Unknown"),r}),this.addMetaRow(s,'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',this.t("detail.browser"),()=>{let r=n("div",{class:"sp-detail-meta-value"});return a(r,me(t.userAgent)),r}),t.resolvedAt){let r=t.resolvedAt;this.addMetaRow(s,H,this.t("detail.resolvedAt"),()=>{let i=n("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(i,U(r,this.locale.startsWith("fr")?"fr":"en")),i});}e.appendChild(s);}addMetaRow(e,t,s,r){let i=n("div",{class:"sp-detail-meta-row"});i.appendChild(c(t));let l=n("div",{class:"sp-detail-meta-content"}),d=n("div",{class:"sp-detail-meta-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,t){let s=t.annotations[0];if(!s)return;let r=n("div",{class:"sp-detail-annotation"}),i=n("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,be,this.t("detail.element"),()=>{let p=n("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),u=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return a(p,u),p}),this.addAnnotationRow(i,ve,this.t("detail.selector"),()=>{let p=n("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,S(s.cssSelector,60)),p.title=s.cssSelector,p}),this.addAnnotationRow(i,R,this.t("detail.position"),()=>{let p=n("span",{class:"sp-detail-annotation-value"});return a(p,`${s.xPct.toFixed(1)}%, ${s.yPct.toFixed(1)}%`+(s.wPct>0||s.hPct>0?` (${s.wPct.toFixed(1)}% \xD7 ${s.hPct.toFixed(1)}%)`:"")),p}),r.appendChild(i);let l=document.createElement("button");l.type="button",l.className="sp-detail-btn-goto",l.appendChild(c(R));let d=document.createElement("span");a(d,this.t("detail.goToAnnotation")),l.appendChild(d),l.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),r.appendChild(l),e.appendChild(r);}buildDiagnostics(e,t){let s=t.diagnostics;if(!s)return;let r=Array.isArray(s.console)?s.console:[],i=Array.isArray(s.network)?s.network:[],l=r.filter(x=>x.level==="error").length,d=n("div",{class:"sp-detail-diag"}),p=document.createElement("button");p.type="button",p.className="sp-detail-diag-toggle",p.setAttribute("aria-expanded","false"),p.setAttribute("aria-label",this.t("detail.diagnostics.expand"));let u=document.createElement("span"),h=document.createElement("span");h.style.display="inline-flex",h.style.alignItems="center",h.style.gap="8px",h.appendChild(c(xe)),a(u,this.t("detail.diagnostics")),h.appendChild(u),p.appendChild(h);let v=n("span",{class:"sp-detail-diag-counts"}),m=n("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(m,`${r.length} console`);let f=n("span",{class:`sp-detail-diag-count${i.length>0?" sp-detail-diag-count--errors":""}`});a(f,`${i.length} net`),v.appendChild(m),v.appendChild(f),p.appendChild(v);let g=n("div",{class:"sp-detail-diag-body"});if(r.length>0){let x=document.createElement("div"),b=n("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.console")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of r){let k=document.createElement("li"),E=n("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(E,y.level);let B=n("span",{class:"sp-detail-diag-message"});a(B,S(y.message,240)),B.title=y.message,k.appendChild(E),k.appendChild(B),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=n("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.network")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of i){let k=document.createElement("li");k.classList.add("sp-detail-diag-net");let E=n("span",{class:"sp-detail-diag-net-status"});a(E,y.status===0?"ERR":String(y.status));let B=n("span",{class:"sp-detail-diag-net-method"});a(B,y.method);let M=n("span",{class:"sp-detail-diag-net-url"});a(M,S(y.url,120)),M.title=`${y.url} \u2014 ${we(y.durationMs)}`,k.appendChild(E),k.appendChild(B),k.appendChild(M),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}p.addEventListener("click",()=>{let b=!(p.getAttribute("aria-expanded")==="true");p.setAttribute("aria-expanded",String(b)),p.setAttribute("aria-label",b?this.t("detail.diagnostics.collapse"):this.t("detail.diagnostics.expand")),g.classList.toggle("sp-detail-diag-body--open",b);}),d.appendChild(p),d.appendChild(g),e.appendChild(d);}addAnnotationRow(e,t,s,r){let i=n("div",{class:"sp-detail-annotation-row"});i.appendChild(c(t));let l=n("div",{class:"sp-detail-meta-content"}),d=n("div",{class:"sp-detail-annotation-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}async handleResolve(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.resolveBtn&&this.setButtonLoading(this.resolveBtn),this.deleteBtn&&(this.deleteBtn.disabled=true);try{await this.callbacks.onResolve(this.currentFeedback);}catch{this.isProcessing=false,this.resolveBtn&&this.restoreResolveBtn(this.currentFeedback),this.deleteBtn&&(this.deleteBtn.disabled=false);}}}async handleDelete(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.deleteBtn&&this.setButtonLoading(this.deleteBtn),this.resolveBtn&&(this.resolveBtn.disabled=true);try{await this.callbacks.onDelete(this.currentFeedback);}catch{this.isProcessing=false,this.deleteBtn&&this.restoreDeleteBtn(),this.resolveBtn&&(this.resolveBtn.disabled=false);}}}setButtonLoading(e){e.disabled=true,e.replaceChildren(n("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let t=e.status==="resolved";this.resolveBtn.appendChild(c(t?V:H));let s=document.createElement("span");a(s,t?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(s);}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=false,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(c(G));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Be='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 5h10"/><path d="M11 9h7"/><path d="M11 13h4"/><path d="M3 17l3 3 3-3"/><path d="M6 18V4"/></svg>',Q='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>',Ee='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',q={question:0,change:1,bug:2,other:3};function xt(o,e){let t=[...o];switch(e){case "newest":t.sort((s,r)=>new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":t.sort((s,r)=>new Date(s.createdAt).getTime()-new Date(r.createdAt).getTime());break;case "by-type":t.sort((s,r)=>{let i=q[s.type]??99,l=q[r.type]??99;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":t.sort((s,r)=>{let i=s.status==="open"?0:1,l=r.status==="open"?0:1;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return t}function Te(o){try{return new URL(o).pathname}catch{return o}}function Se(o,e){if(o.length<=e)return o;let t="\u2026",s=Math.floor((e-1)/2);return o.slice(0,s)+t+o.slice(-s)}function ft(o){let e=new Map;for(let s of o){let r=Te(s.url),i=e.get(r);i?i.push(s):e.set(r,[s]);}return new Map([...e.entries()].sort((s,r)=>r[1].length-s[1].length))}function mt(o,e,t){let s=n("div",{class:"sp-group-header"});s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded","true"),s.style.borderBottomColor=t.border;let r=n("span",{class:"sp-group-header-chevron"});r.appendChild(c(Ee)),s.appendChild(r);let i=n("span",{class:"sp-group-header-icon"});i.appendChild(c(Q)),s.appendChild(i);let l=n("span",{class:"sp-group-header-path"}),d=Se(o,40);a(l,d),o.length>40&&(l.title=o),s.appendChild(l);let p=n("span",{class:"sp-group-header-count"});p.style.background=t.accentLight,p.style.color=t.accent,a(p,String(e)),s.appendChild(p);let u=()=>{let h=s.getAttribute("aria-expanded")==="true";s.setAttribute("aria-expanded",String(!h)),s.classList.toggle("sp-group-header--collapsed",h);let v=s.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",h);};return s.addEventListener("click",u),s.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u());}),s}var K=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,t,s){this.colors=e,this.onChange=t,this.t=s,this.element=n("div",{class:"sp-sort-controls"}),this.sortBtn=document.createElement("button"),this.sortBtn.className="sp-sort-btn",this.sortBtn.setAttribute("aria-haspopup","listbox"),this.sortBtn.setAttribute("aria-expanded","false"),this.sortBtn.setAttribute("aria-label",this.t("sort.label"));let r=c(Be);this.sortBtn.appendChild(r);let i=n("span",{class:"sp-sort-btn-label"});a(i,this.t("sort.newest")),this.sortBtn.appendChild(i),this.sortBtn.addEventListener("click",p=>{p.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let l=c(Q);this.groupToggle.appendChild(l);let d=n("span",{class:"sp-group-toggle-label"});a(d,this.t("group.byPage")),this.groupToggle.appendChild(d),this.groupToggle.addEventListener("click",()=>{this._groupByPage=!this._groupByPage,this.groupToggle.classList.toggle("sp-group-toggle--active",this._groupByPage),this.groupToggle.setAttribute("aria-pressed",String(this._groupByPage)),this.onChange();}),this.element.appendChild(this.sortBtn),this.element.appendChild(this.groupToggle);}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=n("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let t of e){let s=document.createElement("button");s.className=`sp-sort-option${t.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(t.mode===this._sortMode)),t.mode===this._sortMode&&(s.style.background=this.colors.accentLight,s.style.color=this.colors.accent),a(s,t.label),s.addEventListener("click",r=>{r.stopPropagation(),this._sortMode=t.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=t=>{this.menuEl&&!this.element.contains(t.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",t=>{t.key==="Escape"&&(this.closeMenu(),this.sortBtn.focus());});}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,true),this.outsideClickHandler=null);}updateSortLabel(){let e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")},t=this.sortBtn.querySelector(".sp-sort-btn-label");t&&a(t,e[this._sortMode]);}destroy(){this.closeMenu();}},yt=`
1168
+ `;function Le(t){if(/Edg\//i.test(t)){let e=t.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(t)||/Opera/i.test(t)){let e=t.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(t)){let e=t.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(t)&&!/Chromium/i.test(t)){let e=t.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(t)&&!/Chrome/i.test(t)){let e=t.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function J(t,e){try{return new Date(t).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Re(t){try{return new URL(t).pathname}catch{return t}}function Me(t){return !!(/^data:image\/(jpeg|png|webp);/i.test(t)||/^https:\/\//i.test(t))}function A(t,e){return t.length<=e?t:t.slice(0,e-1)+"\u2026"}function Fe(t){if(!t)return false;let e=Array.isArray(t.console)?t.console.length:0,n=Array.isArray(t.network)?t.network.length:0;return e>0||n>0}function Pe(t){return !Number.isFinite(t)||t<0?"\u2014":t<1e3?`${Math.round(t)} ms`:`${(t/1e3).toFixed(1)} s`}var Z=class{constructor(e,n,s,r){this.colors=e;this.callbacks=n;this.t=s,this.locale=r,this.element=o("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=o("div",{class:"sp-detail-header"}),l=document.createElement("button");l.type="button",l.className="sp-detail-back",l.setAttribute("aria-label",this.t("detail.back")),l.appendChild(c(ye)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=o("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;element;_isVisible=false;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;isProcessing=false;show(e,n){this.currentFeedback=e,this.isProcessing=false;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let r=s.querySelector(".sp-detail-back");if(!r)return;s.replaceChildren(r);let i=o("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(n))),s.appendChild(i);let l=o("span",{class:"sp-badge"});l.style.background=_(e.type,this.colors),l.style.color=M(e.type,this.colors),a(l,e.type),s.appendChild(l),this.content.replaceChildren();let d=0,p=this.buildSection(d++);this.buildStatusActions(p,e),this.content.appendChild(p);let h=this.buildSection(d++),u=o("div",{class:"sp-detail-section-title"});a(u,this.t("detail.message")),h.appendChild(u);let v=o("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=M(e.type,this.colors),a(v,e.message),h.appendChild(v),this.content.appendChild(h),e.screenshotUrl&&Me(e.screenshotUrl)){let g=this.buildSection(d++),x=o("div",{class:"sp-detail-section-title"});a(x,this.t("detail.screenshot")),g.appendChild(x);let b=document.createElement("img");b.className="sp-detail-screenshot",b.src=e.screenshotUrl,b.alt=this.t("detail.screenshotAlt"),b.loading="lazy",b.referrerPolicy="no-referrer",g.appendChild(b),this.content.appendChild(g);}let m=this.buildSection(d++),f=o("div",{class:"sp-detail-section-title"});if(a(f,this.t("detail.metadata")),m.appendChild(f),this.buildMetadata(m,e),this.content.appendChild(m),e.annotations.length>0){let g=this.buildSection(d++),x=o("div",{class:"sp-detail-section-title"});x.appendChild(c(D));let b=o("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Fe(e.diagnostics)){let g=this.buildSection(d++),x=o("div",{class:"sp-detail-section-title"});x.appendChild(c(Ae));let b=o("span");a(b,this.t("detail.diagnostics")),x.appendChild(b),g.appendChild(x),this.buildDiagnostics(g,e),this.content.appendChild(g);}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),requestAnimationFrame(()=>{r.focus();});}hide(){this._isVisible&&(this._isVisible=false,this.element.classList.remove("sp-detail--visible"),this.element.setAttribute("aria-hidden","true"),this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null);}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let n=o("div",{class:"sp-detail-section"});return n.style.animationDelay=`${e*40}ms`,n}buildStatusActions(e,n){let s=n.status==="resolved",r=o("div",{class:"sp-detail-section-title"});a(r,this.t("detail.status")),e.appendChild(r);let i=o("div",{class:"sp-detail-status"}),l=o("span",{class:`sp-detail-status-pill ${s?"sp-detail-status-pill--resolved":"sp-detail-status-pill--open"}`}),d=o("span",{class:"sp-detail-status-dot"});d.style.background=s?"#9ca3af":"#22c55e",l.appendChild(d);let p=o("span");a(p,s?this.t("detail.reopen"):this.t("detail.resolve")),a(p,s?"Resolved":"Open"),l.appendChild(p),i.appendChild(l),e.appendChild(i);let h=o("div",{class:"sp-detail-actions"});if(this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",s){this.resolveBtn.className="sp-detail-btn-reopen",this.resolveBtn.appendChild(c(X));let v=document.createElement("span");a(v,this.t("detail.reopen")),this.resolveBtn.appendChild(v);}else {this.resolveBtn.className="sp-detail-btn-resolve",this.resolveBtn.appendChild(c(H));let v=document.createElement("span");a(v,this.t("detail.resolve")),this.resolveBtn.appendChild(v);}this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.deleteBtn.appendChild(c(Q));let u=document.createElement("span");a(u,this.t("detail.delete")),this.deleteBtn.appendChild(u),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),h.appendChild(this.resolveBtn),h.appendChild(this.deleteBtn),e.appendChild(h);}buildMetadata(e,n){let s=o("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,ke,this.t("detail.page"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=Re(n.url);return a(r,A(i,60)),r.title=n.url,r}),this.addMetaRow(s,Ce,this.t("detail.author"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=n.authorName||"Anonymous",l=n.authorEmail;return a(r,l?`${i} (${l})`:i),r}),this.addMetaRow(s,we,this.t("detail.date"),()=>{let r=o("div",{class:"sp-detail-meta-value"});return a(r,J(n.createdAt,this.locale.startsWith("fr")?"fr":"en")),r}),this.addMetaRow(s,Se,this.t("detail.viewport"),()=>{let r=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(r,n.viewport||"Unknown"),r}),this.addMetaRow(s,'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',this.t("detail.browser"),()=>{let r=o("div",{class:"sp-detail-meta-value"});return a(r,Le(n.userAgent)),r}),n.resolvedAt){let r=n.resolvedAt;this.addMetaRow(s,H,this.t("detail.resolvedAt"),()=>{let i=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(i,J(r,this.locale.startsWith("fr")?"fr":"en")),i});}e.appendChild(s);}addMetaRow(e,n,s,r){let i=o("div",{class:"sp-detail-meta-row"});i.appendChild(c(n));let l=o("div",{class:"sp-detail-meta-content"}),d=o("div",{class:"sp-detail-meta-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,n){let s=n.annotations[0];if(!s)return;let r=o("div",{class:"sp-detail-annotation"}),i=o("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,Ee,this.t("detail.element"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),h=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return a(p,h),p}),this.addAnnotationRow(i,Te,this.t("detail.selector"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,A(s.cssSelector,60)),p.title=s.cssSelector,p}),this.addAnnotationRow(i,D,this.t("detail.position"),()=>{let p=o("span",{class:"sp-detail-annotation-value"});return a(p,`${s.xPct.toFixed(1)}%, ${s.yPct.toFixed(1)}%`+(s.wPct>0||s.hPct>0?` (${s.wPct.toFixed(1)}% \xD7 ${s.hPct.toFixed(1)}%)`:"")),p}),r.appendChild(i);let l=document.createElement("button");l.type="button",l.className="sp-detail-btn-goto",l.appendChild(c(D));let d=document.createElement("span");a(d,this.t("detail.goToAnnotation")),l.appendChild(d),l.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),r.appendChild(l),e.appendChild(r);}buildDiagnostics(e,n){let s=n.diagnostics;if(!s)return;let r=Array.isArray(s.console)?s.console:[],i=Array.isArray(s.network)?s.network:[],l=r.filter(x=>x.level==="error").length,d=o("div",{class:"sp-detail-diag"}),p=document.createElement("button");p.type="button",p.className="sp-detail-diag-toggle",p.setAttribute("aria-expanded","false"),p.setAttribute("aria-label",this.t("detail.diagnostics.expand"));let h=document.createElement("span"),u=document.createElement("span");u.style.display="inline-flex",u.style.alignItems="center",u.style.gap="8px",u.appendChild(c(Be)),a(h,this.t("detail.diagnostics")),u.appendChild(h),p.appendChild(u);let v=o("span",{class:"sp-detail-diag-counts"}),m=o("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(m,`${r.length} console`);let f=o("span",{class:`sp-detail-diag-count${i.length>0?" sp-detail-diag-count--errors":""}`});a(f,`${i.length} net`),v.appendChild(m),v.appendChild(f),p.appendChild(v);let g=o("div",{class:"sp-detail-diag-body"});if(r.length>0){let x=document.createElement("div"),b=o("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.console")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of r){let k=document.createElement("li"),T=o("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(T,y.level);let w=o("span",{class:"sp-detail-diag-message"});a(w,A(y.message,240)),w.title=y.message,k.appendChild(T),k.appendChild(w),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=o("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.network")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of i){let k=document.createElement("li");k.classList.add("sp-detail-diag-net");let T=o("span",{class:"sp-detail-diag-net-status"});a(T,y.status===0?"ERR":String(y.status));let w=o("span",{class:"sp-detail-diag-net-method"});a(w,y.method);let L=o("span",{class:"sp-detail-diag-net-url"});a(L,A(y.url,120)),L.title=`${y.url} \u2014 ${Pe(y.durationMs)}`,k.appendChild(T),k.appendChild(w),k.appendChild(L),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}p.addEventListener("click",()=>{let b=!(p.getAttribute("aria-expanded")==="true");p.setAttribute("aria-expanded",String(b)),p.setAttribute("aria-label",b?this.t("detail.diagnostics.collapse"):this.t("detail.diagnostics.expand")),g.classList.toggle("sp-detail-diag-body--open",b);}),d.appendChild(p),d.appendChild(g),e.appendChild(d);}addAnnotationRow(e,n,s,r){let i=o("div",{class:"sp-detail-annotation-row"});i.appendChild(c(n));let l=o("div",{class:"sp-detail-meta-content"}),d=o("div",{class:"sp-detail-annotation-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}async handleResolve(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.resolveBtn&&this.setButtonLoading(this.resolveBtn),this.deleteBtn&&(this.deleteBtn.disabled=true);try{await this.callbacks.onResolve(this.currentFeedback);}catch{this.isProcessing=false,this.resolveBtn&&this.restoreResolveBtn(this.currentFeedback),this.deleteBtn&&(this.deleteBtn.disabled=false);}}}async handleDelete(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.deleteBtn&&this.setButtonLoading(this.deleteBtn),this.resolveBtn&&(this.resolveBtn.disabled=true);try{await this.callbacks.onDelete(this.currentFeedback);}catch{this.isProcessing=false,this.deleteBtn&&this.restoreDeleteBtn(),this.resolveBtn&&(this.resolveBtn.disabled=false);}}}setButtonLoading(e){e.disabled=true,e.replaceChildren(o("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let n=e.status==="resolved";this.resolveBtn.appendChild(c(n?X:H));let s=document.createElement("span");a(s,n?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(s);}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=false,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(c(Q));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Oe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 5h10"/><path d="M11 9h7"/><path d="M11 13h4"/><path d="M3 17l3 3 3-3"/><path d="M6 18V4"/></svg>',se='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>',Ne='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',ee={question:0,change:1,bug:2,other:3};function $t(t,e){let n=[...t];switch(e){case "newest":n.sort((s,r)=>new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":n.sort((s,r)=>new Date(s.createdAt).getTime()-new Date(r.createdAt).getTime());break;case "by-type":n.sort((s,r)=>{let i=ee[s.type]??99,l=ee[r.type]??99;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":n.sort((s,r)=>{let i=s.status==="open"?0:1,l=r.status==="open"?0:1;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return n}function De(t){try{return new URL(t).pathname}catch{return t}}function He(t,e){if(t.length<=e)return t;let n="\u2026",s=Math.floor((e-1)/2);return t.slice(0,s)+n+t.slice(-s)}function Kt(t){let e=new Map;for(let s of t){let r=De(s.url),i=e.get(r);i?i.push(s):e.set(r,[s]);}return new Map([...e.entries()].sort((s,r)=>r[1].length-s[1].length))}function zt(t,e,n){let s=o("div",{class:"sp-group-header"});s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded","true"),s.style.borderBottomColor=n.border;let r=o("span",{class:"sp-group-header-chevron"});r.appendChild(c(Ne)),s.appendChild(r);let i=o("span",{class:"sp-group-header-icon"});i.appendChild(c(se)),s.appendChild(i);let l=o("span",{class:"sp-group-header-path"}),d=He(t,40);a(l,d),t.length>40&&(l.title=t),s.appendChild(l);let p=o("span",{class:"sp-group-header-count"});p.style.background=n.accentLight,p.style.color=n.accent,a(p,String(e)),s.appendChild(p);let h=()=>{let u=s.getAttribute("aria-expanded")==="true";s.setAttribute("aria-expanded",String(!u)),s.classList.toggle("sp-group-header--collapsed",u);let v=s.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",u);};return s.addEventListener("click",h),s.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),h());}),s}var te=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,n,s){this.colors=e,this.onChange=n,this.t=s,this.element=o("div",{class:"sp-sort-controls"}),this.sortBtn=document.createElement("button"),this.sortBtn.className="sp-sort-btn",this.sortBtn.setAttribute("aria-haspopup","listbox"),this.sortBtn.setAttribute("aria-expanded","false"),this.sortBtn.setAttribute("aria-label",this.t("sort.label"));let r=c(Oe);this.sortBtn.appendChild(r);let i=o("span",{class:"sp-sort-btn-label"});a(i,this.t("sort.newest")),this.sortBtn.appendChild(i),this.sortBtn.addEventListener("click",p=>{p.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let l=c(se);this.groupToggle.appendChild(l);let d=o("span",{class:"sp-group-toggle-label"});a(d,this.t("group.byPage")),this.groupToggle.appendChild(d),this.groupToggle.addEventListener("click",()=>{this._groupByPage=!this._groupByPage,this.groupToggle.classList.toggle("sp-group-toggle--active",this._groupByPage),this.groupToggle.setAttribute("aria-pressed",String(this._groupByPage)),this.onChange();}),this.element.appendChild(this.sortBtn),this.element.appendChild(this.groupToggle);}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=o("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let n of e){let s=document.createElement("button");s.className=`sp-sort-option${n.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(n.mode===this._sortMode)),n.mode===this._sortMode&&(s.style.background=this.colors.accentLight,s.style.color=this.colors.accent),a(s,n.label),s.addEventListener("click",r=>{r.stopPropagation(),this._sortMode=n.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=n=>{this.menuEl&&!this.element.contains(n.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",n=>{n.key==="Escape"&&(this.closeMenu(),this.sortBtn.focus());});}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,true),this.outsideClickHandler=null);}updateSortLabel(){let e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")},n=this.sortBtn.querySelector(".sp-sort-btn-label");n&&a(n,e[this._sortMode]);}destroy(){this.closeMenu();}},Ut=`
1169
1169
  /* ============================
1170
1170
  Sort Controls Container
1171
1171
  ============================ */
@@ -1470,7 +1470,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1470
1470
  transition: none;
1471
1471
  }
1472
1472
  }
1473
- `;var wt=`
1473
+ `;var Gt=`
1474
1474
  .sp-stats-bar {
1475
1475
  display: flex;
1476
1476
  flex-direction: column;
@@ -1553,7 +1553,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1553
1553
  min-width: 64px;
1554
1554
  text-align: right;
1555
1555
  }
1556
- `,W=class{constructor(e,t){this.colors=e;this.t=t,this.element=n("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let s=n("div",{class:"sp-stats-row"}),r=n("div",{class:"sp-stats-item"}),i=n("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=n("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=n("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),r.appendChild(i),r.appendChild(this.valueOpen),r.appendChild(l);let d=n("div",{class:"sp-stats-item"}),p=n("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=n("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let u=n("span",{class:"sp-stats-label"});a(u,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(u);let h=n("div",{class:"sp-stats-item"}),v=n("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=n("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let m=n("span",{class:"sp-stats-label"});a(m,this.t("stats.bugs")),h.appendChild(v),h.appendChild(this.valueBugs),h.appendChild(m),s.appendChild(r),s.appendChild(d),s.appendChild(h);let f=n("div",{class:"sp-stats-progress"}),g=n("div",{class:"sp-stats-progress-track"});this.progressFill=n("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=n("span",{class:"sp-stats-progress-label"}),a(this.progressLabel,""),f.appendChild(g),f.appendChild(this.progressLabel),this.element.appendChild(s),this.element.appendChild(f);}colors;element;valueOpen;valueResolved;valueBugs;progressFill;progressLabel;t;update(e,t){if(t===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,r=0,i=0;for(let u of e)u.status==="open"&&s++,u.status==="resolved"&&r++,u.type==="bug"&&i++;a(this.valueOpen,String(s)),a(this.valueResolved,String(r)),a(this.valueBugs,String(i));let l=e.length,d=l>0?Math.round(r/l*100):0;requestAnimationFrame(()=>{this.progressFill.style.width=`${d}%`;});let p=this.t("stats.progress").replace("{percent}",String(d));a(this.progressLabel,p);}};var Me='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M6 8h.01"/><path d="M10 8h.01"/><path d="M14 8h.01"/><path d="M18 8h.01"/><path d="M6 12h.01"/><path d="M18 12h.01"/><path d="M8 16h8"/></svg>';function Tt(o){let e=o.querySelectorAll(".sp-card");for(let t=0;t<e.length;t++)if(e[t]?.classList.contains("sp-card--focused"))return t;return -1}function St(o,e){let t=o.querySelectorAll(".sp-card");if(t.length===0)return;for(let i of t)i.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,t.length-1)),r=t[s];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:true}));}var Le=[{keys:["J","K"],label:"shortcuts.navigate"},{keys:["R"],label:"shortcuts.resolve"},{keys:["D"],label:"shortcuts.delete"},{keys:["F","/"],label:"shortcuts.search"},{keys:["X"],label:"shortcuts.select"},{keys:["?"],label:"shortcuts.help"},{keys:["Esc"],label:"shortcuts.close"}],Mt=`
1556
+ `,ne=class{constructor(e,n){this.colors=e;this.t=n,this.element=o("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let s=o("div",{class:"sp-stats-row"}),r=o("div",{class:"sp-stats-item"}),i=o("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=o("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=o("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),r.appendChild(i),r.appendChild(this.valueOpen),r.appendChild(l);let d=o("div",{class:"sp-stats-item"}),p=o("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=o("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let h=o("span",{class:"sp-stats-label"});a(h,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(h);let u=o("div",{class:"sp-stats-item"}),v=o("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=o("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let m=o("span",{class:"sp-stats-label"});a(m,this.t("stats.bugs")),u.appendChild(v),u.appendChild(this.valueBugs),u.appendChild(m),s.appendChild(r),s.appendChild(d),s.appendChild(u);let f=o("div",{class:"sp-stats-progress"}),g=o("div",{class:"sp-stats-progress-track"});this.progressFill=o("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=o("span",{class:"sp-stats-progress-label"}),a(this.progressLabel,""),f.appendChild(g),f.appendChild(this.progressLabel),this.element.appendChild(s),this.element.appendChild(f);}colors;element;valueOpen;valueResolved;valueBugs;progressFill;progressLabel;t;update(e,n){if(n===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,r=0,i=0;for(let h of e)h.status==="open"&&s++,h.status==="resolved"&&r++,h.type==="bug"&&i++;a(this.valueOpen,String(s)),a(this.valueResolved,String(r)),a(this.valueBugs,String(i));let l=e.length,d=l>0?Math.round(r/l*100):0;requestAnimationFrame(()=>{this.progressFill.style.width=`${d}%`;});let p=this.t("stats.progress").replace("{percent}",String(d));a(this.progressLabel,p);}};var Ie='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M6 8h.01"/><path d="M10 8h.01"/><path d="M14 8h.01"/><path d="M18 8h.01"/><path d="M6 12h.01"/><path d="M18 12h.01"/><path d="M8 16h8"/></svg>';function Xt(t){let e=t.querySelectorAll(".sp-card");for(let n=0;n<e.length;n++)if(e[n]?.classList.contains("sp-card--focused"))return n;return -1}function Qt(t,e){let n=t.querySelectorAll(".sp-card");if(n.length===0)return;for(let i of n)i.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,n.length-1)),r=n[s];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:true}));}var je=[{keys:["J","K"],label:"shortcuts.navigate"},{keys:["R"],label:"shortcuts.resolve"},{keys:["D"],label:"shortcuts.delete"},{keys:["F","/"],label:"shortcuts.search"},{keys:["X"],label:"shortcuts.select"},{keys:["?"],label:"shortcuts.help"},{keys:["Esc"],label:"shortcuts.close"}],Jt=`
1557
1557
  /* ---- Help overlay backdrop ---- */
1558
1558
 
1559
1559
  .sp-shortcuts-overlay {
@@ -1780,5 +1780,5 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1780
1780
  transition-duration: 0.01ms !important;
1781
1781
  }
1782
1782
  }
1783
- `,Ae='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',X=class{constructor(e,t,s){this.t=s;this.keyMap=new Map([["j",()=>t.onNavigate("down")],["k",()=>t.onNavigate("up")],["r",()=>t.onResolve()],["d",()=>t.onDelete()],["f",()=>t.onFocusSearch()],["/",()=>t.onFocusSearch()],["x",()=>t.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=r=>this.handleKeydown(r);}t;helpOverlay;hintButton;keyMap;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;destroyed=false;enable(e){if(this.destroyed||this.enabled)return;e&&(this.shadowRoot=e),(this.shadowRoot??document).addEventListener("keydown",this.boundHandler),this.enabled=true;}disable(){if(!this.enabled)return;(this.shadowRoot??document).removeEventListener("keydown",this.boundHandler),this.enabled=false,this.helpVisible&&this.hideHelp();}toggleHelp(){this.helpVisible?this.hideHelp():this.showHelp();}destroy(){this.destroyed||(this.disable(),this.helpOverlay.remove(),this.hintButton.remove(),this.destroyed=true);}handleKeydown(e){if(e.key==="Escape"){this.helpVisible&&(e.preventDefault(),e.stopPropagation(),this.hideHelp());return}if(this.helpVisible)return;let t=e.composedPath()[0];if(t){let r=t.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||t.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let s=this.keyMap.get(e.key);s&&(e.preventDefault(),e.stopPropagation(),s());}showHelp(){this.helpVisible=true,this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false,this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible");}buildOverlay(){let e=n("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),e.addEventListener("click",d=>{d.target===e&&this.hideHelp();});let t=n("div",{class:"sp-shortcuts-card"}),s=n("div",{class:"sp-shortcuts-title"});s.appendChild(c(Me));let r=n("span");a(r,this.t("shortcuts.title")),s.appendChild(r),t.appendChild(s);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(Ae)),i.addEventListener("click",()=>this.hideHelp()),t.appendChild(i);let l=n("div",{class:"sp-shortcuts-grid"});for(let d of Le){let p=n("div",{class:"sp-shortcuts-row"}),u=n("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,m)=>{if(m>0){let g=n("span",{class:"sp-shortcuts-separator"});a(g,"/"),u.appendChild(g);}let f=n("span",{class:"sp-kbd"});a(f,v),u.appendChild(f);});let h=n("span",{class:"sp-shortcuts-desc"});a(h,this.t(d.label)),p.appendChild(u),p.appendChild(h),l.appendChild(p);}return t.appendChild(l),e.appendChild(t),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),a(e,"?"),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleHelp();}),e}};export{st as A,ot as B,rt as C,at as D,P as E,dt as F,z as G,gt as H,Y as I,xt as J,ft as K,mt as L,K as M,yt as N,wt as O,W as P,Tt as Q,St as R,Mt as S,X as T,c as a,n as b,a as c,L as d,Re as e,Oe as f,Fe as g,Ne as h,je as i,De as j,_e as k,$e as l,Pe as m,Ie as n,ze as o,Ve as p,Ge as q,Ue as r,Ye as s,qe as t,Ke as u,Qe as v,Xe as w,A as x,N as y,Je as z};//# sourceMappingURL=chunk-HHREBLKP.js.map
1784
- //# sourceMappingURL=chunk-HHREBLKP.js.map
1783
+ `,_e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',re=class{constructor(e,n,s){this.t=s;this.keyMap=new Map([["j",()=>n.onNavigate("down")],["k",()=>n.onNavigate("up")],["r",()=>n.onResolve()],["d",()=>n.onDelete()],["f",()=>n.onFocusSearch()],["/",()=>n.onFocusSearch()],["x",()=>n.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=r=>this.handleKeydown(r);}t;helpOverlay;hintButton;keyMap;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;destroyed=false;enable(e){if(this.destroyed||this.enabled)return;e&&(this.shadowRoot=e),(this.shadowRoot??document).addEventListener("keydown",this.boundHandler),this.enabled=true;}disable(){if(!this.enabled)return;(this.shadowRoot??document).removeEventListener("keydown",this.boundHandler),this.enabled=false,this.helpVisible&&this.hideHelp();}toggleHelp(){this.helpVisible?this.hideHelp():this.showHelp();}destroy(){this.destroyed||(this.disable(),this.helpOverlay.remove(),this.hintButton.remove(),this.destroyed=true);}handleKeydown(e){if(e.key==="Escape"){this.helpVisible&&(e.preventDefault(),e.stopPropagation(),this.hideHelp());return}if(this.helpVisible)return;let n=e.composedPath()[0];if(n){let r=n.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||n.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let s=this.keyMap.get(e.key);s&&(e.preventDefault(),e.stopPropagation(),s());}showHelp(){this.helpVisible=true,this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false,this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible");}buildOverlay(){let e=o("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),e.addEventListener("click",d=>{d.target===e&&this.hideHelp();});let n=o("div",{class:"sp-shortcuts-card"}),s=o("div",{class:"sp-shortcuts-title"});s.appendChild(c(Ie));let r=o("span");a(r,this.t("shortcuts.title")),s.appendChild(r),n.appendChild(s);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(_e)),i.addEventListener("click",()=>this.hideHelp()),n.appendChild(i);let l=o("div",{class:"sp-shortcuts-grid"});for(let d of je){let p=o("div",{class:"sp-shortcuts-row"}),h=o("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,m)=>{if(m>0){let g=o("span",{class:"sp-shortcuts-separator"});a(g,"/"),h.appendChild(g);}let f=o("span",{class:"sp-kbd"});a(f,v),h.appendChild(f);});let u=o("span",{class:"sp-shortcuts-desc"});a(u,this.t(d.label)),p.appendChild(h),p.appendChild(u),l.appendChild(p);}return n.appendChild(l),e.appendChild(n),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),a(e,"?"),e.addEventListener("click",n=>{n.stopPropagation(),this.toggleHelp();}),e}};export{S as A,F as B,P as C,O as D,ce as E,ue as F,Tt as G,Bt as H,At as I,Mt as J,G as K,Ot as L,W as M,It as N,Z as O,$t as P,Kt as Q,zt as R,te as S,Ut as T,Gt as U,ne as V,Xt as W,Qt as X,Jt as Y,re as Z,c as a,o as b,a as c,R as d,$e as e,ze as f,Ue as g,Ve as h,Ye as i,Ge as j,qe as k,We as l,Xe as m,Qe as n,Je as o,Ze as p,et as q,tt as r,st as s,nt as t,rt as u,ot as v,at as w,M as x,_ as y,lt as z};//# sourceMappingURL=chunk-EF2HNCBX.js.map
1784
+ //# sourceMappingURL=chunk-EF2HNCBX.js.map