@siteping/widget 0.12.1 → 0.12.3
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.
- package/README.md +10 -10
- package/dist/chunk-7LL25BRN.cjs +9 -0
- package/dist/chunk-7LL25BRN.cjs.map +1 -0
- package/dist/chunk-HFZPYBZG.js +9 -0
- package/dist/chunk-HFZPYBZG.js.map +1 -0
- package/dist/de-3ANNNYIA.js +2 -0
- package/dist/{de-U3V6TPCZ.js.map → de-3ANNNYIA.js.map} +1 -1
- package/dist/{de-GCYQ3JCH.cjs → de-4N2W5ASV.cjs} +2 -2
- package/dist/{de-GCYQ3JCH.cjs.map → de-4N2W5ASV.cjs.map} +1 -1
- package/dist/es-6M2N2ZUW.cjs +2 -0
- package/dist/{es-435K3LIV.cjs.map → es-6M2N2ZUW.cjs.map} +1 -1
- package/dist/es-GPIJU4FY.js +2 -0
- package/dist/{es-CSZUS23Z.js.map → es-GPIJU4FY.js.map} +1 -1
- package/dist/fr-6QAB4LJP.js +2 -0
- package/dist/{fr-DVOFE3WF.js.map → fr-6QAB4LJP.js.map} +1 -1
- package/dist/fr-KAHW2UVM.cjs +2 -0
- package/dist/{fr-RKRDGOTP.cjs.map → fr-KAHW2UVM.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +2 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/it-4TJ7GPQP.cjs +2 -0
- package/dist/{it-COLRVG26.cjs.map → it-4TJ7GPQP.cjs.map} +1 -1
- package/dist/it-S7QUW7XF.js +2 -0
- package/dist/{it-ZWPEN22A.js.map → it-S7QUW7XF.js.map} +1 -1
- package/dist/panel-E5DL4OG4.cjs +2 -0
- package/dist/panel-E5DL4OG4.cjs.map +1 -0
- package/dist/panel-TDZWSRVV.js +2 -0
- package/dist/panel-TDZWSRVV.js.map +1 -0
- package/dist/pt-2P3TRISG.js +2 -0
- package/dist/{pt-WGEJRQFC.js.map → pt-2P3TRISG.js.map} +1 -1
- package/dist/pt-RAL7HZ3Q.cjs +2 -0
- package/dist/{pt-QQX5CA7D.cjs.map → pt-RAL7HZ3Q.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-ISSCC4XP.js +0 -9
- package/dist/chunk-ISSCC4XP.js.map +0 -1
- package/dist/chunk-QDJDQQ6E.cjs +0 -9
- package/dist/chunk-QDJDQQ6E.cjs.map +0 -1
- package/dist/de-U3V6TPCZ.js +0 -2
- package/dist/es-435K3LIV.cjs +0 -2
- package/dist/es-CSZUS23Z.js +0 -2
- package/dist/fr-DVOFE3WF.js +0 -2
- package/dist/fr-RKRDGOTP.cjs +0 -2
- package/dist/it-COLRVG26.cjs +0 -2
- package/dist/it-ZWPEN22A.js +0 -2
- package/dist/panel-4CIN3Y66.js +0 -2
- package/dist/panel-4CIN3Y66.js.map +0 -1
- package/dist/panel-TD4UUEZA.cjs +0 -2
- package/dist/panel-TD4UUEZA.cjs.map +0 -1
- package/dist/pt-QQX5CA7D.cjs +0 -2
- package/dist/pt-WGEJRQFC.js +0 -2
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
**Client feedback, pinned to the page.**
|
|
9
9
|
|
|
10
|
-
The widget of SitePing, the open-source, self-hosted alternative to Marker.io. Your clients draw rectangles (or right-click, or tap an element on a phone), leave comments and reply in a thread
|
|
10
|
+
The widget of SitePing, the open-source, self-hosted alternative to Marker.io. Your clients draw rectangles (or right-click, or tap an element on a phone), leave comments and reply in a thread, directly on your dev or staging site, anchored to the exact DOM element.
|
|
11
11
|
|
|
12
|
-
Part of [SitePing](https://github.com/NeosiaNexus/SitePing)
|
|
12
|
+
Part of [SitePing](https://github.com/NeosiaNexus/SitePing) · **[live demo](https://siteping.dev/demo)** · **[documentation](https://siteping.dev/docs/widget)**.
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
@@ -44,17 +44,17 @@ No server? Pass `store: new LocalStorageStore()` (from `@siteping/adapter-locals
|
|
|
44
44
|
|
|
45
45
|
## Highlights
|
|
46
46
|
|
|
47
|
-
- **DOM-anchored annotations
|
|
48
|
-
- **Dev-only by default
|
|
49
|
-
- **Opt-in extras
|
|
50
|
-
- **Panel actions
|
|
51
|
-
- **Reliable
|
|
52
|
-
- **Isolated & light
|
|
53
|
-
- **9 built-in locales
|
|
47
|
+
- **DOM-anchored annotations**: each one records several signals for its element (CSS selector, XPath, text, structure, an optional `data-feedback-anchor` key); on reload every match is scored and the best one wins, so annotations survive deploys and layout changes
|
|
48
|
+
- **Dev-only by default**: hides in production builds (`NODE_ENV`); `forceShow: true` for staging. Renders at every width, with a phone layout (`minViewportWidth` keeps it off small screens)
|
|
49
|
+
- **Opt-in extras**: screenshots of the annotated area (with `data-siteping-ignore="true"` privacy masking), console/network diagnostics, instant right-click comments that never hijack keyboard or modifier-key menus
|
|
50
|
+
- **Panel actions**: your own buttons and links in the feedback detail view: create a ticket, hand a feedback to an agent, open it in your tracker
|
|
51
|
+
- **Reliable**: failed sends retry with backoff, then wait in a localStorage queue for the next page load
|
|
52
|
+
- **Isolated & light**: closed Shadow DOM, ~59 kB gzip on first load (ESM: the entry and the chunk it imports); the panel (~10 kB), screenshot engine, and non-English locales load on demand
|
|
53
|
+
- **9 built-in locales**: en, fr, de, es, it, pt, ru, ja, ko (BCP-47 tags like `fr-CA` resolve automatically)
|
|
54
54
|
|
|
55
55
|
## Documentation
|
|
56
56
|
|
|
57
|
-
Every option with its real default and behavior: **[siteping.dev/docs/widget/configuration](https://siteping.dev/docs/widget/configuration)
|
|
57
|
+
Every option with its real default and behavior: **[siteping.dev/docs/widget/configuration](https://siteping.dev/docs/widget/configuration)**, plus [screenshots & masking](https://siteping.dev/docs/widget/screenshots), [right-click comments](https://siteping.dev/docs/widget/right-click), [panel actions](https://siteping.dev/docs/widget/panel-actions), and [how anchoring works](https://siteping.dev/docs/widget/anchoring).
|
|
58
58
|
|
|
59
59
|
## License
|
|
60
60
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';function oe(t){return typeof t=="object"&&t!==null}function R(t,e){return oe(t)&&e in t}var T=class extends Error{code;retryable;constructor(e,n,s){super(e),this.code=n,this.retryable=s,this.name="SitepingError";}},P=class extends T{constructor(e){super(e,"NETWORK",true),this.name="SitepingNetworkError";}},F=class extends T{status;constructor(e,n){super(e,"VALIDATION",false),this.name="SitepingValidationError",this.status=n;}},M=class extends T{status;constructor(e,n){super(e,"AUTH",false),this.name="SitepingAuthError",this.status=n;}},Ge=["NETWORK","VALIDATION","AUTH","SERVER","TIMEOUT"];function We(t){return R(t,"code")&&R(t,"retryable")&&typeof t.retryable=="boolean"&&typeof t.code=="string"&&Ge.includes(t.code)}var Xe=200;var Ye=["open","in_progress","resolved","wont_fix"],ie=["resolved","wont_fix"];function E(t){return ie.includes(t)}function Qe(t,e=new Date){return E(t)?{status:t,resolvedAt:e}:{status:t,resolvedAt:null}}var qe=5e3;var I=class extends Error{code="STORE_DUPLICATE";constructor(e="Duplicate record",n){super(e,n),this.name="StoreDuplicateError";}};function re(t,e){return R(t,"code")&&t.code===e}function Je(t){return t instanceof I?true:re(t,"STORE_DUPLICATE")||re(t,"P2002")}function Ze(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 et=191,tt=191;function K(t){return /^data:image\/(jpeg|png|webp);/i.test(t)||/^https:\/\//i.test(t)?true:nt(t)}function nt(t){try{let{protocol:e,hostname:n}=new URL(t);return e==="http:"&&(n==="localhost"||n.endsWith(".localhost")||n==="127.0.0.1"||n==="[::1]")}catch{return false}}var ae=/^(?!\.)(?!.*\.\.)[\p{L}\p{M}\p{N}!#$%&'*+/=?^_`{|}~.-]{0,63}[\p{L}\p{M}\p{N}!#$%&'*+/=?^_`{|}~-]@(?:[\p{L}\p{N}](?:[\p{L}\p{M}\p{N}-]{0,61}[\p{L}\p{M}\p{N}])?\.)+[\p{L}\p{N}][\p{L}\p{M}\p{N}-]{0,61}[\p{L}\p{M}\p{N}]$/u;function st(t){return ae.test(t)}function V(t){return (t.split(/[-_]/)[0]??t).toLowerCase()}function ot(t){try{return Intl.getCanonicalLocales(t.replace(/_/g,"-"))[0]}catch{return}}function rt(t){let e=ot(t);return e||(console.warn(`[siteping] Invalid locale "${t}", falling back to "en"`),"en")}function z(t,e){let n=Object.assign(Object.create(null),{en:t}),s=Object.create(null);function o(r){return Object.hasOwn(e,r)}return {registerLocale(r,i){let l=V(r);s[l]={...s[l],...i};},async loadLocale(r){let i=V(r);return o(i)&&(n[i]??=await e[i]()),s[i]?{...n[i],...s[i]}:n[i]??null},createT(r){let i=V(r);return !n[i]&&!s[i]&&!o(i)&&console.warn(`[siteping] Unknown locale "${r}", falling back to "en"`),l=>s[i]?.[l]??n[i]?.[l]??t[l]??l}}}function G(t,e){return t.replace(/\{(\w+)\}/g,(n,s)=>{let o=e[s];return o===void 0?n:String(o)})}function W(t,e,n){return G(t(e),n)}function it(){try{return crypto.randomUUID()}catch{return `${Date.now()}-${Math.random().toString(36).slice(2)}`}}function at(t){let e=new URLSearchParams({projectName:t.projectName});return t.page&&e.set("page",String(t.page)),t.limit&&e.set("limit",String(t.limit)),t.type&&e.set("type",t.type),t.status&&e.set("status",t.status),t.statuses?.length&&e.set("statuses",t.statuses.join(",")),t.search&&e.set("search",t.search),t.url&&e.set("url",t.url),t.urlPattern&&e.set("urlPattern",t.urlPattern),e}function lt(t,e){let n={...t};for(let[s,o]of Object.entries(e??{})){for(let r of Object.keys(n))r.toLowerCase()===s.toLowerCase()&&delete n[r];n[s]=o;}return n}function pt(t,e){let n=e.toString();if(!n)return t;let s=t.includes("#")?t.indexOf("#"):t.length,o=t.slice(0,s),r=/[?&]$/.test(o)?"":o.includes("?")?"&":"?";return o+r+n+t.slice(s)}async function dt(t,e){let{status:n}=t,s=await t.text().catch(()=>"Unknown error"),o=`${e}: ${s?`${n} ${s}`:n}`;return n===401||n===403?new M(o,n):n>=500||n===408||n===429?new T(o,"SERVER",true):n>=400?new F(o,n):new T(o,"SERVER",false)}var le=(t,e)=>t?.[e];function ct(t){return le(t,"status")===409||le(t,"code")==="STORE_LIMIT"}function ut(t,e){if(t instanceof P)return t;let n=t instanceof Error?t.message:String(t);return new P(`${e}: ${n}`)}var pe="(max-width: 640px), (max-height: 500px) and (pointer: coarse)";var Wn="cubic-bezier(0.23, 1, 0.32, 1)";function ht(t){return t.tagName==="SITEPING-WIDGET"||t.closest("siteping-widget")!==null||t.closest('[data-siteping-ignore="true"]')!==null||t.closest("#siteping-markers")!==null||t.closest("#sp-tooltip")!==null}var de=4;function gt(t){let e=t,n=t.shadowRoot?.activeElement;for(;n instanceof HTMLElement;){let s=n.getBoundingClientRect();s.width>=de&&s.height>=de&&(e=n),n=n.shadowRoot?.activeElement;}return e}function Yn(t){let e=null,n=s=>{let o=s.target;o instanceof HTMLElement&&(o===document.body||o===document.documentElement||o===t||ht(o)||(e=gt(o)));};return document.addEventListener("focusin",n),{getLastPageFocus(){return e&&!e.isConnected&&(e=null),e},destroy(){document.removeEventListener("focusin",n),e=null;}}}function h(t){let s=document.createRange().createContextualFragment(t).firstElementChild;if(s?.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let o of [...s.attributes])o.name.startsWith("on")&&s.removeAttribute(o.name);for(let o of s.querySelectorAll("*"))for(let r of [...o.attributes])r.name.startsWith("on")&&o.removeAttribute(r.name);return s}function a(t,e){let n=document.createElement(t);if(e)for(let[s,o]of Object.entries(e))s==="class"?n.className=o:s==="style"?n.style.cssText=o:n.setAttribute(s,o);return n}function p(t,e){t.textContent=e;}function N(t,e){let n=t.getRootNode(),s=n instanceof ShadowRoot?n.host:null,o=i=>{t.contains(i.target)||e();},r=i=>{i.target!==s&&e();};return n.addEventListener("click",o,true),s&&document.addEventListener("click",r,true),()=>{n.removeEventListener("click",o,true),s&&document.removeEventListener("click",r,true);}}function X(t,e){t.hidden=e,t.style.display=e?"none":"";}function C(t,e){t.toggleAttribute("inert",e);}function B(t){let n=t.getRootNode().activeElement;return n!==null&&t.contains(n)}function Y(t){let e=Array.from(t.childNodes).map(n=>n.cloneNode(true));return t.disabled=true,t.replaceChildren(a("div",{class:"sp-spinner sp-spinner--sm"})),()=>{t.replaceChildren(...e),t.disabled=false;}}function qn(){let t=navigator.userAgentData;return t?t.platform==="macOS":navigator.platform?.includes("Mac")??/Macintosh|Mac OS X/i.test(navigator.userAgent)}function Jn(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 o=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),r=Math.floor(s/60);if(r<60)return o.format(-r,"minute");let i=Math.floor(r/60);if(i<24)return o.format(-i,"hour");let l=Math.floor(i/24);return l<7?o.format(-l,"day"):new Date(t).toLocaleDateString(e)}function Zn(t){let e=()=>{t.style.scale="";};t.addEventListener("pointerdown",()=>{t.disabled||(t.style.scale="0.97");});for(let n of ["pointerup","pointerleave","pointercancel"])t.addEventListener(n,e);}function es(t,e){t.addEventListener("focus",()=>{t.matches(":focus-visible")&&(t.style.outline=`2px solid ${e}`,t.style.outlineOffset="2px");}),t.addEventListener("blur",()=>{t.style.outline="",t.style.outlineOffset="";});}var mt=["pointerdown","mousedown","touchstart","touchend","click","focusin","focusout","wheel","touchmove"],ce=["inert","aria-hidden"],ue=new WeakSet,q=new WeakSet,he=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=t=>t instanceof ShadowRoot?t.host:t.parentNode;function ge(t){for(let e=t;e;e=ee(e))if(ue.has(e))return true;return false}var _=t=>t instanceof Node&&ge(t),ft=t=>t.stopPropagation(),bt=t=>{let{key:e}=t,n=te(t);e!=="Tab"&&e!=="Escape"&&n instanceof HTMLElement&&(n.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(n.tagName))&&t.stopPropagation();};function me(t,e){ue.add(t),e&&he.set(t,e);for(let s of mt)t.addEventListener(s,ft,{passive:true});for(let s of ["keydown","keypress","keyup"])t.addEventListener(s,bt);let n=()=>{for(let s of ce)(s!=="inert"||!q.has(t))&&t.removeAttribute(s);};n(),new MutationObserver(n).observe(t,{attributeFilter:ce});}function ns(t,e){e?q.add(t):q.delete(t),t.toggleAttribute("inert",e);}function ss(t,e){let n=J.get(t);return n||(n=new Set,J.set(t,n)),n.add(e),()=>{n.delete(e);}}function os(t,e){let n=Z.get(t);return n||(n=new Set,Z.set(t,n)),n.add(e),t.addEventListener("keydown",e),()=>{n.delete(e),t.removeEventListener("keydown",e);}}function Q(){if(getComputedStyle(document.body).pointerEvents==="none")return true;for(let t of document.querySelectorAll('[aria-modal="true"]'))if(t.getClientRects().length>0&&getComputedStyle(t).visibility==="visible"&&!ge(t))return true;return false}function te(t){let e=t.composedPath()[0];for(;e instanceof Element;){let n=(e.shadowRoot??he.get(e))?.activeElement;if(!n)break;e=n;}return e instanceof Node?e:null}function xt(t){for(let e=te(t);e;e=ee(e))for(let n of J.get(e)??[])if(n())return true;return false}function rs(){let t=o=>{_(o.target)&&Q()&&o.stopImmediatePropagation();},s=[["pointerdown",t],["focusin",t],["focusout",o=>{(_(o.target)||_(o.relatedTarget))&&Q()&&o.stopImmediatePropagation();}],["keydown",o=>{if(!(o.key!=="Tab"&&o.key!=="Escape")&&!(!_(o.target)||!Q())){if(o.key==="Escape"){xt(o)&&o.preventDefault();return}for(let r=te(o);r;r=ee(r))for(let i of [...Z.get(r)??[]])i(o);o.stopImmediatePropagation();}}]];for(let[o,r]of s)window.addEventListener(o,r,true);return ()=>{for(let[o,r]of s)window.removeEventListener(o,r,true);}}var as='<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>',ls='<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>',ps='<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>',ds='<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>',cs='<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>',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="20 6 9 17 4 12"/></svg>',us='<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="5" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8M10 12h4"/></svg>',hs='<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>',gs='<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>',ms='<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>',fs='<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>',bs='<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>',xs='<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>',vs='<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>',ks='<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>',ys='<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"><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>',ws='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',Cs='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';var v={light:{material:"rgba(246, 246, 248, 0.84)",materialThick:"rgba(248, 248, 250, 0.92)",grouped:"#f2f2f7",row:"#ffffff",rowHover:"#f8f8fa",fill:"rgba(118, 118, 128, 0.12)",fillStrong:"rgba(118, 118, 128, 0.2)",fillContrast:"rgba(118, 118, 128, 0.22)",separator:"rgba(60, 60, 67, 0.17)",edge:"rgba(255, 255, 255, 0.8)",sheen:"rgba(255, 255, 255, 0.55)",sheenSoft:"rgba(255, 255, 255, 0.4)",hairline:"rgba(0, 0, 0, 0.1)",thumb:"#ffffff",grabber:"rgba(60, 60, 67, 0.3)",gray3:"#c7c7cc",danger:"#d70015",dangerPress:"#b8000f",inkMix:"#000",inkPct:"76%",inkPctBadge:"74%",shadowRow:"0 1px 2px rgba(0, 0, 0, 0.04)",shadowRowHover:"0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.06)",shadowFloat:"0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.05)",shadowSheet:"0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 24px 60px -8px rgba(0, 0, 0, 0.22), 0 6px 18px rgba(0, 0, 0, 0.06)",shadowSheetUp:"0 -0.5px 0 rgba(0, 0, 0, 0.1), 0 -10px 40px rgba(0, 0, 0, 0.12)",shadowPopover:"0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 18px 50px rgba(0, 0, 0, 0.22)",shadowThumb:"0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04)",shadowEdgeDrop:"0 1px 0 rgba(0, 0, 0, 0.14)",shadowCard:"0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 18px 48px -6px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(0, 0, 0, 0.06)",overlayTint:"rgba(0, 0, 0, 0.06)"},dark:{material:"rgba(28, 28, 30, 0.86)",materialThick:"rgba(38, 38, 40, 0.92)",grouped:"#1c1c1e",row:"#2c2c2e",rowHover:"#333336",fill:"rgba(118, 118, 128, 0.24)",fillStrong:"rgba(118, 118, 128, 0.36)",fillContrast:"rgba(118, 118, 128, 0.4)",separator:"rgba(84, 84, 88, 0.6)",edge:"rgba(255, 255, 255, 0.12)",sheen:"rgba(255, 255, 255, 0.06)",sheenSoft:"rgba(255, 255, 255, 0.06)",hairline:"rgba(0, 0, 0, 0.55)",thumb:"#636366",grabber:"rgba(235, 235, 245, 0.3)",gray3:"#636366",danger:"#e0251b",dangerPress:"#c81e15",inkMix:"#fff",inkPct:"62%",inkPctBadge:"62%",shadowRow:"0 1px 2px rgba(0, 0, 0, 0.2)",shadowRowHover:"0 1px 2px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.25)",shadowFloat:"0 0 0 0.5px rgba(0, 0, 0, 0.55), 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.25)",shadowSheet:"0 0 0 0.5px rgba(0, 0, 0, 0.55), 0 24px 60px -8px rgba(0, 0, 0, 0.66), 0 6px 18px rgba(0, 0, 0, 0.3)",shadowSheetUp:"0 -0.5px 0 rgba(0, 0, 0, 0.55), 0 -10px 40px rgba(0, 0, 0, 0.5)",shadowPopover:"0 0 0 0.5px rgba(0, 0, 0, 0.55), 0 18px 50px rgba(0, 0, 0, 0.6)",shadowThumb:"0 3px 8px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2), 0 0 0 0.5px transparent",shadowEdgeDrop:"0 1px 0 rgba(0, 0, 0, 0.6)",shadowCard:"0 0 0 0.5px rgba(0, 0, 0, 0.55), 0 18px 48px -6px rgba(0, 0, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.3)",overlayTint:"rgba(0, 0, 0, 0.22)"}},we="#0066ff",vt=/^#[0-9a-fA-F]{6}$/,xe=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,kt=/^#[0-9a-fA-F]{8}$/;function yt(t){if(vt.test(t))return t;let e=xe.test(t)?t.match(xe):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:kt.test(t)?t.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${t}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),we)}function H(t,e,n){let s="#";for(let o=1;o<7;o+=2){let r=parseInt(t.slice(o,o+2),16),i=Math.round(r+(parseInt(e.slice(o,o+2),16)-r)*n);s+=i.toString(16).padStart(2,"0");}return s}function ve(t){let e=0;for(let[n,s]of [[1,.2126],[3,.7152],[5,.0722]]){let o=parseInt(t.slice(n,n+2),16)/255;e+=s*(o<=.04045?o/12.92:((o+.055)/1.055)**2.4);}return e}function ke(t,e,n){let s=ve(e),o=t;for(let r=1;r<=10;r++){let i=ve(o);if((Math.max(i,s)+.05)/(Math.min(i,s)+.05)>=4.5)break;o=H(t,n,r/10);}return o}var Ce="(prefers-color-scheme: dark)";function wt(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(Ce).matches}function Ss(t){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let e=window.matchMedia(Ce);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}function Ct(t){return t==="dark"||t==="auto"&&wt()?"dark":"light"}function ye(t){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches}function Ts(t=we,e){let n=Et(t,e),s=ye("(prefers-contrast: more)");if(!s&&!ye("(prefers-reduced-transparency: reduce)"))return n;let{surface:o}=n,r=o.grouped;return {...n,glassBg:r,glassBgHeavy:r,...s?{glassBorderSubtle:n.textSecondary}:{},surface:{...o,material:r,materialThick:r,...s?{fill:o.fillContrast,separator:n.textSecondary,hairline:n.textSecondary}:{}}}}function Et(t,e){let n=yt(t),s=H(n,"#000000",.15);return Ct(e)==="dark"?{accent:n,accentLight:n+"22",accentDark:s,accentGlow:n+"44",accentGradient:n,accentText:ke(n,H("#2c2c2e",n,34/255),"#ffffff"),bg:"#1c1c1e",bgHover:"#2c2c2e",text:"#f5f5f7",textSecondary:"#c1c1c6",textTertiary:"#a8a8ae",border:"#3a3a3c",shadow:"rgba(0, 0, 0, 0.4)",glassBg:v.dark.material,glassBgHeavy:v.dark.materialThick,glassBorder:v.dark.edge,glassBorderSubtle:v.dark.separator,typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#fa7f7f",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:"#a3b0c2",statusResolvedBg:"rgba(148, 163, 184, 0.15)",statusInProgress:"#fbbf24",statusInProgressBg:"rgba(245, 158, 11, 0.15)",statusWontFix:"#a3b0c2",statusWontFixBg:"rgba(148, 163, 184, 0.15)",scheme:"dark",surface:v.dark}:{accent:n,accentLight:n+"14",accentDark:s,accentGlow:n+"33",accentGradient:n,accentText:ke(n,H("#f2f2f7",n,20/255),"#000000"),bg:"#ffffff",bgHover:"#f2f2f7",text:"#1d1d1f",textSecondary:"#4f4f54",textTertiary:"#636368",border:"#e3e3e8",shadow:"rgba(0, 0, 0, 0.08)",glassBg:v.light.material,glassBgHeavy:v.light.materialThick,glassBorder:v.light.edge,glassBorderSubtle:v.light.separator,typeQuestion:"#2563eb",typeChange:"#b45309",typeBug:"#d01f1f",typeOther:"#5b6778",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#15803d",statusOpenBg:"#f0fdf4",statusResolved:"#5b6778",statusResolvedBg:"#f1f5f9",statusInProgress:"#b45309",statusInProgressBg:"#fffbeb",statusWontFix:"#5b6778",statusWontFixBg:"#f1f5f9",scheme:"light",surface:v.light}}function Ee(t,e){switch(t){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function As(t,e){switch(t){case "in_progress":return e.statusInProgress;case "resolved":return e.statusResolved;case "wont_fix":return e.statusWontFix;default:return e.statusOpen}}function Ls(t,e){switch(t){case "in_progress":return e.statusInProgressBg;case "resolved":return e.statusResolvedBg;case "wont_fix":return e.statusWontFixBg;default:return e.statusOpenBg}}function Rs(t,e){switch(t){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function D(t,e){return t.split(e).join("var(--sp-hairline)")}var St='-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif';function Ps(t){let{surface:e}=t,n=t.scheme==="dark";return `--sp-accent: ${t.accent};--sp-accent-light: ${t.accentLight};--sp-accent-dark: ${t.accentDark};--sp-accent-glow: ${t.accentGlow};--sp-accent-gradient: ${t.accentGradient};--sp-accent-text: ${t.accentText};--sp-bg: ${t.bg};--sp-bg-hover: ${t.bgHover};--sp-text: ${t.text};--sp-text-secondary: ${t.textSecondary};--sp-text-tertiary: ${t.textTertiary};--sp-border: ${t.border};--sp-shadow: ${t.shadow};--sp-glass-bg: ${t.glassBg};--sp-glass-bg-heavy: ${t.glassBgHeavy};--sp-glass-border: ${t.glassBorder};--sp-glass-border-subtle: ${t.glassBorderSubtle};--sp-type-question: ${t.typeQuestion};--sp-type-change: ${t.typeChange};--sp-type-bug: ${t.typeBug};--sp-type-other: ${t.typeOther};--sp-type-question-bg: ${t.typeQuestionBg};--sp-type-change-bg: ${t.typeChangeBg};--sp-type-bug-bg: ${t.typeBugBg};--sp-type-other-bg: ${t.typeOtherBg};--sp-status-open: ${t.statusOpen};--sp-status-open-bg: ${t.statusOpenBg};--sp-status-resolved: ${t.statusResolved};--sp-status-resolved-bg: ${t.statusResolvedBg};--sp-status-in-progress: ${t.statusInProgress};--sp-status-in-progress-bg: ${t.statusInProgressBg};--sp-status-wont-fix: ${t.statusWontFix};--sp-status-wont-fix-bg: ${t.statusWontFixBg};--sp-radius: 10px;--sp-radius-lg: 14px;--sp-radius-xl: 22px;--sp-radius-full: 9999px;--sp-blur: 20px;--sp-blur-heavy: 30px;--sp-shadow-xs: ${e.shadowRow};--sp-shadow-sm: var(--sp-shadow-float);--sp-shadow-md: var(--sp-shadow-float);--sp-shadow-lg: var(--sp-shadow-float);--sp-shadow-xl: var(--sp-shadow-sheet);--sp-font: ${St};--sp-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, system-ui, sans-serif;--sp-font-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Code", Consolas, monospace;--sp-material: ${e.material};--sp-material-thick: ${e.materialThick};--sp-material-blur: blur(30px) saturate(180%);--sp-grouped: ${e.grouped};--sp-row: ${e.row};--sp-row-hover: ${e.rowHover};--sp-fill: ${e.fill};--sp-fill-strong: ${e.fillStrong};--sp-fill-contrast: ${e.fillContrast};--sp-separator: ${e.separator};--sp-edge: ${e.edge};--sp-sheen: ${e.sheen};--sp-sheen-soft: ${e.sheenSoft};--sp-hairline: ${e.hairline};--sp-thumb: ${e.thumb};--sp-grabber: ${e.grabber};--sp-gray3: ${e.gray3};--sp-danger: ${e.danger};--sp-danger-press: ${e.dangerPress};--sp-shadow-row: ${e.shadowRow};--sp-shadow-row-hover: ${e.shadowRowHover};--sp-shadow-float: ${D(e.shadowFloat,v[t.scheme].hairline)};--sp-shadow-sheet: ${D(e.shadowSheet,v[t.scheme].hairline)};--sp-shadow-sheet-up: ${D(e.shadowSheetUp,v[t.scheme].hairline)};--sp-shadow-popover: ${D(e.shadowPopover,v[t.scheme].hairline)};--sp-shadow-thumb: ${e.shadowThumb};--sp-shadow-edge-drop: ${e.shadowEdgeDrop};--sp-ring: 0 0 0 3px color-mix(in srgb, var(--sp-accent) 30%, transparent);--sp-ink-mix: ${e.inkMix};--sp-ink-pct: ${e.inkPct};--sp-ink-pct-badge: ${e.inkPctBadge};--sp-ink-green: ${n?"color-mix(in srgb, var(--sp-status-open) 80%, #fff)":"color-mix(in srgb, var(--sp-status-open) 82%, #000)"};--sp-ink-red: ${n?"color-mix(in srgb, var(--sp-type-bug) 66%, #fff)":"color-mix(in srgb, var(--sp-type-bug) 86%, #000)"};--sp-ink-amber: ${n?"color-mix(in srgb, var(--sp-status-in-progress) 70%, #fff)":"color-mix(in srgb, var(--sp-status-in-progress) 80%, #000)"};--sp-accent-ink: ${n?"color-mix(in srgb, var(--sp-accent-text) 70%, #fff)":"var(--sp-accent-text)"};`}function $(t){return typeof window.matchMedia=="function"&&window.matchMedia(t).matches}function Fs(){return $(pe)}function Ms(){return $("(pointer: coarse)")}function Is(){return $("(hover: hover) and (pointer: fine)")}function Ns(){return $("(prefers-reduced-motion: reduce)")}function _s(t){let e=window.visualViewport;if(!e)return ()=>{};let n=()=>t(Math.max(0,Math.round(window.innerHeight-e.height-e.offsetTop)),e.height);return n(),e.addEventListener("resize",n),e.addEventListener("scroll",n),()=>{e.removeEventListener("resize",n),e.removeEventListener("scroll",n);}}var Se={"panel.title":"Feedback","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedback","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedback for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedback","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.notOnPage":"Not visible on this page","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","panel.statusInProgress":"In progress","panel.statusWontFix":"Won't fix","panel.statusClosed":"Closed","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","panel.filterMine":"Mine","panel.filterMineHint":"Only the feedback sent from this browser","fab.aria":"Siteping \u2014 Feedback menu","fab.messages":"Show sidebar","fab.annotate":"Create new annotation","fab.annotations":"Show or hide markers","annotator.instruction":"Draw a rectangle on the area to comment \u2014 or press Enter to comment on the last focused element","annotator.instantInstruction":"Comment on the clicked spot","annotator.touchInstruction":"Tap an element or drag to select an area","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}, {status} \u2014 {message}","marker.count":"Feedback markers shown: {count}","fab.badge":"Unresolved feedback: {count}","feedback.sent.confirmation":"Feedback sent successfully","feedback.error.message":"Failed to send feedback","feedback.queued":"Saved on this device. It will be sent on your next visit.","feedback.deleted.confirmation":"Feedback deleted","badge.count":"Unresolved feedback: {count}","bulk.aria":"Bulk actions","bulk.selectAll":"Select all","bulk.selectFeedback":"Select {label}","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":"Feedback: {count}","stats.aria":"Feedback statistics","stats.open":"Open","stats.closed":"Closed","stats.bugs":"Bugs","stats.progress":"{percent}% closed","detail.back":"Back","detail.aria":"Feedback detail","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.closedAt":"Closed 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","comments.title":"Replies","comments.placeholder":"Reply to the team...","comments.error":"Not sent. Try again.","comments.full":"This thread is full.","comments.team":"Team","shortcuts.title":"Keyboard shortcuts","shortcuts.navigate":"Navigate feedback","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 ne=z(Se,{de:()=>import('./de-4N2W5ASV.cjs').then(t=>t.de),es:()=>import('./es-6M2N2ZUW.cjs').then(t=>t.es),fr:()=>import('./fr-KAHW2UVM.cjs').then(t=>t.fr),it:()=>import('./it-4TJ7GPQP.cjs').then(t=>t.it),ja:()=>import('./ja-SNVDY7QP.cjs').then(t=>t.ja),ko:()=>import('./ko-ORUCHGUZ.cjs').then(t=>t.ko),pt:()=>import('./pt-RAL7HZ3Q.cjs').then(t=>t.pt),ru:()=>import('./ru-YRXPV57R.cjs').then(t=>t.ru)}),Us=ne.registerLocale,Ks=ne.loadLocale,Vs=ne.createT,A=W;function Te(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}}function Ae(t,e){switch(t){case "open":return e("panel.statusOpen");case "in_progress":return e("panel.statusInProgress");case "resolved":return e("panel.statusResolved");case "wont_fix":return e("panel.statusWontFix");default:return t}}var Tt='<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>',At='<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>',Lt='<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>',Xs=".sp-export-btn{width:32px;height:32px;padding:0;justify-content:center;border-radius:50%;border:none;background:transparent;color:var(--sp-accent-ink);font-family:var(--sp-font);font-size:13px;font-weight:500;white-space:nowrap;cursor:pointer;display:flex;align-items:center;transition:var(--sp-tr);position:relative;}.sp-export-btn svg{width:17px;height:17px;}@media (hover: hover) and (pointer: fine){.sp-export-btn:hover{background:color-mix(in srgb,var(--sp-accent) 10%,transparent);}}.sp-export-btn:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-export-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;padding:6px;border-radius:var(--sp-radius-lg);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);z-index:10;opacity:0;transform:scale(0.96);transform-origin:top right;transition:opacity 0.15s ease,transform 0.15s var(--sp-ease-out);pointer-events:none;}.sp-export-menu--open{opacity:1;transform:none;pointer-events:auto;}.sp-export-option{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:7px 10px;border:none;border-radius:8px;background:transparent;color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:400;letter-spacing:-0.005em;cursor:pointer;transition:var(--sp-tr);text-align:left;}.sp-export-option:focus-visible{background:var(--sp-fill);}@media (hover: hover) and (pointer: fine){.sp-export-option:hover{background:var(--sp-fill);}}.sp-export-option-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sp-text-secondary);}.sp-export-option-icon svg{width:16px;height:16px;}.sp-export-option-label{flex:1;}@media (forced-colors: active){.sp-export-btn,.sp-export-option,.sp-export-menu{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-export-btn:focus-visible,.sp-export-option:focus-visible{outline:3px solid Highlight !important;}}",Le=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function Rt(t){let e=/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return e.includes('"')||e.includes(",")||e.includes(`
|
|
2
|
+
`)||e.includes("\r")?`"${e.replace(/"/g,'""')}"`:e}function Pt(t){let e=Le.join(","),n=t.map(s=>Le.map(o=>{let r=s[o];return Rt(r==null?"":String(r))}).join(","));return [e,...n].join(`
|
|
3
|
+
`)}function Bt(t){return JSON.stringify(t,null,2)}function Re(t,e,n){let s=new Blob([t],{type:n}),o=URL.createObjectURL(s),r=document.createElement("a");r.href=o,r.download=e,r.style.display="none",me(r),document.body.appendChild(r),r.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(o),r.remove();});}var Pe=class{constructor(e,n,s){this.getFeedbacks=n;this.element=a("div",{style:"position: relative; display: inline-flex;"});let o=document.createElement("button");o.className="sp-export-btn",o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false"),o.appendChild(h(Tt));let r=document.createElement("span");p(r,s("export.label")),o.appendChild(r),o.title=s("export.label"),o.addEventListener("click",d=>{d.stopPropagation(),this.toggle();}),this.menu=a("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let i=this.createOption(At,s("export.csv"),()=>{this.exportAs("csv");}),l=this.createOption(Lt,s("export.json"),()=>{this.exportAs("json");});this.menu.appendChild(i),this.menu.appendChild(l),this.element.appendChild(o),this.element.appendChild(this.menu),this.element.addEventListener("keydown",d=>{d.key!=="Escape"||!this.isOpen||(d.stopPropagation(),this.close(),o.focus());});}getFeedbacks;element;menu;isOpen=false;removeOutsideClick=null;createOption(e,n,s){let o=document.createElement("button");o.className="sp-export-option",o.setAttribute("role","menuitem");let r=a("span",{class:"sp-export-option-icon"});r.appendChild(h(e));let i=a("span",{class:"sp-export-option-label"});return p(i,n),o.appendChild(r),o.appendChild(i),o.addEventListener("click",l=>{l.stopPropagation(),s(),this.close();}),o}toggle(){this.isOpen?this.close():this.open();}open(){this.isOpen=true,this.removeOutsideClick=N(this.element,()=>this.close()),this.menu.classList.add("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","true");}close(){this.isOpen=false,this.removeOutsideClick?.(),this.removeOutsideClick=null,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",o=new Date().toISOString().slice(0,10),r=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let i=`\uFEFF${Pt(n)}`;Re(i,`feedbacks-${r}-${o}.csv`,"text/csv;charset=utf-8");}else {let i=Bt(n);Re(i,`feedbacks-${r}-${o}.json`,"application/json;charset=utf-8");}}destroy(){this.close(),this.element.remove();}};var Be='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="8" stroke="currentColor" stroke-width="2"/></svg>',Oe='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="8" fill="currentColor"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',Js=".sp-bulk-checkbox{position:relative;width:18px;height:18px;flex-shrink:0;cursor:pointer;border-radius:4px;color:var(--sp-gray3);opacity:0;transition:opacity 0.15s ease,color 0.15s ease,transform 0.15s ease;display:inline-flex;align-items:center;justify-content:center;}.sp-bulk-checkbox svg{width:18px;height:18px;display:block;}@media (hover: hover) and (pointer: fine){.sp-bulk-checkbox:hover{color:var(--sp-accent);}}.sp-bulk-checkbox--checked{color:var(--sp-accent);opacity:1 !important;}@media (hover: hover) and (pointer: fine){.sp-card:hover .sp-bulk-checkbox{opacity:1;}}.sp-bulk-checkbox:focus-visible{opacity:1;}.sp-list--has-selection .sp-bulk-checkbox{opacity:1;}.sp-card-header > .sp-bulk-checkbox{position:absolute;top:13px;left:9px;}.sp-list--has-selection .sp-card-bar,.sp-card:has(.sp-bulk-checkbox:focus-visible) .sp-card-bar{opacity:0;}@media (hover: hover) and (pointer: fine){.sp-card:hover:has(.sp-bulk-checkbox) .sp-card-bar{opacity:0;}}@media not all and (hover: hover) and (pointer: fine){.sp-card:has(.sp-bulk-checkbox) .sp-card-bar{opacity:0;}}.sp-card--selected{background:color-mix(in srgb,var(--sp-accent) 9%,var(--sp-row)) !important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sp-accent) 30%,transparent);}@media (hover: hover) and (pointer: fine){.sp-card--selected:hover{background:color-mix(in srgb,var(--sp-accent) 12%,var(--sp-row)) !important;}}.sp-bulk-select-all{display:flex;align-items:center;gap:8px;padding:6px 4px;margin-bottom:2px;border-radius:var(--sp-radius);background:transparent;cursor:pointer;opacity:0;transition:opacity 0.2s ease,background 0.2s ease;user-select:none;font-family:var(--sp-font);font-size:13px;font-weight:500;color:var(--sp-text-secondary);}@media (hover: hover) and (pointer: fine){.sp-bulk-select-all:hover{background:var(--sp-fill);}}.sp-list--has-selection .sp-bulk-select-all{opacity:1;}@media (hover: hover) and (pointer: fine){.sp-list:hover .sp-bulk-select-all{opacity:1;}}.sp-bulk-select-all .sp-bulk-checkbox{opacity:1;}.sp-bulk-bar{position:absolute;bottom:12px;left:12px;right:12px;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:8px 12px;padding:8px 8px 8px 16px;border-radius:18px;background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);z-index:10;pointer-events:none;opacity:0;transform:translateY(calc(100% + 16px));transition:transform 0.2s var(--sp-ease-out),opacity 0.15s ease;font-family:var(--sp-font);}.sp-bulk-bar--visible{pointer-events:auto;opacity:1;transform:none;}.sp-bulk-bar-count{font-size:15px;font-weight:600;color:var(--sp-text);white-space:nowrap;letter-spacing:-0.02em;}.sp-bulk-bar-actions{display:flex;align-items:center;gap:6px;margin-left:auto;}.sp-bulk-btn-resolve,.sp-bulk-btn-delete{height:34px;padding:0 12px;border-radius:var(--sp-radius);border:none;font-family:var(--sp-font);font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:5px;transition:var(--sp-tr);white-space:nowrap;}.sp-bulk-btn-resolve{color:var(--sp-ink-green);background:color-mix(in srgb,var(--sp-status-open) 13%,transparent);}.sp-bulk-btn-delete{color:var(--sp-ink-red);background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);}@media (hover: hover) and (pointer: fine){.sp-bulk-btn-resolve:hover{background:color-mix(in srgb,var(--sp-status-open) 19%,transparent);}.sp-bulk-btn-delete:hover{background:color-mix(in srgb,var(--sp-type-bug) 16%,transparent);}}.sp-bulk-btn-resolve:disabled,.sp-bulk-btn-delete:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-bulk-btn-deselect{width:30px;height:30px;border-radius:var(--sp-radius-full);border:none;background:var(--sp-fill);color:var(--sp-text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:var(--sp-tr);flex-shrink:0;padding:0;}@media (hover: hover) and (pointer: fine){.sp-bulk-btn-deselect:hover{background:var(--sp-fill-strong);color:var(--sp-text);}}.sp-bulk-btn-deselect svg{width:12px;height:12px;}.sp-bulk-btn-resolve .sp-spinner,.sp-bulk-btn-delete .sp-spinner{width:14px;height:14px;}@media (forced-colors: active){.sp-bulk-checkbox,.sp-bulk-btn-resolve,.sp-bulk-btn-delete,.sp-bulk-btn-deselect,.sp-bulk-bar{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-bulk-checkbox--checked{background:Highlight !important;color:HighlightText !important;}.sp-bulk-checkbox--checked polyline{stroke:Highlight;}.sp-card--selected{border-left:4px solid Highlight !important;}}",Fe=class{constructor(e,n,s){this.callbacks=n;this.t=s,this.barElement=a("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label",s("bulk.aria")),C(this.barElement,true),this.countLabel=a("span",{class:"sp-bulk-bar-count"}),p(this.countLabel,A(this.t,"bulk.selected",{count:0}));let o=a("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 r=document.createElement("button");r.className="sp-bulk-btn-deselect",r.type="button",r.setAttribute("aria-label",this.t("bulk.deselect")),r.appendChild(h('<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>')),r.addEventListener("click",()=>this.deselectAll()),o.appendChild(this.resolveBtn),o.appendChild(this.deleteBtn),o.appendChild(r),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(o),this.updateButtonLabels();}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=false;t;createCheckbox(e,n){let s=a("div",{class:"sp-bulk-checkbox"});return s.setAttribute("role","checkbox"),s.setAttribute("tabindex","0"),s.setAttribute("aria-label",A(this.t,"bulk.selectFeedback",{label:n})),s.addEventListener("click",o=>{o.stopPropagation(),this.toggle(e);}),s.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),o.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,s),this.updateCheckbox(e),s}isSelected(e){return this.selected.has(e)}createSelectAllBar(e,n){let s=a("div",{class:"sp-bulk-select-all"}),o=a("div",{class:"sp-bulk-checkbox"});o.setAttribute("role","checkbox"),o.setAttribute("tabindex","0"),o.setAttribute("aria-label",n),this.selectAllCheckbox=o,this.updateSelectAllCheckbox(e.length>0&&e.every(l=>this.selected.has(l)));let r=a("span");p(r,n),s.appendChild(o),s.appendChild(r);let i=()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);};return s.addEventListener("click",i),o.addEventListener("keydown",l=>{(l.key===" "||l.key==="Enter")&&(l.preventDefault(),l.stopPropagation(),i());}),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;!n&&B(this.barElement)&&this.selectAllCheckbox?.focus(),C(this.barElement,!n),this.barElement.classList.toggle("sp-bulk-bar--visible",n),p(this.countLabel,A(this.t,"bulk.selected",{count:e}));let s=[...this.selected];X(this.resolveBtn,this.callbacks.permits?.(s,"canChangeStatus")===false),X(this.deleteBtn,this.callbacks.permits?.(s,"canDelete")===false),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,n=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let o=document.createElement("span");p(o,n),this.resolveBtn.appendChild(o),this.resolveBtn.setAttribute("aria-label",e>0?`${n} ${e}`:n),this.deleteBtn.replaceChildren();let r=document.createElement("span");p(r,s),this.deleteBtn.appendChild(r),this.deleteBtn.setAttribute("aria-label",e>0?`${s} ${e}`:s);}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(h(s?Oe:Be));}updateSelectAllCheckbox(e=this.selected.size>0&&this.selected.size===this.checkboxMap.size){this.selectAllCheckbox&&(this.selectAllCheckbox.classList.toggle("sp-bulk-checkbox--checked",e),this.selectAllCheckbox.setAttribute("aria-checked",String(e)),this.selectAllCheckbox.replaceChildren(),this.selectAllCheckbox.appendChild(h(e?Oe:Be)));}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];Y(this.resolveBtn),this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e);}catch{return}finally{this.endProcessing();}this.deselectAll();}async handleDelete(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected];Y(this.deleteBtn),this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e);}catch{return}finally{this.endProcessing();}this.deselectAll();}endProcessing(){this.isProcessing=false,this.resolveBtn.disabled=false,this.deleteBtn.disabled=false,this.updateButtonLabels();}};var Ot=new Set(["svg","g","path","circle","ellipse","line","polyline","polygon","rect","defs","lineargradient","radialgradient","stop","clippath","mask"]),Ft=new Set(`id viewbox preserveaspectratio width height x y x1 y1 x2 y2 cx cy r rx ry fx fy fr d points pathlength
|
|
4
|
+
transform opacity color fill fill-opacity fill-rule stroke stroke-width stroke-linecap stroke-linejoin
|
|
5
|
+
stroke-miterlimit stroke-dasharray stroke-dashoffset stroke-opacity clip-path clip-rule mask offset
|
|
6
|
+
stop-color stop-opacity gradientunits gradienttransform spreadmethod clippathunits maskunits
|
|
7
|
+
maskcontentunits`.split(/\s+/)),Mt=/\b(?:(?:rgba?|hsla?|matrix|translate|scale|rotate|skewx|skewy)\([^()\\]*\)|url\(\s*(['"]?)#[\w-]+\1\s*\))/gi,It=t=>!t.includes("\\")&&!t.replace(Mt,"").includes("(");function Me(t){for(let e of [...t.attributes])(!Ft.has(e.name.toLowerCase())||!It(e.value))&&t.removeAttribute(e.name);for(let e of [...t.children])Ot.has(e.localName.toLowerCase())?Me(e):e.remove();}function Nt(t){let e=new DOMParser().parseFromString(t,"text/html").body.firstElementChild;return e?.namespaceURI!=="http://www.w3.org/2000/svg"||e.localName!=="svg"?null:(Me(e),e.setAttribute("aria-hidden","true"),document.importNode(e,true))}function se(t){try{let e=new URL(t,document.baseURI);return /^(https?|mailto):$/.test(e.protocol)?e.href:null}catch{return null}}function Ie(t){return JSON.parse(JSON.stringify(t),(e,n)=>typeof n=="object"&&n!==null?Object.freeze(n):n)}var _t=t=>typeof t.onAction=="function"&&t.href===void 0,Dt=t=>(typeof t.href=="string"||typeof t.href=="function")&&t.onAction===void 0;function eo(t){let e=[];if(!Array.isArray(t))return e;let n=new Set;return t.forEach((s,o)=>{let r=`[siteping] panelActions[${o}]`,i=s?.id;if(typeof i!="string"||!i||typeof s?.label!="string"||!s.label)console.warn(`${r} ignored: it needs a non-empty string \`id\` and \`label\`.`);else if(!_t(s)&&!Dt(s))console.warn(`${r} ("${i}") ignored: it needs either an \`onAction\` function or an \`href\`, not both.`);else if(typeof s.href=="string"&&!se(s.href))console.warn(`${r} ("${i}") ignored: \`href\` must be an http(s) or mailto URL.`);else if(n.has(i))console.warn(`${r} ignored: duplicate id "${i}".`);else {n.add(i);let l=s.icon===void 0?null:Nt(s.icon);s.icon!==void 0&&!l&&console.warn(`${r} ("${i}"): \`icon\` is not SVG markup \u2014 showing the label only.`),e.push({action:s,icon:l});}}),e}var Ht='<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>',Ne='<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>',$t='<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>',jt='<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>',Ut='<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>',_e='<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>',Kt='<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>',Vt='<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>',zt='<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>',Gt='<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>',Wt='<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>',lo='.sp-detail{position:absolute;inset:0;display:flex;flex-direction:column;z-index:20;transform:translateX(100%);transition:transform 0.2s var(--sp-ease-out);will-change:transform;overflow:clip;}.sp-detail--visible{transform:translateX(0);transition:transform 0.3s var(--sp-ease-drawer);}.sp-panel > :is(.sp-panel-header,.sp-stats-bar,.sp-filters,.sp-list){transition:opacity 0.2s var(--sp-ease-out),transform 0.2s var(--sp-ease-out),visibility 0s;}.sp-panel--detail > :is(.sp-panel-header,.sp-stats-bar,.sp-filters,.sp-list){opacity:0;transform:translateX(-24%);visibility:hidden;transition:opacity 0.3s var(--sp-ease-drawer),transform 0.3s var(--sp-ease-drawer),visibility 0s linear 0.3s;}.sp-panel--detail > :is(.sp-bulk-bar,.sp-shortcuts-hint){visibility:hidden;opacity:0;}.sp-detail-header{display:flex;align-items:center;gap:4px;padding:10px 12px 6px 6px;flex-shrink:0;min-height:60px;}.sp-detail-back{width:44px;height:44px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--sp-accent-ink);transition:var(--sp-tr);flex-shrink:0;padding:0;}@media (hover: hover) and (pointer: fine){.sp-detail-back:hover{background:var(--sp-fill);}}.sp-detail-back svg{width:20px;height:20px;stroke-width:2.4;}.sp-detail-title{font-size:17px;font-weight:600;color:var(--sp-text);letter-spacing:-0.024em;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-header .sp-badge{flex-shrink:0;}.sp-detail-content{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 0 20px;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 10px);mask-image:linear-gradient(to bottom,transparent,#000 10px);}.sp-detail-content::-webkit-scrollbar{width:6px;}.sp-detail-content::-webkit-scrollbar-track{background:transparent;}.sp-detail-content::-webkit-scrollbar-thumb{background:var(--sp-fill-strong);border-radius:var(--sp-radius-full);}@media (hover: hover) and (pointer: fine){.sp-detail-content::-webkit-scrollbar-thumb:hover{background:var(--sp-text-tertiary);}}.sp-detail-section{margin-top:22px;padding:0 16px;}.sp-detail-section:first-child{margin-top:8px;}.sp-detail-section-title{font-size:12px;font-weight:500;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;margin:0 16px 7px;}.sp-detail-status{display:flex;align-items:center;gap:10px;margin-bottom:12px;}.sp-detail-status-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:var(--sp-radius-full);font-size:13px;font-weight:600;letter-spacing:-0.005em;}.sp-detail-status-pill--open{background:color-mix(in srgb,var(--sp-status-open) 13%,transparent);color:var(--sp-ink-green);}.sp-detail-status-pill--in-progress{background:color-mix(in srgb,var(--sp-status-in-progress) 13%,transparent);color:var(--sp-ink-amber);}.sp-detail-status-pill--resolved,.sp-detail-status-pill--wont-fix{background:var(--sp-fill);color:var(--sp-text-secondary);}.sp-detail-status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}.sp-detail-actions{display:flex;gap:10px;}.sp-detail-actions button,.sp-detail-actions a{flex:1;height:44px;padding:0 16px;border:none;border-radius:12px;font-family:var(--sp-font);font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:var(--sp-tr);}.sp-detail-actions button svg,.sp-detail-actions a svg{width:16px;height:16px;}.sp-detail-btn-resolve{background:color-mix(in srgb,var(--sp-status-open) 14%,transparent);color:var(--sp-ink-green);}.sp-detail-btn-reopen{background:color-mix(in srgb,var(--sp-accent) 13%,transparent);color:var(--sp-accent-ink);}.sp-detail-btn-delete{background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);}.sp-detail-btn-custom{background:var(--sp-fill);color:var(--sp-text);text-decoration:none;}@media (hover: hover) and (pointer: fine){.sp-detail-btn-resolve:hover{background:color-mix(in srgb,var(--sp-status-open) 20%,transparent);}.sp-detail-btn-reopen:hover{background:color-mix(in srgb,var(--sp-accent) 19%,transparent);}.sp-detail-btn-delete:hover{background:color-mix(in srgb,var(--sp-type-bug) 16%,transparent);}.sp-detail-btn-custom:hover{background:var(--sp-fill-strong);}}.sp-detail-actions--custom{flex-wrap:wrap;margin-top:8px;}.sp-detail-actions--custom > .sp-detail-btn-custom{flex:1 1 auto;min-width:0;}.sp-detail-btn-custom svg{flex-shrink:0;}.sp-detail-btn-custom span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-actions button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-detail-message{font-size:15px;line-height:1.47;letter-spacing:-0.012em;color:var(--sp-text);padding:12px 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);white-space:pre-wrap;word-break:break-word;}.sp-thread-list{list-style:none;}.sp-comment{margin-top:8px;}.sp-comment[data-role="team"]{background:color-mix(in srgb,var(--sp-accent) 8%,var(--sp-row));}.sp-comment-head,.sp-thread-foot{display:flex;align-items:center;gap:6px;}.sp-comment-head{margin-bottom:4px;font-size:13px;font-weight:600;}.sp-comment-head time,.sp-thread-foot,.sp-thread-input::placeholder{font-weight:400;color:var(--sp-text-secondary);}.sp-comment-head time{margin-left:auto;}.sp-input.sp-thread-input{height:auto;min-height:84px;margin-top:8px;padding:11px 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);line-height:1.4;box-shadow:var(--sp-shadow-row);}.sp-input.sp-thread-input:focus{background:var(--sp-row);box-shadow:var(--sp-ring);}.sp-thread-foot{justify-content:space-between;margin-top:8px;padding-left:16px;font-size:12px;}.sp-thread-foot .sp-btn-primary{height:34px;padding:0 18px;border-radius:var(--sp-radius-full);}.sp-thread-foot [aria-busy="true"]::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border:2px solid;border-top-color:transparent;border-radius:50%;animation:sp-spin 0.6s linear infinite;}.sp-thread-error{margin-top:8px;padding:8px 12px;border-radius:12px;background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);font-size:12px;}.sp-thread-error:empty{display:none;}.sp-detail-screenshot{display:block;width:100%;height:auto;max-height:400px;object-fit:contain;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:0 0 0 0.5px var(--sp-separator);}.sp-detail-meta,.sp-detail-annotation-info{display:flex;flex-direction:column;padding:0 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);}.sp-detail-meta-row,.sp-detail-annotation-row{display:flex;align-items:flex-start;gap:12px;}.sp-detail-meta-row svg,.sp-detail-annotation-row svg{width:16px;height:16px;color:var(--sp-text-tertiary);flex-shrink:0;margin-top:13px;}.sp-detail-meta-content{flex:1;min-width:0;padding:10px 0;}.sp-detail-meta-row + .sp-detail-meta-row .sp-detail-meta-content,.sp-detail-annotation-row + .sp-detail-annotation-row .sp-detail-meta-content{border-top:0.5px solid var(--sp-separator);}.sp-detail-meta-label,.sp-detail-annotation-label{font-size:11px;font-weight:500;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.04em;line-height:1;margin-bottom:3px;}.sp-detail-meta-value,.sp-detail-annotation-value{font-size:15px;line-height:1.33;letter-spacing:-0.01em;color:var(--sp-text);word-break:break-all;}.sp-detail-meta-value--mono,.sp-detail-annotation-value--mono{font-family:var(--sp-font-mono);font-size:12px;letter-spacing:0;background:var(--sp-fill);padding:1px 6px;border-radius:6px;}.sp-detail-meta-value--secondary{color:var(--sp-text-secondary);font-size:13px;}.sp-detail-annotation{display:flex;flex-direction:column;gap:10px;}.sp-detail-annotation-value--mono{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-btn-goto{width:100%;height:44px;padding:0 20px;border-radius:12px;border:none;background:var(--sp-accent);color:#fff;font-family:var(--sp-font);font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:var(--sp-tr);}.sp-detail-btn-goto svg{width:16px;height:16px;}@media (hover: hover) and (pointer: fine){.sp-detail-btn-goto:hover{background:var(--sp-accent-dark);}}.sp-detail-diag{display:flex;flex-direction:column;gap:14px;}.sp-detail-diag-toggle{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px 0 16px;border-radius:var(--sp-radius-lg);border:none;background:var(--sp-row);box-shadow:var(--sp-shadow-row);color:var(--sp-text);font-family:var(--sp-font);font-size:15px;font-weight:400;letter-spacing:-0.01em;cursor:pointer;transition:background 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-detail-diag-toggle:hover{background:var(--sp-row-hover);}}.sp-detail-diag-toggle svg{width:12px;height:12px;color:var(--sp-text-tertiary);transition:transform 0.2s ease;}.sp-detail-diag-toggle[aria-expanded="true"] svg{transform:rotate(90deg);}.sp-detail-diag-counts{display:inline-flex;gap:6px;font-weight:500;color:var(--sp-text-secondary);}.sp-detail-diag-count{padding:2px 8px;border-radius:var(--sp-radius-full);background:var(--sp-fill);color:var(--sp-text-secondary);font-size:12px;font-variant-numeric:tabular-nums;}.sp-detail-diag-count--errors{background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);}.sp-detail-diag-body{display:none;flex-direction:column;gap:14px;}.sp-detail-diag-body--open{display:flex;}.sp-detail-diag-group-title{font-size:11px;font-weight:500;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;margin:0 16px 7px;}.sp-detail-diag-list{list-style:none;padding:0;margin:0;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);max-height:240px;overflow-y:auto;}.sp-detail-diag-list li{display:flex;align-items:flex-start;gap:8px;padding:9px 14px;border-bottom:0.5px solid var(--sp-separator);font-family:var(--sp-font-mono);font-size:11px;line-height:1.45;color:var(--sp-text);}.sp-detail-diag-list li:last-child{border-bottom:none;}.sp-detail-diag-level{flex-shrink:0;font-weight:700;width:44px;text-transform:uppercase;letter-spacing:0.04em;font-size:10px;}.sp-detail-diag-level--log{color:var(--sp-text-tertiary);}.sp-detail-diag-level--info{color:var(--sp-type-question);}.sp-detail-diag-level--warn{color:var(--sp-type-change);}.sp-detail-diag-level--error{color:var(--sp-type-bug);}.sp-detail-diag-message{flex:1;min-width:0;word-break:break-word;white-space:pre-wrap;}.sp-detail-diag-net{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;}.sp-detail-diag-net-status{flex-shrink:0;font-weight:700;color:var(--sp-type-bug);min-width:32px;text-align:right;font-variant-numeric:tabular-nums;}.sp-detail-diag-net-method{flex-shrink:0;font-weight:600;color:var(--sp-text-tertiary);min-width:44px;}.sp-detail-diag-net-url{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--sp-text);}.sp-detail-diag-empty{padding:12px;font-style:italic;font-size:11px;color:var(--sp-text-tertiary);text-align:center;}@media (forced-colors: active){.sp-detail{border:2px solid ButtonText !important;background:Canvas !important;}.sp-detail-back,.sp-detail-btn-goto,.sp-detail-btn-resolve,.sp-detail-btn-reopen,.sp-detail-btn-delete,.sp-detail-btn-custom{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-detail-back:focus-visible,.sp-detail-btn-goto:focus-visible,.sp-detail-btn-resolve:focus-visible,.sp-detail-btn-reopen:focus-visible,.sp-detail-btn-delete:focus-visible,.sp-detail-btn-custom:focus-visible{outline:3px solid Highlight !important;}.sp-detail-status-pill{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-detail-message,.sp-detail-screenshot,.sp-detail-meta,.sp-detail-annotation-info,.sp-detail-diag-toggle,.sp-detail-diag-list{border:1px solid ButtonText;}}';function Xt(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 De(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 Yt(t){try{return new URL(t).pathname}catch{return t}}function j(t,e){return t.length<=e?t:t.slice(0,e-1)+"\u2026"}function Qt(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 qt(t){return !Number.isFinite(t)||t<0?"\u2014":t<1e3?`${Math.round(t)} ms`:`${(t/1e3).toFixed(1)} s`}function He({action:t,icon:e}){let n=document.createElement("span");return p(n,t.label),e?[e.cloneNode(true),n]:[n]}var $e=class{constructor(e,n,s,o,r=[]){this.colors=e;this.callbacks=n;this.customActions=r;this.t=s,this.locale=o,this.element=a("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label",s("detail.aria")),this.element.setAttribute("aria-hidden","true"),C(this.element,true);let i=a("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(h(Ht)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=a("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;customActions;element;_isVisible=false;opener=null;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;customBtns=[];pending=new Map;show(e,n){this.currentFeedback=e;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let o=s.querySelector(".sp-detail-back");if(!o)return;s.replaceChildren(o);let r=a("span",{class:"sp-detail-title"});p(r,A(this.t,"detail.title",{number:n})),s.appendChild(r);let i=a("span",{class:"sp-badge"});i.style.color=Ee(e.type,this.colors),p(i,Te(e.type,this.t)),s.appendChild(i),this.content.replaceChildren();let l=0,d=this.buildSection(l++);this.buildStatusActions(d,e);let c=this.pending.get(e.id);c&&this.lock(c),this.content.appendChild(d);let u=this.buildSection(l++),f=a("div",{class:"sp-detail-section-title"});p(f,this.t("detail.message")),u.appendChild(f);let k=a("div",{class:"sp-detail-message"});p(k,e.message),u.appendChild(k);let y=this.callbacks.buildThread?.(e);if(y&&u.appendChild(y),this.content.appendChild(u),e.screenshotUrl&&K(e.screenshotUrl)){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.screenshot")),g.appendChild(b);let m=document.createElement("img");m.className="sp-detail-screenshot",m.src=e.screenshotUrl,m.alt=this.t("detail.screenshotAlt"),m.loading="lazy",m.referrerPolicy="no-referrer",g.appendChild(m),this.content.appendChild(g);}let w=this.buildSection(l++),x=a("div",{class:"sp-detail-section-title"});if(p(x,this.t("detail.metadata")),w.appendChild(x),this.buildMetadata(w,e),this.content.appendChild(w),e.annotations.length>0){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.annotation")),g.appendChild(b),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Qt(e.diagnostics)){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.diagnostics")),g.appendChild(b),this.buildDiagnostics(g,e),this.content.appendChild(g);}if(!this._isVisible){let g=this.element.getRootNode().activeElement;this.opener=g instanceof HTMLElement?g:null;}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),C(this.element,false),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),this.element.parentElement?.classList.add("sp-panel--detail"),requestAnimationFrame(()=>{o.focus({preventScroll:true});});}hide(){if(!this._isVisible)return;this._isVisible=false;let e=B(this.element),n=this.currentFeedback?.id;this.element.classList.remove("sp-detail--visible"),this.element.parentElement?.classList.remove("sp-panel--detail"),this.element.setAttribute("aria-hidden","true"),C(this.element,true),e&&(this.element.parentElement?.offsetWidth,(this.opener?.isConnected===true?this.opener:n?this.element.parentElement?.querySelector(`.sp-card[data-feedback-id="${CSS.escape(n)}"]`):null)?.focus()),this.opener=null,this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null,this.customBtns=[];}get feedbackId(){return this.currentFeedback?.id??null}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let n=a("div",{class:"sp-detail-section"});return n.style.animationDelay=`${e*40}ms`,n}buildStatusActions(e,n){let s=E(n.status),o=a("div",{class:"sp-detail-section-title"});p(o,this.t("detail.status")),e.appendChild(o);let r=n.status.replace(/_/g,"-"),i={open:this.colors.statusOpen,in_progress:this.colors.statusInProgress,resolved:this.colors.statusResolved,wont_fix:this.colors.statusWontFix},l=a("div",{class:"sp-detail-status"}),d=a("span",{class:`sp-detail-status-pill sp-detail-status-pill--${r}`}),c=a("span",{class:"sp-detail-status-dot"});c.style.background=i[n.status]??i.open,d.appendChild(c);let u=a("span");p(u,Ae(n.status,this.t)),d.appendChild(u),l.appendChild(d),e.appendChild(l);let f=a("div",{class:"sp-detail-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",this.resolveBtn.className=s?"sp-detail-btn-reopen":"sp-detail-btn-resolve",this.restoreResolveBtn(n),this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.restoreDeleteBtn(),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),this.callbacks.permits?.(n,"canChangeStatus")!==false&&f.appendChild(this.resolveBtn),this.callbacks.permits?.(n,"canDelete")!==false&&f.appendChild(this.deleteBtn),e.appendChild(f),this.buildCustomActions(e,n);}buildCustomActions(e,n){if(this.customBtns=[],this.customActions.length===0)return;let s=Ie(n),o=a("div",{class:"sp-detail-actions sp-detail-actions--custom"});for(let r of this.customActions){let{action:i}=r,l;try{if(i.visible&&!i.visible(s))continue;if(i.href===void 0){let d=document.createElement("button");d.type="button",d.setAttribute("aria-label",i.label),d.addEventListener("click",()=>{this.run(r,()=>this.callbacks.onCustomAction(i,s));}),this.customBtns.push(d),l=d;}else {let d=se(typeof i.href=="function"?i.href(s):i.href);if(!d)throw new Error(`[siteping] Panel action "${i.id}": href must be an http(s) or mailto URL.`);let c=document.createElement("a");c.href=d,d.startsWith("mailto:")||(c.target="_blank"),c.rel="noopener noreferrer",l=c;}}catch(d){this.callbacks.onCustomActionError(d);continue}l.className="sp-detail-btn-custom",l.setAttribute("data-action-id",i.id),l.title=i.label,l.append(...He(r)),o.appendChild(l);}o.childElementCount>0&&e.appendChild(o);}buildMetadata(e,n){let s=a("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,$t,this.t("detail.page"),()=>{let o=a("div",{class:"sp-detail-meta-value"}),r=Yt(n.url);return p(o,j(r,60)),o.title=n.url,o}),this.addMetaRow(s,be,this.t("detail.author"),()=>{let o=a("div",{class:"sp-detail-meta-value"}),r=n.authorName||"Anonymous",i=n.authorEmail;return p(o,i?`${r} (${i})`:r),o}),this.addMetaRow(s,jt,this.t("detail.date"),()=>{let o=a("div",{class:"sp-detail-meta-value"});return p(o,De(n.createdAt,this.locale)),o}),this.addMetaRow(s,Ut,this.t("detail.viewport"),()=>{let o=a("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return p(o,n.viewport||"Unknown"),o}),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 o=a("div",{class:"sp-detail-meta-value"});return p(o,Xt(n.userAgent)),o}),n.resolvedAt){let o=n.resolvedAt,r=n.status==="wont_fix"?this.t("detail.closedAt"):this.t("detail.resolvedAt");this.addMetaRow(s,_e,r,()=>{let i=a("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return p(i,De(o,this.locale)),i});}e.appendChild(s);}addMetaRow(e,n,s,o){let r=a("div",{class:"sp-detail-meta-row"});r.appendChild(h(n));let i=a("div",{class:"sp-detail-meta-content"}),l=a("div",{class:"sp-detail-meta-label"});p(l,s),i.appendChild(l),i.appendChild(o()),r.appendChild(i),e.appendChild(r);}buildAnnotation(e,n){let s=n.annotations[0];if(!s)return;let o=a("div",{class:"sp-detail-annotation"}),r=a("div",{class:"sp-detail-annotation-info"});if(this.addAnnotationRow(r,zt,this.t("detail.element"),()=>{let c=a("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),u=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return p(c,u),c}),this.addAnnotationRow(r,Gt,this.t("detail.selector"),()=>{let c=a("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return p(c,j(s.cssSelector,60)),c.title=s.cssSelector,c}),this.addAnnotationRow(r,Ne,this.t("detail.position"),()=>{let c=a("span",{class:"sp-detail-annotation-value"}),u=f=>`${(f*100).toFixed(1)}%`;return p(c,`${u(s.xPct)}, ${u(s.yPct)}`+(s.wPct>0||s.hPct>0?` (${u(s.wPct)} \xD7 ${u(s.hPct)})`:"")),c}),o.appendChild(r),e.appendChild(o),this.callbacks.canGoToAnnotation?.(n)===false)return;let i=document.createElement("button");i.type="button",i.className="sp-detail-btn-goto",i.appendChild(h(Ne));let l=document.createElement("span");p(l,this.t("detail.goToAnnotation")),i.appendChild(l),i.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),o.appendChild(i);let d=this.callbacks.lostNote?.(n.id);d&&o.appendChild(d);}buildDiagnostics(e,n){let s=n.diagnostics;if(!s)return;let o=Array.isArray(s.console)?s.console:[],r=Array.isArray(s.network)?s.network:[],i=o.filter(x=>x.level==="error").length,l=a("div",{class:"sp-detail-diag"}),d=document.createElement("button");d.type="button",d.className="sp-detail-diag-toggle",d.setAttribute("aria-expanded","false");let c=document.createElement("span"),u=document.createElement("span");u.style.display="inline-flex",u.style.alignItems="center",u.style.gap="8px",u.appendChild(h(Wt)),p(c,this.t("detail.diagnostics")),u.appendChild(c),d.appendChild(u);let f=a("span",{class:"sp-detail-diag-counts"}),k=a("span",{class:`sp-detail-diag-count${i>0?" sp-detail-diag-count--errors":""}`});p(k,`${o.length} console`);let y=a("span",{class:`sp-detail-diag-count${r.length>0?" sp-detail-diag-count--errors":""}`});p(y,`${r.length} net`),f.appendChild(k),f.appendChild(y),d.appendChild(f);let w=a("div",{class:"sp-detail-diag-body"});if(o.length>0){let x=document.createElement("div"),g=a("div",{class:"sp-detail-diag-group-title"});p(g,this.t("detail.diagnostics.console")),x.appendChild(g);let b=document.createElement("ul");b.className="sp-detail-diag-list";for(let m of o){let S=document.createElement("li"),O=a("span",{class:`sp-detail-diag-level sp-detail-diag-level--${m.level}`});p(O,m.level);let L=a("span",{class:"sp-detail-diag-message"});p(L,j(m.message,240)),L.title=m.message,S.appendChild(O),S.appendChild(L),b.appendChild(S);}x.appendChild(b),w.appendChild(x);}if(r.length>0){let x=document.createElement("div"),g=a("div",{class:"sp-detail-diag-group-title"});p(g,this.t("detail.diagnostics.network")),x.appendChild(g);let b=document.createElement("ul");b.className="sp-detail-diag-list";for(let m of r){let S=document.createElement("li");S.classList.add("sp-detail-diag-net");let O=a("span",{class:"sp-detail-diag-net-status"});p(O,m.status===0?"ERR":String(m.status));let L=a("span",{class:"sp-detail-diag-net-method"});p(L,m.method);let U=a("span",{class:"sp-detail-diag-net-url"});p(U,j(m.url,120)),U.title=`${m.url} \u2014 ${qt(m.durationMs)}`,S.appendChild(O),S.appendChild(L),S.appendChild(U),b.appendChild(S);}x.appendChild(b),w.appendChild(x);}d.addEventListener("click",()=>{let x=d.getAttribute("aria-expanded")==="true";d.setAttribute("aria-expanded",String(!x)),w.classList.toggle("sp-detail-diag-body--open",!x);}),l.appendChild(d),l.appendChild(w),e.appendChild(l);}addAnnotationRow(e,n,s,o){let r=a("div",{class:"sp-detail-annotation-row"});r.appendChild(h(n));let i=a("div",{class:"sp-detail-meta-content"}),l=a("div",{class:"sp-detail-annotation-label"});p(l,s),i.appendChild(l),i.appendChild(o()),r.appendChild(i),e.appendChild(r);}handleResolve(){return this.run("resolve",e=>this.callbacks.onResolve(e))}handleDelete(){return this.run("delete",e=>this.callbacks.onDelete(e))}async run(e,n){let s=this.currentFeedback;if(!(!s||this.pending.has(s.id))){this.pending.set(s.id,e),this.lock(e);try{await n(s);}catch{}finally{this.pending.delete(s.id),this.currentFeedback?.id===s.id&&this.unlock(e,this.currentFeedback);}}}lock(e){this.setActionsDisabled(true);let n=this.buttonFor(e);n&&(this.setButtonLoading(n),n.setAttribute("aria-busy","true"));}unlock(e,n){let s=this.buttonFor(e);s?.removeAttribute("aria-busy"),e==="resolve"?this.restoreResolveBtn(n):e==="delete"?this.restoreDeleteBtn():s?.replaceChildren(...He(e)),this.setActionsDisabled(false);}buttonFor(e){return e==="resolve"?this.resolveBtn:e==="delete"?this.deleteBtn:this.customBtns.find(n=>n.dataset.actionId===e.action.id)??null}setActionsDisabled(e){for(let n of [this.resolveBtn,this.deleteBtn,...this.customBtns])n&&(n.disabled=e);}setButtonLoading(e){e.disabled=true,e.replaceChildren(a("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let n=E(e.status);this.resolveBtn.appendChild(h(n?Kt:_e));let s=document.createElement("span");p(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(h(Vt));let e=document.createElement("span");p(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Jt='<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>',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="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>',Zt='<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>',je={question:0,change:1,bug:2,other:3};function go(t,e){let n=[...t];switch(e){case "newest":n.sort((s,o)=>new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":n.sort((s,o)=>new Date(s.createdAt).getTime()-new Date(o.createdAt).getTime());break;case "by-type":n.sort((s,o)=>{let r=je[s.type]??99,i=je[o.type]??99;return r!==i?r-i:new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":n.sort((s,o)=>{let r=E(s.status)?1:0,i=E(o.status)?1:0;return r!==i?r-i:new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return n}function en(t){try{return new URL(t).pathname}catch{return t}}function tn(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 mo(t){let e=new Map;for(let s of t){let o=en(s.url),r=e.get(o);r?r.push(s):e.set(o,[s]);}return new Map([...e.entries()].sort((s,o)=>o[1].length-s[1].length))}function fo(t,e){let n=a("div",{class:"sp-group-header"});n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-expanded","true");let s=a("span",{class:"sp-group-header-chevron"});s.appendChild(h(Zt)),n.appendChild(s);let o=a("span",{class:"sp-group-header-icon"});o.appendChild(h(Ke)),n.appendChild(o);let r=a("span",{class:"sp-group-header-path"}),i=tn(t,40);p(r,i),t.length>40&&(r.title=t),n.appendChild(r);let l=a("span",{class:"sp-group-header-count"});p(l,String(e)),n.appendChild(l);let d=()=>{let c=n.getAttribute("aria-expanded")==="true";n.setAttribute("aria-expanded",String(!c)),n.classList.toggle("sp-group-header--collapsed",c);let u=n.nextElementSibling;u?.classList.contains("sp-group-content")&&u.classList.toggle("sp-group-content--collapsed",c);};return n.addEventListener("click",d),n.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),d());}),n}var Ue=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;sortDropdown;groupToggle;t;onChange;removeOutsideClick=null;constructor(e,n){this.onChange=e,this.t=n,this.element=a("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");let s=h(Jt);this.sortBtn.appendChild(s),this.sortBtn.appendChild(a("span",{class:"sp-sort-btn-label"})),this.updateSortLabel(),this.sortBtn.addEventListener("click",i=>{i.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let o=h(Ke);this.groupToggle.appendChild(o);let r=a("span",{class:"sp-group-toggle-label"});p(r,this.t("group.byPage")),this.groupToggle.appendChild(r),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.sortDropdown=a("div",{class:"sp-sort-dropdown"}),this.sortDropdown.appendChild(this.sortBtn),this.element.appendChild(this.sortDropdown),this.element.appendChild(this.groupToggle),this.element.addEventListener("keydown",i=>{i.key!=="Escape"||!this.menuEl||(i.stopPropagation(),this.closeMenu(),this.sortBtn.focus());});}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=a("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)),p(s,n.label),n.mode===this._sortMode&&s.appendChild(h(fe)),s.addEventListener("click",o=>{o.stopPropagation(),this._sortMode=n.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.sortDropdown.appendChild(this.menuEl),this.removeOutsideClick=N(this.sortDropdown,()=>this.closeMenu());}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.removeOutsideClick?.(),this.removeOutsideClick=null;}updateSortLabel(){let n={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")}[this._sortMode],s=this.sortBtn.querySelector(".sp-sort-btn-label");s&&p(s,n),this.sortBtn.setAttribute("aria-label",`${this.t("sort.label")}: ${n}`);}destroy(){this.closeMenu();}},bo='.sp-sort-controls{display:flex;align-items:center;gap:8px;}.sp-sort-dropdown{display:contents;}.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 12px;border-radius:var(--sp-radius-full);border:none;background:var(--sp-fill);color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;transition:var(--sp-tr);}.sp-sort-btn{position:relative;}.sp-sort-btn svg,.sp-group-toggle svg,.sp-mine-toggle svg{width:13px;height:13px;flex-shrink:0;color:var(--sp-text-secondary);}.sp-sort-btn svg{width:14px;height:14px;}@media (hover: hover) and (pointer: fine){.sp-sort-btn:hover,.sp-group-toggle:hover,.sp-mine-toggle:hover{background:var(--sp-fill-strong);}.sp-group-toggle--active:hover,.sp-mine-toggle--active:hover{background:var(--sp-accent-dark);}}.sp-sort-btn[aria-expanded="true"]{background:var(--sp-fill-strong);}.sp-group-toggle--active,.sp-mine-toggle--active{background:var(--sp-accent);color:#fff;}.sp-group-toggle--active svg,.sp-mine-toggle--active svg{color:inherit;}.sp-sort-menu{position:absolute;top:calc(100% - 4px);left:16px;min-width:170px;padding:6px;border-radius:var(--sp-radius-lg);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);z-index:10;transform-origin:top left;animation:sp-menu-in 0.15s var(--sp-ease-out) backwards;}.sp-sort-option{display:block;width:100%;min-height:34px;padding:7px 10px;border:none;border-radius:8px;background:transparent;color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:400;letter-spacing:-0.005em;cursor:pointer;text-align:left;transition:var(--sp-tr);}@media (hover: hover) and (pointer: fine){.sp-sort-option:hover{background:var(--sp-fill);}}.sp-sort-option--active{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:600;}.sp-sort-option--active svg{width:13px;height:13px;flex-shrink:0;color:var(--sp-accent-ink);stroke-width:2.5;}.sp-group-header{display:flex;align-items:center;gap:8px;margin:2px -4px 6px;padding:8px;border-radius:var(--sp-radius);background:color-mix(in srgb,var(--sp-grouped) 72%,transparent);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);cursor:pointer;user-select:none;position:sticky;top:0;z-index:2;transition:background-color 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-group-header:hover{background:color-mix(in srgb,var(--sp-grouped) 72%,var(--sp-fill-strong));}}.sp-group-header:focus-visible{outline:2px solid var(--sp-accent);outline-offset:-2px;}.sp-group-header-chevron{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform 0.2s var(--sp-ease-out);transform:rotate(90deg);}.sp-group-header-chevron svg{width:12px;height:12px;color:var(--sp-text-secondary);}.sp-group-header--collapsed .sp-group-header-chevron{transform:rotate(0deg);}.sp-group-header-icon{display:flex;align-items:center;flex-shrink:0;}.sp-group-header-icon svg{width:14px;height:14px;color:var(--sp-text-secondary);}.sp-group-header-path{font-size:13px;font-weight:600;color:var(--sp-text-secondary);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-group-header-count{font-size:12px;font-weight:600;padding:1px 8px;border-radius:var(--sp-radius-full);background:color-mix(in srgb,var(--sp-accent) 13%,transparent);color:var(--sp-accent-ink);flex-shrink:0;font-variant-numeric:tabular-nums;}.sp-group-content--collapsed{display:none;}@media (forced-colors: active){.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle,.sp-sort-option,.sp-group-header{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-group-toggle--active,.sp-mine-toggle--active{background:Highlight !important;color:HighlightText !important;}.sp-sort-btn:focus-visible,.sp-group-toggle:focus-visible,.sp-mine-toggle:focus-visible,.sp-sort-option:focus-visible,.sp-group-header:focus-visible{outline:3px solid Highlight !important;}.sp-sort-menu{border:2px solid ButtonText !important;background:Canvas !important;}}';var wo='.sp-stats-bar{display:flex;flex-direction:column;gap:8px;padding:2px 20px 12px;user-select:none;}.sp-stats-bar[hidden]{display:none;}.sp-stats-row{display:flex;align-items:center;gap:18px;}.sp-stats-item{display:flex;align-items:center;gap:6px;}.sp-stats-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}.sp-stats-value{font-size:17px;font-weight:600;line-height:1;letter-spacing:-0.02em;color:var(--sp-text);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";transition:opacity 0.2s ease;}.sp-stats-label{font-size:11px;font-weight:500;line-height:1;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;}.sp-stats-progress{display:flex;align-items:center;gap:8px;}.sp-stats-progress-track{flex:1;height:4px;border-radius:2px;background:var(--sp-fill-strong);overflow:hidden;}.sp-stats-progress-fill{height:100%;border-radius:2px;background:var(--sp-accent);clip-path:inset(0 100% 0 0 round 2px);transition:clip-path 0.3s var(--sp-ease-out);}.sp-stats-progress-label{font-size:11px;line-height:1;color:var(--sp-text-secondary);white-space:nowrap;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";min-width:64px;text-align:right;}',Ve=class{element;valueOpen;valueClosed;valueBugs;progressFill;progressLabel;t;constructor(e){this.t=e,this.element=a("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label",e("stats.aria")),this.element.hidden=true;let n=a("div",{class:"sp-stats-row"}),s=a("div",{class:"sp-stats-item"}),o=a("span",{class:"sp-stats-dot"});o.style.background="#22c55e",this.valueOpen=a("span",{class:"sp-stats-value"}),p(this.valueOpen,"0");let r=a("span",{class:"sp-stats-label"});p(r,this.t("stats.open")),s.appendChild(o),s.appendChild(this.valueOpen),s.appendChild(r);let i=a("div",{class:"sp-stats-item"}),l=a("span",{class:"sp-stats-dot"});l.style.background="#9ca3af",this.valueClosed=a("span",{class:"sp-stats-value"}),p(this.valueClosed,"0");let d=a("span",{class:"sp-stats-label"});p(d,this.t("stats.closed")),i.appendChild(l),i.appendChild(this.valueClosed),i.appendChild(d);let c=a("div",{class:"sp-stats-item"}),u=a("span",{class:"sp-stats-dot"});u.style.background="var(--sp-type-bug)",this.valueBugs=a("span",{class:"sp-stats-value"}),p(this.valueBugs,"0");let f=a("span",{class:"sp-stats-label"});p(f,this.t("stats.bugs")),c.appendChild(u),c.appendChild(this.valueBugs),c.appendChild(f),n.appendChild(s),n.appendChild(i),n.appendChild(c);let k=a("div",{class:"sp-stats-progress"}),y=a("div",{class:"sp-stats-progress-track"});this.progressFill=a("div",{class:"sp-stats-progress-fill"}),y.appendChild(this.progressFill),this.progressLabel=a("span",{class:"sp-stats-progress-label"}),p(this.progressLabel,""),k.appendChild(y),k.appendChild(this.progressLabel),this.element.appendChild(n),this.element.appendChild(k);}update(e,n){if(n===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,o=0,r=0;for(let c of e)E(c.status)?o++:s++,c.type==="bug"&&r++;p(this.valueOpen,String(s)),p(this.valueClosed,String(o)),p(this.valueBugs,String(r));let i=e.length,l=i>0?Math.round(o/i*100):0;this.progressFill.style.clipPath=`inset(0 ${100-l}% 0 0 round 2px)`;let d=A(this.t,"stats.progress",{percent:l});p(this.progressLabel,d);}};var nn='<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 So(t){let e=Array.from(t.querySelectorAll(".sp-card")),s=t.getRootNode().activeElement?.closest(".sp-card"),o=s?e.indexOf(s):-1;return o>=0?o:e.findIndex(r=>r.classList.contains("sp-card--focused"))}function To(t,e){let n=t.querySelectorAll(".sp-card");if(n.length===0)return;for(let r of n)r.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,n.length-1)),o=n[s];o&&(o.classList.add("sp-card--focused"),o.scrollIntoView({block:"nearest"}),o.focus({preventScroll:true}));}var sn=[{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"}],Ao=".sp-shortcuts-overlay{position:fixed;inset:0;background:var(--sp-backdrop, rgba(15, 23, 42, 0.2));display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;}.sp-shortcuts-overlay--visible{opacity:1;pointer-events:auto;}.sp-shortcuts-card{width:min(356px,calc(100% - 24px));padding:22px 22px 18px;border-radius:var(--sp-radius-xl);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-sheet);font-family:var(--sp-font);position:relative;}.sp-shortcuts-title{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;letter-spacing:-0.022em;color:var(--sp-text);margin-bottom:18px;}.sp-shortcuts-title svg{width:18px;height:18px;color:var(--sp-text-secondary);flex-shrink:0;}.sp-shortcuts-close{position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:50%;border:none;background:var(--sp-fill);color:var(--sp-text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-close:hover{background:var(--sp-fill-strong);color:var(--sp-text);}}.sp-shortcuts-close svg{width:14px;height:14px;}.sp-shortcuts-grid{display:flex;flex-direction:column;gap:10px;}.sp-shortcuts-row{display:flex;align-items:center;gap:12px;}.sp-shortcuts-keys{display:flex;align-items:center;gap:4px;min-width:80px;justify-content:flex-end;}.sp-shortcuts-separator{font-size:11px;color:var(--sp-text-secondary);user-select:none;}.sp-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;padding:0 7px;border-radius:6px;background:var(--sp-row);box-shadow:0 0 0 0.5px var(--sp-separator),var(--sp-shadow-edge-drop);font-family:var(--sp-font);font-size:12px;font-weight:500;color:var(--sp-text);text-align:center;line-height:1;user-select:none;}.sp-shortcuts-desc{font-size:13px;color:var(--sp-text);line-height:1.3;}.sp-shortcuts-hint{width:28px;height:28px;border-radius:var(--sp-radius-full);border:none;background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:13px;font-weight:600;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease;position:absolute;bottom:12px;right:12px;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-hint:hover{background:color-mix(in srgb,var(--sp-accent) 14%,transparent);color:var(--sp-accent-ink);}}.sp-shortcuts-hint::after{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);right:0;padding:5px 10px;border-radius:var(--sp-radius-full);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);font-family:var(--sp-font);font-size:12px;font-weight:500;color:var(--sp-text);white-space:nowrap;opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity 0.15s ease,transform 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-hint:hover::after{opacity:1;transform:translateY(0);}}@media (forced-colors: active){.sp-shortcuts-card,.sp-shortcuts-hint,.sp-kbd{border:1px solid ButtonText;}}.sp-card--focused{outline:2px solid var(--sp-accent);outline-offset:-2px;border-radius:inherit;}",on='<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>',ze=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.isSuspended=n.isSuspended??(()=>false),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=o=>this.handleKeydown(o);}t;helpOverlay;hintButton;keyMap;isSuspended;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;opener=null;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();}get isHelpVisible(){return this.helpVisible}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||this.isSuspended())return;let n=e.composedPath();if(n.some(r=>r instanceof Element&&r.getAttribute("aria-modal")==="true"))return;let s=n[0];if(s){let r=s.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||s.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let o=this.keyMap.get(e.key);o&&(e.preventDefault(),e.stopPropagation(),o());}showHelp(){let e=this.helpOverlay.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null,this.helpVisible=true,C(this.helpOverlay,false),this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false;let e=B(this.helpOverlay);C(this.helpOverlay,true),this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible"),e&&this.opener?.isConnected&&this.opener.focus(),this.opener=null;}buildOverlay(){let e=a("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),C(e,true),e.addEventListener("click",l=>{l.target===e&&this.hideHelp();});let n=a("div",{class:"sp-shortcuts-card"}),s=a("div",{class:"sp-shortcuts-title"});s.appendChild(h(nn));let o=a("span");p(o,this.t("shortcuts.title")),s.appendChild(o),n.appendChild(s);let r=document.createElement("button");r.className="sp-shortcuts-close",r.setAttribute("aria-label",this.t("shortcuts.close")),r.appendChild(h(on)),r.addEventListener("click",()=>this.hideHelp()),n.appendChild(r);let i=a("div",{class:"sp-shortcuts-grid"});for(let l of sn){let d=a("div",{class:"sp-shortcuts-row"}),c=a("div",{class:"sp-shortcuts-keys"});l.keys.forEach((f,k)=>{if(k>0){let w=a("span",{class:"sp-shortcuts-separator"});p(w,"/"),c.appendChild(w);}let y=a("span",{class:"sp-kbd"});p(y,f),c.appendChild(y);});let u=a("span",{class:"sp-shortcuts-desc"});p(u,this.t(l.label)),d.appendChild(c),d.appendChild(u),i.appendChild(d);}return n.appendChild(i),e.appendChild(n),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),p(e,"?"),e.addEventListener("click",n=>{n.stopPropagation(),this.toggleHelp();}),e}};
|
|
8
|
+
exports.$=gs;exports.A=ht;exports.Aa=A;exports.B=gt;exports.Ba=Te;exports.C=Yn;exports.Ca=Ae;exports.D=h;exports.Da=Xs;exports.E=a;exports.Ea=Pe;exports.F=p;exports.Fa=Js;exports.G=N;exports.Ga=Fe;exports.H=X;exports.Ha=eo;exports.I=C;exports.Ia=lo;exports.J=Y;exports.Ja=$e;exports.K=qn;exports.Ka=go;exports.L=Jn;exports.La=mo;exports.M=Zn;exports.Ma=fo;exports.N=es;exports.Na=Ue;exports.O=me;exports.Oa=bo;exports.P=ns;exports.Pa=wo;exports.Q=ss;exports.Qa=Ve;exports.R=os;exports.Ra=So;exports.S=rs;exports.Sa=To;exports.T=as;exports.Ta=Ao;exports.U=ls;exports.Ua=ze;exports.V=ps;exports.W=ds;exports.X=cs;exports.Y=fe;exports.Z=us;exports._=hs;exports.a=st;exports.aa=ms;exports.b=R;exports.ba=fs;exports.c=T;exports.ca=bs;exports.d=P;exports.da=xs;exports.e=M;exports.ea=vs;exports.f=We;exports.fa=ks;exports.g=rt;exports.ga=ys;exports.h=Xe;exports.ha=be;exports.i=Ye;exports.ia=ws;exports.j=ie;exports.ja=Cs;exports.k=E;exports.ka=Ss;exports.l=Qe;exports.la=Ts;exports.m=qe;exports.ma=Ee;exports.n=Je;exports.na=As;exports.o=Ze;exports.oa=Ls;exports.p=et;exports.pa=Rs;exports.q=tt;exports.qa=St;exports.r=it;exports.ra=Ps;exports.s=at;exports.sa=Fs;exports.t=lt;exports.ta=Ms;exports.u=pt;exports.ua=Is;exports.v=dt;exports.va=Ns;exports.w=ct;exports.wa=_s;exports.x=ut;exports.xa=Us;exports.y=pe;exports.ya=Ks;exports.z=Wn;exports.za=Vs;//# sourceMappingURL=chunk-7LL25BRN.cjs.map
|
|
9
|
+
//# sourceMappingURL=chunk-7LL25BRN.cjs.map
|