@siteping/widget 0.12.1 → 0.12.2
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/dist/index.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var SitePing=function(e){"use strict";var t=Object.defineProperty,i=(e,t,i)=>()=>{if(i)throw i[0];try{return e&&(t=e(e=0)),t}catch(e){throw i=[e],e}},r=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})};var s=i(()=>{});function n(e){return o.test(e)}var o,a=i(()=>{o=/^(?!\.)(?!.*\.\.)[\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 l(e,t){return function(e){return"object"==typeof e&&null!==e}(e)&&t in e}var d,c,p,h,u,f=i(()=>{}),g=i(()=>{f(),d=class extends Error{code;retryable;constructor(e,t,i){super(e),this.code=t,this.retryable=i,this.name="SitepingError"}},c=class extends d{constructor(e){super(e,"NETWORK",!0),this.name="SitepingNetworkError"}},p=class extends d{status;constructor(e,t){super(e,"VALIDATION",!1),this.name="SitepingValidationError",this.status=t}},h=class extends d{status;constructor(e,t){super(e,"AUTH",!1),this.name="SitepingAuthError",this.status=t}},u=["NETWORK","VALIDATION","AUTH","SERVER","TIMEOUT"]});function m(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}function b(e,t,i){return function(e,t){return e.replace(/\{(\w+)\}/g,(e,i)=>{let r=t[i];return void 0===r?e:String(r)})}(e(t),i)}var y=i(()=>{});function x(e){return S.includes(e)}function v(e,t){return l(e,"code")&&e.code===t}function w(e){return{cssSelector:e.anchor.cssSelector,xpath:e.anchor.xpath,textSnippet:e.anchor.textSnippet,elementTag:e.anchor.elementTag,elementId:e.anchor.elementId,textPrefix:e.anchor.textPrefix,textSuffix:e.anchor.textSuffix,fingerprint:e.anchor.fingerprint,neighborText:e.anchor.neighborText,anchorKey:e.anchor.anchorKey??null,xPct:e.rect.xPct,yPct:e.rect.yPct,wPct:e.rect.wPct,hPct:e.rect.hPct,scrollX:e.scrollX,scrollY:e.scrollY,viewportW:e.viewportW,viewportH:e.viewportH,devicePixelRatio:e.devicePixelRatio}}var k,C,S,E,M,A,T,B=i(()=>{f(),k=200,C=["open","in_progress","resolved","wont_fix"],S=["resolved","wont_fix"],E=5e3,M=class extends Error{code="STORE_DUPLICATE";constructor(e="Duplicate record",t){super(e,t),this.name="StoreDuplicateError"}},A=191,T=191});function R(){try{return crypto.randomUUID()}catch{return`${Date.now()}-${Math.random().toString(36).slice(2)}`}}async function L(e,t){let{status:i}=e,r=await e.text().catch(()=>"Unknown error"),s=`${t}: ${r?`${i} ${r}`:i}`;return 401===i||403===i?new h(s,i):i>=500||408===i||429===i?new d(s,"SERVER",!0):i>=400?new p(s,i):new d(s,"SERVER",!1)}function P(e,t){if(e instanceof c)return e;let i=e instanceof Error?e.message:String(e);return new c(`${t}: ${i}`)}var I,N,D=i(()=>{g(),I=(e,t)=>e?.[t]}),O=i(()=>{s(),a(),g(),y(),f(),B(),D()}),F=i(()=>{N="(max-width: 640px), (max-height: 500px) and (pointer: coarse)"});function $(e){let t=document.createRange().createContextualFragment(e).firstElementChild;if("svg"!==t?.nodeName.toLowerCase())throw new Error("[siteping] Invalid SVG string");for(let e of[...t.attributes])e.name.startsWith("on")&&t.removeAttribute(e.name);for(let e of t.querySelectorAll("*"))for(let t of[...e.attributes])t.name.startsWith("on")&&e.removeAttribute(t.name);return t}function z(e,t){let i=document.createElement(e);if(t)for(let[e,r]of Object.entries(t))"class"===e?i.className=r:"style"===e?i.style.cssText=r:i.setAttribute(e,r);return i}function _(e,t){e.textContent=t}function W(e,t){let i=e.getRootNode(),r=i instanceof ShadowRoot?i.host:null,s=i=>{e.contains(i.target)||t()},n=e=>{e.target!==r&&t()};return i.addEventListener("click",s,!0),r&&document.addEventListener("click",n,!0),()=>{i.removeEventListener("click",s,!0),r&&document.removeEventListener("click",n,!0)}}function H(e,t){e.hidden=t,e.style.display=t?"none":""}function V(e,t){e.toggleAttribute("inert",t)}function j(e){let t=e.getRootNode().activeElement;return null!==t&&e.contains(t)}function U(e){let t=Array.from(e.childNodes).map(e=>e.cloneNode(!0));return e.disabled=!0,e.replaceChildren(z("div",{class:"sp-spinner sp-spinner--sm"})),()=>{e.replaceChildren(...t),e.disabled=!1}}function Y(){let e=navigator.userAgentData;return e?"macOS"===e.platform:navigator.platform?.includes("Mac")??/Macintosh|Mac OS X/i.test(navigator.userAgent)}function q(e,t="en"){let i=Date.now()-new Date(e).getTime(),r=Math.floor(i/1e3);if(r<60)return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second");let s=new Intl.RelativeTimeFormat(t,{numeric:"always",style:"narrow"}),n=Math.floor(r/60);if(n<60)return s.format(-n,"minute");let o=Math.floor(n/60);if(o<24)return s.format(-o,"hour");let a=Math.floor(o/24);return a<7?s.format(-a,"day"):new Date(e).toLocaleDateString(t)}var G=i(()=>{});function K(e){for(let t=e;t;t=de(t))if(se.has(t))return!0;return!1}function X(e,t){se.add(e),t&&oe.set(e,t);for(let t of ie)e.addEventListener(t,pe,{passive:!0});for(let t of["keydown","keypress","keyup"])e.addEventListener(t,he);let i=()=>{for(let t of re)("inert"!==t||!ne.has(e))&&e.removeAttribute(t)};i(),new MutationObserver(i).observe(e,{attributeFilter:re})}function J(e,t){t?ne.add(e):ne.delete(e),e.toggleAttribute("inert",t)}function Q(e,t){let i=ae.get(e);return i||(i=new Set,ae.set(e,i)),i.add(t),()=>{i.delete(t)}}function Z(e,t){let i=le.get(e);return i||(i=new Set,le.set(e,i)),i.add(t),e.addEventListener("keydown",t),()=>{i.delete(t),e.removeEventListener("keydown",t)}}function ee(){if("none"===getComputedStyle(document.body).pointerEvents)return!0;for(let e of document.querySelectorAll('[aria-modal="true"]'))if(e.getClientRects().length>0&&"visible"===getComputedStyle(e).visibility&&!K(e))return!0;return!1}function te(e){let t=e.composedPath()[0];for(;t instanceof Element;){let e=(t.shadowRoot??oe.get(t))?.activeElement;if(!e)break;t=e}return t instanceof Node?t:null}var ie,re,se,ne,oe,ae,le,de,ce,pe,he,ue,fe,ge,me,be,ye,xe,ve,we,ke,Ce,Se,Ee,Me,Ae,Te,Be,Re,Le,Pe=i(()=>{ie=["pointerdown","mousedown","touchstart","touchend","click","focusin","focusout","wheel","touchmove"],re=["inert","aria-hidden"],se=new WeakSet,ne=new WeakSet,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,de=e=>e instanceof ShadowRoot?e.host:e.parentNode,ce=e=>e instanceof Node&&K(e),pe=e=>e.stopPropagation(),he=e=>{let{key:t}=e,i=te(e);"Tab"!==t&&"Escape"!==t&&i instanceof HTMLElement&&(i.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(i.tagName))&&e.stopPropagation()}}),Ie=i(()=>{ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',fe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',ge='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',me='<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>',be='<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>',ye='<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>',xe='<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>',ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><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>',we='<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>',ke='<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>',Ce='<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>',Se='<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>',Ee='<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>',Me='<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>',Ae='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',Te='<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>',Re='<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>',Le='<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>'});function Ne(e,t,i){let r="#";for(let s=1;s<7;s+=2){let n=parseInt(e.slice(s,s+2),16);r+=Math.round(n+(parseInt(t.slice(s,s+2),16)-n)*i).toString(16).padStart(2,"0")}return r}function De(e){let t=0;for(let[i,r]of[[1,.2126],[3,.7152],[5,.0722]]){let s=parseInt(e.slice(i,i+2),16)/255;t+=r*(s<=.04045?s/12.92:((s+.055)/1.055)**2.4)}return t}function Oe(e,t,i){let r=De(t),s=e;for(let t=1;t<=10;t++){let n=De(s);if((Math.max(n,r)+.05)/(Math.min(n,r)+.05)>=4.5)break;s=Ne(e,i,t/10)}return s}function Fe(e=He,t){let i=function(e){if(Ve.test(e))return e;let t=je.test(e)?e.match(je):null;return t?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:Ue.test(e)?e.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${e}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),He)}(e),r=Ne(i,"#000000",.15);return"dark"===function(e){return"dark"===e||"auto"===e&&!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia(Ye).matches?"dark":"light"}(t)?{accent:i,accentLight:i+"22",accentDark:r,accentGlow:i+"44",accentGradient:`linear-gradient(135deg, ${i}, ${r})`,accentText:Oe(i,Ne("#1e293b",i,34/255),"#ffffff"),bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#8695aa",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.94)",glassBgHeavy:"rgba(15, 23, 42, 0.96)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#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)"}:{accent:i,accentLight:i+"14",accentDark:r,accentGlow:i+"33",accentGradient:`linear-gradient(135deg, ${i}, ${r})`,accentText:Oe(i,Ne("#f8f9fb",i,20/255),"#000000"),bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#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"}}function $e(e,t){switch(e){case"question":return t.typeQuestion;case"change":return t.typeChange;case"bug":return t.typeBug;default:return t.typeOther}}function ze(e,t){switch(e){case"in_progress":return t.statusInProgress;case"resolved":return t.statusResolved;case"wont_fix":return t.statusWontFix;default:return t.statusOpen}}function _e(e,t){switch(e){case"in_progress":return t.statusInProgressBg;case"resolved":return t.statusResolvedBg;case"wont_fix":return t.statusWontFixBg;default:return t.statusOpenBg}}function We(e,t){switch(e){case"question":return t.typeQuestionBg;case"change":return t.typeChangeBg;case"bug":return t.typeBugBg;default:return t.typeOtherBg}}var He,Ve,je,Ue,Ye,qe=i(()=>{He="#0066ff",Ve=/^#[0-9a-fA-F]{6}$/,je=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,Ue=/^#[0-9a-fA-F]{8}$/,Ye="(prefers-color-scheme: dark)"});function Ge(e){return"function"==typeof window.matchMedia&&window.matchMedia(e).matches}function Ke(){return Ge(N)}function Xe(){return Ge("(pointer: coarse)")}function Je(){return Ge("(prefers-reduced-motion: reduce)")}function Qe(e){let t=window.visualViewport;if(!t)return()=>{};let i=()=>e(Math.max(0,Math.round(window.innerHeight-t.height-t.offsetTop)),t.height);return i(),t.addEventListener("resize",i),t.addEventListener("scroll",i),()=>{t.removeEventListener("resize",i),t.removeEventListener("scroll",i)}}var Ze=i(()=>{F()}),et={};function tt(e={}){return new pt({allowDataUrls:!0,maxImageTimeout:3e5,...e})}function it(e){return!(20===e.type&&"none"===e.value||18===e.type&&!ao[e.name])}function rt(e){if(!e||"none"===e)return qc;let t=Yc.get(e);if(void 0!==t)return Yc.delete(e),Yc.set(e,t),t;let i=Gc(e);if(Yc.size>=Uc){let e=Yc.keys().next().value;void 0!==e&&Yc.delete(e)}return Yc.set(e,i),i}function st(e){let t=0,i=0;for(let r of e.functions)"blur"===r.kind?t+=r.value:"drop-shadow"===r.kind&&(t+=r.blur,i=Math.max(i,Math.abs(r.x),Math.abs(r.y)));return Math.ceil(3*t+i)}function nt(e){let t=(e.ownerDocument??document).createElement("canvas");return t.width=e.width,t.height=e.height,t}async function ot(e,t,i,r,s){if(Yl(s),t.functions.length>0&&function(e=document){let t=rp.get(e);if(void 0!==t)return t;let i=e.createElement("canvas"),r=e.createElement("canvas"),s=!1;try{i.width=i.height=r.width=r.height=32;let e=i.getContext("2d"),t=r.getContext("2d");if(e&&t&&"filter"in t){e.fillStyle="#fff",e.fillRect(8,8,8,8),t.filter="blur(2px)",t.drawImage(i,0,0);let r=(t.getImageData(6,12,1,1).data[3]??0)>0;t.clearRect(0,0,32,32),t.filter="drop-shadow(12px 0px 0px rgba(255, 0, 0, 0.5))",t.drawImage(i,0,0);let n=t.getImageData(24,12,1,1).data;s=r&&(n[0]??0)>240&&(n[1]??0)<10&&(n[3]??0)>=126&&(n[3]??0)<=129}}catch{}finally{Vc(i),Vc(r)}return rp.set(e,s),s}(e.ownerDocument??document)){let n=function(e,t,i,r,s){let n,o,a=!1;try{Yl(s),n=nt(e);let l=n.getContext("2d");if(!l||!("filter"in l)||(l.filter=tp(t,r),"none"===l.filter||""===l.filter))return null;l.drawImage(e,0,0),Yl(s),o=nt(e);let d=o.getContext("2d");return d?(d.globalAlpha=i,d.drawImage(n,0,0),Yl(s),a=!0,o):null}catch{return Yl(s),null}finally{n&&Vc(n),o&&!a&&Vc(o)}}(e,t,i,r,s);if(n)return n}if(!sp(t))throw new Hc("Filter chain requires native canvas filters");return async function(e,t,i,r,s){Yl(s);let n=t.functions.find(e=>"blur"===e.kind),o=t.functions.find(e=>"drop-shadow"===e.kind),a=n&&"blur"===n.kind?n.value:0,l=o&&"drop-shadow"===o.kind?{x:o.x,y:o.y,blur:o.blur,color:o.color}:void 0;if(!a&&!l){let t=nt(e),r=t.getContext("2d");if(!r)throw Vc(t),new Hc("Filter surface canvas is unavailable");r.globalAlpha=i;try{return r.drawImage(e,0,0),t}catch{throw Vc(t),new Hc("Filter surface image cannot be drawn")}}let d,c=e.ownerDocument??document,p=(e,t={})=>{let i=c.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>i.setAttribute(e,String(t))),i},h=p("svg",{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`}),u=p("defs"),f=p("filter",{id:"composited-filter",filterUnits:"userSpaceOnUse",x:0,y:0,width:e.width,height:e.height,"color-interpolation-filters":"sRGB"});if(a&&f.appendChild(p("feGaussianBlur",{stdDeviation:a*r,result:"blurred-source"})),l){f.appendChild(p("feGaussianBlur",{in:a?"blurred-source":"SourceAlpha",stdDeviation:l.blur*r})),f.appendChild(p("feOffset",{dx:l.x*r,dy:l.y*r,result:"offset-shadow"})),f.appendChild(p("feFlood",{"flood-color":l.color})),f.appendChild(p("feComposite",{in2:"offset-shadow",operator:"in"}));let e=p("feMerge");e.appendChild(p("feMergeNode")),e.appendChild(p("feMergeNode",{in:a?"blurred-source":"SourceGraphic"})),f.appendChild(e)}u.appendChild(f),h.appendChild(u);try{if(d=e.toDataURL("image/png"),"data:,"===d)throw new Error("Canvas size is unsupported")}catch{throw new Hc("Filter surface pixels cannot be serialized")}h.appendChild(p("image",{width:e.width,height:e.height,href:d,filter:"url(#composited-filter)"}));let g,m=c.defaultView,b=m?.Image?new m.Image:new Image;try{b.src=`data:image/svg+xml,${encodeURIComponent((new XMLSerializer).serializeToString(h))}`,await ip(b,s),Yl(s),g=nt(e);let t=g.getContext("2d");if(!t)throw new Hc("Filter surface canvas is unavailable");return t.globalAlpha=i,t.drawImage(b,0,0),g}catch(e){throw g&&Vc(g),s?.aborted&&Yl(s),e instanceof Hc?e:new Hc("Filter surface image cannot be drawn")}finally{b.removeAttribute("src")}}(e,t,i,r,s)}function at(e,t,i){let r=t*i*4;return!Number.isFinite(r)||t<=0||i<=0||t>8192||i>8192||e.pixels+r>16777216?0:(e.pixels+=r,r)}function lt(e){let t=e.styles,i=e.bounds;for(let r of t.boxShadow)if(!r.inset){let t=Math.max(0,r.spread.number)+3*r.blur.number;i=op(i,np(e.bounds.add(r.offsetX.number,r.offsetY.number,0,0),t))}for(let r of e.textNodes)for(let s of r.textBounds){let r=np(s.bounds,2*Pi(t.fontSize,e.bounds.height)+t.webkitTextStrokeWidth);i=op(i,r);for(let e of t.textShadow)i=op(i,np(r.add(e.offsetX.number,e.offsetY.number,0,0),3*e.blur.number))}for(let t of e.elements)t.styles.isVisible()&&(i=op(i,lt(t)));let r=rt(t.filter);return np(i,r?st(r):0)}function dt(e,t,i,r){let s=np(t,i),n=Math.floor(Math.max(e.left,s.left)*r)/r,o=Math.floor(Math.max(e.top,s.top)*r)/r,a=Math.ceil(Math.min(e.left+e.width,s.left+s.width)*r)/r,l=Math.ceil(Math.min(e.top+e.height,s.top+s.height)*r)/r;return new ut(n,o,Math.max(0,a-n),Math.max(0,l-o))}r(et,{Html2CanvasConfig:()=>ct,PerformanceMonitor:()=>ht,Validator:()=>pt,createDefaultValidator:()=>tt,default:()=>Eh,html2canvas:()=>Eh});var ct,pt,ht,ut,ft,gt,mt,bt,yt,xt,vt,wt,kt,Ct,St,Et,Mt,At,Tt,Bt,Rt,Lt,Pt,It,Nt,Dt,Ot,Ft,$t,zt,_t,Wt,Ht,Vt,jt,Ut,Yt,qt,Gt,Kt,Xt,Jt,Qt,Zt,ei,ti,ii,ri,si,ni,oi,ai,li,di,ci,pi,hi,ui,fi,gi,mi,bi,yi,xi,vi,wi,ki,Ci,Si,Ei,Mi,Ai,Ti,Bi,Ri,Li,Pi,Ii,Ni,Di,Oi,Fi,$i,zi,_i,Wi,Hi,Vi,ji,Ui,Yi,qi,Gi,Ki,Xi,Ji,Qi,Zi,er,tr,ir,rr,sr,nr,or,ar,lr,dr,cr,pr,hr,ur,fr,gr,mr,br,yr,xr,vr,wr,kr,Cr,Sr,Er,Mr,Ar,Tr,Br,Rr,Lr,Pr,Ir,Nr,Dr,Or,Fr,$r,zr,_r,Wr,Hr,Vr,jr,Ur,Yr,qr,Gr,Kr,Xr,Jr,Qr,Zr,es,ts,is,rs,ss,ns,os,as,ls,ds,cs,ps,hs,us,fs,gs,ms,bs,ys,xs,vs,ws,ks,Cs,Ss,Es,Ms,As,Ts,Bs,Rs,Ls,Ps,Is,Ns,Ds,Os,Fs,$s,zs,_s,Ws,Hs,Vs,js,Us,Ys,qs,Gs,Ks,Xs,Js,Qs,Zs,en,tn,rn,sn,nn,on,an,ln,dn,cn,pn,hn,un,fn,gn,mn,bn,yn,xn,vn,wn,kn,Cn,Sn,En,Mn,An,Tn,Bn,Rn,Ln,Pn,In,Nn,Dn,On,Fn,$n,zn,_n,Wn,Hn,Vn,jn,Un,Yn,qn,Gn,Kn,Xn,Jn,Qn,Zn,eo,to,io,ro,so,no,oo,ao,lo,co,po,ho,uo,fo,go,mo,bo,yo,xo,vo,wo,ko,Co,So,Eo,Mo,Ao,To,Bo,Ro,Lo,Po,Io,No,Do,Oo,Fo,$o,zo,_o,Wo,Ho,Vo,jo,Uo,Yo,qo,Go,Ko,Xo,Jo,Qo,Zo,ea,ta,ia,ra,sa,na,oa,aa,la,da,ca,pa,ha,ua,fa,ga,ma,ba,ya,xa,va,wa,ka,Ca,Sa,Ea,Ma,Aa,Ta,Ba,Ra,La,Pa,Ia,Na,Da,Oa,Fa,$a,za,_a,Wa,Ha,Va,ja,Ua,Ya,qa,Ga,Ka,Xa,Ja,Qa,Za,el,tl,il,rl,sl,nl,ol,al,ll,dl,cl,pl,hl,ul,fl,gl,ml,bl,yl,xl,vl,wl,kl,Cl,Sl,El,Ml,Al,Tl,Bl,Rl,Ll,Pl,Il,Nl,Dl,Ol,Fl,$l,zl,_l,Wl,Hl,Vl,jl,Ul,Yl,ql,Gl,Kl,Xl,Jl,Ql,Zl,ed,td,id,rd,sd,nd,od,ad,ld,dd,cd,pd,hd,ud,fd,gd,md,bd,yd,xd,vd,wd,kd,Cd,Sd,Ed,Md,Ad,Td,Bd,Rd,Ld,Pd,Id,Nd,Dd,Od,Fd,$d,zd,_d,Wd,Hd,Vd,jd,Ud,Yd,qd,Gd,Kd,Xd,Jd,Qd,Zd,ec,tc,ic,rc,sc,nc,oc,ac,lc,dc,cc,pc,hc,uc,fc,gc,mc,bc,yc,xc,vc,wc,kc,Cc,Sc,Ec,Mc,Ac,Tc,Bc,Rc,Lc,Pc,Ic,Nc,Dc,Oc,Fc,$c,zc,_c,Wc,Hc,Vc,jc,Uc,Yc,qc,Gc,Kc,Xc,Jc,Qc,Zc,ep,tp,ip,rp,sp,np,op,ap,lp,dp,cp,pp,hp,up,fp,gp,mp,bp,yp,xp,vp,wp,kp,Cp,Sp,Ep,Mp,Ap,Tp,Bp,Rp,Lp,Pp,Ip,Np,Dp,Op,Fp,$p,zp,_p,Wp,Hp,Vp,jp,Up,Yp,qp,Gp,Kp,Xp,Jp,Qp,Zp,eh,th,ih,rh,sh,nh,oh,ah,lh,dh,ch,ph,hh,uh,fh,gh,mh,bh,yh,xh,vh,wh,kh,Ch,Sh,Eh,Mh,Ah=i(()=>{ct=class e{window;cspNonce;cache;constructor(e={}){let t=e.window||(typeof window<"u"?window:void 0);if(!t)throw new Error("Window object is required but not available");this.window=t,this.cspNonce=e.cspNonce,this.cache=e.cache}static fromElement(t,i={}){let r=t.ownerDocument;if(!r)throw new Error("Element is not attached to a document");let s=r.defaultView;if(!s)throw new Error("Document is not attached to a window");return new e({window:s,...i})}clone(t={}){return new e({window:t.window||this.window,cspNonce:t.cspNonce??this.cspNonce,cache:t.cache??this.cache})}},pt=class{config;constructor(e={}){this.config={maxImageTimeout:3e5,allowDataUrls:!0,...e}}validateUrl(e,t="general"){if(!e||"string"!=typeof e)return{valid:!1,error:"URL must be a non-empty string"};if(e.startsWith("data:"))return this.config.allowDataUrls?{valid:!0,sanitized:e}:{valid:!1,error:"Data URLs are not allowed"};if(e.startsWith("blob:"))return{valid:!0,sanitized:e};try{let i=new URL(e);if(!["http:","https:"].includes(i.protocol))return{valid:!1,error:`Protocol ${i.protocol} is not allowed. Only http and https are permitted.`};if("proxy"===t&&this.config.allowedProxyDomains&&this.config.allowedProxyDomains.length>0){let e=i.hostname.toLowerCase();if(!this.config.allowedProxyDomains.some(t=>{let i=t.toLowerCase();return e===i||e.endsWith("."+i)}))return{valid:!1,error:`Proxy domain ${i.hostname} is not in the allowed list`}}if("proxy"===t){if(!this.config.allowLocalhostProxy){let e=i.hostname.toLowerCase();if("localhost"===e||"127.0.0.1"===e||"::1"===e)return{valid:!1,error:"Localhost is not allowed for proxy URLs"};if(this.isPrivateIP(e))return{valid:!1,error:"Private IP addresses are not allowed for proxy URLs"};if(e.startsWith("169.254.")||e.startsWith("fe80:"))return{valid:!1,error:"Link-local addresses are not allowed for proxy URLs"}}return{valid:!0,sanitized:e}}return{valid:!0,sanitized:e}}catch(e){return{valid:!1,error:`Invalid URL format: ${e instanceof Error?e.message:"Unknown error"}`}}}isPrivateIP(e){return!![/^0\./,/^10\./,/^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\./,/^127\./,/^169\.254\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.0\.0\./,/^192\.0\.2\./,/^192\.168\./,/^198\.(1[8-9])\./,/^198\.51\.100\./,/^203\.0\.113\./,/^2(2[4-9]|3[0-9])\./,/^24[0-9]\./,/^255\.255\.255\.255$/].some(t=>t.test(e))||!!e.includes(":")&&this.isPrivateIPv6(e)}isPrivateIPv6(e){let t=e.toLowerCase().trim().replace(/^\[|\]$/g,""),i=t.split("%")[0]??t;if(/^(0:){7}1$/.test(i)||"::1"===i||/^(0:){7}0$/.test(i)||"::"===i)return!0;let r=this.expandIPv6(i);if(!r)return this.isPrivateIPv6Prefix(i);let s=parseInt(r.substring(0,2),16);if(s>=252&&s<=253)return!0;if(254===s){let e=parseInt(r.substring(2,4),16);if(e>=128&&e<=191)return!0}return 255===s}expandIPv6(e){try{if(e.includes("::")){let t=e.split("::");if(t.length>2)return null;let i=t[0]?t[0].split(":"):[],r=t[1]?t[1].split(":"):[],s=8-i.length-r.length;if(s<0)return null;let n=Array(s).fill("0000");return[...i,...n,...r].map(e=>e.padStart(4,"0")).join(":")}{let t=e.split(":");return 8!==t.length?null:t.map(e=>e.padStart(4,"0")).join(":")}}catch{return null}}isPrivateIPv6Prefix(e){return!!(/^fc[0-9a-f]{0,2}:?/i.test(e)||/^fd[0-9a-f]{0,2}:?/i.test(e)||/^fe[89ab][0-9a-f]:?/i.test(e)||/^ff[0-9a-f]{0,2}:?/i.test(e))}validateCspNonce(e){return e&&"string"==typeof e?e.length<16?{valid:!1,error:"CSP nonce is too short (minimum 16 characters recommended)"}:/^[A-Za-z0-9+/=_-]+$/.test(e)?{valid:!0,sanitized:e}:{valid:!1,error:"CSP nonce contains invalid characters"}:{valid:!1,error:"CSP nonce must be a non-empty string"}}validateImageTimeout(e){return"number"!=typeof e||isNaN(e)?{valid:!1,error:"Image timeout must be a number"}:e<0?{valid:!1,error:"Image timeout cannot be negative"}:this.config.maxImageTimeout&&e>this.config.maxImageTimeout?{valid:!1,error:`Image timeout ${e}ms exceeds maximum allowed ${this.config.maxImageTimeout}ms`}:{valid:!0,sanitized:e}}validateDimensions(e,t){if("number"!=typeof e||"number"!=typeof t)return{valid:!1,error:"Dimensions must be numbers"};if(isNaN(e)||isNaN(t))return{valid:!1,error:"Dimensions cannot be NaN"};if(e<=0||t<=0)return{valid:!1,error:"Dimensions must be positive"};let i=32767;return e>i||t>i?{valid:!1,error:`Dimensions exceed maximum allowed (${i}px)`}:{valid:!0,sanitized:{width:e,height:t}}}validateScale(e){return"number"!=typeof e||isNaN(e)?{valid:!1,error:"Scale must be a number"}:e<=0?{valid:!1,error:"Scale must be positive"}:e>10?{valid:!1,error:"Scale factor too large (maximum 10x)"}:{valid:!0,sanitized:e}}validateElement(e){if(!e)return{valid:!1,error:"Element is required"};if("object"!=typeof e)return{valid:!1,error:"Element must be an object"};let t=e;return typeof HTMLElement<"u"&&e instanceof HTMLElement?e.ownerDocument?{valid:!0}:{valid:!1,error:"Element must be attached to a document"}:t.ownerDocument?t.ownerDocument.defaultView?{valid:!0}:{valid:!1,error:"Document must be attached to a window (ownerDocument.defaultView required)"}:{valid:!1,error:"Element must be attached to a document (ownerDocument required)"}}validateOptions(e){let t=[],i=e.proxy;if(null!=i&&"string"==typeof i&&i.length>0){let e=this.validateUrl(i,"proxy");e.valid||t.push(`Proxy: ${e.error}`)}if(void 0!==e.imageTimeout){let i=this.validateImageTimeout(e.imageTimeout);i.valid||t.push(`Image timeout: ${i.error}`)}if(void 0!==e.width||void 0!==e.height){let i=e.width??800,r=e.height??600,s=this.validateDimensions(i,r);s.valid||t.push(`Dimensions: ${s.error}`)}if(void 0!==e.scale){let i=this.validateScale(e.scale);i.valid||t.push(`Scale: ${i.error}`)}if(void 0!==e.cspNonce){let i=this.validateCspNonce(e.cspNonce);i.valid||t.push(`CSP nonce: ${i.error}`)}if(this.config.customValidator){let i=this.config.customValidator(e,"options");i.valid||t.push(`Custom validation: ${i.error}`)}return t.length>0?{valid:!1,error:t.join("; ")}:{valid:!0}}},ht=class{context;activeMetrics=new Map;completedMetrics=[];enabled;getTime;constructor(e,t=!0){this.context=e,this.enabled=t,this.getTime=typeof performance<"u"&&"function"==typeof performance.now?()=>performance.now():()=>Date.now()}start(e,t){this.enabled&&(this.activeMetrics.has(e)&&this.context?.logger.warn(`Performance metric '${e}' already started. Overwriting.`),this.activeMetrics.set(e,{name:e,startTime:this.getTime(),metadata:t}))}end(e){if(!this.enabled)return;let t=this.activeMetrics.get(e);if(t)return t.endTime=this.getTime(),t.duration=t.endTime-t.startTime,this.completedMetrics.push(t),this.activeMetrics.delete(e),this.context?.logger.debug(`\u23f1\ufe0f ${e}: ${t.duration.toFixed(2)}ms`,t.metadata),t;this.context?.logger.warn(`Performance metric '${e}' not found. Was start() called?`)}measure(e,t,i){this.start(e,i);try{let i=t();return this.end(e),i}catch(t){throw this.end(e),t}}async measureAsync(e,t,i){this.start(e,i);try{let i=await t();return this.end(e),i}catch(t){throw this.end(e),t}}getMetrics(){return[...this.completedMetrics]}getMetric(e){return this.completedMetrics.find(t=>t.name===e)}getSummary(){let e=this.completedMetrics.reduce((e,t)=>e+(t.duration||0),0),t=this.completedMetrics.map(t=>({name:t.name,duration:t.duration||0,percentage:e>0?((t.duration||0)/e*100).toFixed(1)+"%":"0%"}));return{totalDuration:e,metrics:this.getMetrics(),breakdown:t}}logSummary(){if(!this.enabled||0===this.completedMetrics.length||!this.context)return;let e=this.getSummary();this.context.logger.info(`\n\ud83d\udcca Performance Summary (Total: ${e.totalDuration.toFixed(2)}ms):`),e.breakdown.sort((e,t)=>t.duration-e.duration).forEach(e=>{this.context.logger.info(` ${e.name.padEnd(20)} ${e.duration.toFixed(2).padStart(8)}ms ${e.percentage.padStart(6)}`)})}clear(){this.activeMetrics.clear(),this.completedMetrics.splice(0)}isEnabled(){return this.enabled}getActiveMetrics(){return Array.from(this.activeMetrics.keys())}},ut=class e{left;top;width;height;constructor(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}add(t,i,r,s){return new e(this.left+t,this.top+i,this.width+r,this.height+s)}static fromClientRect(t,i){return new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height)}static fromDOMRectList(t,i){let r=Array.from(i),s=r.find(e=>0!==e.width);return s||(s=r.find(e=>0!==e.height)),!s&&r.length>0&&(s=r[0]),s?new e(s.left+t.windowBounds.left,s.top+t.windowBounds.top,s.width,s.height):e.EMPTY}static EMPTY=new e(0,0,0,0)},ft=(e,t)=>ut.fromClientRect(e,t.getBoundingClientRect()),gt=e=>{let t=e.body,i=e.documentElement;if(!t||!i)throw new Error("Unable to get document size");return new ut(0,0,Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight)))},mt=(e,t)=>{let i=e[t];if(void 0===i)throw new Error(`Missing element at index ${t}`);return i},bt=e=>e>=48&&e<=57,yt=e=>e>=55296&&e<=57343,xt=e=>bt(e)||e>=65&&e<=70||e>=97&&e<=102,vt=e=>e>=97&&e<=122,wt=e=>e>=65&&e<=90,kt=e=>vt(e)||wt(e),Ct=e=>e>=128,St=e=>10===e||9===e||32===e,Et=e=>kt(e)||Ct(e)||95===e,Mt=e=>Et(e)||bt(e)||45===e,At=e=>e>=0&&e<=8||11===e||e>=14&&e<=31||127===e,Tt=(e,t)=>92===e&&10!==t,Bt=(e,t,i)=>45===e?Et(t)||Tt(t,i):!!Et(e)||!(92!==e||!Tt(e,t)),Rt=(e,t,i)=>43===e||45===e?!!bt(t)||46===t&&bt(i):bt(46===e?t:e),Lt=e=>{let t=0,i=1;(43===e[t]||45===e[t])&&(45===e[t]&&(i=-1),t++);let r=[];for(;bt(e[t]??NaN);)r.push(mt(e,t)),t++;let s=r.length?parseInt(String.fromCodePoint(...r),10):0;46===e[t]&&t++;let n=[];for(;bt(e[t]??NaN);)n.push(mt(e,t)),t++;let o=n.length,a=o?parseInt(String.fromCodePoint(...n),10):0;(69===e[t]||101===e[t])&&t++;let l=1;(43===e[t]||45===e[t])&&(45===e[t]&&(l=-1),t++);let d=[];for(;bt(e[t]??NaN);)d.push(mt(e,t)),t++;let c=d.length?parseInt(String.fromCodePoint(...d),10):0;return i*(s+a*Math.pow(10,-o))*Math.pow(10,l*c)},Pt={type:2},It={type:3},Nt={type:4},Dt={type:13},Ot={type:8},Ft={type:21},$t={type:9},zt={type:10},_t={type:11},Wt={type:12},Ht={type:14},Vt={type:23},jt={type:1},Ut={type:25},Yt={type:24},qt={type:26},Gt={type:27},Kt={type:28},Xt={type:29},Jt={type:31},Qt={type:32},Zt=class e{static _pool=[];static MAX_POOL_SIZE=40;static get(){return e._pool.pop()||new e}static release(t){e._pool.length<e.MAX_POOL_SIZE&&(t._reset(),e._pool.push(t))}_value;_cursor;constructor(){this._value=[],this._cursor=0}_reset(){this._value=[],this._cursor=0}write(e){this._cursor>0&&(this._value=this._value.slice(this._cursor),this._cursor=0),this._value=this._value.concat([...e].map(e=>e.codePointAt(0)))}read(){let e=[],t=this.consumeToken();for(;t!==Qt;)e.push(t),t=this.consumeToken();return e}consumeToken(){let e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Mt(e)||Tt(t,i)){let r=Bt(e,t,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break}case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Dt;break;case 39:return this.consumeStringToken(39);case 40:return Pt;case 41:return It;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ht;break;case 43:if(Rt(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Nt;case 45:{let t=e,i=this.peekCodePoint(0),r=this.peekCodePoint(1);if(Rt(t,i,r))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Bt(t,i,r))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===i&&62===r)return this.consumeCodePoint(),this.consumeCodePoint(),Yt;break}case 46:if(Rt(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){let e=this.consumeCodePoint();if(42===e&&(e=this.consumeCodePoint(),47===e))return this.consumeToken();if(-1===e)return this.consumeToken()}break;case 58:return qt;case 59:return Gt;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),this.consumeCodePoint(),Ut;break;case 64:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Bt(e,t,i))return{type:7,value:this.consumeName()};break}case 91:return Kt;case 92:if(Tt(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Xt;case 94:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ot;break;case 123:return _t;case 125:return Wt;case 117:case 85:{let t=this.peekCodePoint(0),i=this.peekCodePoint(1);return 43!==t||!xt(i)&&63!==i?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):(this.consumeCodePoint(),this.consumeUnicodeRangeToken())}case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),$t;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Ft;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),zt;break;case-1:return Qt}return St(e)?(this.consumeWhiteSpace(),Jt):bt(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Et(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:String.fromCodePoint(e)}}consumeCodePoint(){let e=this._value[this._cursor];return void 0===e?-1:(this._cursor++,e)}reconsumeCodePoint(e){this._cursor>0&&this._value[this._cursor-1]===e?this._cursor--:this._value.splice(this._cursor,0,e)}peekCodePoint(e){let t=this._value[this._cursor+e];return void 0!==t?t:-1}consumeUnicodeRangeToken(){let e=[],t=this.consumeCodePoint();for(;xt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();let i=!1;for(;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(String.fromCodePoint(...e.map(e=>63===e?48:e)),16),end:parseInt(String.fromCodePoint(...e.map(e=>63===e?70:e)),16)};let r=parseInt(String.fromCodePoint(...e),16);if(45===t&&xt(this.peekCodePoint(0))){t=this.consumeCodePoint();let e=[];for(;xt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(String.fromCodePoint(...e),16)}}return{type:30,start:r,end:r}}consumeIdentLikeToken(){let e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}}consumeUrlToken(){let e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};let t=this.peekCodePoint(0);if(39===t||34===t){let e=this.consumeStringToken(this.consumeCodePoint());return 0===e.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Vt)}for(;;){let t=this.consumeCodePoint();if(-1===t||41===t)return{type:22,value:String.fromCodePoint(...e)};if(St(t))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:String.fromCodePoint(...e)}):(this.consumeBadUrlRemnants(),Vt);if(34===t||39===t||40===t||At(t))return this.consumeBadUrlRemnants(),Vt;if(92===t){if(!Tt(t,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Vt;e.push(this.consumeEscapedCodePoint())}else e.push(t)}}consumeWhiteSpace(){for(;St(this.peekCodePoint(0));)this.consumeCodePoint()}consumeBadUrlRemnants(){for(;;){let e=this.consumeCodePoint();if(41===e||-1===e)return;Tt(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}}consumeStringSlice(e){let t="",i=this._cursor+e,r=this._cursor;for(;r<i;){let e=Math.min(i,r+5e4);t+=String.fromCodePoint(...this._value.slice(r,e)),r=e}return this._cursor=i+1,t}consumeStringToken(e){let t="",i=0;for(;;){let r=this._value[this._cursor+i];if(-1===r||void 0===r||r===e)return t+=this.consumeStringSlice(i),{type:0,value:t};if(10===r)return this._cursor+=i,jt;if(92===r){let e=this._value[this._cursor+i+1];-1!==e&&void 0!==e&&(10===e?(t+=this.consumeStringSlice(i),i=-1,this._cursor++):Tt(r,e)&&(t+=this.consumeStringSlice(i),t+=String.fromCodePoint(this.consumeEscapedCodePoint()),i=-1))}i++}}consumeNumber(){let e=[],t=4,i=this.peekCodePoint(0);for((43===i||45===i)&&e.push(this.consumeCodePoint());bt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);let r=this.peekCodePoint(1);if(46===i&&bt(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;bt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);let s=this.peekCodePoint(2);if((69===i||101===i)&&((43===r||45===r)&&bt(s)||bt(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;bt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Lt(e),t]}consumeNumericToken(){let[e,t]=this.consumeNumber(),i=this.peekCodePoint(0),r=this.peekCodePoint(1),s=this.peekCodePoint(2);return Bt(i,r,s)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}}consumeEscapedCodePoint(){let e=this.consumeCodePoint();if(xt(e)){let t=String.fromCodePoint(e);for(;xt(this.peekCodePoint(0))&&t.length<6;)t+=String.fromCodePoint(this.consumeCodePoint());St(this.peekCodePoint(0))&&this.consumeCodePoint();let i=parseInt(t,16);return 0===i||yt(i)||i>1114111?65533:i}return-1===e?65533:e}consumeName(){let e="";for(;;){let t=this.consumeCodePoint();if(Mt(t))e+=String.fromCodePoint(t);else{if(!Tt(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=String.fromCodePoint(this.consumeEscapedCodePoint())}}}},ei=class e{_tokens;constructor(e){this._tokens=e}static create(t){let i=new Zt;return i.write(t),new e(i.read())}static parseValue(t){return e.create(t).parseComponentValue()}static parseValues(t){return e.create(t).parseComponentValues()}parseComponentValue(){let e=this.consumeToken();for(;31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);let t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")}parseComponentValues(){let e=[];for(;;){let t=this.consumeComponentValue();if(32===t.type)return e;e.push(t)}}consumeComponentValue(){let e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e}consumeSimpleBlock(e){let t={type:e,values:[]},i=this.consumeToken();for(;;){if(32===i.type||di(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}}consumeFunction(e){let t={name:e.value,values:[],type:18};for(;;){let e=this.consumeToken();if(32===e.type||3===e.type)return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue())}}consumeToken(){let e=this._tokens.shift();return typeof e>"u"?Qt:e}reconsumeToken(e){this._tokens.unshift(e)}},ti=e=>15===e.type,ii=e=>17===e.type,ri=e=>20===e.type,si=e=>0===e.type,ni=(e,t)=>ri(e)&&e.value===t,oi=e=>31!==e.type,ai=e=>31!==e.type&&4!==e.type,li=e=>{let t=[],i=[];return e.forEach(e=>{4!==e.type?31!==e.type&&i.push(e):i.length&&(t.push(i),i=[])}),i.length&&t.push(i),t},di=(e,t)=>11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type,ci=/(\d+(?:\.\d+)?|[+\-*/()])/g,pi=e=>{let t=e.match(ci);if(!t)return NaN;let i=[],r=[],s={"+":1,"-":1,"*":2,"/":2};for(let e of t)if(/^\d+(?:\.\d+)?$/.test(e))i.push(parseFloat(e));else if("("===e)r.push(e);else if(")"===e){for(;r.length&&"("!==r[r.length-1];)i.push(r.pop());if(!r.length)return NaN;r.pop()}else{for(;r.length&&(s[mt(r,r.length-1)]??0)>=(s[e]??0);)i.push(r.pop());r.push(e)}for(;r.length;){let e=r.pop();if("("===e)return NaN;i.push(e)}let n=[];for(let e of i)if("number"==typeof e)n.push(e);else{let t=n.pop(),i=n.pop();if(void 0===i||void 0===t)return NaN;switch(e){case"+":n.push(i+t);break;case"-":n.push(i-t);break;case"*":n.push(i*t);break;case"/":n.push(0===t?NaN:i/t);break;default:return NaN}}return 1===n.length?n[0]??NaN:NaN},hi=(e,t,i)=>Math.min(Math.max(e,t),i),ui=(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]],fi=e=>ui([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],e),gi=e=>ui([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],e),mi=e=>{let[t,i,r]=e,s=e=>{let t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e};return[s(t),s(i),s(r)]},bi=e=>{let[t,i,r]=e,s=e=>{let t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4};return[s(t),s(i),s(r)]},yi=e=>{let[t,i,r]=mi(fi([e[0],e[1],e[2]]));return[t,i,r,e[3]]},xi=e=>{let[t,i,r]=fi([e[0],e[1],e[2]]);return[hi(Math.round(255*t),0,255),hi(Math.round(255*i),0,255),hi(Math.round(255*r),0,255),e[3]]},vi=e=>17===e.type||15===e.type,wi=e=>16===e.type||vi(e)||ki(e),ki=e=>17===e.type&&void 0!==e._calcPercentage,Ci=e=>18===e.type&&"calc"===e.name,Si=e=>{let t=Mi(e,0);if(!t)return null;let i=Mi(e,100);if(!i)return null;let r=t.number,s=i.number-r;return 0===s?t:{type:17,number:r,flags:4,_calcPercentage:s,_calcPixelOffset:r}},Ei=e=>Ci(e)?Si(e):wi(e)?e:null,Mi=(e,t=0)=>{let i=e=>{let r="";for(let s of e)if(31!==s.type)if(18===s.type){if("calc"!==s.name)return null;{let e=i(s.values);if(null===e)return null;r+=`(${e})`}}else if(17===s.type)r+=s.number.toString();else if(15===s.type)"px"===s.unit?r+=s.number.toString():"rem"===s.unit||"em"===s.unit?r+=(16*s.number).toString():r+=s.number.toString();else if(16===s.type)r+=(s.number/100*t).toString();else if(6===s.type){let e=s.value;"+"===e||"-"===e||"*"===e||"/"===e?r+=` ${e} `:"("===e?r+="(":")"===e&&(r+=")")}return r};try{let t=i(e.values);if(null===t||""===t.trim())return null;let r=pi(t);if("number"==typeof r&&!isNaN(r))return{type:17,number:r,flags:4}}catch{return null}return null},Ai=e=>e.length>1?[mt(e,0),mt(e,1)]:[mt(e,0)],Ti={type:17,number:0,flags:4},Bi={type:16,number:50,flags:4},Ri={type:16,number:100,flags:4},Li=(e,t,i)=>{let[r,s]=e;return[Pi(r,t),Pi(typeof s<"u"?s:r,i)]},Pi=(e,t)=>{if(ki(e))return e._calcPercentage/100*t+e._calcPixelOffset;if(16===e.type)return e.number/100*t;if(ti(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Ii="grad",Ni="turn",Di={name:"angle",parse:(e,t)=>{if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Ii:return Math.PI/200*t.number;case"rad":return t.number;case Ni:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},Oi=e=>15===e.type&&("deg"===e.unit||e.unit===Ii||"rad"===e.unit||e.unit===Ni),Fi=e=>{switch(e.filter(ri).map(e=>e.value).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ti,Ti];case"to top":case"bottom":return $i(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ti,Ri];case"to right":case"left":return $i(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ri,Ri];case"to bottom":case"top":return $i(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ri,Ti];case"to left":case"right":return $i(270)}return 0},$i=e=>Math.PI*e/180,zi=e=>!(255&e),_i=e=>{let t=255&e,i=255&e>>8,r=255&e>>16,s=255&e>>24;return t<255?`rgba(${s},${r},${i},${t/255})`:`rgb(${s},${r},${i})`},Wi=(e,t,i,r)=>(e<<24|t<<16|i<<8|Math.round(255*r))>>>0,Hi=(e,t)=>{if(17===e.type)return e.number;if(16===e.type){let i=3===t?1:255;return 3===t?e.number/100*i:Math.round(e.number/100*i)}return 0},Vi=e=>{let t=e[0];return"from"===(t&&20===t.type?t.value:"unknown")},ji=e=>Wi(hi(Math.round(255*e[0]),0,255),hi(Math.round(255*e[1]),0,255),hi(Math.round(255*e[2]),0,255),hi(e[3],0,1)),Ui=e=>{let[t,i,r,s]=e,n=mi([t,i,r]);return Wi(hi(Math.round(255*n[0]),0,255),hi(Math.round(255*n[1]),0,255),hi(Math.round(255*n[2]),0,255),s)},Yi=e=>{let t=fi([e[0],e[1],e[2]]);return Ui([t[0],t[1],t[2],e[3]])},qi=(e,t)=>{if(Vi(t.filter(ai)))throw new Error("Relative color not supported for lab()");let[i,r,s,n]=tr(t),o=Gi(t)?100*i:i,a=mi(fi(dr([o,r,s])));return Wi(hi(Math.round(255*a[0]),0,255),hi(Math.round(255*a[1]),0,255),hi(Math.round(255*a[2]),0,255),n)},Gi=e=>{let t=e.filter(ai)[0];return void 0!==t&&16===t.type},Ki=(e,t)=>{if(Vi(t.filter(ai)))throw new Error("Relative color not supported for oklab()");let[i,r,s,n]=tr(t),o=mi(fi(lr([i,r,s])));return Wi(hi(Math.round(255*o[0]),0,255),hi(Math.round(255*o[1]),0,255),hi(Math.round(255*o[2]),0,255),n)},Xi=(e,t)=>{if(Vi(t.filter(ai)))throw new Error("Relative color not supported for oklch()");let[i,r,s,n]=ir(t),o=mi(fi(lr(ar([i,r,s]))));return Wi(hi(Math.round(255*o[0]),0,255),hi(Math.round(255*o[1]),0,255),hi(Math.round(255*o[2]),0,255),n)},Ji=(e,t)=>{if(Vi(t.filter(ai)))throw new Error("Relative color not supported for lch()");let[i,r,s,n]=er(t),o=mi(fi(dr(ar([i,r,s]))));return Wi(hi(Math.round(255*o[0]),0,255),hi(Math.round(255*o[1]),0,255),hi(Math.round(255*o[2]),0,255),n)},Qi=(e,t)=>{let i=t.filter(ai),r=i[0],s=i[1],n=i[2],o=i[3],a=void 0!==o&&6===o.type&&"/"===o.value?i[4]:i[3];return[r?(17===r.type?$i(r.number):Di.parse(e,r))/(2*Math.PI):0,void 0!==s&&wi(s)?s.number/100:0,void 0!==n&&wi(n)?n.number/100:0,void 0!==a&&wi(a)?Pi(a,1):1]},Zi=(e,t)=>{if(Vi(t))throw new Error("Relative color not supported for hsl()");let[i,r,s,n]=Qi(e,t),o=or([i,r,s]);return Wi(255*o[0],255*o[1],255*o[2],n)},er=e=>{let t=e.filter(ai),i=t[0],r=t[1],s=t[2],n=t[4];return[void 0!==i&&wi(i)?i.number:0,void 0!==r&&wi(r)?r.number:0,void 0!==s&&(ii(s)||ti(s))?s.number:0,void 0!==n&&wi(n)?Pi(n,1):1]},tr=e=>{let t=e.filter(ai),i=t[0],r=t[1],s=t[2],n=t[4];return[void 0!==i?16===i.type?i.number/100:ii(i)?i.number:0:0,void 0!==r?16===r.type?r.number/100:ii(r)?r.number:0:0,void 0!==s&&(ii(s)||ti(s))?s.number:0,void 0!==n&&wi(n)?Pi(n,1):1]},ir=e=>{let t=e.filter(ai),i=t[0],r=t[1],s=t[2],n=t[4];return[void 0!==i?16===i.type?i.number/100:ii(i)?i.number:0:0,void 0!==r?16===r.type?r.number/100:ii(r)?r.number:0:0,void 0!==s&&(ii(s)||ti(s))?s.number:0,void 0!==n&&wi(n)?Pi(n,1):1]},rr=e=>ui([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],e),sr=e=>ui([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],e),nr=(e,t,i)=>(i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(t-e)*i*6+e:i<.5?t:i<2/3?6*(t-e)*(2/3-i)+e:e),or=([e,t,i])=>{if(0===t)return[i,i,i];let r=i<=.5?i*(t+1):i+t-i*t,s=2*i-r;return[nr(s,r,e+1/3),nr(s,r,e),nr(s,r,e-1/3)]},ar=([e,t,i])=>(t<0&&(t=0),isNaN(i)&&(i=0),[e,t*Math.cos(i*Math.PI/180),t*Math.sin(i*Math.PI/180)]),lr=e=>{let t=ui([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],e),i=[t[0]**3,t[1]**3,t[2]**3];return ui([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],i)},dr=e=>{let t=(e[0]+16)/116,i=e[1]/500+t,r=t-e[2]/200,s=24389/27,n=24/116,o=[.3457*(i>n?i**3:(116*i-16)/s)/.3585,e[0]>8?t**3:e[0]/s,.2958*(r>n?r**3:(116*r-16)/s)/.3585];return sr([o[0],o[1],o[2]])},cr=(e,t)=>{let i=t.filter(ai);if(3===i.length||4===i.length){let e=Hi(mt(i,0),0),t=Hi(mt(i,1),1),r=Hi(mt(i,2),2),s=4===i.length?Hi(mt(i,3),3):1,n=bi([e/255,t/255,r/255]),[o,a,l]=gi([n[0],n[1],n[2]]);return[o,a,l,s]}return[0,0,0,1]},pr=(e,t)=>{let[i,r,s,n]=Qi(e,t),o=bi(or([i,r,s])),[a,l,d]=gi([o[0],o[1],o[2]]);return[a,l,d,n]},hr=(e,t)=>{let[i,r,s,n]=tr(t),[o,a,l]=dr([i,r,s]);return[o,a,l,n]},ur=(e,t)=>{let[i,r,s,n]=er(t),[o,a,l]=dr(ar([i,r,s]));return[o,a,l,n]},fr=(e,t)=>{let[i,r,s,n]=ir(t),[o,a,l]=lr(ar([i,r,s]));return[o,a,l,n]},gr=(e,t)=>{let[i,r,s,n]=tr(t),[o,a,l]=lr([i,r,s]);return[o,a,l,n]},mr=e=>sr([e[0],e[1],e[2]]),br=e=>e,yr=e=>{let[t,i,r]=rr([e[0],e[2],e[3]]);return[t,i,r,e[3]]},xr=e=>Yi([e[0],e[1],e[2],e[3]]),vr=e=>{let t=mr([e[0],e[1],e[2]]);return Yi([t[0],t[1],t[2],e[3]])},wr=e=>ui([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],e),kr=e=>ui([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],e),Cr=e=>{let t=e=>{let t=e<0?-1:1;return e*t<=.04045?e/12.92:t*((e+.055)/1.055)**2.4||0};return[t(e[0]),t(e[1]),t(e[2])]},Sr=e=>mi(e),Er=e=>{let t=Cr([e[0],e[1],e[2]]);return wr([t[0],t[1],t[2]])},Mr=e=>{let[t,i,r]=Sr(kr([e[0],e[1],e[2]]));return[t,i,r,e[3]]},Ar=e=>{let t=Er([e[0],e[1],e[2]]);return Yi([t[0],t[1],t[2],e[3]])},Tr=e=>ui([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],e),Br=e=>ui([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],e),Rr=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**2.19921875);return[t[0]??0,t[1]??0,t[2]??0]},Lr=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**.4547069271758437);return[t[0]??0,t[1]??0,t[2]??0]},Pr=e=>{let[t,i,r]=Lr(Tr([e[0],e[1],e[2]]));return[t,i,r,e[3]]},Ir=e=>{let t=fi(Br(Rr([e[0],e[1],e[2]])));return Ui([t[0],t[1],t[2],e[3]])},Nr=e=>ui([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],e),Dr=e=>ui([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],e),Or=e=>{let[t,i,r]=e,s=e=>e<16/512?e/16:e**1.8;return[s(t),s(i),s(r)]},Fr=e=>{let[t,i,r]=e,s=e=>e>1/512?e**(1/1.8):16*e;return[s(t),s(i),s(r)]},$r=e=>{let t=Or([e[0],e[1],e[2]]);return sr(Nr([t[0],t[1],t[2]]))},zr=e=>{let[t,i,r]=Fr(Dr(rr([e[0],e[1],e[2]])));return[t,i,r,e[3]]},_r=e=>{let t=$r([e[0],e[1],e[2]]);return Yi([t[0],t[1],t[2],e[3]])},Wr=1.09929682680944,Hr=.018053968510807,Vr=e=>{let t=e=>e<4.5*Hr?e/4.5:Math.pow((e+Wr-1)/Wr,2.2222222222222223);return[t(e[0]),t(e[1]),t(e[2])]},jr=e=>{let t=e=>e>=Hr?Wr*Math.pow(e,.45)-.09929682680944008:4.5*e;return[t(e[0]),t(e[1]),t(e[2])]},Ur=e=>ui([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],e),Yr=e=>ui([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],e),qr=e=>{let t=Vr([e[0],e[1],e[2]]);return Ur([t[0],t[1],t[2]])},Gr=e=>{let[t,i,r]=jr(Yr([e[0],e[1],e[2]]));return[t,i,r,e[3]]},Kr=e=>{let t=qr([e[0],e[1],e[2]]);return Yi([t[0],t[1],t[2],e[3]])},Xr={lch:2,oklch:2,hsl:0},Jr=[1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],Zr=(Qr=e=>{let t=e[0],i=e[1],r=e[2],s=e[3],n=e[4],o=e[5],a=e[6],l=e[7],d=e[8],c=t*(n*d-o*l)-i*(s*d-o*a)+r*(s*l-n*a);return[(n*d-o*l)/c,(r*l-i*d)/c,(i*o-r*n)/c,(o*a-s*d)/c,(t*d-r*a)/c,(r*s-t*o)/c,(s*l-n*a)/c,(i*a-t*l)/c,(t*n-i*s)/c]})([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816]),es=Qr(Jr),ts=24389/27,rs=(is=24/116)*is*is,ss=.3457/.3585,ns=.2958/.3585,os=e=>[(255&e>>24)/255,(255&e>>16)/255,(255&e>>8)/255],as=e=>{let[t,i,r]=rr([e[0],e[1],e[2]]),s=t/ss,n=i,o=r/ns,a=s>rs?Math.cbrt(s):(ts*s+16)/116,l=n>rs?Math.cbrt(n):(ts*n+16)/116;return[116*l-16,500*(a-l),200*(l-(o>rs?Math.cbrt(o):(ts*o+16)/116))]},ls=e=>{let t=ui(Zr,e),i=[Math.cbrt(t[0]),Math.cbrt(t[1]),Math.cbrt(t[2])];return ui(es,i)},ds=e=>{let t=Math.hypot(e[1],e[2]),i=180*Math.atan2(e[2],e[1])/Math.PI;return[e[0],t,(i+360)%360]},cs=e=>{let t=e[0],i=e[1],r=e[2],s=Math.max(t,i,r),n=Math.min(t,i,r),o=(s+n)/2;if(s===n)return[0,0,o];let a,l=s-n;return a=s===t?((i-r)/l+(i<r?6:0))/6:s===i?((r-t)/l+2)/6:((t-i)/l+4)/6,[a,o>.5?l/(2-s-n):l/(s+n),o]},ps=(e,t)=>{let i,r=(255&e)/255,s=os(e),n=bi(s),o=gi(n);switch(t){case"srgb":i=s;break;case"srgb-linear":i=n;break;case"xyz":case"xyz-d65":i=o;break;case"xyz-d50":i=rr(o);break;case"lab":i=as(o);break;case"oklab":i=ls(o);break;case"lch":i=ds(as(o));break;case"oklch":i=ds(ls(o));break;case"hsl":i=[360*cs(s)[0],cs(s)[1],cs(s)[2]]}return[i[0],i[1],i[2],r]},hs=(e,t)=>{let i=e[0],r=e[1],s=e[2],n=e[3];switch(t){case"srgb":return ji([i,r,s,n]);case"srgb-linear":return Ui([i,r,s,n]);case"xyz":case"xyz-d65":return Yi([i,r,s,n]);case"xyz-d50":return Yi([...sr([i,r,s]),n]);case"lab":return us(dr([i,r,s]),n);case"oklab":return us(lr([i,r,s]),n);case"lch":return us(dr(ar([i,r,s])),n);case"oklch":return us(lr(ar([i,r,s])),n);case"hsl":{let e=or([i/360,r,s]);return ji([e[0],e[1],e[2],n])}}},us=(e,t)=>{let i=mi(fi(e));return ji([i[0],i[1],i[2],t])},fs=(e,t,i,r,s="shorter")=>{let n=i+r;if(0===n)return e;let o=((t-e)%360+360)%360;switch(s){case"shorter":o>180&&(o-=360);break;case"longer":o<180&&(o-=360);break;case"increasing":break;case"decreasing":o>0&&(o-=360)}return e+o*(r/n)},gs=(e,t)=>{let i,r=null;for(let e of t)if(31!==e.type&&4!==e.type)if(16===e.type)r=e.number;else if(ri(e)&&"none"===e.value)null===r&&(r=0);else{if(void 0!==i)throw new Error("Unexpected token in color-mix() component");i=e}if(void 0===i)throw new Error("color-mix() component is missing a color");let s=i;return{color:xs.parse(e,s),percentage:r}},ms=["srgb","srgb-linear","lab","oklab","lch","oklch","hsl","xyz","xyz-d50","xyz-d65"],bs=(e,t,i,r,s,n)=>{let o=Xr[s],a=[e[0]*e[3],e[1]*e[3],e[2]*e[3],e[3]],l=[t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]],d=i*a[3]+r*l[3];if(d<=0)return[0,0,0,0];let c=[0,0,0,d];for(let e=0;e<3;e++)e!==o&&(c[e]=(i*mt(a,e)+r*mt(l,e))/d);if(void 0!==o){let s=mt(e,o),a=mt(t,o);0===e[1]&&(s=a),0===t[1]&&(a=s),c[o]=fs(s,a,i,r,n)}return c},ys=(e,t)=>{let i=[[]];for(let e of t)4===e.type?i.push([]):i[i.length-1].push(e);let r=i.map(e=>e.filter(e=>31!==e.type));if(3!==r.length)throw new Error("color-mix() requires exactly two color components");let s=r[0],n=s?s[0]:void 0,o=void 0!==n&&ri(n)&&"in"===n.value;if(!s||s.length<2||!o)throw new Error("color-mix() requires an interpolation space after `in`");let a=s[1];if(!a||!ri(a))throw new Error("color-mix() space must be an identifier");let l=a.value;if(-1===ms.indexOf(l))throw new Error(`Unsupported color-mix() interpolation space "${l}"`);let d="shorter",c=s.slice(2);if(c.length>0){let e=c[0],t=c[1];if(!(e&&t&&ri(e)&&ri(t)&&"hue"===t.value))throw new Error("Unsupported color-mix() hue method syntax");if(-1===["shorter","longer","increasing","decreasing"].indexOf(e.value))throw new Error(`Unsupported color-mix() hue method "${e.value}"`);d=e.value}let p=r[1],h=r[2];if(!p||!h)throw new Error("color-mix() requires exactly two color components");let u=gs(e,p),f=gs(e,h),g=u.percentage,m=f.percentage;if(null===g&&null===m)g=50,m=50;else if(null===g)g=100-(m??0);else if(null===m)m=100-g;else{let e=g+m;e>0&&(g=g/e*100,m=m/e*100)}let b=(g??0)/100,y=(m??0)/100,x=bs(ps(u.color,l),ps(f.color,l),b,y,l,d);return hs(x,l)},xs={name:"color",parse:(e,t)=>{if(18===t.type){let i=Ms[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported color function "${t.name}"`);return i(e,t.values)}if(5===t.type){let[e,i,r,s]=vs(t);return Wi(e,i,r,s)}if(20===t.type){let e=Ts[t.value.toUpperCase()];if(typeof e<"u")return e}return 0}},vs=e=>{if(3===e.value.length){let t=e.value.substring(0,1),i=e.value.substring(1,2),r=e.value.substring(2,3);return[parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16),1]}if(4===e.value.length){let t=e.value.substring(0,1),i=e.value.substring(1,2),r=e.value.substring(2,3),s=e.value.substring(3,4);return[parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16),parseInt(s+s,16)/255]}if(6===e.value.length){let t=e.value.substring(0,2),i=e.value.substring(2,4),r=e.value.substring(4,6);return[parseInt(t,16),parseInt(i,16),parseInt(r,16),1]}if(8===e.value.length){let t=e.value.substring(0,2),i=e.value.substring(2,4),r=e.value.substring(4,6),s=e.value.substring(6,8);return[parseInt(t,16),parseInt(i,16),parseInt(r,16),parseInt(s,16)/255]}return[0,0,0,1]},ks=(e,t)=>{let i=t.filter(ai),r=i[0],s=r&&20===r.type?r.value:"unknown";if(Vi(i)){let t=(e,t)=>{if(ii(t))return t.number;if(ri(t)){let i=(e=>"r"===e||"x"===e?0:"g"===e||"y"===e?1:2)(t.value);return mt(e,i)}let i=e=>{let t=e.filter(ai),r="(";for(let e of t)r+=18===e.type&&"calc"===e.name?i(e.values):ii(e)?e.number:6===e.type||ri(e)?e.value:"";return r+=")",r};if(18===t.type){let r=t.values.filter(ai);if("calc"===t.name){let t=i(r).replace(/r|x/,e[0].toString()).replace(/g|y/,e[1].toString()).replace(/b|z/,e[2].toString());return pi(t)}}return null},r=mt(i,1),s=18===r.type?r.name:ri(r)||5===r.type?"rgb":"unknown",n=mt(i,2),o=ri(n)?n.value:"unknown",a=18===r.type?r.values:ri(r)?[r]:[];if(ri(r)){if(typeof Ts[r.value.toUpperCase()]>"u")throw new Error("Attempting to use unknown color in relative color 'from'");{let t=As(e,r.value),i=255&t;a=[{type:17,number:255&t>>24,flags:1},{type:17,number:255&t>>16,flags:1},{type:17,number:255&t>>8,flags:1},{type:17,number:i>1?i/255:i,flags:1}]}}else if(5===r.type){let[e,t,i,s]=vs(r);a=[{type:17,number:e,flags:1},{type:17,number:t,flags:1},{type:17,number:i,flags:1},{type:17,number:s>1?s/255:s,flags:1}]}if(0===a.length)throw new Error("Attempting to use unknown color in relative color 'from'");if("unknown"===o)throw new Error("Attempting to use unknown colorspace in relative color 'to'");let l=Ss[s],d=Es[o],c=Cs[o];if(typeof l>"u")throw new Error(`Attempting to parse an unsupported color space "${s}" for color() function`);if(typeof d>"u")throw new Error(`Attempting to parse an unsupported color space "${o}" for color() function`);let p=d(l(e,a)),h=t(p,mt(i,3)),u=t(p,mt(i,4)),f=t(p,mt(i,5)),g=i[6],m=i[7],b=void 0!==g&&6===g.type&&"/"===g.value&&void 0!==m&&ii(m)?m.number:1;if(null===h||null===u||null===f)throw new Error("Invalid relative color in color() function");if(typeof c>"u")throw new Error(`Attempting to parse an unsupported color space "${o}" for color() function`);return c([h,u,f,b])}{let e=s,t=Cs[e];if(typeof t>"u")throw new Error(`Attempting to parse an unsupported color space "${e}" for color() function`);let r=mt(i,1),n=mt(i,2),o=mt(i,3),a=i[4],l=i[5];return t([ii(r)?r.number:0,ii(n)?n.number:0,ii(o)?o.number:0,void 0!==a&&6===a.type&&"/"===a.value&&void 0!==l&&ii(l)?l.number:1])}},Cs={srgb:ji,"srgb-linear":Ui,"display-p3":Ar,"a98-rgb":Ir,"prophoto-rgb":_r,xyz:xr,"xyz-d50":vr,"xyz-d65":xr,rec2020:Kr},Ss={rgb:cr,hsl:pr,lab:hr,lch:ur,oklab:gr,oklch:fr},Es={srgb:yi,"srgb-linear":xi,"display-p3":Mr,"a98-rgb":Pr,"prophoto-rgb":zr,xyz:br,"xyz-d50":yr,"xyz-d65":br,rec2020:Gr},Ms={hsl:Zi,hsla:Zi,rgb:ws=(e,t)=>{let i=t.filter(ai);if(Vi(i))throw new Error("Relative color not supported for rgb()");if(3===i.length||4===i.length){let e=Hi(mt(i,0),0),t=Hi(mt(i,1),1),r=Hi(mt(i,2),2),s=4===i.length?Hi(mt(i,3),3):1;return Wi(e,t,r,s)}if(5===i.length){let e=mt(i,3);if(6===e.type&&"/"===e.value){let e=Hi(mt(i,0),0),t=Hi(mt(i,1),1),r=Hi(mt(i,2),2),s=Hi(mt(i,4),3);return Wi(e,t,r,s)}}return 0},rgba:ws,lch:Ji,oklch:Xi,oklab:Ki,lab:qi,color:ks,"color-mix":(e,t)=>{try{return ys(e,t)}catch(t){return e.logger.warn(`Unsupported color-mix() value: ${t instanceof Error?t.message:t}`),0}}},As=(e,t)=>xs.parse(e,ei.create(t).parseComponentValue()),Ts={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Bs=e=>e.nodeType===Node.ELEMENT_NODE,Rs=e=>e.nodeType===Node.TEXT_NODE,Ls=e=>"object"==typeof e.className,Ps=e=>Bs(e)&&typeof e.style<"u"&&!Ls(e),Is=e=>"INPUT"===e.tagName,Ns=e=>"HTML"===e.tagName,Ds=e=>"svg"===e.tagName,Os=e=>"BODY"===e.tagName,Fs=e=>"CANVAS"===e.tagName,$s=e=>"VIDEO"===e.tagName,zs=e=>"IMG"===e.tagName,_s=e=>"IFRAME"===e.tagName,Ws=e=>"STYLE"===e.tagName,Hs=e=>"SCRIPT"===e.tagName,Vs=e=>"TEXTAREA"===e.tagName,js=e=>"SELECT"===e.tagName,Us=e=>"SLOT"===e.tagName,Ys=e=>"LI"===e.tagName,qs=e=>"OL"===e.tagName,Gs=e=>!Ls(e)&&e.tagName.indexOf("-")>0,Ks=new Set(["IMG","VIDEO","AUDIO","CANVAS","IFRAME","INPUT","TEXTAREA","SELECT","BR","HR","META","LINK","BASE","COL","SOURCE","TRACK","WBR","AREA","PARAM","EMBED","OBJECT"]),Xs=e=>!Ls(e)&&!Ks.has(e.tagName),Js={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Qs=(e,t)=>0!==(e&t),Zs=class{counters={};getCounterValue(e){let t=this.counters[e];return t&&t.length?mt(t,t.length-1):1}getCounterValues(e){return this.counters[e]||[]}pop(e){e.forEach(e=>this.counters[e]?.pop())}parse(e){let t=e.counterIncrement,i=e.counterReset,r=!0;null!==t&&t.forEach(e=>{let t=this.counters[e.counter];if(t&&0!==e.increment){r=!1,t.length||t.push(1);let i=Math.max(0,t.length-1);t[i]=(t[i]??0)+e.increment}});let s=[];return r&&i.forEach(e=>{let t=this.counters[e.counter];s.push(e.counter),t||(t=this.counters[e.counter]=[]),t.push(e.reset)}),s}},en={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},tn={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054f","\u054e","\u054d","\u054c","\u054b","\u054a","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053f","\u053e","\u053d","\u053c","\u053b","\u053a","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},rn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05d9\u05f3","\u05d8\u05f3","\u05d7\u05f3","\u05d6\u05f3","\u05d5\u05f3","\u05d4\u05f3","\u05d3\u05f3","\u05d2\u05f3","\u05d1\u05f3","\u05d0\u05f3","\u05ea","\u05e9","\u05e8","\u05e7","\u05e6","\u05e4","\u05e2","\u05e1","\u05e0","\u05de","\u05dc","\u05db","\u05d9\u05d8","\u05d9\u05d7","\u05d9\u05d6","\u05d8\u05d6","\u05d8\u05d5","\u05d9","\u05d8","\u05d7","\u05d6","\u05d5","\u05d4","\u05d3","\u05d2","\u05d1","\u05d0"]},sn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10f5","\u10f0","\u10ef","\u10f4","\u10ee","\u10ed","\u10ec","\u10eb","\u10ea","\u10e9","\u10e8","\u10e7","\u10e6","\u10e5","\u10e4","\u10f3","\u10e2","\u10e1","\u10e0","\u10df","\u10de","\u10dd","\u10f2","\u10dc","\u10db","\u10da","\u10d9","\u10d8","\u10d7","\u10f1","\u10d6","\u10d5","\u10d4","\u10d3","\u10d2","\u10d1","\u10d0"]},nn=(e,t,i,r,s,n)=>e<t||e>i?fn(e,s,n.length>0):r.integers.reduce((t,i,s)=>{for(;e>=i;)e-=i,t+=r.values[s];return t},"")+n,on=(e,t,i,r)=>{let s="";do{i||e--,s=r(e)+s,e/=t}while(e*t>=t);return s},an=(e,t,i,r,s)=>{let n=i-t+1;return(e<0?"-":"")+(on(Math.abs(e),n,r,e=>String.fromCodePoint(Math.floor(e%n)+t))+s)},ln=(e,t,i=". ")=>{let r=t.length;return on(Math.abs(e),r,!1,e=>String(t[Math.floor(e%r)]))+i},dn=(e,t,i,r,s,n)=>{if(e<-9999||e>9999)return fn(e,4,s.length>0);let o=Math.abs(e),a=s;if(0===o)return t[0]+a;for(let r=0;o>0&&r<=4;r++){let s=o%10;0===s&&Qs(n,1)&&""!==a?a=t[s]+a:s>1||1===s&&0===r||1===s&&1===r&&Qs(n,2)||1===s&&1===r&&Qs(n,4)&&e>100||1===s&&r>1&&Qs(n,8)?a=(t[s]??"")+(r>0?i[r-1]??"":"")+a:1===s&&r>0&&(a=(i[r-1]??"")+a),o=Math.floor(o/10)}return(e<0?r:"")+a},cn="\u5341\u767e\u5343\u842c",pn="\u62fe\u4f70\u4edf\u842c",hn="\u30de\u30a4\u30ca\u30b9",un="\ub9c8\uc774\ub108\uc2a4",fn=(e,t,i)=>{let r=i?". ":"",s=i?"\u3001":"",n=i?", ":"",o=i?" ":"";switch(t){case 0:return"\u2022"+o;case 1:return"\u25e6"+o;case 2:return"\u25fe"+o;case 5:let t=an(e,48,57,!0,r);return t.length<4?`0${t}`:t;case 4:return ln(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",s);case 6:return nn(e,1,3999,en,3,r).toLowerCase();case 7:return nn(e,1,3999,en,3,r);case 8:return an(e,945,969,!1,r);case 9:return an(e,97,122,!1,r);case 10:return an(e,65,90,!1,r);case 11:return an(e,1632,1641,!0,r);case 12:case 49:return nn(e,1,9999,tn,3,r);case 35:return nn(e,1,9999,tn,3,r).toLowerCase();case 13:return an(e,2534,2543,!0,r);case 14:case 30:return an(e,6112,6121,!0,r);case 15:return ln(e,"\u5b50\u4e11\u5bc5\u536f\u8fb0\u5df3\u5348\u672a\u7533\u9149\u620c\u4ea5",s);case 16:return ln(e,"\u7532\u4e59\u4e19\u4e01\u620a\u5df1\u5e9a\u8f9b\u58ec\u7678",s);case 17:case 48:return dn(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",cn,"\u8ca0",s,14);case 47:return dn(e,"\u96f6\u58f9\u8cb3\u53c3\u8086\u4f0d\u9678\u67d2\u634c\u7396",pn,"\u8ca0",s,15);case 42:return dn(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",cn,"\u8d1f",s,14);case 41:return dn(e,"\u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396",pn,"\u8d1f",s,15);case 26:return dn(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u4e07",hn,s,0);case 25:return dn(e,"\u96f6\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343\u4e07",hn,s,7);case 31:return dn(e,"\uc601\uc77c\uc774\uc0bc\uc0ac\uc624\uc721\uce60\ud314\uad6c","\uc2ed\ubc31\ucc9c\ub9cc",un,n,7);case 33:return dn(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c",un,n,0);case 32:return dn(e,"\u96f6\u58f9\u8cb3\u53c3\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343",un,n,7);case 18:return an(e,2406,2415,!0,r);case 20:return nn(e,1,19999,sn,3,r);case 21:return an(e,2790,2799,!0,r);case 22:return an(e,2662,2671,!0,r);case 52:return nn(e,1,10999,rn,3,r);case 23:return ln(e,"\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u3055\u3057\u3059\u305b\u305d\u305f\u3061\u3064\u3066\u3068\u306a\u306b\u306c\u306d\u306e\u306f\u3072\u3075\u3078\u307b\u307e\u307f\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308a\u308b\u308c\u308d\u308f\u3090\u3091\u3092\u3093");case 24:return ln(e,"\u3044\u308d\u306f\u306b\u307b\u3078\u3068\u3061\u308a\u306c\u308b\u3092\u308f\u304b\u3088\u305f\u308c\u305d\u3064\u306d\u306a\u3089\u3080\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304d\u3086\u3081\u307f\u3057\u3091\u3072\u3082\u305b\u3059");case 27:return an(e,3302,3311,!0,r);case 28:return ln(e,"\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f0\u30f1\u30f2\u30f3",s);case 29:return ln(e,"\u30a4\u30ed\u30cf\u30cb\u30db\u30d8\u30c8\u30c1\u30ea\u30cc\u30eb\u30f2\u30ef\u30ab\u30e8\u30bf\u30ec\u30bd\u30c4\u30cd\u30ca\u30e9\u30e0\u30a6\u30f0\u30ce\u30aa\u30af\u30e4\u30de\u30b1\u30d5\u30b3\u30a8\u30c6\u30a2\u30b5\u30ad\u30e6\u30e1\u30df\u30b7\u30f1\u30d2\u30e2\u30bb\u30b9",s);case 34:return an(e,3792,3801,!0,r);case 37:return an(e,6160,6169,!0,r);case 38:return an(e,4160,4169,!0,r);case 39:return an(e,2918,2927,!0,r);case 40:return an(e,1776,1785,!0,r);case 43:return an(e,3046,3055,!0,r);case 44:return an(e,3174,3183,!0,r);case 45:return an(e,3664,3673,!0,r);case 46:return an(e,3872,3881,!0,r);default:return an(e,48,57,!0,r)}},gn={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:(e,t)=>t.filter(ri).reduce((e,t)=>e|mn(t.value),0)},mn=e=>{switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},bn={name:"float",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},yn={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:(e,t)=>t.filter(ri).map(e=>{switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})},xn={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},vn={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>t.filter(ri).map(e=>{switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(e=>0!==e)},wn={name:"content",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>{if(0===t.length)return[];let i=t[0];return i&&20===i.type&&"none"===i.value?[]:t}},kn={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>{if(0===t.length)return null;let i=t[0];if(i&&20===i.type&&"none"===i.value)return null;let r=[],s=t.filter(si);if(s.length%2!=0)return null;for(let e=0;e<s.length;e+=2){let t=mt(s,e).value,i=mt(s,e+1).value;r.push({open:t,close:i})}return r}},Cn=(e,t,i)=>{if(!e)return"";let r=e[Math.min(t,e.length-1)];return r?i?r.open:r.close:""},Sn=(e,t)=>{let i=[],r=e.filter(oi);for(let e=0;e<r.length;e++){let s=r[e],n=r[e+1];if(s&&20===s.type){let e=n&&ii(n)?n.number:t;i.push([s.value,e])}}return i},En={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>{if(0===t.length)return null;let i=t[0];return i&&20===i.type&&"none"===i.value?null:Sn(t,1).map(([e,t])=>({counter:e,increment:t}))}},Mn={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>0===t.length?[]:Sn(t,0).filter(([e])=>"none"!==e).map(([e,t])=>({counter:e,reset:t}))},An={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(ri(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2;case"text":return 3}return 0})},Tn={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Bn=(e,t)=>{let i=xs.parse(e,mt(t,0)),r=t[1];return r&&wi(r)?{color:i,stop:r}:{color:i,stop:null}},Rn=(e,t)=>{let i=e.map(e=>({color:e.color,stop:e.stop})),r=mt(i,0),s=mt(i,i.length-1);null===r.stop&&(r.stop=Ti),null===s.stop&&(s.stop=Ri);let n=[],o=0;for(let e=0;e<i.length;e++){let r=mt(i,e).stop;if(null!==r){let e=Pi(r,t);e>o?n.push(e):n.push(o),o=e}else n.push(null)}let a=null;for(let e=0;e<n.length;e++){let t=mt(n,e);if(null===t)null===a&&(a=e);else if(null!==a){let i=e-a,r=(t-n[a-1])/(i+1);for(let e=1;e<=i;e++)n[a+e-1]=r*e;a=null}}return i.map(({color:e},i)=>({color:e,stop:Math.max(Math.min(1,n[i]/t),0)}))},Ln=(e,t,i)=>{let r=t/2,s=i/2,n=Pi(e[0],t)-r,o=s-Pi(e[1],i);return(Math.atan2(o,n)+2*Math.PI)%(2*Math.PI)},Pn=(e,t,i)=>{let r="number"==typeof e?e:Ln(e,t,i),s=Math.abs(t*Math.sin(r))+Math.abs(i*Math.cos(r)),n=t/2,o=i/2,a=s/2,l=Math.sin(r-Math.PI/2)*a,d=Math.cos(r-Math.PI/2)*a;return[s,n-d,n+d,o-l,o+l]},In=(e,t)=>Math.sqrt(e*e+t*t),Nn=(e,t,i,r,s)=>[[0,0],[0,t],[e,0],[e,t]].reduce((e,t)=>{let[n,o]=t,a=In(i-n,r-o);return(s?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner,Dn=(e,t,i,r,s)=>{let n=0,o=0;switch(e.size){case 0:0===e.shape?n=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-s)):1===e.shape&&(n=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(i),Math.abs(i-s)));break;case 2:if(0===e.shape)n=o=Math.min(In(t,i),In(t,i-s),In(t-r,i),In(t-r,i-s));else if(1===e.shape){let e=Math.min(Math.abs(i),Math.abs(i-s))/Math.min(Math.abs(t),Math.abs(t-r)),[a,l]=Nn(r,s,t,i,!0);n=In(a-t,(l-i)/e),o=e*n}break;case 1:0===e.shape?n=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-s)):1===e.shape&&(n=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(i),Math.abs(i-s)));break;case 3:if(0===e.shape)n=o=Math.max(In(t,i),In(t,i-s),In(t-r,i),In(t-r,i-s));else if(1===e.shape){let e=Math.max(Math.abs(i),Math.abs(i-s))/Math.max(Math.abs(t),Math.abs(t-r)),[a,l]=Nn(r,s,t,i,!1);n=In(a-t,(l-i)/e),o=e*n}}if(Array.isArray(e.size)){let t=e.size;n=Pi(mt(t,0),r),o=2===t.length?Pi(mt(t,1),s):n}return[n,o]},$n="closest-side",zn="farthest-side",_n="closest-corner",Wn="farthest-corner",Hn="circle",Vn="ellipse",jn="cover",Un="contain",Gn=(e,t)=>({...On(e,t),type:3}),Kn=(e,t)=>({...Yn(e,t),type:4}),Jn=(e,t)=>({...Xn(e,t),type:6}),Qn=e=>e&&(ti(e)&&("dppx"===e.unit||"x"===e.unit)||ii(e))?e.number:1,Zn=(e,t)=>{let i=li(t),r=e.config.window.devicePixelRatio||1,s=[];for(let e of i){let t=e.find(e=>22===e.type||18===e.type);if(!t)continue;let i=e.find(e=>ti(e)||ii(e));s.push({imageToken:t,resolution:Qn(i)})}if(0===s.length)throw new Error("image-set() requires at least one image candidate");let n=s.filter(e=>e.resolution>=r).sort((e,t)=>e.resolution-t.resolution),o=mt(n.length>0?n:s.slice().sort((e,t)=>t.resolution-e.resolution),0);return oo.parse(e,o.imageToken)},eo=e=>1===e.type,to=e=>2===e.type,io=e=>3===e.type,ro=e=>4===e.type,so=e=>5===e.type,no=e=>6===e.type,oo={name:"image",parse:(e,t)=>{if(22===t.type){let i={url:t.value,type:0};return e.cache.addImage(t.value),i}if(18===t.type){let i=ao[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported image function "${t.name}"`);return i(e,t.values)}throw new Error(`Unsupported image type ${t.type}`)}},ao={"linear-gradient":On=(e,t)=>{let i=$i(180),r=[];return li(t).forEach((t,s)=>{if(0===s){let r=t[0];if(r&&20===r.type&&"to"===r.value)return void(i=Fi(t));if(r&&Oi(r))return void(i=Di.parse(e,r))}let n=Bn(e,t);r.push(n)}),{angle:i,stops:r,type:1}},"-moz-linear-gradient":Fn=(e,t)=>{let i=$i(180),r=[];return li(t).forEach((t,s)=>{if(0===s){let r=t[0];if(r&&20===r.type&&-1!==["top","left","right","bottom"].indexOf(r.value))return void(i=Fi(t));if(r&&Oi(r))return void(i=(Di.parse(e,r)+$i(270))%$i(360))}let n=Bn(e,t);r.push(n)}),{angle:i,stops:r,type:1}},"-ms-linear-gradient":Fn,"-o-linear-gradient":Fn,"-webkit-linear-gradient":Fn,"radial-gradient":Yn=(e,t)=>{let i=1,r=3,s=[],n=[];return li(t).forEach((t,o)=>{let a=!0;if(0===o){let e=!1;a=t.reduce((t,s)=>{if(e)if(ri(s))switch(s.value){case"center":return n.push(Bi),t;case"top":case"left":return n.push(Ti),t;case"right":case"bottom":return n.push(Ri),t}else(wi(s)||vi(s))&&n.push(s);else if(ri(s))switch(s.value){case Hn:return i=0,!1;case Vn:return i=1,!1;case"at":return e=!0,!1;case $n:return r=0,!1;case jn:case zn:return r=1,!1;case Un:case _n:return r=2,!1;case Wn:return r=3,!1}else if(vi(s)||wi(s))return Array.isArray(r)||(r=[]),r.push(s),!1;return t},a)}if(a){let i=Bn(e,t);s.push(i)}}),{size:r,shape:i,stops:s,position:n,type:2}},"-moz-radial-gradient":qn=(e,t)=>{let i=1,r=3,s=[],n=[];return li(t).forEach((t,o)=>{let a=!0;if(0===o?a=t.reduce((e,t)=>{if(ri(t))switch(t.value){case"center":return n.push(Bi),!1;case"top":case"left":return n.push(Ti),!1;case"right":case"bottom":return n.push(Ri),!1}else if(wi(t)||vi(t))return n.push(t),!1;return e},a):1===o&&(a=t.reduce((e,t)=>{if(ri(t))switch(t.value){case Hn:return i=0,!1;case Vn:return i=1,!1;case Un:case $n:return r=0,!1;case zn:return r=1,!1;case _n:return r=2,!1;case jn:case Wn:return r=3,!1}else if(vi(t)||wi(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},a)),a){let i=Bn(e,t);s.push(i)}}),{size:r,shape:i,stops:s,position:n,type:2}},"-ms-radial-gradient":qn,"-o-radial-gradient":qn,"-webkit-radial-gradient":qn,"-webkit-gradient":(e,t)=>{let i=$i(180),r=[],s=1;return li(t).forEach((t,i)=>{let n=t[0];if(n){if(0===i){if(ri(n)&&"linear"===n.value)return void(s=1);if(ri(n)&&"radial"===n.value)return void(s=2)}if(18===n.type)if("from"===n.name){let t=xs.parse(e,mt(n.values,0));r.push({stop:Ti,color:t})}else if("to"===n.name){let t=xs.parse(e,mt(n.values,0));r.push({stop:Ri,color:t})}else if("color-stop"===n.name){let t=n.values.filter(ai);if(2===t.length){let i=xs.parse(e,mt(t,1)),s=mt(t,0);ii(s)&&r.push({stop:{type:16,number:100*s.number,flags:s.flags},color:i})}}}}),1===s?{angle:(i+$i(180))%$i(360),stops:r,type:s}:{size:3,shape:0,stops:r,position:[],type:s}},"repeating-linear-gradient":Gn,"-webkit-repeating-linear-gradient":Gn,"-moz-repeating-linear-gradient":Gn,"-ms-repeating-linear-gradient":Gn,"-o-repeating-linear-gradient":Gn,"repeating-radial-gradient":Kn,"-webkit-repeating-radial-gradient":Kn,"-moz-repeating-radial-gradient":Kn,"conic-gradient":Xn=(e,t)=>{let i=0,r=[],s=[];return li(t).forEach((t,n)=>{let o=!0;if(0===n){let s=!1,n=!1;o=t.reduce((t,o)=>{if(ri(o))switch(o.value){case"from":return s=!0,n=!1,!1;case"at":return s=!1,n=!0,!1;case"center":return r.push(Bi),t;case"top":case"left":return r.push(Ti),t;case"right":case"bottom":return r.push(Ri),t}return s?(i=Di.parse(e,o),!1):(n&&wi(o)&&r.push(o),t)},!0)}o&&t.length>0&&s.push(Bn(e,t))}),{type:5,angle:i,position:r,stops:s}},"-webkit-conic-gradient":Xn,"-moz-conic-gradient":Xn,"repeating-conic-gradient":Jn,"-webkit-repeating-conic-gradient":Jn,"-moz-repeating-conic-gradient":Jn,"image-set":Zn,"-webkit-image-set":Zn},lo={name:"background-image",initialValue:"none",type:1,prefix:!1,skipCache:!0,parse:(e,t)=>{if(0===t.length)return[];let i=t[0];return i&&20===i.type&&"none"===i.value?[]:t.filter(e=>ai(e)&&it(e)).map(t=>oo.parse(e,t))}},co={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(ri(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})},po={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:(e,t)=>li(t).map(e=>e.map(Ei).filter(e=>null!==e)).map(Ai)},ho={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:(e,t)=>li(t).map(e=>e.filter(ri).map(e=>e.value).join(" ")).map(uo)},uo=e=>{switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},fo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:(e,t)=>li(t).map(e=>e.map(e=>go(e)?e:Ei(e)).filter(e=>null!==e))},go=e=>ri(e)||wi(e),bo=(mo=e=>({name:`border-${e}-color`,initialValue:"transparent",prefix:!1,type:3,format:"color"}))("top"),yo=mo("right"),xo=mo("bottom"),vo=mo("left"),ko=(wo=e=>({name:`border-${e}-radius`,initialValue:"0 0",prefix:!1,type:1,parse:(e,t)=>Ai(t.filter(wi))}))("top-left"),Co=wo("top-right"),So=wo("bottom-right"),Eo=wo("bottom-left"),Ao=(Mo=e=>({name:`border-${e}-style`,initialValue:"solid",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}))("top"),To=Mo("right"),Bo=Mo("bottom"),Ro=Mo("left"),Po=(Lo=e=>({name:`border-${e}-width`,initialValue:"0",type:0,prefix:!1,parse:(e,t)=>ti(t)?t.number:0}))("top"),Io=Lo("right"),No=Lo("bottom"),Do=Lo("left"),Oo={type:0},Fo=e=>{let[t]=e;return t?ri(t)?"farthest-side"===t.value?"farthest-side":"closest-side":wi(t)?t:"closest-side":"closest-side"},$o=e=>{let t=null,i=null;for(let r of e)if(ri(r))switch(r.value){case"left":t=Ti;break;case"right":t=Ri;break;case"top":i=Ti;break;case"bottom":i=Ri;break;case"center":null===t?t=Bi:null===i&&(i=Bi)}else wi(r)&&(null===t?t=r:null===i&&(i=r));return{cx:t??Bi,cy:i??Bi}},zo=e=>{let t=[];for(let i of e)if(31!==i.type){if(ri(i)&&"round"===i.value)break;wi(i)&&t.push(i)}let i=t[0]??Ti,r=t[1]??i;return{type:1,top:i,right:r,bottom:t[2]??i,left:t[3]??r}},_o=e=>{let t=e.filter(oi),i=t.findIndex(e=>ni(e,"at")),r=-1===i?t:t.slice(0,i),s=-1===i?[]:t.slice(i+1);return{type:2,radius:Fo(r),...$o(s)}},Wo=e=>{let t=e.filter(oi),i=t.findIndex(e=>ni(e,"at")),r=-1===i?t:t.slice(0,i),s=-1===i?[]:t.slice(i+1);return{type:3,rx:Fo(r.slice(0,1)),ry:Fo(r.slice(1,2)),...$o(s)}},Ho=e=>{let t=li(e),i=[];for(let e of t){if(1===e.length&&e[0]&&ri(e[0]))continue;let t=e.filter(wi);t.length>=2&&i.push([mt(t,0),mt(t,1)])}return{type:4,points:i}},Vo=e=>{let t=e.find(e=>0===e.type);return t?{type:5,d:t.value}:Oo},jo=e=>{let t=[];for(let i of e)if(31!==i.type){if(ri(i)&&"round"===i.value)break;wi(i)&&t.push(i)}return t.length<4?Oo:{type:6,x:mt(t,0),y:mt(t,1),width:mt(t,2),height:mt(t,3)}},Uo=e=>{let t=[];for(let i of e)if(31!==i.type){if(ri(i)){if("round"===i.value)break;if("auto"===i.value){t.push("auto");continue}return Oo}wi(i)&&t.push(i)}if(4!==t.length)return Oo;let i=(e,t)=>"auto"!==e?e:"top"===t||"left"===t?Ti:Ri;return{type:1,top:i(mt(t,0),"top"),right:i(mt(t,1),"right"),bottom:i(mt(t,2),"bottom"),left:i(mt(t,3),"left")}},Yo={name:"clip-path",initialValue:"none",prefix:!1,type:0,parse:(e,t)=>{if(ri(t)&&"none"===t.value)return Oo;if(18===t.type)switch(t.name){case"inset":return zo(t.values);case"circle":return _o(t.values);case"ellipse":return Wo(t.values);case"polygon":return Ho(t.values);case"path":return Vo(t.values);case"xywh":return jo(t.values);case"rect":return Uo(t.values)}return Oo}},qo={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Go={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:(e,t)=>"rtl"===t?1:0},Ko={name:"font-family",initialValue:"",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=[],s=[],n=!1;return t.forEach(e=>{switch(e.type){case 20:i.push(e.value);break;case 0:n=!0,i.push(e.value);break;case 17:i.push(e.number.toString());break;case 4:r.push(i.join(" ")),s.push(n),n=!1,i.length=0}}),i.length&&(r.push(i.join(" ")),s.push(n)),r.map((e,t)=>s[t]||-1!==e.indexOf(" ")?`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}'`:e)}},Xo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Jo={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:(e,t)=>20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0},Qo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>"strict"===t?"strict":"normal"},Zo={name:"line-height",initialValue:"normal",prefix:!1,type:4},ea=(e,t)=>ri(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:wi(e)?Pi(e,t):t,ta={name:"list-style-image",initialValue:"none",type:0,prefix:!1,skipCache:!0,parse:(e,t)=>20===t.type&&"none"===t.value||!it(t)?null:oo.parse(e,t)},ia={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:(e,t)=>"inside"===t?0:1},sa=(ra=e=>({name:`margin-${e}`,initialValue:"0",prefix:!1,type:4}))("top"),na=ra("right"),oa=ra("bottom"),aa=ra("left"),la={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>"break-word"===t?"break-word":"normal"},ca=(da=e=>({name:`padding-${e}`,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}))("top"),pa=da("right"),ha=da("bottom"),ua=da("left"),fa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},ga={name:"position",initialValue:"static",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},ma={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>1===t.length&&ni(mt(t,0),"none")?[]:li(t).map(t=>{let i={color:0,offsetX:Ti,offsetY:Ti,blur:Ti},r=0;for(let s=0;s<t.length;s++){let n=t[s];n&&(vi(n)?(0===r?i.offsetX=n:1===r?i.offsetY=n:i.blur=n,r++):i.color=xs.parse(e,n))}return i})},ba={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},ya={name:"transform",initialValue:"none",prefix:!0,type:0,parse:(e,t)=>{if(20===t.type&&"none"===t.value)return null;if(18===t.type){let i=xa[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported transform function "${t.name}"`);return i(e,t.values)}return null}},xa={matrix:(e,t)=>{let i=t.filter(e=>17===e.type).map(e=>e.number);return 6===i.length?i:null},matrix3d:(e,t)=>{let i=t.filter(e=>17===e.type).map(e=>e.number);return 16!==i.length?null:[mt(i,0),mt(i,1),mt(i,4),mt(i,5),mt(i,12),mt(i,13)]},rotate:(e,t)=>{if(1!==t.length)return null;let i=mt(t,0),r=0;if(17===i.type&&0===i.number)r=0;else{if(15!==i.type)return null;r=Di.parse(e,i)}let s=Math.cos(r),n=Math.sin(r);return[s,n,-n,s,0,0]}},wa=[va={type:16,number:50,flags:4},va],ka={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:(e,t)=>{let i=t.filter(wi);return 2!==i.length?wa:[mt(i,0),mt(i,1)]}},Ca={name:"rotate",initialValue:"none",prefix:!1,type:0,parse:(e,t)=>20===t.type&&"none"===t.value?null:17===t.type&&0===t.number?0:15===t.type?180*Di.parse(e,t)/Math.PI:null},Sa={name:"visibility",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Ea={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"break-all":return"break-all";case"keep-all":return"keep-all";default:return"normal"}}},Ma={name:"white-space",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"pre":return"pre";case"nowrap":return"nowrap";case"pre-wrap":return"pre-wrap";case"pre-line":return"pre-line";default:return"normal"}}},Aa=e=>0!==e,Ta=e=>3===e||4===e,Ba={name:"writing-mode",initialValue:"horizontal-tb",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"vertical-rl":return 1;case"vertical-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4;default:return 0}}},Ra={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>{if(20===t.type)return{auto:!0,order:0};if(ii(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},La={name:"time",parse:(e,t)=>{if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},Pa={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:(e,t)=>ii(t)?t.number:1},Ia={name:"text-decoration-style",initialValue:"solid",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"double":return 1;case"dotted":return 2;case"dashed":return 3;case"wavy":return 4;default:return 0}}},Na={name:"text-decoration-thickness",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>{if(ri(t))switch(t.value){case"auto":return"auto";case"from-font":return"from-font"}return ti(t)?t.number:"auto"}},Da={name:"text-underline-offset",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>ri(t)&&"auto"===t.value?"auto":ti(t)?t.number:"auto"},Oa={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:(e,t)=>ii(t)?t.number:ri(t)&&"bold"===t.value?700:400},Fa={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>t.filter(ri).map(e=>e.value)},$a={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},za={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:(e,t)=>t.filter(ti).map(t=>La.parse(e,t))},_a={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>1===t.length&&ni(mt(t,0),"none")?[]:li(t).map(t=>{let i={color:255,offsetX:Ti,offsetY:Ti,blur:Ti,spread:Ti,inset:!1},r=0;for(let s=0;s<t.length;s++){let n=t[s];n&&(ni(n,"inset")?i.inset=!0:vi(n)?(0===r?i.offsetX=n:1===r?i.offsetY=n:2===r?i.blur=n:i.spread=n,r++):i.color=xs.parse(e,n))}return i})},Wa={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:(e,t)=>{let i=[];return t.filter(ri).forEach(e=>{switch(e.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2)}}),[0,1,2].forEach(e=>{-1===i.indexOf(e)&&i.push(e)}),i}},Ha={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Va={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:(e,t)=>ti(t)?t.number:0},ja={name:"-webkit-line-clamp",initialValue:"none",prefix:!0,type:0,parse:(e,t)=>20===t.type&&"none"===t.value?0:17===t.type?Math.max(0,Math.floor(t.number)):0},Ua={name:"object-fit",initialValue:"fill",prefix:!1,type:1,parse:(e,t)=>t.filter(ri).reduce((e,t)=>e|Ya(t.value),0)},Ya=e=>{switch(e){case"contain":return 2;case"cover":return 4;case"none":return 8;case"scale-down":return 16}return 0},qa={name:"text-overflow",initialValue:"clip",prefix:!1,type:2,parse:(e,t)=>"ellipsis"===t?1:0},Ga={name:"image-rendering",initialValue:"auto",prefix:!1,type:2,parse:(e,t)=>{switch(t.toLowerCase()){case"crisp-edges":case"-webkit-crisp-edges":case"-moz-crisp-edges":return 1;case"pixelated":case"-webkit-optimize-contrast":return 2;case"smooth":case"high-quality":return 3;default:return 0}}},Ka={NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"},Xa=new Set(Object.values(Ka)),Ja={name:"mix-blend-mode",initialValue:"normal",type:2,prefix:!1,parse:(e,t)=>Xa.has(t)?t:Ka.NORMAL},Qa={name:"filter",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{if(1===t.length){let e=mt(t,0);if(20===e.type&&"none"===e.value)return null}let i=[];for(let e of t)if(22!==e.type){if(18===e.type){let t=e,r=Za(t.values);switch(t.name){case"blur":i.push(`blur(${r})`);break;case"brightness":case"contrast":case"invert":case"opacity":case"saturate":case"sepia":default:i.push(`${t.name}(${r})`);break;case"grayscale":i.push(`grayscale(${r})`);break;case"hue-rotate":i.push(`hue-rotate(${r})`);break;case"drop-shadow":i.push(`drop-shadow(${r})`)}}}else i.push(`url("${e.value}")`);return i.length>0?i.join(" "):null}},Za=e=>{let t=[];for(let i of e)31!==i.type?18===i.type?t.push(`${i.name}(${Za(i.values)})`):4===i.type?t.push(","):6===i.type?t.push(i.value):15===i.type?t.push(`${i.number}${i.unit}`):17===i.type?t.push(`${i.number}`):16===i.type?t.push(`${i.number}%`):20===i.type?t.push(i.value):5===i.type&&t.push(`#${i.value}`):t.push(" ");return t.join("").trim()},el={name:"font-variant-ligatures",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"none":return 1;case"common-ligatures":return 2;case"no-common-ligatures":return 3;case"discretionary-ligatures":return 4;case"no-discretionary-ligatures":return 5;case"historical-ligatures":return 6;case"no-historical-ligatures":return 7;case"contextual":return 8;case"no-contextual":return 9;default:return 0}}},tl={name:"zoom",initialValue:"1",type:0,prefix:!1,parse:(e,t)=>16===t.type?Math.max(0,t.number/100):17===t.type?Math.max(0,t.number):1},il={name:"object-position",initialValue:"50% 50%",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=0;for(;r<t.length&&i.length<2;){let e=t[r];if(!e)break;if(ri(e))switch(e.value){case"left":case"top":i.push(Ti);break;case"center":i.push(Bi);break;case"right":case"bottom":i.push(Ri)}else wi(e)&&i.push(e);r++}for(;i.length<2;)i.push(Bi);return[mt(i,0),mt(i,1)]}},rl=new Set(Object.values({NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"})),sl={name:"background-blend-mode",initialValue:"normal",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=t.filter(ai);for(let e of r)ri(e)&&rl.has(e.value)&&i.push(e.value);return i.length>0?i:["normal"]}},nl={name:"border-image-source",initialValue:"none",prefix:!1,type:1,skipCache:!0,parse:(e,t)=>{if(0===t.length)return null;let i=t.filter(e=>ai(e)&&it(e));return 0===i.length?null:oo.parse(e,mt(i,0))}},ol=e=>{let t=[...e];if(1===t.length){let e=mt(t,0);t.push(e,e,e)}else 2===t.length?t.push(mt(t,0),mt(t,1)):3===t.length&&t.push(mt(t,1));return[mt(t,0),mt(t,1),mt(t,2),mt(t,3)]},al={name:"border-image-slice",initialValue:"100%",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(oi),r=[],s=!1,n="percent";for(let e of i)ri(e)&&"fill"===e.value?s=!0:17===e.type?(r.push(e.number),n="number"):16===e.type&&(r.push(e.number),n="percent");let[o,a,l,d]=ol(r.length>0?r:[100]);return{top:o,right:a,bottom:l,left:d,fill:s,unit:n}}},ll=e=>{switch(e){case"repeat":return 1;case"round":return 2;case"space":return 3;default:return 0}},dl={name:"border-image-repeat",initialValue:"stretch",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(oi),r=[];for(let e of i)ri(e)&&r.push(ll(e.value));let s=r[0]??0;return{horizontal:s,vertical:r[1]??s}}},cl={name:"box-decoration-break",initialValue:"slice",prefix:!1,type:2,parse:(e,t)=>"clone"===t?1:0},pl={name:"accent-color",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>ri(t)&&"auto"===t.value?null:xs.parse(e,t)},hl={name:"-webkit-text-fill-color",initialValue:"currentcolor",prefix:!0,type:0,parse:(e,t)=>ri(t)&&"currentcolor"===t.value?null:xs.parse(e,t)},ul={name:"isolation",initialValue:"auto",prefix:!1,type:2,parse:(e,t)=>"isolate"===t?1:0},fl={name:"outline-style",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"solid":return 2;case"dashed":return 3;case"dotted":return 4;case"double":return 5;case"auto":return 1;default:return 0}}},gl={name:"outline-color",initialValue:"currentcolor",prefix:!1,type:0,parse:(e,t)=>!ri(t)||"currentcolor"!==t.value&&"invert"!==t.value?xs.parse(e,t):null},ml={name:"outline-width",initialValue:"medium",prefix:!1,type:0,parse:Po.parse},bl={name:"backdrop-filter",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>Qa.parse(e,t)},yl=["dot","circle","double-circle","triangle","sesame"],xl=e=>{let t=[...e];if(1===t.length){let e=mt(t,0);t.push(e,e,e)}else 2===t.length?t.push(mt(t,0),mt(t,1)):3===t.length&&t.push(mt(t,1));return[mt(t,0),mt(t,1),mt(t,2),mt(t,3)]},vl=e=>ri(e)&&"auto"===e.value?{kind:"auto"}:17===e.type?{kind:"number",value:e.number}:15===e.type&&"px"===e.unit?{kind:"length",value:e.number}:16===e.type?{kind:"percentage",value:e.number}:null,wl=e=>{let t=[];for(let i of e){if(31===i.type)continue;let e=vl(i);if(!e)return null;t.push(e)}return 0===t.length||t.length>4?null:xl(t)},kl=[["animationDuration",za,"animationDuration"],["backgroundClip",An,"backgroundClip"],["backgroundColor",Tn,"backgroundColor"],["backgroundImage",lo,"backgroundImage"],["backgroundOrigin",co,"backgroundOrigin"],["backgroundPosition",po,"backgroundPosition"],["backgroundRepeat",ho,"backgroundRepeat"],["backgroundSize",fo,"backgroundSize"],["borderTopColor",bo,"borderTopColor"],["borderRightColor",yo,"borderRightColor"],["borderBottomColor",xo,"borderBottomColor"],["borderLeftColor",vo,"borderLeftColor"],["borderTopLeftRadius",ko,"borderTopLeftRadius"],["borderTopRightRadius",Co,"borderTopRightRadius"],["borderBottomRightRadius",So,"borderBottomRightRadius"],["borderBottomLeftRadius",Eo,"borderBottomLeftRadius"],["borderTopStyle",Ao,"borderTopStyle"],["borderRightStyle",To,"borderRightStyle"],["borderBottomStyle",Bo,"borderBottomStyle"],["borderLeftStyle",Ro,"borderLeftStyle"],["borderTopWidth",Po,"borderTopWidth"],["borderRightWidth",Io,"borderRightWidth"],["borderBottomWidth",No,"borderBottomWidth"],["borderLeftWidth",Do,"borderLeftWidth"],["boxShadow",_a,"boxShadow"],["clipPath",Yo,"clipPath"],["color",qo,"color"],["direction",Go,"direction"],["display",gn,"display"],["fontFamily",Ko,"fontFamily"],["fontSize",Xo,"fontSize"],["fontStyle",$a,"fontStyle"],["fontVariant",Fa,"fontVariant"],["fontWeight",Oa,"fontWeight"],["letterSpacing",Jo,"letterSpacing"],["lineBreak",Qo,"lineBreak"],["lineHeight",Zo,"lineHeight"],["listStyleImage",ta,"listStyleImage"],["listStylePosition",ia,"listStylePosition"],["listStyleType",Js,"listStyleType"],["marginTop",sa,"marginTop"],["marginRight",na,"marginRight"],["marginBottom",oa,"marginBottom"],["marginLeft",aa,"marginLeft"],["opacity",Pa,"opacity"],["overflowWrap",la,"overflowWrap"],["paddingTop",ca,"paddingTop"],["paddingRight",pa,"paddingRight"],["paddingBottom",ha,"paddingBottom"],["paddingLeft",ua,"paddingLeft"],["paintOrder",Wa,"paintOrder"],["position",ga,"position"],["textAlign",fa,"textAlign"],["textDecorationStyle",Ia,"textDecorationStyle"],["textDecorationThickness",Na,"textDecorationThickness"],["textUnderlineOffset",Da,"textUnderlineOffset"],["textShadow",ma,"textShadow"],["textTransform",ba,"textTransform"],["textOverflow",qa,"textOverflow"],["transform",ya,"transform"],["transformOrigin",ka,"transformOrigin"],["rotate",Ca,"rotate"],["translate",{name:"translate",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=[];for(let e of t)wi(e)&&i.push(e);return 0===i.length?null:[mt(i,0),i.length>1?mt(i,1):Ti]}},"translate"],["scale",{name:"scale",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=[];for(let e of t)ii(e)&&i.push(e.number);return 0===i.length?null:[mt(i,0),i.length>1?mt(i,1):mt(i,0)]}},"scale"],["visibility",Sa,"visibility"],["webkitTextStrokeColor",Ha,"webkitTextStrokeColor"],["webkitTextStrokeWidth",Va,"webkitTextStrokeWidth"],["webkitLineClamp",ja,"webkitLineClamp"],["wordBreak",Ea,"wordBreak"],["whiteSpace",Ma,"whiteSpace"],["writingMode",Ba,"writingMode"],["zIndex",Ra,"zIndex"],["objectFit",Ua,"objectFit"],["imageRendering",Ga,"imageRendering"],["mixBlendMode",Ja,"mixBlendMode"],["filter",Qa,"filter"],["fontVariantLigatures",el,"fontVariantLigatures"],["zoom",tl,"zoom"],["objectPosition",il,"objectPosition"],["backgroundBlendMode",sl,"backgroundBlendMode"],["borderImageSource",nl,"borderImageSource"],["borderImageSlice",al,"borderImageSlice"],["borderImageRepeat",dl,"borderImageRepeat"],["boxDecorationBreak",cl,"boxDecorationBreak"],["accentColor",pl,"accentColor"],["webkitTextFillColor",hl,"webkitTextFillColor"],["isolation",ul,"isolation"],["outlineColor",gl,"outlineColor"],["outlineStyle",fl,"outlineStyle"],["outlineWidth",ml,"outlineWidth"],["outlineOffset",{name:"outline-offset",initialValue:"0px",prefix:!1,type:0,parse:(e,t)=>ti(t)||ii(t)?t.number:0},"outlineOffset"],["backdropFilter",bl,"backdropFilter"],["maskImage",{name:"mask-image",initialValue:"none",prefix:!1,type:1,skipCache:!0,parse:lo.parse},"maskImage"],["maskPosition",{name:"mask-position",initialValue:"0%",prefix:!1,type:1,parse:po.parse},"maskPosition"],["maskRepeat",{name:"mask-repeat",initialValue:"repeat",prefix:!1,type:1,parse:ho.parse},"maskRepeat"],["maskSize",{name:"mask-size",initialValue:"auto",prefix:!1,type:1,parse:fo.parse},"maskSize"],["textEmphasisStyle",{name:"text-emphasis-style",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(oi);if(0===i.length)return null;let r=mt(i,0);if(0===r.type)return r.value;if(ri(r)){if("none"===r.value)return null;if("filled"!==r.value&&"open"!==r.value&&-1===yl.indexOf(r.value))return r.value}let s=!0,n="circle";for(let e of i)ri(e)&&("filled"===e.value?s=!0:"open"===e.value?s=!1:-1!==yl.indexOf(e.value)&&(n=e.value));return{fill:s,shape:n}}},"textEmphasisStyle"],["textEmphasisColor",{name:"text-emphasis-color",initialValue:"currentcolor",prefix:!1,type:0,parse:(e,t)=>ri(t)&&"currentcolor"===t.value?null:xs.parse(e,t)},"textEmphasisColor"],["textEmphasisPosition",{name:"text-emphasis-position",initialValue:"over right",prefix:!1,type:1,parse:(e,t)=>{let i=!0,r=!0;for(let e of t)if(ri(e))switch(e.value){case"over":i=!0;break;case"under":i=!1;break;case"right":r=!0;break;case"left":r=!1}return{over:i,right:r}}},"textEmphasisPosition"],["borderImageWidth",{name:"border-image-width",initialValue:"auto",prefix:!1,type:1,parse:(e,t)=>{let i=wl(t),r={kind:"auto"};return i?{top:i[0],right:i[1],bottom:i[2],left:i[3]}:{top:r,right:r,bottom:r,left:r}}},"borderImageWidth"],["borderImageOutset",{name:"border-image-outset",initialValue:"0px",prefix:!1,type:1,parse:(e,t)=>{let i=wl(t),r={kind:"length",value:0};return i?{top:i[0],right:i[1],bottom:i[2],left:i[3]}:{top:r,right:r,bottom:r,left:r}}},"borderImageOutset"],["webkitBoxReflect",{name:"-webkit-box-reflect",initialValue:"none",prefix:!0,type:1,skipCache:!0,parse:(e,t)=>{let i=null,r=0,s=null;for(let n of t)if(31!==n.type){if(null===i&&ri(n)){if("below"===n.value||"above"===n.value||"left"===n.value||"right"===n.value){i=n.value;continue}if("none"===n.value)return null}if(0===r&&ti(n)&&"px"===n.unit){r=n.number;continue}if(null===s&&it(n)){s=oo.parse(e,n);continue}}return null===i?null:{direction:i,offset:r,mask:s}}},"webkitBoxReflect"]],Cl=new Map,Sl=(e,t,i)=>{let r=null!==i&&typeof i<"u"?i.toString():t.initialValue;""===r.trim()&&(r=t.initialValue);let s=Cl.get(t);if(s){let e=s.get(r);if(void 0!==e)return s.delete(r),s.set(r,e),e}let n=Zt.get();n.write(r);let o=new ei(n.read());Zt.release(n);let a=(()=>{switch(t.type){case 2:{let i=o.parseComponentValue();return t.parse(e,ri(i)?i.value:t.initialValue)}case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Di.parse(e,o.parseComponentValue());case"color":return xs.parse(e,o.parseComponentValue());case"image":return oo.parse(e,o.parseComponentValue());case"length":{let e=o.parseComponentValue();return vi(e)?e:Ti}case"length-percentage":{let e=o.parseComponentValue();return wi(e)?e:Ti}case"time":return La.parse(e,o.parseComponentValue())}}})();if(s||(s=new Map,Cl.set(t,s)),!(t.skipCache||3===t.type&&"image"===t.format)){if(s.size>=200){let e=s.keys().next().value;void 0!==e&&s.delete(e)}s.set(r,a)}return a},El=class{styles;constructor(e){this.styles=e}get topColor(){return this.styles.borderTopColor}get rightColor(){return this.styles.borderRightColor}get bottomColor(){return this.styles.borderBottomColor}get leftColor(){return this.styles.borderLeftColor}get topStyle(){return this.styles.borderTopStyle}get rightStyle(){return this.styles.borderRightStyle}get bottomStyle(){return this.styles.borderBottomStyle}get leftStyle(){return this.styles.borderLeftStyle}get topWidth(){return this.styles.borderTopWidth}get rightWidth(){return this.styles.borderRightWidth}get bottomWidth(){return this.styles.borderBottomWidth}get leftWidth(){return this.styles.borderLeftWidth}get topLeftRadius(){return this.styles.borderTopLeftRadius}get topRightRadius(){return this.styles.borderTopRightRadius}get bottomRightRadius(){return this.styles.borderBottomRightRadius}get bottomLeftRadius(){return this.styles.borderBottomLeftRadius}get imageSource(){return this.styles.borderImageSource}get imageSlice(){return this.styles.borderImageSlice}get imageRepeat(){return this.styles.borderImageRepeat}get boxShadow(){return this.styles.boxShadow}},Ml=class{styles;constructor(e){this.styles=e}get color(){return this.styles.backgroundColor}get image(){return this.styles.backgroundImage}get clip(){return this.styles.backgroundClip}get origin(){return this.styles.backgroundOrigin}get position(){return this.styles.backgroundPosition}get repeat(){return this.styles.backgroundRepeat}get size(){return this.styles.backgroundSize}get blendMode(){return this.styles.backgroundBlendMode}},Al=class{styles;constructor(e){this.styles=e}get family(){return this.styles.fontFamily}get size(){return this.styles.fontSize}get style(){return this.styles.fontStyle}get variant(){return this.styles.fontVariant}get weight(){return this.styles.fontWeight}get ligatures(){return this.styles.fontVariantLigatures}get color(){return this.styles.color}get letterSpacing(){return this.styles.letterSpacing}get lineHeight(){return this.styles.lineHeight}get textAlign(){return this.styles.textAlign}get textTransform(){return this.styles.textTransform}get textOverflow(){return this.styles.textOverflow}get textShadow(){return this.styles.textShadow}get textDecorationColor(){return this.styles.textDecorationColor}get textDecorationLine(){return this.styles.textDecorationLine}get textDecorationStyle(){return this.styles.textDecorationStyle}get textDecorationThickness(){return this.styles.textDecorationThickness}get textUnderlineOffset(){return this.styles.textUnderlineOffset}get wordBreak(){return this.styles.wordBreak}get lineBreak(){return this.styles.lineBreak}get overflowWrap(){return this.styles.overflowWrap}get writingMode(){return this.styles.writingMode}get direction(){return this.styles.direction}get webkitTextStrokeColor(){return this.styles.webkitTextStrokeColor}get webkitTextStrokeWidth(){return this.styles.webkitTextStrokeWidth}get webkitLineClamp(){return this.styles.webkitLineClamp}get paintOrder(){return this.styles.paintOrder}},Tl=class{styles;constructor(e){this.styles=e}get display(){return this.styles.display}get position(){return this.styles.position}get float(){return this.styles.float}get zIndex(){return this.styles.zIndex}get marginTop(){return this.styles.marginTop}get marginRight(){return this.styles.marginRight}get marginBottom(){return this.styles.marginBottom}get marginLeft(){return this.styles.marginLeft}get paddingTop(){return this.styles.paddingTop}get paddingRight(){return this.styles.paddingRight}get paddingBottom(){return this.styles.paddingBottom}get paddingLeft(){return this.styles.paddingLeft}get overflowX(){return this.styles.overflowX}get overflowY(){return this.styles.overflowY}get opacity(){return this.styles.opacity}get visibility(){return this.styles.visibility}get transform(){return this.styles.transform}get transformOrigin(){return this.styles.transformOrigin}get rotate(){return this.styles.rotate}get zoom(){return this.styles.zoom}get clipPath(){return this.styles.clipPath}get mixBlendMode(){return this.styles.mixBlendMode}get filter(){return this.styles.filter}get imageRendering(){return this.styles.imageRendering}get objectFit(){return this.styles.objectFit}get objectPosition(){return this.styles.objectPosition}get boxDecorationBreak(){return this.styles.boxDecorationBreak}get listStyleImage(){return this.styles.listStyleImage}get listStylePosition(){return this.styles.listStylePosition}get listStyleType(){return this.styles.listStyleType}get animationDuration(){return this.styles.animationDuration}isVisible(){return this.styles.isVisible()}isTransparent(){return this.styles.isTransparent()}isTransformed(){return this.styles.isTransformed()}isPositioned(){return this.styles.isPositioned()}isPositionedWithZIndex(){return this.styles.isPositionedWithZIndex()}isFloating(){return this.styles.isFloating()}isInlineLevel(){return this.styles.isInlineLevel()}},Bl=class{animationDuration;backgroundClip;backgroundColor;backgroundImage;backgroundOrigin;backgroundPosition;backgroundRepeat;backgroundSize;borderTopColor;borderRightColor;borderBottomColor;borderLeftColor;borderTopLeftRadius;borderTopRightRadius;borderBottomRightRadius;borderBottomLeftRadius;borderTopStyle;borderRightStyle;borderBottomStyle;borderLeftStyle;borderTopWidth;borderRightWidth;borderBottomWidth;borderLeftWidth;boxShadow;clipPath;color;direction;display;float;fontFamily;fontSize;fontStyle;fontVariant;fontWeight;letterSpacing;lineBreak;lineHeight;listStyleImage;listStylePosition;listStyleType;marginTop;marginRight;marginBottom;marginLeft;opacity;overflowX;overflowY;overflowWrap;paddingTop;paddingRight;paddingBottom;paddingLeft;paintOrder;position;textAlign;textDecorationColor;textDecorationLine;textDecorationStyle;textDecorationThickness;textUnderlineOffset;textShadow;textTransform;textOverflow;transform;transformOrigin;rotate;translate;scale;visibility;webkitTextStrokeColor;webkitTextStrokeWidth;webkitLineClamp;wordBreak;whiteSpace;writingMode;zIndex;objectFit;imageRendering;mixBlendMode;filter;fontVariantLigatures;zoom;objectPosition;backgroundBlendMode;borderImageSource;borderImageSlice;borderImageRepeat;boxDecorationBreak;accentColor;webkitTextFillColor;isolation;outlineColor;outlineStyle;outlineWidth;outlineOffset;backdropFilter;maskImage;maskPosition;maskRepeat;maskSize;textEmphasisStyle;textEmphasisColor;textEmphasisPosition;borderImageWidth;borderImageOutset;webkitBoxReflect;_border;_background;_font;_layout;get border(){return this._border??(this._border=new El(this))}get background(){return this._background??(this._background=new Ml(this))}get font(){return this._font??(this._font=new Al(this))}get layout(){return this._layout??(this._layout=new Tl(this))}constructor(e,t){if("none"!==t.display){for(let[i,r,s]of kl)this[i]=Sl(e,r,t[s]);Object.assign(this,Rl(e,t))}else{this.display=0;for(let[t,i]of kl)"display"!==t&&(this[t]=Sl(e,i,void 0));Object.assign(this,Rl(e,null))}}isVisible(){return this.display>0&&this.opacity>0&&0===this.visibility}isTransparent(){return zi(this.backgroundColor)}isTransformed(){return null!==this.transform||null!==this.rotate||null!==this.translate||null!==this.scale}isPositioned(){return 0!==this.position}isPositionedWithZIndex(){return this.isPositioned()&&!this.zIndex.auto}isFloating(){return 0!==this.float}isInlineLevel(){return Qs(this.display,4)||Qs(this.display,33554432)||Qs(this.display,268435456)||Qs(this.display,536870912)||Qs(this.display,67108864)||Qs(this.display,134217728)}},Rl=(e,t)=>{let i=(e,i)=>{if(t)return t[e]??i},r=Sl(e,yn,i("overflow"));return{float:Sl(e,bn,i("cssFloat")),textDecorationColor:Sl(e,xn,i("textDecorationColor",i("color"))),textDecorationLine:Sl(e,vn,i("textDecorationLine",i("textDecoration"))),overflowX:r[0],overflowY:r[r.length>1?1:0]}},Ll=class{content;quotes;constructor(e,t){this.content=Sl(e,wn,t.content),this.quotes=Sl(e,kn,t.quotes)}},Pl=class{counterIncrement;counterReset;constructor(e,t){this.counterIncrement=Sl(e,En,t.counterIncrement),this.counterReset=Sl(e,Mn,t.counterReset)}},Il=e=>{if("function"!=typeof e.getAttribute)return 0;switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Nl=(e,t)=>{let i=Il(e);return 1===i||t===i},Dl=e=>{let t="";for(let i of e)try{let e=i.cssRules;for(let i=0;i<e.length;i++){let r=e[i];r&&"string"==typeof r.cssText&&(t+=r.cssText)}}catch{}return t},Ol=(e,t,i)=>{let r=Dl(t);if(!r)return null;let s=e.createElement("style");return s.textContent=r,i&&(s.nonce=i),s},Fl=class{cloneNodeFn;options;context;constructor(e,t,i){this.cloneNodeFn=e,this.options=t,this.context=i}appendChildNode(e,t,i){this.safeAppendClonedChild(e,t,i)}cloneChildNodes(e,t,i){e.shadowRoot&&t.shadowRoot?(this.cloneShadowDOMChildren(e.shadowRoot,t.shadowRoot,i),this.cloneLightDOMChildren(e,t,i)):e.shadowRoot&&!t.shadowRoot?this.cloneShadowDOMAsLightDOM(e.shadowRoot,t,i):this.cloneLightDOMChildren(e,t,i)}shouldCloneChild(e){return!(Bs(e)&&(Hs(e)||e.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e)))}shouldCloneStyleElement(e){return!this.options.copyStyles||!Bs(e)||!Ws(e)}safeAppendClonedChild(e,t,i){this.shouldCloneChild(t)&&this.shouldCloneStyleElement(t)&&e.appendChild(this.cloneNodeFn(t,i))}cloneAssignedNodes(e,t,i){e.forEach(e=>{this.safeAppendClonedChild(t,e,i)})}cloneSlotFallbackContent(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)this.safeAppendClonedChild(t,r,i)}cloneSlotElement(e,t,i){if(!Us(e))return;let r=e;if("function"!=typeof r.assignedNodes)return this.context.logger.warn("HTMLSlotElement.assignedNodes is not available",e),void this.cloneSlotFallbackContent(e,t,i);let s=r.assignedNodes();if(!s||!Array.isArray(s))return this.context.logger.warn("assignedNodes() did not return a valid array",e),void this.cloneSlotFallbackContent(e,t,i);s.length>0?this.cloneAssignedNodes(s,t,i):this.cloneSlotFallbackContent(e,t,i)}cloneShadowDOMChildren(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)Bs(r)&&Us(r)?this.cloneSlotElement(r,t,i):this.safeAppendClonedChild(t,r,i);this.appendAdoptedStyleSheets(e,t,i)}cloneLightDOMChildren(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i)}cloneSlotElementAsLightDOM(e,t,i){if(!Us(e))return;let r=e;if("function"!=typeof r.assignedNodes){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i);return}let s=r.assignedNodes();if(s&&Array.isArray(s)&&s.length>0)s.forEach(e=>this.appendChildNode(t,e,i));else for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i)}cloneShadowDOMAsLightDOM(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)Bs(r)&&Us(r)?this.cloneSlotElementAsLightDOM(r,t,i):this.appendChildNode(t,r,i);this.appendAdoptedStyleSheets(e,t,i)}appendAdoptedStyleSheets(e,t,i){if(i)return;let r=e.adoptedStyleSheets;if(!r||0===r.length)return;let s="host"in t?t.host.ownerDocument:t.ownerDocument;if(!s)return;let n=Ol(s,r,this.options.cspNonce);n&&t.appendChild(n)}},$l=["all","d","content"],zl=(e,t)=>{let i=[];for(let t=e.length-1;t>=0;t--){let r=e.item(t);if(-1===$l.indexOf(r)&&!r.startsWith("--")){let t=e.getPropertyValue(r);if(t){let s=e.getPropertyPriority(r);i.push(s?`${r}:${t} !${s}`:`${r}:${t}`)}}}return i.length>0&&(t.style.cssText=i.join(";")+";"),t},_l="___html2canvas___pseudoelement_before",Wl="___html2canvas___pseudoelement_after",Hl='{\n content: "" !important;\n display: none !important;\n}',Vl=(e,t)=>{jl(e,`.${_l}:before${Hl}\n .${Wl}:after${Hl}`,t)},jl=(e,t,i)=>{let r=e.ownerDocument;if(r){let s=r.createElement("style");s.textContent=t,i&&(s.nonce=i),e.appendChild(s)}},Ul=class{context;counters;quoteDepth=0;constructor(e,t){this.context=e,this.counters=t}resolvePseudoContent(e,t,i,r){if(!i)return;let s=i.content,n=t.ownerDocument;if(!n||!s||"none"===s||"-moz-alt-content"===s||"none"===i.display)return;this.counters.parse(new Pl(this.context,i));let o=new Ll(this.context,i),a=n.createElement("html2canvaspseudoelement");zl(i,a),o.content.forEach(t=>{if(0===t.type)a.appendChild(n.createTextNode(t.value));else if(22===t.type){let e=n.createElement("img");e.src=t.value,e.style.opacity="1",a.appendChild(e)}else if(18===t.type){if("attr"===t.name){let i=t.values.filter(ri);i.length&&i[0]&&a.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){let[e,i]=t.values.filter(ai);if(e&&ri(e)){let t=this.counters.getCounterValue(e.value),r=i&&ri(i)?Js.parse(this.context,i.value):3;a.appendChild(n.createTextNode(fn(t,r,!1)))}}else if("counters"===t.name){let[e,i,r]=t.values.filter(ai);if(e&&ri(e)){let t=this.counters.getCounterValues(e.value),s=r&&ri(r)?Js.parse(this.context,r.value):3,o=i&&0===i.type?i.value:"",l=t.map(e=>fn(e,s,!1)).join(o);a.appendChild(n.createTextNode(l))}}}else if(20===t.type)switch(t.value){case"open-quote":a.appendChild(n.createTextNode(Cn(o.quotes,this.quoteDepth++,!0)));break;case"close-quote":{let e=this.quoteDepth>0;this.quoteDepth=Math.max(0,this.quoteDepth-1),e&&a.appendChild(n.createTextNode(Cn(o.quotes,this.quoteDepth,!1)));break}default:a.appendChild(n.createTextNode(t.value))}}),a.className=`${_l} ${Wl}`;let l=0===r?` ${_l}`:` ${Wl}`;return Ls(t)?t.className.baseValue+=l:t.className+=l,a}},Yl=e=>{if(e?.aborted)throw new DOMException("The operation was aborted.","AbortError")},ql=new WeakMap,Gl=e=>{let t=e&&e.trustedTypes;if(!t)return null;if(ql.has(t))return ql.get(t)??null;let i=null;try{i=t.getPolicy?.("html2canvas-pro")??t.createPolicy("html2canvas-pro",{createHTML:e=>e})}catch{i=null}return ql.set(t,i),i},Kl=(e,t,i)=>{let r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling="no",r.setAttribute("data-html2canvas-ignore","true"),(i||e.body).appendChild(r),r},Xl=e=>new Promise(t=>{e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}),Jl=e=>Promise.all([].slice.call(e.images,0).map(Xl)),Ql=(e,t,i)=>new Promise((r,s)=>{let n=e.contentWindow;if(!n)return s("No window assigned for iframe");let o,a=n.document,l=setTimeout(()=>{o&&clearInterval(o),s(new Error("Cloned iframe did not fire its load event within 60000ms"))},6e4),d=()=>{o&&clearInterval(o),clearTimeout(l),s(new DOMException("The operation was aborted.","AbortError"))};n.onload=e.onload=()=>{n.onload=e.onload=null;let s=Math.ceil(600),c=0;o=setInterval(()=>{c++,i?.aborted?d():a.body.childNodes.length>0&&"complete"===a.readyState?(clearInterval(o),o=void 0,clearTimeout(l),r(e)):c>=s&&(clearInterval(o),o=void 0,t?.warn("Cloned iframe did not become ready within 30 seconds; continuing with a possibly incomplete document"),r(e))},50)},i&&(i.aborted?d():i.addEventListener("abort",d,{once:!0}))}),Zl=e=>{let t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=" "+e.internalSubset.replace(/"/g,""").replace(/>/g,">")),e.publicId?(t+=' PUBLIC "'+e.publicId.replace(/"/g,""")+'"',e.systemId&&(t+=' "'+e.systemId.replace(/"/g,""")+'"')):e.systemId&&(t+=' SYSTEM "'+e.systemId.replace(/"/g,""")+'"'),t+=">"),t},ed=(e,t,i)=>{e&&e.defaultView&&(t!==e.defaultView.pageXOffset||i!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,i)},td=([e,t,i])=>{e.scrollLeft=t,e.scrollTop=i},id=(e,t)=>{let i=e.ownerDocument.createElement("base");i.href=t;let r=e.getElementsByTagName("head").item(0);r?.insertBefore(i,r?.firstChild??null)},rd=(e,t,i,r)=>{let s=Kl(t,i,r.container);if(!s.contentWindow)throw new Error("Unable to find iframe window");let n=t.defaultView.pageXOffset,o=t.defaultView.pageYOffset,a=s.contentWindow,l=a.document,d=Ql(s,e.logger,r.signal).then(async()=>{r.scrolledElements.forEach(td),a&&a.scrollTo(i.left,i.top);let t=r.onclone,n=r.clonedReferenceElement;if(typeof n>"u")throw new Error(`Error finding the ${r.referenceElementName} in the cloned document`);return Yl(r.signal),l.fonts&&l.fonts.ready&&await l.fonts.ready,Yl(r.signal),/(AppleWebKit)/g.test(navigator.userAgent)&&(await Jl(l),Yl(r.signal)),"function"==typeof t&&await Promise.resolve().then(()=>t(l,n)),a.scrollTo(i.left,i.top),/AppleWebKit/g.test(navigator.userAgent)&&(a.scrollY!==i.top||a.scrollX!==i.left)&&(e.logger.warn("Unable to restore scroll position for cloned document"),e.adjustWindowBounds(a.scrollX-i.left,a.scrollY-i.top)),s}),c=t.baseURI;l.open();let p=Zl(t.doctype)+"<html></html>";try{let e=Gl(t.defaultView),i=e?e.createHTML(p):p;l.write(i)}catch{l.write(p)}ed(t,n,o),l.close();let h=l.adoptNode(r.documentElement);return id(h,c),l.replaceChild(h,l.documentElement),d},sd=e=>{let t=e;for(;t;){if(t.parentNode&&t.parentNode.host)return t.parentNode;let e=t.getRootNode();if(e&&e!==t.ownerDocument&&e.host)return e;t=t.parentNode}return null},nd=class{context;options;scrolledElements;referenceElement;clonedReferenceElement;documentElement;counters;pseudoContents;slotCloner;constructor(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new Zs,this.pseudoContents=new Ul(e,this.counters),this.slotCloner=new Fl((e,t)=>this.cloneNode(e,t),{ignoreElements:i.ignoreElements,copyStyles:i.copyStyles??!0,cspNonce:i.cspNonce},e),!t.ownerDocument)throw new Error("Cloned element does not have an owner document");if(!this.options.iframeContainer){let e=sd(t);e&&(this.options.iframeContainer=e)}this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1),this.appendDocumentAdoptedStyles(t.ownerDocument)}appendDocumentAdoptedStyles(e){if(this.options.copyStyles)return;let t=e.adoptedStyleSheets;if(!t||0===t.length)return;let i=this.documentElement.getElementsByTagName("head").item(0);if(!i)return;let r=Ol(this.documentElement.ownerDocument??e,t,this.options.cspNonce);r&&i.appendChild(r)}toIFrame(e,t){return rd(this.context,e,t,{documentElement:this.documentElement,clonedReferenceElement:this.clonedReferenceElement,referenceElementName:this.referenceElement.nodeName,scrolledElements:this.scrolledElements,onclone:this.options.onclone,container:this.options.iframeContainer,signal:this.options.signal})}createElementClone(e){if(Nl(e,2),Fs(e))return this.createCanvasClone(e);if($s(e))return this.createVideoClone(e);if(Ws(e))return this.createStyleClone(e);let t=e.cloneNode(!1);return zs(t)&&(zs(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Gs(t)&&!Ls(t)?this.createCustomElementClone(e,t):t}createCustomElementClone(e,t){let i=document.createElement("div");i.className=t.className,zl(t.style,i);let r=t.attributes;for(let e=0;e<r.length;e++){let t=r.item(e);t&&"class"!==t.name&&"style"!==t.name&&i.setAttribute(t.name,t.value)}if(e.shadowRoot)try{i.attachShadow({mode:"open"})}catch(e){this.context.logger.error("Failed to attach shadow root to custom element clone:",e)}return i}createStyleClone(e){try{let t=e.sheet;if(t&&t.cssRules){let i=[].slice.call(t.cssRules,0).reduce((e,t)=>t&&"string"==typeof t.cssText?e+t.cssText:e,""),r=e.cloneNode(!1);return r.textContent=i,this.options.cspNonce&&(r.nonce=this.options.cspNonce),r}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}let t=e.cloneNode(!1);return this.options.cspNonce&&(t.nonce=this.options.cspNonce),t}createCanvasClone(e){if(this.options.inlineImages&&e.ownerDocument){let t=e.ownerDocument.createElement("img");try{return t.src=e.toDataURL(),t}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}let t=e.cloneNode(!1);try{t.width=e.width,t.height=e.height;let i=e.getContext("2d"),r=t.getContext("2d",{willReadFrequently:!0});if(r)if(!this.options.allowTaint&&i)r.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{let t=e.getContext("webgl2")??e.getContext("webgl");t&&!1===t.getContextAttributes()?.preserveDrawingBuffer&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e),r.drawImage(e,0,0)}return t}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return t}createVideoClone(e){let t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;let i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}let r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r}appendChildNode(e,t,i){this.slotCloner.appendChildNode(e,t,i)}cloneChildNodes(e,t,i){this.slotCloner.cloneChildNodes(e,t,i)}cloneNode(e,t){if(Rs(e))return(e.ownerDocument??document).createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);let i=e.ownerDocument.defaultView;if(i&&Bs(e)&&(Ps(e)||Ls(e))){let r=this.createElementClone(e);r.style.transitionProperty="none";let s=i.getComputedStyle(e),n=Xs(e);this.referenceElement===e&&Ps(r)&&(this.clonedReferenceElement=r),Os(r)&&Vl(r,this.options.cspNonce);let o=this.counters.parse(new Pl(this.context,s));if(n){let t=i.getComputedStyle(e,":before"),s=this.pseudoContents.resolvePseudoContent(e,r,t,0);s&&r.insertBefore(s,r.firstChild)}if(Gs(e)&&(t=!0),$s(e)||this.cloneChildNodes(e,r,t),n){let t=i.getComputedStyle(e,":after"),s=this.pseudoContents.resolvePseudoContent(e,r,t,1);s&&r.appendChild(s)}return this.counters.pop(o),(s&&(this.options.copyStyles||Ls(e))&&!_s(e)||t)&&zl(s,r),(0!==e.scrollTop||0!==e.scrollLeft)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Vs(e)||js(e))&&(Vs(r)||js(r))&&(r.value=e.value),r}return e.cloneNode(!1)}static destroy(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)}},od=class{static normalizeElement(e,t){let i={};if(!Ps(e)&&!Ls(e))return i;t.animationDuration.some(e=>e>0)&&(i.animationDuration=e.style.animationDuration,e.style.animationDuration="0s"),null!==t.transform&&(i.transform=e.style.transform,e.style.transform="translate(0, 0)");let r=!1;return null!==t.rotate&&(i.rotate=e.style.rotate,e.style.rotate="0deg",r=!0),null!==t.translate&&(i.translate=e.style.translate,e.style.translate="0px",r=!0),null!==t.scale&&(i.scale=e.style.scale,e.style.scale="1",r=!0),r&&void 0===i.transform&&(i.transform=e.style.transform,e.style.transform="translate(0, 0)"),i}static restoreElement(e,t){!Ps(e)&&!Ls(e)||(void 0!==t.animationDuration&&(e.style.animationDuration=t.animationDuration),void 0!==t.transform&&(e.style.transform=t.transform),void 0!==t.rotate&&(e.style.rotate=t.rotate),void 0!==t.translate&&(e.style.translate=t.translate),void 0!==t.scale&&(e.style.scale=t.scale))}},ad=class{context;styles;textNodes=[];elements=[];bounds;legendBounds;createsStackingContext=!1;createsRealStackingContext=!1;isListOwner=!1;debugRender=!1;originalStyles;originalElement;constructor(e,t,i={}){if(this.context=e,Nl(t,3),this.styles=new Bl(e,e.config.window.getComputedStyle(t,null)),!1!==i.normalizeDom&&(Ps(t)||Ls(t))&&(this.originalStyles=od.normalizeElement(t,this.styles),this.originalElement=t),this.bounds=ft(this.context,t),"FIELDSET"===t.tagName){let e=t.querySelector(":scope > legend");if(e){let t=ft(this.context,e);this.legendBounds=t;let i=t.top+t.height/2-this.styles.borderTopWidth/2;this.bounds=new ut(this.bounds.left,i,this.bounds.width,this.bounds.height-(i-this.bounds.top))}}Nl(t,4)&&(this.debugRender=!0)}restore(){this.originalStyles&&this.originalElement&&(od.restoreElement(this.originalElement,this.originalStyles),this.originalStyles=void 0,this.originalElement=void 0)}restoreTree(){this.restore();for(let e of this.elements)e.restoreTree()}},ld=e=>{if(e.createRange){let t=e.createRange();if(t.getBoundingClientRect){let i=e.createElement("boundtest");i.style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i);let r=t.getBoundingClientRect(),s=Math.round(r.height);if(e.body.removeChild(i),123===s)return!0}}return!1},dd=()=>typeof(new Image).crossOrigin<"u",cd=e=>{let t=new Image,i=e.createElement("canvas"),r=i.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),i.toDataURL()}catch{return!1}return!0},pd=(e,t,i,r,s)=>{let n="http://www.w3.org/2000/svg",o=document.createElementNS(n,"svg"),a=document.createElementNS(n,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",i.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(s),o},hd=e=>new Promise((t,i)=>{let r=new Image;r.onload=()=>t(r),r.onerror=i,r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent((new XMLSerializer).serializeToString(e))}`}),ud={get SUPPORT_RANGE_BOUNDS(){let e=ld(document);return Object.defineProperty(ud,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){let e=cd(document);return Object.defineProperty(ud,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){let e=dd();return Object.defineProperty(ud,"SUPPORT_CORS_IMAGES",{value:e}),e}},fd=class{text;bounds;constructor(e,t){this.text=e,this.bounds=t}},gd=(e,t,i,r)=>{let s=kd(t,i),n=[],o=0;return s.forEach(t=>{if(i.textDecorationLine.length||t.trim().length>0)if(ud.SUPPORT_RANGE_BOUNDS){let i=bd(r,o,t.length).getClientRects();if(i.length>1){let i=vd(t),s=0;i.forEach(t=>{n.push(new fd(t,ut.fromDOMRectList(e,bd(r,s+o,t.length).getClientRects()))),s+=t.length})}else n.push(new fd(t,ut.fromDOMRectList(e,i)))}else{let i=r.splitText(t.length);n.push(new fd(t,md(e,r))),r=i}else ud.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length}),n},md=(e,t)=>{let i=t.ownerDocument;if(i){let r=i.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));let s=t.parentNode;if(s){s.replaceChild(r,t);let i=ft(e,r);return r.firstChild&&s.replaceChild(r.firstChild,r),i}}return ut.EMPTY},bd=(e,t,i)=>{let r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");let s=r.createRange();return s.setStart(e,t),s.setEnd(e,t+i),s},yd=new Map,xd=e=>{let t=yd.get(e);return t||(t=new Intl.Segmenter(void 0,{granularity:e}),yd.set(e,t)),t},vd=e=>Array.from(xd("grapheme").segment(e),e=>e.segment),wd=e=>Array.from(xd("word").segment(e),e=>e.segment),kd=(e,t)=>Aa(t.writingMode)||0!==t.letterSpacing?vd(e):wd(e),Cd=class{text;textBounds;constructor(e,t,i){this.text=Sd(t.data,i.textTransform),this.text.length!==t.data.length&&(t.data=this.text),this.textBounds=gd(e,this.text,i,t)}},Sd=(e,t)=>{switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Ed,Md);case 2:return e.toUpperCase();default:return e}},Ed=/(^|\s|:|-|\(|\))([a-z])/g,Md=(e,t,i)=>e.length>0?t+i.toUpperCase():e,Ad=class extends ad{src;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i),this.src=t.currentSrc||t.src,this.intrinsicWidth=t.naturalWidth,this.intrinsicHeight=t.naturalHeight,this.context.cache.addImage(this.src)}},Td=class extends ad{canvas;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i),this.canvas=t,this.intrinsicWidth=t.width,this.intrinsicHeight=t.height}},Bd=["position","inset","top","right","bottom","left","inset-inline","inset-inline-start","inset-inline-end","inset-block","inset-block-start","inset-block-end","margin","margin-top","margin-right","margin-bottom","margin-left","margin-inline","margin-inline-start","margin-inline-end","margin-block","margin-block-start","margin-block-end"],Rd=(e,t)=>{let i=t.getAttribute("style");Bd.forEach(e=>t.style.removeProperty(e));let r=e.serializeToString(t);return null===i?t.removeAttribute("style"):t.setAttribute("style",i),r},Ld=class extends ad{svg;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i);let r=new XMLSerializer,s=ft(e,t);t.setAttribute("width",`${s.width}px`),t.setAttribute("height",`${s.height}px`),this.svg=`data:image/svg+xml,${encodeURIComponent(Rd(r,t))}`,this.intrinsicWidth=t.width.baseVal.value,this.intrinsicHeight=t.height.baseVal.value,this.context.cache.addImage(this.svg)}},Pd=class extends ad{value;constructor(e,t,i={}){super(e,t,i),this.value=t.value}},Id=class extends ad{start;reversed;constructor(e,t,i={}){super(e,t,i),this.start=t.start,this.reversed="boolean"==typeof t.reversed&&!0===t.reversed}},Nd=[{type:15,flags:0,unit:"px",number:3}],Dd=[{type:16,flags:0,number:50}],Od=e=>e.width>e.height?new ut(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new ut(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e,Fd=e=>{let t="password"===e.type?new Array(e.value.length+1).join("\u2022"):e.value;return 0===t.length?e.placeholder||"":t},$d=e=>0===e.value.length&&!!e.placeholder,zd=class extends ad{type;checked;value;isPlaceholder;constructor(e,t,i={}){switch(super(e,t,i),this.type=t.type.toLowerCase(),this.checked=t.checked,this.value=Fd(t),this.isPlaceholder=$d(t),("checkbox"===this.type||"radio"===this.type)&&(this.styles.backgroundColor=3739148031,this.styles.borderTopColor=this.styles.borderRightColor=this.styles.borderBottomColor=this.styles.borderLeftColor=2779096575,this.styles.borderTopWidth=this.styles.borderRightWidth=this.styles.borderBottomWidth=this.styles.borderLeftWidth=1,this.styles.borderTopStyle=this.styles.borderRightStyle=this.styles.borderBottomStyle=this.styles.borderLeftStyle=1,this.styles.backgroundClip=[0],this.styles.backgroundOrigin=[0],this.bounds=Od(this.bounds)),this.type){case"checkbox":this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Nd;break;case"radio":this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Dd}}},_d=class extends ad{value;constructor(e,t,i={}){super(e,t,i);let r=t.options[t.selectedIndex||0];this.value=r&&r.text||""}},Wd=class extends ad{value;constructor(e,t,i={}){super(e,t,i),this.value=t.value}},Hd=class extends ad{src;width;height;tree;backgroundColor;parseTreeFn;constructor(e,t,i,r={}){super(e,t,r),this.src=t.src,this.width=parseInt(t.width,10)||0,this.height=parseInt(t.height,10)||0,this.backgroundColor=this.styles.backgroundColor,this.parseTreeFn=i;try{let i=t.contentWindow,r=i?.document;if(i&&r&&r.documentElement&&this.parseTreeFn){this.tree=this.parseTreeFn(e,r.documentElement);let t=As(e,i.getComputedStyle(r.documentElement).backgroundColor),s=r.body?As(e,i.getComputedStyle(r.body).backgroundColor):0;this.backgroundColor=zi(t)?zi(s)?this.styles.backgroundColor:s:t}}catch(e){let t=e instanceof Error?e:new Error(String(e));this.context.logger.warn(`Unable to render iframe content${this.src?` from ${this.src}`:""}: ${t.message}`),this.context.onError?.(t)}}},Vd=["OL","UL","MENU"],jd=(e,t,i,r,s=1,n={})=>{for(let o,a=t.firstChild;a;a=o)o=a.nextSibling,Ud(e,a,i,r,s,n)},Ud=(e,t,i,r,s=1,n={})=>{if(Rs(t)&&t.data.length>0){let r=new Cd(e,t,i.styles);if(1!==s){let e=i.bounds.left,t=i.bounds.top;r.textBounds=r.textBounds.map(i=>new fd(i.text,new ut(e+(i.bounds.left-e)/s,t+(i.bounds.top-t)/s,i.bounds.width/s,i.bounds.height/s)))}i.textNodes.push(r)}else if(Bs(t))if(Us(t)&&t.assignedNodes)t.assignedNodes().forEach(t=>Ud(e,t,i,r,s,n));else{let o=Yd(e,t,n),a=o.styles.zoom||1;if(1!==a&&(o.bounds=new ut(o.bounds.left,o.bounds.top,o.bounds.width/a,o.bounds.height/a)),o.styles.isVisible()){Gd(t,o,r)?o.createsRealStackingContext=!0:Kd(o.styles)&&(o.createsStackingContext=!0),-1!==Vd.indexOf(t.tagName)&&(o.isListOwner=!0),i.elements.push(o);let a=s*(o.styles.zoom||1);t.shadowRoot?jd(e,t.shadowRoot,o,r,a,n):!Vs(t)&&!Ds(t)&&!js(t)&&jd(e,t,o,r,a,n)}}},Yd=(e,t,i={})=>zs(t)?new Ad(e,t,i):Fs(t)?new Td(e,t,i):Ds(t)?new Ld(e,t,i):Ys(t)?new Pd(e,t,i):qs(t)?new Id(e,t,i):Is(t)?new zd(e,t,i):js(t)?new _d(e,t,i):Vs(t)?new Wd(e,t,i):_s(t)?new Hd(e,t,(e,t)=>qd(e,t,i),i):new ad(e,t,i),qd=(e,t,i={})=>{let r=Yd(e,t,i);return r.createsRealStackingContext=!0,jd(e,t,r,r,1,i),r},Gd=(e,t,i)=>t.styles.isPositionedWithZIndex()||t.styles.opacity<1||!!t.styles.filter||!!t.styles.backdropFilter||t.styles.maskImage.length>0||!!t.styles.webkitBoxReflect||1===t.styles.isolation||t.styles.isTransformed()||Os(e)&&i.styles.isTransparent(),Kd=e=>!(!e.isPositioned()&&!e.isFloating()&&e.mixBlendMode===Ka.NORMAL)||Qs(e.display,268435456)||Qs(e.display,33554432)||Qs(e.display,536870912)||Qs(e.display,134217728),Xd=(e,t)=>e.length===t.length&&e.some((e,i)=>e===t[i]),Jd=(e,t,i,r,s)=>e.map((e,n)=>{switch(n){case 0:return e.add(t,i);case 1:return e.add(t+r,i);case 2:return e.add(t+r,i+s);case 3:return e.add(t,i+s)}return e}),Qd=class e{type;x;y;constructor(e,t){this.type=0,this.x=e,this.y=t}add(t,i){return new e(this.x+t,this.y+i)}},Zd=(e,t,i)=>new Qd(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i),ec=class e{type;start;startControl;endControl;end;constructor(e,t,i,r){this.type=1,this.start=e,this.startControl=t,this.endControl=i,this.end=r}subdivide(t,i){let r=Zd(this.start,this.startControl,t),s=Zd(this.startControl,this.endControl,t),n=Zd(this.endControl,this.end,t),o=Zd(r,s,t),a=Zd(s,n,t),l=Zd(o,a,t);return i?new e(this.start,r,o,l):new e(l,a,n,this.end)}add(t,i){return new e(this.start.add(t,i),this.startControl.add(t,i),this.endControl.add(t,i),this.end.add(t,i))}reverse(){return new e(this.end,this.endControl,this.startControl,this.start)}},tc=e=>1===e.type,ic=class{topLeftBorderDoubleOuterBox;topRightBorderDoubleOuterBox;bottomRightBorderDoubleOuterBox;bottomLeftBorderDoubleOuterBox;topLeftBorderDoubleInnerBox;topRightBorderDoubleInnerBox;bottomRightBorderDoubleInnerBox;bottomLeftBorderDoubleInnerBox;topLeftBorderStroke;topRightBorderStroke;bottomRightBorderStroke;bottomLeftBorderStroke;topLeftBorderBox;topRightBorderBox;bottomRightBorderBox;bottomLeftBorderBox;topLeftPaddingBox;topRightPaddingBox;bottomRightPaddingBox;bottomLeftPaddingBox;topLeftContentBox;topRightContentBox;bottomRightContentBox;bottomLeftContentBox;constructor(e){let t=e.styles,i=e.bounds,[r,s]=Li(t.borderTopLeftRadius,i.width,i.height),[n,o]=Li(t.borderTopRightRadius,i.width,i.height),[a,l]=Li(t.borderBottomRightRadius,i.width,i.height),[d,c]=Li(t.borderBottomLeftRadius,i.width,i.height),p=[];p.push((r+n)/i.width),p.push((d+a)/i.width),p.push((s+c)/i.height),p.push((o+l)/i.height);let h=Math.max(...p);h>1&&(r/=h,s/=h,n/=h,o/=h,a/=h,l/=h,d/=h,c/=h);let u=i.width-n,f=i.height-l,g=i.width-a,m=i.height-c,b=t.borderTopWidth,y=t.borderRightWidth,x=t.borderBottomWidth,v=t.borderLeftWidth,w=Pi(t.paddingTop,e.bounds.width),k=Pi(t.paddingRight,e.bounds.width),C=Pi(t.paddingBottom,e.bounds.width),S=Pi(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||s>0?rc(i.left+v/3,i.top+b/3,r-v/3,s-b/3,0):new Qd(i.left+v/3,i.top+b/3),this.topRightBorderDoubleOuterBox=n>0||o>0?rc(i.left+u,i.top+b/3,n-y/3,o-b/3,1):new Qd(i.left+i.width-y/3,i.top+b/3),this.bottomRightBorderDoubleOuterBox=a>0||l>0?rc(i.left+g,i.top+f,a-y/3,l-x/3,2):new Qd(i.left+i.width-y/3,i.top+i.height-x/3),this.bottomLeftBorderDoubleOuterBox=d>0||c>0?rc(i.left+v/3,i.top+m,d-v/3,c-x/3,3):new Qd(i.left+v/3,i.top+i.height-x/3),this.topLeftBorderDoubleInnerBox=r>0||s>0?rc(i.left+2*v/3,i.top+2*b/3,r-2*v/3,s-2*b/3,0):new Qd(i.left+2*v/3,i.top+2*b/3),this.topRightBorderDoubleInnerBox=n>0||o>0?rc(i.left+u,i.top+2*b/3,n-2*y/3,o-2*b/3,1):new Qd(i.left+i.width-2*y/3,i.top+2*b/3),this.bottomRightBorderDoubleInnerBox=a>0||l>0?rc(i.left+g,i.top+f,a-2*y/3,l-2*x/3,2):new Qd(i.left+i.width-2*y/3,i.top+i.height-2*x/3),this.bottomLeftBorderDoubleInnerBox=d>0||c>0?rc(i.left+2*v/3,i.top+m,d-2*v/3,c-2*x/3,3):new Qd(i.left+2*v/3,i.top+i.height-2*x/3),this.topLeftBorderStroke=r>0||s>0?rc(i.left+v/2,i.top+b/2,r-v/2,s-b/2,0):new Qd(i.left+v/2,i.top+b/2),this.topRightBorderStroke=n>0||o>0?rc(i.left+u,i.top+b/2,n-y/2,o-b/2,1):new Qd(i.left+i.width-y/2,i.top+b/2),this.bottomRightBorderStroke=a>0||l>0?rc(i.left+g,i.top+f,a-y/2,l-x/2,2):new Qd(i.left+i.width-y/2,i.top+i.height-x/2),this.bottomLeftBorderStroke=d>0||c>0?rc(i.left+v/2,i.top+m,d-v/2,c-x/2,3):new Qd(i.left+v/2,i.top+i.height-x/2),this.topLeftBorderBox=r>0||s>0?rc(i.left,i.top,r,s,0):new Qd(i.left,i.top),this.topRightBorderBox=n>0||o>0?rc(i.left+u,i.top,n,o,1):new Qd(i.left+i.width,i.top),this.bottomRightBorderBox=a>0||l>0?rc(i.left+g,i.top+f,a,l,2):new Qd(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=d>0||c>0?rc(i.left,i.top+m,d,c,3):new Qd(i.left,i.top+i.height),this.topLeftPaddingBox=r>0||s>0?rc(i.left+v,i.top+b,Math.max(0,r-v),Math.max(0,s-b),0):new Qd(i.left+v,i.top+b),this.topRightPaddingBox=n>0||o>0?rc(i.left+Math.min(u,i.width-y),i.top+b,u>i.width+y?0:Math.max(0,n-y),Math.max(0,o-b),1):new Qd(i.left+i.width-y,i.top+b),this.bottomRightPaddingBox=a>0||l>0?rc(i.left+Math.min(g,i.width-v),i.top+Math.min(f,i.height-x),Math.max(0,a-y),Math.max(0,l-x),2):new Qd(i.left+i.width-y,i.top+i.height-x),this.bottomLeftPaddingBox=d>0||c>0?rc(i.left+v,i.top+Math.min(m,i.height-x),Math.max(0,d-v),Math.max(0,c-x),3):new Qd(i.left+v,i.top+i.height-x),this.topLeftContentBox=r>0||s>0?rc(i.left+v+S,i.top+b+w,Math.max(0,r-(v+S)),Math.max(0,s-(b+w)),0):new Qd(i.left+v+S,i.top+b+w),this.topRightContentBox=n>0||o>0?rc(i.left+Math.min(u,i.width+v+S),i.top+b+w,u>i.width+v+S?0:n-v+S,o-(b+w),1):new Qd(i.left+i.width-(y+k),i.top+b+w),this.bottomRightContentBox=a>0||l>0?rc(i.left+Math.min(g,i.width-(v+S)),i.top+Math.min(f,i.height+b+w),Math.max(0,a-(y+k)),l-(x+C),2):new Qd(i.left+i.width-(y+k),i.top+i.height-(x+C)),this.bottomLeftContentBox=d>0||c>0?rc(i.left+v+S,i.top+m,Math.max(0,d-(v+S)),c-(x+C),3):new Qd(i.left+v+S,i.top+i.height-(x+C))}},rc=(e,t,i,r,s)=>{let n=(Math.sqrt(2)-1)/3*4,o=i*n,a=r*n,l=e+i,d=t+r;switch(s){case 0:return new ec(new Qd(e,d),new Qd(e,d-a),new Qd(l-o,t),new Qd(l,t));case 1:return new ec(new Qd(e,t),new Qd(e+o,t),new Qd(l,d-a),new Qd(l,d));case 2:return new ec(new Qd(l,t),new Qd(l,t+a),new Qd(e+o,d),new Qd(e,d));default:return new ec(new Qd(l,d),new Qd(l-o,d),new Qd(e,t+a),new Qd(e,t))}},sc=e=>[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox],nc=e=>[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox],oc=e=>[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox],ac=class{offsetX;offsetY;matrix;type=0;target=6;constructor(e,t,i){this.offsetX=e,this.offsetY=t,this.matrix=i}},lc=class{path;target;type=1;constructor(e,t){this.path=e,this.target=t}},dc=class{opacity;type=2;target=6;constructor(e){this.opacity=e}},cc=class{applyClip;type=3;target=6;constructor(e){this.applyClip=e}},pc={[Ka.NORMAL]:"source-over",[Ka.MULTIPLY]:"multiply",[Ka.SCREEN]:"screen",[Ka.OVERLAY]:"overlay",[Ka.DARKEN]:"darken",[Ka.LIGHTEN]:"lighten",[Ka.COLOR_DODGE]:"color-dodge",[Ka.COLOR_BURN]:"color-burn",[Ka.HARD_LIGHT]:"hard-light",[Ka.SOFT_LIGHT]:"soft-light",[Ka.DIFFERENCE]:"difference",[Ka.EXCLUSION]:"exclusion",[Ka.HUE]:"hue",[Ka.SATURATION]:"saturation",[Ka.COLOR]:"color",[Ka.LUMINOSITY]:"luminosity"},hc=class{mixBlendMode;type=4;target=6;compositeOperation;constructor(e){this.mixBlendMode=e,this.compositeOperation=pc[e]}},uc=class e{type=5;target=6;safeFilterString;shadow;constructor(t){let i=e.parseDropShadow(t);this.shadow=i.shadow,this.safeFilterString=i.safeFilterString}static parseDropShadow(t){if(!t)return{safeFilterString:""};let i=e.findDropShadows(t);if(0===i.length)return{safeFilterString:t};let r=e.parseDropShadowBody(mt(i,0).body),s="",n=0;for(let e of i)s+=t.slice(n,e.start),n=e.end;return s+=t.slice(n),{shadow:r,safeFilterString:s.replace(/\s+/g," ").trim()}}static findDropShadows(e){let t,i=[],r=/drop-shadow\(/gi;for(;null!==(t=r.exec(e));){let r=t.index+12-1,s=t.index,n=1,o=r+1;for(;o<e.length&&n>0;){let t=e[o]??"";"("===t?n++:")"===t&&n--,o++}if(0!==n)break;let a=e.slice(r+1,o-1);i.push({body:a,start:s,end:o})}return i}static parseDropShadowBody(t){let i,r=e.tokenizeFilterArgs(t.trim()),s=[];for(let t of r)e.isCSSLength(t)?s.push(parseFloat(t)):t&&(i=t);if(!(s.length<2||s.length>3))return{offsetX:mt(s,0),offsetY:mt(s,1),blur:s.length>2?mt(s,2):0,color:i??"rgba(0,0,0,1)"}}static tokenizeFilterArgs(e){let t=[],i="",r=0;for(let s=0;s<e.length;s++){let n=e[s]??"";"("===n?(r++,i+=n):")"===n?(r--,i+=n):/\s/.test(n)?r>0?i+=n:i&&(t.push(i),i=""):i+=n}return i&&t.push(i),t}static isCSSLength(e){return/^-?[\d.]+(px|em|rem|pt|cm|mm|in|pc|ex|ch|vw|vh|vmin|vmax|%)?$/i.test(e)}},fc=e=>0===e.type,gc=e=>1===e.type,mc=e=>2===e.type,bc=e=>3===e.type,yc=e=>4===e.type,xc=e=>5===e.type,vc=class{element;negativeZIndex;zeroOrAutoZIndexOrTransformedOrOpacity;positiveZIndex;nonPositionedFloats;nonPositionedInlineLevel;inlineLevel;nonInlineLevel;constructor(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}},wc=class{container;parent;effects=[];curves;listValue;plainEffectsCache=null;constructor(e,t){if(this.container=e,this.parent=t,this.curves=new ic(this.container),this.container.styles.opacity<1&&this.effects.push(new dc(this.container.styles.opacity)),null!==this.container.styles.translate){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Pi(e[0],this.container.bounds.width),i=this.container.bounds.top+Pi(e[1],this.container.bounds.height),[r,s]=this.container.styles.translate,n=Pi(r,this.container.bounds.width),o=Pi(s,this.container.bounds.height);this.effects.push(new ac(t,i,[1,0,0,1,n,o]))}if(null!==this.container.styles.rotate){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Pi(e[0],this.container.bounds.width),i=this.container.bounds.top+Pi(e[1],this.container.bounds.height),r=this.container.styles.rotate*Math.PI/180,s=Math.cos(r),n=Math.sin(r),o=[s,n,-n,s,0,0];this.effects.push(new ac(t,i,o))}if(null!==this.container.styles.scale){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Pi(e[0],this.container.bounds.width),i=this.container.bounds.top+Pi(e[1],this.container.bounds.height),[r,s]=this.container.styles.scale;this.effects.push(new ac(t,i,[r,0,0,s,0,0]))}if(null!==this.container.styles.transform){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Pi(e[0],this.container.bounds.width),i=this.container.bounds.top+Pi(e[1],this.container.bounds.height),r=this.container.styles.transform;this.effects.push(new ac(t,i,r))}if(kc(this.container.styles)){let e=sc(this.curves),t=oc(this.curves);Xd(e,t)?this.effects.push(new lc(e,6)):(this.effects.push(new lc(e,2)),this.effects.push(new lc(t,4)))}if(0!==this.container.styles.clipPath.type){let e=Sc(this.container.styles.clipPath,this.container.bounds);e&&this.effects.push(e)}if(this.container.styles.mixBlendMode!==Ka.NORMAL&&this.effects.push(new hc(this.container.styles.mixBlendMode)),null!==this.container.styles.filter&&this.effects.push(new uc(this.container.styles.filter)),1!==this.container.styles.zoom){let e=this.container.bounds.left,t=this.container.bounds.top,i=this.container.styles.zoom,r=[i,0,0,i,0,0];this.effects.push(new ac(e,t,r))}}getEffects(e,t){if(!t){let t=this.plainEffectsCache;t||(t=new Map,this.plainEffectsCache=t);let i=t.get(e);return i||(i=this.computeEffects(e),t.set(e,i)),i}return this.computeEffects(e,t)}computeEffects(e,t){let i=-1===[2,3].indexOf(this.container.styles.position),r=this===t?null:this.parent,s=e=>e.effects.filter(i=>e!==t||!xc(i)&&!mc(i)&&!yc(i)),n=s(this);for(;r;){let e=s(r).filter(e=>!gc(e));if(i||0!==r.container.styles.position||!r.parent){if(i=-1===[2,3].indexOf(r.container.styles.position),kc(r.container.styles)){let e=sc(r.curves),t=oc(r.curves);Xd(e,t)||n.unshift(new lc(t,6))}n.unshift(...e)}else n.unshift(...e);r=r===t?null:r.parent}return n.filter(t=>Qs(t.target,e))}},kc=e=>0!==e.overflowX||0!==e.overflowY,Cc=(e,t,i,r,s)=>"closest-side"===e?Math.min(t-i,r-t):"farthest-side"===e?Math.max(t-i,r-t):Pi(e,s),Sc=(e,t)=>{let{left:i,top:r,width:s,height:n}=t;switch(e.type){case 1:{let t=Pi(e.left,s),o=Pi(e.top,n),a=i+t,l=r+o,d=Math.max(0,s-t-Pi(e.right,s)),c=Math.max(0,n-o-Pi(e.bottom,n));return new cc(e=>{e.beginPath(),e.rect(a,l,d,c),e.clip()})}case 2:{let t,o=i+Pi(e.cx,s),a=r+Pi(e.cy,n);return t="closest-side"===e.radius?Math.min(o-i,a-r,i+s-o,r+n-a):"farthest-side"===e.radius?Math.max(o-i,a-r,i+s-o,r+n-a):Pi(e.radius,Math.sqrt(s*s+n*n)/Math.SQRT2),new cc(e=>{e.beginPath(),e.arc(o,a,Math.max(0,t),0,2*Math.PI),e.clip()})}case 3:{let t=i+Pi(e.cx,s),o=r+Pi(e.cy,n),a=Cc(e.rx,t,i,i+s,s),l=Cc(e.ry,o,r,r+n,n);return new cc(e=>{e.beginPath(),e.ellipse(t,o,Math.max(0,a),Math.max(0,l),0,0,2*Math.PI),e.clip()})}case 4:{let t=e.points.map(([e,t])=>[i+Pi(e,s),r+Pi(t,n)]);return new cc(e=>{if(e.beginPath(),t.length>0){e.moveTo(mt(mt(t,0),0),mt(mt(t,0),1));for(let i=1;i<t.length;i++)e.lineTo(mt(mt(t,i),0),mt(mt(t,i),1));e.closePath()}e.clip()})}case 5:{let{d:t}=e,s=null;return new cc(e=>{try{s||(s=new Path2D(t));let n=e.getTransform();e.translate(i,r),e.clip(s),e.setTransform(n)}catch{}})}case 6:{let t=i+Pi(e.x,s),o=r+Pi(e.y,n),a=Math.max(0,Pi(e.width,s)),l=Math.max(0,Pi(e.height,n));return new cc(e=>{e.beginPath(),e.rect(t,o,a,l),e.clip()})}default:return null}},Ec=(e,t,i,r)=>{e.container.elements.forEach(s=>{let n=s.createsRealStackingContext,o=s.createsStackingContext,a=new wc(s,e);Qs(s.styles.display,2048)&&r.push(a);let l=s.isListOwner?[]:r;if(n||o){let e=n||s.styles.isPositioned()?i:t,r=new vc(a);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){let t=s.styles.zIndex.order;if(t<0){let i=0;e.negativeZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(i=r+1,!1):i>0),e.negativeZIndex.splice(i,0,r)}else if(t>0){let i=0;e.positiveZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(i=r+1,!1):i>0),e.positiveZIndex.splice(i,0,r)}else e.zeroOrAutoZIndexOrTransformedOrOpacity.push(r)}else s.styles.isFloating()?e.nonPositionedFloats.push(r):e.nonPositionedInlineLevel.push(r);Ec(a,r,n?r:i,l)}else s.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),Ec(a,t,i,l);s.isListOwner&&Mc(s,l)})},Mc=(e,t)=>{let i=e instanceof Id?e.start:1,r=e instanceof Id&&e.reversed;for(let e=0;e<t.length;e++){let s=mt(t,e);s.container instanceof Pd&&"number"==typeof s.container.value&&0!==s.container.value&&(i=s.container.value),s.listValue=fn(i,s.container.styles.listStyleType,!0),i+=r?-1:1}},Ac=e=>{let t=new wc(e,null),i=new vc(t),r=[];return Ec(t,i,i,r),Mc(t.container,r),i},Tc=e=>Math.min(1,Math.max(0,e)),Bc=e=>{let t=mt(e,0),i=mt(e,e.length-1);if(i.stop-t.stop<1e-6)return null;let r=Math.max(i.stop-t.stop,.01),s=[],n=Math.ceil(1/r);for(let i=0;i<n;i++)for(let n of e){let e=i*r+(n.stop-t.stop);if(e>1)break;s.push({stop:e,color:_i(n.color)})}let o=s[s.length-1];return(!o||o.stop<1)&&s.push({stop:1,color:_i(i.color)}),s},Rc=e=>e.map(e=>({stop:Tc(e.stop),color:_i(e.color)})),Lc=(e,t,i,r,s=!1)=>{let n=Rn(r,t),o=mt(n,n.length-1),a=_i(o.color),l=e.createElement("canvas");l.width=Math.max(1,Math.ceil(2*t)),l.height=Math.max(1,Math.ceil(2*i));let d,c=l.getContext("2d");if(!c)return null;if(s){let e=Bc(n);if(!e)return c.fillStyle=a,c.fillRect(0,0,l.width,l.height),{canvas:l,lastColor:a,rx:t,ry:i};d=e}else d=Rc(n);let p=c.createRadialGradient(t,t,0,t,t,t);return d.forEach(e=>p.addColorStop(Tc(e.stop),e.color)),c.fillStyle=p,t!==i&&c.scale(1,i/t),c.fillRect(0,0,2*t,2*t),{canvas:l,lastColor:a,rx:t,ry:i}},Pc=e=>{let t=e.bounds,i=e.styles;return t.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},Ic=e=>{let t=e.styles,i=e.bounds,r=Pi(t.paddingLeft,i.width),s=Pi(t.paddingRight,i.width),n=Pi(t.paddingTop,i.width),o=Pi(t.paddingBottom,i.width);return i.add(r+t.borderLeftWidth,n+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+s),-(t.borderTopWidth+t.borderBottomWidth+n+o))},Nc=(e,t)=>0===e?t.bounds:2===e?Ic(t):Pc(t),Dc=(e,t)=>0===e?t.bounds:2===e?Ic(t):Pc(t),Oc=(e,t,i)=>{let r=Nc(_c(e.styles.backgroundOrigin,t),e),s=Dc(_c(e.styles.backgroundClip,t),e),n=zc(_c(e.styles.backgroundSize,t),i,r),[o,a]=n,l=Li(_c(e.styles.backgroundPosition,t),r.width-o,r.height-a),d=Wc(_c(e.styles.backgroundRepeat,t),l,n,r,s),c=Math.round(r.left+l[0]),p=Math.round(r.top+l[1]);return o=Math.max(1,o),a=Math.max(1,a),[d,c,p,o,a]},Fc=e=>ri(e)&&"auto"===e.value,$c=e=>"number"==typeof e,zc=(e,[t,i,r],s)=>{let[n,o]=e;if(!n)return[0,0];if(wi(n)&&o&&wi(o))return[Pi(n,s.width),Pi(o,s.height)];let a=$c(r);if(ri(n)&&("contain"===n.value||"cover"===n.value))return $c(r)?s.width/s.height<r!=("cover"===n.value)?[s.width,s.width/r]:[s.height*r,s.height]:[s.width,s.height];let l=$c(t),d=$c(i),c=l||d;if(Fc(n)&&(!o||Fc(o)))return l&&d?[t,i]:a||c?c&&a?[l?t:i*r,d?i:t/r]:[l?t:s.width,d?i:s.height]:[s.width,s.height];if(a){let e=0,t=0;return wi(n)?e=Pi(n,s.width):o&&wi(o)&&(t=Pi(o,s.height)),Fc(n)?e=t*r:(!o||Fc(o))&&(t=e/r),[e,t]}let p=null,h=null;if(wi(n)?p=Pi(n,s.width):o&&wi(o)&&(h=Pi(o,s.height)),null!==p&&(!o||Fc(o))&&(h=l&&d?p/t*i:s.height),null!==h&&Fc(n)&&(p=l&&d?h/i*t:s.width),null!==p&&null!==h)return[p,h];throw new Error("Unable to calculate background-size for element")},_c=(e,t)=>{let i=e[t];return typeof i>"u"?mt(e,0):i},Wc=(e,[t,i],[r,s],n,o)=>{switch(e){case 2:return[new Qd(Math.round(n.left),Math.round(n.top+i)),new Qd(Math.round(n.left+n.width),Math.round(n.top+i)),new Qd(Math.round(n.left+n.width),Math.round(s+n.top+i)),new Qd(Math.round(n.left),Math.round(s+n.top+i))];case 3:return[new Qd(Math.round(n.left+t),Math.round(n.top)),new Qd(Math.round(n.left+t+r),Math.round(n.top)),new Qd(Math.round(n.left+t+r),Math.round(n.height+n.top)),new Qd(Math.round(n.left+t),Math.round(n.height+n.top))];case 1:return[new Qd(Math.round(n.left+t),Math.round(n.top+i)),new Qd(Math.round(n.left+t+r),Math.round(n.top+i)),new Qd(Math.round(n.left+t+r),Math.round(n.top+i+s)),new Qd(Math.round(n.left+t),Math.round(n.top+i+s))];default:return[new Qd(Math.round(o.left),Math.round(o.top)),new Qd(Math.round(o.left+o.width),Math.round(o.top)),new Qd(Math.round(o.left+o.width),Math.round(o.height+o.top)),new Qd(Math.round(o.left),Math.round(o.height+o.top))]}},Hc=class extends Error{},Vc=e=>{e.width=e.height=0},jc=["brightness","contrast","grayscale","hue-rotate","invert","opacity","saturate","sepia"],Uc=256,Yc=new Map,qc={functions:[]},Gc=e=>{let t=[],i=0;for(;i<e.length;){let r=e[i];if(" "===r||"\n"===r||"\t"===r){i++;continue}let s=e.indexOf("(",i);if(-1===s)return null;let n=e.slice(i,s).trim();if(!/^[a-zA-Z-]+$/.test(n))return null;let o=Kc(e,s);if(-1===o)return null;let a=Jc(n,e.slice(s+1,o).trim());if(!a)return null;t.push(a),i=o+1}return{functions:t}},Kc=(e,t)=>{let i=1;for(let r=t+1;r<e.length;r++){let t=e[r];if("("===t)i++;else if(")"===t&&(i--,0===i))return r}return-1},Xc=/^-?\d+(?:\.\d+)?px$/,Jc=(e,t)=>{if("blur"===e){if("0"===t)return{kind:"blur",value:0};if(!Xc.test(t))return null;let e=Number.parseFloat(t);return e<0?null:{kind:"blur",value:e}}if("drop-shadow"===e)return Zc(t);if(-1!==jc.indexOf(e)){let i=e;if("hue-rotate"===i){let e=ep(t);return null===e?null:{kind:"unitless",name:i,value:e}}let r=t.trim(),s=r.endsWith("%"),n=s?r.slice(0,-1):r;return/^-?\d+(?:\.\d+)?$/.test(n)?{kind:"unitless",name:i,value:Number.parseFloat(n)*(s?.01:1)}:null}return null},Qc=e=>{let t=[],i=0,r="";for(let s of e)"("===s?i++:")"===s&&i--," "!==s||0!==i?r+=s:(r&&t.push(r),r="");return r&&t.push(r),t},Zc=e=>{let t=Qc(e),i=t.filter(e=>Xc.test(e)).map(e=>Number.parseFloat(e));if(i.length<2||i.length>3)return null;let r=t.filter(e=>!Xc.test(e));return t.length-r.length!==i.length?null:{kind:"drop-shadow",x:i[0],y:i[1],blur:i[2]??0,color:r.join(" ")||"rgba(0, 0, 0, 0)"}},ep=e=>{let t=e.trim();if("0"===t)return 0;let i=Number.parseFloat(t);return Number.isNaN(i)?null:t.endsWith("deg")?i:t.endsWith("grad")?.9*i:t.endsWith("rad")?180*i/Math.PI:t.endsWith("turn")?360*i:null},tp=(e,t)=>e.functions.map(e=>{switch(e.kind){case"blur":return`blur(${e.value*t}px)`;case"drop-shadow":return`drop-shadow(${e.x*t}px ${e.y*t}px ${e.blur*t}px ${e.color})`;case"unitless":return"hue-rotate"===e.name?`hue-rotate(${e.value}deg)`:`${e.name}(${e.value})`}}).join(" "),ip=(e,t)=>new Promise((i,r)=>{let s=e=>{clearTimeout(o),t?.removeEventListener("abort",n),e?r(e):i()},n=()=>s(new DOMException("The operation was aborted.","AbortError")),o=setTimeout(()=>s(new Hc("Filter surface image decode timed out")),1e4);t?.addEventListener("abort",n,{once:!0}),t?.aborted?n():e.decode().then(()=>s(),()=>s(new Hc("Filter surface image decode failed")))}),rp=new WeakMap,sp=e=>{let t=0,i=0;for(let r of e.functions)if("blur"===r.kind)t++;else{if("drop-shadow"!==r.kind)return!1;i++}return!(t>1||i>1||t>0&&i>0&&!(e.functions.findIndex(e=>"blur"===e.kind)<e.functions.findIndex(e=>"drop-shadow"===e.kind)))},np=(e,t)=>e.add(-t,-t,2*t,2*t),op=(e,t)=>new ut(Math.min(e.left,t.left),Math.min(e.top,t.top),Math.max(e.left+e.width,t.left+t.width)-Math.min(e.left,t.left),Math.max(e.top+e.height,t.top+t.height)-Math.min(e.top,t.top)),ap=class{ctx;constructor(e){this.ctx=e}render(e,t){this.ctx.fillStyle=_i(t.textDecorationColor??t.color);let i=1;"number"==typeof t.textDecorationThickness?i=t.textDecorationThickness:"from-font"===t.textDecorationThickness&&(i=Math.max(1,Math.floor(.05*t.fontSize.number)));let r=0;"number"==typeof t.textUnderlineOffset&&(r=t.textUnderlineOffset);let s=t.textDecorationStyle;t.textDecorationLine.forEach(t=>{let n=0;switch(t){case 1:n=e.top+e.height-i+r;break;case 2:n=e.top;break;case 3:n=e.top+(e.height/2-i/2);break;default:return}this.draw(e.left,n,e.width,i,s)})}draw(e,t,i,r,s){switch(s){case 0:default:this.ctx.fillRect(e,t,i,r);break;case 1:{let s=Math.max(1,r);this.ctx.fillRect(e,t,i,r),this.ctx.fillRect(e,t+r+s,i,r);break}case 2:this.drawPattern(e,t,i,r,[r,2*r]);break;case 3:this.drawPattern(e,t,i,r,[3*r,2*r]);break;case 4:this.drawWavy(e,t,i,r)}}drawPattern(e,t,i,r,s){this.ctx.save(),this.ctx.beginPath(),this.ctx.setLineDash(s),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.moveTo(e,t+r/2),this.ctx.lineTo(e+i,t+r/2),this.ctx.stroke(),this.ctx.restore()}drawWavy(e,t,i,r){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle;let s=2*r,n=4*r,o=e;for(this.ctx.moveTo(o,t+r/2);o<e+i;){let a=Math.min(o+n/2,e+i);if(this.ctx.quadraticCurveTo(o+n/4,t+r/2-s,a,t+r/2),o=a,o<e+i){let a=Math.min(o+n/2,e+i);this.ctx.quadraticCurveTo(o+n/4,t+r/2+s,a,t+r/2),o=a}}this.ctx.stroke(),this.ctx.restore()}},lp=e=>void 0!==e&&!Number.isNaN(e),dp=(e,t)=>{let i=e.measureText("Mg"),r=i;return{baseline:lp(r.fontBoundingBoxAscent)?r.fontBoundingBoxAscent:lp(i.actualBoundingBoxAscent)?i.actualBoundingBoxAscent:t,height:lp(r.fontBoundingBoxAscent)&&lp(r.fontBoundingBoxDescent)?r.fontBoundingBoxAscent+r.fontBoundingBoxDescent:lp(i.actualBoundingBoxAscent)&&lp(i.actualBoundingBoxDescent)?i.actualBoundingBoxAscent+i.actualBoundingBoxDescent:t}},cp=(e,t)=>dp(e,t).baseline,pp=/[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/,hp=e=>pp.test(e),up=()=>!(typeof navigator>"u"||void 0===navigator.userAgentData&&void 0===(typeof window<"u"?window:void 0)?.chrome),fp=()=>up()?"miter":"round",gp=class{ctx;options;decorationRenderer;baselineCache=new Map;glyphWidthCache=null;constructor(e){this.ctx=e.ctx,this.options=e.options,this.decorationRenderer=new ap(e.ctx)}cachedMeasureText(e,t){let i=this.glyphWidthCache;i||(i=new Map,this.glyphWidthCache=i);let r=e+t,s=i.get(r);return void 0===s&&(s=this.ctx.measureText(e).width,i.set(r,s)),s}iterateLettersWithLetterSpacing(e,t,i,r,s){if(Aa(r))return void this.iterateVerticalGlyphs(e,t,i,r,s);let n=vd(e.text),o=e.bounds.top+i,a=this.ctx.font,l=e.bounds.left;for(let e of n)s(e,l,o),l+=this.cachedMeasureText(e,a)+t}iterateVerticalGlyphs(e,t,i,r,s){let n=vd(e.text),o=this.ctx.font,a=4===r?-Math.PI/2:Math.PI/2,l=e.bounds.top;for(let d=0;d<n.length;){let c=n[d];if(!(Ta(r)||!hp(c)&&c.trim().length>0)){let r=this.ctx.textBaseline;hp(c)&&(this.ctx.textBaseline="ideographic"),s(c,e.bounds.left,l+i),this.ctx.textBaseline=r,l+=this.cachedMeasureText(c,o)+t,d++;continue}let p=d;for(;d<n.length;){let e=n[d];if(!Ta(r)&&!hp(e)&&0===e.trim().length)break;if(!(Ta(r)||!hp(e)&&e.trim().length>0))break;d++}this.ctx.save(),this.ctx.translate(e.bounds.left+i,l),this.ctx.rotate(a);let h=0;for(let e=p;e<d;e++){let i=n[e];s(i,0,h),h+=this.cachedMeasureText(i,o)+t}this.ctx.restore(),l+=h}}renderTextWithLetterSpacing(e,t,i,r=0){this.renderFillText(e,t,i,r)}canRenderWholeText(e,t){return 0===e&&!Aa(t)}renderFillText(e,t,i,r){this.canRenderWholeText(t,r)?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i):this.iterateLettersWithLetterSpacing(e,t,i,r,(e,t,i)=>{this.ctx.fillText(e,t,i)})}renderStrokeText(e,t,i,r){this.canRenderWholeText(t,r)?this.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+i):this.iterateLettersWithLetterSpacing(e,t,i,r,(e,t,i)=>{this.ctx.strokeText(e,t,i)})}renderTextStrokeWithStyle(e,t,i){!t.webkitTextStrokeWidth||!e.text.trim().length||(this.ctx.strokeStyle=_i(t.webkitTextStrokeColor),this.ctx.lineWidth=t.webkitTextStrokeWidth,this.ctx.lineJoin=fp(),this.renderStrokeText(e,t.letterSpacing,i,t.writingMode),this.ctx.strokeStyle="",this.ctx.lineWidth=0,this.ctx.lineJoin="miter")}renderTextFillWithShadows(e,t,i){this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,i,t.writingMode);let r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(r=>{this.ctx.shadowColor=_i(r.color),this.ctx.shadowOffsetX=r.offsetX.number*this.options.scale,this.ctx.shadowOffsetY=r.offsetY.number*this.options.scale,this.ctx.shadowBlur=r.blur.number*this.options.scale,this.renderTextWithLetterSpacing(e,t.letterSpacing,i,t.writingMode)}),this.ctx.shadowColor="",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0)}renderTextBoundWithPaintOrder(e,t,i,r){i.forEach(i=>{switch(i){case 0:this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,r,t.writingMode);break;case 1:this.renderTextStrokeWithStyle(e,t,r)}})}renderTextDecoration(e,t){this.decorationRenderer.render(e,t)}truncateTextWithEllipsis(e,t,i){let r=this.ctx.measureText("\u2026").width,s=vd(e);if(0===i){let e=e=>this.ctx.measureText(s.slice(0,e).join("")).width+r<=t,i=0,n=s.length;for(;i<n;){let t=i+n+1>>1;e(t)?i=t:n=t-1}return s.slice(0,i).join("")+"\u2026"}{let e=this.ctx.font,n=r,o=[];for(let r of s){let s=this.cachedMeasureText(r,e);if(n+s>t)break;o.push(r),n+=s+i}return o.join("")+"\u2026"}}createFontStyle(e){let t=e.fontVariant.filter(e=>"normal"===e||"small-caps"===e).join(""),i=e.fontFamily.join(", "),r=ti(e.fontSize)?`${e.fontSize.number}${e.fontSize.unit}`:`${e.fontSize.number}px`;return[[e.fontStyle,t,e.fontWeight,r,i].join(" "),i,r]}resolveFillColor(e){return _i(e.webkitTextFillColor??e.color)}renderLineClampedText(e,t,i,r,s){let n=ea(t.lineHeight,t.fontSize.number),o=[],a=[],l=mt(e.textBounds,0).bounds.top;e.textBounds.forEach(e=>{Math.abs(e.bounds.top-l)>=.5*n?(a.length>0&&o.push(a),a=[e],l=e.bounds.top):a.push(e)}),a.length>0&&o.push(a);let d=t.webkitLineClamp;if(o.length<=d)return!1;for(let e=0;e<d-1;e++)mt(o,e).forEach(e=>this.renderTextBoundWithPaintOrder(e,t,i,r));let c=o[d-1];if(c?.length&&s){let e=c.map(e=>e.text).join(""),n=mt(c,0),o=s.width-(n.bounds.left-s.left),a=new fd(this.truncateTextWithEllipsis(e,o,t.letterSpacing),n.bounds);for(let e of i)0===e?(this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(a,t.letterSpacing,r,t.writingMode)):1===e&&this.renderTextStrokeWithStyle(a,t,r)}return!0}renderEllipsisText(e,t,i,r,s){let n=ea(t.lineHeight,t.fontSize.number),o=mt(e.textBounds,0).bounds.top;if(!e.textBounds.every(e=>Math.abs(e.bounds.top-o)<.5*n))return!1;let a=e.textBounds.map(e=>e.text).join("").replace(/\s+/g," ").trim();if(this.ctx.measureText(a).width<=s.width+1)return!1;let l=new fd(this.truncateTextWithEllipsis(a,s.width,t.letterSpacing),mt(e.textBounds,0).bounds);for(let e of i)0===e?this.renderTextFillWithShadows(l,t,r):1===e&&this.renderTextStrokeWithStyle(l,t,r);return!0}measureBaselineCached(e,t){let i=this.baselineCache.get(e);return void 0===i&&(i=cp(this.ctx,t),this.baselineCache.size>=64&&this.baselineCache.clear(),this.baselineCache.set(e,i)),i}async renderTextNode(e,t,i){this.glyphWidthCache=null;let[r]=this.createFontStyle(t);this.ctx.font=r??"",this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic";let s=t.paintOrder,n=this.measureBaselineCached(r??"",t.fontSize.number);t.webkitLineClamp>0&&34&t.display&&1===t.overflowY&&e.textBounds.length>0&&this.renderLineClampedText(e,t,s,n,i)||1===t.textOverflow&&i&&1===t.overflowX&&e.textBounds.length>0&&this.renderEllipsisText(e,t,s,n,i)||(e.textBounds.forEach(e=>{s.forEach(i=>{0===i?(this.renderTextFillWithShadows(e,t,n),t.textDecorationLine.length&&this.renderTextDecoration(e.bounds,t)):1===i&&this.renderTextStrokeWithStyle(e,t,n)})}),t.textEmphasisStyle&&this.renderTextEmphasis(e,t,n))}renderTextEmphasis(e,t,i){if(Aa(t.writingMode))return;let r=t.textEmphasisStyle;if(!r)return;let s=t.fontSize.number,n=.5*s,o=_i(t.textEmphasisColor??t.color),a=t.textEmphasisPosition,l=(e,t)=>{if("string"==typeof r){let i=this.ctx.font;return this.ctx.font=i.replace(/^\S+/,`${n}px`),this.ctx.textAlign="center",this.ctx.fillText(r,e,t+n/3),this.ctx.font=i,void(this.ctx.textAlign="left")}let{fill:i,shape:s}=r,o=n*("dot"===s?.3:"sesame"===s?.26:.34);this.ctx.beginPath(),"sesame"===s?this.ctx.ellipse(e,t,1.3*o,.8*o,Math.PI/4,0,2*Math.PI):"triangle"===s?(this.ctx.moveTo(e,t-o),this.ctx.lineTo(e+1.1*o,t+.8*o),this.ctx.lineTo(e-1.1*o,t+.8*o),this.ctx.closePath()):this.ctx.arc(e,t,o,0,2*Math.PI),i?"double-circle"===s?(this.ctx.lineWidth=.7*o,this.ctx.stroke(),this.ctx.beginPath(),this.ctx.arc(e,t,.4*o,0,2*Math.PI),this.ctx.lineWidth=.35*o,this.ctx.stroke()):this.ctx.fill():(this.ctx.lineWidth=Math.max(1,.35*o),this.ctx.stroke(),"double-circle"===s&&(this.ctx.beginPath(),this.ctx.arc(e,t,.5*o,0,2*Math.PI),this.ctx.stroke()))},d=this.ctx.font;for(let r of e.textBounds){let e=r.bounds.top+i,c=a.over?e-s-.4*n:e+.9*n,p=r.bounds.left;for(let e of vd(r.text)){let i=this.cachedMeasureText(e,d);this.ctx.save();try{this.ctx.fillStyle=o,this.ctx.strokeStyle=o,this.ctx.lineWidth=1,l(p+i/2+t.letterSpacing/2,c)}finally{this.ctx.restore()}p+=i+t.letterSpacing}}}},mp=(e,t)=>{t.forEach((t,i)=>{let r=tc(t)?t.start:t;0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y),tc(t)&&e.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},bp=(e,t)=>{e.beginPath(),mp(e,t),e.closePath()},yp=class{maxSize;_map;constructor(e){this.maxSize=e,this._map=new Map}get(e){if(!this._map.has(e))return;let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t}set(e,t){if(this._map.has(e))this._map.delete(e);else if(this._map.size>=this.maxSize){let e=this._map.keys().next().value;void 0!==e&&this._map.delete(e)}this._map.set(e,t)}get size(){return this._map.size}clear(){this._map.clear()}},xp=class{ctx;context;canvas;patternCache=new yp(50);constructor(e){this.ctx=e.ctx,this.context=e.context,this.canvas=e.canvas}async renderBackgroundImage(e){let t=e.styles.backgroundImage.length-1,i=e.styles.backgroundBlendMode,r=0;for(let s of e.styles.backgroundImage.slice(0).reverse()){if(r>0){let e=i[r]??i[0]??"normal";"normal"!==e&&(this.ctx.save(),this.ctx.globalCompositeOperation=e)}0===s.type?await this.renderBackgroundURLImage(e,s,t):eo(s)?this.renderLinearGradient(e,s,t):io(s)?this.renderRepeatingLinearGradient(e,s,t):to(s)?this.renderRadialGradient(e,s,t):ro(s)?this.renderRepeatingRadialGradient(e,s,t):so(s)?this.renderConicGradient(e,s,t):no(s)&&this.renderRepeatingConicGradient(e,s,t),r>0&&"normal"!==(i[r]??i[0]??"normal")&&this.ctx.restore(),t--,r++}}async renderBackgroundURLImage(e,t,i){let r,s=t.url;try{r=await this.context.cache.match(s)}catch{this.context.logger.error(`Error loading background-image ${s}`)}if(r){let t=isNaN(r.width)||0===r.width?1:r.width,n=isNaN(r.height)||0===r.height?1:r.height,[o,a,l,d,c]=Oc(e,i,[t,n,t/n]),p=_c(e.styles.backgroundRepeat,i),h=1===p?"no-repeat":2===p?"repeat-x":3===p?"repeat-y":"repeat",u=`${s}|${Math.round(d)}x${Math.round(c)}|${e.styles.imageRendering}|${h}`,f=this.patternCache.get(u);if(!f){let t=this.resizeImage(r,d,c,e.styles.imageRendering);f=this.ctx.createPattern(t,h),this.patternCache.set(u,f)}this.renderRepeat(o,f,a,l)}}renderRepeatingLinearGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),[l,d,c,p,h]=Pn(t.angle,o,a),u=s+d,f=s+c,g=n+p,m=n+h,b=Rn(t.stops,l||1),y=Bc(b),x=this.ctx.createLinearGradient(u,g,f,m);if(y)y.forEach(e=>x.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color));else{let e=_i(mt(b,b.length-1).color);x.addColorStop(0,e),x.addColorStop(1,e)}this.path(r),this.ctx.fillStyle=x,this.ctx.fill()}renderLinearGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),[l,d,c,p,h]=Pn(t.angle,o,a),u=`lg|${t.angle}|${Math.round(o)}x${Math.round(a)}|${JSON.stringify(t.stops)}`,f=this.patternCache.get(u);if(!f){let e=(this.canvas.ownerDocument??document).createElement("canvas");e.width=o,e.height=a;let i=e.getContext("2d");if(!i)return;let r=i.createLinearGradient(d,p,c,h);Rn(t.stops,l||1).forEach(e=>r.addColorStop(e.stop,_i(e.color))),i.fillStyle=r,i.fillRect(0,0,o,a),o>0&&a>0&&(f=this.ctx.createPattern(e,"repeat"),this.patternCache.set(u,f))}f&&this.renderRepeat(r,f,s,n)}renderRadialGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),l=0===t.position.length?[Bi]:t.position,d=Pi(mt(l,0),o),c=Pi(mt(l,l.length-1),a),[p,h]=Dn(t,d,c,o,a);if((0===p||0===h)&&(p=Math.max(p,.01),h=Math.max(h,.01)),p>0&&h>0){let e=`rg|${Math.round(d)}x${Math.round(c)}|${Math.round(p)}x${Math.round(h)}|${JSON.stringify(t.stops)}`,i=Rn(t.stops,p),o=_i(mt(i,i.length-1).color),a=this.patternCache.get(e);if(!a){let i=this.canvas.ownerDocument??document,r=Lc(i,p,h,t.stops,!1);if(!r)return;a=this.ctx.createPattern(r.canvas,"no-repeat"),this.patternCache.set(e,a)}this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=o,this.ctx.fill(),this.ctx.translate(s+d-p,n+c-h),this.ctx.fillStyle=a,this.ctx.fillRect(0,0,2*p,2*h),this.ctx.restore()}}renderRepeatingRadialGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),l=0===t.position.length?[Bi]:t.position,d=Pi(mt(l,0),o),c=Pi(mt(l,l.length-1),a),[p,h]=Dn(t,d,c,o,a);if((0===p||0===h)&&(p=Math.max(p,.01),h=Math.max(h,.01)),!(p>0&&h>0))return;let u=`rrg|${Math.round(d)}x${Math.round(c)}|${Math.round(p)}x${Math.round(h)}|${JSON.stringify(t.stops)}`,f=this.patternCache.get(u);if(!f){let e=this.canvas.ownerDocument??document,i=Lc(e,p,h,t.stops,!0);if(!i)return;f=this.ctx.createPattern(i.canvas,"no-repeat"),this.patternCache.set(u,f)}f&&(this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.translate(s+d-p,n+c-h),this.ctx.fillStyle=f,this.ctx.fillRect(0,0,2*p,2*h),this.ctx.restore())}renderConicGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),l=0===t.position.length?[Bi]:t.position,d=s+Pi(mt(l,0),o),c=n+Pi(mt(l,l.length-1),a),p=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);Rn(t.stops,1).forEach(e=>{p.addColorStop(Math.min(1,Math.max(0,e.stop)),_i(e.color))}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=p,this.ctx.fill(),this.ctx.restore()}renderRepeatingConicGradient(e,t,i){let[r,s,n,o,a]=Oc(e,i,[null,null,null]),l=0===t.position.length?[Bi]:t.position,d=s+Pi(mt(l,0),o),c=n+Pi(mt(l,l.length-1),a),p=Rn(t.stops,1),h=mt(p,0),u=mt(p,p.length-1),f=Math.max(u.stop-h.stop,.01);if(u.stop-h.stop<1e-6){let e=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);return e.addColorStop(0,_i(u.color)),e.addColorStop(1,_i(u.color)),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=e,this.ctx.fill(),void this.ctx.restore()}let g=[],m=Math.ceil(1/f);for(let e=0;e<m;e++)for(let t of p){let i=e*f+(t.stop-h.stop);if(i>1)break;g.push({stop:i,color:_i(t.color)})}let b=mt(g,g.length-1);b&&b.stop<1&&g.push({stop:1,color:b.color});let y=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);g.forEach(e=>{y.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=y,this.ctx.fill(),this.ctx.restore()}renderRepeat(e,t,i,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(i,r),this.ctx.fill(),this.ctx.translate(-i,-r)}resizeImage(e,t,i,r){let s=(this.canvas.ownerDocument??document).createElement("canvas");s.width=Math.max(1,t),s.height=Math.max(1,i);let n=s.getContext("2d");return n?(2===r||1===r?(this.context.logger.debug("Disabling image smoothing for background image due to CSS image-rendering"),n.imageSmoothingEnabled=!1):3===r?(this.context.logger.debug("Enabling image smoothing for background image due to CSS image-rendering: smooth"),n.imageSmoothingEnabled=!0):n.imageSmoothingEnabled=this.ctx.imageSmoothingEnabled,this.ctx.imageSmoothingQuality&&(n.imageSmoothingQuality=this.ctx.imageSmoothingQuality),n.drawImage(e,0,0,e.width,e.height,0,0,t,i),s):e}path(e){bp(this.ctx,e)}},vp=(e,t)=>{switch(t){case 0:return Ep(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Ep(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Ep(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return Ep(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},wp=(e,t)=>{switch(t){case 0:return Ep(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Ep(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Ep(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return Ep(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},kp=(e,t)=>{switch(t){case 0:return Ep(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Ep(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Ep(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return Ep(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Cp=(e,t)=>{switch(t){case 0:return Sp(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Sp(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Sp(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Sp(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Sp=(e,t)=>{let i=[];return tc(e)?i.push(e.subdivide(.5,!1)):i.push(e),tc(t)?i.push(t.subdivide(.5,!0)):i.push(t),i},Ep=(e,t,i,r)=>{let s=[];return tc(e)?s.push(e.subdivide(.5,!1)):s.push(e),tc(i)?s.push(i.subdivide(.5,!0)):s.push(i),tc(r)?s.push(r.subdivide(.5,!0).reverse()):s.push(r),tc(t)?s.push(t.subdivide(.5,!1).reverse()):s.push(t),s},Mp=class{ctx;pathCallbacks;constructor(e,t){this.ctx=e.ctx,this.pathCallbacks=t}async renderSolidBorder(e,t,i){this.pathCallbacks.path(vp(i,t)),this.ctx.fillStyle=_i(e),this.ctx.fill()}async renderDoubleBorder(e,t,i,r){if(t<3)return void await this.renderSolidBorder(e,i,r);let s=wp(r,i);this.pathCallbacks.path(s),this.ctx.fillStyle=_i(e),this.ctx.fill();let n=kp(r,i);this.pathCallbacks.path(n),this.ctx.fill()}async renderDashedDottedBorder(e,t,i,r,s){this.ctx.save();let n,o,a,l,d,c=Cp(r,i),p=vp(r,i);2===s&&(this.pathCallbacks.path(p),this.ctx.clip()),tc(mt(p,0))?(n=mt(p,0).start.x,o=mt(p,0).start.y):(n=mt(p,0).x,o=mt(p,0).y),tc(mt(p,1))?(a=mt(p,1).end.x,l=mt(p,1).end.y):(a=mt(p,1).x,l=mt(p,1).y),d=0===i||2===i?Math.abs(n-a):Math.abs(o-l),this.ctx.beginPath(),3===s?this.pathCallbacks.formatPath(c):this.pathCallbacks.formatPath(p.slice(0,2));let h=t<3?3*t:2*t,u=t<3?2*t:t;3===s&&(h=t,u=t);let f=!0;if(d<=2*h)f=!1;else if(d<=2*h+u){let e=d/(2*h+u);h*=e,u*=e}else{let e=Math.floor((d+u)/(h+u)),t=(d-e*h)/(e-1),i=(d-(e+1)*h)/e;u=i<=0||Math.abs(u-t)<Math.abs(u-i)?t:i}if(f&&(3===s?this.ctx.setLineDash([0,h+u]):this.ctx.setLineDash([h,u])),3===s?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=_i(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===s){if(tc(mt(p,0))){let e=mt(p,3),t=mt(p,0);this.ctx.beginPath(),this.pathCallbacks.formatPath([new Qd(e.end.x,e.end.y),new Qd(t.start.x,t.start.y)]),this.ctx.stroke()}if(tc(mt(p,1))){let e=mt(p,1),t=mt(p,2);this.ctx.beginPath(),this.pathCallbacks.formatPath([new Qd(e.end.x,e.end.y),new Qd(t.start.x,t.start.y)]),this.ctx.stroke()}}this.ctx.restore()}},Ap=(e,t,i)=>{let r=e?[e.top,e.right,e.bottom,e.left]:null;return[0,1,2,3].map(e=>{let s=r?r[e]:null,n=t[e]??0;return s&&"auto"!==s.kind?"number"===s.kind?n*(s.value??1):"length"===s.kind?s.value??0:(s.value??0)/100*(0===e||2===e?i.height:i.width):n})},Tp=(e,t)=>{let i=e?[e.top,e.right,e.bottom,e.left]:null,r=e=>{let r=i?i[e]:null;return r?"number"===r.kind?(t[e]??0)*(r.value??0):r.value??0:0};return{top:r(0),right:r(1),bottom:r(2),left:r(3)}},Bp=class{ctx;constructor(e){this.ctx=e}renderBorderImage(e,t,i,r,s,n,o,a,l={top:0,right:0,bottom:0,left:0}){e=e.add(-l.left,-l.top,l.left+l.right,l.top+l.bottom);let d=t.naturalWidth||t.width,c=t.naturalHeight||t.height;if(d<=0||c<=0)return;let p=Math.min("percent"===i.unit?i.top/100*c:Math.min(i.top,c),c),h=Math.min("percent"===i.unit?i.right/100*d:Math.min(i.right,d),d),u=Math.min("percent"===i.unit?i.bottom/100*c:Math.min(i.bottom,c),c),f=Math.min("percent"===i.unit?i.left/100*d:Math.min(i.left,d),d),{left:g,top:m,width:b,height:y}=e;if(b<=0||y<=0)return;let x=Math.min(s,y),v=Math.min(n,b),w=Math.min(o,y-x),k=Math.min(a,b-v);this.drawRegion(t,0,0,f,p,g,m,k,x),this.drawRegion(t,d-h,0,h,p,g+b-v,m,v,x),this.drawRegion(t,d-h,c-u,h,u,g+b-v,m+y-w,v,w),this.drawRegion(t,0,c-u,f,u,g,m+y-w,k,w);let C=[{sx:f,sy:0,sw:d-f-h,sh:p,dx:g+k,dy:m,dw:b-k-v,dh:x,repeat:r.horizontal,horizontal:!0},{sx:d-h,sy:p,sw:h,sh:c-p-u,dx:g+b-v,dy:m+x,dw:v,dh:y-x-w,repeat:r.vertical,horizontal:!1},{sx:f,sy:c-u,sw:d-f-h,sh:u,dx:g+k,dy:m+y-w,dw:b-k-v,dh:w,repeat:r.horizontal,horizontal:!0},{sx:0,sy:p,sw:f,sh:c-p-u,dx:g,dy:m+x,dw:k,dh:y-x-w,repeat:r.vertical,horizontal:!1}];for(let e of C)e.sw<=0||e.sh<=0||e.dw<=0||e.dh<=0||(0===e.repeat?this.ctx.drawImage(t,e.sx,e.sy,e.sw,e.sh,e.dx,e.dy,e.dw,e.dh):(1===e.repeat||2===e.repeat)&&this.drawRepeatedEdge(t,e,e.horizontal,2===e.repeat));i.fill&&this.drawCenterRegion(t,{sx:f,sy:p,sw:d-f-h,sh:c-p-u},{dx:g+k,dy:m+x,dw:b-k-v,dh:y-x-w},r)}drawRegion(e,t,i,r,s,n,o,a,l){r>0&&s>0&&a>0&&l>0&&this.ctx.drawImage(e,t,i,r,s,n,o,a,l)}drawRepeatedEdge(e,t,i,r){let s,n,o=i?t.sw:t.sh,a=i?t.dw:t.dh;if(!(o<=0||a<=0)){r?(n=Math.max(1,Math.round(a/o)),s=a/n):(s=o,n=Math.ceil(a/s)),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.dx,t.dy,t.dw,t.dh),this.ctx.clip();for(let r=0;r<n;r++){let n=r*s;i?this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx+n,t.dy,s,t.dh):this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx,t.dy+n,t.dw,s)}this.ctx.restore()}}drawCenterRegion(e,t,i,r){if(t.sw<=0||t.sh<=0||i.dw<=0||i.dh<=0)return;let s=(e,t,i)=>{if(0===e)return{size:i,count:1};if(2===e){let e=Math.max(1,Math.round(i/t));return{size:i/e,count:e}}return{size:t,count:Math.max(1,Math.ceil(i/t))}},n=s(r.horizontal,t.sw,i.dw),o=s(r.vertical,t.sh,i.dh);this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(i.dx,i.dy,i.dw,i.dh),this.ctx.clip();for(let r=0;r<o.count;r++)for(let s=0;s<n.count;s++)this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,i.dx+s*n.size,i.dy+r*o.size,n.size,o.size);this.ctx.restore()}},Rp=/blur\((\d+(?:\.\d+)?)px\)/gi,Lp=(e,t)=>1===t?e:e.replace(Rp,(e,i)=>`blur(${parseFloat(i)*t}px)`),Pp=class{ctx;pathCallback;scale;activeEffects=[];didSave=!1;saveAtDepth=-1;constructor(e,t){this.ctx=e.ctx,this.pathCallback=t,this.scale=e.scale??1}applyEffects(e){for(;this.activeEffects.length;)this.popEffect();this.didSave=!1,this.saveAtDepth=-1;let t=e=>fc(e)||gc(e)||bc(e),i=e.reduceRight((e,i,r)=>-1!==e?e:t(i)?r:-1,-1);for(let r=0;r<e.length;r++){let s=mt(e,r);t(s)&&(this.didSave||(this.ctx.save(),this.didSave=!0),r===i&&(this.saveAtDepth=this.activeEffects.length)),this.applyEffect(s)}}applyEffect(e){fc(e)?(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)):gc(e)?(this.pathCallback.path(e.path),this.ctx.clip()):bc(e)?e.applyClip(this.ctx):mc(e)?this.ctx.globalAlpha*=e.opacity:yc(e)?this.ctx.globalCompositeOperation=e.compositeOperation:xc(e)&&(this.ctx.filter=Lp(e.safeFilterString,this.scale)||"none",e.shadow&&(this.ctx.shadowOffsetX=e.shadow.offsetX*this.scale,this.ctx.shadowOffsetY=e.shadow.offsetY*this.scale,this.ctx.shadowBlur=e.shadow.blur*this.scale,this.ctx.shadowColor=e.shadow.color)),this.activeEffects.push(e)}popEffect(){0!==this.activeEffects.length&&(this.didSave&&this.activeEffects.length-1===this.saveAtDepth&&(this.ctx.restore(),this.didSave=!1,this.saveAtDepth=-1),this.activeEffects.pop(),!this.didSave&&0===this.activeEffects.length&&(this.ctx.globalAlpha=1,this.ctx.globalCompositeOperation="source-over",this.ctx.filter="none",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0,this.ctx.shadowColor="rgba(0, 0, 0, 0)"))}getActiveEffectCount(){return this.activeEffects.length}hasActiveEffects(){return this.activeEffects.length>0}},Ip=(e,t)=>0===e.length?void 0:e[t%e.length]??e[0],Np=(e,t,i,r)=>{let s=e?e[0]:void 0,n=e&&e.length>1?mt(e,1):void 0,o=(e,t,i)=>void 0===e||ri(e)?null:wi(e)?Pi(e,t):i,a=void 0!==(l=s)&&ri(l)?l.value:null;var l;if("contain"===a||"cover"===a){let e="contain"===a?Math.min(t.width/i,t.height/r):Math.max(t.width/i,t.height/r);return{width:i*e,height:r*e}}let d=o(s,t.width,i),c=o(n,t.height,r);return null===d&&null===c?(d=i,c=r):null===d?d=i/r*c:null===c&&(c=r/i*d),{width:d,height:c}},Dp=(e,t,i,r,s)=>{let n=t.naturalWidth||t.width||s.width,o=t.naturalHeight||t.height||s.height,{width:a,height:l}=Np(Ip(i.maskSize,r),s,n,o),d=Ip(i.maskPosition,r)??[],c=s.left+Pi(mt(d,0),s.width-a),p=s.top+Pi(mt(d,d.length-1),s.height-l),h=Ip(i.maskRepeat,r)??0,u=0===h||2===h,f=0===h||3===h,g=u?Math.ceil((c-s.left)/a):0,m=f?Math.ceil((p-s.top)/l):0,b=u?Math.ceil((s.left+s.width-c)/a):0,y=f?Math.ceil((s.top+s.height-p)/l):0;for(let i=-m;i<=y;i++)for(let r=-g;r<=b;r++)e.drawImage(t,c+r*a,p+i*l,a,l)},Op=(e,t,i)=>{let{width:r,height:s}=i,n=0===t.position.length?[Bi]:t.position,o=Pi(mt(n,0),r),a=Pi(mt(n,n.length-1),s),[l,d]=Dn(t,o,a,r,s);l=Math.max(l,.01),d=Math.max(d,.01);let c=e.canvas.ownerDocument??document,p=Lc(c,l,d,t.stops,ro(t));p&&(e.fillStyle=p.lastColor,e.fillRect(i.left,i.top,i.width,i.height),e.drawImage(p.canvas,i.left+o-l,i.top+a-d,2*l,2*d))},Fp=(e,t,i)=>{let{width:r,height:s}=i;if(r<=0||s<=0)return;if(to(t)||ro(t))return void Op(e,t,i);let n=null;if(1===t.type||3===t.type){let o=t,[a,l,d,c,p]=Pn(o.angle||0,r,s),h=Rn(o.stops,a||1);if(3===t.type){let t=Bc(h);if(!t)return e.fillStyle=_i(mt(h,h.length-1).color),void e.fillRect(i.left,i.top,r,s);n=e.createLinearGradient(i.left+l,i.top+c,i.left+d,i.top+p),t.forEach(e=>n.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}else n=e.createLinearGradient(i.left+l,i.top+c,i.left+d,i.top+p),Rc(h).forEach(e=>n.addColorStop(e.stop,e.color))}else if(5===t.type||6===t.type){let o=t,a=Rn(o.stops,1),l=6===t.type;if(l&&!Bc(a))return e.fillStyle=_i(mt(a,a.length-1).color),void e.fillRect(i.left,i.top,r,s);n=e.createConicGradient(o.angle-Math.PI/2,i.left+r/2,i.top+s/2),((l?Bc(a):null)??Rc(a)).forEach(e=>n.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}n&&(e.fillStyle=n,e.fillRect(i.left,i.top,r,s))},$p=async(e,t,i,r,s)=>{for(let n=0;n<t.length;n++){let o=mt(t,n);if(0===o.type){let t=await s(o.url);t&&Dp(e,t,i,n,r)}else Fp(e,o,r)}},zp=(e,t,i,r,s)=>{let n=0,o=0,a=e,l=t,d=i.left,c=i.top,p=i.width,h=i.height,u=p/h,f=a/l,g=s?Pi(s[0],1):.5,m=s?Pi(s[1],1):.5;return 2===r?f>u?(h=p/f,c+=(i.height-h)*m):(p=h*f,d+=(i.width-p)*g):4===r?f>u?(a=l*u,n+=(e-a)*g):(l=a/u,o+=(t-l)*m):8===r?(a>p?(n+=(a-p)*g,a=p):(d+=(p-a)*g,p=a),l>h?(o+=(l-h)*m,l=h):(c+=(h-l)*m,h=l)):16===r&&((f>u?p:h*f)*(f>u?p/f:h)<Math.min(a,p)*Math.min(l,h)?f>u?(h=p/f,c+=(i.height-h)*m):(p=h*f,d+=(i.width-p)*g):(a>p?(n+=(a-p)*g,a=p):(d+=(p-a)*g,p=a),l>h?(o+=(l-h)*m,l=h):(c+=(h-l)*m,h=l))),{sx:n,sy:o,sw:a,sh:l,dx:d,dy:c,dw:p,dh:h}},_p=(e,t,i)=>e.height<i?new ut(e.left,t.top,e.width,t.height):e,Wp=(e,t,i,r)=>{let s=[],n=t.split("\n");for(let t of n){if(r){s.push(t);continue}let n=t.split(/(\s+)/),o="";for(let t of n){let r=o+t;e.measureText(r).width<=i||""===o?o=r:(s.push(o),o=t)}s.push(o)}return s},Hp=e=>e instanceof Wd||e instanceof _d||e instanceof zd&&"radio"!==e.type&&"checkbox"!==e.type,Vp=e=>{switch(e){case 1:return"center";case 2:return"right";default:return"left"}},jp=(e,t)=>{let i=t>e?t*(1+Math.pow(e/t-1,3)):t;return Math.max(0,e+i)},Up=(e,t)=>{if(0===t)return e;let i=e.map((e,t)=>tc(e)?{x:t%2==0?e.start.x:e.end.x,y:t%2==0?e.end.y:e.start.y,rx:Math.abs(e.end.x-e.start.x),ry:Math.abs(e.end.y-e.start.y)}:{x:e.x,y:e.y,rx:0,ry:0}),r=mt(i,1).x-mt(i,0).x+2*t,s=mt(i,3).y-mt(i,0).y+2*t;if(r<=0||s<=0)return[];let n=i.map(e=>({x:jp(e.rx,t),y:jp(e.ry,t)})),o=(e,t)=>t>0?e/t:1,a=Math.min(1,o(r,mt(n,0).x+mt(n,1).x),o(r,mt(n,3).x+mt(n,2).x),o(s,mt(n,0).y+mt(n,3).y),o(s,mt(n,1).y+mt(n,2).y));return e.map((e,r)=>{let s=mt(i,r),o=s.x+(1===r||2===r?t:-t),l=s.y+(r>=2?t:-t);if(!tc(e))return new Qd(o,l);let d=mt(n,r).x*a,c=mt(n,r).y*a;if(!d||!c)return new Qd(o,l);let p=d/s.rx,h=c/s.ry,u=e=>new Qd(o+(e.x-s.x)*p,l+(e.y-s.y)*h);return new ec(u(e.start),u(e.startControl),u(e.endControl),u(e.end))})},Yp=(e,t,i)=>{let{a:r,b:s,c:n,d:o,e:a,f:l}=e;if(![r,s,n,o,a,l,t,i].every(Number.isFinite))return null;let d=r*o-s*n;if(!Number.isFinite(d)||0===d)return null;let c=(e,t)=>({x:(o*(e-a)-n*(t-l))/d,y:(-s*(e-a)+r*(t-l))/d}),p=[c(0,0),c(t,0),c(t,i),c(0,i)];if(!p.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)))return null;let h=Math.min(...p.map(e=>e.x)),u=Math.min(...p.map(e=>e.y)),f=Math.max(...p.map(e=>e.x)),g=Math.max(...p.map(e=>e.y)),m=r*r+s*s,b=n*n+o*o,y=r*n+s*o,x=Math.sqrt((m+b+Math.hypot(m-b,2*y))/2);if(!Number.isFinite(x)||x<=0)return null;let v=1e-10*Math.max(m,b);return{matrix:e,viewport:new ut(h,u,f-h,g-u),scale:x,uniform:Math.abs(m-b)<=v&&Math.abs(y)<=v}},qp=(e,t,i)=>{e.beginPath(),e.rect(t.left,t.top,t.width,t.height),i.length&&(mp(e,i),e.closePath())},Gp=(e,t)=>{let i=t.spread.number,r=Pc(e.container);return r.width-2*i<=0||r.height-2*i<=0?[]:Up(oc(e.curves),-i)},Kp=async(e,t,i,r,s,n)=>{let o=Pc(t.container),a=i.blur.number/2,l=Math.ceil(3*a)+2,d=i.spread.number,c=dt((i.inset?o:t.container.bounds.add(i.offsetX.number-d,i.offsetY.number-d,2*d,2*d)).add(-l,-l,2*l,2*l),n.viewport,l,n.scale);if(!c.width||!c.height)return!0;let p,h,u=Math.ceil(c.width*n.scale),f=Math.ceil(c.height*n.scale),g=at(s,u,f);if(!g)return!1;try{p=e.canvas.ownerDocument.createElement("canvas"),p.width=u,p.height=f;let s=p.getContext("2d");if(!s)return!1;s.scale(n.scale,n.scale),s.translate(-c.left,-c.top);let o=i.inset?Gp(t,i):Up(sc(t.curves),d),l=Jd(o,i.offsetX.number,i.offsetY.number,0,0);i.inset?qp(s,c,l):bp(s,l),s.fillStyle=_i(i.color),s.fill(i.inset?"evenodd":"nonzero"),h=await ot(p,{functions:[{kind:"blur",value:a}]},1,n.scale,r.signal),e.save();try{i.inset?(bp(e,oc(t.curves)),e.clip()):(qp(e,n.viewport,sc(t.curves)),e.clip("evenodd")),e.drawImage(h,c.left,c.top,h.width/n.scale,h.height/n.scale)}finally{e.restore()}return!0}catch(e){if(!(e instanceof Hc))throw e;return!1}finally{h&&h!==p&&Vc(h),p&&Vc(p),s.pixels-=g}},Xp=async(e,t,i,r,s)=>{if(r.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(zi(i.color))return;let n=i.spread.number;if(!i.inset&&(t.container.bounds.width+2*n<=0||t.container.bounds.height+2*n<=0))return;let o="function"==typeof e.getTransform,a=o?e.getTransform():{a:r.scale,b:0,c:0,d:r.scale,e:-r.x*r.scale,f:-r.y*r.scale},l=Yp(a,e.canvas.width,e.canvas.height);if(!l)return;let{viewport:d}=l;if(i.blur.number>0&&(i.inset||!l.uniform)&&await Kp(e,t,i,r,s,l))return;let c=Pc(t.container);e.save();try{if(i.inset&&0===i.blur.number)return bp(e,oc(t.curves)),e.clip(),qp(e,c,Jd(Gp(t,i),i.offsetX.number,i.offsetY.number,0,0)),e.fillStyle=_i(i.color),void e.fill("evenodd");let r=Math.ceil(2*i.blur.number+Math.abs(n)+Math.abs(i.offsetX.number)+Math.abs(i.offsetY.number))+2,s=i.inset?c.add(-r,-r,2*r,2*r):t.container.bounds.add(-n,-n,2*n,2*n),{a:p,b:h,c:u,d:f,e:g,f:m}=a,b=s.left+s.width,y=s.top+s.height,x=Math.max(p*s.left+u*s.top+g,p*b+u*s.top+g,p*b+u*y+g,p*s.left+u*y+g),v=Math.max(1e4,x+r*l.scale+2);i.inset?(bp(e,oc(t.curves)),e.clip()):(qp(e,d,sc(t.curves)),e.clip("evenodd")),o?e.setTransform(p,h,u,f,g-v,m):e.translate(-v/p,0),i.inset?qp(e,s,Gp(t,i)):bp(e,Up(sc(t.curves),n)),o?e.setTransform(p,h,u,f,g,m):e.translate(v/p,0),e.shadowOffsetX=v+p*i.offsetX.number+u*i.offsetY.number,e.shadowOffsetY=h*i.offsetX.number+f*i.offsetY.number,e.shadowBlur=i.blur.number*l.scale,e.shadowColor=_i(i.color),e.fillStyle="rgb(0, 0, 0)",e.fill(i.inset?"evenodd":"nonzero")}finally{e.restore()}},Jp=class{ctx;context;scale;createFontStyle;constructor(e){this.ctx=e.ctx,this.context=e.context,this.scale=e.scale,this.createFontStyle=e.createFontStyle}async render(e){let t=e.container,i=t.styles,r=t.bounds,s=this.scale;if(r.width<=0||r.height<=0)return;let n=this.ctx.canvas.ownerDocument??document,o=Math.ceil(r.width),a=Math.ceil(r.height),l=Math.ceil(r.width*s),d=Math.ceil(r.height*s),c=this.createLayer(n,l,d);if(!c)return;let p=null,h=null,u=null;try{c.ctx.scale(s,s);let[f]=this.createFontStyle(i);c.ctx.font=f??"",c.ctx.textBaseline="alphabetic",c.ctx.textAlign="left",c.ctx.direction=1===i.direction?"rtl":"ltr";let g=cp(c.ctx,i.fontSize.number),m=new xp({ctx:c.ctx,context:this.context,canvas:c.canvas,options:{width:o,height:a,scale:1}});zi(i.backgroundColor)||(c.ctx.fillStyle=_i(i.backgroundColor),c.ctx.fillRect(0,0,o,a)),c.ctx.save(),c.ctx.translate(-r.left,-r.top),await m.renderBackgroundImage(t),c.ctx.restore();let b={bounds:r,baseline:g,letterSpacing:i.letterSpacing,writingMode:i.writingMode};if(p=this.createGlyphLayer(n,l,d,c.ctx),!p)return;let y=!!i.webkitTextStrokeWidth;y&&(p.ctx.strokeStyle=_i(i.webkitTextStrokeColor),p.ctx.lineWidth=i.webkitTextStrokeWidth,p.ctx.lineJoin=fp());for(let e of t.textNodes)for(let t of e.textBounds)this.drawGlyphs(p,t,b,(e,t,i,r)=>{e.fillText(t,i,r),y&&e.strokeText(t,i,r)});if(c.ctx.globalCompositeOperation="destination-in",c.ctx.drawImage(p.canvas,0,0,o,a),u=this.renderShadowSilhouettes(e,n,l,d,c.ctx,i,b),u){if(h=this.createLayer(n,l,d),!h)return;for(let e of u)h.ctx.drawImage(e,0,0);h.ctx.drawImage(c.canvas,0,0),this.ctx.drawImage(h.canvas,r.left,r.top,r.width,r.height)}else this.ctx.drawImage(c.canvas,r.left,r.top,r.width,r.height)}finally{Vc(c.canvas),p&&Vc(p.canvas),h&&Vc(h.canvas),u&&u.forEach(Vc)}}createLayer(e,t,i){let r=e.createElement("canvas");r.width=t,r.height=i;let s=r.getContext("2d");return s?{canvas:r,ctx:s}:null}createGlyphLayer(e,t,i,r){let s=this.createLayer(e,t,i);return s?(s.ctx.scale(this.scale,this.scale),s.ctx.font=r.font,s.ctx.textBaseline=r.textBaseline,s.ctx.textAlign=r.textAlign,s.ctx.direction=r.direction,s.ctx.fillStyle="#000",s):null}drawGlyphs(e,t,i,r){let s=t.bounds.left-i.bounds.left,n=t.bounds.top-i.bounds.top+i.baseline,{letterSpacing:o,writingMode:a}=i;if(o<=0)return void r(e.ctx,t.text,s,n);if(Aa(a))return void r(e.ctx,t.text,s,n);let l=s;for(let i of vd(t.text))r(e.ctx,i,l,n),l+=e.ctx.measureText(i).width+o}renderShadowSilhouettes(e,t,i,r,s,n,o){let a=n.textShadow;if(!a.length)return null;let l=[];for(let n=a.length-1;n>=0;n--){let d=mt(a,n),c=this.createGlyphLayer(t,i,r,s);if(c){c.ctx.shadowColor=_i(d.color),c.ctx.shadowOffsetX=d.offsetX.number*this.scale,c.ctx.shadowOffsetY=d.offsetY.number*this.scale,c.ctx.shadowBlur=d.blur.number*this.scale,c.ctx.fillStyle=_i(d.color);for(let t of e.container.textNodes)for(let e of t.textBounds)this.drawGlyphs(c,e,o,(e,t,i,r)=>{e.fillText(t,i,r)});l.push(c.canvas)}}return l.length?l:null}},Qp=class e{surfaceRoot;surfaceBudget;canvas;ctx;context;options;backgroundRenderer;borderRenderer;borderImageRenderer;effectsRenderer;textRenderer;textClipRenderer;legacySubtree=!1;constructor(e,t,i,r={pixels:0}){this.surfaceRoot=i,this.surfaceBudget=r,this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement("canvas");let s=this.canvas.getContext("2d");if(!s)throw t.canvas||Vc(this.canvas),i?new Hc("Filter surface canvas is unavailable"):new Error("Failed to get 2D rendering context from canvas");this.ctx=s,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.ctx.textBaseline="bottom",void 0!==t.imageSmoothing&&(this.ctx.imageSmoothingEnabled=t.imageSmoothing),t.imageSmoothingQuality&&(this.ctx.imageSmoothingQuality=t.imageSmoothingQuality),this.backgroundRenderer=new xp({ctx:this.ctx,context:this.context,canvas:this.canvas,options:{width:t.width,height:t.height,scale:t.scale}}),this.borderRenderer=new Mp({ctx:this.ctx},{path:e=>this.path(e),formatPath:e=>this.formatPath(e)}),this.borderImageRenderer=new Bp(this.ctx),this.effectsRenderer=new Pp({ctx:this.ctx,scale:t.scale},{path:e=>this.path(e)}),this.textRenderer=new gp({ctx:this.ctx,options:{scale:t.scale}}),this.textClipRenderer=new Jp({ctx:this.ctx,context:this.context,scale:t.scale,createFontStyle:e=>this.textRenderer.createFontStyle(e)}),this.context.logger.debug(`Canvas renderer initialized (${t.width}x${t.height}) with scale ${t.scale}`)}async renderStack(e){let t=e.element.container.styles;if(t.isVisible()){let i=rt(t.filter),r=null!==i&&i.functions.length>0,s=t.maskImage.length>0,n=t.webkitBoxReflect,o=t.mixBlendMode!==Ka.NORMAL;if(e.element!==this.surfaceRoot&&!this.legacySubtree&&(s||n||o||null!==i&&(r||t.opacity<1))&&this.canComposite(e.element)){if(!await this.renderCompositedStack(e,i,s,n,o)){this.legacySubtree=!0;try{await this.renderStackContent(e)}finally{this.legacySubtree=!1}}return}await this.renderStackContent(e)}}canComposite(e){let t=e=>{let t=e.styles;return!t.isTransformed()&&1===t.zoom&&0===t.clipPath.type&&!Qs(t.display,2048)&&null!==rt(t.filter)},i=e=>t(e)&&e.elements.every(i),r=e.parent;for(;r&&r!==this.surfaceRoot;){if(!t(r.container))return!1;r=r.parent}return i(e.container)}async renderCompositedStack(t,i,r,s,n=!1){let o=this.options.signal;if(o?.aborted)throw new DOMException("The operation was aborted.","AbortError");let a=dt(lt(t.element.container),new ut(this.options.x,this.options.y,this.options.width,this.options.height),i?st(i):0,this.options.scale);if(!a.width||!a.height)return!0;let l=at(this.surfaceBudget,Math.ceil(a.width*this.options.scale),Math.ceil(a.height*this.options.scale));if(!l)return this.context.logger.info("Filter surface budget exceeded; using the existing renderer"),!1;let d,c,p={...this.options,canvas:void 0,backgroundColor:null,x:a.left,y:a.top,width:a.width,height:a.height};try{d=new e(this.context,p,t.element,this.surfaceBudget),await d.renderStackContent(t),d.effectsRenderer.applyEffects([]),i&&(c=await ot(d.canvas,i,t.element.container.styles.opacity,p.scale,o));let l=c??d.canvas;if(r&&await this.applyMask(l,t.element.container.styles,a),o?.aborted)throw new DOMException("The operation was aborted.","AbortError");let h=t.element.effects,u=t.element.getEffects(4,this.surfaceRoot).filter(e=>!h.includes(e)||!xc(e)&&!mc(e)&&!yc(e)&&!gc(e));return this.effectsRenderer.applyEffects(u),n?(this.ctx.save(),this.ctx.globalCompositeOperation=t.element.container.styles.mixBlendMode,this.ctx.drawImage(l,p.x,p.y,l.width/p.scale,l.height/p.scale),this.ctx.restore()):this.ctx.drawImage(l,p.x,p.y,l.width/p.scale,l.height/p.scale),s&&await this.drawReflection(l,t.element.container.bounds,a,s),!0}catch(e){if(!(e instanceof Hc))throw e;return this.context.logger.info(`${e.message}; using the existing renderer`),!1}finally{d&&Vc(d.canvas),c&&Vc(c),this.surfaceBudget.pixels-=l}}async applyMask(e,t,i){let r=e.getContext("2d");if(!r)return;let s=this.context.resourceDocument.createElement("canvas");s.width=e.width,s.height=e.height;let n=s.getContext("2d");if(n){n.scale(this.options.scale,this.options.scale),n.translate(-i.left,-i.top);try{await $p(n,t.maskImage,t,{left:i.left,top:i.top,width:i.width,height:i.height},async e=>await this.context.cache.match(e))}catch(e){return void this.context.logger.error(`Error rendering mask-image: ${e instanceof Error?e.message:e}`)}r.save();try{r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation="destination-in",r.drawImage(s,0,0)}finally{r.restore()}}}async drawReflection(e,t,i,r){let s=this.options.scale,n=Math.ceil(t.width*s),o=Math.ceil(t.height*s);if(n<=0||o<=0)return;let a,l,d=at(this.surfaceBudget,n,o);if(d)try{a=this.context.resourceDocument.createElement("canvas"),a.width=n,a.height=o;let d=a.getContext("2d");if(!d)return;let c=Math.round((t.left-i.left)*s),p=Math.round((t.top-i.top)*s),h="left"===r.direction||"right"===r.direction;d.save();try{h?(d.translate(n,0),d.scale(-1,1)):(d.translate(0,o),d.scale(1,-1)),d.drawImage(e,-c,-p)}finally{d.restore()}if(r.mask){l=this.context.resourceDocument.createElement("canvas"),l.width=n,l.height=o;let e=l.getContext("2d");if(e){e.scale(s,s),await $p(e,[r.mask],{maskPosition:[],maskRepeat:[],maskSize:[]},{left:0,top:0,width:t.width,height:t.height},async e=>await this.context.cache.match(e)),d.save();try{h?(d.translate(n,0),d.scale(-1,1)):(d.translate(0,o),d.scale(1,-1)),d.globalCompositeOperation="destination-in",d.drawImage(l,0,0,n,o)}finally{d.restore()}}}let u=r.offset,f=t.left,g=t.top;"below"===r.direction?g=t.top+t.height+u:"above"===r.direction?g=t.top-t.height-u:f="right"===r.direction?t.left+t.width+u:t.left-t.width-u,this.ctx.save();try{this.ctx.filter="none",this.ctx.drawImage(a,f,g,t.width,t.height)}finally{this.ctx.restore()}}finally{a&&Vc(a),l&&Vc(l),this.surfaceBudget.pixels-=d}}async renderNode(e){e.container.debugRender,e.container.styles.isVisible()&&(await this.renderNodeBackgroundAndBorders(e),await this.renderNodeContent(e))}renderReplacedElement(e,t,i){let r=i.naturalWidth||e.intrinsicWidth,s=i.naturalHeight||e.intrinsicHeight;if(i&&r>0&&s>0){let n=Ic(e),o=oc(t);this.path(o),this.ctx.save(),this.ctx.clip();let{sx:a,sy:l,sw:d,sh:c,dx:p,dy:h,dw:u,dh:f}=zp(r,s,n,e.styles.objectFit,e.styles.objectPosition);this.ctx.drawImage(i,a,l,d,c,p,h,u,f),this.ctx.restore()}}async renderNodeContent(t){this.effectsRenderer.applyEffects(t.getEffects(4,this.surfaceRoot));let i=t.container,r=t.curves,s=i.styles,n=Ic(i);for(let e of i.textNodes)await this.textRenderer.renderTextNode(e,s,n);await async function(t,i,r,s,n,o,a,l){if(n instanceof Ad)try{let e=await i.cache.match(n.src),r=t.imageSmoothingEnabled;2===a.imageRendering||1===a.imageRendering?t.imageSmoothingEnabled=!1:3===a.imageRendering&&(t.imageSmoothingEnabled=!0),l(n,o,e),t.imageSmoothingEnabled=r}catch{i.logger.error(`Error loading image ${n.src}`)}if(n instanceof Td&&l(n,o,n.canvas),n instanceof Ld)try{l(n,o,await i.cache.match(n.svg))}catch{i.logger.error(`Error loading svg ${n.svg.substring(0,255)}`)}if(n instanceof Hd&&n.tree){let s=await((t,i)=>new e(t,i))(i,{scale:r.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}).render(n.tree);n.width&&n.height&&t.drawImage(s,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height)}}(this.ctx,this.context,{scale:this.options.scale,backgroundColor:this.options.backgroundColor,x:this.options.x,y:this.options.y,width:this.options.width,height:this.options.height},0,i,r,s,(e,t,i)=>this.renderReplacedElement(e,t,i)),function(e,t,i,r,s){if(r instanceof zd){let t=Math.min(r.bounds.width,r.bounds.height);"checkbox"===r.type&&r.checked?(e.save(),i([new Qd(r.bounds.left+.39363*t,r.bounds.top+.79*t),new Qd(r.bounds.left+.16*t,r.bounds.top+.5549*t),new Qd(r.bounds.left+.27347*t,r.bounds.top+.44071*t),new Qd(r.bounds.left+.39694*t,r.bounds.top+.5649*t),new Qd(r.bounds.left+.72983*t,r.bounds.top+.23*t),new Qd(r.bounds.left+.84*t,r.bounds.top+.34085*t),new Qd(r.bounds.left+.39363*t,r.bounds.top+.79*t)]),e.fillStyle=_i(r.styles.accentColor??7733247),e.fill(),e.restore()):"radio"===r.type&&r.checked&&(e.save(),e.beginPath(),e.arc(r.bounds.left+t/2,r.bounds.top+t/2,t/4,0,2*Math.PI,!0),e.fillStyle=_i(r.styles.accentColor??7733247),e.fill(),e.restore())}if(Hp(r)&&r.value.length){let[n]=t.createFontStyle(s);e.font=n??"";let o=Pi(s.fontSize,0),{baseline:a,height:l}=dp(e,o);e.fillStyle=r instanceof zd&&r.isPlaceholder?_i(1970632191):_i(s.color),e.textBaseline="alphabetic",e.textAlign=Vp(r.styles.textAlign);let d=Ic(r),c=r instanceof zd?_p(d,Pc(r),l):d,p=0;switch(r.styles.textAlign){case 1:p+=d.width/2;break;case 2:p+=d.width}let h=0;r instanceof zd&&(h=(d.height-l)/2);let u=d.add(p,h,0,0);e.save(),i([new Qd(c.left,c.top),new Qd(c.left+c.width,c.top),new Qd(c.left+c.width,c.top+c.height),new Qd(c.left,c.top+c.height)]),e.clip();let f=Wp(e,r.value,d.width,"pre"===s.whiteSpace||"nowrap"===s.whiteSpace),g=ea(s.lineHeight,o);f.forEach((i,r)=>{let n=u.left,o=e.measureText(i).width;switch(s.textAlign){case 1:n+=(d.width-o)/2;break;case 2:n+=d.width-o}let l=new ut(n,u.top+r*g,0,0);t.renderTextWithLetterSpacing(new fd(i,l),s.letterSpacing,a,s.writingMode)}),e.restore(),e.textBaseline="alphabetic",e.textAlign="left"}}(this.ctx,this.textRenderer,this.path.bind(this),i,s),await async function(e,t,i,r,s,n){if(Qs(s.styles.display,2048))if(null!==s.styles.listStyleImage){let i=s.styles.listStyleImage;if(0===i.type){let r=i.url;try{let i=await t.cache.match(r),o=Pi(n.fontSize,0),a=i?.naturalWidth||i.width,l=i?.naturalHeight||i.height;if(a<=0||l<=0)return;let d=Math.min(o/a,o/l),c=a*d,p=l*d,h=s.bounds.top+Pi(s.styles.paddingTop,s.bounds.width)+ea(n.lineHeight,n.fontSize.number)/2;e.drawImage(i,s.bounds.left-(c+10),h-p/2,c,p)}catch{t.logger.error(`Error loading list-style-image ${r}`)}}}else if(r.listValue&&-1!==s.styles.listStyleType){let t=s.styles.listStyleType;if(0===t||1===t||2===t){let i=.45*n.fontSize.number,r=s.bounds.left-.9*i,o=s.bounds.top+Pi(s.styles.paddingTop,s.bounds.width)+ea(n.lineHeight,n.fontSize.number)/2;e.save(),e.fillStyle=_i(n.color),e.beginPath(),2===t?e.rect(r-i/2,o-i/2,i,i):(e.arc(r,o,i/2,0,2*Math.PI),1===t&&(e.strokeStyle=_i(n.color),e.lineWidth=.18*i)),1===t?e.stroke():e.fill(),e.restore()}else{let[t]=i.createFontStyle(n);e.font=t??"",e.fillStyle=_i(n.color),e.textBaseline="middle",e.textAlign="right";let o=new ut(s.bounds.left,s.bounds.top+Pi(s.styles.paddingTop,s.bounds.width),s.bounds.width,ea(n.lineHeight,n.fontSize.number)/2+1);i.renderTextWithLetterSpacing(new fd(r.listValue,o),n.letterSpacing,ea(n.lineHeight,n.fontSize.number)/2+2,n.writingMode),e.textBaseline="bottom",e.textAlign="left"}}}(this.ctx,this.context,this.textRenderer,t,i,s)}async renderStackContent(e){e.element.container.debugRender;let t=this.options.signal;await this.renderNodeBackgroundAndBorders(e.element);for(let i of e.negativeZIndex){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderNodeContent(e.element);for(let t of e.nonInlineLevel)await this.renderNode(t);for(let i of e.nonPositionedFloats){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let i of e.nonPositionedInlineLevel){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let t of e.inlineLevel)await this.renderNode(t);for(let i of e.zeroOrAutoZIndexOrTransformedOrOpacity){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let i of e.positiveZIndex){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}}path(e){bp(this.ctx,e)}formatPath(e){mp(this.ctx,e)}async renderSurfaceBoxShadow(e,t){let i=t.spread.number,r=t.blur.number/2,s=Math.ceil(3*r)+1,n=e.container.bounds.add(-i,-i,2*i,2*i);if(n.width<=0||n.height<=0)return;let o=this.options.scale,a=dt(n.add(-s,-s,2*s,2*s),new ut(this.options.x-t.offsetX.number,this.options.y-t.offsetY.number,this.options.width,this.options.height),s,o);if(!a.width||!a.height)return;let l,d,c=Math.ceil(a.width*o),p=Math.ceil(a.height*o),h=at(this.surfaceBudget,c,p);if(!h)throw new Hc("Box shadow surface budget exceeded");try{l=this.context.resourceDocument.createElement("canvas"),l.width=c,l.height=p;let s=l.getContext("2d");if(!s)throw new Hc("Box shadow surface canvas is unavailable");s.scale(o,o),s.translate(-a.left,-a.top),bp(s,Jd(sc(e.curves),-i,-i,2*i,2*i)),s.fillStyle=_i(t.color),s.fill(),d=await ot(l,{functions:[{kind:"blur",value:r}]},1,o,this.options.signal),this.ctx.save();try{this.ctx.beginPath(),this.ctx.rect(this.options.x,this.options.y,this.options.width,this.options.height),mp(this.ctx,sc(e.curves)),this.ctx.closePath(),this.ctx.clip("evenodd"),this.ctx.drawImage(d,a.left+t.offsetX.number,a.top+t.offsetY.number,d.width/o,d.height/o)}finally{this.ctx.restore()}}finally{l&&Vc(l),d&&Vc(d),this.surfaceBudget.pixels-=h}}async renderNodeBackgroundAndBorders(e){this.effectsRenderer.applyEffects(e.getEffects(2,this.surfaceRoot)),!this.surfaceRoot&&e.container.styles.backdropFilter&&await this.renderBackdropFilter(e);let t=e.container.styles,i=!zi(t.backgroundColor)||t.backgroundImage.length,r=eh(t),s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],n=_c(t.backgroundClip,0),o=Zp(n,e.curves);if(i||t.boxShadow.length){r&&e.container.textNodes.length>0?await this.textClipRenderer.render(e):(this.ctx.save(),this.path(o),this.ctx.clip(),zi(t.backgroundColor)||(this.ctx.fillStyle=_i(t.backgroundColor),this.ctx.fill()),await this.backgroundRenderer.renderBackgroundImage(e.container),this.ctx.restore());for(let i of t.boxShadow.slice(0).reverse())!this.surfaceRoot||i.inset?await Xp(this.ctx,e,i,this.options,this.surfaceBudget):await this.renderSurfaceBoxShadow(e,i)}if(t.borderImageSource){let i=t.borderImageSource,r=e.container.bounds,s=[Math.max(0,t.borderTopWidth),Math.max(0,t.borderRightWidth),Math.max(0,t.borderBottomWidth),Math.max(0,t.borderLeftWidth)],n=null;if(0===i.type){let e=i.url;try{n=await this.context.cache.match(e)??null}catch{this.context.logger.error(`Error loading border-image ${e}`)}}else n=this.rasterizeGradientSource(i,r);if(n){let e=Tp(t.borderImageOutset,s),i=r.add(-e.left,-e.top,e.left+e.right,e.top+e.bottom),o=Ap(t.borderImageWidth,s,i);this.borderImageRenderer.renderBorderImage(r,n,t.borderImageSlice,t.borderImageRepeat,o[0],o[1],o[2],o[3],e)}return}let a=0;for(let t of s){if(0!==t.style&&!zi(t.color)&&t.width>0){let i=async()=>{2===t.style?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,a,e.curves,2):3===t.style?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,a,e.curves,3):4===t.style?await this.borderRenderer.renderDoubleBorder(t.color,t.width,a,e.curves):await this.borderRenderer.renderSolidBorder(t.color,a,e.curves)},r=e.container.legendBounds;if(0===a&&r){let t=e.container.bounds,s=r.left-t.left,n=r.left+r.width-t.left;s>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,s,t.height),this.ctx.clip(),await i(),this.ctx.restore());let o=t.left+n,a=t.width-n;a>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(o,t.top,a,t.height),this.ctx.clip(),await i(),this.ctx.restore())}else await i()}a++}this.renderOutline(e)}renderOutline(e){let t=e.container.styles;if(0===t.outlineStyle||1===t.outlineStyle)return;let i=Math.max(0,t.outlineWidth);if(i<=0)return;let r=t.outlineColor??t.color;if(zi(r))return;let s=Math.max(0,t.outlineOffset)+i/2,n=Jd(sc(e.curves),-s,-s,2*s,2*s);this.ctx.save();try{this.ctx.strokeStyle=_i(r),this.ctx.lineWidth=i,3===t.outlineStyle?this.ctx.setLineDash([3*i,3*i]):4===t.outlineStyle&&this.ctx.setLineDash([i,2*i]),this.path(n),this.ctx.stroke()}finally{this.ctx.restore()}}rasterizeGradientSource(e,t){let i=Math.max(1,Math.ceil(t.width)),r=Math.max(1,Math.ceil(t.height)),s=(this.ctx.canvas.ownerDocument??document).createElement("canvas");s.width=i,s.height=r;let n=s.getContext("2d");if(!n)return null;if(1===e.type||3===e.type){let t=e,[o,a,l,d,c]=Pn(t.angle,i,r),p=Rn(t.stops,o||i),h=3===e.type,u=h?Bc(p):null,f=n.createLinearGradient(a,l,d,c);if(u)u.forEach(e=>{f.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)});else if(h){let e=_i(mt(p,p.length-1).color);f.addColorStop(0,e),f.addColorStop(1,e)}else Rc(p).forEach(e=>{f.addColorStop(e.stop,e.color)});return n.fillStyle=f,n.fillRect(0,0,i,r),s}if(2===e.type||4===e.type){let t=e,o=0===t.position.length?[Bi]:t.position,a=Pi(mt(o,0),i),l=Pi(mt(o,o.length-1),r),[d,c]=Dn(t,a,l,i,r);if(d<=0||c<=0)return null;let p=this.ctx.canvas.ownerDocument??document,h=Lc(p,d,c,t.stops,4===e.type);return h?(n.fillStyle=h.lastColor,n.fillRect(0,0,i,r),n.drawImage(h.canvas,a-d,l-c,2*d,2*c),s):null}if(5===e.type||6===e.type){let t,o=e,a=Pi(mt(o.position,0),i),l=Pi(mt(o.position,1),r),d=n.createConicGradient(o.angle-Math.PI/2,a,l);if(6===e.type){let e=Rn(o.stops,1),i=mt(e,0),r=mt(e,e.length-1),s=Math.max(r.stop-i.stop,.01);t=[];let n=Math.ceil(1/s);for(let r=0;r<n;r++)for(let n of e){let e=r*s+(n.stop-i.stop);if(e>1)break;t.push({stop:e,color:_i(n.color)})}let a=mt(t,t.length-1);a&&a.stop<1&&t.push({stop:1,color:a.color})}else t=Rn(o.stops,Math.max(i,r)).map(e=>({stop:e.stop,color:_i(e.color)}));return t.forEach(e=>{d.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),n.fillStyle=d,n.fillRect(0,0,i,r),s}return this.context.logger.warn("Unsupported border-image source; only URL and gradient images are supported"),null}async renderBackdropFilter(e){let t=rt(e.container.styles.backdropFilter);if(!t||0===t.functions.length)return;let i=e.container.bounds;if(i.width<=0||i.height<=0)return;let r=this.options.scale,s=Math.ceil(i.width*r),n=Math.ceil(i.height*r);if(s<=0||n<=0)return;let o,a,l=at(this.surfaceBudget,s,n);if(l)try{o=this.context.resourceDocument.createElement("canvas"),o.width=s,o.height=n;let e=o.getContext("2d");if(!e)return;let l=Math.round((i.left-this.options.x)*r),d=Math.round((i.top-this.options.y)*r);e.drawImage(this.canvas,l,d,s,n,0,0,s,n);try{a=await ot(o,t,1,r,this.options.signal)}catch(e){if(e instanceof Hc)return void this.context.logger.info(`${e.message}; rendering without the backdrop effect`);throw e}if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");this.ctx.save();try{this.ctx.filter="none",this.ctx.drawImage(a,i.left,i.top,i.width,i.height)}finally{this.ctx.restore()}}finally{o&&Vc(o),a&&Vc(a),this.surfaceBudget.pixels-=l}}async render(e){try{this.options.backgroundColor&&(this.ctx.fillStyle=_i(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height));let t=Ac(e);return await this.renderStack(t),this.effectsRenderer.applyEffects([]),this.canvas}catch(e){throw this.options.canvas||Vc(this.canvas),e}}},Zp=(e,t)=>{switch(e){case 0:return sc(t);case 2:return nc(t);default:return oc(t)}},eh=e=>e.backgroundClip.some(e=>3===e),th=class{canvas;ctx;options;context;constructor(e,t){this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement("canvas");let i=this.canvas.getContext("2d");if(!i)throw new Error("Failed to get 2D rendering context from canvas");this.ctx=i,this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`,this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (${t.width}x${t.height} at ${t.x},${t.y}) with scale ${t.scale}`)}async render(e){if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");let t=rh(e),i=pd(this.options.width,this.options.height,0,0,e),r=hd(i);t();let s=await r;if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");return this.options.backgroundColor&&(this.ctx.fillStyle=_i(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),this.ctx.drawImage(s,this.options.x,this.options.y,this.options.width,this.options.height),this.canvas}},ih=["marginTop","marginRight","marginBottom","marginLeft","top","right","bottom","left"],rh=e=>{let t=e.style,i=ih.map(e=>[e,t[e]]);for(let e of ih)t[e]=e.startsWith("margin")?"0px":"auto";return()=>{for(let[e,r]of i)t[e]=r}},sh=class{id;enabled;start;constructor({id:e,enabled:t}){this.id=e,this.enabled=t,this.start=Date.now()}debug(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.debug?(this.id,this.getTime()):this.info(...e))}getTime(){return Date.now()-this.start}info(...e){this.enabled&&typeof window<"u"&&window.console&&"function"==typeof console.info&&(this.id,this.getTime())}warn(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.warn?console.warn(this.id,`${this.getTime()}ms`,...e):this.info(...e))}error(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.error?console.error(this.id,`${this.getTime()}ms`,...e):this.info(...e))}},nh=class{context;_options;_cache=new Map;maxSize;_pendingOperations=new Map;_deferMode=!1;_collectedUrls=new Set;_evictionSuspendCount=0;get _evictionEnabled(){return 0===this._evictionSuspendCount}constructor(e,t){if(this.context=e,this._options=t,this.maxSize=t.maxCacheSize??100,this.maxSize<1)throw new Error("Cache maxSize must be at least 1");this.maxSize>1e4&&this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`)}startDefer(){this._deferMode=!0,this._evictionSuspendCount++}async preloadAll(e=10,t,i){this._deferMode=!1;let r=Array.from(this._collectedUrls);this._collectedUrls.clear();try{if(0===r.length)return;let s=Math.max(1,Math.min(e,100));this.context.logger.debug(`Preloading ${r.length} image(s) with concurrency ${s}`);let n=0,o=i?new Promise((e,t)=>{let r=()=>t(new DOMException("The operation was aborted.","AbortError"));i.aborted?r():i.addEventListener("abort",r,{once:!0})}):null;o?.catch(()=>{}),t?.(0,r.length);for(let e=0;e<r.length;e+=s){Yl(i);let a=r.slice(e,e+s);a.map(e=>this._addImageWithPending(e));let l=Promise.allSettled(a.map(e=>this._cache.get(e)?.value??Promise.resolve()));await(o?Promise.race([l,o]):l),n+=a.length,t?.(n,r.length)}}finally{this._evictionSuspendCount=Math.max(0,this._evictionSuspendCount-1)}}addImage(e){if(this._deferMode)return!this.has(e)&&(hh(e)||dh(e))&&this._collectedUrls.add(e),Promise.resolve();let t=this._pendingOperations.get(e);if(t)return t;if(this.has(e)){let t=this._cache.get(e);return this._cache.delete(e),this._cache.set(e,t),Promise.resolve()}return hh(e)||dh(e)?this._addImageWithPending(e):Promise.resolve()}_addImageWithPending(e){let t=this._pendingOperations.get(e);if(t)return t;let i=this._addImageInternal(e);return this._pendingOperations.set(e,i),i.finally(()=>{this._pendingOperations.delete(e)}),i}async _addImageInternal(e){let t=this._options.imageTimeout??15e3,i=this.withTimeout(this.loadImage(e),t,`Timed out (${t}ms) loading image`);i.catch(t=>{let i=t instanceof Error?t.message:String(t),r=`Failed to load image ${e.substring(0,256)}: ${i}`;this.context.logger.error(r),this.context.onError?.(new Error(r))}),this.set(e,i)}withTimeout(e,t,i){if(t<=0)return e;let r,s=new Promise((e,s)=>{r=setTimeout(()=>s(new Error(i)),t)});return Promise.race([e,s]).finally(()=>{void 0!==r&&clearTimeout(r)})}match(e){let t=this._cache.get(e);if(t)return this._cache.delete(e),this._cache.set(e,t),t.value}set(e,t){if(this._cache.has(e))this._cache.delete(e);else if(this._evictionEnabled&&this._cache.size>=this.maxSize){let e=this._cache.keys().next().value;void 0!==e&&(this._cache.delete(e),this.context.logger.debug(`Cache: Evicted LRU entry: ${e}`))}this._cache.set(e,{value:t})}size(){return this._cache.size}getMaxSize(){return this.maxSize}clear(){this._cache.clear()}async loadImage(e){let t=this.context.originChecker,i=e=>t.isSameOrigin(e),r="function"==typeof this._options.customIsSameOrigin?await this._options.customIsSameOrigin(e,i):i(e),s=!r&&!1===this._options.allowTaint&&!ch(e)&&!hh(e)&&"string"!=typeof this._options.proxy,n=!ch(e)&&(!0===this._options.useCORS||s)&&ud.SUPPORT_CORS_IMAGES&&!r,o=!(ch(e)||r||hh(e)||"string"!=typeof this._options.proxy||n);if(!(r||!1!==this._options.allowTaint||ch(e)||hh(e)||o||n))return;let a=e;o&&(a=await this.proxy(a)),this.context.logger.debug(`Added image ${e.substring(0,256)}`);let l=this.context.config.window.Image??Image;return await new Promise((e,t)=>{let i=new l;i.onload=()=>e(i),i.onerror=t,(ph(a)||n)&&(i.crossOrigin="anonymous"),i.src=a,!0===i.complete&&("function"==typeof i.decode?i.decode().then(()=>e(i),()=>t(new Error(`Failed to decode image ${a.substring(0,256)}`))):setTimeout(()=>e(i),500))})}has(e){return this._cache.has(e)}keys(){return Promise.resolve(Array.from(this._cache.keys()))}proxy(e){let t=this._options.proxy;if(!t)throw new Error("No proxy defined");let i=e.substring(0,256);return new Promise((r,s)=>{let n=new XMLHttpRequest;n.onload=()=>{if(200===n.status){let e=new FileReader;e.addEventListener("load",()=>r(e.result),!1),e.addEventListener("error",e=>s(e),!1),e.readAsDataURL(n.response)}else s(`Failed to proxy resource ${i} with status code ${n.status}`)},n.onerror=s;let o=t.indexOf("?")>-1?"&":"?";if(n.open("GET",`${t}${o}url=${encodeURIComponent(e)}&responseType=blob`),n.responseType="blob",this._options.imageTimeout){let e=this._options.imageTimeout;n.timeout=e,n.ontimeout=()=>s(`Timed out (${e}ms) proxying ${i}`)}n.send()})}},oh=/^data:image\/svg\+xml/i,ah=/^data:image\/.*;base64,/i,lh=/^data:image\/.*/i,dh=e=>ud.SUPPORT_SVG_DRAWING||!uh(e),ch=e=>lh.test(e),ph=e=>ah.test(e),hh=e=>"blob"===e.substring(0,4),uh=e=>"svg"===e.slice(-3).toLowerCase()||oh.test(e),fh=class{baseUri;origin;constructor(e){if(!e||!e.document)throw new Error("Valid window object required for OriginChecker");if(!e.location||!e.location.href)throw new Error("Window object must have valid location");this.baseUri=e.location.href,this.origin=this.getOrigin(e.location.href)}getOrigin(e){try{return new URL(e,this.baseUri).origin}catch{return""}}isSameOrigin(e){return this.getOrigin(e)===this.origin}getContextOrigin(){return this.origin}},gh=class e{static instanceCount=1;instanceName="#"+e.instanceCount++;logger;cache;originChecker;config;onError;_windowBounds;constructor(e,t,i){this.config=i,this.logger=new sh({id:this.instanceName,enabled:e.logging}),this.originChecker=new fh(i.window),this.cache=e.cache??i.cache??new nh(this,e),this.onError=e.onError,this._windowBounds=t}get windowBounds(){return this._windowBounds}get resourceDocument(){return this.config.window.document||(typeof document<"u"?document:void 0)}adjustWindowBounds(e,t){this._windowBounds=this._windowBounds.add(e,t,0,0)}},mh=e=>{["scale","width","height","imageTimeout","x","y","windowWidth","windowHeight","scrollX","scrollY"].forEach(t=>{let i=e[t];if(null!=i&&"number"!=typeof i){let r=Number(i);Number.isNaN(r)||(e[t]=r)}})},bh=e=>({allowTaint:e.allowTaint??!1,imageTimeout:e.imageTimeout??15e3,proxy:e.proxy,useCORS:e.useCORS??!1,customIsSameOrigin:e.customIsSameOrigin,maxCacheSize:e.maxCacheSize}),yh=(e,t,i)=>({logging:e.logging??!0,cache:e.cache??t.cache,...i}),xh=(e,t)=>{let i=t;return{windowWidth:e.windowWidth??i.innerWidth??800,windowHeight:e.windowHeight??i.innerHeight??600,scrollX:e.scrollX??i.pageXOffset??0,scrollY:e.scrollY??i.pageYOffset??0}},vh=(e,t,i)=>({allowTaint:e.allowTaint??!1,onclone:e.onclone,ignoreElements:e.ignoreElements,iframeContainer:e.iframeContainer,inlineImages:i,copyStyles:i,cspNonce:e.cspNonce??t.cspNonce,signal:e.signal}),wh=(e,t,i,r,s,n,o)=>({canvas:e.canvas,backgroundColor:t,signal:e.signal,scale:e.scale??o??1,x:(e.x??0)+i,y:(e.y??0)+r,width:e.width??Math.ceil(s),height:e.height??Math.ceil(n),imageSmoothing:e.imageSmoothing,imageSmoothingQuality:e.imageSmoothingQuality}),kh=(e,t,i)=>{let r=t.ownerDocument,s=r.documentElement?As(e,getComputedStyle(r.documentElement).backgroundColor):0,n=r.body?As(e,getComputedStyle(r.body).backgroundColor):0,o="string"==typeof i?As(e,i):null===i?0:4294967295;return t===r.documentElement?zi(s)?zi(n)?o:n:s:o},Ch=(e,t,i,r)=>{if(e)try{e(i,r)}catch(e){t.logger.error(`onProgress callback failed: ${e instanceof Error?e.message:String(e)}`)}},Sh=async(e,t,i)=>{if(mh(t),!t.skipValidation){let i=t.validator||tt(),r=i.validateElement(e);if(!r.valid)throw new Error(r.error);let s=i.validateOptions(t);if(!s.valid)throw new Error(`Invalid options: ${s.error}`)}if(!e||"object"!=typeof e)throw new Error("Invalid element provided as first argument");let r=e.ownerDocument;if(!r)throw new Error("Element is not attached to a Document");let s=r.defaultView;if(!s)throw new Error("Document is not attached to a Window");let n=bh(t),o=yh(t,i,n),a=xh(t,s),l=new ut(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),d=new gh(o,l,i),c=t.enablePerformanceMonitoring??t.logging??!1,p=new ht(d,c);p.start("total",{width:a.windowWidth,height:a.windowHeight});let h=t.signal;Yl(h);let u=t.foreignObjectRendering??!1,f=vh(t,i,u);d.logger.debug(`Starting document clone with size ${l.width}x${l.height} scrolled to ${-l.left},${-l.top}`),Ch(t.onProgress,d,"clone",10),p.start("clone");let g=new nd(d,e,f),m=g.clonedReferenceElement;if(!m)throw new Error("Unable to find element in cloned iframe");let b=await g.toIFrame(r,l);p.end("clone"),Ch(t.onProgress,d,"clone",30),h?.aborted&&((t.removeContainer??!0)&&nd.destroy(b),Yl(h));let y,x,{width:v,height:w,left:k,top:C}=Os(m)||Ns(m)?gt(m.ownerDocument):ft(d,m),S=kh(d,m,t.backgroundColor),E=wh(t,S,k,C,v,w,s.devicePixelRatio??1);try{u?(d.logger.debug("Document cloned, using foreign object rendering"),p.start("render-foreignobject"),y=await new th(d,E).render(m),p.end("render-foreignobject")):(d.logger.debug(`Document cloned, element located at ${k},${C} with size ${v}x${w} using computed rendering`),d.logger.debug("Starting DOM parsing"),p.start("parse"),Yl(h),d.cache.startDefer(),x=qd(d,m,{normalizeDom:t.normalizeDom}),p.end("parse"),Ch(t.onProgress,d,"parse",50),p.start("preload"),await d.cache.preloadAll(10,(e,i)=>{Ch(t.onProgress,d,"preload",50+Math.round(e/i*10))},h),p.end("preload"),Ch(t.onProgress,d,"layout",60),S===x.styles.backgroundColor&&(x.styles.backgroundColor=0),d.logger.debug(`Starting renderer for element at ${E.x},${E.y} with size ${E.width}x${E.height}`),p.start("render"),Yl(h),y=await new Qp(d,E).render(x),p.end("render")),Ch(t.onProgress,d,"render",90)}finally{p.start("cleanup");try{x&&x.restoreTree()}finally{(t.removeContainer??!0)&&nd.destroy(b),p.end("cleanup")}}return p.end("total"),d.logger.debug("Finished rendering"),c&&p.logSummary(),Ch(t.onProgress,d,"render",100),y},Eh=(e,t={},i)=>{let r=i||ct.fromElement(e,{cspNonce:t.cspNonce,cache:t.cache});return Sh(e,t,r)}}),Th=i(()=>{Mh={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedbacks","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedbacks for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedbacks","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.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":"{count} feedback markers displayed","fab.badge":"{count} unresolved feedbacks","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":"{count} unresolved feedbacks","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":"{count} feedbacks","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 feedbacks","shortcuts.resolve":"Resolve / Reopen","shortcuts.delete":"Delete","shortcuts.search":"Focus search","shortcuts.select":"Toggle selection","shortcuts.help":"Show shortcuts","shortcuts.close":"Close","shortcuts.hint":"Keyboard shortcuts","export.label":"Export","export.csv":"Export CSV","export.json":"Export JSON"}}),Bh={};r(Bh,{de:()=>Rh});var Rh,Lh=i(()=>{Rh={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping-Feedback-Panel","panel.feedbackList":"Feedbackliste","panel.loading":"Feedbacks werden geladen","panel.close":"Panel schlie\xdfen","panel.deleteAll":"Alle l\xf6schen","panel.deleteAllConfirmTitle":"Alle l\xf6schen","panel.deleteAllConfirmMessage":"Alle Feedbacks f\xfcr dieses Projekt l\xf6schen? Diese Aktion kann nicht r\xfcckg\xe4ngig gemacht werden.","panel.search":"Suchen...","panel.searchAria":"Feedbacks suchen","panel.filterAll":"Alle","panel.loadError":"Laden fehlgeschlagen","panel.retry":"Erneut versuchen","panel.empty":"Noch kein Feedback","panel.showMore":"Mehr anzeigen","panel.notOnPage":"Auf dieser Seite nicht sichtbar","panel.showLess":"Weniger anzeigen","panel.resolve":"Erledigen","panel.reopen":"Wieder \xf6ffnen","panel.delete":"L\xf6schen","panel.cancel":"Abbrechen","panel.confirmDelete":"L\xf6schen","panel.loadMore":"Mehr laden ({remaining} verbleibend)","panel.statusAll":"Alle","panel.statusOpen":"Offen","panel.statusResolved":"Erledigt","panel.statusInProgress":"In Arbeit","panel.statusWontFix":"Wird nicht behoben","panel.statusClosed":"Geschlossen","type.label":"Typ","type.question":"Frage","type.change":"\xc4nderung","type.bug":"Fehler","type.other":"Sonstiges","status.label":"Status","scope.label":"Bereich","scope.thisPage":"Diese Seite","scope.thisType":"Dieser Typ","scope.all":"Alle Seiten","panel.filterMine":"Meine","panel.filterMineHint":"Nur das Feedback, das von diesem Browser gesendet wurde","fab.aria":"Siteping \u2014 Feedback-Men\xfc","fab.messages":"Seitenleiste anzeigen","fab.annotate":"Neue Anmerkung erstellen","fab.annotations":"Markierungen ein- oder ausblenden","annotator.instruction":"Zeichne ein Rechteck um den Bereich, den du kommentieren m\xf6chtest \u2014 oder dr\xfccke die Eingabetaste, um das zuletzt fokussierte Element zu kommentieren","annotator.instantInstruction":"Kommentar zur angeklickten Stelle","annotator.touchInstruction":"Tippe auf ein Element oder ziehe, um einen Bereich auszuw\xe4hlen","annotator.cancel":"Abbrechen","popup.ariaLabel":"Feedbackformular","popup.placeholder":"Beschreibe dein Feedback...","popup.textareaAria":"Feedbacknachricht","popup.submitHintMac":"\u2318+Enter zum Senden","popup.submitHintOther":"Strg+Enter zum Senden","popup.cancel":"Abbrechen","popup.submit":"Senden","identity.title":"Identifiziere dich","identity.nameLabel":"Name","identity.namePlaceholder":"Dein Name","identity.emailLabel":"E-Mail","identity.emailPlaceholder":"deine@email.de","identity.cancel":"Abbrechen","identity.submit":"Fortfahren","marker.approximate":"Ungef\xe4hre Position (Konfidenz: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"{count} Feedback-Markierungen angezeigt","fab.badge":"{count} unerledigte Feedbacks","feedback.sent.confirmation":"Feedback erfolgreich gesendet","feedback.error.message":"Feedback konnte nicht gesendet werden","feedback.queued":"Auf diesem Ger\xe4t gespeichert. Wird beim n\xe4chsten Besuch gesendet.","feedback.deleted.confirmation":"Feedback gel\xf6scht","badge.count":"{count} unerledigte Feedbacks","bulk.aria":"Sammelaktionen","bulk.selectAll":"Alle ausw\xe4hlen","bulk.selectFeedback":"Ausw\xe4hlen: {label}","bulk.selected":"{count} ausgew\xe4hlt","bulk.resolve":"Erledigen","bulk.delete":"L\xf6schen","bulk.deselect":"Abw\xe4hlen","sort.newest":"Neueste zuerst","sort.oldest":"\xc4lteste zuerst","sort.byType":"Nach Typ","sort.openFirst":"Offene zuerst","sort.label":"Sortieren","group.byPage":"Nach Seite","group.feedbacks":"{count} Feedbacks","stats.aria":"Feedbackstatistik","stats.open":"Offen","stats.closed":"Geschlossen","stats.bugs":"Fehler","stats.progress":"{percent}% geschlossen","detail.back":"Zur\xfcck","detail.aria":"Feedbackdetails","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Nachricht","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot des markierten Bereichs","detail.metadata":"Details","detail.annotation":"Anmerkung","detail.page":"Seite","detail.author":"Autor","detail.date":"Erstellt","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Erledigt am","detail.closedAt":"Geschlossen am","detail.goToAnnotation":"Zur Anmerkung","detail.element":"Element","detail.selector":"Selektor","detail.position":"Position","detail.resolve":"Erledigen","detail.reopen":"Wieder \xf6ffnen","detail.delete":"L\xf6schen","detail.diagnostics":"Diagnose","detail.diagnostics.console":"Konsole","detail.diagnostics.network":"Fehlgeschlagenes Netzwerk","detail.diagnostics.expand":"Diagnose anzeigen","detail.diagnostics.collapse":"Diagnose ausblenden","detail.diagnostics.noEntries":"Keine Eintr\xe4ge","comments.title":"Antworten","comments.placeholder":"Dem Team antworten...","comments.error":"Nicht gesendet. Versuch es noch einmal.","comments.full":"Dieser Verlauf ist voll.","comments.team":"Team","shortcuts.title":"Tastenk\xfcrzel","shortcuts.navigate":"Feedbacks navigieren","shortcuts.resolve":"Erledigen / Wieder \xf6ffnen","shortcuts.delete":"L\xf6schen","shortcuts.search":"Suche fokussieren","shortcuts.select":"Auswahl umschalten","shortcuts.help":"K\xfcrzel anzeigen","shortcuts.close":"Schlie\xdfen","shortcuts.hint":"Tastenk\xfcrzel","export.label":"Exportieren","export.csv":"CSV exportieren","export.json":"JSON exportieren"}}),Ph={};r(Ph,{es:()=>Ih});var Ih,Nh=i(()=>{Ih={"panel.title":"Comentarios","panel.ariaLabel":"Panel de comentarios de Siteping","panel.feedbackList":"Lista de comentarios","panel.loading":"Cargando comentarios","panel.close":"Cerrar panel","panel.deleteAll":"Eliminar todo","panel.deleteAllConfirmTitle":"Eliminar todo","panel.deleteAllConfirmMessage":"\xbfEliminar todos los comentarios de este proyecto? Esta acci\xf3n no se puede deshacer.","panel.search":"Buscar...","panel.searchAria":"Buscar comentarios","panel.filterAll":"Todos","panel.loadError":"No se pudo cargar","panel.retry":"Reintentar","panel.empty":"A\xfan no hay comentarios","panel.showMore":"Mostrar m\xe1s","panel.notOnPage":"No visible en esta p\xe1gina","panel.showLess":"Mostrar menos","panel.resolve":"Resolver","panel.reopen":"Reabrir","panel.delete":"Eliminar","panel.cancel":"Cancelar","panel.confirmDelete":"Eliminar","panel.loadMore":"Cargar m\xe1s ({remaining} restantes)","panel.statusAll":"Todos","panel.statusOpen":"Abierto","panel.statusResolved":"Resuelto","panel.statusInProgress":"En curso","panel.statusWontFix":"No se corregir\xe1","panel.statusClosed":"Cerrado","type.label":"Tipo","type.question":"Pregunta","type.change":"Cambio","type.bug":"Error","type.other":"Otro","status.label":"Estado","scope.label":"\xc1mbito","scope.thisPage":"Esta p\xe1gina","scope.thisType":"Este tipo","scope.all":"Todas las p\xe1ginas","panel.filterMine":"M\xedos","panel.filterMineHint":"Solo los comentarios enviados desde este navegador","fab.aria":"Siteping \u2014 Men\xfa de comentarios","fab.messages":"Mostrar barra lateral","fab.annotate":"Crear nueva anotaci\xf3n","fab.annotations":"Mostrar u ocultar marcadores","annotator.instruction":"Dibuja un rect\xe1ngulo sobre el \xe1rea que quieres comentar \u2014 o pulsa Intro para comentar el \xfaltimo elemento enfocado","annotator.instantInstruction":"Comentar el punto seleccionado","annotator.touchInstruction":"Toca un elemento o arrastra para seleccionar un \xe1rea","annotator.cancel":"Cancelar","popup.ariaLabel":"Formulario de comentarios","popup.placeholder":"Describe tu comentario...","popup.textareaAria":"Mensaje de comentario","popup.submitHintMac":"\u2318+Enter para enviar","popup.submitHintOther":"Ctrl+Enter para enviar","popup.cancel":"Cancelar","popup.submit":"Enviar","identity.title":"Identif\xedcate","identity.nameLabel":"Nombre","identity.namePlaceholder":"Tu nombre","identity.emailLabel":"Correo electr\xf3nico","identity.emailPlaceholder":"tu@email.com","identity.cancel":"Cancelar","identity.submit":"Continuar","marker.approximate":"Posici\xf3n aproximada (confianza: {confidence}%)","marker.aria":"Comentario #{number}: {type}, {status} \u2014 {message}","marker.count":"{count} marcadores de feedback mostrados","fab.badge":"{count} comentarios sin resolver","feedback.sent.confirmation":"Comentario enviado correctamente","feedback.error.message":"No se pudo enviar el comentario","feedback.queued":"Guardado en este dispositivo. Se enviar\xe1 en tu pr\xf3xima visita.","feedback.deleted.confirmation":"Comentario eliminado","badge.count":"{count} comentarios sin resolver","bulk.aria":"Acciones en lote","bulk.selectAll":"Seleccionar todo","bulk.selectFeedback":"Seleccionar {label}","bulk.selected":"{count} seleccionados","bulk.resolve":"Resolver","bulk.delete":"Eliminar","bulk.deselect":"Deseleccionar","sort.newest":"M\xe1s recientes","sort.oldest":"M\xe1s antiguos","sort.byType":"Por tipo","sort.openFirst":"Abiertos primero","sort.label":"Ordenar","group.byPage":"Por p\xe1gina","group.feedbacks":"{count} comentarios","stats.aria":"Estad\xedsticas de comentarios","stats.open":"Abiertos","stats.closed":"Cerrados","stats.bugs":"Errores","stats.progress":"{percent}% cerrados","detail.back":"Atr\xe1s","detail.aria":"Detalle del comentario","detail.title":"Comentario #{number}","detail.status":"Estado","detail.message":"Mensaje","detail.screenshot":"Captura","detail.screenshotAlt":"Captura del \xe1rea anotada","detail.metadata":"Detalles","detail.annotation":"Anotaci\xf3n","detail.page":"P\xe1gina","detail.author":"Autor","detail.date":"Creado","detail.viewport":"Viewport","detail.browser":"Navegador","detail.resolvedAt":"Resuelto el","detail.closedAt":"Cerrado el","detail.goToAnnotation":"Ir a la anotaci\xf3n","detail.element":"Elemento","detail.selector":"Selector","detail.position":"Posici\xf3n","detail.resolve":"Resolver","detail.reopen":"Reabrir","detail.delete":"Eliminar","detail.diagnostics":"Diagn\xf3stico","detail.diagnostics.console":"Consola","detail.diagnostics.network":"Red fallida","detail.diagnostics.expand":"Mostrar diagn\xf3stico","detail.diagnostics.collapse":"Ocultar diagn\xf3stico","detail.diagnostics.noEntries":"Sin entradas","comments.title":"Respuestas","comments.placeholder":"Responder al equipo...","comments.error":"No se envi\xf3. Int\xe9ntalo de nuevo.","comments.full":"Este hilo est\xe1 completo.","comments.team":"Equipo","shortcuts.title":"Atajos de teclado","shortcuts.navigate":"Navegar comentarios","shortcuts.resolve":"Resolver / Reabrir","shortcuts.delete":"Eliminar","shortcuts.search":"Buscar","shortcuts.select":"Alternar selecci\xf3n","shortcuts.help":"Mostrar atajos","shortcuts.close":"Cerrar","shortcuts.hint":"Atajos de teclado","export.label":"Exportar","export.csv":"Exportar CSV","export.json":"Exportar JSON"}}),Dh={};r(Dh,{fr:()=>Oh});var Oh,Fh=i(()=>{Oh={"panel.title":"Feedbacks","panel.ariaLabel":"Panneau de feedback Siteping","panel.feedbackList":"Liste des feedbacks","panel.loading":"Chargement des feedbacks","panel.close":"Fermer le panneau","panel.deleteAll":"Tout supprimer","panel.deleteAllConfirmTitle":"Tout supprimer","panel.deleteAllConfirmMessage":"Supprimer tous les feedbacks de ce projet ? Cette action est irr\xe9versible.","panel.search":"Rechercher...","panel.searchAria":"Rechercher dans les feedbacks","panel.filterAll":"Tous","panel.loadError":"Erreur de chargement","panel.retry":"R\xe9essayer","panel.empty":"Aucun feedback pour le moment","panel.showMore":"Voir plus","panel.notOnPage":"Pas visible sur cette page","panel.showLess":"Voir moins","panel.resolve":"R\xe9soudre","panel.reopen":"Rouvrir","panel.delete":"Supprimer","panel.cancel":"Annuler","panel.confirmDelete":"Supprimer","panel.loadMore":"Voir plus ({remaining} restants)","panel.statusAll":"Tous","panel.statusOpen":"Ouvert","panel.statusResolved":"R\xe9solu","panel.statusInProgress":"En cours","panel.statusWontFix":"Sans suite","panel.statusClosed":"Cl\xf4tur\xe9","type.label":"Type","type.question":"Question","type.change":"Changement","type.bug":"Bug","type.other":"Autre","status.label":"Statut","scope.label":"Port\xe9e","scope.thisPage":"Cette page","scope.thisType":"Ce type","scope.all":"Toutes les pages","panel.filterMine":"Mes feedbacks","panel.filterMineHint":"Uniquement les feedbacks envoy\xe9s depuis ce navigateur","fab.aria":"Siteping \u2014 Menu feedback","fab.messages":"Afficher la barre lat\xe9rale","fab.annotate":"Cr\xe9er une nouvelle annotation","fab.annotations":"Afficher ou masquer les marqueurs","annotator.instruction":"Tracez un rectangle sur la zone \xe0 commenter \u2014 ou appuyez sur Entr\xe9e pour commenter le dernier \xe9l\xe9ment actif","annotator.instantInstruction":"Commenter l'endroit cliqu\xe9","annotator.touchInstruction":"Touchez un \xe9l\xe9ment ou faites glisser pour s\xe9lectionner une zone","annotator.cancel":"Annuler","popup.ariaLabel":"Formulaire de feedback","popup.placeholder":"D\xe9crivez votre retour...","popup.textareaAria":"Message de feedback","popup.submitHintMac":"\u2318+Entr\xe9e pour envoyer","popup.submitHintOther":"Ctrl+Entr\xe9e pour envoyer","popup.cancel":"Annuler","popup.submit":"Envoyer","identity.title":"Identifiez-vous","identity.nameLabel":"Nom","identity.namePlaceholder":"Votre nom","identity.emailLabel":"Email","identity.emailPlaceholder":"votre@email.com","identity.cancel":"Annuler","identity.submit":"Continuer","marker.approximate":"Position approximative (confiance : {confidence}%)","marker.aria":"Feedback n\xb0{number} : {type}, {status} \u2014 {message}","marker.count":"{count} marqueurs de feedback affich\xe9s","fab.badge":"{count} feedbacks non r\xe9solus","feedback.sent.confirmation":"Feedback envoy\xe9 avec succ\xe8s","feedback.error.message":"\xc9chec de l'envoi du feedback","feedback.queued":"Enregistr\xe9 sur cet appareil. Il sera envoy\xe9 \xe0 votre prochaine visite.","feedback.deleted.confirmation":"Feedback supprim\xe9","badge.count":"{count} feedbacks non r\xe9solus","bulk.aria":"Actions group\xe9es","bulk.selectAll":"Tout s\xe9lectionner","bulk.selectFeedback":"S\xe9lectionner {label}","bulk.selected":"{count} s\xe9lectionn\xe9(s)","bulk.resolve":"R\xe9soudre","bulk.delete":"Supprimer","bulk.deselect":"D\xe9s\xe9lectionner","sort.newest":"Plus r\xe9cents","sort.oldest":"Plus anciens","sort.byType":"Par type","sort.openFirst":"Ouverts d'abord","sort.label":"Trier","group.byPage":"Par page","group.feedbacks":"{count} feedbacks","stats.aria":"Statistiques des feedbacks","stats.open":"Ouverts","stats.closed":"Cl\xf4tur\xe9s","stats.bugs":"Bugs","stats.progress":"{percent}% cl\xf4tur\xe9s","detail.back":"Retour","detail.aria":"D\xe9tail du feedback","detail.title":"Feedback n\xb0{number}","detail.status":"Statut","detail.message":"Message","detail.screenshot":"Capture d'\xe9cran","detail.screenshotAlt":"Capture d'\xe9cran de la zone annot\xe9e","detail.metadata":"D\xe9tails","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Auteur","detail.date":"Cr\xe9\xe9 le","detail.viewport":"Viewport","detail.browser":"Navigateur","detail.resolvedAt":"R\xe9solu le","detail.closedAt":"Cl\xf4tur\xe9 le","detail.goToAnnotation":"Aller \xe0 l'annotation","detail.element":"\xc9l\xe9ment","detail.selector":"S\xe9lecteur","detail.position":"Position","detail.resolve":"R\xe9soudre","detail.reopen":"Rouvrir","detail.delete":"Supprimer","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"R\xe9seau en \xe9chec","detail.diagnostics.expand":"Afficher les diagnostics","detail.diagnostics.collapse":"Masquer les diagnostics","detail.diagnostics.noEntries":"Aucune entr\xe9e","comments.title":"R\xe9ponses","comments.placeholder":"R\xe9pondre \xe0 l'\xe9quipe...","comments.error":"Non envoy\xe9. R\xe9essayez.","comments.full":"Ce fil est complet.","comments.team":"\xc9quipe","shortcuts.title":"Raccourcis clavier","shortcuts.navigate":"Naviguer les feedbacks","shortcuts.resolve":"R\xe9soudre / Rouvrir","shortcuts.delete":"Supprimer","shortcuts.search":"Rechercher","shortcuts.select":"S\xe9lectionner","shortcuts.help":"Raccourcis","shortcuts.close":"Fermer","shortcuts.hint":"Raccourcis clavier","export.label":"Exporter","export.csv":"Exporter CSV","export.json":"Exporter JSON"}}),$h={};r($h,{it:()=>zh});var zh,_h=i(()=>{zh={"panel.title":"Feedback","panel.ariaLabel":"Pannello feedback di Siteping","panel.feedbackList":"Elenco feedback","panel.loading":"Caricamento feedback","panel.close":"Chiudi pannello","panel.deleteAll":"Elimina tutto","panel.deleteAllConfirmTitle":"Elimina tutto","panel.deleteAllConfirmMessage":"Eliminare tutti i feedback per questo progetto? Questa azione non pu\xf2 essere annullata.","panel.search":"Cerca...","panel.searchAria":"Cerca feedback","panel.filterAll":"Tutti","panel.loadError":"Caricamento non riuscito","panel.retry":"Riprova","panel.empty":"Nessun feedback ancora","panel.showMore":"Mostra di pi\xf9","panel.notOnPage":"Non visibile in questa pagina","panel.showLess":"Mostra meno","panel.resolve":"Risolvi","panel.reopen":"Riapri","panel.delete":"Elimina","panel.cancel":"Annulla","panel.confirmDelete":"Elimina","panel.loadMore":"Carica altro ({remaining} rimanenti)","panel.statusAll":"Tutti","panel.statusOpen":"Aperto","panel.statusResolved":"Risolto","panel.statusInProgress":"In corso","panel.statusWontFix":"Non verr\xe0 corretto","panel.statusClosed":"Chiuso","type.label":"Tipo","type.question":"Domanda","type.change":"Modifica","type.bug":"Bug","type.other":"Altro","status.label":"Stato","scope.label":"Ambito","scope.thisPage":"Questa pagina","scope.thisType":"Questo tipo","scope.all":"Tutte le pagine","panel.filterMine":"Miei","panel.filterMineHint":"Solo i feedback inviati da questo browser","fab.aria":"Siteping \u2014 Menu feedback","fab.messages":"Mostra barra laterale","fab.annotate":"Crea nuova annotazione","fab.annotations":"Mostra o nascondi i marcatori","annotator.instruction":"Disegna un rettangolo sull'area da commentare \u2014 oppure premi Invio per commentare l'ultimo elemento attivo","annotator.instantInstruction":"Commenta il punto selezionato","annotator.touchInstruction":"Tocca un elemento o trascina per selezionare un'area","annotator.cancel":"Annulla","popup.ariaLabel":"Modulo feedback","popup.placeholder":"Descrivi il tuo feedback...","popup.textareaAria":"Messaggio di feedback","popup.submitHintMac":"\u2318+Invio per inviare","popup.submitHintOther":"Ctrl+Invio per inviare","popup.cancel":"Annulla","popup.submit":"Invia","identity.title":"Identificati","identity.nameLabel":"Nome","identity.namePlaceholder":"Il tuo nome","identity.emailLabel":"Email","identity.emailPlaceholder":"tua@email.com","identity.cancel":"Annulla","identity.submit":"Continua","marker.approximate":"Posizione approssimativa (confidenza: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"{count} marcatori di feedback visualizzati","fab.badge":"{count} feedback non risolti","feedback.sent.confirmation":"Feedback inviato con successo","feedback.error.message":"Invio del feedback non riuscito","feedback.queued":"Salvato su questo dispositivo. Verr\xe0 inviato alla prossima visita.","feedback.deleted.confirmation":"Feedback eliminato","badge.count":"{count} feedback non risolti","bulk.aria":"Azioni di gruppo","bulk.selectAll":"Seleziona tutto","bulk.selectFeedback":"Seleziona {label}","bulk.selected":"{count} selezionati","bulk.resolve":"Risolvi","bulk.delete":"Elimina","bulk.deselect":"Deseleziona","sort.newest":"Pi\xf9 recenti","sort.oldest":"Pi\xf9 vecchi","sort.byType":"Per tipo","sort.openFirst":"Aperti prima","sort.label":"Ordina","group.byPage":"Per pagina","group.feedbacks":"{count} feedback","stats.aria":"Statistiche dei feedback","stats.open":"Aperti","stats.closed":"Chiusi","stats.bugs":"Bug","stats.progress":"{percent}% chiusi","detail.back":"Indietro","detail.aria":"Dettaglio del feedback","detail.title":"Feedback #{number}","detail.status":"Stato","detail.message":"Messaggio","detail.screenshot":"Schermata","detail.screenshotAlt":"Schermata dell'area annotata","detail.metadata":"Dettagli","detail.annotation":"Annotazione","detail.page":"Pagina","detail.author":"Autore","detail.date":"Creato","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Risolto il","detail.closedAt":"Chiuso il","detail.goToAnnotation":"Vai all'annotazione","detail.element":"Elemento","detail.selector":"Selettore","detail.position":"Posizione","detail.resolve":"Risolvi","detail.reopen":"Riapri","detail.delete":"Elimina","detail.diagnostics":"Diagnostica","detail.diagnostics.console":"Console","detail.diagnostics.network":"Rete fallita","detail.diagnostics.expand":"Mostra diagnostica","detail.diagnostics.collapse":"Nascondi diagnostica","detail.diagnostics.noEntries":"Nessuna voce","comments.title":"Risposte","comments.placeholder":"Rispondi al team...","comments.error":"Non inviata. Riprova.","comments.full":"Questa discussione \xe8 piena.","comments.team":"Team","shortcuts.title":"Scorciatoie da tastiera","shortcuts.navigate":"Naviga i feedback","shortcuts.resolve":"Risolvi / Riapri","shortcuts.delete":"Elimina","shortcuts.search":"Cerca","shortcuts.select":"Attiva selezione","shortcuts.help":"Mostra scorciatoie","shortcuts.close":"Chiudi","shortcuts.hint":"Scorciatoie da tastiera","export.label":"Esporta","export.csv":"Esporta CSV","export.json":"Esporta JSON"}}),Wh={};r(Wh,{ja:()=>Hh});var Hh,Vh=i(()=>{Hh={"panel.title":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af","panel.ariaLabel":"Siteping \u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30d1\u30cd\u30eb","panel.feedbackList":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u4e00\u89a7","panel.loading":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u8aad\u307f\u8fbc\u307f\u4e2d","panel.close":"\u30d1\u30cd\u30eb\u3092\u9589\u3058\u308b","panel.deleteAll":"\u5168\u524a\u9664","panel.deleteAllConfirmTitle":"\u3059\u3079\u3066\u524a\u9664","panel.deleteAllConfirmMessage":"\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u3059\u3079\u3066\u524a\u9664\u3057\u307e\u3059\u304b\uff1f\u3053\u306e\u64cd\u4f5c\u306f\u53d6\u308a\u6d88\u305b\u307e\u305b\u3093\u3002","panel.search":"\u691c\u7d22...","panel.searchAria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u691c\u7d22","panel.filterAll":"\u3059\u3079\u3066","panel.loadError":"\u8aad\u307f\u8fbc\u307f\u306b\u5931\u6557\u3057\u307e\u3057\u305f","panel.retry":"\u518d\u8a66\u884c","panel.empty":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306f\u307e\u3060\u3042\u308a\u307e\u305b\u3093","panel.showMore":"\u3082\u3063\u3068\u898b\u308b","panel.notOnPage":"\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u305b\u3093","panel.showLess":"\u6298\u308a\u305f\u305f\u3080","panel.resolve":"\u89e3\u6c7a","panel.reopen":"\u518d\u30aa\u30fc\u30d7\u30f3","panel.delete":"\u524a\u9664","panel.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","panel.confirmDelete":"\u524a\u9664","panel.loadMore":"\u3055\u3089\u306b\u8aad\u307f\u8fbc\u3080\uff08\u6b8b\u308a {remaining} \u4ef6\uff09","panel.statusAll":"\u3059\u3079\u3066","panel.statusOpen":"\u672a\u5bfe\u5fdc","panel.statusResolved":"\u89e3\u6c7a\u6e08\u307f","panel.statusInProgress":"\u5bfe\u5fdc\u4e2d","panel.statusWontFix":"\u5bfe\u5fdc\u3057\u306a\u3044","panel.statusClosed":"\u30af\u30ed\u30fc\u30ba\u6e08\u307f","type.label":"\u7a2e\u985e","type.question":"\u8cea\u554f","type.change":"\u5909\u66f4\u4f9d\u983c","type.bug":"\u4e0d\u5177\u5408","type.other":"\u305d\u306e\u4ed6","status.label":"\u30b9\u30c6\u30fc\u30bf\u30b9","scope.label":"\u7bc4\u56f2","scope.thisPage":"\u3053\u306e\u30da\u30fc\u30b8","scope.thisType":"\u3053\u306e\u30da\u30fc\u30b8\u7a2e\u5225","scope.all":"\u3059\u3079\u3066\u306e\u30da\u30fc\u30b8","panel.filterMine":"\u81ea\u5206\u306e\u6295\u7a3f","panel.filterMineHint":"\u3053\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u9001\u4fe1\u3057\u305f\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u307f","fab.aria":"Siteping \u2014 \u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30e1\u30cb\u30e5\u30fc","fab.messages":"\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a","fab.annotate":"\u65b0\u3057\u3044\u6ce8\u91c8\u3092\u4f5c\u6210","fab.annotations":"\u30de\u30fc\u30ab\u30fc\u306e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048","annotator.instruction":"\u30b3\u30e1\u30f3\u30c8\u3057\u305f\u3044\u7bc4\u56f2\u3092\u56db\u89d2\u3067\u56f2\u3093\u3067\u304f\u3060\u3055\u3044 \u2014 \u307e\u305f\u306f Enter \u30ad\u30fc\u3067\u6700\u5f8c\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u305f\u8981\u7d20\u306b\u30b3\u30e1\u30f3\u30c8\u3067\u304d\u307e\u3059","annotator.instantInstruction":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u7b87\u6240\u306b\u30b3\u30e1\u30f3\u30c8","annotator.touchInstruction":"\u8981\u7d20\u3092\u30bf\u30c3\u30d7\u3059\u308b\u304b\u3001\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u7bc4\u56f2\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","annotator.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","popup.ariaLabel":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30d5\u30a9\u30fc\u30e0","popup.placeholder":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044...","popup.textareaAria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u672c\u6587","popup.submitHintMac":"\u2318+Enter \u3067\u9001\u4fe1","popup.submitHintOther":"Ctrl+Enter \u3067\u9001\u4fe1","popup.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","popup.submit":"\u9001\u4fe1","identity.title":"\u304a\u540d\u524d\u3068\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b","identity.nameLabel":"\u540d\u524d","identity.namePlaceholder":"\u304a\u540d\u524d","identity.emailLabel":"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9","identity.emailPlaceholder":"your@email.com","identity.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","identity.submit":"\u7d9a\u3051\u308b","marker.approximate":"\u304a\u304a\u3088\u305d\u306e\u4f4d\u7f6e\uff08\u78ba\u5ea6: {confidence}%\uff09","marker.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af #{number}: {type}\u3001{status} \u2014 {message}","marker.count":"{count} \u4ef6\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30de\u30fc\u30ab\u30fc\u3092\u8868\u793a\u4e2d","fab.badge":"\u672a\u89e3\u6c7a\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","feedback.sent.confirmation":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f","feedback.error.message":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u9001\u4fe1\u306b\u5931\u6557\u3057\u307e\u3057\u305f","feedback.queued":"\u3053\u306e\u7aef\u672b\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002\u6b21\u56de\u306e\u30a2\u30af\u30bb\u30b9\u6642\u306b\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002","feedback.deleted.confirmation":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u524a\u9664\u3057\u307e\u3057\u305f","badge.count":"\u672a\u89e3\u6c7a\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","bulk.aria":"\u4e00\u62ec\u64cd\u4f5c","bulk.selectAll":"\u3059\u3079\u3066\u9078\u629e","bulk.selectFeedback":"{label}\u3092\u9078\u629e","bulk.selected":"{count} \u4ef6\u9078\u629e\u4e2d","bulk.resolve":"\u89e3\u6c7a","bulk.delete":"\u524a\u9664","bulk.deselect":"\u9078\u629e\u3092\u89e3\u9664","sort.newest":"\u65b0\u3057\u3044\u9806","sort.oldest":"\u53e4\u3044\u9806","sort.byType":"\u7a2e\u985e\u5225","sort.openFirst":"\u672a\u5bfe\u5fdc\u3092\u5148\u982d\u306b","sort.label":"\u4e26\u3073\u66ff\u3048","group.byPage":"\u30da\u30fc\u30b8\u5225","group.feedbacks":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","stats.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u7d71\u8a08","stats.open":"\u672a\u5bfe\u5fdc","stats.closed":"\u30af\u30ed\u30fc\u30ba\u6e08\u307f","stats.bugs":"\u4e0d\u5177\u5408","stats.progress":"{percent}% \u30af\u30ed\u30fc\u30ba\u6e08\u307f","detail.back":"\u623b\u308b","detail.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u8a73\u7d30","detail.title":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af #{number}","detail.status":"\u30b9\u30c6\u30fc\u30bf\u30b9","detail.message":"\u30e1\u30c3\u30bb\u30fc\u30b8","detail.screenshot":"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8","detail.screenshotAlt":"\u6ce8\u91c8\u304c\u4ed8\u3044\u305f\u7bc4\u56f2\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8","detail.metadata":"\u8a73\u7d30","detail.annotation":"\u6ce8\u91c8","detail.page":"\u30da\u30fc\u30b8","detail.author":"\u6295\u7a3f\u8005","detail.date":"\u4f5c\u6210\u65e5\u6642","detail.viewport":"\u30d3\u30e5\u30fc\u30dd\u30fc\u30c8","detail.browser":"\u30d6\u30e9\u30a6\u30b6","detail.resolvedAt":"\u89e3\u6c7a\u65e5\u6642","detail.closedAt":"\u30af\u30ed\u30fc\u30ba\u65e5\u6642","detail.goToAnnotation":"\u6ce8\u91c8\u3078\u79fb\u52d5","detail.element":"\u8981\u7d20","detail.selector":"\u30bb\u30ec\u30af\u30bf\u30fc","detail.position":"\u4f4d\u7f6e","detail.resolve":"\u89e3\u6c7a","detail.reopen":"\u518d\u30aa\u30fc\u30d7\u30f3","detail.delete":"\u524a\u9664","detail.diagnostics":"\u8a3a\u65ad\u60c5\u5831","detail.diagnostics.console":"\u30b3\u30f3\u30bd\u30fc\u30eb","detail.diagnostics.network":"\u5931\u6557\u3057\u305f\u901a\u4fe1","detail.diagnostics.expand":"\u8a3a\u65ad\u60c5\u5831\u3092\u8868\u793a","detail.diagnostics.collapse":"\u8a3a\u65ad\u60c5\u5831\u3092\u96a0\u3059","detail.diagnostics.noEntries":"\u9805\u76ee\u306f\u3042\u308a\u307e\u305b\u3093","comments.title":"\u8fd4\u4fe1","comments.placeholder":"\u30c1\u30fc\u30e0\u306b\u8fd4\u4fe1...","comments.error":"\u9001\u4fe1\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3082\u3046\u4e00\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002","comments.full":"\u3053\u306e\u30b9\u30ec\u30c3\u30c9\u306f\u4e0a\u9650\u306b\u9054\u3057\u307e\u3057\u305f\u3002","comments.team":"\u30c1\u30fc\u30e0","shortcuts.title":"\u30ad\u30fc\u30dc\u30fc\u30c9\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8","shortcuts.navigate":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u79fb\u52d5","shortcuts.resolve":"\u89e3\u6c7a / \u518d\u30aa\u30fc\u30d7\u30f3","shortcuts.delete":"\u524a\u9664","shortcuts.search":"\u691c\u7d22\u306b\u30d5\u30a9\u30fc\u30ab\u30b9","shortcuts.select":"\u9078\u629e\u3092\u5207\u308a\u66ff\u3048","shortcuts.help":"\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u8868\u793a","shortcuts.close":"\u9589\u3058\u308b","shortcuts.hint":"\u30ad\u30fc\u30dc\u30fc\u30c9\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8","export.label":"\u51fa\u529b","export.csv":"CSV \u3067\u51fa\u529b","export.json":"JSON \u3067\u51fa\u529b"}}),jh={};r(jh,{ko:()=>Uh});var Uh,Yh=i(()=>{Uh={"panel.title":"\ud53c\ub4dc\ubc31","panel.ariaLabel":"Siteping \ud53c\ub4dc\ubc31 \ud328\ub110","panel.feedbackList":"\ud53c\ub4dc\ubc31 \ubaa9\ub85d","panel.loading":"\ud53c\ub4dc\ubc31\uc744 \ubd88\ub7ec\uc624\ub294 \uc911","panel.close":"\ud328\ub110 \ub2eb\uae30","panel.deleteAll":"\ubaa8\ub450 \uc0ad\uc81c","panel.deleteAllConfirmTitle":"\ubaa8\ub450 \uc0ad\uc81c","panel.deleteAllConfirmMessage":"\uc774 \ud504\ub85c\uc81d\ud2b8\uc758 \ud53c\ub4dc\ubc31\uc744 \ubaa8\ub450 \uc0ad\uc81c\ud560\uae4c\uc694? \uc774 \uc791\uc5c5\uc740 \ub418\ub3cc\ub9b4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.","panel.search":"\uac80\uc0c9...","panel.searchAria":"\ud53c\ub4dc\ubc31 \uac80\uc0c9","panel.filterAll":"\uc804\uccb4","panel.loadError":"\ubd88\ub7ec\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4","panel.retry":"\ub2e4\uc2dc \uc2dc\ub3c4","panel.empty":"\uc544\uc9c1 \ud53c\ub4dc\ubc31\uc774 \uc5c6\uc2b5\ub2c8\ub2e4","panel.showMore":"\ub354 \ubcf4\uae30","panel.notOnPage":"\uc774 \ud398\uc774\uc9c0\uc5d0\uc11c \ubcf4\uc774\uc9c0 \uc54a\uc74c","panel.showLess":"\uc811\uae30","panel.resolve":"\ud574\uacb0","panel.reopen":"\ub2e4\uc2dc \uc5f4\uae30","panel.delete":"\uc0ad\uc81c","panel.cancel":"\ucde8\uc18c","panel.confirmDelete":"\uc0ad\uc81c","panel.loadMore":"\ub354 \ubd88\ub7ec\uc624\uae30 ({remaining}\uac74 \ub0a8\uc74c)","panel.statusAll":"\uc804\uccb4","panel.statusOpen":"\uc5f4\ub9bc","panel.statusResolved":"\ud574\uacb0\ub428","panel.statusInProgress":"\uc9c4\ud589 \uc911","panel.statusWontFix":"\ucc98\ub9ac \uc548 \ud568","panel.statusClosed":"\uc885\ub8cc\ub428","type.label":"\uc720\ud615","type.question":"\uc9c8\ubb38","type.change":"\uc218\uc815 \uc694\uccad","type.bug":"\ubc84\uadf8","type.other":"\uae30\ud0c0","status.label":"\uc0c1\ud0dc","scope.label":"\ubc94\uc704","scope.thisPage":"\uc774 \ud398\uc774\uc9c0","scope.thisType":"\uac19\uc740 \uc720\ud615\uc758 \ud398\uc774\uc9c0","scope.all":"\ubaa8\ub4e0 \ud398\uc774\uc9c0","panel.filterMine":"\ub0b4 \ud53c\ub4dc\ubc31","panel.filterMineHint":"\uc774 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \ubcf4\ub0b8 \ud53c\ub4dc\ubc31\ub9cc \ubd05\ub2c8\ub2e4","fab.aria":"Siteping \u2014 \ud53c\ub4dc\ubc31 \uba54\ub274","fab.messages":"\uc0ac\uc774\ub4dc\ubc14 \ubcf4\uae30","fab.annotate":"\uc0c8 \uc8fc\uc11d \ub9cc\ub4e4\uae30","fab.annotations":"\ub9c8\ucee4 \ubcf4\uc774\uae30 \ub610\ub294 \uc228\uae30\uae30","annotator.instruction":"\ub313\uae00\uc744 \ub0a8\uae38 \uc601\uc5ed\uc5d0 \uc0ac\uac01\ud615\uc744 \uadf8\ub9ac\uc138\uc694. Enter \ud0a4\ub97c \ub204\ub974\uba74 \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud3ec\ucee4\uc2a4\ud55c \uc694\uc18c\uc5d0 \ub313\uae00\uc744 \ub0a8\uae41\ub2c8\ub2e4","annotator.instantInstruction":"\ud074\ub9ad\ud55c \uc704\uce58\uc5d0 \ub313\uae00\uc744 \ub0a8\uae41\ub2c8\ub2e4","annotator.touchInstruction":"\uc694\uc18c\ub97c \ud0ed\ud558\uac70\ub098 \ub4dc\ub798\uadf8\ud574\uc11c \uc601\uc5ed\uc744 \uc120\ud0dd\ud558\uc138\uc694","annotator.cancel":"\ucde8\uc18c","popup.ariaLabel":"\ud53c\ub4dc\ubc31 \uc791\uc131","popup.placeholder":"\ud53c\ub4dc\ubc31 \ub0b4\uc6a9\uc744 \uc785\ub825\ud558\uc138\uc694...","popup.textareaAria":"\ud53c\ub4dc\ubc31 \ub0b4\uc6a9","popup.submitHintMac":"\u2318+Enter\ub85c \ubcf4\ub0b4\uae30","popup.submitHintOther":"Ctrl+Enter\ub85c \ubcf4\ub0b4\uae30","popup.cancel":"\ucde8\uc18c","popup.submit":"\ubcf4\ub0b4\uae30","identity.title":"\uc791\uc131\uc790 \uc815\ubcf4","identity.nameLabel":"\uc774\ub984","identity.namePlaceholder":"\uc774\ub984","identity.emailLabel":"\uc774\uba54\uc77c","identity.emailPlaceholder":"you@example.com","identity.cancel":"\ucde8\uc18c","identity.submit":"\uacc4\uc18d","marker.approximate":"\ub300\ub7b5\uc801\uc778 \uc704\uce58 (\uc2e0\ub8b0\ub3c4: {confidence}%)","marker.aria":"\ud53c\ub4dc\ubc31 #{number}: {type}, {status} \u2014 {message}","marker.count":"\ud53c\ub4dc\ubc31 \ub9c8\ucee4 {count}\uac1c \ud45c\uc2dc \uc911","fab.badge":"\ud574\uacb0\ub418\uc9c0 \uc54a\uc740 \ud53c\ub4dc\ubc31 {count}\uac74","feedback.sent.confirmation":"\ud53c\ub4dc\ubc31\uc744 \ubcf4\ub0c8\uc2b5\ub2c8\ub2e4","feedback.error.message":"\ud53c\ub4dc\ubc31\uc744 \ubcf4\ub0b4\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4","feedback.queued":"\uc774 \uae30\uae30\uc5d0 \uc800\uc7a5\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ubc29\ubb38 \uc2dc \uc804\uc1a1\ub429\ub2c8\ub2e4.","feedback.deleted.confirmation":"\ud53c\ub4dc\ubc31\uc744 \uc0ad\uc81c\ud588\uc2b5\ub2c8\ub2e4","badge.count":"\ud574\uacb0\ub418\uc9c0 \uc54a\uc740 \ud53c\ub4dc\ubc31 {count}\uac74","bulk.aria":"\uc77c\uad04 \uc791\uc5c5","bulk.selectAll":"\ubaa8\ub450 \uc120\ud0dd","bulk.selectFeedback":"{label} \uc120\ud0dd","bulk.selected":"{count}\uac74 \uc120\ud0dd\ub428","bulk.resolve":"\ud574\uacb0","bulk.delete":"\uc0ad\uc81c","bulk.deselect":"\uc120\ud0dd \ud574\uc81c","sort.newest":"\ucd5c\uc2e0\uc21c","sort.oldest":"\uc624\ub798\ub41c\uc21c","sort.byType":"\uc720\ud615\ubcc4","sort.openFirst":"\uc5f4\ub9b0 \ud56d\ubaa9 \uba3c\uc800","sort.label":"\uc815\ub82c","group.byPage":"\ud398\uc774\uc9c0\ubcc4","group.feedbacks":"\ud53c\ub4dc\ubc31 {count}\uac74","stats.aria":"\ud53c\ub4dc\ubc31 \ud1b5\uacc4","stats.open":"\uc5f4\ub9bc","stats.closed":"\uc885\ub8cc\ub428","stats.bugs":"\ubc84\uadf8","stats.progress":"{percent}% \uc885\ub8cc","detail.back":"\ub4a4\ub85c","detail.aria":"\ud53c\ub4dc\ubc31 \uc0c1\uc138","detail.title":"\ud53c\ub4dc\ubc31 #{number}","detail.status":"\uc0c1\ud0dc","detail.message":"\ub0b4\uc6a9","detail.screenshot":"\uc2a4\ud06c\ub9b0\uc0f7","detail.screenshotAlt":"\uc8fc\uc11d\uc744 \ub2e8 \uc601\uc5ed\uc758 \uc2a4\ud06c\ub9b0\uc0f7","detail.metadata":"\uc0c1\uc138 \uc815\ubcf4","detail.annotation":"\uc8fc\uc11d","detail.page":"\ud398\uc774\uc9c0","detail.author":"\uc791\uc131\uc790","detail.date":"\uc791\uc131\uc77c","detail.viewport":"\ubdf0\ud3ec\ud2b8","detail.browser":"\ube0c\ub77c\uc6b0\uc800","detail.resolvedAt":"\ud574\uacb0\uc77c","detail.closedAt":"\uc885\ub8cc\uc77c","detail.goToAnnotation":"\uc8fc\uc11d \uc704\uce58\ub85c \uc774\ub3d9","detail.element":"\uc694\uc18c","detail.selector":"\uc120\ud0dd\uc790","detail.position":"\uc704\uce58","detail.resolve":"\ud574\uacb0","detail.reopen":"\ub2e4\uc2dc \uc5f4\uae30","detail.delete":"\uc0ad\uc81c","detail.diagnostics":"\uc9c4\ub2e8 \uc815\ubcf4","detail.diagnostics.console":"\ucf58\uc194","detail.diagnostics.network":"\uc2e4\ud328\ud55c \ub124\ud2b8\uc6cc\ud06c \uc694\uccad","detail.diagnostics.expand":"\uc9c4\ub2e8 \uc815\ubcf4 \ubcf4\uae30","detail.diagnostics.collapse":"\uc9c4\ub2e8 \uc815\ubcf4 \uc228\uae30\uae30","detail.diagnostics.noEntries":"\uae30\ub85d\uc774 \uc5c6\uc2b5\ub2c8\ub2e4","comments.title":"\ub2f5\uae00","comments.placeholder":"\ud300\uc5d0 \ub2f5\uae00 \ub0a8\uae30\uae30...","comments.error":"\ubcf4\ub0b4\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud558\uc138\uc694.","comments.full":"\uc774 \uc2a4\ub808\ub4dc\uc5d0\ub294 \ub354 \uc774\uc0c1 \ub2f5\uae00\uc744 \ub2ec \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.","comments.team":"\ud300","shortcuts.title":"\ud0a4\ubcf4\ub4dc \ub2e8\ucd95\ud0a4","shortcuts.navigate":"\ud53c\ub4dc\ubc31 \uac04 \uc774\ub3d9","shortcuts.resolve":"\ud574\uacb0 / \ub2e4\uc2dc \uc5f4\uae30","shortcuts.delete":"\uc0ad\uc81c","shortcuts.search":"\uac80\uc0c9\ucc3d\uc73c\ub85c \uc774\ub3d9","shortcuts.select":"\uc120\ud0dd \uc804\ud658","shortcuts.help":"\ub2e8\ucd95\ud0a4 \ubcf4\uae30","shortcuts.close":"\ub2eb\uae30","shortcuts.hint":"\ud0a4\ubcf4\ub4dc \ub2e8\ucd95\ud0a4","export.label":"\ub0b4\ubcf4\ub0b4\uae30","export.csv":"CSV \ub0b4\ubcf4\ub0b4\uae30","export.json":"JSON \ub0b4\ubcf4\ub0b4\uae30"}}),qh={};r(qh,{pt:()=>Gh});var Gh,Kh=i(()=>{Gh={"panel.title":"Feedbacks","panel.ariaLabel":"Painel de feedback do Siteping","panel.feedbackList":"Lista de feedbacks","panel.loading":"Carregando feedbacks","panel.close":"Fechar painel","panel.deleteAll":"Excluir tudo","panel.deleteAllConfirmTitle":"Excluir tudo","panel.deleteAllConfirmMessage":"Excluir todos os feedbacks deste projeto? Esta a\xe7\xe3o n\xe3o pode ser desfeita.","panel.search":"Pesquisar...","panel.searchAria":"Pesquisar feedbacks","panel.filterAll":"Todos","panel.loadError":"Falha ao carregar","panel.retry":"Tentar novamente","panel.empty":"Nenhum feedback ainda","panel.showMore":"Mostrar mais","panel.notOnPage":"N\xe3o vis\xedvel nesta p\xe1gina","panel.showLess":"Mostrar menos","panel.resolve":"Resolver","panel.reopen":"Reabrir","panel.delete":"Excluir","panel.cancel":"Cancelar","panel.confirmDelete":"Excluir","panel.loadMore":"Carregar mais ({remaining} restantes)","panel.statusAll":"Todos","panel.statusOpen":"Aberto","panel.statusResolved":"Resolvido","panel.statusInProgress":"Em andamento","panel.statusWontFix":"N\xe3o ser\xe1 corrigido","panel.statusClosed":"Fechado","type.label":"Tipo","type.question":"Pergunta","type.change":"Altera\xe7\xe3o","type.bug":"Bug","type.other":"Outro","status.label":"Status","scope.label":"Escopo","scope.thisPage":"Esta p\xe1gina","scope.thisType":"Este tipo","scope.all":"Todas as p\xe1ginas","panel.filterMine":"Meus","panel.filterMineHint":"Apenas os feedbacks enviados deste navegador","fab.aria":"Siteping \u2014 Menu de feedback","fab.messages":"Exibir barra lateral","fab.annotate":"Criar nova anota\xe7\xe3o","fab.annotations":"Exibir ou ocultar marcadores","annotator.instruction":"Desenhe um ret\xe2ngulo na \xe1rea que deseja comentar \u2014 ou pressione Enter para comentar o \xfaltimo elemento em foco","annotator.instantInstruction":"Comentar o ponto clicado","annotator.touchInstruction":"Toque em um elemento ou arraste para selecionar uma \xe1rea","annotator.cancel":"Cancelar","popup.ariaLabel":"Formul\xe1rio de feedback","popup.placeholder":"Descreva seu feedback...","popup.textareaAria":"Mensagem de feedback","popup.submitHintMac":"\u2318+Enter para enviar","popup.submitHintOther":"Ctrl+Enter para enviar","popup.cancel":"Cancelar","popup.submit":"Enviar","identity.title":"Identifique-se","identity.nameLabel":"Nome","identity.namePlaceholder":"Seu nome","identity.emailLabel":"E-mail","identity.emailPlaceholder":"seu@email.com","identity.cancel":"Cancelar","identity.submit":"Continuar","marker.approximate":"Posi\xe7\xe3o aproximada (confian\xe7a: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"{count} marcadores de feedback exibidos","fab.badge":"{count} feedbacks n\xe3o resolvidos","feedback.sent.confirmation":"Feedback enviado com sucesso","feedback.error.message":"Falha ao enviar feedback","feedback.queued":"Salvo neste dispositivo. Ser\xe1 enviado na sua pr\xf3xima visita.","feedback.deleted.confirmation":"Feedback exclu\xeddo","badge.count":"{count} feedbacks n\xe3o resolvidos","bulk.aria":"A\xe7\xf5es em massa","bulk.selectAll":"Selecionar tudo","bulk.selectFeedback":"Selecionar {label}","bulk.selected":"{count} selecionados","bulk.resolve":"Resolver","bulk.delete":"Excluir","bulk.deselect":"Desmarcar","sort.newest":"Mais recentes","sort.oldest":"Mais antigos","sort.byType":"Por tipo","sort.openFirst":"Abertos primeiro","sort.label":"Ordenar","group.byPage":"Por p\xe1gina","group.feedbacks":"{count} feedbacks","stats.aria":"Estat\xedsticas de feedbacks","stats.open":"Abertos","stats.closed":"Fechados","stats.bugs":"Bugs","stats.progress":"{percent}% fechados","detail.back":"Voltar","detail.aria":"Detalhes do feedback","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Mensagem","detail.screenshot":"Captura","detail.screenshotAlt":"Captura da \xe1rea anotada","detail.metadata":"Detalhes","detail.annotation":"Anota\xe7\xe3o","detail.page":"P\xe1gina","detail.author":"Autor","detail.date":"Criado","detail.viewport":"Viewport","detail.browser":"Navegador","detail.resolvedAt":"Resolvido em","detail.closedAt":"Fechado em","detail.goToAnnotation":"Ir para anota\xe7\xe3o","detail.element":"Elemento","detail.selector":"Seletor","detail.position":"Posi\xe7\xe3o","detail.resolve":"Resolver","detail.reopen":"Reabrir","detail.delete":"Excluir","detail.diagnostics":"Diagn\xf3stico","detail.diagnostics.console":"Console","detail.diagnostics.network":"Rede com falha","detail.diagnostics.expand":"Mostrar diagn\xf3stico","detail.diagnostics.collapse":"Ocultar diagn\xf3stico","detail.diagnostics.noEntries":"Sem entradas","comments.title":"Respostas","comments.placeholder":"Responder \xe0 equipe...","comments.error":"N\xe3o enviada. Tente novamente.","comments.full":"Esta conversa est\xe1 cheia.","comments.team":"Equipe","shortcuts.title":"Atalhos de teclado","shortcuts.navigate":"Navegar feedbacks","shortcuts.resolve":"Resolver / Reabrir","shortcuts.delete":"Excluir","shortcuts.search":"Buscar","shortcuts.select":"Alternar sele\xe7\xe3o","shortcuts.help":"Mostrar atalhos","shortcuts.close":"Fechar","shortcuts.hint":"Atalhos de teclado","export.label":"Exportar","export.csv":"Exportar CSV","export.json":"Exportar JSON"}}),Xh={};r(Xh,{ru:()=>Jh});var Jh,Qh,Zh=i(()=>{Jh={"panel.title":"\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c","panel.ariaLabel":"\u041f\u0430\u043d\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 Siteping","panel.feedbackList":"\u0421\u043f\u0438\u0441\u043e\u043a \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c","panel.deleteAll":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0451","panel.deleteAllConfirmTitle":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0451","panel.deleteAllConfirmMessage":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0442\u0437\u044b\u0432\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430? \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0435\u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e.","panel.search":"\u041f\u043e\u0438\u0441\u043a...","panel.searchAria":"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u043e\u0442\u0437\u044b\u0432\u0430\u043c","panel.filterAll":"\u0412\u0441\u0435","panel.loadError":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","panel.retry":"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c","panel.empty":"\u041f\u043e\u043a\u0430 \u043d\u0435\u0442 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.showMore":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435","panel.notOnPage":"\u041d\u0435 \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435","panel.showLess":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435","panel.resolve":"\u0420\u0435\u0448\u0435\u043d\u043e","panel.reopen":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e","panel.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","panel.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","panel.confirmDelete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","panel.loadMore":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0451 ({remaining} \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c)","panel.statusAll":"\u0412\u0441\u0435","panel.statusOpen":"\u041e\u0442\u043a\u0440\u044b\u0442","panel.statusResolved":"\u0420\u0435\u0448\u0451\u043d","panel.statusInProgress":"\u0412 \u0440\u0430\u0431\u043e\u0442\u0435","panel.statusWontFix":"\u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e","panel.statusClosed":"\u0417\u0430\u043a\u0440\u044b\u0442","type.label":"\u0422\u0438\u043f","type.question":"\u0412\u043e\u043f\u0440\u043e\u0441","type.change":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435","type.bug":"\u0411\u0430\u0433","type.other":"\u0414\u0440\u0443\u0433\u043e\u0435","status.label":"\u0421\u0442\u0430\u0442\u0443\u0441","scope.label":"\u041e\u0431\u043b\u0430\u0441\u0442\u044c","scope.thisPage":"\u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","scope.thisType":"\u042d\u0442\u043e\u0442 \u0442\u0438\u043f","scope.all":"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b","panel.filterMine":"\u041c\u043e\u0438","panel.filterMineHint":"\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0437\u044b\u0432\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430","fab.aria":"Siteping \u2014 \u041c\u0435\u043d\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438","fab.messages":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c","fab.annotate":"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e","fab.annotations":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043b\u0438 \u0441\u043a\u0440\u044b\u0442\u044c \u043c\u0435\u0442\u043a\u0438","annotator.instruction":"\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u2014 \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442","annotator.instantInstruction":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435","annotator.touchInstruction":"\u041a\u043e\u0441\u043d\u0438\u0442\u0435\u0441\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u043b\u044c\u0446\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c","annotator.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","popup.ariaLabel":"\u0424\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438","popup.placeholder":"\u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435...","popup.textareaAria":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435","popup.submitHintMac":"\u2318+Enter \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","popup.submitHintOther":"Ctrl+Enter \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","popup.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","popup.submit":"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","identity.title":"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435\u0441\u044c","identity.nameLabel":"\u0418\u043c\u044f","identity.namePlaceholder":"\u0412\u0430\u0448\u0435 \u0438\u043c\u044f","identity.emailLabel":"Email","identity.emailPlaceholder":"\u0432\u0430\u0448@email.com","identity.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","identity.submit":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c","marker.approximate":"\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c: {confidence}%)","marker.aria":"\u041e\u0442\u0437\u044b\u0432 #{number}: {type}, {status} \u2014 {message}","marker.count":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","fab.badge":"\u041d\u0435\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","feedback.sent.confirmation":"\u041e\u0442\u0437\u044b\u0432 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d","feedback.error.message":"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432","feedback.queued":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0438.","feedback.deleted.confirmation":"\u041e\u0442\u0437\u044b\u0432 \u0443\u0434\u0430\u043b\u0451\u043d","badge.count":"\u041d\u0435\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","bulk.aria":"\u041c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","bulk.selectAll":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435","bulk.selectFeedback":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c: {label}","bulk.selected":"\u0412\u044b\u0431\u0440\u0430\u043d\u043e: {count}","bulk.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c","bulk.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","bulk.deselect":"\u0421\u043d\u044f\u0442\u044c \u0432\u044b\u0431\u043e\u0440","sort.newest":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u043e\u0432\u044b\u0435","sort.oldest":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0440\u044b\u0435","sort.byType":"\u041f\u043e \u0442\u0438\u043f\u0443","sort.openFirst":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435","sort.label":"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430","group.byPage":"\u041f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435","group.feedbacks":"\u041e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","stats.aria":"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","stats.open":"\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435","stats.closed":"\u0417\u0430\u043a\u0440\u044b\u0442\u044b\u0435","stats.bugs":"\u0411\u0430\u0433\u0438","stats.progress":"\u0417\u0430\u043a\u0440\u044b\u0442\u043e: {percent}%","detail.back":"\u041d\u0430\u0437\u0430\u0434","detail.aria":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0437\u044b\u0432\u0430","detail.title":"\u041e\u0442\u0437\u044b\u0432 #{number}","detail.status":"\u0421\u0442\u0430\u0442\u0443\u0441","detail.message":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435","detail.screenshot":"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442","detail.screenshotAlt":"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438","detail.metadata":"\u0414\u0435\u0442\u0430\u043b\u0438","detail.annotation":"\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f","detail.page":"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430","detail.author":"\u0410\u0432\u0442\u043e\u0440","detail.date":"\u0421\u043e\u0437\u0434\u0430\u043d","detail.viewport":"Viewport","detail.browser":"\u0411\u0440\u0430\u0443\u0437\u0435\u0440","detail.resolvedAt":"\u0420\u0435\u0448\u0451\u043d","detail.closedAt":"\u0417\u0430\u043a\u0440\u044b\u0442","detail.goToAnnotation":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438","detail.element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442","detail.selector":"\u0421\u0435\u043b\u0435\u043a\u0442\u043e\u0440","detail.position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","detail.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c","detail.reopen":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e","detail.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","detail.diagnostics":"\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430","detail.diagnostics.console":"\u041a\u043e\u043d\u0441\u043e\u043b\u044c","detail.diagnostics.network":"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438","detail.diagnostics.expand":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443","detail.diagnostics.collapse":"\u0421\u043a\u0440\u044b\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443","detail.diagnostics.noEntries":"\u041d\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0435\u0439","comments.title":"\u041e\u0442\u0432\u0435\u0442\u044b","comments.placeholder":"\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0435...","comments.error":"\u041d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.","comments.full":"\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e.","comments.team":"\u041a\u043e\u043c\u0430\u043d\u0434\u0430","shortcuts.title":"\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438","shortcuts.navigate":"\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043e\u0442\u0437\u044b\u0432\u0430\u043c","shortcuts.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c / \u041f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u044c","shortcuts.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","shortcuts.search":"\u041f\u043e\u0438\u0441\u043a","shortcuts.select":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440","shortcuts.help":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0438","shortcuts.close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","shortcuts.hint":"\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438","export.label":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","export.csv":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","export.json":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 JSON"}});function eu(e,t){switch(e){case"question":return t("type.question");case"change":return t("type.change");case"bug":return t("type.bug");case"other":return t("type.other");default:return e}}function tu(e,t){switch(e){case"open":return t("panel.statusOpen");case"in_progress":return t("panel.statusInProgress");case"resolved":return t("panel.statusResolved");case"wont_fix":return t("panel.statusWontFix");default:return e}}e.registerLocale=void 0,e.loadLocale=void 0;var iu,ru,su=i(()=>{O(),Th(),Qh=function(e,t){let i=Object.assign(Object.create(null),{en:e}),r=Object.create(null);function s(e){return Object.hasOwn(t,e)}return{registerLocale(e,t){let i=m(e);r[i]={...r[i],...t}},async loadLocale(e){let n=m(e);return s(n)&&(i[n]??=await t[n]()),r[n]?{...i[n],...r[n]}:i[n]??null},createT(t){let n=m(t);return!i[n]&&!r[n]&&!s(n)&&console.warn(`[siteping] Unknown locale "${t}", falling back to "en"`),t=>r[n]?.[t]??i[n]?.[t]??e[t]??t}}}(Mh,{de:()=>Promise.resolve().then(()=>(Lh(),Bh)).then(e=>e.de),es:()=>Promise.resolve().then(()=>(Nh(),Ph)).then(e=>e.es),fr:()=>Promise.resolve().then(()=>(Fh(),Dh)).then(e=>e.fr),it:()=>Promise.resolve().then(()=>(_h(),$h)).then(e=>e.it),ja:()=>Promise.resolve().then(()=>(Vh(),Wh)).then(e=>e.ja),ko:()=>Promise.resolve().then(()=>(Yh(),jh)).then(e=>e.ko),pt:()=>Promise.resolve().then(()=>(Kh(),qh)).then(e=>e.pt),ru:()=>Promise.resolve().then(()=>(Zh(),Xh)).then(e=>e.ru)}),e.registerLocale=Qh.registerLocale,e.loadLocale=Qh.loadLocale,iu=Qh.createT,ru=b});function nu(e,t,i){let r=new Blob([e],{type:i}),s=URL.createObjectURL(r),n=document.createElement("a");n.href=s,n.download=t,n.style.display="none",X(n),document.body.appendChild(n),n.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(s),n.remove()})}var ou,au,lu,du,cu,pu=i(()=>{G(),Pe(),ou=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"],au=class{constructor(e,t,i){this.getFeedbacks=t,this.element=z("div",{style:"position: relative; display: inline-flex;"});let r=document.createElement("button");r.className="sp-export-btn",r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild($('<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>'));let s=document.createElement("span");_(s,i("export.label")),r.appendChild(s),r.addEventListener("click",e=>{e.stopPropagation(),this.toggle()}),this.menu=z("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let n=this.createOption('<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>',i("export.csv"),()=>{this.exportAs("csv")}),o=this.createOption('<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>',i("export.json"),()=>{this.exportAs("json")});this.menu.appendChild(n),this.menu.appendChild(o),this.element.appendChild(r),this.element.appendChild(this.menu),this.element.addEventListener("keydown",e=>{"Escape"!==e.key||!this.isOpen||(e.stopPropagation(),this.close(),r.focus())})}getFeedbacks;element;menu;isOpen=!1;removeOutsideClick=null;createOption(e,t,i){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let s=z("span",{class:"sp-export-option-icon"});s.appendChild($(e));let n=z("span",{class:"sp-export-option-label"});return _(n,t),r.appendChild(s),r.appendChild(n),r.addEventListener("click",e=>{e.stopPropagation(),i(),this.close()}),r}toggle(){this.isOpen?this.close():this.open()}open(){this.isOpen=!0,this.removeOutsideClick=W(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=!1,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 t=this.getFeedbacks();if(0===t.length)return;let i=t[0]?.projectName??"feedbacks",r=(new Date).toISOString().slice(0,10),s=i.replace(/[^a-zA-Z0-9_-]/g,"_");if("csv"===e){let e=`\ufeff${function(e){let t=ou.join(","),i=e.map(e=>ou.map(t=>{let i=e[t];return function(e){let t=/^[=+\-@\t\r]/.test(e)?`'${e}`:e;return t.includes('"')||t.includes(",")||t.includes("\n")||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t}(null==i?"":String(i))}).join(","));return[t,...i].join("\n")}(t)}`;nu(e,`feedbacks-${s}-${r}.csv`,"text/csv;charset=utf-8")}else nu((n=t,JSON.stringify(n,null,2)),`feedbacks-${s}-${r}.json`,"application/json;charset=utf-8");var n}destroy(){this.close(),this.element.remove()}}}),hu=i(()=>{G(),su(),lu='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="2"/></svg>',du='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" fill="url(#sp-cb-grad)" stroke="none"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="sp-cb-grad" x1="0" y1="0" x2="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="var(--sp-accent)"/><stop offset="100%" stop-color="var(--sp-accent-dark)"/></linearGradient></defs></svg>',cu=class{constructor(e,t,i){this.callbacks=t,this.t=i,this.barElement=z("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label",i("bulk.aria")),V(this.barElement,!0),this.countLabel=z("span",{class:"sp-bulk-bar-count"}),_(this.countLabel,ru(this.t,"bulk.selected",{count:0}));let r=z("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 s=document.createElement("button");s.className="sp-bulk-btn-deselect",s.type="button",s.setAttribute("aria-label",this.t("bulk.deselect")),s.appendChild($('<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>')),s.addEventListener("click",()=>this.deselectAll()),r.appendChild(this.resolveBtn),r.appendChild(this.deleteBtn),r.appendChild(s),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(r),this.updateButtonLabels()}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=!1;t;createCheckbox(e,t){let i=z("div",{class:"sp-bulk-checkbox"});return i.setAttribute("role","checkbox"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",ru(this.t,"bulk.selectFeedback",{label:t})),i.addEventListener("click",t=>{t.stopPropagation(),this.toggle(e)}),i.addEventListener("keydown",t=>{(" "===t.key||"Enter"===t.key)&&(t.preventDefault(),t.stopPropagation(),this.toggle(e))}),this.checkboxMap.set(e,i),this.updateCheckbox(e),i}isSelected(e){return this.selected.has(e)}createSelectAllBar(e,t){let i=z("div",{class:"sp-bulk-select-all"}),r=z("div",{class:"sp-bulk-checkbox"});r.setAttribute("role","checkbox"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",t),this.selectAllCheckbox=r,this.updateSelectAllCheckbox(e.length>0&&e.every(e=>this.selected.has(e)));let s=z("span");_(s,t),i.appendChild(r),i.appendChild(s);let n=()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e)};return i.addEventListener("click",n),r.addEventListener("keydown",e=>{(" "===e.key||"Enter"===e.key)&&(e.preventDefault(),e.stopPropagation(),n())}),i}setListContainer(e){this.listContainer=e}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e))}selectAll(e){if(!this.isProcessing){for(let t of e)this.selected.add(t),this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass()}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let t of e)this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass()}get selectedIds(){return[...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=!1,this.updateBar(),this.updateListSelectionClass()}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove()}updateBar(){let e=this.selected.size,t=e>0;!t&&j(this.barElement)&&this.selectAllCheckbox?.focus(),V(this.barElement,!t),this.barElement.classList.toggle("sp-bulk-bar--visible",t),_(this.countLabel,ru(this.t,"bulk.selected",{count:e}));let i=[...this.selected];H(this.resolveBtn,!1===this.callbacks.permits?.(i,"canChangeStatus")),H(this.deleteBtn,!1===this.callbacks.permits?.(i,"canDelete")),this.updateButtonLabels()}updateButtonLabels(){let e=this.selected.size,t=this.t("bulk.resolve"),i=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");_(r,e>0?`${t} ${e}`:t),this.resolveBtn.appendChild(r),this.deleteBtn.replaceChildren();let s=document.createElement("span");_(s,e>0?`${i} ${e}`:i),this.deleteBtn.appendChild(s)}updateCheckbox(e){let t=this.checkboxMap.get(e);if(!t)return;let i=this.selected.has(e);t.classList.toggle("sp-bulk-checkbox--checked",i),t.setAttribute("aria-checked",String(i)),t.replaceChildren(),t.appendChild($(i?du:lu))}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($(e?du:lu)))}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0)}updateCardSelectedState(e){if(!this.listContainer)return;let t=CSS.escape(e),i=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);i&&i.classList.toggle("sp-card--selected",this.selected.has(e))}async handleResolve(){if(this.isProcessing||0===this.selected.size)return;this.isProcessing=!0;let e=[...this.selected];U(this.resolveBtn),this.deleteBtn.disabled=!0;try{await this.callbacks.onResolve(e)}catch{return}finally{this.endProcessing()}this.deselectAll()}async handleDelete(){if(this.isProcessing||0===this.selected.size)return;this.isProcessing=!0;let e=[...this.selected];U(this.deleteBtn),this.resolveBtn.disabled=!0;try{await this.callbacks.onDelete(e)}catch{return}finally{this.endProcessing()}this.deselectAll()}endProcessing(){this.isProcessing=!1,this.resolveBtn.disabled=!1,this.deleteBtn.disabled=!1,this.updateButtonLabels()}}});function uu(e){for(let t of[...e.attributes])(!bu.has(t.name.toLowerCase())||!xu(t.value))&&e.removeAttribute(t.name);for(let t of[...e.children])mu.has(t.localName.toLowerCase())?uu(t):t.remove()}function fu(e){let t=(new DOMParser).parseFromString(e,"text/html").body.firstElementChild;return"http://www.w3.org/2000/svg"!==t?.namespaceURI||"svg"!==t.localName?null:(uu(t),t.setAttribute("aria-hidden","true"),document.importNode(t,!0))}function gu(e){try{let t=new URL(e,document.baseURI);return/^(https?|mailto):$/.test(t.protocol)?t.href:null}catch{return null}}var mu,bu,yu,xu,vu,wu,ku=i(()=>{mu=new Set(["svg","g","path","circle","ellipse","line","polyline","polygon","rect","defs","lineargradient","radialgradient","stop","clippath","mask"]),bu=new Set("id viewbox preserveaspectratio width height x y x1 y1 x2 y2 cx cy r rx ry fx fy fr d points pathlength\n transform opacity color fill fill-opacity fill-rule stroke stroke-width stroke-linecap stroke-linejoin\n stroke-miterlimit stroke-dasharray stroke-dashoffset stroke-opacity clip-path clip-rule mask offset\n stop-color stop-opacity gradientunits gradienttransform spreadmethod clippathunits maskunits\n maskcontentunits".split(/\s+/)),yu=/\b(?:(?:rgba?|hsla?|matrix|translate|scale|rotate|skewx|skewy)\([^()\\]*\)|url\(\s*(['"]?)#[\w-]+\1\s*\))/gi,xu=e=>!e.includes("\\")&&!e.replace(yu,"").includes("("),vu=e=>"function"==typeof e.onAction&&void 0===e.href,wu=e=>("string"==typeof e.href||"function"==typeof e.href)&&void 0===e.onAction});function Cu(e,t){try{return new Date(e).toLocaleString(t,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function Su(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}function Eu(e){return!Number.isFinite(e)||e<0?"\u2014":e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)} s`}function Mu({action:e,icon:t}){let i=document.createElement("span");return _(i,e.label),t?[t.cloneNode(!0),i]:[i]}var Au,Tu,Bu,Ru=i(()=>{O(),G(),su(),Ie(),ku(),qe(),Au='<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>',Tu='<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>',Bu=class{constructor(e,t,i,r,s=[]){this.colors=e,this.callbacks=t,this.customActions=s,this.t=i,this.locale=r,this.element=z("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label",i("detail.aria")),this.element.setAttribute("aria-hidden","true"),V(this.element,!0);let n=z("div",{class:"sp-detail-header"}),o=document.createElement("button");o.type="button",o.className="sp-detail-back",o.setAttribute("aria-label",this.t("detail.back")),o.appendChild($('<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>')),o.addEventListener("click",()=>{this.hide(),this.callbacks.onBack()}),this.element.appendChild(n),n.appendChild(o),this.content=z("div",{class:"sp-detail-content"}),this.element.appendChild(this.content)}colors;callbacks;customActions;element;_isVisible=!1;opener=null;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;customBtns=[];pending=new Map;show(e,t){this.currentFeedback=e;let i=this.element.querySelector(".sp-detail-header");if(!i)return;let r=i.querySelector(".sp-detail-back");if(!r)return;i.replaceChildren(r);let s=z("span",{class:"sp-detail-title"});_(s,ru(this.t,"detail.title",{number:t})),i.appendChild(s);let n=z("span",{class:"sp-badge"});n.style.background=We(e.type,this.colors),n.style.color=$e(e.type,this.colors),_(n,eu(e.type,this.t)),i.appendChild(n),this.content.replaceChildren();let o=0,a=this.buildSection(o++);this.buildStatusActions(a,e);let l=this.pending.get(e.id);l&&this.lock(l),this.content.appendChild(a);let d=this.buildSection(o++),c=z("div",{class:"sp-detail-section-title"});_(c,this.t("detail.message")),d.appendChild(c);let p=z("div",{class:"sp-detail-message"});p.style.borderLeftColor=$e(e.type,this.colors),_(p,e.message),d.appendChild(p);let h=this.callbacks.buildThread?.(e);if(h&&d.appendChild(h),this.content.appendChild(d),e.screenshotUrl&&(u=e.screenshotUrl,/^data:image\/(jpeg|png|webp);/i.test(u)||/^https:\/\//i.test(u)||function(e){try{let{protocol:t,hostname:i}=new URL(e);return"http:"===t&&("localhost"===i||i.endsWith(".localhost")||"127.0.0.1"===i||"[::1]"===i)}catch{return!1}}(u))){let t=this.buildSection(o++),i=z("div",{class:"sp-detail-section-title"});_(i,this.t("detail.screenshot")),t.appendChild(i);let r=document.createElement("img");r.className="sp-detail-screenshot",r.src=e.screenshotUrl,r.alt=this.t("detail.screenshotAlt"),r.loading="lazy",r.referrerPolicy="no-referrer",t.appendChild(r),this.content.appendChild(t)}var u;let f=this.buildSection(o++),g=z("div",{class:"sp-detail-section-title"});if(_(g,this.t("detail.metadata")),f.appendChild(g),this.buildMetadata(f,e),this.content.appendChild(f),e.annotations.length>0){let t=this.buildSection(o++),i=z("div",{class:"sp-detail-section-title"});i.appendChild($(Au));let r=z("span");_(r,this.t("detail.annotation")),i.appendChild(r),t.appendChild(i),this.buildAnnotation(t,e),this.content.appendChild(t)}if(function(e){if(!e)return!1;let t=Array.isArray(e.console)?e.console.length:0,i=Array.isArray(e.network)?e.network.length:0;return t>0||i>0}(e.diagnostics)){let t=this.buildSection(o++),i=z("div",{class:"sp-detail-section-title"});i.appendChild($('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>'));let r=z("span");_(r,this.t("detail.diagnostics")),i.appendChild(r),t.appendChild(i),this.buildDiagnostics(t,e),this.content.appendChild(t)}if(!this._isVisible){let e=this.element.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null}this._isVisible=!0,this.element.setAttribute("aria-hidden","false"),V(this.element,!1),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),requestAnimationFrame(()=>{r.focus()})}hide(){if(!this._isVisible)return;this._isVisible=!1;let e=j(this.element),t=this.currentFeedback?.id;this.element.classList.remove("sp-detail--visible"),this.element.setAttribute("aria-hidden","true"),V(this.element,!0),e&&(!0===this.opener?.isConnected?this.opener:t?this.element.parentElement?.querySelector(`.sp-card[data-feedback-id="${CSS.escape(t)}"]`):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 t=z("div",{class:"sp-detail-section"});return t.style.animationDelay=40*e+"ms",t}buildStatusActions(e,t){let i=x(t.status),r=z("div",{class:"sp-detail-section-title"});_(r,this.t("detail.status")),e.appendChild(r);let s=t.status.replace(/_/g,"-"),n={open:"#22c55e",in_progress:"#f59e0b",resolved:"#9ca3af",wont_fix:"#94a3b8"},o=z("div",{class:"sp-detail-status"}),a=z("span",{class:`sp-detail-status-pill sp-detail-status-pill--${s}`}),l=z("span",{class:"sp-detail-status-dot"});l.style.background=n[t.status]??n.open,a.appendChild(l);let d=z("span");_(d,tu(t.status,this.t)),a.appendChild(d),o.appendChild(a),e.appendChild(o);let c=z("div",{class:"sp-detail-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",this.resolveBtn.className=i?"sp-detail-btn-reopen":"sp-detail-btn-resolve",this.restoreResolveBtn(t),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()),!1!==this.callbacks.permits?.(t,"canChangeStatus")&&c.appendChild(this.resolveBtn),!1!==this.callbacks.permits?.(t,"canDelete")&&c.appendChild(this.deleteBtn),e.appendChild(c),this.buildCustomActions(e,t)}buildCustomActions(e,t){if(this.customBtns=[],0===this.customActions.length)return;let i=(s=t,JSON.parse(JSON.stringify(s),(e,t)=>"object"==typeof t&&null!==t?Object.freeze(t):t)),r=z("div",{class:"sp-detail-actions sp-detail-actions--custom"});var s;for(let e of this.customActions){let t,{action:s}=e;try{if(s.visible&&!s.visible(i))continue;if(void 0===s.href){let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",s.label),r.addEventListener("click",()=>{this.run(e,()=>this.callbacks.onCustomAction(s,i))}),this.customBtns.push(r),t=r}else{let e=gu("function"==typeof s.href?s.href(i):s.href);if(!e)throw new Error(`[siteping] Panel action "${s.id}": href must be an http(s) or mailto URL.`);let r=document.createElement("a");r.href=e,e.startsWith("mailto:")||(r.target="_blank"),r.rel="noopener noreferrer",t=r}}catch(e){this.callbacks.onCustomActionError(e);continue}t.className="sp-detail-btn-custom",t.setAttribute("data-action-id",s.id),t.title=s.label,t.append(...Mu(e)),r.appendChild(t)}r.childElementCount>0&&e.appendChild(r)}buildMetadata(e,t){let i=z("div",{class:"sp-detail-meta"});if(this.addMetaRow(i,'<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>',this.t("detail.page"),()=>{let e=z("div",{class:"sp-detail-meta-value"});return _(e,Su(function(e){try{return new URL(e).pathname}catch{return e}}(t.url),60)),e.title=t.url,e}),this.addMetaRow(i,Be,this.t("detail.author"),()=>{let e=z("div",{class:"sp-detail-meta-value"}),i=t.authorName||"Anonymous",r=t.authorEmail;return _(e,r?`${i} (${r})`:i),e}),this.addMetaRow(i,'<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>',this.t("detail.date"),()=>{let e=z("div",{class:"sp-detail-meta-value"});return _(e,Cu(t.createdAt,this.locale)),e}),this.addMetaRow(i,'<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>',this.t("detail.viewport"),()=>{let e=z("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return _(e,t.viewport||"Unknown"),e}),this.addMetaRow(i,'<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 e=z("div",{class:"sp-detail-meta-value"});return _(e,function(e){if(/Edg\//i.test(e)){let t=e.match(/Edg\/([\d.]+)/);return t?`Edge ${t[1]}`:"Edge"}if(/OPR\//i.test(e)||/Opera/i.test(e)){let t=e.match(/OPR\/([\d.]+)/);return t?`Opera ${t[1]}`:"Opera"}if(/Firefox\//i.test(e)){let t=e.match(/Firefox\/([\d.]+)/);return t?`Firefox ${t[1]}`:"Firefox"}if(/Chrome\//i.test(e)&&!/Chromium/i.test(e)){let t=e.match(/Chrome\/([\d.]+)/);return t?`Chrome ${t[1]}`:"Chrome"}if(/Safari\//i.test(e)&&!/Chrome/i.test(e)){let t=e.match(/Version\/([\d.]+)/);return t?`Safari ${t[1]}`:"Safari"}return"Unknown"}(t.userAgent)),e}),t.resolvedAt){let e=t.resolvedAt,r="wont_fix"===t.status?this.t("detail.closedAt"):this.t("detail.resolvedAt");this.addMetaRow(i,Tu,r,()=>{let t=z("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return _(t,Cu(e,this.locale)),t})}e.appendChild(i)}addMetaRow(e,t,i,r){let s=z("div",{class:"sp-detail-meta-row"});s.appendChild($(t));let n=z("div",{class:"sp-detail-meta-content"}),o=z("div",{class:"sp-detail-meta-label"});_(o,i),n.appendChild(o),n.appendChild(r()),s.appendChild(n),e.appendChild(s)}buildAnnotation(e,t){let i=t.annotations[0];if(!i)return;let r=z("div",{class:"sp-detail-annotation"}),s=z("div",{class:"sp-detail-annotation-info"});if(this.addAnnotationRow(s,'<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>',this.t("detail.element"),()=>{let e=z("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return _(e,i.elementId?`<${i.elementTag}#${i.elementId}>`:`<${i.elementTag}>`),e}),this.addAnnotationRow(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="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>',this.t("detail.selector"),()=>{let e=z("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return _(e,Su(i.cssSelector,60)),e.title=i.cssSelector,e}),this.addAnnotationRow(s,Au,this.t("detail.position"),()=>{let e=z("span",{class:"sp-detail-annotation-value"}),t=e=>`${(100*e).toFixed(1)}%`;return _(e,`${t(i.xPct)}, ${t(i.yPct)}`+(i.wPct>0||i.hPct>0?` (${t(i.wPct)} \xd7 ${t(i.hPct)})`:"")),e}),r.appendChild(s),e.appendChild(r),!1===this.callbacks.canGoToAnnotation?.(t))return;let n=document.createElement("button");n.type="button",n.className="sp-detail-btn-goto",n.appendChild($(Au));let o=document.createElement("span");_(o,this.t("detail.goToAnnotation")),n.appendChild(o),n.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback)}),r.appendChild(n);let a=this.callbacks.lostNote?.(t.id);a&&r.appendChild(a)}buildDiagnostics(e,t){let i=t.diagnostics;if(!i)return;let r=Array.isArray(i.console)?i.console:[],s=Array.isArray(i.network)?i.network:[],n=r.filter(e=>"error"===e.level).length,o=z("div",{class:"sp-detail-diag"}),a=document.createElement("button");a.type="button",a.className="sp-detail-diag-toggle",a.setAttribute("aria-expanded","false"),a.setAttribute("aria-label",this.t("detail.diagnostics.expand"));let l=document.createElement("span"),d=document.createElement("span");d.style.display="inline-flex",d.style.alignItems="center",d.style.gap="8px",d.appendChild($('<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>')),_(l,this.t("detail.diagnostics")),d.appendChild(l),a.appendChild(d);let c=z("span",{class:"sp-detail-diag-counts"}),p=z("span",{class:"sp-detail-diag-count"+(n>0?" sp-detail-diag-count--errors":"")});_(p,`${r.length} console`);let h=z("span",{class:"sp-detail-diag-count"+(s.length>0?" sp-detail-diag-count--errors":"")});_(h,`${s.length} net`),c.appendChild(p),c.appendChild(h),a.appendChild(c);let u=z("div",{class:"sp-detail-diag-body"});if(r.length>0){let e=document.createElement("div"),t=z("div",{class:"sp-detail-diag-group-title"});_(t,this.t("detail.diagnostics.console")),e.appendChild(t);let i=document.createElement("ul");i.className="sp-detail-diag-list";for(let e of r){let t=document.createElement("li"),r=z("span",{class:`sp-detail-diag-level sp-detail-diag-level--${e.level}`});_(r,e.level);let s=z("span",{class:"sp-detail-diag-message"});_(s,Su(e.message,240)),s.title=e.message,t.appendChild(r),t.appendChild(s),i.appendChild(t)}e.appendChild(i),u.appendChild(e)}if(s.length>0){let e=document.createElement("div"),t=z("div",{class:"sp-detail-diag-group-title"});_(t,this.t("detail.diagnostics.network")),e.appendChild(t);let i=document.createElement("ul");i.className="sp-detail-diag-list";for(let e of s){let t=document.createElement("li");t.classList.add("sp-detail-diag-net");let r=z("span",{class:"sp-detail-diag-net-status"});_(r,0===e.status?"ERR":String(e.status));let s=z("span",{class:"sp-detail-diag-net-method"});_(s,e.method);let n=z("span",{class:"sp-detail-diag-net-url"});_(n,Su(e.url,120)),n.title=`${e.url} \u2014 ${Eu(e.durationMs)}`,t.appendChild(r),t.appendChild(s),t.appendChild(n),i.appendChild(t)}e.appendChild(i),u.appendChild(e)}a.addEventListener("click",()=>{let e=!("true"===a.getAttribute("aria-expanded"));a.setAttribute("aria-expanded",String(e)),a.setAttribute("aria-label",e?this.t("detail.diagnostics.collapse"):this.t("detail.diagnostics.expand")),u.classList.toggle("sp-detail-diag-body--open",e)}),o.appendChild(a),o.appendChild(u),e.appendChild(o)}addAnnotationRow(e,t,i,r){let s=z("div",{class:"sp-detail-annotation-row"});s.appendChild($(t));let n=z("div",{class:"sp-detail-meta-content"}),o=z("div",{class:"sp-detail-annotation-label"});_(o,i),n.appendChild(o),n.appendChild(r()),s.appendChild(n),e.appendChild(s)}handleResolve(){return this.run("resolve",e=>this.callbacks.onResolve(e))}handleDelete(){return this.run("delete",e=>this.callbacks.onDelete(e))}async run(e,t){let i=this.currentFeedback;if(i&&!this.pending.has(i.id)){this.pending.set(i.id,e),this.lock(e);try{await t(i)}catch{}finally{this.pending.delete(i.id),this.currentFeedback?.id===i.id&&this.unlock(e,this.currentFeedback)}}}lock(e){this.setActionsDisabled(!0);let t=this.buttonFor(e);t&&(this.setButtonLoading(t),t.setAttribute("aria-busy","true"))}unlock(e,t){let i=this.buttonFor(e);i?.removeAttribute("aria-busy"),"resolve"===e?this.restoreResolveBtn(t):"delete"===e?this.restoreDeleteBtn():i?.replaceChildren(...Mu(e)),this.setActionsDisabled(!1)}buttonFor(e){return"resolve"===e?this.resolveBtn:"delete"===e?this.deleteBtn:this.customBtns.find(t=>t.dataset.actionId===e.action.id)??null}setActionsDisabled(e){for(let t of[this.resolveBtn,this.deleteBtn,...this.customBtns])t&&(t.disabled=e)}setButtonLoading(e){e.disabled=!0,e.replaceChildren(z("div",{class:"sp-spinner sp-spinner--sm"}))}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=!1,this.resolveBtn.replaceChildren();let t=x(e.status);this.resolveBtn.appendChild($(t?'<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>':Tu));let i=document.createElement("span");_(i,t?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(i)}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=!1,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild($('<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>'));let e=document.createElement("span");_(e,this.t("detail.delete")),this.deleteBtn.appendChild(e)}}});function Lu(e){try{return new URL(e).pathname}catch{return e}}function Pu(e,t){let i=z("div",{class:"sp-group-header"});i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("aria-expanded","true"),i.style.borderBottomColor="var(--sp-border)";let r=z("span",{class:"sp-group-header-chevron"});r.appendChild($(Nu)),i.appendChild(r);let s=z("span",{class:"sp-group-header-icon"});s.appendChild($(Iu)),i.appendChild(s);let n=z("span",{class:"sp-group-header-path"}),o=function(e){if(e.length<=40)return e;let t=Math.floor(19.5);return e.slice(0,t)+"\u2026"+e.slice(-t)}(e);_(n,o),e.length>40&&(n.title=e),i.appendChild(n);let a=z("span",{class:"sp-group-header-count"});a.style.background="var(--sp-accent-light)",a.style.color="var(--sp-accent)",_(a,String(t)),i.appendChild(a);let l=()=>{let e="true"===i.getAttribute("aria-expanded");i.setAttribute("aria-expanded",String(!e)),i.classList.toggle("sp-group-header--collapsed",e);let t=i.nextElementSibling;t?.classList.contains("sp-group-content")&&t.classList.toggle("sp-group-content--collapsed",e)};return i.addEventListener("click",l),i.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())}),i}var Iu,Nu,Du,Ou,Fu,$u,zu,_u=i(()=>{O(),G(),Iu='<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>',Nu='<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>',Du={question:0,change:1,bug:2,other:3},Ou=class{element;_sortMode="newest";_groupByPage=!1;menuEl=null;sortBtn;sortDropdown;groupToggle;t;onChange;removeOutsideClick=null;constructor(e,t){this.onChange=e,this.t=t,this.element=z("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 i=$('<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>');this.sortBtn.appendChild(i),this.sortBtn.appendChild(z("span",{class:"sp-sort-btn-label"})),this.updateSortLabel(),this.sortBtn.addEventListener("click",e=>{e.stopPropagation(),this.toggleMenu()}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let r=$(Iu);this.groupToggle.appendChild(r);let s=z("span",{class:"sp-group-toggle-label"});_(s,this.t("group.byPage")),this.groupToggle.appendChild(s),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=z("div",{class:"sp-sort-dropdown"}),this.sortDropdown.appendChild(this.sortBtn),this.element.appendChild(this.sortDropdown),this.element.appendChild(this.groupToggle),this.element.addEventListener("keydown",e=>{"Escape"!==e.key||!this.menuEl||(e.stopPropagation(),this.closeMenu(),this.sortBtn.focus())})}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){this.menuEl?this.closeMenu():this.openMenu()}openMenu(){this.menuEl=z("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let t of e){let e=document.createElement("button");e.className="sp-sort-option"+(t.mode===this._sortMode?" sp-sort-option--active":""),e.setAttribute("role","option"),e.setAttribute("aria-selected",String(t.mode===this._sortMode)),t.mode===this._sortMode&&(e.style.background="var(--sp-accent-light)",e.style.color="var(--sp-accent-text)"),_(e,t.label),e.addEventListener("click",e=>{e.stopPropagation(),this._sortMode=t.mode,this.updateSortLabel(),this.closeMenu(),this.onChange()}),this.menuEl.appendChild(e)}this.sortDropdown.appendChild(this.menuEl),this.removeOutsideClick=W(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 e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")}[this._sortMode],t=this.sortBtn.querySelector(".sp-sort-btn-label");t&&_(t,e),this.sortBtn.setAttribute("aria-label",`${this.t("sort.label")}: ${e}`)}destroy(){this.closeMenu()}},Fu='.sp-sort-controls{display:flex;align-items:center;gap:6px;margin-top:4px;padding-top:8px;border-top:1px solid var(--sp-border);}.sp-sort-dropdown{display:contents;}.sp-sort-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all 0.2s ease;position:relative;}.sp-sort-btn svg{width:14px;height:14px;flex-shrink:0;}.sp-sort-btn:hover{border-color:var(--sp-accent);color:var(--sp-accent-text);background:var(--sp-accent-light);}.sp-sort-btn[aria-expanded="true"]{border-color:var(--sp-accent);color:var(--sp-accent-text);background:var(--sp-accent-light);}.sp-sort-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:170px;padding:4px;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-md);z-index:10;animation:sp-sort-menu-in 0.15s ease-out both;}@keyframes sp-sort-menu-in{from{opacity:0;transform:translateY(-4px) scale(0.97);}to{opacity:1;transform:translateY(0) scale(1);}}.sp-sort-option{display:block;width:100%;padding:8px 12px;border:none;border-radius:8px;background:transparent;color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;text-align:left;transition:all 0.15s ease;}.sp-sort-option:hover{background:var(--sp-bg-hover);color:var(--sp-text);}.sp-sort-option--active{font-weight:600;}.sp-sort-option--active:hover{background:var(--sp-accent-light);color:var(--sp-accent-text);}.sp-group-toggle,.sp-mine-toggle{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all 0.2s ease;}.sp-group-toggle svg,.sp-mine-toggle svg{width:13px;height:13px;flex-shrink:0;}.sp-group-toggle:hover,.sp-mine-toggle:hover{border-color:var(--sp-accent);color:var(--sp-accent-text);background:var(--sp-accent-light);}.sp-group-toggle--active,.sp-mine-toggle--active{background:var(--sp-accent-gradient);border-color:transparent;color:#fff;box-shadow:0 2px 8px var(--sp-accent-glow);}.sp-group-toggle--active:hover,.sp-mine-toggle--active:hover{background:var(--sp-accent-gradient);border-color:transparent;color:#fff;}.sp-group-header{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--sp-accent-light);border-bottom:1px solid var(--sp-border);cursor:pointer;user-select:none;position:sticky;top:0;z-index:2;transition:background 0.2s ease;}.sp-group-header:hover{background:var(--sp-bg-hover);}.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 ease;transform:rotate(90deg);}.sp-group-header-chevron svg{width:12px;height:12px;color:var(--sp-text-tertiary);}.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-tertiary);}.sp-group-header-path{font-size:12px;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:11px;font-weight:700;padding:1px 8px;border-radius:var(--sp-radius-full);flex-shrink:0;font-variant-numeric:tabular-nums;}.sp-group-content{overflow:hidden;transition:max-height 0.25s ease,opacity 0.2s ease;max-height:5000px;opacity:1;}.sp-group-content--collapsed{max-height:0;opacity:0;pointer-events: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;}}@media (prefers-reduced-motion: reduce){.sp-sort-menu{animation:none;}.sp-group-header-chevron{transition:none;}.sp-group-content{transition:none;}}'}),Wu=i(()=>{O(),G(),su(),$u='.sp-stats-bar{display:flex;flex-direction:column;gap:8px;padding:12px 24px;border-bottom:1px solid var(--sp-border);user-select:none;}.sp-stats-bar[hidden]{display:none;}.sp-stats-row{display:flex;align-items:center;gap:16px;}.sp-stats-item{display:flex;align-items:center;gap:6px;}.sp-stats-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}.sp-stats-value{font-size:16px;font-weight:600;line-height:1;color:var(--sp-text);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";transition:opacity 0.3s ease;}.sp-stats-label{font-size:11px;line-height:1;color:var(--sp-text-tertiary);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-border);overflow:hidden;}.sp-stats-progress-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,var(--sp-accent),#22c55e);width:0%;transition:width 0.5s ease;}.sp-stats-progress-label{font-size:10px;line-height:1;color:var(--sp-text-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";min-width:64px;text-align:right;}',zu=class{element;valueOpen;valueClosed;valueBugs;progressFill;progressLabel;t;constructor(e){this.t=e,this.element=z("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label",e("stats.aria")),this.element.hidden=!0;let t=z("div",{class:"sp-stats-row"}),i=z("div",{class:"sp-stats-item"}),r=z("span",{class:"sp-stats-dot"});r.style.background="#22c55e",this.valueOpen=z("span",{class:"sp-stats-value"}),_(this.valueOpen,"0");let s=z("span",{class:"sp-stats-label"});_(s,this.t("stats.open")),i.appendChild(r),i.appendChild(this.valueOpen),i.appendChild(s);let n=z("div",{class:"sp-stats-item"}),o=z("span",{class:"sp-stats-dot"});o.style.background="#9ca3af",this.valueClosed=z("span",{class:"sp-stats-value"}),_(this.valueClosed,"0");let a=z("span",{class:"sp-stats-label"});_(a,this.t("stats.closed")),n.appendChild(o),n.appendChild(this.valueClosed),n.appendChild(a);let l=z("div",{class:"sp-stats-item"}),d=z("span",{class:"sp-stats-dot"});d.style.background="var(--sp-type-bug)",this.valueBugs=z("span",{class:"sp-stats-value"}),_(this.valueBugs,"0");let c=z("span",{class:"sp-stats-label"});_(c,this.t("stats.bugs")),l.appendChild(d),l.appendChild(this.valueBugs),l.appendChild(c),t.appendChild(i),t.appendChild(n),t.appendChild(l);let p=z("div",{class:"sp-stats-progress"}),h=z("div",{class:"sp-stats-progress-track"});this.progressFill=z("div",{class:"sp-stats-progress-fill"}),h.appendChild(this.progressFill),this.progressLabel=z("span",{class:"sp-stats-progress-label"}),_(this.progressLabel,""),p.appendChild(h),p.appendChild(this.progressLabel),this.element.appendChild(t),this.element.appendChild(p)}update(e,t){if(0===t)return void(this.element.hidden=!0);this.element.hidden=!1;let i=0,r=0,s=0;for(let t of e)x(t.status)?r++:i++,"bug"===t.type&&s++;_(this.valueOpen,String(i)),_(this.valueClosed,String(r)),_(this.valueBugs,String(s));let n=e.length,o=n>0?Math.round(r/n*100):0;requestAnimationFrame(()=>{this.progressFill.style.width=`${o}%`});let a=ru(this.t,"stats.progress",{percent:o});_(this.progressLabel,a)}}});function Hu(e){let t=Array.from(e.querySelectorAll(".sp-card")),i=e.getRootNode().activeElement?.closest(".sp-card"),r=i?t.indexOf(i):-1;return r>=0?r:t.findIndex(e=>e.classList.contains("sp-card--focused"))}var Vu,ju,Uu,Yu=i(()=>{G(),Vu=[{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"}],ju=class{constructor(e,t,i){this.t=i,this.keyMap=new Map([["j",()=>t.onNavigate("down")],["k",()=>t.onNavigate("up")],["r",()=>t.onResolve()],["d",()=>t.onDelete()],["f",()=>t.onFocusSearch()],["/",()=>t.onFocusSearch()],["x",()=>t.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.isSuspended=t.isSuspended??(()=>!1),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=e=>this.handleKeydown(e)}t;helpOverlay;hintButton;keyMap;isSuspended;boundHandler;shadowRoot=null;enabled=!1;helpVisible=!1;opener=null;destroyed=!1;enable(e){this.destroyed||this.enabled||(e&&(this.shadowRoot=e),(this.shadowRoot??document).addEventListener("keydown",this.boundHandler),this.enabled=!0)}disable(){this.enabled&&((this.shadowRoot??document).removeEventListener("keydown",this.boundHandler),this.enabled=!1,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=!0)}handleKeydown(e){if("Escape"===e.key)return void(this.helpVisible&&(e.preventDefault(),e.stopPropagation(),this.hideHelp()));if(this.helpVisible||this.isSuspended())return;let t=e.composedPath();if(t.some(e=>e instanceof Element&&"true"===e.getAttribute("aria-modal")))return;let i=t[0];if(i){let e=i.tagName?.toLowerCase();if("input"===e||"textarea"===e||"select"===e||i.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let r=this.keyMap.get(e.key);r&&(e.preventDefault(),e.stopPropagation(),r())}showHelp(){let e=this.helpOverlay.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null,this.helpVisible=!0,V(this.helpOverlay,!1),this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus()}hideHelp(){this.helpVisible=!1;let e=j(this.helpOverlay);V(this.helpOverlay,!0),this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible"),e&&this.opener?.isConnected&&this.opener.focus(),this.opener=null}buildOverlay(){let e=z("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),V(e,!0),e.addEventListener("click",t=>{t.target===e&&this.hideHelp()});let t=z("div",{class:"sp-shortcuts-card"}),i=z("div",{class:"sp-shortcuts-title"});i.appendChild($('<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>'));let r=z("span");_(r,this.t("shortcuts.title")),i.appendChild(r),t.appendChild(i);let s=document.createElement("button");s.className="sp-shortcuts-close",s.setAttribute("aria-label",this.t("shortcuts.close")),s.appendChild($('<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>')),s.addEventListener("click",()=>this.hideHelp()),t.appendChild(s);let n=z("div",{class:"sp-shortcuts-grid"});for(let e of Vu){let t=z("div",{class:"sp-shortcuts-row"}),i=z("div",{class:"sp-shortcuts-keys"});e.keys.forEach((e,t)=>{if(t>0){let e=z("span",{class:"sp-shortcuts-separator"});_(e,"/"),i.appendChild(e)}let r=z("span",{class:"sp-kbd"});_(r,e),i.appendChild(r)});let r=z("span",{class:"sp-shortcuts-desc"});_(r,this.t(e.label)),t.appendChild(i),t.appendChild(r),n.appendChild(t)}return t.appendChild(n),e.appendChild(t),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),_(e,"?"),e.addEventListener("click",e=>{e.stopPropagation(),this.toggleHelp()}),e}}}),qu=i(()=>{G(),Uu=class{element;current;opts;onChange;datasetKey;constructor(e){this.opts=e.options,this.current=e.value,this.onChange=e.onChange,this.datasetKey=e.datasetKey,this.element=z("div",{class:"sp-segmented"+(e.extraClass?` ${e.extraClass}`:""),role:"radiogroup"}),this.element.setAttribute("aria-label",e.ariaLabel);for(let t of this.opts){let i=document.createElement("button");i.type="button",i.className=void 0!==e.modifierPrefix?`sp-segmented__btn ${e.modifierPrefix}${t.value}`:"sp-segmented__btn",i.dataset[this.datasetKey]=t.value,i.setAttribute("role","radio");let r=this.current===t.value;if(i.setAttribute("aria-checked",String(r)),i.tabIndex=r?0:-1,r&&i.classList.add("sp-segmented__btn--active"),t.color&&i.style.setProperty("--sp-chip-color",t.color),t.bg&&i.style.setProperty("--sp-chip-bg",t.bg),t.icon){let e=z("span",{class:"sp-segmented__icon"});e.appendChild($(t.icon)),i.appendChild(e)}let s=z("span",{class:"sp-segmented__label"});_(s,t.label),i.appendChild(s),i.addEventListener("click",()=>this.select(t.value)),i.addEventListener("keydown",e=>this.handleKey(e,t.value)),this.element.appendChild(i)}}select(e){this.current=e,this.syncSelection(),this.onChange(e)}syncSelection(){let e=this.element.querySelectorAll(".sp-segmented__btn");for(let t of e){let e=t.dataset[this.datasetKey]===this.current;t.classList.toggle("sp-segmented__btn--active",e),t.setAttribute("aria-checked",String(e)),t.tabIndex=e?0:-1}}setOptionVisible(e,t){let i=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return!!i&&(i.style.display=t?"":"none",!0)}get value(){return this.current}focusOption(e){this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`)?.focus()}handleKey(e,t){let i,r=this.opts.map(e=>e.value).filter(e=>{let t=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return null!==t&&"none"!==t.style.display}),s=r.indexOf(t);if(s<0)return;switch(e.key){case"ArrowLeft":i=(s-1+r.length)%r.length;break;case"ArrowRight":i=(s+1)%r.length;break;case"Home":i=0;break;case"End":i=r.length-1;break;default:return}e.preventDefault();let n=r[i];void 0!==n&&(this.select(n),this.focusOption(n))}kebabKey(){return this.datasetKey.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}}});function Gu({input:e,send:t},i){e.readOnly=i,t.setAttribute("aria-busy",String(i)),t.setAttribute("aria-disabled",String(i))}var Ku,Xu=i(()=>{O(),G(),Ze(),Ku=0}),Ju={};function Qu(e,t){let i=z("div",{class:e});return i.setAttribute("role","list"),i.setAttribute("aria-label",t),i}r(Ju,{Panel:()=>ef});var Zu,ef,tf=i(()=>{O(),qu(),G(),pu(),Pe(),su(),Ie(),ku(),hu(),Ru(),_u(),Wu(),Xu(),Yu(),qe(),Ze(),Zu=C.filter(e=>!x(e)),ef=class{constructor(e,t,i,r,s,n,o,a,l){this.colors=t,this.bus=i,this.client=r,this.projectName=s,this.markers=n,this.t=o,this.locale=a,this.shadowRoot=e,this.readOnly=!!l?.readOnly,this.resolveIdentity=l?.resolveIdentity??(async()=>null),this.getScope=l?.getScope??(()=>({url:window.location.pathname,urlPattern:null})),this.scopeAnnotationsByUrl=l?.scopeAnnotationsByUrl??!0,this.ownFeedback=l?.ownFeedback??{ids:()=>new Set,remove:()=>{}},this.scrim=z("div",{class:"sp-scrim"}),this.scrim.addEventListener("click",()=>this.close()),this.root=z("div",{class:"sp-panel"}),this.root.setAttribute("role","complementary"),this.root.setAttribute("aria-label",this.t("panel.ariaLabel")),this.root.setAttribute("aria-hidden","true"),V(this.root,!0);let d=z("div",{class:"sp-panel-header"}),c=z("span",{class:"sp-panel-title"});_(c,this.t("panel.title")),this.closeBtn=document.createElement("button"),this.closeBtn.className="sp-panel-close",this.closeBtn.setAttribute("aria-label",this.t("panel.close")),this.closeBtn.appendChild($(me)),this.closeBtn.addEventListener("click",()=>this.close()),this.deleteAllBtn=document.createElement("button"),this.deleteAllBtn.className="sp-btn-delete-all",this.deleteAllBtn.setAttribute("aria-label",this.t("panel.deleteAll")),this.deleteAllBtn.appendChild($(Te));let p=document.createElement("span");_(p,` ${this.t("panel.deleteAll")}`),this.deleteAllBtn.appendChild(p),this.deleteAllBtn.addEventListener("click",()=>this.confirmDeleteAll()),H(this.deleteAllBtn,!0),this.exportBtn=new au(t,()=>this.feedbacks,this.t);let h=z("div",{class:"sp-panel-header-right"});h.appendChild(this.exportBtn.element),h.appendChild(this.deleteAllBtn),h.appendChild(this.closeBtn),d.appendChild(c),d.appendChild(h),this.stats=new zu(this.t);let u=z("div",{class:"sp-filters"}),f=z("div",{class:"sp-search-wrap"}),g=$(be);g.setAttribute("class","sp-search-icon"),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="sp-search",this.searchInput.placeholder=this.t("panel.search"),this.searchInput.setAttribute("aria-label",this.t("panel.searchAria")),this.searchInput.addEventListener("input",()=>{this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>this.loadFeedbacks().catch(()=>{}),200)}),f.appendChild(g),f.appendChild(this.searchInput);let m=z("div",{class:"sp-filter-bar"});m.appendChild(this.buildTypeDropdown()),m.appendChild(this.buildStatusSegmented()),m.appendChild(this.buildScopeSegmented()),m.appendChild(this.buildMineToggle()),this.sortControls=new Ou(()=>this.renderList(),this.t),u.appendChild(f),u.appendChild(m),u.appendChild(this.sortControls.element),this.listContainer=z("div",{class:"sp-list"}),this.bulk=new cu(t,{onResolve:e=>this.bulkResolve(e),onDelete:e=>this.bulkDelete(e),permits:(e,t)=>this.feedbacks.every(i=>!e.includes(i.id)||this.can(i,t))},this.t),this.bulk.setListContainer(this.listContainer),this.detail=new Bu(t,{onBack:()=>this.detail.hide(),onResolve:async e=>{try{let t=!x(e.status);await this.client.resolveFeedback(e.id,t),await this.loadFeedbacks(),this.hideDetailOf(e.id)}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}},onDelete:async e=>{try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks(),this.hideDetailOf(e.id)}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}},canGoToAnnotation:e=>!this.scopeAnnotationsByUrl||e.url===this.getScope().url,lostNote:e=>this.lostNote(e),onGoToAnnotation:e=>{if(e.annotations.length>0){let t=e.annotations[0];if(!t)return;this.markers.revealPin(e.id)||(window.scrollTo({left:t.scrollX,top:t.scrollY,behavior:"smooth"}),this.markers.pinHighlight(e)),Ke()&&this.close()}},onCustomAction:async(e,t)=>{try{await e.onAction(t,{refresh:()=>this.refreshDetail(t.id),close:()=>this.close()})}catch(e){this.reportActionError(e)}},onCustomActionError:e=>this.reportActionError(e),permits:(e,t)=>this.can(e,t),buildThread:e=>function(e,{t:t,locale:i,canPost:r,draft:s,post:n}){let o=e.comments??[];if(!r&&0===o.length)return null;let a=z("div"),l=z("ol",{class:"sp-thread-list",role:"list","aria-label":t("comments.title"),"aria-live":"polite"}),d=new Set,c=e=>{if(d.has(e.id))return;d.add(e.id);let r=z("li",{class:"sp-detail-message sp-comment","data-role":e.authorRole}),s=z("div",{class:"sp-comment-head"}),n=z("span");if(_(n,e.authorName),s.appendChild(n),"team"===e.authorRole){let e=z("span",{class:"sp-badge"});_(e,t("comments.team")),s.appendChild(e)}let o=z("time",{datetime:e.createdAt});_(o,q(e.createdAt,i)),s.appendChild(o);let a=z("div");_(a,e.body),r.append(s,a),l.appendChild(r)};for(let e of o)c(e);if(a.appendChild(l),!r)return a;let p=document.createElement("textarea");p.className="sp-input sp-thread-input",p.rows=3,p.maxLength=E,p.placeholder=t("comments.placeholder"),p.setAttribute("aria-label",p.placeholder),p.value=s.text,p.addEventListener("input",()=>{s.text=p.value});let h=z("div",{class:"sp-thread-foot"}),u=z("span",{id:"sp-thread-hint-"+ ++Ku});Xe()||(_(u,t(Y()?"popup.submitHintMac":"popup.submitHintOther")),p.setAttribute("aria-describedby",u.id),p.setAttribute("aria-keyshortcuts","Control+Enter Meta+Enter"));let f=document.createElement("button");f.type="button",f.className="sp-btn-primary",_(f,t("popup.submit")),h.append(u,f);let g=z("div",{class:"sp-thread-error",role:"alert"});a.append(p,h,g);let m={add:c,input:p,send:f,error:g};s.view=m,Gu(m,!0===s.sending);let b=async()=>{s.text=p.value;let e=s.text.trim();if(s.sending||!e)return;s.sent?.body!==e&&(s.sent={body:e,clientId:R()});let{clientId:i}=s.sent;s.sending=!0,_(g,""),Gu(m,!0);let r="",o=null;try{o=await n(e,i)}catch(e){r=t(function(e){return 409===I(e,"status")||"STORE_LIMIT"===I(e,"code")}(e)?"comments.full":"comments.error")}s.sending=!1;let a=s.view??m;Gu(a,!1),_(a.error,r),o&&(a.add(o),a.input.value=s.text="",s.sent=void 0)};return f.addEventListener("click",()=>{b()}),p.addEventListener("keydown",e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())}),a}(e,{t:this.t,locale:a,canPost:this.canComment&&!1!==e.permissions?.canComment,draft:this.draftOf(e.id),post:(t,i)=>this.postComment(e,t,i)})},this.t,a,function(e){let t=[];if(!Array.isArray(e))return t;let i=new Set;return e.forEach((e,r)=>{let s=`[siteping] panelActions[${r}]`,n=e?.id;if("string"==typeof n&&n&&"string"==typeof e?.label&&e.label)if(vu(e)||wu(e))if("string"!=typeof e.href||gu(e.href))if(i.has(n))console.warn(`${s} ignored: duplicate id "${n}".`);else{i.add(n);let r=void 0===e.icon?null:fu(e.icon);void 0!==e.icon&&!r&&console.warn(`${s} ("${n}"): \`icon\` is not SVG markup \u2014 showing the label only.`),t.push({action:e,icon:r})}else console.warn(`${s} ("${n}") ignored: \`href\` must be an http(s) or mailto URL.`);else console.warn(`${s} ("${n}") ignored: it needs either an \`onAction\` function or an \`href\`, not both.`);else console.warn(`${s} ignored: it needs a non-empty string \`id\` and \`label\`.`)}),t}(l?.panelActions)),this.shortcuts=new ju(t,{onNavigate:e=>{let t=Hu(this.listContainer);!function(e,t){let i=e.querySelectorAll(".sp-card");if(0===i.length)return;for(let e of i)e.classList.remove("sp-card--focused");let r=i[Math.max(0,Math.min(t,i.length-1))];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:!0}))}(this.listContainer,"down"===e?t+1:t-1)},onResolve:()=>this.pressInFocusedCard('[data-action="resolve"]'),onDelete:()=>this.pressInFocusedCard('[data-action="delete"]'),onFocusSearch:()=>this.searchInput.focus(),onToggleSelect:()=>this.pressInFocusedCard(".sp-bulk-checkbox"),isSuspended:()=>this.detail.isVisible},this.t),this.root.appendChild(d),this.root.appendChild(this.stats.element),this.root.appendChild(u),this.root.appendChild(this.listContainer),this.root.appendChild(this.bulk.barElement),this.root.appendChild(this.detail.element),this.root.appendChild(this.shortcuts.helpOverlay),this.root.appendChild(this.shortcuts.hintButton),e.appendChild(this.scrim),e.appendChild(this.root),this.attachSheetDrag(),this.onListClick=e=>{let t=e.target;if(t.closest(".sp-bulk-checkbox"))return;let i=t.closest("[data-action]");if(i){e.stopPropagation();let t=i.closest(".sp-card");if(!t)return;let r=t.dataset.feedbackId,s=this.feedbacks.find(e=>e.id===r);if(!s)return;let n=i.dataset.action;if("expand"===n){let e=t.querySelector(".sp-card-message");if(!e)return;let r=e.classList.toggle("sp-card-message--expanded");_(i,r?this.t("panel.showLess"):this.t("panel.showMore")),i.setAttribute("aria-expanded",String(r))}else if("resolve"===n){if(this.pendingMutations.has(s.id))return;let e=i;this.toggleResolve(s,e).catch(()=>{})}else if("delete"===n){if(this.pendingMutations.has(s.id))return;let e=i;this.deleteFeedback(s,e).catch(()=>{})}return}let r=t.closest(".sp-card");if(r){let e=r.dataset.feedbackId,t=this.feedbacks.find(t=>t.id===e);t&&this.detail.show(t,Number(r.dataset.number))}},this.listContainer.addEventListener("click",this.onListClick),this.onListKeydown=e=>{let t=e;if("Enter"!==t.key&&" "!==t.key)return;let i=t.target,r=i.closest(".sp-card");if(!r||i!==r)return;t.preventDefault();let s=r.dataset.feedbackId,n=this.feedbacks.find(e=>e.id===s);n&&this.detail.show(n,Number(r.dataset.number))},this.listContainer.addEventListener("keydown",this.onListKeydown),this.onListMouseover=e=>{let t=e.target.closest(".sp-card");if(!t)return;let i=t.dataset.feedbackId;i&&this.markers.highlight(i)},this.listContainer.addEventListener("mouseover",this.onListMouseover),this.onListMouseout=e=>{let t=e.relatedTarget;t&&this.listContainer.contains(t)||this.markers.highlight("")},this.listContainer.addEventListener("mouseout",this.onListMouseout),this.bus.on("markers:placed",()=>this.syncLostNotes()),this.bus.on("panel:toggle",e=>{e?this.open():this.close()}),Q(e,()=>this.isOpen),Z(e,t=>{if("Escape"===t.key&&this.isOpen){if(this.shortcuts.isHelpVisible)return;return this.detail.isVisible?void this.detail.hide():void this.close()}if("Tab"===t.key&&this.isOpen){let i=e=>{let t=e;for(;t&&t!==this.root;){if("none"===getComputedStyle(t).display)return!1;t=t.parentElement}return!0},r=this.shortcuts.isHelpVisible?this.shortcuts.helpOverlay:this.detail.isVisible?this.detail.element:this.root,s=Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(e=>i(e)&&!e.hasAttribute("disabled")&&!e.closest("[inert]"));if(0===s.length)return;let n=s[0],o=s[s.length-1];if(!n||!o)return;let a=e.activeElement;a&&r.contains(a)?t.shiftKey&&a===n?(t.preventDefault(),o.focus()):!t.shiftKey&&a===o&&(t.preventDefault(),n.focus()):(t.preventDefault(),(t.shiftKey?o:n).focus())}}),this.onMarkerClick=e=>{this.scrollToFeedback(e.detail.feedbackId)},document.addEventListener("sp-marker-click",this.onMarkerClick)}colors;bus;client;projectName;markers;t;locale;root;scrim;listContainer;searchInput;closeBtn;deleteAllBtn;activeFilters=new Set(["all"]);typeDropdownBtn;typeDropdownContainer;typeDropdownMenu=null;removeTypeDropdownOutsideClick=null;statusSegmented;typeOptions;feedbacks=[];currentPage=1;totalFeedbacks=0;isLoadingMore=!1;isOpen=!1;searchTimeout=null;loadController=null;isLoading=!1;pendingScrollId=null;pendingDetail=!1;pendingMutations=new Set;canComment=!1;threadDrafts=new Map;threadWriteCount=0;threadWrites=new Map;readOnly;resolveIdentity;stats;sortControls;bulk;exportBtn;shortcuts;detail;shadowRoot;getScope;scopeAnnotationsByUrl;scopeSegmented;initialScopeFilter="this";mineOnly=!1;ownFeedback;onMarkerClick;onListClick;onListKeydown;onListMouseover;onListMouseout;async open(){if(this.isOpen)return;this.isOpen=!0;let e=Ke();this.root.setAttribute("role",e?"dialog":"complementary"),e?this.root.setAttribute("aria-modal","true"):this.root.removeAttribute("aria-modal"),this.root.classList.add("sp-panel--open"),this.scrim.classList.add("sp-scrim--open"),this.root.setAttribute("aria-hidden","false"),V(this.root,!1),this.bus.emit("open"),this.shortcuts.enable(this.shadowRoot),await this.loadFeedbacks(),requestAnimationFrame(()=>{(Xe()?this.closeBtn:this.searchInput).focus()})}close(){this.isOpen&&(this.isOpen=!1,this.root.classList.remove("sp-panel--open"),this.scrim.classList.remove("sp-scrim--open"),this.root.setAttribute("aria-hidden","true"),V(this.root,!0),this.bus.emit("close"),this.shortcuts.disable(),this.detail.hide(),this.pendingScrollId=null,this.pendingDetail=!1,this.root.getRootNode().querySelector(".sp-fab")?.focus())}attachSheetDrag(){let e=0,t=0,i=0,r=!1;this.root.addEventListener("pointerdown",s=>{let n=s.target;"mouse"===s.pointerType||!Ke()||n.closest("button")||!n.closest(".sp-panel-header, .sp-detail-header")||(r=!0,e=s.clientY,t=s.timeStamp,i=0,this.root.style.transition="none",this.root.setPointerCapture?.(s.pointerId))}),this.root.addEventListener("pointermove",t=>{r&&(i=Math.max(0,t.clientY-e),this.root.style.transform=`translateY(${i}px)`)});let s=e=>{r&&(r=!1,this.root.style.transition="",this.root.style.transform="",(i>40&&i/Math.max(1,e.timeStamp-t)>.5||i>this.root.offsetHeight/4)&&this.close())};this.root.addEventListener("pointerup",s),this.root.addEventListener("pointercancel",s)}showLoading(){this.listContainer.replaceChildren();let e=z("div",{class:"sp-loading"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label",this.t("panel.loading"));let t=z("div",{class:"sp-spinner"});e.appendChild(t),this.listContainer.appendChild(e)}showError(){this.listContainer.replaceChildren();let e=z("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=z("div",{class:"sp-empty-text"});_(t,this.t("panel.loadError"));let i=document.createElement("button");i.className="sp-btn-ghost",i.style.marginTop="8px",_(i,this.t("panel.retry")),i.addEventListener("click",()=>this.loadFeedbacks().catch(()=>{})),e.appendChild(t),e.appendChild(i),this.listContainer.appendChild(e)}statusBucket(e){if("all"!==e)return x(e)?S:Zu}async loadFeedbacks(e=1){this.loadController?.abort(),this.loadController=new AbortController;let{signal:t}=this.loadController;this.currentPage=1;let i=this.searchInput.value.trim()||void 0,r=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],s=this.statusBucket(this.statusSegmented.value),n=this.getScope();this.syncScopeAvailability();let o=this.scopeSegmented.value,a={page:1,limit:20};r&&(a.type=r),s&&(a.statuses=s),i&&(a.search=i),"this"===o?a.url=n.url:"template"===o&&n.urlPattern&&(a.urlPattern=n.urlPattern);let l=this.feedbacks.length>0;l||this.showLoading();let d=!this.mineOnly&&this.isMarkerQuery(a,n),c=this.keepThreads();this.isLoading=!0;try{let i=this.mineOnly?this.fetchOwnFeedbacks(a,t):this.client.getFeedbacks(this.projectName,a);d||this.loadPageMarkers(n,t);let r=await i,{feedbacks:s,total:o}=r,l=1;for(;l<e&&s.length<o&&!t.aborted;){l++;let e=await this.client.getFeedbacks(this.projectName,{...a,page:l});s=[...s,...e.feedbacks],o=e.total}if(t.aborted)return;this.currentPage=l,this.feedbacks=s.map(c),this.totalFeedbacks=o,this.canComment=!0===r.capabilities?.comments,H(this.deleteAllBtn,this.readOnly||!1===r.permissions?.canDeleteAll),this.stats.update(s,o),this.bulk.reset(),this.renderList(),this.pendingScrollId&&this.flashCard(this.pendingScrollId,this.pendingDetail),d&&this.renderPageMarkers(s,n)}catch(e){if(t.aborted)return;l||this.showError(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{t.aborted||(this.isLoading=!1,this.pendingScrollId=null,this.pendingDetail=!1)}}async loadMoreFeedbacks(){if(this.isLoadingMore)return;this.isLoadingMore=!0;let e=this.loadController,t=this.currentPage+1,i=this.searchInput.value.trim()||void 0,r=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],s=this.statusBucket(this.statusSegmented.value),n=this.getScope(),o=this.scopeSegmented.value,a={page:t,limit:20};r&&(a.type=r),s&&(a.statuses=s),i&&(a.search=i),"this"===o?a.url=n.url:"template"===o&&n.urlPattern&&(a.urlPattern=n.urlPattern);let l,d=this.listContainer.querySelector(".sp-btn-load-more");d&&(l=U(d));let c=this.keepThreads();try{let{feedbacks:i,total:r}=await this.client.getFeedbacks(this.projectName,a);if(e!==this.loadController)return;this.currentPage=t,this.totalFeedbacks=r,this.feedbacks=[...this.feedbacks,...i.map(c)],this.stats.update(this.feedbacks,r),this.renderList(),this.isMarkerQuery(a,n)&&this.renderPageMarkers(this.feedbacks,n)}catch(e){l&&l(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.isLoadingMore=!1}}isMarkerQuery(e,t){let i=this.scopeAnnotationsByUrl?t.url:void 0;return!(e.type||e.statuses||e.search||e.urlPattern||e.url!==i)}async fetchOwnFeedbacks(e,t){let i,r,s,n=this.ownFeedback.ids(),o=new Map,a=new Set,l=0,d=!0;for(let c=1;o.size<n.size&&!t.aborted;c++){let t=await this.client.getFeedbacks(this.projectName,{...e,page:c,limit:100}),{feedbacks:p,total:h}=t;r=t.capabilities,s=t.permissions,i??=h,d&&=h===i;for(let e of p)a.add(e.id),n.has(e.id)&&o.set(e.id,e);if(l+=p.length,0===p.length||l>=h)break}return Object.keys(e).every(e=>"page"===e||"limit"===e)&&d&&a.size===i&&this.ownFeedback.remove(...[...n].filter(e=>!o.has(e))),{feedbacks:[...o.values()],total:o.size,capabilities:r,permissions:s}}async loadPageMarkers(e,t){let i=this.scopeAnnotationsByUrl?{limit:20,url:e.url}:{limit:20};try{let{feedbacks:r}=await this.client.getFeedbacks(this.projectName,i);t.aborted||this.renderPageMarkers(r,e)}catch{}}renderPageMarkers(e,t){this.markers.render(this.scopeAnnotationsByUrl?e.filter(e=>e.url===t.url):e)}renderList(){if(this.listContainer.replaceChildren(),0===this.feedbacks.length){let e=z("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=z("div",{class:"sp-empty-text"});return _(t,this.t("panel.empty")),e.appendChild(t),void this.listContainer.appendChild(e)}let e=function(e,t){let i=[...e];switch(t){case"newest":i.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());break;case"oldest":i.sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime());break;case"by-type":i.sort((e,t)=>{let i=Du[e.type]??99,r=Du[t.type]??99;return i!==r?i-r:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()});break;case"open-first":i.sort((e,t)=>{let i=x(e.status)?1:0,r=x(t.status)?1:0;return i!==r?i-r:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()})}return i}(this.feedbacks,this.sortControls.sortMode),t=e.filter(e=>this.selectable(e)).map(e=>e.id);if(t.length>0&&this.listContainer.appendChild(this.bulk.createSelectAllBar(t,this.t("bulk.selectAll"))),this.sortControls.groupByPage){let t=function(e){let t=new Map;for(let i of e){let e=Lu(i.url),r=t.get(e);r?r.push(i):t.set(e,[i])}return new Map([...t.entries()].sort((e,t)=>t[1].length-e[1].length))}(e),i=0;for(let[e,r]of t){let t=Pu(e,r.length);this.listContainer.appendChild(t);let s=Qu("sp-group-content",e);for(let e of r){let t=this.createCard(e,i+1);t.style.setProperty("--sp-card-i",String(i)),s.appendChild(t),i++}this.listContainer.appendChild(s)}}else{let t=Qu("sp-cards",this.t("panel.feedbackList"));e.forEach((e,i)=>{let r=this.createCard(e,i+1);r.style.setProperty("--sp-card-i",String(i)),t.appendChild(r)}),this.listContainer.appendChild(t)}let i=this.totalFeedbacks-this.feedbacks.length;if(i>0){let e=z("div",{class:"sp-load-more-wrap"}),t=document.createElement("button");t.className="sp-btn-ghost sp-btn-load-more",_(t,ru(this.t,"panel.loadMore",{remaining:i})),t.addEventListener("click",()=>this.loadMoreFeedbacks().catch(()=>{})),e.appendChild(t),this.listContainer.appendChild(e)}}lostNote(e){let t=z("div",{class:"sp-lost"});return t.dataset.lostFor=e,_(t,this.t("panel.notOnPage")),t.hidden=!this.markers.isLost(e),t}syncLostNotes(){for(let e of this.root.querySelectorAll("[data-lost-for]"))e.hidden=!this.markers.isLost(e.dataset.lostFor??"")}createCard(e,t){let i=x(e.status),r=$e(e.type,this.colors),s=z("div",{class:"sp-card "+(i?"sp-card--resolved":"")});s.classList.toggle("sp-card--selected",this.bulk.isSelected(e.id)),s.setAttribute("role","listitem"),s.setAttribute("tabindex","0");let n=ru(this.t,"marker.aria",{number:t,type:eu(e.type,this.t),status:tu(e.status,this.t),message:e.message.slice(0,80)});s.setAttribute("aria-label",n),s.dataset.feedbackId=e.id,s.dataset.number=String(t);let o=z("div",{class:"sp-card-bar"});o.style.background=i?"#9ca3af":r;let a=z("div",{class:"sp-card-body"}),l=z("div",{class:"sp-card-header"});this.selectable(e)&&l.appendChild(this.bulk.createCheckbox(e.id,n));let d=z("span",{class:"sp-card-number"});_(d,`#${t}`);let c=z("span",{class:"sp-badge"}),p=We(e.type,this.colors);c.style.background=p,c.style.color=r,_(c,eu(e.type,this.t));let h=z("span",{class:"sp-badge sp-badge--status"});h.dataset.status=e.status,h.style.background=_e(e.status,this.colors),h.style.color=ze(e.status,this.colors),_(h,tu(e.status,this.t));let u=z("span",{class:"sp-card-date"});_(u,q(e.createdAt,this.locale)),l.appendChild(d),l.appendChild(c),l.appendChild(h),l.appendChild(u);let f=z("div",{class:"sp-card-message"});_(f,e.message);let g=document.createElement("button");g.className="sp-card-expand",g.dataset.action="expand",_(g,this.t("panel.showMore")),g.style.display="none",g.setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{f.scrollHeight>f.clientHeight&&(g.style.display="block")});let m=z("div",{class:"sp-card-footer"}),b=document.createElement("button");b.className="sp-btn-resolve",b.dataset.action="resolve",b.appendChild($(i?Ae:ye));let y=document.createElement("span");_(y,` ${this.t(i?"panel.reopen":"panel.resolve")}`),b.appendChild(y);let v=document.createElement("button");v.className="sp-btn-delete",v.dataset.action="delete",v.appendChild($(Te));let w=document.createElement("span");return _(w,` ${this.t("panel.delete")}`),v.appendChild(w),this.can(e,"canChangeStatus")&&m.appendChild(b),this.can(e,"canDelete")&&m.appendChild(v),a.appendChild(l),a.appendChild(f),a.appendChild(g),a.appendChild(this.lostNote(e.id)),m.hasChildNodes()&&a.appendChild(m),s.appendChild(o),s.appendChild(a),s}can(e,t){return!this.readOnly&&!1!==e.permissions?.[t]}selectable(e){return this.can(e,"canChangeStatus")||this.can(e,"canDelete")}async bulkResolve(e){let t=new Set(this.feedbacks.filter(e=>x(e.status)).map(e=>e.id)),i=e.filter(e=>!t.has(e)),r=await Promise.allSettled(i.map(e=>this.client.resolveFeedback(e,!0)));await this.settleBulk(i,r)}async bulkDelete(e){let t=await Promise.allSettled(e.map(e=>this.client.deleteFeedback(e)));e.forEach((e,i)=>{"fulfilled"===t[i]?.status&&this.bus.emit("feedback:deleted",e)}),await this.settleBulk(e,t)}async settleBulk(e,t){let i=e.filter((e,i)=>"rejected"===t[i]?.status);i.length<e.length&&await this.loadFeedbacks();let r=t.find(e=>"rejected"===e.status);if(!r)return;let s=new Set(this.feedbacks.map(e=>e.id));this.bulk.selectAll(i.filter(e=>s.has(e)));let n=r.reason instanceof Error?r.reason:new Error(String(r.reason));throw this.bus.emit("feedback:error",n),n}async confirmDeleteAll(){if(await this.showConfirmDialog(this.t("panel.deleteAllConfirmTitle"),this.t("panel.deleteAllConfirmMessage"))){this.deleteAllBtn.disabled=!0;try{await this.client.deleteAllFeedbacks(this.projectName),this.bus.emit("feedback:all-deleted"),await this.loadFeedbacks()}catch(e){this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),await this.loadFeedbacks().catch(()=>{})}finally{this.deleteAllBtn.disabled=!1}}}showConfirmDialog(e,t){return new Promise(i=>{let r=z("div",{class:"sp-confirm-backdrop"}),s=`sp-confirm-title-${Date.now()}`,n=`sp-confirm-msg-${Date.now()}`,o=z("div",{class:"sp-confirm-dialog"});o.setAttribute("role","alertdialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-labelledby",s),o.setAttribute("aria-describedby",n);let a=z("div",{class:"sp-confirm-title"});a.id=s,_(a,e);let l=z("div",{class:"sp-confirm-message"});l.id=n,_(l,t);let d=z("div",{class:"sp-confirm-actions"}),c=document.createElement("button");c.type="button",c.className="sp-btn-ghost",_(c,this.t("panel.cancel"));let p=document.createElement("button");p.type="button",p.className="sp-btn-danger",_(p,this.t("panel.confirmDelete"));let h=!1,u=e=>{h||(h=!0,f(),r.style.opacity="0",o.style.transform="translateY(8px) scale(0.97)",setTimeout(()=>{r.remove(),i(e)},200))},f=Z(r,e=>{if("Escape"===e.key)return e.stopPropagation(),void u(!1);"Tab"===e.key&&(e.preventDefault(),r.getRootNode().activeElement===c?p.focus():c.focus())});c.addEventListener("click",()=>u(!1)),p.addEventListener("click",()=>u(!0)),r.addEventListener("click",e=>{e.target===r&&u(!1)}),d.appendChild(c),d.appendChild(p),o.appendChild(a),o.appendChild(l),o.appendChild(d),r.appendChild(o),this.root.getRootNode()instanceof ShadowRoot?this.root.getRootNode().appendChild(r):this.root.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",o.style.transform="translateY(0) scale(1)",c.focus()})})}async deleteFeedback(e,t){this.pendingMutations.add(e.id);let i=U(t);try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks()}catch(e){i(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.pendingMutations.delete(e.id)}}async toggleResolve(e,t){this.pendingMutations.add(e.id);let i=U(t);try{let t=!x(e.status);await this.client.resolveFeedback(e.id,t),await this.loadFeedbacks()}catch(e){i(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.pendingMutations.delete(e.id)}}buildTypeDropdown(){return this.typeOptions=[{value:"all",label:this.t("panel.filterAll"),icon:Se,color:"var(--sp-accent-text)",bg:"var(--sp-accent-light)"},{value:"question",label:this.t("type.question"),icon:ve,color:"var(--sp-type-question)",bg:"var(--sp-type-question-bg)"},{value:"change",label:this.t("type.change"),icon:we,color:"var(--sp-type-change)",bg:"var(--sp-type-change-bg)"},{value:"bug",label:this.t("type.bug"),icon:ke,color:"var(--sp-type-bug)",bg:"var(--sp-type-bug-bg)"},{value:"other",label:this.t("type.other"),icon:Ce,color:"var(--sp-type-other)",bg:"var(--sp-type-other-bg)"}],this.typeDropdownContainer=z("div",{class:"sp-filter-dropdown"}),this.typeDropdownBtn=document.createElement("button"),this.typeDropdownBtn.type="button",this.typeDropdownBtn.className="sp-filter-dropdown-btn",this.typeDropdownBtn.setAttribute("aria-haspopup","listbox"),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.renderTypeDropdownTrigger(),this.typeDropdownBtn.addEventListener("click",e=>{e.stopPropagation(),this.typeDropdownMenu?this.closeTypeDropdown():this.openTypeDropdown()}),this.typeDropdownContainer.addEventListener("keydown",e=>{"Escape"!==e.key||!this.typeDropdownMenu||(e.stopPropagation(),this.closeTypeDropdown(),this.typeDropdownBtn.focus())}),this.typeDropdownContainer.appendChild(this.typeDropdownBtn),this.typeDropdownContainer}renderTypeDropdownTrigger(){let e=this.typeOptions.find(e=>this.activeFilters.has(e.value))??this.typeOptions[0];if(!e)return;this.typeDropdownBtn.replaceChildren(),this.typeDropdownBtn.style.setProperty("--sp-chip-color",e.color),this.typeDropdownBtn.style.setProperty("--sp-chip-bg",e.bg),this.typeDropdownBtn.dataset.filter=e.value,this.typeDropdownBtn.classList.toggle("sp-filter-dropdown-btn--filtered","all"!==e.value),this.typeDropdownBtn.setAttribute("aria-label",`${this.t("type.label")}: ${e.label}`);let t=z("span",{class:"sp-filter-dropdown-btn__icon"});t.appendChild($(e.icon)),this.typeDropdownBtn.appendChild(t);let i=z("span",{class:"sp-filter-dropdown-btn__label"}),r=z("span",{class:"sp-filter-dropdown-btn__prefix"});_(r,this.t("type.label"));let s=z("span",{class:"sp-filter-dropdown-btn__value"});_(s,e.label),i.append(r," ",s),this.typeDropdownBtn.appendChild(i);let n=z("span",{class:"sp-filter-dropdown-btn__chevron"});n.appendChild($(Me)),this.typeDropdownBtn.appendChild(n)}openTypeDropdown(){this.typeDropdownMenu=z("div",{class:"sp-filter-dropdown-menu"}),this.typeDropdownMenu.setAttribute("role","listbox"),this.typeDropdownMenu.setAttribute("aria-label",this.t("type.label")),this.typeDropdownBtn.setAttribute("aria-expanded","true");for(let e of this.typeOptions){let t=document.createElement("button");t.type="button";let i=this.activeFilters.has(e.value);t.className="sp-filter-dropdown-option"+(i?" sp-filter-dropdown-option--active":""),t.style.setProperty("--sp-chip-color",e.color),t.style.setProperty("--sp-chip-bg",e.bg),t.dataset.filter=e.value,t.setAttribute("role","option"),t.setAttribute("aria-selected",String(i));let r=z("span",{class:"sp-filter-dropdown-option__icon"});r.appendChild($(e.icon)),t.appendChild(r);let s=z("span",{class:"sp-filter-dropdown-option__label"});if(_(s,e.label),t.appendChild(s),i){let e=z("span",{class:"sp-filter-dropdown-option__check"});e.appendChild($(ye)),t.appendChild(e)}t.addEventListener("click",t=>{t.stopPropagation(),this.selectTypeFilter(e.value)}),this.typeDropdownMenu.appendChild(t)}this.typeDropdownContainer.appendChild(this.typeDropdownMenu),this.removeTypeDropdownOutsideClick=W(this.typeDropdownContainer,()=>this.closeTypeDropdown())}closeTypeDropdown(){this.typeDropdownMenu&&(this.typeDropdownMenu.remove(),this.typeDropdownMenu=null),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.removeTypeDropdownOutsideClick?.(),this.removeTypeDropdownOutsideClick=null}selectTypeFilter(e){this.activeFilters.clear(),this.activeFilters.add(e),this.renderTypeDropdownTrigger(),this.closeTypeDropdown(),this.loadFeedbacks().catch(()=>{})}buildStatusSegmented(){return this.statusSegmented=new Uu({options:[{value:"all",label:this.t("panel.statusAll"),icon:Se,color:"var(--sp-accent-text)",bg:"var(--sp-accent-light)"},{value:"open",label:this.t("panel.statusOpen"),icon:Ee,color:"var(--sp-status-open)",bg:"var(--sp-status-open-bg)"},{value:"resolved",label:this.t("panel.statusClosed"),icon:xe,color:"var(--sp-status-resolved)",bg:"var(--sp-status-resolved-bg)"}],value:"all",onChange:()=>{this.loadFeedbacks().catch(()=>{})},ariaLabel:this.t("status.label"),datasetKey:"statusFilter",modifierPrefix:"sp-segmented__btn--"}),this.statusSegmented.element}buildScopeSegmented(){return this.scopeSegmented=new Uu({options:[{value:"this",label:this.t("scope.thisPage")},{value:"template",label:this.t("scope.thisType")},{value:"all",label:this.t("scope.all")}],value:this.initialScopeFilter,onChange:()=>{this.loadFeedbacks().catch(()=>{})},ariaLabel:this.t("scope.label"),datasetKey:"scopeFilter",modifierPrefix:"sp-segmented__btn--scope-",extraClass:"sp-segmented--scope"}),this.syncScopeAvailability(),this.scopeSegmented.element}syncScopeAvailability(){if(!this.scopeSegmented)return;let e=!!this.getScope().urlPattern;this.scopeSegmented.setOptionVisible("template",e),!e&&"template"===this.scopeSegmented.value&&this.scopeSegmented.select("this")}buildMineToggle(){let e=document.createElement("button");return e.type="button",e.className="sp-mine-toggle",e.title=this.t("panel.filterMineHint"),e.setAttribute("aria-pressed","false"),e.append($(Be),this.t("panel.filterMine")),e.addEventListener("click",()=>{this.mineOnly=!this.mineOnly,e.classList.toggle("sp-mine-toggle--active",this.mineOnly),e.setAttribute("aria-pressed",String(this.mineOnly)),this.loadFeedbacks().catch(()=>{})}),e}pressInFocusedCard(e){this.listContainer.querySelectorAll(".sp-card")[Hu(this.listContainer)]?.querySelector(e)?.click()}scrollToFeedback(e,t=!1){if(this.isLoading)return this.pendingScrollId=e,void(this.pendingDetail=t);this.flashCard(e,t)}showFeedback(e){this.scrollToFeedback(e,!0)}flashCard(e,t){let i=CSS.escape(e),r=this.listContainer.querySelector(`[data-feedback-id="${i}"]`);if(r){r.scrollIntoView({behavior:"smooth",block:"center"}),r.classList.add("sp-anim-flash"),r.addEventListener("animationend",()=>{r.classList.remove("sp-anim-flash")},{once:!0});let i=this.feedbacks.find(t=>t.id===e);i&&(t||Ke())&&this.detail.show(i,Number(r.dataset.number))}}draftOf(e){let t=this.threadDrafts.get(e)??{text:""};return this.threadDrafts.set(e,t),t}async postComment(e,t,i){let r=await this.resolveIdentity();if(!r)return null;try{let s=await this.client.addComment(e.id,{body:t,clientId:i,authorName:r.name,authorEmail:r.email,authorRole:"client"});for(let t of new Set([e,this.feedbacks.find(t=>t.id===e.id)]))t&&!t.comments?.some(e=>e.id===s.id)&&(t.comments=[...t.comments??[],s]);let n=this.threadWrites.get(e.id)?.replies??[];return this.threadWrites.set(e.id,{seq:++this.threadWriteCount,replies:[...n,s]}),this.bus.emit("comment:added",s),s}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}}keepThreads(){let e=this.threadWriteCount;return t=>{let i=this.threadWrites.get(t.id);if(!i||i.seq<=e)return t;let r=new Set(t.comments?.map(e=>e.id)),s=i.replies.filter(e=>!r.has(e.id));if(0===s.length)return t;let n=[...t.comments??[],...s];return n.sort((e,t)=>e.createdAt<t.createdAt?-1:e.createdAt>t.createdAt?1:0),{...t,comments:n}}}reportActionError(e){this.bus.emit("panel:action-error",e instanceof Error?e:new Error(String(e)))}hideDetailOf(e){this.detail.feedbackId===e&&this.detail.hide()}async refreshDetail(e){if(this.isOpen&&await this.loadFeedbacks(this.currentPage),this.detail.feedbackId!==e)return;let t=this.feedbacks.findIndex(t=>t.id===e),i=this.feedbacks[t];i?this.detail.show(i,t+1):this.detail.hide()}async refresh(){this.isOpen&&await this.loadFeedbacks()}get isCurrentlyOpen(){return this.isOpen}destroy(){this.isOpen=!1,this.loadController?.abort(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.listContainer.removeEventListener("click",this.onListClick),this.listContainer.removeEventListener("keydown",this.onListKeydown),this.listContainer.removeEventListener("mouseover",this.onListMouseover),this.listContainer.removeEventListener("mouseout",this.onListMouseout),document.removeEventListener("sp-marker-click",this.onMarkerClick),this.closeTypeDropdown(),this.sortControls.destroy(),this.bulk.destroy(),this.exportBtn.destroy(),this.shortcuts.destroy(),this.detail.destroy(),this.scrim.remove(),this.root.remove()}}});O(),O();var rf=new Set(["role","name","aria-label","rel","href"]);function sf(e,t){let i=rf.has(e);i||=e.startsWith("data-")&&df(e);let r=df(t)&&t.length<100;return r||=t.startsWith("#")&&df(t.slice(1)),i&&r}function nf(e){return df(e)}function of(e){return df(e)}function af(e){return!0}function lf(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";let i,r={root:document.body,idName:nf,className:of,tagName:af,attr:sf,timeoutMs:1e3,seedMinLength:3,optimizedMinLength:2,maxNumberOfPathChecks:1/0},s=new Date,n={...r,...t},o=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(n.root,r),a=0;for(let t of function*(e,t,i){let r=[],s=[],n=e,o=0;for(;n&&n!==i;){let e=cf(n,t);for(let t of e)t.level=o;if(r.push(e),n=n.parentElement,o++,s.push(...yf(r)),o>=t.seedMinLength){s.sort(uf);for(let e of s)yield e;s=[]}}s.sort(uf);for(let e of s)yield e}(e,n,o)){if((new Date).getTime()-s.getTime()>n.timeoutMs||a>=n.maxNumberOfPathChecks){let t=gf(e,o);if(!t)throw new Error(`Timeout: Can't find a unique selector after ${n.timeoutMs}ms`);return pf(t)}if(a++,xf(t,o)){i=t;break}}if(!i)throw new Error("Selector was not found.");let l=[...vf(i,e,n,o,s)];return l.sort(uf),l.length>0?pf(l[0]):pf(i)}function df(e){if(/^[a-z\-]{3,}$/i.test(e)){let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0}return!1}function cf(e,t){let i=[],r=e.getAttribute("id");r&&t.idName(r)&&i.push({name:"#"+CSS.escape(r),penalty:0});for(let r=0;r<e.classList.length;r++){let s=e.classList[r];t.className(s)&&i.push({name:"."+CSS.escape(s),penalty:1})}for(let r=0;r<e.attributes.length;r++){let s=e.attributes[r];t.attr(s.name,s.value)&&i.push({name:`[${CSS.escape(s.name)}="${CSS.escape(s.value)}"]`,penalty:2})}let s=e.tagName.toLowerCase();if(t.tagName(s)){i.push({name:s,penalty:5});let t=ff(e,s);void 0!==t&&i.push({name:bf(s,t),penalty:10})}let n=ff(e);return void 0!==n&&i.push({name:mf(s,n),penalty:50}),i}function pf(e){let t=e[0],i=t.name;for(let r=1;r<e.length;r++){let s=e[r].level||0;i=t.level===s-1?`${e[r].name} > ${i}`:`${e[r].name} ${i}`,t=e[r]}return i}function hf(e){return e.map(e=>e.penalty).reduce((e,t)=>e+t,0)}function uf(e,t){return hf(e)-hf(t)}function ff(e,t){let i=e.parentNode;if(!i)return;let r=i.firstChild;if(!r)return;let s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&(void 0===t||r.tagName.toLowerCase()===t)&&s++,r!==e);)r=r.nextSibling;return s}function gf(e,t){let i=0,r=e,s=[];for(;r&&r!==t;){let e=r.tagName.toLowerCase(),t=ff(r,e);if(void 0===t)return;s.push({name:bf(e,t),penalty:NaN,level:i}),r=r.parentElement,i++}if(xf(s,t))return s}function mf(e,t){return"html"===e?"html":`${e}:nth-child(${t})`}function bf(e,t){return"html"===e?"html":`${e}:nth-of-type(${t})`}function*yf(e,t=[]){if(e.length>0)for(let i of e[0])yield*yf(e.slice(1,e.length),t.concat(i));else yield t}function xf(e,t){let i=pf(e);switch(t.querySelectorAll(i).length){case 0:throw new Error(`Can't select any node with this selector: ${i}`);case 1:return!0;default:return!1}}function*vf(e,t,i,r,s){if(e.length>2&&e.length>i.optimizedMinLength)for(let n=1;n<e.length-1;n++){if((new Date).getTime()-s.getTime()>i.timeoutMs)return;let o=[...e];o.splice(n,1),xf(o,r)&&r.querySelector(pf(o))===t&&(yield o,yield*vf(o,t,i,r,s))}}O();var wf=["role","aria-label","type","name","href","src","data-testid","data-id"];function kf(e){let t=e.children.length,i=0,r=e.parentElement;if(r)for(let t of r.children){if(t===e)break;t.tagName===e.tagName&&i++}return`${t}:${i}:${Cf(e)}`}function Cf(e){let t=[];for(let i of wf){let r=e.getAttribute(i);r&&t.push(`${i}=${r}`)}return t.length>0?function(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t+e.charCodeAt(i)|0;return(t>>>0).toString(36)}(t.join(",")):"0"}function Sf(e){return"SITEPING-WIDGET"===e.tagName||null!==e.closest("siteping-widget")||null!==e.closest('[data-siteping-ignore="true"]')||null!==e.closest("#siteping-markers")||null!==e.closest("#sp-tooltip")}function Ef(e){let t=e,i=e.shadowRoot?.activeElement;for(;i instanceof HTMLElement;){let e=i.getBoundingClientRect();e.width>=4&&e.height>=4&&(t=i),i=i.shadowRoot?.activeElement}return t}var Mf=256;function Af(e,t){let i=e;for(;i&&Sf(i);)i=i[t];return i}function Tf(e){return 1===e.nodeType&&"true"===e.getAttribute("data-siteping-ignore")}function Bf(e){return 3===e.nodeType?NodeFilter.FILTER_ACCEPT:Tf(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}function Rf(e,t){let i="before"===t?"previousElementSibling":"nextElementSibling",r=Af(e[i],i),s=3;for(;r&&s>0;){let e="before"===t?If(r,Mf,!0).trim():Pf(r,Mf,!0).trim();if(e)return"before"===t?e.slice(-32):e.slice(0,32);r=Af(r[i],i),s--}return""}function Lf(e){let t=Af(e.previousElementSibling,"previousElementSibling"),i=Af(e.nextElementSibling,"nextElementSibling");return[t?Pf(t,Mf,!0).trim().slice(0,40):"",i?Pf(i,Mf,!0).trim().slice(0,40):""].filter(Boolean).join(" | ")}function Pf(e,t,i=!1){let r="";if(null===e.firstElementChild){for(let i of e.childNodes)if(3===i.nodeType&&(r+=i.data,r.length>=t))break;return r.length>t?r.slice(0,t):r}let s=i?e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,Bf):e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.length<t;){let e=s.nextNode();if(!e)break;r+=e.data}return r.length>t?r.slice(0,t):r}function If(e,t,i=!1){let r="",s=e=>{for(let n=e.lastChild;n;n=n.previousSibling)if(3===n.nodeType){if(r=n.data+r,r.length>=t)return!0}else if(1===n.nodeType&&(!i||!Tf(n))&&s(n))return!0;return!1};return s(e),r.length>t?r.slice(-t):r}function Nf(e){return e.id&&e.id.length<=T?e.id:void 0}function Df(e){return e.includes("'")?`concat('${e.replace(/'/g,"',\"'\",'")}')`:`'${e}'`}O();var Of="data-feedback-anchor",Ff=" >>> ",$f={className:e=>!/^(css|sc|emotion|styled)-/.test(e)&&!/^[a-z]{1,3}[A-Za-z0-9]{4,8}$/.test(e),attr:e=>["data-testid","data-id","role","aria-label"].includes(e),idName:e=>!e.startsWith("radix-")&&!/^:r[0-9]+:$/.test(e),seedMinLength:3,optimizedMinLength:2};function zf(e,t){let i=e;for(;i;){let e=i.closest(t);if(e)return e;let r=i.getRootNode();i=r instanceof ShadowRoot?r.host:null}return null}function _f(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode();return t instanceof ShadowRoot?t.host:null}function Wf(e){let t=[],i=e;for(;i;){let e=i.getRootNode();e instanceof ShadowRoot?(t.unshift(lf(i,{...$f,root:e})),i=e.host):(t.unshift(lf(i,$f)),i=null)}let r=t.join(Ff),s=function(e){if(e.getRootNode()instanceof ShadowRoot)return function(e){let t="";for(let i=e;i;i=i.parentElement){let e=i.localName,r=Nf(i);if(r){t=`/${e}[@id=${Df(r)}]${t}`;continue}let s=1;for(let t=i.previousElementSibling;t;t=t.previousElementSibling)t.localName===e&&s++;t=`/${e}[${s}]${t}`}return`.${t}`}(e);let t=Nf(e);if(t)return`//${e.localName}[@id=${Df(t)}]`;let i=[],r=e;for(;r&&r!==document.body&&i.length<6;){let e=r.localName,t=r.parentElement,s=Nf(r);if(s)return i.unshift(`/${e}[@id=${Df(s)}]`),"/"+i.join("");let n=1;if(t)for(let i of t.children){if(i===r)break;i.localName===e&&n++}i.unshift(`/${e}[${n}]`),r=t}return r!==document.body?"/"+i.join(""):"/html/body"+i.join("")}(e),n=null!==zf(e,'[data-siteping-ignore="true"]'),o=n?"":Pf(e,256,!0).trim().slice(0,120),a=n?"":Rf(e,"before"),l=n?"":Rf(e,"after"),d=kf(e),c=n?"":Lf(e),p=zf(e,`[${Of}]`)?.getAttribute(Of)??null;return{cssSelector:r,xpath:s,textSnippet:o,textPrefix:a,textSuffix:l,fingerprint:d,neighborText:c,elementTag:e.tagName.slice(0,A),elementId:e.id&&e.id.length<=T?e.id:void 0,anchorKey:p}}function Hf(e,t){let i=e.getBoundingClientRect();return i.left<=t.x&&i.top<=t.y&&i.right>=t.x+t.width&&i.bottom>=t.y+t.height}function Vf(e,t){let i=document.elementFromPoint(e,t),r=i?.shadowRoot;for(;r&&"function"==typeof r.elementFromPoint;){let s=r.elementFromPoint(e,t);if(!s||s.getRootNode()!==r)break;i=s,r=s.shadowRoot}return i}G(),Pe(),G(),Pe(),Ie();var jf={width:334,height:280},Uf={top:0,bottom:0};qe(),Ze();var Yf,qf={question:"type.question",change:"type.change",bug:"type.bug",other:"type.other"},Gf="opacity 250ms cubic-bezier(0.16, 1, 0.3, 1),transform 250ms cubic-bezier(0.16, 1, 0.3, 1)",Kf=class{constructor(e,t){this.colors=e,this.t=t,this.root=z("div",{style:`position:fixed;z-index:2147483647;pointer-events:auto;width:300px;padding:16px;border-radius:16px;background:${this.colors.glassBg};backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid ${this.colors.glassBorder};box-shadow:0 8px 32px ${this.colors.shadow},0 2px 8px ${this.colors.shadow};font-family:"Inter",system-ui,-apple-system,sans-serif;opacity:0;transform:translateY(8px) scale(0.98);transition:${Gf};display:none;-webkit-font-smoothing:antialiased;`}),this.root.setAttribute("role","dialog"),this.root.setAttribute("aria-modal","true"),this.root.setAttribute("data-siteping-ignore","true");let i=[{type:"question",icon:ve},{type:"change",icon:we},{type:"bug",icon:ke},{type:"other",icon:Ce}];this.typeRow=z("div",{style:"display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px;"});for(let e of i){let t=document.createElement("button");t.style.cssText=`height:44px;border-radius:9999px;border:1px solid ${this.colors.border};background:${this.colors.glassBg};cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:13px;font-weight:500;color:${this.colors.textTertiary};transition:all 0.2s ease;padding:0 12px;`;let i=$(e.icon);i.style.cssText="width:13px;height:13px;flex-shrink:0;",t.appendChild(i),t.appendChild(document.createElement("span")),t.dataset.type=e.type,t.setAttribute("aria-pressed","false"),t.addEventListener("click",()=>{this.submittingState||this.selectType(e.type,this.typeRow)}),t.addEventListener("mouseenter",()=>{if(!this.submittingState&&t.dataset.type!==this.selectedType){let e=We(t.dataset.type??"",this.colors);t.style.background=e,t.style.borderColor=$e(t.dataset.type??"",this.colors)+"40"}}),t.addEventListener("mouseleave",()=>{this.submittingState||t.dataset.type!==this.selectedType&&(t.style.background=this.colors.glassBg,t.style.borderColor=this.colors.border)}),this.typeRow.appendChild(t)}this.textarea=document.createElement("textarea"),this.textarea.style.cssText=`width:100%;min-height:72px;max-height:152px;padding:10px 12px;border-radius:12px;border:1px solid ${this.colors.border};background:${this.colors.glassBgHeavy};color:${this.colors.text};font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:13px;line-height:1.5;resize:vertical;outline:none;transition:all 0.2s ease;box-sizing:border-box;`,this.textarea.maxLength=5e3,this.hint=z("div",{style:`font-size:11px;color:${this.colors.textTertiary};text-align:right;margin-top:4px;font-family:"Inter",system-ui,-apple-system,sans-serif;letter-spacing:0.01em;`}),this.textarea.addEventListener("focus",()=>{this.submittingState||(this.textarea.style.borderColor=this.colors.accent,this.textarea.style.boxShadow=`0 0 0 3px ${this.colors.accent}14`,this.textarea.style.background=this.colors.bg)}),this.textarea.addEventListener("blur",()=>{this.submittingState||(this.textarea.style.borderColor=this.colors.border,this.textarea.style.boxShadow="none",this.textarea.style.background=this.colors.glassBgHeavy)}),this.textarea.addEventListener("input",()=>{this.updateSubmitState()}),this.textarea.addEventListener("keydown",e=>{this.submittingState||"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.submit())});let r=z("div",{style:"display:flex;justify-content:flex-end;gap:8px;margin-top:12px;"});this.cancelBtn=document.createElement("button"),this.cancelBtn.style.cssText=`height:34px;padding:0 16px;border-radius:9999px;border:1px solid ${this.colors.border};background:${this.colors.glassBg};color:${this.colors.textTertiary};font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s ease;`,this.cancelBtn.addEventListener("click",()=>this.dismiss()),this.cancelBtn.addEventListener("mouseenter",()=>{this.submittingState||(this.cancelBtn.style.borderColor=this.colors.accent,this.cancelBtn.style.color=this.colors.accentText)}),this.cancelBtn.addEventListener("mouseleave",()=>{this.submittingState||(this.cancelBtn.style.borderColor=this.colors.border,this.cancelBtn.style.color=this.colors.textTertiary)}),this.submitBtn=document.createElement("button"),this.submitBtn.style.cssText=`height:34px;padding:0 18px;border-radius:9999px;border:none;background:${this.colors.accentGradient};color:#fff;font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:13px;font-weight:600;cursor:pointer;opacity:0.35;pointer-events:none;transition:all 0.2s ease;box-shadow:0 2px 8px ${this.colors.accentGlow};display:inline-flex;align-items:center;justify-content:center;min-width:64px;`,this.submitLabel=document.createElement("span"),this.submitBtn.appendChild(this.submitLabel),this.submitBtn.addEventListener("click",()=>this.submit()),r.appendChild(this.cancelBtn),r.appendChild(this.submitBtn),this.root.appendChild(this.typeRow),this.root.appendChild(this.textarea),this.root.appendChild(this.hint),this.root.appendChild(r),X(this.root),document.body.appendChild(this.root),this.applyLabels()}colors;t;root;selectedType=null;textarea;submitBtn;cancelBtn;typeRow;submitLabel;hint;resolve=null;previouslyFocused=null;removeKeydownTrap=null;onSubmit=null;submittingState=!1;showFrame=null;hideTimeoutId=null;spinnerAnimation=null;sheet=!1;stopKeyboardTracking=null;get isOpen(){return null!==this.resolve}get sheetTop(){return this.sheet&&this.isOpen?window.innerHeight-this.root.offsetHeight:null}refreshLabels(){this.applyLabels()}applyLabels(){this.root.setAttribute("aria-label",this.t("popup.ariaLabel"));let e=this.root.querySelectorAll("button[data-type]");for(let t of e){let e=t.dataset.type;if(!e)continue;let i=qf[e];if(!i)continue;let r=t.querySelector("span");r&&_(r,this.t(i))}this.textarea.placeholder=this.t("popup.placeholder"),this.textarea.setAttribute("aria-label",this.t("popup.textareaAria")),_(this.hint,Y()?this.t("popup.submitHintMac"):this.t("popup.submitHintOther")),_(this.cancelBtn,this.t("popup.cancel")),_(this.submitLabel,this.t("popup.submit"))}show(e,t,i=Uf){return new Promise(r=>{this.cancelPendingTransition(),this.resolve=r,this.onSubmit=t??null,this.selectedType=null,this.textarea.value="",this.submittingState=!1,this.updateSubmitState(),this.resetTypeButtons(),this.previouslyFocused=document.activeElement;let s=Xe();this.sheet=Ke();let n=this.sheet?"48px":s?"44px":"34px";this.cancelBtn.style.height=n,this.submitBtn.style.height=n,this.cancelBtn.style.flex=this.sheet?"1":"",this.submitBtn.style.flex=this.sheet?"2":"",this.textarea.style.fontSize=s?"16px":"13px",this.textarea.style.minHeight=this.sheet?"96px":"72px",this.hint.style.display=s?"none":"",this.root.style.transform=this.hiddenTransform(),J(this.root,!1),this.root.style.display="block",this.layout(e,i),this.removeKeydownTrap?.(),this.removeKeydownTrap=Z(this.root,e=>{if("Escape"===e.key&&this.dismiss(),"Tab"===e.key){let t=Array.from(this.root.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===t.length)return;let i=t[0],r=t[t.length-1];if(!i||!r)return;e.shiftKey?(document.activeElement===i||!this.root.contains(document.activeElement))&&(e.preventDefault(),r.focus()):(document.activeElement===r||!this.root.contains(document.activeElement))&&(e.preventDefault(),i.focus())}}),this.root.style.transition=Je()?"none":Gf,this.showFrame=requestAnimationFrame(()=>{this.showFrame=null,this.root.style.opacity="1",this.root.style.transform="translateY(0) scale(1)",(s?this.typeRow.querySelector("button"):this.textarea)?.focus()})})}layout(e,t){let i=this.root.style;if(i.width=this.sheet?"auto":"300px",i.borderRadius=this.sheet?"20px 20px 0 0":"16px",i.background=this.sheet?this.colors.bg:this.colors.glassBg,i.boxShadow=this.sheet?`0 -8px 32px ${this.colors.shadow}`:`0 8px 32px ${this.colors.shadow}, 0 2px 8px ${this.colors.shadow}`,i.overscrollBehavior=this.sheet?"contain":"",this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,this.sheet){i.top="auto",i.left="0",i.right="0",i.overflowY="auto";let e=(e,t=window.innerHeight)=>{i.bottom=`${e}px`,i.maxHeight=t-8+"px",i.padding="16px 16px "+(e>0?"16px":"calc(16px + env(safe-area-inset-bottom, 0px))")};return e(0),void(this.stopKeyboardTracking=Qe(e))}i.right="",i.bottom="",i.padding="16px",i.maxHeight="",i.overflowY="";let{top:r,left:s,maxHeight:n}=function(e,t,i,r=Uf){let s,n=r.top+8,o=i.height-r.bottom-8,a=Math.max(0,o-n),l=e.bottom+8,d=e.top-8-t.height,c=e=>e>=n&&e+t.height<=o,p=null;c(l)?s=l:c(d)?s=d:t.height<=a?s=Math.min(Math.max(l,n),o-t.height):(s=n,p=a);let h=e.left;return h+t.width>i.width-8&&(h=e.right-t.width),h=Math.max(8,Math.min(h,i.width-8-t.width)),{top:s,left:h,maxHeight:p}}(e,this.measure(),{width:window.innerWidth,height:window.innerHeight},t);i.top=`${r}px`,i.left=`${s}px`,null!==n&&(i.maxHeight=`${Math.max(0,n-this.verticalChromeHeight())}px`,i.overflowY="auto",this.root.scrollTop=0)}hiddenTransform(){return this.sheet?"translateY(100%)":"translateY(8px) scale(0.98)"}measure(){let e=this.root.offsetWidth,t=this.root.offsetHeight;return e>0&&t>0?{width:e,height:t}:jf}verticalChromeHeight(){let e=window.getComputedStyle(this.root);return"border-box"===e.boxSizing?0:[e.paddingTop,e.paddingBottom,e.borderTopWidth,e.borderBottomWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0)}selectType(e,t){this.selectedType=e;let i=t.querySelectorAll("button");for(let t of i){let i=t.dataset.type===e,r=$e(t.dataset.type??"",this.colors),s=We(t.dataset.type??"",this.colors);t.style.background=i?s:this.colors.glassBg,t.style.borderColor=i?r+"60":this.colors.border,t.style.color=i?r:this.colors.textTertiary,t.style.fontWeight=i?"600":"500",t.setAttribute("aria-pressed",String(i))}this.updateSubmitState()}resetTypeButtons(){let e=this.root.querySelectorAll("button[data-type]");for(let t of e)t.setAttribute("aria-pressed","false"),t.disabled=!1,t.style.background=this.colors.glassBg,t.style.borderColor=this.colors.border,t.style.color=this.colors.textTertiary,t.style.fontWeight="500",t.style.cursor="pointer"}updateSubmitState(){if(this.submittingState)return;let e=this.textarea.value.trim().length>0;this.submitBtn.disabled=!e,this.submitBtn.style.opacity=e?"1":"0.35",this.submitBtn.style.pointerEvents=e?"auto":"none"}submit(){if(this.submittingState||!this.textarea.value.trim())return;let e={type:this.selectedType??"other",message:this.textarea.value.trim()};if(!this.onSubmit)return this.resolve?.(e),this.resolve=null,void this.hideElement();this.enterSubmittingState(),(0,this.onSubmit)(e).then(()=>{this.resolve?.(e),this.resolve=null,this.hideElement()}).catch(()=>{this.exitSubmittingState()})}dismiss(){this.submittingState||!this.isOpen||(this.resolve?.(null),this.resolve=null,this.hideElement())}enterSubmittingState(){this.submittingState=!0,this.submitLabel.style.display="none",this.submitBtn.disabled=!0,this.submitBtn.style.cursor="wait",this.submitBtn.style.opacity="0.85",this.submitBtn.setAttribute("aria-busy","true"),this.submitBtn.appendChild(this.buildSpinner()),this.cancelBtn.disabled=!0,this.cancelBtn.style.opacity="0.5",this.cancelBtn.style.cursor="not-allowed",this.cancelBtn.style.pointerEvents="none",this.textarea.disabled=!0,this.textarea.style.opacity="0.6";let e=this.typeRow.querySelectorAll("button");for(let t of e)t.disabled=!0,t.style.cursor="not-allowed",t.style.opacity="0.6"}exitSubmittingState(){this.submittingState=!1,this.spinnerAnimation?.cancel(),this.spinnerAnimation=null,this.submitBtn.querySelector('[data-role="sp-popup-spinner"]')?.remove(),this.submitLabel.style.display="",this.submitBtn.removeAttribute("aria-busy"),this.submitBtn.style.cursor="pointer",this.cancelBtn.disabled=!1,this.cancelBtn.style.opacity="1",this.cancelBtn.style.cursor="pointer",this.cancelBtn.style.pointerEvents="auto",this.textarea.disabled=!1,this.textarea.style.opacity="1";let e=this.typeRow.querySelectorAll("button");for(let t of e)t.disabled=!1,t.style.cursor="pointer",t.style.opacity="1";this.updateSubmitState()}buildSpinner(){let e=document.createElement("div");return e.dataset.role="sp-popup-spinner",e.style.cssText="width:14px;height:14px;border:2px solid rgba(255,255,255,0.35);border-top-color:#fff;border-radius:50%;box-sizing:border-box;",!Je()&&"function"==typeof e.animate&&(this.spinnerAnimation=e.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,iterations:1/0,easing:"linear"})),e}hideElement(){this.cancelPendingTransition(),this.removeKeydownTrap?.(),this.removeKeydownTrap=null,this.submittingState&&this.exitSubmittingState(),this.onSubmit=null,this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,this.root.style.opacity="0",this.root.style.transform=this.hiddenTransform(),this.previouslyFocused?.focus(),this.previouslyFocused=null,J(this.root,!0),Je()?this.root.style.display="none":this.hideTimeoutId=setTimeout(()=>{this.hideTimeoutId=null,this.root.style.display="none"},250)}cancelPendingTransition(){null!==this.showFrame&&cancelAnimationFrame(this.showFrame),null!==this.hideTimeoutId&&clearTimeout(this.hideTimeoutId),this.showFrame=null,this.hideTimeoutId=null}destroy(){this.submittingState&&this.exitSubmittingState(),this.cancelPendingTransition(),this.resolve?.(null),this.resolve=null,this.onSubmit=null,this.removeKeydownTrap?.(),this.removeKeydownTrap=null,this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,this.root.remove()}},Xf=!1;function Jf(e,t,i){return Math.min(i,Math.max(e,t))}function Qf(e){return Jf(0,Math.round(1e4*e)/1e4,1)}function Zf(e){let t=Math.max(0,e.left),i=Math.max(0,e.top);return new DOMRect(t,i,Math.max(0,Math.min(e.right,window.innerWidth)-t),Math.max(0,Math.min(e.bottom,window.innerHeight)-i))}Ze();var eg=class{constructor(e,t,i,r=!1,s){this.colors=e,this.bus=t,this.t=i,this.enableScreenshot=r,this.getFallbackTarget=s,this.popup=new Kf(e,i),this.bus.on("annotation:start",()=>this.activate())}colors;bus;t;enableScreenshot;getFallbackTarget;overlay=null;toolbar=null;toolbarCancel=null;cancelFrozen=!1;drawingRect=null;startX=0;startY=0;isDrawing=!1;isActive=!1;instantMode=!1;popup;stalePopup=!1;savedOverflow="";preActiveFocusElement=null;keyboardTarget=null;rafId=null;pendingMoveEvent=null;rejectPendingSubmission=null;unregisterEscapeLayer=Q(document,()=>this.isActive);get isBusy(){return this.isActive}refreshLabels(){this.popup.refreshLabels()}restyle(){this.stalePopup=this.isActive||this.popup.isOpen,!this.stalePopup&&(this.popup.destroy(),this.popup=new Kf(this.colors,this.t))}async maybeCapture(e){return this.enableScreenshot?async function(e){let t=await async function(){if(void 0!==Yf)return Yf;try{let e=await Promise.resolve().then(()=>(Ah(),et));return Yf=e.default??e}catch(e){return Yf=null,Xf||(Xf=!0,console.warn("[siteping] html2canvas-pro import failed unexpectedly. Capture is disabled for this session \u2014 feedbacks are still submitted, just without screenshots. Underlying error:",e)),null}}();if(!t)return null;let i=1200,r=Jf(48,.6*e.width,280),s=Jf(48,.6*e.height,220),n=window.scrollX+e.x,o=window.scrollY+e.y,a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),l=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),d=Math.max(0,n-r),c=Math.max(0,o-s),p=Math.min(a,n+e.width+r)-d,h=Math.min(l,o+e.height+s)-c;if(p<=0||h<=0)return null;let u={xPct:Qf((n-d)/p),yPct:Qf((o-c)/h),wPct:Qf(e.width/p),hPct:Qf(e.height/h)};try{let e=await t(document.body,{x:d,y:c,width:p,height:h,scale:window.devicePixelRatio,useCORS:!0,allowTaint:!0,logging:!1,ignoreElements:e=>"SITEPING-WIDGET"===e.tagName||null!==e.closest?.("siteping-widget")||"true"===e.getAttribute?.("data-siteping-ignore")});if(e.width<=i)return{dataUrl:e.toDataURL("image/jpeg",.85),region:u};let r=i/e.width,s=i,n=Math.round(e.height*r),o=document.createElement("canvas");o.width=s,o.height=n;let a=o.getContext("2d");return a?(a.drawImage(e,0,0,s,n),{dataUrl:o.toDataURL("image/jpeg",.85),region:u}):null}catch(e){return console.warn("[siteping] Screenshot capture failed:",e),null}}(e):null}activate(){if(this.isActive)return;this.isActive=!0;let e=!this.instantMode,t=Ke(),i=Xe(),r=this.t("annotator.instruction");this.preActiveFocusElement=document.activeElement;let s=document.activeElement;if(this.keyboardTarget=s instanceof HTMLElement&&s!==document.body&&s!==document.documentElement&&!Sf(s)?Ef(s):this.getFallbackTarget?.()??null,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.overlay=z("div",{style:`position:fixed;inset:0;z-index:2147483646;pointer-events:auto;background:rgba(15,23,42,0.04);cursor:${e?"crosshair":"default"};touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;`}),this.overlay.setAttribute("role","application"),this.overlay.setAttribute("aria-label",e?r:this.t("annotator.instantInstruction")),this.overlay.setAttribute("data-siteping-ignore","true"),e){this.toolbar=z("div",{style:`position:fixed;top:0;left:0;right:0;z-index:2147483647;pointer-events:auto;min-height:52px;box-sizing:border-box;padding:calc(env(safe-area-inset-top,0px) + 8px) ${t?"12px 8px 16px":"16px 8px"};background:${t?this.colors.bg:this.colors.glassBg};backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border-bottom:1px solid ${this.colors.glassBorder};display:flex;align-items:center;justify-content:center;gap:${t?12:16}px;font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.35;color:${this.colors.text};box-shadow:0 4px 16px ${this.colors.shadow};-webkit-font-smoothing:antialiased;`}),this.toolbar.setAttribute("data-siteping-ignore","true");let e=z("span",{style:`width:8px;height:8px;border-radius:50%;flex-shrink:0;background:${this.colors.accent};box-shadow:0 0 8px ${this.colors.accentGlow};`});!Je()&&"function"==typeof e.animate&&e.animate([{opacity:1},{opacity:.4},{opacity:1}],{duration:1500,easing:"ease-in-out",iterations:1/0});let s=z("span",{style:"font-weight:500;letter-spacing:-0.01em;min-width:0;"});_(s,i?this.t("annotator.touchInstruction"):r);let n=document.createElement("button");n.style.cssText=`height:${i?40:34}px;padding:0 18px;border-radius:9999px;flex-shrink:0;border:1px solid ${this.colors.border};background:${this.colors.glassBg};color:${this.colors.textTertiary};font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s ease;`,_(n,this.t("annotator.cancel")),n.addEventListener("click",()=>this.cancelSession()),n.addEventListener("mouseenter",()=>{this.cancelFrozen||this.paintCancel(!0)}),n.addEventListener("mouseleave",()=>this.paintCancel(!1)),this.toolbarCancel=n,this.toolbar.appendChild(e),this.toolbar.appendChild(s),this.toolbar.appendChild(n)}e&&(this.overlay.addEventListener("mousedown",this.onMouseDown),this.overlay.addEventListener("mousemove",this.onMouseMove),this.overlay.addEventListener("mouseup",this.onMouseUp),this.overlay.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.overlay.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.overlay.addEventListener("touchend",this.onTouchEnd),this.overlay.addEventListener("keydown",this.onOverlayKeyDown)),this.overlay.setAttribute("tabindex","0"),document.addEventListener("keydown",this.onKeyDown),X(this.overlay),this.toolbar&&X(this.toolbar),document.body.appendChild(this.overlay),this.toolbar&&document.body.appendChild(this.toolbar),this.overlay.focus({preventScroll:!0})}toolbarInsets(){if(!this.toolbar)return Uf;let e=this.toolbar.getBoundingClientRect();if(0===e.height)return Uf;let t=window.innerHeight;return e.top+e.height/2<t/2?{top:Math.max(0,e.bottom),bottom:0}:{top:0,bottom:Math.max(0,t-e.top)}}cancelSession(){this.isActive&&(this.popup.dismiss(),!this.popup.isOpen&&this.deactivate())}paintCancel(e){let t=this.toolbarCancel;t&&(t.style.borderColor=e?this.colors.typeBug:this.colors.border,t.style.color=e?this.colors.typeBug:this.colors.textTertiary,t.style.background=e?this.colors.typeBugBg:this.colors.glassBg)}freezeCancel(e){this.cancelFrozen=e;let t=this.toolbarCancel;t&&(e&&this.paintCancel(!1),t.style.opacity=e?"0.5":"1",t.style.cursor=e?"not-allowed":"pointer",e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled"))}deactivate(){if(!this.isActive)return;this.isActive=!1,this.isDrawing=!1,this.instantMode=!1;let e=this.preActiveFocusElement;this.preActiveFocusElement=null,this.keyboardTarget=null,null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingMoveEvent=null,document.body.style.overflow=this.savedOverflow,document.removeEventListener("keydown",this.onKeyDown),this.overlay?.remove(),this.toolbar?.remove(),this.drawingRect?.remove(),this.overlay=null,this.toolbar=null,this.toolbarCancel=null,this.cancelFrozen=!1,this.drawingRect=null,e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0}),this.bus.emit("annotation:end"),this.stalePopup&&this.restyle()}onKeyDown=e=>{"Escape"===e.key&&this.cancelSession()};onOverlayKeyDown=async e=>{if("Enter"!==e.key||(e.preventDefault(),this.popup.isOpen)||this.isDrawing)return;let t=this.keyboardTarget;!t||!(t instanceof HTMLElement)||await this.annotateElement(t)};async annotateElement(e,t=!1){let i=e.getBoundingClientRect();if(i.width<=0||i.height<=0)return;let r=new DOMRect(i.x,i.y,i.width,i.height);this.drawingRect?.remove();let s=this.createDrawingRect();s.style.left=`${i.x}px`,s.style.top=`${i.y}px`,s.style.width=`${i.width}px`,s.style.height=`${i.height}px`,this.drawingRect=s,this.overlay?.appendChild(s);let n={anchor:Wf(e),rect:{xPct:0,yPct:0,wPct:1,hPct:1},scrollX:window.scrollX,scrollY:window.scrollY,viewportW:window.innerWidth,viewportH:window.innerHeight,devicePixelRatio:window.devicePixelRatio},o=await this.openForm(n,r,t?Zf(r):r);this.drawingRect?.remove(),this.drawingRect=null,o&&this.deactivate()}onMouseDown=e=>{this.startDrawing(e.clientX,e.clientY)};onTouchStart=e=>{e.preventDefault();let t=e.touches[0];t&&this.startDrawing(t.clientX,t.clientY)};startDrawing(e,t){this.popup.isOpen||(this.isDrawing=!0,this.startX=e,this.startY=t,this.drawingRect?.remove(),this.drawingRect=this.createDrawingRect(),this.overlay?.appendChild(this.drawingRect))}createDrawingRect(){let e=z("div",{style:`position:fixed;border:2px solid ${this.colors.accent};background:${this.colors.accent}12;pointer-events:none;border-radius:8px;box-shadow:0 0 16px ${this.colors.accentGlow};transition:box-shadow 0.15s ease;`});return e.setAttribute("data-siteping-ignore","true"),e}onMouseMove=e=>{this.scheduleRectUpdate(e)};onTouchMove=e=>{e.preventDefault(),e.touches[0]&&this.scheduleRectUpdate(e.touches[0])};scheduleRectUpdate(e){!this.isDrawing||!this.drawingRect||(this.pendingMoveEvent=e,null===this.rafId&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;let e=this.pendingMoveEvent;if(!e||!this.drawingRect)return;let t=Math.min(e.clientX,this.startX),i=Math.min(e.clientY,this.startY),r=Math.abs(e.clientX-this.startX),s=Math.abs(e.clientY-this.startY);this.drawingRect.style.left=`${t}px`,this.drawingRect.style.top=`${i}px`,this.drawingRect.style.width=`${r}px`,this.drawingRect.style.height=`${s}px`})))}onTouchEnd=async e=>{let t=e.changedTouches[0];t&&await this.finishDrawing(t.clientX,t.clientY)};elementAt(e,t){this.overlay&&(this.overlay.style.pointerEvents="none");let i=Vf(e,t);this.overlay&&(this.overlay.style.pointerEvents="auto");let r=i instanceof SVGElement?(i.ownerSVGElement??i).parentElement:i;return r instanceof HTMLElement&&r!==document.body&&r!==document.documentElement&&!Sf(r)?r:null}onMouseUp=async e=>{await this.finishDrawing(e.clientX,e.clientY)};finishDrawing=async(e,t)=>{if(!this.isDrawing||!this.drawingRect)return;this.isDrawing=!1;let i=Math.min(e,this.startX),r=Math.min(t,this.startY),s=Math.abs(e-this.startX),n=Math.abs(t-this.startY);if(s<10||n<10){this.drawingRect.remove(),this.drawingRect=null;let i=this.elementAt(e,t);return void(i&&await this.annotateElement(i,!0))}let o=new DOMRect(i,r,s,n),{annotation:a}=this.buildAnnotation(o),l=await this.openForm(a,o);this.drawingRect?.remove(),this.drawingRect=null,l&&this.deactivate()};async startInstantAnnotation(e,t){if(this.isActive)return;this.instantMode=!0,this.bus.emit("annotation:start");let i=Math.max(0,Math.min(e-10,window.innerWidth-20)),r=Math.max(0,Math.min(t-10,window.innerHeight-20)),s=new DOMRect(i,r,20,20),{annotation:n,anchorBounds:o}=this.buildAnnotation(s),a=Zf(o);this.drawingRect?.remove(),this.drawingRect=z("div",{style:`position:fixed;left:${i}px;top:${r}px;width:20px;height:20px;border:2px solid ${this.colors.accent};background:${this.colors.accent}12;pointer-events:none;border-radius:8px;box-shadow:0 0 16px ${this.colors.accentGlow};`}),this.drawingRect.setAttribute("data-siteping-ignore","true"),this.overlay?.appendChild(this.drawingRect),await this.openForm(n,s,a),this.drawingRect?.remove(),this.drawingRect=null,this.deactivate()}openForm(e,t,i=t){let r={clientId:R()},s=this.popup.show(t,t=>(this.freezeCancel(!0),this.runSubmission(e,t,i,r).finally(()=>this.freezeCancel(!1))),this.toolbarInsets());return this.revealSelection(t),s}revealSelection(e){let t=this.popup.sheetTop;if(null===t||!this.drawingRect)return;let i=Math.min(e.bottom+16-t,e.top-72);if(i<=0)return;let r=window.scrollY;window.scrollBy({top:i,behavior:"instant"}),this.drawingRect.style.top=e.top-(window.scrollY-r)+"px"}async runSubmission(e,t,i,r){void 0===r.screenshot&&(r.screenshot=await this.maybeCapture(new DOMRect(i.x+e.scrollX-window.scrollX,i.y+e.scrollY-window.scrollY,i.width,i.height)));let s=r.screenshot;await new Promise((i,n)=>{let o=()=>{a(),l(),d(),c(),this.rejectPendingSubmission=null},a=this.bus.on("feedback:sent",()=>{o(),i()}),l=this.bus.on("feedback:queued",()=>{o(),i()}),d=this.bus.on("feedback:error",e=>{o(),n(e)}),c=this.bus.on("submission:cancelled",()=>{o(),n(new Error("Feedback submission cancelled"))});this.rejectPendingSubmission=e=>{o(),n(e)},this.bus.emit("annotation:complete",{annotation:e,type:t.type,message:t.message,clientId:r.clientId,screenshotDataUrl:s?.dataUrl??null,screenshotRegion:s?.region??null})})}buildAnnotation(e){this.overlay&&(this.overlay.style.pointerEvents="none");let t=function(e,t=document.documentElement){let i=Vf(e.x+e.width/2,e.y+e.height/2);if(!i||i===t)return document.body;let r=i;for(;r&&r!==document.body;){if(r.hasAttribute(Of)&&Hf(r,e))return r;r=_f(r)}for(r=i;r&&r!==document.body;){if(Hf(r,e))return r;r=_f(r)}return document.body}(e);this.overlay&&(this.overlay.style.pointerEvents="auto");let i=Wf(t),r=t.getBoundingClientRect(),s=function(e,t){return t.width<=0||t.height<=0?{xPct:0,yPct:0,wPct:1,hPct:1}:{xPct:(e.x-t.x)/t.width,yPct:(e.y-t.y)/t.height,wPct:e.width/t.width,hPct:e.height/t.height}}(e,r);return{annotation:{anchor:i,rect:s,scrollX:window.scrollX,scrollY:window.scrollY,viewportW:window.innerWidth,viewportH:window.innerHeight,devicePixelRatio:window.devicePixelRatio},anchorBounds:r}}destroy(){this.deactivate(),this.unregisterEscapeLayer(),this.rejectPendingSubmission?.(new Error("Annotator destroyed during submission")),this.popup.destroy()}};function tg(e,t){let i=`siteping_own_feedback:${JSON.stringify([e,t??null])}`,r=()=>{try{let e=JSON.parse(localStorage.getItem(i)??"[]");return new Set(Array.isArray(e)?e.filter(e=>"string"==typeof e):[])}catch{return new Set}},s=e=>{try{e.size>0?localStorage.setItem(i,JSON.stringify([...e].slice(-500))):localStorage.removeItem(i)}catch{}};return{ids:r,add(e){let t=r();t.delete(e),s(t.add(e))},remove(...e){let t=r(),i=t.size;for(let i of e)t.delete(i);t.size<i&&s(t)},clear:()=>s(new Set)}}O();var ig=1e4,rg="siteping_retry_queue";function sg(e,t,i){let r,s=new Promise((e,s)=>{r=setTimeout(()=>s(i()),t)});return Promise.race([e,s]).finally(()=>clearTimeout(r))}async function ng(e,t){let i={};return t&&(i["Content-Type"]="application/json"),e.apiKey&&(i.Authorization=`Bearer ${e.apiKey}`),function(e,t){let i={...e};for(let[e,r]of Object.entries(t??{})){for(let t of Object.keys(i))t.toLowerCase()===e.toLowerCase()&&delete i[t];i[e]=r}return i}(i,"function"==typeof e.headers?await sg(Promise.resolve(e.headers()),ig,()=>new Error("headers factory did not settle within 10 s")):e.headers)}async function og(e,t,i,r,{boundBody:s=!1,timeoutMs:n=ig,resendOnTimeout:o=!0}={}){for(let a=0;;a++){let l,d=new AbortController,c=setTimeout(()=>d.abort(),n);try{let n=await fetch(e,{...t,signal:d.signal}).catch(e=>{if(3===a||!o&&d.signal.aborted)throw P(e,i);return null});if(l=ag(n,a),n&&(!lg(n.status)||3===a||l>1e4)){if(clearTimeout(c),s&&(c=setTimeout(()=>d.abort(),ig)),!n.ok)throw await L(n,i);return await r(n).catch(e=>{throw P(e,i)})}}finally{clearTimeout(c)}await new Promise(e=>setTimeout(e,l))}}function ag(e,t){let i=e?.headers.get("Retry-After"),r=i?/^\d+$/.test(i)?1e3*Number(i):Date.parse(i)-Date.now():Number.NaN;return Number.isNaN(r)?1e3*2**t+1e3*Math.random()-500:Math.max(0,r)}function lg(e){return e>=500||408===e||429===e}async function dg(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request("siteping_retry_queue",()=>e()):e()}function cg(e){if(!l(e,"endpoint")||"string"!=typeof e.endpoint||!l(e,"payload"))return!1;let{payload:t}=e;return l(t,"authorName")&&"string"==typeof t.authorName&&l(t,"authorEmail")&&"string"==typeof t.authorEmail}function pg(){let e,t=localStorage.getItem(rg);if(!t)return[];try{e=JSON.parse(t)}catch{return localStorage.removeItem(rg),console.warn(`[siteping] discarded an unreadable retry queue from localStorage (${t.length} chars)`),[]}return Array.isArray(e)?e.filter(cg):[]}var hg=new WeakMap;function ug(e){try{return localStorage.setItem(rg,JSON.stringify(e)),!0}catch{return!1}}function fg(e){return null!=e.payload.screenshotDataUrl}function gg(e){let{screenshotDataUrl:t,screenshotRegion:i,...r}=e.payload;return{endpoint:e.endpoint,payload:r}}function mg(e){return e.trim()}function bg(e){return e.trim().toLowerCase()}function yg(e,t){let i=Math.min(1,Math.max(0,e)),r=t-(i-e);return[i,Math.max(0,i+r<=1?r:1-i)]}function xg(e){let[t,i]=yg(e.rect.xPct,e.rect.wPct),[r,s]=yg(e.rect.yPct,e.rect.hPct);return{...e,rect:{xPct:t,yPct:r,wPct:i,hPct:s}}}async function vg(e){return await e.json()}async function wg(){}var kg=class{constructor(e,t,i={}){this.endpoint=e,this.projectName=t,this.auth=i}endpoint;projectName;auth;listRefusalExplained=!1;async headers(e,t){try{return await ng(this.auth,e)}catch(e){throw P(e,t)}}async sendFeedback(e){let t="Failed to send feedback",{screenshotRegion:i,...r}=e,s={...r,annotations:r.annotations.map(xg)},n=i?{...s,screenshotRegion:i}:s;try{let e=await og(this.endpoint,{method:"POST",headers:await this.headers(!0,t),body:JSON.stringify(n)},t,vg,{boundBody:!0});return o=n.clientId,dg(()=>{try{let e=pg(),t=e.filter(e=>e.payload.clientId!==o);if(t.length===e.length)return;t.length>0?localStorage.setItem(rg,JSON.stringify(t)):localStorage.removeItem(rg)}catch{}}),e}catch(e){throw function(e){return e instanceof c||e instanceof d&&"SERVER"===e.code}(e)&&hg.set(e,await function(e,t){return dg(()=>{try{let i=pg().filter(e=>e.payload.clientId!==t.clientId);if(i.length>=20&&i.shift(),i.push({endpoint:e,payload:t}),ug(i))return!0;let r=i.slice(),s=0;for(let[e,t]of r.entries())if(fg(t)&&(r[e]=gg(t),s+=1,ug(r)))return console.warn(`[siteping] retry queue exceeded the localStorage quota \u2014 dropped the screenshot of ${s} of ${i.length} queued feedback(s)`),!0;for(;r.length>1;)if(r.shift(),ug(r)){let e=i.length-r.length,t=i.slice(e).filter(fg).length;return console.warn(`[siteping] retry queue exceeded the localStorage quota \u2014 dropped the ${e} oldest of ${i.length} queued feedback(s)${t>0?`, and the screenshot of ${t} of the rest`:""}`),!0}console.warn("[siteping] feedback could not be queued for retry \u2014 localStorage is full or unavailable")}catch{}return!1}).catch(()=>!1)}(this.endpoint,n)),e}var o}async getFeedbacks(e,t){let i="Failed to fetch feedbacks",r=function(e){let t=new URLSearchParams({projectName:e.projectName});return e.page&&t.set("page",String(e.page)),e.limit&&t.set("limit",String(e.limit)),e.type&&t.set("type",e.type),e.status&&t.set("status",e.status),e.statuses?.length&&t.set("statuses",e.statuses.join(",")),e.search&&t.set("search",e.search),e.url&&t.set("url",e.url),e.urlPattern&&t.set("urlPattern",e.urlPattern),t}({projectName:e,...t}),s=await this.headers(!1,i);return og(function(e,t){let i=t.toString();if(!i)return e;let r=e.includes("#")?e.indexOf("#"):e.length,s=e.slice(0,r),n=/[?&]$/.test(s)?"":s.includes("?")?"&":"?";return s+n+i+e.slice(r)}(this.endpoint,r),{method:"GET",cache:"no-store",...Object.keys(s).length>0?{headers:s}:{}},i,vg).catch(e=>{throw e instanceof h&&!this.listRefusalExplained&&(this.listRefusalExplained=!0,console.warn(`[siteping] Feedback list refused (${e.status}): with an apiKey, GET needs it unless publicEndpoints includes "GET"; pins and panel stay empty. https://siteping.dev/docs/server#the-security-model-honestly`)),e})}async addComment(e,t){let i="Failed to post comment";return og(this.endpoint,{method:"POST",headers:await this.headers(!0,i),body:JSON.stringify({...t,projectName:this.projectName,feedbackId:e})},i,vg,{boundBody:!0})}async resolveFeedback(e,t){let i="Failed to update feedback";return og(this.endpoint,{method:"PATCH",headers:await this.headers(!0,i),body:JSON.stringify({id:e,projectName:this.projectName,status:t?"resolved":"open"})},i,vg)}async deleteFeedback(e){let t="Failed to delete feedback";await og(this.endpoint,{method:"DELETE",headers:await this.headers(!0,t),body:JSON.stringify({id:e,projectName:this.projectName})},t,wg)}async deleteAllFeedbacks(e){let t="Failed to delete all feedbacks";await og(this.endpoint,{method:"DELETE",headers:await this.headers(!0,t),body:JSON.stringify({projectName:e,deleteAll:!0})},t,wg,{timeoutMs:6e4,resendOnTimeout:!1})}};function Cg(e,t){if(e.length<=t)return e;let i=t-1,r=e.charCodeAt(i-1);return r>=55296&&r<=56319&&(i-=1),`${e.slice(0,i)}\u2026`}var Sg=["log","info","warn","error"];function Eg(e){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return String(e);if(e instanceof Error)return`${e.name}: ${e.message}${e.stack?`\n${e.stack}`:""}`;try{let t=[],i=500;return JSON.stringify(e,function(e,r){if(!(--i<0)){if("function"==typeof r)return"[Function]";if("symbol"==typeof r)return r.toString();if("object"!=typeof r||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?"[Circular]":(t.push(r),r)}})}catch{try{return String(e)}catch{return"[Unserializable]"}}}function Mg(e){let t="";for(let i=0;i<e.length&&(i>0&&(t+=" "),t+=Eg(e[i]),!(t.length>=500));i++);return Cg(t,500)}var Ag=class{maxEntries;entries=[];originals=new Map;wrappers=new Map;disposed=!1;constructor(e=50){if(this.maxEntries=Number.isFinite(e)&&e>=0?Math.min(Math.floor(e),50):50,!(typeof console>"u"))for(let e of Sg){let t=console[e];if("function"!=typeof t)continue;this.originals.set(e,t);let i=this,r=function(...r){try{i.push(e,r)}catch{}t.apply(this??console,r)};try{Object.defineProperty(r,"name",{value:e})}catch{}this.wrappers.set(e,r),console[e]=r}}push(e,t){0!==this.maxEntries&&(this.entries.length>=this.maxEntries&&this.entries.shift(),this.entries.push({level:e,timestamp:(new Date).toISOString(),message:Mg(t)}))}getEntries(){return this.entries.slice()}dispose(){if(this.disposed||(this.disposed=!0,typeof console>"u"))return;let e=console;for(let[t,i]of this.originals)if(e[t]===this.wrappers.get(t))try{e[t]=i}catch{}this.originals.clear(),this.wrappers.clear()}};function Tg(e){let t=function(e){try{let t=new URL(e,typeof location>"u"?void 0:location.href);return t.username||t.password?(t.username="",t.password="",t.href):e}catch{return e}}(function(e){if("string"==typeof e)return e;if(e instanceof URL)return e.href;if("object"==typeof e&&null!==e&&"url"in e){let t=e.url;if("string"==typeof t)return t}try{return String(e)}catch{return"(unknown)"}}(e)),i=t.search(/[?#]/);return Cg(-1===i?t:t.slice(0,i),2e3)}var Bg=class{maxEntries;entries=[];originalFetch=null;originalXhrOpen=null;originalXhrSend=null;wrappedFetch=null;wrappedXhrOpen=null;wrappedXhrSend=null;disposed=!1;constructor(e=20){this.maxEntries=Number.isFinite(e)&&e>=0?Math.min(Math.floor(e),20):20,this.installFetch(),this.installXhr()}push(e){0!==this.maxEntries&&(this.entries.length>=this.maxEntries&&this.entries.shift(),this.entries.push({...e,method:e.method.slice(0,20),status:e.status<=599?e.status:0,durationMs:Math.min(Math.max(e.durationMs,0),6e5)}))}installFetch(){if("function"!=typeof globalThis.fetch)return;let e=globalThis.fetch;this.originalFetch=e;let t=async(t,i)=>{let r=new Date,s=typeof performance<"u"?performance.now():Date.now(),n=Tg(t),o=(i?.method??(t instanceof Request?t.method:"GET")).toUpperCase();try{let a=await e(t,i);if(!a.ok){let e=typeof performance<"u"?performance.now():Date.now();this.push({url:n,method:o,status:a.status,durationMs:Math.round(e-s),timestamp:r.toISOString()})}return a}catch(e){let t=typeof performance<"u"?performance.now():Date.now();throw this.push({url:n,method:o,status:0,durationMs:Math.round(t-s),timestamp:r.toISOString()}),e}};this.wrappedFetch=t,globalThis.fetch=t}installXhr(){if(typeof XMLHttpRequest>"u")return;let e=XMLHttpRequest.prototype,t=e.open,i=e.send;this.originalXhrOpen=t,this.originalXhrSend=i;let r=this,s=new WeakMap,n=function(e,i,...r){try{s.set(this,{method:e.toUpperCase(),url:Tg(i),startedAt:new Date,t0:typeof performance<"u"?performance.now():Date.now()})}catch{}return t.call(this,e,i,...r)},o=function(e){let t=s.get(this);if(t){let e=()=>{try{let e=typeof performance<"u"?performance.now():Date.now(),i=this.status;(0===i||i>=400)&&r.push({url:t.url,method:t.method,status:i,durationMs:Math.round(e-t.t0),timestamp:t.startedAt.toISOString()})}catch{}};try{this.addEventListener("loadend",e,{once:!0})}catch{try{this.addEventListener("loadend",e)}catch{}}}return i.call(this,e??null)};this.wrappedXhrOpen=n,this.wrappedXhrSend=o,e.open=n,e.send=o}getEntries(){return this.entries.slice()}dispose(){if(!this.disposed){if(this.disposed=!0,this.originalFetch&&globalThis.fetch===this.wrappedFetch)try{globalThis.fetch=this.originalFetch}catch{}if(typeof XMLHttpRequest<"u")try{let e=XMLHttpRequest.prototype;this.originalXhrOpen&&e.open===this.wrappedXhrOpen&&(e.open=this.originalXhrOpen),this.originalXhrSend&&e.send===this.wrappedXhrSend&&(e.send=this.originalXhrSend)}catch{}}}},Rg=class{listeners=new Map;on(e,t){let i=this.listeners.get(e);return i||(i=new Set,this.listeners.set(e,i)),i.add(t),()=>{i?.delete(t)}}off(e,t){this.listeners.get(e)?.delete(t)}emit(e,...t){let i=this.listeners.get(e);if(i)for(let r of i)try{r(...t)}catch(t){console.error(`[siteping] Error in event listener for "${String(e)}":`,t)}}removeAll(){this.listeners.clear()}};G(),Pe(),su(),Ie(),Ze();var Lg={chat:"fab.messages",annotate:"fab.annotate","toggle-annotations":"fab.annotations"},Pg=class{constructor(e,t,i,r){this.bus=i,this.t=r;let s=t.position??"bottom-right";this.items=[{id:"chat",icon:Re},{id:"annotate",icon:Le}],!1!==t.showAnnotationsToggle&&this.items.push({id:"toggle-annotations",icon:fe,iconAlt:ge}),this.fab=document.createElement("button"),this.fab.className=`sp-fab sp-fab--${s} sp-anim-fab-in`,this.fab.style.position="fixed",this.fab.appendChild($(ue)),this.fab.setAttribute("aria-expanded","false"),this.fab.addEventListener("click",()=>this.toggle()),this.radialContainer=document.createElement("div"),this.radialContainer.className=`sp-radial sp-radial--${s}`,this.radialContainer.setAttribute("role","menu"),V(this.radialContainer,!0);for(let e=0;e<this.items.length;e++){let t=this.items[e];if(!t)continue;let i=document.createElement("button");i.className="sp-radial-item",i.style.setProperty("--sp-i",String(e)),i.appendChild($(t.icon)),i.setAttribute("role","menuitem"),i.dataset.itemId=t.id,i.addEventListener("click",e=>{e.stopPropagation(),this.handleItemClick(t.id)});let r=document.createElement("span");r.className="sp-radial-label",i.appendChild(r),this.radialContainer.appendChild(i)}this.scrim=document.createElement("div"),this.scrim.className="sp-scrim",this.scrim.addEventListener("click",()=>this.close()),this.root=document.createElement("div"),this.root.appendChild(this.scrim),this.root.appendChild(this.radialContainer),this.root.appendChild(this.fab),e.appendChild(this.root),this.applyLabels();let n=e.host;this.onDocumentClick=e=>{this.isOpen&&!e.composedPath().includes(n)&&this.close()},document.addEventListener("click",this.onDocumentClick,!0);let o=e=>{"Escape"===e.key&&this.isOpen&&(e.stopPropagation(),this.close())};this.fab.addEventListener("keydown",o),this.radialContainer.addEventListener("keydown",o),Q(this.root,()=>this.isOpen),this.radialContainer.addEventListener("keydown",t=>{let i=Array.from(this.radialContainer.querySelectorAll(".sp-radial-item"));if(0===i.length||!this.isOpen)return;let r=e.activeElement??document.activeElement,s=i.indexOf(r);switch(t.key){case"ArrowUp":{t.preventDefault();let e=s<=0?i.length-1:s-1;i[e]?.focus();break}case"ArrowDown":{t.preventDefault();let e=s>=i.length-1?0:s+1;i[e]?.focus();break}case"Home":t.preventDefault(),i[0]?.focus();break;case"End":t.preventDefault(),i[i.length-1]?.focus()}})}bus;t;root;scrim;fab;radialContainer;badgeEl=null;isOpen=!1;annotationsVisible=!0;items;onDocumentClick;refreshLabels(){this.applyLabels()}applyLabels(){this.applyFabLabel();let e=this.radialContainer.querySelectorAll(".sp-radial-item");for(let t of e){let e=t.dataset.itemId;if(!e)continue;let i=Lg[e];if(!i)continue;let r=this.t(i);t.setAttribute("aria-label",r);let s=t.querySelector(".sp-radial-label");s&&_(s,r)}}applyFabLabel(){let e=this.t("fab.aria"),t=this.badgeEl?.textContent;this.fab.setAttribute("aria-label",t?`${e}, ${ru(this.t,"fab.badge",{count:t})}`:e)}updateBadge(e){if(e<=0)return this.badgeEl?.remove(),this.badgeEl=null,void this.applyFabLabel();this.badgeEl||(this.badgeEl=document.createElement("span"),this.badgeEl.className="sp-fab-badge",this.badgeEl.setAttribute("role","status"),this.badgeEl.setAttribute("aria-live","polite"),this.fab.appendChild(this.badgeEl));let t=e>99?"99+":String(e);_(this.badgeEl,t),this.badgeEl.setAttribute("aria-label",ru(this.t,"fab.badge",{count:e})),this.applyFabLabel()}toggle(){this.isOpen?this.close():this.open()}open(){this.isOpen=!0,this.setFabIcon(me),this.fab.setAttribute("aria-expanded","true"),this.scrim.classList.add("sp-scrim--open"),V(this.radialContainer,!1);let e=Xe()?60:54;this.radialContainer.querySelectorAll(".sp-radial-item").forEach((t,i)=>{let r=-(16+e*(i+1));t.style.transform=`translate(0px, ${r}px) scale(1)`,t.classList.add("sp-radial-item--open")}),requestAnimationFrame(()=>{this.radialContainer.querySelector(".sp-radial-item")?.focus()})}close(){this.isOpen=!1,this.setFabIcon(ue),this.fab.setAttribute("aria-expanded","false"),this.scrim.classList.remove("sp-scrim--open"),V(this.radialContainer,!0),this.radialContainer.querySelectorAll(".sp-radial-item").forEach(e=>{e.style.transform="translate(0, 0) scale(0.8)",e.classList.remove("sp-radial-item--open")}),this.fab.focus()}setFabIcon(e){let t=this.badgeEl;this.fab.replaceChildren($(e)),t&&this.fab.appendChild(t)}handleItemClick(e){switch(this.close(),e){case"chat":this.bus.emit("panel:toggle",!0);break;case"annotate":{let e=this.bus.on("annotation:end",()=>{e(),this.fab.focus()});this.bus.emit("annotation:start");break}case"toggle-annotations":{this.annotationsVisible=!this.annotationsVisible,this.bus.emit("annotations:toggle",this.annotationsVisible);let e=this.radialContainer.querySelector('[data-item-id="toggle-annotations"]')?.querySelector("svg");if(e){let t=$(this.annotationsVisible?fe:ge);e.replaceWith(t)}break}}}destroy(){document.removeEventListener("click",this.onDocumentClick,!0),this.root.remove()}};Pe(),su(),O();var Ig="siteping_identity";function Ng(){try{let e=localStorage.getItem(Ig);if(!e)return null;let t=JSON.parse(e);return function(e){if(!l(e,"name")||!l(e,"email"))return!1;let{name:t,email:i}=e;return"string"==typeof t&&"string"==typeof i&&t.length>0&&t.length<=k&&i.length<=k&&n(i)}(t)?t:null}catch{return null}}function Dg(e){return e.normalize("NFC").replace(/\s+/g," ").trim()}function Og(e){return e.replace(/\s+/g," ").trim()}function Fg(e,t){if(e===t)return 1;let i=Math.max(e.length,t.length);return 0===i?1:1-function(e,t){if(e===t)return 0;if(0===e.length)return t.length;if(0===t.length)return e.length;if(e.length>t.length){let i=e;e=t,t=i}let i=e.length,r=t.length,s=new Array(i+1);for(let e=0;e<=i;e++)s[e]=e;let n=new Array(i+1);for(let o=1;o<=r;o++){n[0]=o;for(let r=1;r<=i;r++){let i=s[r-1];n[r]=e[r-1]===t[o-1]?i:1+Math.min(i,s[r],n[r-1])}let r=s;s=n,n=r}return s[i]}(e,t)/i}function $g(e,t,i=.6){if(!t||!e)return 0;if(e.includes(t))return 1;let r=e.length>500?e.slice(0,500):e;if(t.length>r.length){let e=Fg(r,t);return e>=i?e:0}if(t.length<8&&r.length>64)return 0;let s=1-function(e,t){let i=t.length,r=new Int32Array(i+1),s=new Int32Array(i+1);for(let e=0;e<=i;e++)r[e]=e;let n=i;for(let o=1;o<=e.length;o++){s[0]=0;let a=e.charCodeAt(o-1);for(let e=1;e<=i;e++){let i=r[e-1]+(t.charCodeAt(e-1)===a?0:1),n=r[e]+1,o=s[e-1]+1;s[e]=Math.min(i,n,o)}let l=s[i];l<n&&(n=l);let d=r;r=s,s=d}return n}(r,t)/t.length;return s>=i?s:0}function zg(e){let t=new Map;for(let i=0;i<e.length-1;i++){let r=e.charCodeAt(i)<<16|e.charCodeAt(i+1);t.set(r,(t.get(r)??0)+1)}return t}function _g(e,t,i){let r=i.length-1;if(t<=0||r<=0)return 0;let s=0,n=new Map;for(let t=0;t<i.length-1;t++){let r=i.charCodeAt(t)<<16|i.charCodeAt(t+1),o=e.get(r);if(void 0===o)continue;let a=n.get(r)??0;a<o&&(n.set(r,a+1),s++)}return 2*s/(t+r)}function Wg(e,t,i){if(t<=0)return 0;let r=i.split(" "),s=r.length-1;if(s<=0)return 0;let n=0,o=new Map;for(let t=0;t<r.length-1;t++){let i=`${r[t]} ${r[t+1]}`,s=e.get(i);if(void 0===s)continue;let a=o.get(i)??0;a<s&&(o.set(i,a+1),n++)}return 2*n/(t+s)}O();var Hg={checkOpacity:!0,opacityProperty:!0,checkVisibilityCSS:!0,visibilityProperty:!0};function Vg(e){if(!e.isConnected)return"hidden";if("function"==typeof e.checkVisibility)return e.checkVisibility(Hg)?"visible":e.checkVisibility()?"soft-hidden":"hidden";if(e.getClientRects().length>0)try{return"visible"===getComputedStyle(e).visibility?"visible":"soft-hidden"}catch{return"visible"}let t=e.firstElementChild;return t&&t.getClientRects().length>0?"visible":0===e.ownerDocument.documentElement.getClientRects().length?"unknown":"hidden"}var jg={anchorKey:1,id:1,css:.95,xpath:.9,scan:.85},Ug=500;function Yg(e,t){return Dg((e??"").slice(0,2e3)).slice(0,t)}function qg(e,t){let i=function(e){let t=Yg(e.textSnippet,Ug),i=function(e){let t=new Map,i=e.split(" ");for(let e=0;e<i.length-1;e++){let r=`${i[e]} ${i[e+1]}`;t.set(r,(t.get(r)??0)+1)}return t}(t),r=0;for(let e of i.values())r+=e;return{snippet:t,snippetBigrams:zg(t),snippetBigramTotal:Math.max(0,t.length-1),snippetWordPairs:i,snippetWordPairTotal:r,prefix:Yg(e.textPrefix,128),suffix:Yg(e.textSuffix,128),neighbor:Yg(e.neighborText,128),fingerprint:(e.fingerprint??"").slice(0,64),tag:"string"==typeof e.elementTag?e.elementTag:""}}(e),{pool:r,treeRoots:s}=function(e){let t=new Map,i=(i,r,s)=>{!i||t.has(i)||s&&i.tagName!==e.elementTag||t.set(i,r)},r="string"==typeof e.cssSelector?e.cssSelector.split(Ff):[],s=r[r.length-1]??e.cssSelector,n=r.length>1?function(e){let t=[],i=[document];for(let r of e){let e;try{e=Gg(i,r)}catch{return[]}let s=[];for(let t of e)t.shadowRoot&&s.push(t.shadowRoot);if(0===s.length)return[];t.push(s),i=s}return t}(r.slice(0,-1)):null,o=n?n[n.length-1]??[]:[document],a=n?[document,...n.flat()]:o;if(e.anchorKey){let t=e.anchorKey.replace(/\\/g,"\\\\").replace(/"/g,'\\"');try{for(let e of Gg(a,`[${Of}="${t}"]`))i(e,"anchorKey",!1)}catch{}}if(e.elementId){let t=e.elementId.replace(/\\/g,"\\\\").replace(/"/g,'\\"');try{for(let e of Gg(o,`[id="${t}"]`))i(e,"id",!0)}catch{for(let t of o)i(t.getElementById(e.elementId),"id",!0)}}try{for(let e of Gg(o,s))i(e,"css",!0)}catch{}if(n)return{pool:t,treeRoots:o};try{let t=document.evaluate(e.xpath,document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),r=Math.min(t.snapshotLength,16);for(let e=0;e<r;e++){let r=t.snapshotItem(e);r instanceof Element&&i(r,"xpath",!0)}}catch{}return{pool:t,treeRoots:o}}(e),n=[];for(let[e,t]of r){let r=Kg(e,t,i);r&&n.push(r)}let o=0,a=!1;for(let e of n)e.final>o&&(o=e.final),("id"===e.strategy||"anchorKey"===e.strategy)&&1===e.visibility&&(e.signals?.text??0)>=.8&&(void 0===e.signals?.fingerprint||e.signals.fingerprint>=.8)&&(a=!0);let l=!!(i.snippet||i.fingerprint||i.prefix||i.suffix||i.neighbor),d=t?.scanBudget;if(l&&s.length>0&&o<jg.scan&&!a)if(d&&d.remaining<=0)d.starved=!0;else{d&&d.remaining--;for(let e of function(e,t,i){let r=e.tag.toLowerCase();if(!r)return[];let s=[];try{for(let e of i){let t=e.querySelectorAll(r);for(let e=0;e<t.length&&s.length<1e4;e++){let i=t[e];i&&s.push(i)}if(1e4===s.length)break}}catch{return[]}let n=e.fingerprint.split(":"),o=3===n.length?Number(n[0]):Number.NaN,a=3===n.length?n[2]??"":"",l=[];for(let i of s){if(t.has(i))continue;let r=0;if(e.snippetBigramTotal>0){let t=Og(Pf(i,Ug)),s=_g(e.snippetBigrams,e.snippetBigramTotal,t);e.snippetWordPairTotal>0?r+=.6*(.5*s+.5*(s>0?Wg(e.snippetWordPairs,e.snippetWordPairTotal,t):0)):r+=.6*s}if(a&&Cf(i)===a&&(r+=.25),!Number.isNaN(o)){let e=Math.abs(i.children.length-o);0===e?r+=.15:e<=2&&(r+=.07)}l.push({element:i,cheap:r})}return l.sort((e,t)=>t.cheap-e.cheap),l.slice(0,24).map(e=>e.element)}(i,r,s)){let t=Kg(e,"scan",i);t&&n.push(t)}}let c=n.filter(Xg);if(0===c.length)return null;c.sort((e,t)=>t.final-e.final);let p=function(e){let t=e[0],i=e.filter(e=>t.final-e.final<=.05&&(e===t||t.element.contains(e.element))),r=t;for(let e of i)e!==r&&r.element.contains(e.element)&&(r=e);return r}(c);return{element:p.element,confidence:Jg(p),strategy:p.strategy}}function Gg(e,t){let i=[];for(let r of e){let e=r.querySelectorAll(t);for(let t=0;t<e.length&&i.length<16;t++){let r=e[t];r&&i.push(r)}if(16===i.length)break}return i}function Kg(e,t,i){let r=function(e,t){let i=0,r=0,s={blend:0,strongest:0};if(t.snippet){r+=40;let n=Pf(e,Ug,!0);if(s.text=$g(Dg(n),t.snippet,.5),s.text<1){let i=Pf(e,Ug);i!==n&&(s.text=Math.max(s.text,$g(Dg(i),t.snippet,.5)))}i+=40*s.text}if(t.fingerprint&&(r+=20,s.fingerprint=function(e,t){let i=t.split(":");if(3!==i.length)return 0;let[r,s,n]=i,o=Number(r),a=Number(s);if(Number.isNaN(o)||Number.isNaN(a))return 0;let l=kf(e),[d,c,p]=l.split(":"),h=0,u=Math.abs(Number(d)-o);0===u?h+=.2:u<=2?h+=.1:u<=5&&(h+=.03);let f=Math.abs(Number(c)-a);return 0===f?h+=.4:1===f?h+=.2:f<=3&&(h+=.08),p===n&&(h+=.4),h}(e,t.fingerprint),i+=20*s.fingerprint),t.prefix||t.suffix){r+=20;let n=0,o=0;if(t.prefix){let i=Dg(Rf(e,"before"));n+=i?Fg(i,t.prefix):0,o++}if(t.suffix){let i=Dg(Rf(e,"after"));n+=i?Fg(i,t.suffix):0,o++}o>0&&(s.context=n/o,i+=20*s.context)}if(t.neighbor){r+=20;let n=Dg(Lf(e));s.neighbor=n?Fg(n,t.neighbor):0,i+=20*s.neighbor}return 0===r?null:(s.blend=i/r,s.strongest=Math.max(s.text??0,s.fingerprint??0,s.context??0,s.neighbor??0),s)}(e,i),s=function(e){switch(e){case"hidden":return.3;case"soft-hidden":return.6;default:return 1}}(Vg(e));return null===r?"scan"===t?null:{element:e,strategy:t,verification:.6,strongest:.6,visibility:s,final:.6*jg[t]*s,unverified:!0}:{element:e,strategy:t,verification:r.blend,strongest:r.strongest,signals:r,visibility:s,final:jg[t]*r.blend*s}}function Xg(e){if("scan"===e.strategy)return e.verification>=.4;if(e.unverified||!e.signals)return!0;let t=e.signals;return void 0===t.text||t.text>=.5||(t.fingerprint??0)>=.6||(t.context??0)>=.6||(t.neighbor??0)>=.6}function Jg(e){return"scan"===e.strategy?Math.min(e.verification,jg.scan):e.unverified?jg[e.strategy]:jg[e.strategy]*Math.min(1,e.strongest/.8)}function Qg(e,t,i){let r=qg(e,i);if(!r)return null;let s=r.element.getBoundingClientRect(),n=new DOMRect(s.x+t.xPct*s.width,s.y+t.yPct*s.height,t.wPct*s.width,t.hPct*s.height);return{element:r.element,rect:n,confidence:r.confidence,strategy:r.strategy}}function Zg(e){return{cssSelector:e.cssSelector,xpath:e.xpath,textSnippet:e.textSnippet,elementTag:e.elementTag,elementId:e.elementId??void 0,textPrefix:e.textPrefix,textSuffix:e.textSuffix,fingerprint:e.fingerprint,neighborText:e.neighborText,anchorKey:e.anchorKey??null}}function em(e){return{xPct:e.xPct,yPct:e.yPct,wPct:e.wPct,hPct:e.hPct}}G(),Pe(),su(),qe(),Ze();var tm={bg:"rgba(241,245,249,0.9)",ring:"#cbd5e1",color:"#94a3b8",shadow:"0 2px 8px rgba(0,0,0,0.06)",hoverShadow:"0 4px 16px rgba(0,0,0,0.1)"};function im(e){return{top:e.top+window.scrollY-13,left:e.right+window.scrollX-13}}function rm(e,t){let i=e.entries[t],r=e.elementIndices[t];if(i&&void 0!==r)return i.elements[r]}function sm(e){let t=e.elementIndices[0];return void 0===t?void 0:e.entries[0]?.positions[t]}var nm=e=>"none"!==e.style.display;function om(e,t,i){!Je()&&"function"==typeof e.animate&&e.animate(t,i)}var am=class{constructor(e,t,i,r,s=null){this.colors=e,this.tooltip=t,this.bus=i,this.t=r,this.liveRegion=s,this.container=z("div",{style:"position:absolute;top:0;left:0;pointer-events:none;z-index:2147483646;"}),this.container.id="siteping-markers",X(this.container),document.body.appendChild(this.container),this.bus.on("annotations:toggle",e=>{this.container.style.display=e?"block":"none"}),this.resizeHandler=()=>this.scheduleReposition("resize"),window.addEventListener("resize",this.resizeHandler,{passive:!0}),this.scrollHandler=()=>this.scheduleReposition("scroll"),window.addEventListener("scroll",this.scrollHandler,{passive:!0,capture:!0}),this.mutationObserver=new MutationObserver(e=>{let t=!1;for(let i of e)if(!this.container.contains(i.target)&&!this.tooltip.contains(i.target)){t=!0;break}t&&this.scheduleReposition("mutation")}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),this.onDocumentClickForClusters=e=>{this.container.contains(e.target)||this.collapseAllClusters()},document.addEventListener("click",this.onDocumentClickForClusters,!0)}colors;tooltip;bus;t;liveRegion;container;entries=[];highlightElements=[];pinnedFeedback=null;onDocumentClick=null;repositionTimer=null;mutationObserver=null;scrollHandler=null;resizeHandler=null;anchorCache=new Map;pendingLayoutChange=!1;pendingResize=!1;hiddenRecheckAt=new Map;clusters=[];onDocumentClickForClusters=null;lastOpenCount=-1;get count(){return this.entries.length}get openCount(){let e=0;for(let t of this.entries)x(t.feedback.status)||e++;return e}scheduleReposition(e="mutation"){"scroll"!==e&&(this.pendingLayoutChange=!0),"resize"===e&&(this.pendingResize=!0),!this.repositionTimer&&("requestIdleCallback"in window?this.repositionTimer=window.requestIdleCallback(()=>{this.repositionTimer=null,this.repositionAll()},{timeout:300}):this.repositionTimer=+setTimeout(()=>{this.repositionTimer=null,this.repositionAll()},200))}repositionAll(){let e=this.pendingLayoutChange,t=this.pendingResize;this.pendingLayoutChange=!1,this.pendingResize=!1,t&&this.hiddenRecheckAt.clear();let i=Date.now(),r={remaining:2,starved:!1},s=new Set,n=!1;for(let t of this.entries)for(let o=0;o<t.feedback.annotations.length;o++){let a=t.elements[o];if(!a)continue;let l=t.feedback.annotations[o];if(!l)continue;let d=`${t.feedback.id}:${o}`;s.add(d);let c,p=this.anchorCache.get(d),h=p?.ref.deref(),u=(this.hiddenRecheckAt.get(d)??0)>i,f=h?.isConnected&&(u||!(e&&"hidden"===Vg(h)));if(p&&h&&f){let e=h.getBoundingClientRect(),t=em(l);c={element:h,rect:new DOMRect(e.left+t.xPct*e.width,e.top+t.yPct*e.height,t.wPct*e.width,t.hPct*e.height),confidence:p.confidence,strategy:p.strategy}}else if(u)c=null;else if(r.starved=!1,c=Qg(Zg(l),em(l),{scanBudget:r}),!r.starved){if(c?.element){let{confidence:e,strategy:t}=c;this.anchorCache.set(d,{ref:new WeakRef(c.element),confidence:e,strategy:t})}c&&"hidden"!==Vg(c.element)?this.hiddenRecheckAt.delete(d):this.hiddenRecheckAt.set(d,i+3e3)}let g="none"!==a.style.display;c?(g||(n=!0),t.positions[o]=im(c.rect),a.style.display="flex",this.applyConfidenceStyle(a,c.confidence,t.feedback)):(g&&(n=!0),a.style.display="none")}for(let e of this.anchorCache.keys())s.has(e)||this.anchorCache.delete(e);for(let e of this.hiddenRecheckAt.keys())s.has(e)||this.hiddenRecheckAt.delete(e);n&&(this.buildClusters(),this.bus.emit("markers:placed")),this.applyClusterPositions(),this.pinnedFeedback&&this.showHighlight(this.pinnedFeedback)}applyClusterPositions(){for(let e of this.clusters)e.expanded?this.applyFanPositions(e):this.applyStackPositions(e)}emitMarkersChanged(){let e=this.openCount;e!==this.lastOpenCount&&(this.lastOpenCount=e,this.bus.emit("markers:changed",e))}render(e){this.clear(),e.forEach((e,t)=>{let i=this.buildEntry(e,t+1);this.entries.push(i)}),this.buildClusters();let t=this.entries.filter(e=>e.elements.some(nm)).length;this.liveRegion&&t>0&&(this.liveRegion.textContent=ru(this.t,"marker.count",{count:t})),this.emitMarkersChanged(),this.bus.emit("markers:placed")}addFeedback(e,t){let i=this.buildEntry(e,t);for(let e of i.elements)om(e,[{scale:0,opacity:0},{scale:1.2,opacity:1,offset:.6},{scale:1}],{duration:350,easing:"cubic-bezier(0.34,1.56,0.64,1)"});this.entries.push(i),this.buildClusters(),this.emitMarkersChanged(),this.bus.emit("markers:placed")}buildEntry(e,t){let i={feedback:e,elements:[],positions:[]};for(let r of e.annotations){let s=Qg(Zg(r),em(r)),n=s?im(s.rect):{top:0,left:0},o=this.createMarker(t,e,n);s?this.applyConfidenceStyle(o,s.confidence,e):o.style.display="none",this.container.appendChild(o),i.elements.push(o),i.positions.push(n)}return i}buildClusters(){for(let e of this.container.querySelectorAll(".sp-cluster-badge"))e.remove();let e=[];for(let t of this.entries)for(let i=0;i<t.elements.length;i++){let r=t.positions[i];!r||"none"===t.elements[i]?.style.display||e.push({entry:t,elIdx:i,pos:r})}let t=new Set;this.clusters=[];for(let i=0;i<e.length;i++){if(t.has(i))continue;let r=e[i];if(!r)continue;let s={entries:[r.entry],elementIndices:[r.elIdx],expanded:!1};t.add(i);for(let n=i+1;n<e.length;n++){if(t.has(n))continue;let i=r.pos,o=e[n];if(!o)continue;let a=o.pos;Math.sqrt((i.left-a.left)**2+(i.top-a.top)**2)<28&&(s.entries.push(o.entry),s.elementIndices.push(o.elIdx),t.add(n))}this.clusters.push(s)}for(let e of this.clusters)e.entries.length<=1||(this.applyStackPositions(e),this.addClusterBadge(e))}applyStackPositions(e){let t=sm(e);if(!t)return;let{top:i,left:r}=t,s=e.entries.length<=1;for(let t=0;t<e.entries.length;t++){let n=rm(e,t);n&&(n.style.top=`${i+(s?0:3*t)}px`,n.style.left=`${r+(s?0:3*t)}px`,n.style.zIndex=String(t+1))}}applyFanPositions(e){let t=sm(e);if(!t)return;let{top:i,left:r}=t,s=e.entries.length,n=r-32*(s-1)/2;for(let t=0;t<s;t++){let r=rm(e,t);r&&(r.style.top=`${i}px`,r.style.left=`${n+32*t}px`,r.style.zIndex=String(10+t))}}addClusterBadge(e){let t=rm(e,e.entries.length-1);if(!t)return;let i=z("div",{class:"sp-cluster-badge",style:`position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;padding:0 4px;border-radius:9999px;background:${this.colors.accent};color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;border:1.5px solid #fff;pointer-events:none;font-family:"Inter",system-ui,-apple-system,sans-serif;line-height:1;`});_(i,String(e.entries.length)),t.appendChild(i)}setBadgesVisible(e,t){for(let i=0;i<e.entries.length;i++){let r=rm(e,i)?.querySelector(".sp-cluster-badge");r&&(r.style.display=t?"flex":"none")}}findCluster(e){for(let t of this.clusters)if(!(t.entries.length<=1))for(let i=0;i<t.entries.length;i++)if(rm(t,i)===e)return t;return null}handleClusterClick(e,t){let i=this.findCluster(e);return!!i&&!i.expanded&&(t.stopPropagation(),this.collapseAllClusters(),i.expanded=!0,this.applyFanPositions(i),this.setBadgesVisible(i,!1),!0)}collapseCluster(e){e.expanded&&(e.expanded=!1,this.applyStackPositions(e),this.setBadgesVisible(e,!0))}collapseAllClusters(){for(let e of this.clusters)this.collapseCluster(e)}applyConfidenceStyle(e,t,i){let r=x(i.status);t<.7&&!r?(e.style.borderStyle="dashed",e.style.opacity="0.7",e.title=ru(this.t,"marker.approximate",{confidence:Math.round(100*t)})):(e.style.borderStyle="solid",e.style.opacity="1",e.title="")}createMarker(e,t,i){let{status:r}=t,s=function(e,t){return x(e)?tm:{bg:"rgba(255,255,255,0.92)",ring:"in_progress"===e?`${t} ${t} ${t}40 ${t}40`:t,color:t,shadow:`0 2px 12px ${t}25, 0 2px 6px rgba(0,0,0,0.06)`,hoverShadow:`0 4px 20px ${t}35, 0 4px 12px rgba(0,0,0,0.08)`}}(r,$e(t.type,this.colors)),n=z("div",{style:`position:absolute;top:${i.top}px;left:${i.left}px;width:26px;height:26px;border-radius:50%;background:${s.bg};border:2px solid;border-color:${s.ring};display:flex;align-items:center;justify-content:center;font-family:"Inter",system-ui,-apple-system,sans-serif;font-size:11px;font-weight:700;color:${s.color};cursor:pointer;pointer-events:auto;box-shadow:${s.shadow};transition:top 0.25s cubic-bezier(0.34,1.56,0.64,1),left 0.25s cubic-bezier(0.34,1.56,0.64,1),transform 0.15s ease,box-shadow 0.15s ease;user-select:none;-webkit-font-smoothing:antialiased;`});n.dataset.feedbackId=t.id,n.setAttribute("tabindex","0"),n.setAttribute("role","button");let o=t.message.length>60?`${t.message.slice(0,60)}...`:t.message,a=ru(this.t,"marker.aria",{number:e,type:eu(t.type,this.t),status:tu(r,this.t),message:o});n.setAttribute("aria-label",a),n.setAttribute("aria-describedby",this.tooltip.tooltipId),"wont_fix"===r?n.appendChild(z("span",{style:"width:2px;height:16px;border-radius:1px;background:currentColor;transform:rotate(45deg);"})):_(n,"resolved"===r?"\u2713":String(e)),Xe()&&n.appendChild(z("span",{style:"position:absolute;inset:-9px;border-radius:50%;"})),n.addEventListener("mouseenter",()=>{n.style.transform="scale(1.2)",n.style.boxShadow=s.hoverShadow,this.tooltip.show(t,n.getBoundingClientRect()),this.pinnedFeedback||this.showHighlight(t)}),n.addEventListener("mouseleave",()=>{n.style.transform="scale(1)",n.style.boxShadow=s.shadow,this.tooltip.scheduleHide(),this.pinnedFeedback||this.clearHighlight()}),n.addEventListener("focus",()=>{this.tooltip.show(t,n.getBoundingClientRect()),this.pinnedFeedback||this.showHighlight(t)}),n.addEventListener("blur",()=>{this.tooltip.scheduleHide(),this.pinnedFeedback||this.clearHighlight()});let l=e=>{e instanceof MouseEvent&&this.handleClusterClick(n,e)||(Ke()&&this.tooltip.hide(),this.pinHighlight(t),this.bus.emit("panel:toggle",!0),n.dispatchEvent(new CustomEvent("sp-marker-click",{detail:{feedbackId:t.id},bubbles:!0})))};return n.addEventListener("click",e=>l(e)),n.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l(e))}),n}focusFeedback(e){let t=this.entries.find(t=>t.feedback.id===e),i=t?.elements.find(nm);return!(!t||!i||(i.scrollIntoView({behavior:"smooth",block:"center"}),this.pinHighlight(t.feedback),this.highlight(e),0))}revealPin(e){return"none"!==this.container.style.display&&this.focusFeedback(e)}isLost(e){let t=this.entries.filter(t=>t.feedback.id===e);return t.length>0&&t.every(e=>e.elements.every(e=>"none"===e.style.display))}highlight(e){for(let t of this.entries)if(t.feedback.id===e)for(let e of t.elements)om(e,[{boxShadow:`0 0 0 0 ${this.colors.accentGlow}`},{boxShadow:"0 0 0 8px transparent",offset:.7},{boxShadow:"0 0 0 0 transparent"}],{duration:700,easing:"ease-out"})}showHighlight(e){this.removeHighlightElements();for(let t of e.annotations){let i=Qg(Zg(t),em(t));if(!i)continue;let r=$e(e.type,this.colors),s=i.rect,n=z("div",{style:`position:absolute;top:${s.top+window.scrollY}px;left:${s.left+window.scrollX}px;width:${s.width}px;height:${s.height}px;border:2px solid ${r};background:${r}0c;border-radius:8px;pointer-events:none;z-index:-1;opacity:0;box-shadow:0 0 16px ${r}20;transition:opacity 300ms ease;`});this.container.appendChild(n),this.highlightElements.push(n),n.offsetHeight,n.style.opacity="1"}}pinHighlight(e){this.unpinHighlight(),this.showHighlight(e),this.pinnedFeedback=e,this.onDocumentClick=e=>{this.container.contains(e.target)||this.unpinHighlight()},document.addEventListener("click",this.onDocumentClick,{capture:!0})}unpinHighlight(){this.onDocumentClick&&(document.removeEventListener("click",this.onDocumentClick,{capture:!0}),this.onDocumentClick=null),this.pinnedFeedback=null,this.clearHighlight()}clearHighlight(){for(let e of this.highlightElements)e.style.opacity="0",setTimeout(()=>e.remove(),300);this.highlightElements=[]}removeHighlightElements(){for(let e of this.highlightElements)e.remove();this.highlightElements=[]}clear(){this.unpinHighlight(),this.container.replaceChildren(),this.entries=[],this.clusters=[],this.anchorCache.clear()}destroy(){this.unpinHighlight(),this.repositionTimer&&("cancelIdleCallback"in window&&window.cancelIdleCallback(this.repositionTimer),clearTimeout(this.repositionTimer)),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.scrollHandler&&window.removeEventListener("scroll",this.scrollHandler,{capture:!0}),this.onDocumentClickForClusters&&document.removeEventListener("click",this.onDocumentClickForClusters,!0),this.mutationObserver?.disconnect(),this.container.remove()}};O();var lm=class{constructor(e,t){this.store=e,this.projectName=t}store;projectName;async sendFeedback(e){return cm(await dm(this.write(e),"Failed to send feedback"))}async write(e){try{return await this.store.createFeedback({projectName:e.projectName,type:e.type,message:e.message,status:"open",url:e.url,urlPattern:e.urlPattern??null,viewport:e.viewport,userAgent:e.userAgent,authorName:e.authorName,authorEmail:e.authorEmail,clientId:e.clientId,annotations:e.annotations.map(w),screenshotDataUrl:e.screenshotDataUrl??null,screenshotRegion:e.screenshotRegion??null,diagnostics:e.diagnostics??null})}catch(i){if(!((t=i)instanceof M||v(t,"STORE_DUPLICATE")||v(t,"P2002")))throw i;let r=await this.store.findByClientId(e.clientId);if(!r||r.projectName!==e.projectName)throw i;return r}var t}async getFeedbacks(e,t){let{feedbacks:i,total:r}=await this.store.getFeedbacks({projectName:e,page:t?.page,limit:t?.limit,type:t?.type,status:t?.status,statuses:t?.statuses,search:t?.search,url:t?.url,urlPattern:t?.urlPattern});return{feedbacks:i.map(cm),total:r,capabilities:{comments:!!this.store.addComment}}}async resolveFeedback(e,t){let i=await this.store.updateFeedback(e,function(e,t=new Date){return x(e)?{status:e,resolvedAt:t}:{status:e,resolvedAt:null}}(t?"resolved":"open"));return cm(i)}async deleteFeedback(e){await this.store.deleteFeedback(e)}async deleteAllFeedbacks(e){await this.store.deleteAllFeedbacks(e)}async addComment(e,t){let i="Failed to post comment";if(!this.store.addComment)throw new d(`${i}: this store keeps no comments`,"SERVER",!1);return pm(await dm(this.store.addComment(e,t),i))}};function dm(e,t){return sg(e,3e4,()=>new d(`${t}: the store did not answer within 30 s`,"TIMEOUT",!0))}function cm(e){return{id:e.id,projectName:e.projectName,type:e.type,message:e.message,status:e.status,url:e.url,urlPattern:e.urlPattern??null,viewport:e.viewport,userAgent:e.userAgent,authorName:e.authorName,authorEmail:e.authorEmail,resolvedAt:e.resolvedAt?.toISOString()??null,createdAt:e.createdAt.toISOString(),updatedAt:e.updatedAt.toISOString(),annotations:e.annotations.map(hm),comments:e.comments?.map(pm),screenshotUrl:e.screenshotUrl??null,screenshotRegion:e.screenshotRegion??null,diagnostics:e.diagnostics??null}}function pm({clientId:e,createdAt:t,...i}){return{...i,createdAt:t.toISOString()}}function hm(e){return{id:e.id,feedbackId:e.feedbackId,cssSelector:e.cssSelector,xpath:e.xpath,textSnippet:e.textSnippet,elementTag:e.elementTag,elementId:e.elementId,textPrefix:e.textPrefix,textSuffix:e.textSuffix,fingerprint:e.fingerprint,neighborText:e.neighborText,anchorKey:e.anchorKey??null,xPct:e.xPct,yPct:e.yPct,wPct:e.wPct,hPct:e.hPct,scrollX:e.scrollX,scrollY:e.scrollY,viewportW:e.viewportW,viewportH:e.viewportH,devicePixelRatio:e.devicePixelRatio,createdAt:e.createdAt.toISOString()}}pu(),hu(),Ru(),_u(),Wu(),Yu();var um="cubic-bezier(0.16, 1, 0.3, 1)",fm="cubic-bezier(0.34, 1.56, 0.64, 1)",gm=`@keyframes sp-fab-in{from{transform:scale(0) rotate(-180deg);opacity:0;}to{transform:scale(1) rotate(0deg);opacity:1;}}@keyframes sp-fab-glow{0%,100%{box-shadow:0 4px 20px var(--sp-accent-glow),0 2px 8px rgba(0,0,0,0.08);}50%{box-shadow:0 4px 28px var(--sp-accent-glow),0 2px 12px rgba(0,0,0,0.1);}}@keyframes sp-flash-bg{0%{background-color:var(--sp-accent-light);}100%{background-color:transparent;}}@keyframes sp-slide-up{from{transform:translateY(8px);opacity:0;}to{transform:translateY(0);opacity:1;}}@keyframes sp-fade-in{from{opacity:0;}to{opacity:1;}}@keyframes sp-shimmer{0%{background-position:-200% 0;}100%{background-position:200% 0;}}.sp-anim-fab-in{animation:sp-fab-in 0.5s linear(0, 0.006, 0.025, 0.06, 0.11, 0.17, 0.25, 0.34, 0.45, 0.56, 0.67, 0.78, 0.88, 0.95, 1.01, 1.04, 1.05, 1.04, 1.02, 1, 0.99, 1) both;}.sp-anim-flash{animation:sp-flash-bg 0.5s cubic-bezier(0.25, 1, 0.5, 1);}.sp-anim-slide-up{animation:sp-slide-up 0.3s ${um} both;}.sp-anim-fade-in{animation:sp-fade-in 0.2s ease-out both;}.sp-panel{transform:translateX(110%);transition:transform 0.4s ${um};}.sp-panel.sp-panel--open{transform:translateX(0);}.sp-radial-item{opacity:0;pointer-events:none;transform:translate(0,0) scale(0.8);transition:transform 0.35s ${fm},opacity 0.2s ease,background 0.2s ease,border-color 0.2s ease,box-shadow 0.2s ease;}.sp-radial-item.sp-radial-item--open{opacity:1;pointer-events:auto;}.sp-radial-item{transition-delay:calc(var(--sp-i, 0) * 50ms);}@keyframes sp-card-in{from{transform:translateY(12px);opacity:0;}to{transform:translateY(0);opacity:1;}}.sp-card{animation:sp-card-in 0.35s ${um} both;animation-delay:calc(var(--sp-card-i, 0) * 40ms);}@keyframes sp-spin{to{transform:rotate(360deg);}}.sp-spinner{width:20px;height:20px;border:2px solid var(--sp-border);border-top-color:var(--sp-accent);border-radius:50%;animation:sp-spin 0.6s linear infinite;}@keyframes sp-badge-in{0%{transform:scale(0);}60%{transform:scale(1.3);}100%{transform:scale(1);}}.sp-fab-badge{animation:sp-badge-in 0.4s ${fm} both;}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;animation-delay:0s !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;}}`;F();var mm=`:host{-webkit-tap-highlight-color:transparent;}.sp-list,.sp-detail-content{overscroll-behavior:contain;}.sp-scrim{display:none;}@media (hover: none){.sp-fab:hover:not(:active),.sp-card:hover:not(:active),.sp-btn-primary:hover:not(:active),.sp-btn-danger:hover:not(:active){transform:none;}.sp-card:hover:not(:active){box-shadow:var(--sp-shadow-xs);}.sp-radial-item--open .sp-radial-label{opacity:1;transform:translate(0,-50%);}.sp-bulk-checkbox{opacity:1;}.sp-bulk-checkbox::after{content:"";position:absolute;inset:-12px;}.sp-bulk-select-all{display:none;}.sp-list--has-selection .sp-bulk-select-all{display:flex;}.sp-shortcuts-hint{display:none;}}@media (pointer: coarse){.sp-radial-item{width:48px;height:48px;left:2px;bottom:2px;}.sp-radial-item svg{width:20px;height:20px;}.sp-radial-label{font-size:13px;font-weight:600;padding:8px 12px;}.sp-search,.sp-input{font-size:16px;}.sp-filter-dropdown-btn{height:36px;}.sp-segmented__btn{height:32px;}.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle{min-height:36px;}.sp-btn-resolve,.sp-btn-delete{min-height:40px;}.sp-detail-back{width:44px;height:44px;}.sp-detail-actions button,.sp-detail-actions a{height:44px;}}@media ${N}{.sp-fab--bottom-right,.sp-radial--bottom-right{right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));}.sp-fab--bottom-left,.sp-radial--bottom-left{left:calc(16px + env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));}.sp-scrim{display:block;position:fixed;inset:0;background:var(--sp-scrim);opacity:0;pointer-events:none;touch-action:none;transition:opacity 0.3s ease;}.sp-scrim--open{opacity:1;pointer-events:auto;}.sp-panel{top:auto;left:0;right:0;bottom:0;width:auto;max-width:none;height:calc(100vh - 48px);height:calc(100dvh - 40px - env(safe-area-inset-top,0px));border-left:none;border-top:1px solid var(--sp-glass-border);border-radius:var(--sp-radius-xl) var(--sp-radius-xl) 0 0;background:var(--sp-bg);-webkit-backdrop-filter:none;backdrop-filter:none;transform:translateY(105%);}.sp-panel.sp-panel--open{transform:translateY(0);}.sp-panel-header,.sp-detail-header{position:relative;padding-top:22px;background:var(--sp-bg);-webkit-backdrop-filter:none;backdrop-filter:none;touch-action:none;}.sp-panel-header{padding:22px 12px 12px 20px;}.sp-panel-header::before,.sp-detail-header::before{content:"";position:absolute;top:8px;left:50%;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:var(--sp-border);}.sp-export-btn,.sp-btn-delete-all{width:40px;height:40px;padding:0;justify-content:center;border-radius:var(--sp-radius);}.sp-export-btn svg,.sp-btn-delete-all svg{width:17px;height:17px;}.sp-export-btn span,.sp-btn-delete-all span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}.sp-stats-bar{padding:10px 20px;}.sp-filters{padding:12px 16px 10px;background:var(--sp-bg);-webkit-backdrop-filter:none;backdrop-filter:none;}.sp-stats-bar,.sp-filters{touch-action:pan-x;}.sp-search{height:44px;}.sp-filter-bar{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 8px;padding:0 16px 2px;scrollbar-width:none;}.sp-filter-bar::-webkit-scrollbar{display:none;}.sp-filter-dropdown{flex:0 0 auto;}.sp-filter-dropdown-btn{width:auto;}.sp-filter-dropdown-menu,.sp-sort-menu{position:fixed;top:auto;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));min-width:0;padding:6px;border-radius:var(--sp-radius-lg);background:var(--sp-bg);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:var(--sp-shadow-xl);z-index:30;}.sp-filter-dropdown-option,.sp-sort-option{min-height:44px;font-size:14px;}.sp-list{padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));}.sp-bulk-bar{bottom:calc(16px + env(safe-area-inset-bottom,0px));}.sp-detail{background:var(--sp-bg);-webkit-backdrop-filter:none;backdrop-filter:none;}.sp-detail-section{padding:18px 20px;}.sp-detail-content{padding-bottom:env(safe-area-inset-bottom,0px);}.sp-identity-backdrop{align-items:flex-end;}.sp-identity-modal{width:100%;max-width:none;margin-bottom:var(--sp-kb, 0px);padding:24px 20px calc(20px + env(safe-area-inset-bottom,0px));border-radius:var(--sp-radius-xl) var(--sp-radius-xl) 0 0;background:var(--sp-bg);transform:translateY(100%);}.sp-identity-actions button{flex:1;height:48px;}.sp-identity-actions .sp-btn-primary{flex:2;}}`;function bm(e){return`:host{all:initial;position:fixed;z-index:2147483647;font-family:var(--sp-font);font-size:14px;line-height:1.5;color:var(--sp-text);color-scheme:${"#ffffff"===e.bg?"light":"dark"};-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;${function(e){return`--sp-accent: ${e.accent};--sp-accent-light: ${e.accentLight};--sp-accent-dark: ${e.accentDark};--sp-accent-glow: ${e.accentGlow};--sp-accent-gradient: ${e.accentGradient};--sp-accent-text: ${e.accentText};--sp-bg: ${e.bg};--sp-bg-hover: ${e.bgHover};--sp-text: ${e.text};--sp-text-secondary: ${e.textSecondary};--sp-text-tertiary: ${e.textTertiary};--sp-border: ${e.border};--sp-shadow: ${e.shadow};--sp-glass-bg: ${e.glassBg};--sp-glass-bg-heavy: ${e.glassBgHeavy};--sp-glass-border: ${e.glassBorder};--sp-glass-border-subtle: ${e.glassBorderSubtle};--sp-type-question: ${e.typeQuestion};--sp-type-change: ${e.typeChange};--sp-type-bug: ${e.typeBug};--sp-type-other: ${e.typeOther};--sp-type-question-bg: ${e.typeQuestionBg};--sp-type-change-bg: ${e.typeChangeBg};--sp-type-bug-bg: ${e.typeBugBg};--sp-type-other-bg: ${e.typeOtherBg};--sp-status-open: ${e.statusOpen};--sp-status-open-bg: ${e.statusOpenBg};--sp-status-resolved: ${e.statusResolved};--sp-status-resolved-bg: ${e.statusResolvedBg};--sp-radius: 12px;--sp-radius-lg: 16px;--sp-radius-xl: 20px;--sp-radius-full: 9999px;--sp-blur: 20px;--sp-blur-heavy: 32px;--sp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);--sp-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);--sp-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);--sp-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);--sp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);--sp-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;`}(e)} --sp-identity-bg: ${e.glassBgHeavy};--sp-identity-overlay: ${"#ffffff"===e.bg?"rgba(15, 23, 42, 0.2)":"rgba(0, 0, 0, 0.4)"};--sp-scrim: ${"#ffffff"===e.bg?"rgba(15, 23, 42, 0.32)":"rgba(0, 0, 0, 0.5)"};}*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}:focus-visible{outline:2px solid var(--sp-accent);outline-offset:2px;box-shadow:0 0 0 4px var(--sp-bg);}.sp-fab{position:fixed;width:52px;height:52px;border-radius:var(--sp-radius-full);background:var(--sp-accent-gradient);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px var(--sp-accent-glow),0 2px 8px rgba(0,0,0,0.08);transition:transform 0.25s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.3s ease;outline:none;}.sp-fab:focus-visible{outline:2px solid #fff;outline-offset:3px;}.sp-fab:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 8px 28px var(--sp-accent-glow),0 4px 12px rgba(0,0,0,0.1);}.sp-fab:active{transform:translateY(0) scale(0.95);transition-duration:0.1s;}.sp-fab--bottom-right{bottom:24px;right:24px;}.sp-fab--bottom-left{bottom:24px;left:24px;}.sp-fab svg{width:22px;height:22px;fill:currentColor;transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1);}.sp-fab-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:var(--sp-radius-full);background:#ef4444;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #fff;pointer-events:none;font-family:var(--sp-font);line-height:1;}.sp-toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);max-width:min(360px,calc(100vw - 32px));padding:10px 14px;border-radius:var(--sp-radius-lg);background:var(--sp-text);color:var(--sp-bg);font:500 13px/1.4 var(--sp-font);box-shadow:var(--sp-shadow-lg);cursor:pointer;animation:sp-toast-in 0.2s ease-out;}.sp-toast[hidden]{display:none;}.sp-toast--error{border-left:4px solid var(--sp-type-bug);}@keyframes sp-toast-in{from{opacity:0;transform:translate(-50%,8px);}}@media (prefers-reduced-motion: reduce){.sp-toast{animation:none;}}.sp-radial{position:fixed;pointer-events:none;width:52px;height:52px;}.sp-radial--bottom-right{bottom:24px;right:24px;}.sp-radial--bottom-left{bottom:24px;left:24px;}.sp-radial-item{position:absolute;left:4px;bottom:4px;width:44px;height:44px;border-radius:var(--sp-radius-full);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));color:var(--sp-text);border:1px solid var(--sp-glass-border);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--sp-shadow-md);font-size:12px;font-weight:600;}.sp-radial-item:hover,.sp-radial-item:focus-visible{background:rgba(255,255,255,0.95);border-color:var(--sp-accent);color:var(--sp-accent-text);box-shadow:var(--sp-shadow-md),0 0 0 3px var(--sp-accent-light);outline:none;}.sp-radial-item svg{width:18px;height:18px;flex-shrink:0;stroke:currentColor;fill:none;}.sp-radial-label{position:absolute;top:50%;white-space:nowrap;font-size:12px;font-weight:500;color:var(--sp-text);pointer-events:none;opacity:0;padding:4px 12px;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-sm);transform:translate(4px,-50%);transition:opacity 0.2s ease,transform 0.2s ease;}.sp-radial--bottom-right .sp-radial-label{right:calc(100% + 12px);}.sp-radial--bottom-left .sp-radial-label{left:calc(100% + 12px);transform:translate(-4px,-50%);}.sp-radial-item:hover .sp-radial-label,.sp-radial-item:focus-visible .sp-radial-label{opacity:1;transform:translate(0,-50%);}.sp-panel{position:fixed;top:0;right:0;width:400px;max-width:100vw;height:100vh;height:100dvh;background:var(--sp-glass-bg);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border-left:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-xl);display:flex;flex-direction:column;overflow:hidden;}.sp-panel-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));position:relative;z-index:2;}.sp-panel-title{font-size:17px;font-weight:700;color:var(--sp-text);letter-spacing:-0.02em;}.sp-panel-close{width:44px;height:44px;border-radius:var(--sp-radius);border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--sp-text-tertiary);transition:all 0.2s ease;}.sp-panel-close:hover{background:var(--sp-bg-hover);color:var(--sp-text);}.sp-panel-close svg{width:16px;height:16px;}.sp-filters{padding:16px 24px;border-bottom:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));position:sticky;top:0;z-index:1;}.sp-search-wrap{position:relative;margin-bottom:12px;}.sp-search{width:100%;height:40px;padding:0 12px 0 38px;border-radius:var(--sp-radius);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text);font-family:var(--sp-font);font-size:13px;outline:none;transition:all 0.2s ease;}.sp-search::placeholder{color:var(--sp-text-tertiary);}.sp-search:focus{border-color:var(--sp-accent);box-shadow:0 0 0 3px var(--sp-accent-light);background:var(--sp-bg);}.sp-search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--sp-text-tertiary);width:16px;height:16px;transition:color 0.2s ease;}.sp-search:focus ~ .sp-search-icon,.sp-search-wrap:focus-within .sp-search-icon{color:var(--sp-accent-text);}.sp-filter-bar{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap;}.sp-filter-dropdown{position:relative;flex:1 1 auto;min-width:0;}.sp-filter-dropdown-btn{--sp-chip-color: var(--sp-text-secondary);--sp-chip-bg: var(--sp-glass-bg-heavy);display:inline-flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 8px 0 10px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap;transition:background 0.18s ease,border-color 0.18s ease,box-shadow 0.18s ease;}.sp-filter-dropdown-btn:hover{border-color:var(--sp-chip-color);background:var(--sp-chip-bg);}.sp-filter-dropdown-btn[aria-expanded="true"]{border-color:var(--sp-chip-color);background:var(--sp-chip-bg);box-shadow:0 0 0 3px color-mix(in srgb,var(--sp-chip-color) 14%,transparent);}.sp-filter-dropdown-btn--filtered{border-color:var(--sp-chip-color);background:var(--sp-chip-bg);}.sp-filter-dropdown-btn__icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;color:var(--sp-chip-color);}.sp-filter-dropdown-btn__icon svg{width:14px;height:14px;}.sp-filter-dropdown-btn__label{display:inline-flex;align-items:baseline;gap:6px;flex:1;min-width:0;overflow:hidden;}.sp-filter-dropdown-btn__prefix{color:var(--sp-text-tertiary);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:0.06em;}.sp-filter-dropdown-btn__value{color:var(--sp-chip-color);font-weight:600;overflow:hidden;text-overflow:ellipsis;}.sp-filter-dropdown-btn__chevron{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--sp-text-tertiary);transition:transform 0.18s ease,color 0.18s ease;}.sp-filter-dropdown-btn__chevron svg{width:12px;height:12px;}.sp-filter-dropdown-btn[aria-expanded="true"] .sp-filter-dropdown-btn__chevron{transform:rotate(180deg);color:var(--sp-chip-color);}.sp-filter-dropdown-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;min-width:180px;padding:4px;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-md);z-index:10;animation:sp-filter-menu-in 0.15s ease-out both;}@keyframes sp-filter-menu-in{from{opacity:0;transform:translateY(-4px) scale(0.98);}to{opacity:1;transform:translateY(0) scale(1);}}.sp-filter-dropdown-option{--sp-chip-color: var(--sp-text-secondary);--sp-chip-bg: transparent;display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:none;border-radius:8px;background:transparent;color:var(--sp-text);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;text-align:left;transition:background 0.12s ease,color 0.12s ease;}.sp-filter-dropdown-option__icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;background:var(--sp-chip-bg);color:var(--sp-chip-color);}.sp-filter-dropdown-option__icon svg{width:13px;height:13px;}.sp-filter-dropdown-option__label{flex:1;min-width:0;}.sp-filter-dropdown-option__check{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--sp-chip-color);}.sp-filter-dropdown-option__check svg{width:13px;height:13px;}.sp-filter-dropdown-option:hover{background:var(--sp-bg-hover);}.sp-filter-dropdown-option--active{color:var(--sp-chip-color);font-weight:600;}.sp-filter-dropdown-option--active:hover{background:var(--sp-chip-bg);}.sp-segmented{display:inline-flex;align-items:stretch;padding:2px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);flex-shrink:0;}.sp-segmented__btn{--sp-chip-color: var(--sp-text-tertiary);--sp-chip-bg: transparent;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border:none;border-radius:var(--sp-radius-full);background:transparent;color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap;transition:background 0.18s ease,color 0.18s ease,box-shadow 0.18s ease;}.sp-segmented__icon{display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;flex-shrink:0;color:var(--sp-chip-color);transition:color 0.18s ease,transform 0.18s ease;}.sp-segmented__icon svg{width:13px;height:13px;}.sp-segmented__btn:hover{color:var(--sp-chip-color);}.sp-segmented__btn:hover .sp-segmented__icon{color:var(--sp-chip-color);}.sp-segmented__btn--active{background:var(--sp-chip-bg);color:var(--sp-chip-color);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sp-chip-color) 35%,transparent),0 1px 2px rgba(0,0,0,0.04);}.sp-segmented__btn--active .sp-segmented__icon{color:var(--sp-chip-color);}.sp-segmented__btn--open.sp-segmented__btn--active .sp-segmented__icon{animation:sp-segmented-pulse 2.4s ease-in-out infinite;}@keyframes sp-segmented-pulse{0%,100%{transform:scale(1);}50%{transform:scale(0.85);}}@media (prefers-reduced-motion: reduce){.sp-filter-dropdown-btn,.sp-filter-dropdown-btn__chevron,.sp-filter-dropdown-option,.sp-segmented__btn,.sp-segmented__icon{transition:none;}.sp-filter-dropdown-menu{animation:none;}.sp-segmented__btn--open.sp-segmented__btn--active .sp-segmented__icon{animation:none;}}.sp-list{flex:1;overflow-y:auto;padding:8px 12px;}.sp-list::-webkit-scrollbar{width:6px;}.sp-list::-webkit-scrollbar-track{background:transparent;}.sp-list::-webkit-scrollbar-thumb{background:var(--sp-border);border-radius:var(--sp-radius-full);}.sp-list::-webkit-scrollbar-thumb:hover{background:var(--sp-text-tertiary);}.sp-card{display:flex;padding:14px 16px;margin-bottom:6px;cursor:pointer;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-xs);transition:all 0.2s cubic-bezier(0.34,1.56,0.64,1);}.sp-card:hover{background:var(--sp-bg);border-color:var(--sp-border);box-shadow:var(--sp-shadow-md);transform:translateY(-2px);}.sp-card:active{transform:translateY(0) scale(0.99);transition-duration:0.1s;}.sp-card-bar{width:3px;border-radius:var(--sp-radius-full);margin-right:14px;flex-shrink:0;}.sp-card-body{flex:1;min-width:0;}.sp-card-header{display:flex;align-items:center;gap:8px;margin-bottom:6px;}.sp-card-number{font-size:12px;font-weight:700;color:var(--sp-text-tertiary);font-variant-numeric:tabular-nums;}.sp-badge{padding:2px 10px;border-radius:var(--sp-radius-full);font-size:11px;font-weight:600;letter-spacing:0.02em;}.sp-card-date{font-size:11px;color:var(--sp-text-tertiary);margin-left:auto;}.sp-lost{font-size:11px;color:var(--sp-text-tertiary);margin-top:4px;}.sp-card-message{font-size:13px;line-height:1.5;color:var(--sp-text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}.sp-card-message--expanded{-webkit-line-clamp:unset;}.sp-card-expand{font-size:12px;font-weight:500;color:var(--sp-accent-text);cursor:pointer;background:none;border:none;padding:4px 0;font-family:var(--sp-font);transition:opacity 0.15s ease;}.sp-card-expand:hover{opacity:0.8;}.sp-card-footer{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:10px;}.sp-btn-resolve,.sp-btn-delete{padding:8px 14px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:transparent;color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;}.sp-btn-resolve svg,.sp-btn-delete svg{width:14px;height:14px;}.sp-btn-resolve:hover{border-color:var(--sp-status-open);color:var(--sp-status-open);background:rgba(34,197,94,0.06);}.sp-btn-delete:hover{border-color:var(--sp-type-bug);color:var(--sp-type-bug);background:rgba(239,68,68,0.06);}.sp-btn-resolve:disabled,.sp-btn-delete:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-spinner--sm{width:14px;height:14px;}.sp-panel-header-right{display:flex;align-items:center;gap:8px;}.sp-btn-delete-all{padding:5px 12px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:transparent;color:var(--sp-text-tertiary);font-family:var(--sp-font);font-size:11px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;}.sp-btn-delete-all svg{width:13px;height:13px;}.sp-btn-delete-all:hover{border-color:#ef4444;color:#ef4444;background:rgba(239,68,68,0.06);}.sp-btn-delete-all:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-confirm-backdrop{position:fixed;inset:0;background:var(--sp-backdrop, rgba(15, 23, 42, 0.2));backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));display:flex;align-items:center;justify-content:center;z-index:2147483647;opacity:0;transition:opacity 0.2s ease;}.sp-confirm-dialog{width:min(340px,calc(100vw - 32px));padding:28px;border-radius:20px;background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-xl);font-family:var(--sp-font);transform:translateY(8px) scale(0.97);transition:transform 0.25s cubic-bezier(0.16,1,0.3,1);}.sp-confirm-title{font-size:17px;font-weight:700;color:var(--sp-text);letter-spacing:-0.02em;margin-bottom:8px;}.sp-confirm-message{font-size:14px;color:var(--sp-text-secondary);line-height:1.5;margin-bottom:20px;}.sp-confirm-actions{display:flex;gap:8px;justify-content:flex-end;}.sp-btn-danger{height:40px;padding:0 22px;border-radius:var(--sp-radius);border:none;background:#ef4444;color:#fff;font-family:var(--sp-font);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease;box-shadow:0 2px 8px rgba(239,68,68,0.25);}.sp-btn-danger:hover{background:#dc2626;box-shadow:0 4px 16px rgba(239,68,68,0.3);transform:translateY(-1px);}.sp-btn-danger:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.sp-card--resolved{opacity:0.5;}.sp-card--resolved .sp-card-message{text-decoration:line-through;text-decoration-color:var(--sp-text-tertiary);}.sp-loading{display:flex;align-items:center;justify-content:center;padding:48px 24px;}.sp-identity-backdrop{position:fixed;inset:0;background:var(--sp-identity-overlay);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:2147483647;opacity:0;transition:opacity 0.25s ease;}.sp-identity-modal{width:340px;max-width:calc(100vw - 32px);padding:28px;border-radius:var(--sp-radius-xl);background:var(--sp-identity-bg);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:0 16px 48px var(--sp-shadow),0 8px 16px var(--sp-shadow);font-family:var(--sp-font);color:var(--sp-text);transform:translateY(12px) scale(0.97);transition:transform 0.3s cubic-bezier(0.16,1,0.3,1);}.sp-identity--open{opacity:1;}.sp-identity--open .sp-identity-modal{transform:none;}.sp-identity-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px;}.sp-identity-title{font-size:17px;font-weight:700;color:var(--sp-text);letter-spacing:-0.02em;}.sp-input{width:100%;height:42px;padding:0 14px;border-radius:var(--sp-radius);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text);font-family:var(--sp-font);font-size:14px;outline:none;transition:all 0.2s ease;}.sp-input::placeholder{color:var(--sp-text-tertiary);}.sp-input:focus{border-color:var(--sp-accent);box-shadow:0 0 0 3px var(--sp-accent-light);background:var(--sp-bg);}.sp-input-label{font-size:13px;font-weight:500;color:var(--sp-text-secondary);margin-bottom:6px;display:block;}.sp-btn-primary{height:40px;padding:0 22px;border-radius:var(--sp-radius);border:none;background:var(--sp-accent-gradient);color:#fff;font-family:var(--sp-font);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease;box-shadow:0 2px 8px var(--sp-accent-glow);}.sp-btn-primary:hover{box-shadow:0 4px 16px var(--sp-accent-glow);transform:translateY(-1px);}.sp-btn-primary:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.sp-btn-primary:disabled{opacity:0.4;cursor:not-allowed;transform:none;box-shadow:none;}.sp-btn-ghost{height:40px;padding:0 22px;border-radius:var(--sp-radius);border:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:14px;font-weight:500;cursor:pointer;transition:all 0.2s ease;}.sp-btn-ghost:hover{border-color:var(--sp-accent);color:var(--sp-accent-text);background:var(--sp-accent-light);}.sp-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 24px;color:var(--sp-text-tertiary);text-align:center;gap:8px;animation:sp-fade-in 0.3s ease-out both;}.sp-empty-text{font-size:14px;font-weight:500;}.sp-load-more-wrap{display:flex;justify-content:center;padding:12px 0 4px;}.sp-btn-load-more{width:100%;}@media (forced-colors: active){.sp-fab,.sp-radial-item,.sp-filter-dropdown-btn,.sp-segmented,.sp-segmented__btn,.sp-card,.sp-panel-close,.sp-search,.sp-btn-resolve,.sp-btn-delete,.sp-btn-delete-all,.sp-btn-primary,.sp-btn-ghost,.sp-btn-danger,.sp-card-expand,.sp-input,.sp-confirm-dialog{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-segmented__btn--active{background:Highlight !important;color:HighlightText !important;}.sp-filter-dropdown-menu{border:2px solid ButtonText !important;background:Canvas !important;}.sp-filter-dropdown-option--active{background:Highlight !important;color:HighlightText !important;}.sp-fab:focus-visible,.sp-radial-item:focus-visible,.sp-filter-dropdown-btn:focus-visible,.sp-segmented__btn:focus-visible,.sp-filter-dropdown-option:focus-visible,.sp-panel-close:focus-visible,.sp-btn-resolve:focus-visible,.sp-btn-delete:focus-visible,.sp-btn-delete-all:focus-visible,.sp-btn-primary:focus-visible,.sp-btn-ghost:focus-visible,.sp-btn-danger:focus-visible,.sp-card-expand:focus-visible,.sp-input:focus-visible,.sp-search:focus-visible{outline:3px solid Highlight !important;}.sp-panel{border:2px solid ButtonText !important;}.sp-fab-badge{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-card-bar{background:ButtonText !important;}}${gm} ${$u} ${Fu} .sp-bulk-checkbox{position:relative;width:16px;height:16px;flex-shrink:0;cursor:pointer;border-radius:4px;color:var(--sp-border);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:16px;height:16px;display:block;}.sp-bulk-checkbox:hover{color:var(--sp-accent-text);transform:scale(1.1);}.sp-bulk-checkbox--checked{color:var(--sp-accent-text);opacity:1 !important;filter:drop-shadow(0 0 4px var(--sp-accent-glow));}.sp-card:hover .sp-bulk-checkbox{opacity:1;}.sp-list--has-selection .sp-bulk-checkbox{opacity:1;}.sp-card--selected{border-left:3px solid var(--sp-accent) !important;background:var(--sp-accent-light) !important;}.sp-card--selected:hover{background:var(--sp-accent-light) !important;}.sp-bulk-select-all{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-bottom:4px;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:12px;font-weight:500;color:var(--sp-text-secondary);}.sp-bulk-select-all:hover{background:var(--sp-bg-hover);}.sp-list:hover .sp-bulk-select-all,.sp-list--has-selection .sp-bulk-select-all{opacity:1;}.sp-bulk-select-all .sp-bulk-checkbox{opacity:1;}@keyframes sp-bulk-bar-in{from{transform:translateY(100%) scale(0.95);opacity:0;}to{transform:translateY(0) scale(1);opacity:1;}}@keyframes sp-bulk-bar-out{from{transform:translateY(0) scale(1);opacity:1;}to{transform:translateY(100%) scale(0.95);opacity:0;}}.sp-bulk-bar{position:absolute;bottom:16px;left:16px;right:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-radius:16px;background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-xl);z-index:10;pointer-events:none;opacity:0;transform:translateY(100%) scale(0.95);transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1),opacity 0.25s ease;font-family:var(--sp-font);}.sp-bulk-bar--visible{pointer-events:auto;opacity:1;transform:translateY(0) scale(1);}.sp-bulk-bar-count{font-size:13px;font-weight:600;color:var(--sp-text);white-space:nowrap;letter-spacing:-0.01em;}.sp-bulk-bar-actions{display:flex;align-items:center;gap:6px;}.sp-bulk-btn-resolve,.sp-bulk-btn-delete{padding:7px 14px;border-radius:var(--sp-radius-full);border:1.5px solid transparent;background:transparent;font-family:var(--sp-font);font-size:12px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:5px;transition:all 0.2s ease;white-space:nowrap;}.sp-bulk-btn-resolve{color:#22c55e;border-color:#22c55e;}.sp-bulk-btn-resolve:hover{background:rgba(34,197,94,0.1);box-shadow:0 0 12px rgba(34,197,94,0.15);}.sp-bulk-btn-resolve:active{transform:scale(0.96);transition-duration:0.1s;}.sp-bulk-btn-delete{color:#ef4444;border-color:#ef4444;}.sp-bulk-btn-delete:hover{background:rgba(239,68,68,0.1);box-shadow:0 0 12px rgba(239,68,68,0.15);}.sp-bulk-btn-delete:active{transform:scale(0.96);transition-duration:0.1s;}.sp-bulk-btn-resolve:disabled,.sp-bulk-btn-delete:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-bulk-btn-deselect{width:28px;height:28px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:transparent;color:var(--sp-text-tertiary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease;flex-shrink:0;padding:0;}.sp-bulk-btn-deselect:hover{background:var(--sp-bg-hover);color:var(--sp-text);border-color:var(--sp-text-tertiary);}.sp-bulk-btn-deselect:active{transform:scale(0.92);transition-duration:0.1s;}.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-card--selected{border-left:4px solid Highlight !important;}}@media (prefers-reduced-motion: reduce){.sp-bulk-bar{transition-duration:0.01ms !important;}.sp-bulk-checkbox{transition-duration:0.01ms !important;}} .sp-export-btn{padding:5px 12px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:transparent;color:var(--sp-text-tertiary);font-family:var(--sp-font);font-size:11px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;position:relative;}.sp-export-btn svg{width:13px;height:13px;}.sp-export-btn:hover{border-color:var(--sp-accent);color:var(--sp-accent-text);background:var(--sp-accent-light);}.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:4px;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-lg);z-index:10;opacity:0;transform:translateY(-4px) scale(0.97);transition:opacity 0.15s ease,transform 0.15s ease;pointer-events:none;}.sp-export-menu--open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;}.sp-export-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 16px;border:none;border-radius:8px;background:transparent;color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:13px;font-weight:500;cursor:pointer;transition:all 0.15s ease;text-align:left;}.sp-export-option:hover,.sp-export-option:focus-visible{background:var(--sp-accent-light);color:var(--sp-accent-text);}.sp-export-option-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;}.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;}} .sp-shortcuts-overlay{position:fixed;inset:0;background:var(--sp-backdrop, rgba(15, 23, 42, 0.2));backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;transition:opacity 0.2s ease;}.sp-shortcuts-overlay--visible{opacity:1;pointer-events:auto;}.sp-shortcuts-card{width:380px;max-width:calc(100vw - 32px);padding:24px 28px 20px;border-radius:20px;background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-xl);font-family:var(--sp-font);position:relative;transform:scale(0.92) translateY(8px);transition:transform 0.25s cubic-bezier(0.16,1,0.3,1);}.sp-shortcuts-overlay--visible .sp-shortcuts-card{transform:scale(1) translateY(0);}.sp-shortcuts-title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:700;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:16px;right:16px;width:28px;height:28px;border-radius:8px;border:none;background:transparent;color:var(--sp-text-tertiary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease;}.sp-shortcuts-close:hover{background:var(--sp-bg-hover);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-tertiary);user-select:none;}.sp-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:26px;padding:0 7px;border-radius:6px;background:var(--sp-bg-hover);border:1px solid var(--sp-border);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.08),0 1px 2px rgba(0,0,0,0.04);font-family:ui-monospace,"SF Mono","Cascadia Code","Segoe UI Mono",Menlo,monospace;font-size:12px;font-weight:600;color:var(--sp-text);text-align:center;line-height:1;user-select:none;}.sp-shortcuts-desc{font-size:13px;color:var(--sp-text-secondary);line-height:1.3;}.sp-shortcuts-hint{width:24px;height:24px;border-radius:var(--sp-radius-full);border:1px solid var(--sp-border);background:var(--sp-bg-hover);color:var(--sp-text-tertiary);font-family:ui-monospace,"SF Mono","Cascadia Code","Segoe UI Mono",Menlo,monospace;font-size:12px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease,border-color 0.15s ease;position:absolute;bottom:12px;right:12px;}.sp-shortcuts-hint:hover{background:var(--sp-accent-light);color:var(--sp-accent-text);border-color:var(--sp-accent);}.sp-shortcuts-hint::after{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);right:0;padding:4px 8px;border-radius:6px;background:var(--sp-glass-bg-heavy);border:1px solid var(--sp-glass-border);box-shadow:var(--sp-shadow-sm);font-family:var(--sp-font);font-size:11px;font-weight:500;color:var(--sp-text-secondary);white-space:nowrap;opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity 0.15s ease,transform 0.15s ease;}.sp-shortcuts-hint:hover::after{opacity:1;transform:translateY(0);}.sp-card--focused{outline:2px solid var(--sp-accent);outline-offset:-2px;border-radius:inherit;}@media (prefers-reduced-motion: reduce){.sp-shortcuts-overlay,.sp-shortcuts-card,.sp-shortcuts-close,.sp-shortcuts-hint,.sp-shortcuts-hint::after{transition-duration:0.01ms !important;}} .sp-detail{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--sp-glass-bg);backdrop-filter:blur(var(--sp-blur-heavy));-webkit-backdrop-filter:blur(var(--sp-blur-heavy));z-index:20;transform:translateX(100%);transition:transform 0.35s cubic-bezier(0.16,1,0.3,1);will-change:transform;overflow:hidden;}.sp-detail--visible{transform:translateX(0);}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.sp-detail{background:var(--sp-bg);}}@supports (-webkit-backdrop-filter: blur(1px)) and (not (backdrop-filter: blur(1px))){.sp-detail{background:var(--sp-bg);}}.sp-detail-header{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--sp-border);background:var(--sp-glass-bg-heavy);backdrop-filter:blur(var(--sp-blur));-webkit-backdrop-filter:blur(var(--sp-blur));flex-shrink:0;min-height:64px;}.sp-detail-back{width:40px;height:40px;border-radius:var(--sp-radius);border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--sp-text-tertiary);transition:all 0.2s ease;flex-shrink:0;padding:0;}.sp-detail-back:hover{background:var(--sp-bg-hover);color:var(--sp-text);}.sp-detail-back:active{transform:scale(0.92);transition-duration:0.1s;}.sp-detail-back svg{width:18px;height:18px;}.sp-detail-title{font-size:16px;font-weight:700;color:var(--sp-text);letter-spacing:-0.02em;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;}.sp-detail-content::-webkit-scrollbar{width:6px;}.sp-detail-content::-webkit-scrollbar-track{background:transparent;}.sp-detail-content::-webkit-scrollbar-thumb{background:var(--sp-border);border-radius:var(--sp-radius-full);}.sp-detail-content::-webkit-scrollbar-thumb:hover{background:var(--sp-text-tertiary);}.sp-detail-section{padding:20px 24px;border-bottom:1px solid var(--sp-border);opacity:0;transform:translateY(8px);animation:sp-detail-section-in 0.35s cubic-bezier(0.16,1,0.3,1) forwards;}@keyframes sp-detail-section-in{to{opacity:1;transform:translateY(0);}}.sp-detail-section:last-child{border-bottom:none;}.sp-detail-section-title{font-size:11px;font-weight:600;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:14px;display:flex;align-items:center;gap:6px;}.sp-detail-section-title svg{width:14px;height:14px;opacity:0.6;}.sp-detail-status{display:flex;align-items:center;gap:10px;margin-bottom:16px;}.sp-detail-status-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 14px;border-radius:var(--sp-radius-full);font-size:12px;font-weight:600;letter-spacing:0.02em;}.sp-detail-status-pill--open{background:rgba(34,197,94,0.1);color:#22c55e;border:1px solid rgba(34,197,94,0.2);}.sp-detail-status-pill--resolved{background:rgba(156,163,175,0.1);color:#9ca3af;border:1px solid rgba(156,163,175,0.2);}.sp-detail-status-pill--in-progress{background:rgba(245,158,11,0.1);color:#f59e0b;border:1px solid rgba(245,158,11,0.2);}.sp-detail-status-pill--wont-fix{background:rgba(148,163,184,0.1);color:#94a3b8;border:1px solid rgba(148,163,184,0.2);}.sp-detail-status-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}.sp-detail-actions{display:flex;gap:8px;}.sp-detail-actions button,.sp-detail-actions a{flex:1;height:40px;padding:0 16px;border-radius:var(--sp-radius);font-family:var(--sp-font);font-size:13px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all 0.2s ease;}.sp-detail-actions button svg,.sp-detail-actions a svg{width:15px;height:15px;}.sp-detail-btn-resolve{border:1.5px solid #22c55e;background:rgba(34,197,94,0.06);color:#22c55e;}.sp-detail-btn-resolve:hover{background:rgba(34,197,94,0.14);box-shadow:0 0 16px rgba(34,197,94,0.12);transform:translateY(-1px);}.sp-detail-btn-resolve:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.sp-detail-btn-reopen{border:1.5px solid var(--sp-accent);background:var(--sp-accent-light);color:var(--sp-accent-text);}.sp-detail-btn-reopen:hover{background:rgba(var(--sp-accent),0.14);box-shadow:0 0 16px var(--sp-accent-glow);transform:translateY(-1px);}.sp-detail-btn-reopen:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.sp-detail-btn-delete{border:1.5px solid #ef4444;background:rgba(239,68,68,0.06);color:#ef4444;}.sp-detail-btn-delete:hover{background:rgba(239,68,68,0.14);box-shadow:0 0 16px rgba(239,68,68,0.12);transform:translateY(-1px);}.sp-detail-btn-delete:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.sp-detail-btn-custom{border:1.5px solid var(--sp-border);background:var(--sp-glass-bg-heavy);color:var(--sp-text);text-decoration:none;}.sp-detail-btn-custom:hover{background:var(--sp-bg-hover);border-color:var(--sp-accent);color:var(--sp-accent-text);box-shadow:0 0 16px var(--sp-accent-glow);transform:translateY(-1px);}.sp-detail-btn-custom:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}.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;transform:none;box-shadow:none;}.sp-detail-message{font-size:14px;line-height:1.65;color:var(--sp-text);padding:14px 16px;border-left:3px solid var(--sp-accent);border-radius:0 var(--sp-radius) var(--sp-radius) 0;background:var(--sp-glass-bg-heavy);white-space:pre-wrap;word-break:break-word;}.sp-thread-list{list-style:none;}.sp-comment{margin-top:8px;border-left-color:var(--sp-border);}.sp-comment[data-role="team"]{border-left-color:var(--sp-accent);}.sp-comment-head,.sp-thread-foot{display:flex;align-items:center;gap:6px;font-size:12px;}.sp-comment-head{margin-bottom:4px;font-weight:600;}.sp-comment-head .sp-badge{background:var(--sp-accent-light);}.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-thread-input{height:auto;margin-top:10px;padding:10px 14px;}.sp-thread-foot{justify-content:space-between;margin-top:8px;}.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:var(--sp-radius);background:var(--sp-type-bug-bg);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);border:1px solid var(--sp-glass-border);background:var(--sp-glass-bg-heavy);}.sp-detail-meta{display:flex;flex-direction:column;gap:14px;}.sp-detail-meta-row{display:flex;align-items:flex-start;gap:12px;}.sp-detail-meta-row svg{width:14px;height:14px;color:var(--sp-text-tertiary);flex-shrink:0;margin-top:1px;}.sp-detail-meta-content{flex:1;min-width:0;}.sp-detail-meta-label{font-size:10px;font-weight:600;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.06em;line-height:1;margin-bottom:4px;}.sp-detail-meta-value{font-size:13px;line-height:1.4;color:var(--sp-text);word-break:break-all;}.sp-detail-meta-value--mono{font-family:"SF Mono","Cascadia Code","Fira Code","Consolas",monospace;font-size:12px;background:var(--sp-glass-bg-heavy);padding:2px 6px;border-radius:4px;border:1px solid var(--sp-glass-border-subtle);}.sp-detail-meta-value--secondary{color:var(--sp-text-secondary);font-size:12px;}.sp-detail-annotation{display:flex;flex-direction:column;gap:12px;}.sp-detail-annotation-info{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:var(--sp-radius);background:var(--sp-glass-bg-heavy);border:1px solid var(--sp-glass-border-subtle);}.sp-detail-annotation-row{display:flex;align-items:flex-start;gap:10px;}.sp-detail-annotation-row svg{width:13px;height:13px;color:var(--sp-text-tertiary);flex-shrink:0;margin-top:2px;}.sp-detail-annotation-label{font-size:10px;font-weight:600;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.06em;line-height:1;margin-bottom:3px;}.sp-detail-annotation-value{font-size:12px;line-height:1.4;color:var(--sp-text);word-break:break-all;}.sp-detail-annotation-value--mono{font-family:"SF Mono","Cascadia Code","Fira Code","Consolas",monospace;font-size:11px;background:var(--sp-bg-hover);padding:2px 6px;border-radius:4px;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:var(--sp-radius);border:none;background:var(--sp-accent-gradient);color:#fff;font-family:var(--sp-font);font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all 0.25s ease;box-shadow:0 2px 12px var(--sp-accent-glow);}.sp-detail-btn-goto svg{width:16px;height:16px;}.sp-detail-btn-goto:hover{box-shadow:0 4px 20px var(--sp-accent-glow);transform:translateY(-2px);}.sp-detail-btn-goto:active{transform:translateY(0) scale(0.98);transition-duration:0.1s;}@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{border-left:3px solid ButtonText !important;}}.sp-detail-diag{display:flex;flex-direction:column;gap:12px;}.sp-detail-diag-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-radius:var(--sp-radius);border:1px solid var(--sp-glass-border-subtle);background:var(--sp-glass-bg-heavy);color:var(--sp-text);font-family:var(--sp-font);font-size:12px;font-weight:600;cursor:pointer;transition:background 0.15s ease;}.sp-detail-diag-toggle:hover{background:var(--sp-bg-hover);}.sp-detail-diag-toggle svg{width:12px;height:12px;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-tertiary);}.sp-detail-diag-count{padding:1px 7px;border-radius:var(--sp-radius-full);background:var(--sp-bg-hover);font-variant-numeric:tabular-nums;}.sp-detail-diag-count--errors{background:rgba(239,68,68,0.14);color:#ef4444;}.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:10px;font-weight:700;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:6px;}.sp-detail-diag-list{list-style:none;padding:0;margin:0;border-radius:var(--sp-radius);border:1px solid var(--sp-glass-border-subtle);background:var(--sp-glass-bg-heavy);max-height:240px;overflow-y:auto;}.sp-detail-diag-list li{display:flex;align-items:flex-start;gap:8px;padding:8px 10px;border-bottom:1px solid var(--sp-glass-border-subtle);font-family:"SF Mono","Cascadia Code","Fira Code","Consolas",monospace;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:#3b82f6;}.sp-detail-diag-level--warn{color:#f59e0b;}.sp-detail-diag-level--error{color:#ef4444;}.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:#ef4444;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 (prefers-reduced-motion: reduce){.sp-detail{transition-duration:0.01ms !important;}.sp-detail-section{animation-duration:0.01ms !important;}} ${mm}`}qe(),qe(),G(),Pe(),su(),qe();var ym="opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)",xm=class{constructor(e,t="en"){this.colors=e,this.locale=t,this.root=z("div",{style:`position:fixed;z-index:2147483647;max-width:280px;padding:12px 14px;border-radius:14px;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);font-family:"Inter",system-ui,-apple-system,sans-serif;pointer-events:auto;opacity:0;transform:translateY(6px) scale(0.97);transition:${ym};visibility:hidden;-webkit-font-smoothing:antialiased;`}),this.root.setAttribute("role","tooltip"),this.root.id=this.tooltipId,this.arrow=z("div",{style:"position:absolute;width:12px;height:12px;transform:rotate(45deg);pointer-events:none;"}),this.root.appendChild(this.arrow),this.restyle(),this.root.addEventListener("mouseenter",()=>this.cancelHide()),this.root.addEventListener("mouseleave",()=>this.scheduleHide()),X(this.root),document.body.appendChild(this.root)}colors;locale;root;arrow;showTimer=null;hideTimer=null;currentFeedbackId=null;tooltipId="sp-tooltip";restyle(){let{glassBgHeavy:e,glassBorder:t,shadow:i}=this.colors,{style:r}=this.root;r.background=e,r.border=`1px solid ${t}`,r.boxShadow=`0 8px 32px ${i}, 0 2px 8px ${i}`}show(e,t){this.cancelHide(),this.currentFeedbackId!==e.id&&(this.cancelShow(),this.showTimer=setTimeout(()=>{this.currentFeedbackId=e.id,this.render(e),this.position(t);let i=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;this.root.style.transition=i?"none":ym,this.root.style.visibility="visible",this.root.style.opacity="1",this.root.style.transform="translateY(0) scale(1)"},120))}scheduleHide(){this.cancelHide(),this.hideTimer=setTimeout(()=>this.hide(),80)}hide(){this.cancelShow(),this.currentFeedbackId=null,this.root.style.opacity="0",this.root.style.transform="translateY(6px) scale(0.97)",setTimeout(()=>{this.currentFeedbackId||(this.root.style.visibility="hidden")},200)}cancelShow(){this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=null)}cancelHide(){this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}render(e){let t=Array.from(this.root.children);for(let e of t)e!==this.arrow&&e.remove();let i=$e(e.type,this.colors),r=We(e.type,this.colors),s=iu(this.locale),n=eu(e.type,s),o=z("div",{style:"display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-bottom:8px;"}),a=(e,t,i)=>{let r=z("span",{style:`padding:3px 10px;border-radius:9999px;font-size:11px;font-weight:600;white-space:nowrap;color:${t};background:${i};letter-spacing:0.02em;`});return _(r,e),r},l=z("span",{style:`font-size:11px;color:${this.colors.textSecondary};margin-left:auto;`});_(l,q(e.createdAt,this.locale)),o.appendChild(a(n,i,r)),o.appendChild(a(tu(e.status,s),ze(e.status,this.colors),_e(e.status,this.colors))),o.appendChild(l);let d=z("div",{style:`font-size:13px;line-height:1.55;color:${this.colors.text};display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;`});_(d,e.message),this.root.insertBefore(o,this.arrow),this.root.insertBefore(d,this.arrow)}position(e){let t=this.root.getBoundingClientRect(),i=e.top-t.height-10,r=e.left+e.width/2-t.width/2,s=!0;i<8&&(i=e.bottom+10,s=!1),r=Math.max(8,Math.min(r,window.innerWidth-t.width-8)),this.root.style.top=`${i}px`,this.root.style.left=`${r}px`;let n=Math.max(16,Math.min(e.left+e.width/2-r-6,t.width-22));this.arrow.style.cssText=s?`position:absolute;width:12px;height:12px;background:${this.colors.glassBgHeavy};border-right:1px solid ${this.colors.glassBorder};border-bottom:1px solid ${this.colors.glassBorder};transform:rotate(45deg);pointer-events:none;bottom:-6px;left:${n}px;`:`position:absolute;width:12px;height:12px;background:${this.colors.glassBgHeavy};border-left:1px solid ${this.colors.glassBorder};border-top:1px solid ${this.colors.glassBorder};transform:rotate(45deg);pointer-events:none;top:-6px;left:${n}px;`}contains(e){return this.root.contains(e)}destroy(){this.cancelShow(),this.cancelHide(),this.root.remove()}};Ze();var vm=null;function wm(){let e=()=>{};return{destroy:e,open:e,close:e,refresh:()=>Promise.resolve(),focusFeedback:()=>!1,on:()=>e,off:e}}function km(){try{return process.env.NODE_ENV}catch{return}}function Cm(t){if(typeof window>"u"||typeof document>"u")return t.onSkip?.("ssr"),wm();let i=t.debug?(...e)=>console.debug("[siteping]",...e):()=>{};if(vm)return i("initSiteping() called more than once \u2014 returning existing instance"),vm();let r=km();if(!t.forceShow&&("production"===r||void 0===r&&!function(){let e=location.hostname;return""===e||"localhost"===e||e.endsWith(".localhost")||"127.0.0.1"===e||"[::1]"===e}()))return t.onSkip?.("production"),wm();let s="number"==typeof t.minViewportWidth&&Number.isFinite(t.minViewportWidth)?t.minViewportWidth:0;if(!t.forceShow&&window.innerWidth<s){let e="mobile";return t.onSkip?.(e),wm()}if(!(t.store||t.endpoint&&"string"==typeof t.endpoint))return console.error("[siteping] Missing 'endpoint' or 'store' in config. Provide an endpoint like '/api/siteping' or a SitepingStore instance."),wm();if(!t.projectName||"string"!=typeof t.projectName)return console.error("[siteping] Missing or invalid 'projectName' in config. Expected a non-empty string."),wm();let o=function(e){let t=function(e){try{return Intl.getCanonicalLocales(e.replace(/_/g,"-"))[0]}catch{return}}(e);return t||(console.warn(`[siteping] Invalid locale "${e}", falling back to "en"`),"en")}(t.locale??"en"),a="en"===o?Promise.resolve():e.loadLocale(o).catch(()=>{}),d=iu(o),c=t.scopeAnnotationsByUrl??!0,p=()=>{try{let e=t.getPageScope?.();if(e)return e}catch(e){i("getPageScope() threw, falling back to pathname:",e)}return{url:window.location.pathname,urlPattern:null}};i("Initializing widget",{projectName:t.projectName,theme:t.theme??"light",locale:o,scopeAnnotationsByUrl:c});let h=function(e){return void 0===e||!1===e?{console:!1,network:!1,maxConsoleEntries:50,maxNetworkEntries:20}:!0===e?{console:!0,network:!0,maxConsoleEntries:50,maxNetworkEntries:20}:{console:!1!==e.console,network:!1!==e.network,maxConsoleEntries:"number"==typeof e.maxConsoleEntries?e.maxConsoleEntries:50,maxNetworkEntries:"number"==typeof e.maxNetworkEntries?e.maxNetworkEntries:20}}(t.captureDiagnostics),u=h.console?new Ag(h.maxConsoleEntries):null,f=h.network?new Bg(h.maxNetworkEntries):null,g=Fe(t.accentColor,t.theme),m=new Rg,b=new Set,y=(e,...t)=>{for(let i of b)i.emit(e,...t)},x=(()=>{if(t.store)return new lm(t.store,t.projectName);let e=t.endpoint;if("string"!=typeof e||0===e.length)throw new Error("[siteping] internal invariant: endpoint must be a non-empty string in HTTP mode");return new kg(e,t.projectName,{apiKey:t.apiKey,headers:t.headers})})();t.onOpen&&m.on("open",t.onOpen),t.onClose&&m.on("close",t.onClose),t.onFeedbackSent&&m.on("feedback:sent",t.onFeedbackSent),t.onCommentAdded&&m.on("comment:added",t.onCommentAdded),t.onError&&m.on("feedback:error",t.onError),t.onError&&m.on("panel:action-error",t.onError),m.on("panel:action-error",e=>console.error("[siteping] Panel action failed:",e)),t.onAnnotationStart&&m.on("annotation:start",t.onAnnotationStart),t.onAnnotationEnd&&m.on("annotation:end",t.onAnnotationEnd);let v=tg(t.projectName,t.endpoint);m.on("feedback:sent",e=>v.add(e.id)),m.on("feedback:deleted",e=>v.remove(e)),m.on("feedback:all-deleted",()=>v.clear());let w={"feedback:sent":()=>m.on("feedback:sent",e=>y("feedback:sent",e)),"feedback:deleted":()=>m.on("feedback:deleted",e=>y("feedback:deleted",e)),"comment:added":()=>m.on("comment:added",e=>y("comment:added",e)),"feedback:error":()=>m.on("feedback:error",e=>y("feedback:error",e)),"panel:open":()=>m.on("open",()=>y("panel:open")),"panel:close":()=>m.on("close",()=>y("panel:close")),"annotation:start":()=>m.on("annotation:start",()=>y("annotation:start")),"annotation:end":()=>m.on("annotation:end",()=>y("annotation:end"))};for(let e of Object.values(w))e();m.on("open",()=>i("Panel opened")),m.on("close",()=>i("Panel closed")),m.on("feedback:sent",e=>i("Feedback sent",e.id)),m.on("feedback:error",e=>i("Feedback failed",e.message)),m.on("annotation:start",()=>i("Annotation started")),m.on("annotation:end",()=>i("Annotation ended"));let C=document.createElement("siteping-widget");C.style.cssText="position:fixed;z-index:2147483647;pointer-events:auto;";let S,E="test"===km()?"open":"closed",M=C.attachShadow({mode:E});if("adoptedStyleSheets"in ShadowRoot.prototype){let e=new CSSStyleSheet;M.adoptedStyleSheets=[e],S=()=>e.replaceSync(bm(g))}else{let e=document.createElement("style");M.appendChild(e),S=()=>{e.textContent=bm(g)}}S(),X(C,M);let A=function(){let e=e=>{ce(e.target)&&ee()&&e.stopImmediatePropagation()},t=[["pointerdown",e],["focusin",e],["focusout",e=>{(ce(e.target)||ce(e.relatedTarget))&&ee()&&e.stopImmediatePropagation()}],["keydown",e=>{if(("Tab"===e.key||"Escape"===e.key)&&ce(e.target)&&ee()){if("Escape"===e.key)return void(function(e){for(let t=te(e);t;t=de(t))for(let e of ae.get(t)??[])if(e())return!0;return!1}(e)&&e.preventDefault());for(let t=te(e);t;t=de(t))for(let i of[...le.get(t)??[]])i(e);e.stopImmediatePropagation()}}]];for(let[e,i]of t)window.addEventListener(e,i,!0);return()=>{for(let[e,i]of t)window.removeEventListener(e,i,!0)}}();document.body.appendChild(C);let T=function(e){let t=null,i=i=>{let r=i.target;r instanceof HTMLElement&&(r===document.body||r===document.documentElement||r===e||Sf(r)||(t=Ef(r)))};return document.addEventListener("focusin",i),{getLastPageFocus:()=>(t&&!t.isConnected&&(t=null),t),destroy(){document.removeEventListener("focusin",i),t=null}}}(C),B=document.createElement("div");B.setAttribute("role","status"),B.setAttribute("aria-live","polite"),B.setAttribute("aria-atomic","true"),B.setAttribute("data-siteping-ignore","true"),B.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",X(B),document.body.appendChild(B);let R=document.createElement("div");R.className="sp-toast",R.setAttribute("aria-hidden","true"),R.hidden=!0;let L,P=()=>{clearTimeout(L),R.hidden=!0};R.addEventListener("click",P),M.appendChild(R);let I=(e,t)=>{B.textContent=e,R.textContent=e,R.classList.toggle("sp-toast--error",t),R.hidden=!1,clearTimeout(L),L=setTimeout(P,t?8e3:4e3)},N=new xm(g,o),D=new am(g,N,m,d,B),O=new Pg(M,t,m,d);m.on("markers:changed",e=>O.updateBadge(e));let F=null,$=null,z=!1,_=0;async function W(e=!1){let i=t.identity??Ng();if(i)return i;let r=await function(e,t,i){return new Promise(r=>{let s=e.activeElement??document.activeElement,o=e.host;i&&o.parentNode&&o.parentNode.appendChild(o);let a=document.createElement("div");a.className="sp-identity-backdrop";let l=document.createElement("div");l.className="sp-identity-modal";let d=`sp-identity-title-${Date.now()}`;l.setAttribute("role","dialog"),l.setAttribute("aria-modal","true"),l.setAttribute("aria-labelledby",d);let c=document.createElement("div");c.className="sp-identity-title",c.id=d,c.textContent=t("identity.title"),c.style.marginBottom="20px";let p=`sp-identity-name-${Date.now()}`,h=`sp-identity-email-${Date.now()}`,u=document.createElement("label");u.className="sp-input-label",u.textContent=t("identity.nameLabel"),u.setAttribute("for",p);let f=document.createElement("input");f.className="sp-input",f.id=p,f.type="text",f.maxLength=k,f.placeholder=t("identity.namePlaceholder"),f.style.marginBottom="14px";let g=document.createElement("label");g.className="sp-input-label",g.textContent=t("identity.emailLabel"),g.setAttribute("for",h);let m=document.createElement("input");m.className="sp-input",m.id=h,m.type="email",m.maxLength=k,m.placeholder=t("identity.emailPlaceholder");let b=document.createElement("div");b.className="sp-identity-actions";let y=Qe(e=>l.style.setProperty("--sp-kb",`${e}px`)),x=e=>{S(),E(),y(),a.classList.remove("sp-identity--open"),setTimeout(()=>{a.remove(),s?.focus(),r(e)},250)},v=document.createElement("button");v.className="sp-btn-ghost",v.textContent=t("identity.cancel"),v.addEventListener("click",()=>x(null));let w=document.createElement("button");w.className="sp-btn-primary",w.textContent=t("identity.submit");let C=(e,t)=>{e.style.borderColor=t?"var(--sp-type-bug, #ef4444)":"",t?e.setAttribute("aria-invalid","true"):e.removeAttribute("aria-invalid")};w.addEventListener("click",()=>{let e=f.value.trim(),t=m.value.trim();if(!e||!t)return;let i=e.length>k,r=t.length>k||!n(t);C(f,i),C(m,r),!i&&!r&&x({name:e,email:t})});let S=Z(a,t=>{if("Escape"===t.key)return t.stopPropagation(),void x(null);if("Tab"===t.key){let i=Array.from(l.querySelectorAll('input, button, [tabindex]:not([tabindex="-1"])'));if(0===i.length)return;let r=i[0],s=i[i.length-1];if(!r||!s)return;let n=e.activeElement;t.shiftKey?(n===r||!l.contains(n))&&(t.preventDefault(),s.focus()):(n===s||!l.contains(n))&&(t.preventDefault(),r.focus())}}),E=Q(a,()=>!0);a.addEventListener("click",e=>{e.target===a&&x(null)}),b.appendChild(v),b.appendChild(w),l.appendChild(c),l.appendChild(u),l.appendChild(f),l.appendChild(g),l.appendChild(m),l.appendChild(b),a.appendChild(l),e.appendChild(a),requestAnimationFrame(()=>{a.classList.add("sp-identity--open"),f.focus()})})}(M,d,e);return r&&function(e){try{localStorage.setItem(Ig,JSON.stringify(e))}catch{}}(r),r}async function H(){return z?null:F||($||($=Promise.resolve().then(()=>(tf(),Ju)).then(e=>z?null:(F=new e.Panel(M,g,m,x,t.projectName,D,d,o,{getScope:p,scopeAnnotationsByUrl:c,panelActions:t.panelActions,ownFeedback:v,resolveIdentity:W,readOnly:t.readOnly}),F))),$)}if(typeof window<"u"){let e=()=>{z||H()},t=window.requestIdleCallback;"function"==typeof t?t(e):setTimeout(e,200)}let V=!1,j=m.on("panel:toggle",e=>{F||(e?(V=!0,H().then(e=>{e&&V&&e.open(),V=!1}).catch(e=>i("Failed to lazy-load panel:",e))):V=!1)}),U=new eg(g,m,d,t.enableScreenshot??!1,()=>T.getLastPageFocus()),Y=null;t.enableRightClickComment&&(Y=e=>{if(e.defaultPrevented)return;let t=e.pointerType;""===t||void 0===t&&2!==e.button||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||e.composedPath().some(e=>e===C||e instanceof Element&&(e.hasAttribute("data-siteping-ignore")||"siteping-markers"===e.id))||U.isBusy||(e.preventDefault(),U.startInstantAnnotation(e.clientX,e.clientY).catch(e=>i("right-click annotation failed",e)))},document.addEventListener("contextmenu",Y)),"en"!==o&&a.then(()=>{z||(O.refreshLabels(),U.refreshLabels())});let q=!1,G=m.on("annotation:complete",async e=>{if(q)m.emit("submission:cancelled");else{q=!0;try{let{annotation:i,type:r,message:s,clientId:n,screenshotDataUrl:o,screenshotRegion:a}=e,l=await W(!0);if(!l)return void m.emit("submission:cancelled");let h=p(),g=null;(u||f)&&(g={console:u?.getEntries()??[],network:f?.getEntries()??[]});let b={projectName:t.projectName,type:r,message:s,url:h.url,urlPattern:h.urlPattern,viewport:`${window.innerWidth}x${window.innerHeight}`,userAgent:navigator.userAgent,authorName:l.name,authorEmail:l.email,annotations:[i],clientId:n,screenshotDataUrl:o??null,screenshotRegion:a??null,diagnostics:g};try{let e=await x.sendFeedback(b);m.emit("feedback:sent",e),(!c||e.url===h.url)&&D.addFeedback(e,D.count+1),I(d("feedback.sent.confirmation"),!1),F&&await F.refresh()}catch(e){let t=function(e){return"object"==typeof e&&null!==e?hg.get(e):void 0}(e);t&&m.emit("feedback:queued"),m.emit("feedback:error",e instanceof Error?e:new Error(String(e))),I(d(t?"feedback.queued":"feedback.error.message"),!t)}}finally{q=!1}}}),K=p(),J=c?{limit:20,url:K.url}:{limit:20},ie=function(e){return void 0===e||!1===e?{enabled:!1,param:"siteping"}:!0===e?{enabled:!0,param:"siteping"}:{enabled:!0,param:e.param??"siteping"}}(t.deepLink),re=++_;Promise.all([x.getFeedbacks(t.projectName,J),a]).then(([{feedbacks:e}])=>{if(z||_!==re)return;let t=c?e.filter(e=>e.url===K.url):e;if(D.render(t),ie.enabled)try{let e=new URLSearchParams(window.location.search).get(ie.param);if(e){let t=D.focusFeedback(e);i(`deepLink ?${ie.param}=${e} ${t?"focused":"did not match a visible feedback"}`),t&&H().then(async t=>{!t||z||(await t.open(),t.showFeedback(e))}).catch(e=>i("deepLink could not open the feedback:",e))}}catch(e){i("deepLink parsing failed:",e)}}).catch(e=>{i("Failed to load initial markers:",e)}),t.endpoint&&async function(e,t,i={}){await dg(async()=>{try{let r=pg();if(0===r.length)return;let s=[],n=[],o=0;for(let i of r)i.endpoint===e?!t||mg(i.payload.authorName)===mg(t.name)&&bg(i.payload.authorEmail)===bg(t.email)?s.push(i):o+=1:n.push(i);if(0===s.length&&0===o)return;let a=[],d=0;if(s.length>0){let t=await ng(i,!0);for(let i of s){let r=new AbortController,s=setTimeout(()=>r.abort(),ig);try{let s=await fetch(e,{method:"POST",headers:t,body:JSON.stringify(i.payload),signal:r.signal});if(s.ok){let t=await s.json().catch(()=>null);l(t,"id")&&"string"==typeof t.id&&tg(i.payload.projectName,e).add(t.id);continue}lg(s.status)?a.push(i):d+=1}catch{a.push(i)}finally{clearTimeout(s)}}}d>0&&console.warn(`[siteping] flushRetryQueue: dropped ${d} queued feedback(s) the server rejected (4xx) \u2014 they would fail identically on every replay`);let c=n.concat(a);c.length>0?localStorage.setItem(rg,JSON.stringify(c)):localStorage.removeItem(rg)}catch{}})}(t.endpoint,t.identity??Ng(),{apiKey:t.apiKey,headers:t.headers}).then(()=>i("Retry queue flushed")).catch(()=>{});let se=()=>{let e=++_;if(F?.isCurrentlyOpen)return F.refresh();let i=p(),r=c?{limit:20,url:i.url}:{limit:20};return x.getFeedbacks(t.projectName,r).then(({feedbacks:t})=>{if(z||e!==_||F?.isCurrentlyOpen)return;let r=c?t.filter(e=>e.url===i.url):t;D.render(r)})},ne="auto"===t.theme?function(e){if(typeof window>"u"||"function"!=typeof window.matchMedia)return()=>{};let t=window.matchMedia(Ye);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}(()=>{Object.assign(g,Fe(t.accentColor,"auto")),S(),N.restyle(),U.restyle(),se().catch(()=>{})}):void 0,oe=null;if(!1!==t.watchNavigation&&typeof window<"u"&&typeof history<"u"){let e=e=>`${e.url}\n${e.urlPattern??""}`,t=e(K),r=()=>{if(z)return;let r=e(p());if(r===t)return;let s=t;t=r,i("SPA navigation detected \u2014 refreshing feedbacks for new scope"),se().catch(()=>{t===r&&(t=s)})},s=history.pushState,n=history.replaceState,o=function(...e){s.apply(this,e),r()},a=function(...e){n.apply(this,e),r()};history.pushState=o,history.replaceState=a,window.addEventListener("popstate",r),window.addEventListener("hashchange",r),oe=()=>{window.removeEventListener("popstate",r),window.removeEventListener("hashchange",r),history.pushState===o&&(history.pushState=s),history.replaceState===a&&(history.replaceState=n)}}let pe=0,he=()=>{let e=new Rg,t=!0;return pe++,b.add(e),{destroy:()=>{t&&(t=!1,b.delete(e),0===--pe&&(i("Destroying widget"),Y&&document.removeEventListener("contextmenu",Y),z=!0,V=!1,oe?.(),ne?.(),T.destroy(),G(),j(),O.destroy(),F?.destroy(),U.destroy(),D.destroy(),N.destroy(),u?.dispose(),f?.dispose(),m.removeAll(),clearTimeout(L),B.remove(),C.remove(),A(),vm=null))},open:()=>{t&&m.emit("panel:toggle",!0)},close:()=>{t&&(F?F.close():V=!1)},refresh:()=>t?se().catch(()=>{}):Promise.resolve(),focusFeedback:e=>t&&(e=>D.focusFeedback(e))(e),on:(t,i)=>e.on(t,i),off:(t,i)=>{e.off(t,i)}}};return vm=he,he()}return O(),su(),
|
|
1
|
+
var SitePing=function(e){"use strict";var t=Object.defineProperty,i=(e,t,i)=>()=>{if(i)throw i[0];try{return e&&(t=e(e=0)),t}catch(e){throw i=[e],e}},r=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})};var n=i(()=>{});function s(e){return o.test(e)}var o,a=i(()=>{o=/^(?!\.)(?!.*\.\.)[\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 l(e,t){return function(e){return"object"==typeof e&&null!==e}(e)&&t in e}var d,c,p,h,u,f=i(()=>{}),g=i(()=>{f(),d=class extends Error{code;retryable;constructor(e,t,i){super(e),this.code=t,this.retryable=i,this.name="SitepingError"}},c=class extends d{constructor(e){super(e,"NETWORK",!0),this.name="SitepingNetworkError"}},p=class extends d{status;constructor(e,t){super(e,"VALIDATION",!1),this.name="SitepingValidationError",this.status=t}},h=class extends d{status;constructor(e,t){super(e,"AUTH",!1),this.name="SitepingAuthError",this.status=t}},u=["NETWORK","VALIDATION","AUTH","SERVER","TIMEOUT"]});function m(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}function b(e,t,i){return function(e,t){return e.replace(/\{(\w+)\}/g,(e,i)=>{let r=t[i];return void 0===r?e:String(r)})}(e(t),i)}var x=i(()=>{});function y(e){return S.includes(e)}function v(e,t){return l(e,"code")&&e.code===t}function w(e){return{cssSelector:e.anchor.cssSelector,xpath:e.anchor.xpath,textSnippet:e.anchor.textSnippet,elementTag:e.anchor.elementTag,elementId:e.anchor.elementId,textPrefix:e.anchor.textPrefix,textSuffix:e.anchor.textSuffix,fingerprint:e.anchor.fingerprint,neighborText:e.anchor.neighborText,anchorKey:e.anchor.anchorKey??null,xPct:e.rect.xPct,yPct:e.rect.yPct,wPct:e.rect.wPct,hPct:e.rect.hPct,scrollX:e.scrollX,scrollY:e.scrollY,viewportW:e.viewportW,viewportH:e.viewportH,devicePixelRatio:e.devicePixelRatio}}var k,C,S,E,M,A,T,L=i(()=>{f(),k=200,C=["open","in_progress","resolved","wont_fix"],S=["resolved","wont_fix"],E=5e3,M=class extends Error{code="STORE_DUPLICATE";constructor(e="Duplicate record",t){super(e,t),this.name="StoreDuplicateError"}},A=191,T=191});function R(){try{return crypto.randomUUID()}catch{return`${Date.now()}-${Math.random().toString(36).slice(2)}`}}async function B(e,t){let{status:i}=e,r=await e.text().catch(()=>"Unknown error"),n=`${t}: ${r?`${i} ${r}`:i}`;return 401===i||403===i?new h(n,i):i>=500||408===i||429===i?new d(n,"SERVER",!0):i>=400?new p(n,i):new d(n,"SERVER",!1)}function P(e,t){if(e instanceof c)return e;let i=e instanceof Error?e.message:String(e);return new c(`${t}: ${i}`)}var I,N,D,O=i(()=>{g(),I=(e,t)=>e?.[t]}),$=i(()=>{n(),a(),g(),x(),f(),L(),O()}),F=i(()=>{N="(max-width: 640px), (max-height: 500px) and (pointer: coarse)",D="cubic-bezier(0.23, 1, 0.32, 1)"});function z(e){return"SITEPING-WIDGET"===e.tagName||null!==e.closest("siteping-widget")||null!==e.closest('[data-siteping-ignore="true"]')||null!==e.closest("#siteping-markers")||null!==e.closest("#sp-tooltip")}function _(e){let t=e,i=e.shadowRoot?.activeElement;for(;i instanceof HTMLElement;){let e=i.getBoundingClientRect();e.width>=W&&e.height>=W&&(t=i),i=i.shadowRoot?.activeElement}return t}var W,H=i(()=>{W=4});function V(e){let t=document.createRange().createContextualFragment(e).firstElementChild;if("svg"!==t?.nodeName.toLowerCase())throw new Error("[siteping] Invalid SVG string");for(let e of[...t.attributes])e.name.startsWith("on")&&t.removeAttribute(e.name);for(let e of t.querySelectorAll("*"))for(let t of[...e.attributes])t.name.startsWith("on")&&e.removeAttribute(t.name);return t}function j(e,t){let i=document.createElement(e);if(t)for(let[e,r]of Object.entries(t))"class"===e?i.className=r:"style"===e?i.style.cssText=r:i.setAttribute(e,r);return i}function U(e,t){e.textContent=t}function q(e,t){let i=e.getRootNode(),r=i instanceof ShadowRoot?i.host:null,n=i=>{e.contains(i.target)||t()},s=e=>{e.target!==r&&t()};return i.addEventListener("click",n,!0),r&&document.addEventListener("click",s,!0),()=>{i.removeEventListener("click",n,!0),r&&document.removeEventListener("click",s,!0)}}function G(e,t){e.hidden=t,e.style.display=t?"none":""}function Y(e,t){e.toggleAttribute("inert",t)}function K(e){let t=e.getRootNode().activeElement;return null!==t&&e.contains(t)}function X(e){let t=Array.from(e.childNodes).map(e=>e.cloneNode(!0));return e.disabled=!0,e.replaceChildren(j("div",{class:"sp-spinner sp-spinner--sm"})),()=>{e.replaceChildren(...t),e.disabled=!1}}function J(){let e=navigator.userAgentData;return e?"macOS"===e.platform:navigator.platform?.includes("Mac")??/Macintosh|Mac OS X/i.test(navigator.userAgent)}function Q(e,t="en"){let i=Date.now()-new Date(e).getTime(),r=Math.floor(i/1e3);if(r<60)return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second");let n=new Intl.RelativeTimeFormat(t,{numeric:"always",style:"narrow"}),s=Math.floor(r/60);if(s<60)return n.format(-s,"minute");let o=Math.floor(s/60);if(o<24)return n.format(-o,"hour");let a=Math.floor(o/24);return a<7?n.format(-a,"day"):new Date(e).toLocaleDateString(t)}function Z(e){let t=()=>{e.style.scale=""};e.addEventListener("pointerdown",()=>{e.disabled||(e.style.scale="0.97")});for(let i of["pointerup","pointerleave","pointercancel"])e.addEventListener(i,t)}function ee(e,t){e.addEventListener("focus",()=>{e.matches(":focus-visible")&&(e.style.outline=`2px solid ${t}`,e.style.outlineOffset="2px")}),e.addEventListener("blur",()=>{e.style.outline="",e.style.outlineOffset=""})}var te=i(()=>{});function ie(e){for(let t=e;t;t=me(t))if(pe.has(t))return!0;return!1}function re(e,t){pe.add(e),t&&ue.set(e,t);for(let t of de)e.addEventListener(t,xe,{passive:!0});for(let t of["keydown","keypress","keyup"])e.addEventListener(t,ye);let i=()=>{for(let t of ce)("inert"!==t||!he.has(e))&&e.removeAttribute(t)};i(),new MutationObserver(i).observe(e,{attributeFilter:ce})}function ne(e,t){t?he.add(e):he.delete(e),e.toggleAttribute("inert",t)}function se(e,t){let i=fe.get(e);return i||(i=new Set,fe.set(e,i)),i.add(t),()=>{i.delete(t)}}function oe(e,t){let i=ge.get(e);return i||(i=new Set,ge.set(e,i)),i.add(t),e.addEventListener("keydown",t),()=>{i.delete(t),e.removeEventListener("keydown",t)}}function ae(){if("none"===getComputedStyle(document.body).pointerEvents)return!0;for(let e of document.querySelectorAll('[aria-modal="true"]'))if(e.getClientRects().length>0&&"visible"===getComputedStyle(e).visibility&&!ie(e))return!0;return!1}function le(e){let t=e.composedPath()[0];for(;t instanceof Element;){let e=(t.shadowRoot??ue.get(t))?.activeElement;if(!e)break;t=e}return t instanceof Node?t:null}var de,ce,pe,he,ue,fe,ge,me,be,xe,ye,ve,we,ke,Ce,Se,Ee,Me,Ae,Te,Le,Re,Be,Pe,Ie,Ne,De,Oe,$e,Fe,ze=i(()=>{de=["pointerdown","mousedown","touchstart","touchend","click","focusin","focusout","wheel","touchmove"],ce=["inert","aria-hidden"],pe=new WeakSet,he=new WeakSet,ue=new WeakMap,fe=new WeakMap,ge=new WeakMap,me=e=>e instanceof ShadowRoot?e.host:e.parentNode,be=e=>e instanceof Node&&ie(e),xe=e=>e.stopPropagation(),ye=e=>{let{key:t}=e,i=le(e);"Tab"!==t&&"Escape"!==t&&i instanceof HTMLElement&&(i.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(i.tagName))&&e.stopPropagation()}}),_e=i(()=>{ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="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>',we='<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>',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="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>',Ce='<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>',Se='<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>',Ee='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',Me='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="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>',Ae='<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>',Te='<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>',Le='<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>',Re='<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>',Be='<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>',Pe='<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>',Ie='<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>',Ne='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',De='<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>',Oe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',$e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="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>',Fe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="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>'});function We(e,t,i){let r="#";for(let n=1;n<7;n+=2){let s=parseInt(e.slice(n,n+2),16);r+=Math.round(s+(parseInt(t.slice(n,n+2),16)-s)*i).toString(16).padStart(2,"0")}return r}function He(e){let t=0;for(let[i,r]of[[1,.2126],[3,.7152],[5,.0722]]){let n=parseInt(e.slice(i,i+2),16)/255;t+=r*(n<=.04045?n/12.92:((n+.055)/1.055)**2.4)}return t}function Ve(e,t,i){let r=He(t),n=e;for(let t=1;t<=10;t++){let s=He(n);if((Math.max(s,r)+.05)/(Math.min(s,r)+.05)>=4.5)break;n=We(e,i,t/10)}return n}function je(e){return typeof window<"u"&&"function"==typeof window.matchMedia&&window.matchMedia(e).matches}function Ue(e=Xe,t){let i=function(e,t){let i=function(e){if(Je.test(e))return e;let t=Qe.test(e)?e.match(Qe):null;return t?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:Ze.test(e)?e.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${e}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),Xe)}(e),r=We(i,"#000000",.15);return"dark"===function(e){return"dark"===e||"auto"===e&&!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia(et).matches?"dark":"light"}(t)?{accent:i,accentLight:i+"22",accentDark:r,accentGlow:i+"44",accentGradient:i,accentText:Ve(i,We("#2c2c2e",i,34/255),"#ffffff"),bg:"#1c1c1e",bgHover:"#2c2c2e",text:"#f5f5f7",textSecondary:"#c1c1c6",textTertiary:"#a8a8ae",border:"#3a3a3c",shadow:"rgba(0, 0, 0, 0.4)",glassBg:Ke.dark.material,glassBgHeavy:Ke.dark.materialThick,glassBorder:Ke.dark.edge,glassBorderSubtle:Ke.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:Ke.dark}:{accent:i,accentLight:i+"14",accentDark:r,accentGlow:i+"33",accentGradient:i,accentText:Ve(i,We("#f2f2f7",i,20/255),"#000000"),bg:"#ffffff",bgHover:"#f2f2f7",text:"#1d1d1f",textSecondary:"#4f4f54",textTertiary:"#636368",border:"#e3e3e8",shadow:"rgba(0, 0, 0, 0.08)",glassBg:Ke.light.material,glassBgHeavy:Ke.light.materialThick,glassBorder:Ke.light.edge,glassBorderSubtle:Ke.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:Ke.light}}(e,t),r=je("(prefers-contrast: more)");if(!r&&!je("(prefers-reduced-transparency: reduce)"))return i;let{surface:n}=i,s=n.grouped;return{...i,glassBg:s,glassBgHeavy:s,...r?{glassBorderSubtle:i.textSecondary}:{},surface:{...n,material:s,materialThick:s,...r?{fill:n.fillContrast,separator:i.textSecondary,hairline:i.textSecondary}:{}}}}function qe(e,t){switch(e){case"question":return t.typeQuestion;case"change":return t.typeChange;case"bug":return t.typeBug;default:return t.typeOther}}function Ge(e,t){switch(e){case"in_progress":return t.statusInProgress;case"resolved":return t.statusResolved;case"wont_fix":return t.statusWontFix;default:return t.statusOpen}}function Ye(e,t){return e.split(t).join("var(--sp-hairline)")}var Ke,Xe,Je,Qe,Ze,et,tt,it=i(()=>{Ke={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)"}},Xe="#0066ff",Je=/^#[0-9a-fA-F]{6}$/,Qe=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,Ze=/^#[0-9a-fA-F]{8}$/,et="(prefers-color-scheme: dark)",tt='-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif'});function rt(e){return"function"==typeof window.matchMedia&&window.matchMedia(e).matches}function nt(){return rt(N)}function st(){return rt("(pointer: coarse)")}function ot(){return rt("(hover: hover) and (pointer: fine)")}function at(){return rt("(prefers-reduced-motion: reduce)")}function lt(e){let t=window.visualViewport;if(!t)return()=>{};let i=()=>e(Math.max(0,Math.round(window.innerHeight-t.height-t.offsetTop)),t.height);return i(),t.addEventListener("resize",i),t.addEventListener("scroll",i),()=>{t.removeEventListener("resize",i),t.removeEventListener("scroll",i)}}var dt=i(()=>{F()}),ct={};function pt(e={}){return new wt({allowDataUrls:!0,maxImageTimeout:3e5,...e})}function ht(e){return!(20===e.type&&"none"===e.value||18===e.type&&!xo[e.name])}function ut(e){if(!e||"none"===e)return rp;let t=ip.get(e);if(void 0!==t)return ip.delete(e),ip.set(e,t),t;let i=np(e);if(ip.size>=tp){let e=ip.keys().next().value;void 0!==e&&ip.delete(e)}return ip.set(e,i),i}function ft(e){let t=0,i=0;for(let r of e.functions)"blur"===r.kind?t+=r.value:"drop-shadow"===r.kind&&(t+=r.blur,i=Math.max(i,Math.abs(r.x),Math.abs(r.y)));return Math.ceil(3*t+i)}function gt(e){let t=(e.ownerDocument??document).createElement("canvas");return t.width=e.width,t.height=e.height,t}async function mt(e,t,i,r,n){if(id(n),t.functions.length>0&&function(e=document){let t=up.get(e);if(void 0!==t)return t;let i=e.createElement("canvas"),r=e.createElement("canvas"),n=!1;try{i.width=i.height=r.width=r.height=32;let e=i.getContext("2d"),t=r.getContext("2d");if(e&&t&&"filter"in t){e.fillStyle="#fff",e.fillRect(8,8,8,8),t.filter="blur(2px)",t.drawImage(i,0,0);let r=(t.getImageData(6,12,1,1).data[3]??0)>0;t.clearRect(0,0,32,32),t.filter="drop-shadow(12px 0px 0px rgba(255, 0, 0, 0.5))",t.drawImage(i,0,0);let s=t.getImageData(24,12,1,1).data;n=r&&(s[0]??0)>240&&(s[1]??0)<10&&(s[3]??0)>=126&&(s[3]??0)<=129}}catch{}finally{Zc(i),Zc(r)}return up.set(e,n),n}(e.ownerDocument??document)){let s=function(e,t,i,r,n){let s,o,a=!1;try{id(n),s=gt(e);let l=s.getContext("2d");if(!l||!("filter"in l)||(l.filter=pp(t,r),"none"===l.filter||""===l.filter))return null;l.drawImage(e,0,0),id(n),o=gt(e);let d=o.getContext("2d");return d?(d.globalAlpha=i,d.drawImage(s,0,0),id(n),a=!0,o):null}catch{return id(n),null}finally{s&&Zc(s),o&&!a&&Zc(o)}}(e,t,i,r,n);if(s)return s}if(!fp(t))throw new Qc("Filter chain requires native canvas filters");return async function(e,t,i,r,n){id(n);let s=t.functions.find(e=>"blur"===e.kind),o=t.functions.find(e=>"drop-shadow"===e.kind),a=s&&"blur"===s.kind?s.value:0,l=o&&"drop-shadow"===o.kind?{x:o.x,y:o.y,blur:o.blur,color:o.color}:void 0;if(!a&&!l){let t=gt(e),r=t.getContext("2d");if(!r)throw Zc(t),new Qc("Filter surface canvas is unavailable");r.globalAlpha=i;try{return r.drawImage(e,0,0),t}catch{throw Zc(t),new Qc("Filter surface image cannot be drawn")}}let d,c=e.ownerDocument??document,p=(e,t={})=>{let i=c.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach(([e,t])=>i.setAttribute(e,String(t))),i},h=p("svg",{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`}),u=p("defs"),f=p("filter",{id:"composited-filter",filterUnits:"userSpaceOnUse",x:0,y:0,width:e.width,height:e.height,"color-interpolation-filters":"sRGB"});if(a&&f.appendChild(p("feGaussianBlur",{stdDeviation:a*r,result:"blurred-source"})),l){f.appendChild(p("feGaussianBlur",{in:a?"blurred-source":"SourceAlpha",stdDeviation:l.blur*r})),f.appendChild(p("feOffset",{dx:l.x*r,dy:l.y*r,result:"offset-shadow"})),f.appendChild(p("feFlood",{"flood-color":l.color})),f.appendChild(p("feComposite",{in2:"offset-shadow",operator:"in"}));let e=p("feMerge");e.appendChild(p("feMergeNode")),e.appendChild(p("feMergeNode",{in:a?"blurred-source":"SourceGraphic"})),f.appendChild(e)}u.appendChild(f),h.appendChild(u);try{if(d=e.toDataURL("image/png"),"data:,"===d)throw new Error("Canvas size is unsupported")}catch{throw new Qc("Filter surface pixels cannot be serialized")}h.appendChild(p("image",{width:e.width,height:e.height,href:d,filter:"url(#composited-filter)"}));let g,m=c.defaultView,b=m?.Image?new m.Image:new Image;try{b.src=`data:image/svg+xml,${encodeURIComponent((new XMLSerializer).serializeToString(h))}`,await hp(b,n),id(n),g=gt(e);let t=g.getContext("2d");if(!t)throw new Qc("Filter surface canvas is unavailable");return t.globalAlpha=i,t.drawImage(b,0,0),g}catch(e){throw g&&Zc(g),n?.aborted&&id(n),e instanceof Qc?e:new Qc("Filter surface image cannot be drawn")}finally{b.removeAttribute("src")}}(e,t,i,r,n)}function bt(e,t,i){let r=t*i*4;return!Number.isFinite(r)||t<=0||i<=0||t>8192||i>8192||e.pixels+r>16777216?0:(e.pixels+=r,r)}function xt(e){let t=e.styles,i=e.bounds;for(let r of t.boxShadow)if(!r.inset){let t=Math.max(0,r.spread.number)+3*r.blur.number;i=mp(i,gp(e.bounds.add(r.offsetX.number,r.offsetY.number,0,0),t))}for(let r of e.textNodes)for(let n of r.textBounds){let r=gp(n.bounds,2*Hi(t.fontSize,e.bounds.height)+t.webkitTextStrokeWidth);i=mp(i,r);for(let e of t.textShadow)i=mp(i,gp(r.add(e.offsetX.number,e.offsetY.number,0,0),3*e.blur.number))}for(let t of e.elements)t.styles.isVisible()&&(i=mp(i,xt(t)));let r=ut(t.filter);return gp(i,r?ft(r):0)}function yt(e,t,i,r){let n=gp(t,i),s=Math.floor(Math.max(e.left,n.left)*r)/r,o=Math.floor(Math.max(e.top,n.top)*r)/r,a=Math.ceil(Math.min(e.left+e.width,n.left+n.width)*r)/r,l=Math.ceil(Math.min(e.top+e.height,n.top+n.height)*r)/r;return new Ct(s,o,Math.max(0,a-s),Math.max(0,l-o))}r(ct,{Html2CanvasConfig:()=>vt,PerformanceMonitor:()=>kt,Validator:()=>wt,createDefaultValidator:()=>pt,default:()=>Dh,html2canvas:()=>Dh});var vt,wt,kt,Ct,St,Et,Mt,At,Tt,Lt,Rt,Bt,Pt,It,Nt,Dt,Ot,$t,Ft,zt,_t,Wt,Ht,Vt,jt,Ut,qt,Gt,Yt,Kt,Xt,Jt,Qt,Zt,ei,ti,ii,ri,ni,si,oi,ai,li,di,ci,pi,hi,ui,fi,gi,mi,bi,xi,yi,vi,wi,ki,Ci,Si,Ei,Mi,Ai,Ti,Li,Ri,Bi,Pi,Ii,Ni,Di,Oi,$i,Fi,zi,_i,Wi,Hi,Vi,ji,Ui,qi,Gi,Yi,Ki,Xi,Ji,Qi,Zi,er,tr,ir,rr,nr,sr,or,ar,lr,dr,cr,pr,hr,ur,fr,gr,mr,br,xr,yr,vr,wr,kr,Cr,Sr,Er,Mr,Ar,Tr,Lr,Rr,Br,Pr,Ir,Nr,Dr,Or,$r,Fr,zr,_r,Wr,Hr,Vr,jr,Ur,qr,Gr,Yr,Kr,Xr,Jr,Qr,Zr,en,tn,rn,nn,sn,on,an,ln,dn,cn,pn,hn,un,fn,gn,mn,bn,xn,yn,vn,wn,kn,Cn,Sn,En,Mn,An,Tn,Ln,Rn,Bn,Pn,In,Nn,Dn,On,$n,Fn,zn,_n,Wn,Hn,Vn,jn,Un,qn,Gn,Yn,Kn,Xn,Jn,Qn,Zn,es,ts,is,rs,ns,ss,os,as,ls,ds,cs,ps,hs,us,fs,gs,ms,bs,xs,ys,vs,ws,ks,Cs,Ss,Es,Ms,As,Ts,Ls,Rs,Bs,Ps,Is,Ns,Ds,Os,$s,Fs,zs,_s,Ws,Hs,Vs,js,Us,qs,Gs,Ys,Ks,Xs,Js,Qs,Zs,eo,to,io,ro,no,so,oo,ao,lo,co,po,ho,uo,fo,go,mo,bo,xo,yo,vo,wo,ko,Co,So,Eo,Mo,Ao,To,Lo,Ro,Bo,Po,Io,No,Do,Oo,$o,Fo,zo,_o,Wo,Ho,Vo,jo,Uo,qo,Go,Yo,Ko,Xo,Jo,Qo,Zo,ea,ta,ia,ra,na,sa,oa,aa,la,da,ca,pa,ha,ua,fa,ga,ma,ba,xa,ya,va,wa,ka,Ca,Sa,Ea,Ma,Aa,Ta,La,Ra,Ba,Pa,Ia,Na,Da,Oa,$a,Fa,za,_a,Wa,Ha,Va,ja,Ua,qa,Ga,Ya,Ka,Xa,Ja,Qa,Za,el,tl,il,rl,nl,sl,ol,al,ll,dl,cl,pl,hl,ul,fl,gl,ml,bl,xl,yl,vl,wl,kl,Cl,Sl,El,Ml,Al,Tl,Ll,Rl,Bl,Pl,Il,Nl,Dl,Ol,$l,Fl,zl,_l,Wl,Hl,Vl,jl,Ul,ql,Gl,Yl,Kl,Xl,Jl,Ql,Zl,ed,td,id,rd,nd,sd,od,ad,ld,dd,cd,pd,hd,ud,fd,gd,md,bd,xd,yd,vd,wd,kd,Cd,Sd,Ed,Md,Ad,Td,Ld,Rd,Bd,Pd,Id,Nd,Dd,Od,$d,Fd,zd,_d,Wd,Hd,Vd,jd,Ud,qd,Gd,Yd,Kd,Xd,Jd,Qd,Zd,ec,tc,ic,rc,nc,sc,oc,ac,lc,dc,cc,pc,hc,uc,fc,gc,mc,bc,xc,yc,vc,wc,kc,Cc,Sc,Ec,Mc,Ac,Tc,Lc,Rc,Bc,Pc,Ic,Nc,Dc,Oc,$c,Fc,zc,_c,Wc,Hc,Vc,jc,Uc,qc,Gc,Yc,Kc,Xc,Jc,Qc,Zc,ep,tp,ip,rp,np,sp,op,ap,lp,dp,cp,pp,hp,up,fp,gp,mp,bp,xp,yp,vp,wp,kp,Cp,Sp,Ep,Mp,Ap,Tp,Lp,Rp,Bp,Pp,Ip,Np,Dp,Op,$p,Fp,zp,_p,Wp,Hp,Vp,jp,Up,qp,Gp,Yp,Kp,Xp,Jp,Qp,Zp,eh,th,ih,rh,nh,sh,oh,ah,lh,dh,ch,ph,hh,uh,fh,gh,mh,bh,xh,yh,vh,wh,kh,Ch,Sh,Eh,Mh,Ah,Th,Lh,Rh,Bh,Ph,Ih,Nh,Dh,Oh,$h=i(()=>{vt=class e{window;cspNonce;cache;constructor(e={}){let t=e.window||(typeof window<"u"?window:void 0);if(!t)throw new Error("Window object is required but not available");this.window=t,this.cspNonce=e.cspNonce,this.cache=e.cache}static fromElement(t,i={}){let r=t.ownerDocument;if(!r)throw new Error("Element is not attached to a document");let n=r.defaultView;if(!n)throw new Error("Document is not attached to a window");return new e({window:n,...i})}clone(t={}){return new e({window:t.window||this.window,cspNonce:t.cspNonce??this.cspNonce,cache:t.cache??this.cache})}},wt=class{config;constructor(e={}){this.config={maxImageTimeout:3e5,allowDataUrls:!0,...e}}validateUrl(e,t="general"){if(!e||"string"!=typeof e)return{valid:!1,error:"URL must be a non-empty string"};if(e.startsWith("data:"))return this.config.allowDataUrls?{valid:!0,sanitized:e}:{valid:!1,error:"Data URLs are not allowed"};if(e.startsWith("blob:"))return{valid:!0,sanitized:e};try{let i=new URL(e);if(!["http:","https:"].includes(i.protocol))return{valid:!1,error:`Protocol ${i.protocol} is not allowed. Only http and https are permitted.`};if("proxy"===t&&this.config.allowedProxyDomains&&this.config.allowedProxyDomains.length>0){let e=i.hostname.toLowerCase();if(!this.config.allowedProxyDomains.some(t=>{let i=t.toLowerCase();return e===i||e.endsWith("."+i)}))return{valid:!1,error:`Proxy domain ${i.hostname} is not in the allowed list`}}if("proxy"===t){if(!this.config.allowLocalhostProxy){let e=i.hostname.toLowerCase();if("localhost"===e||"127.0.0.1"===e||"::1"===e)return{valid:!1,error:"Localhost is not allowed for proxy URLs"};if(this.isPrivateIP(e))return{valid:!1,error:"Private IP addresses are not allowed for proxy URLs"};if(e.startsWith("169.254.")||e.startsWith("fe80:"))return{valid:!1,error:"Link-local addresses are not allowed for proxy URLs"}}return{valid:!0,sanitized:e}}return{valid:!0,sanitized:e}}catch(e){return{valid:!1,error:`Invalid URL format: ${e instanceof Error?e.message:"Unknown error"}`}}}isPrivateIP(e){return!![/^0\./,/^10\./,/^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\./,/^127\./,/^169\.254\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.0\.0\./,/^192\.0\.2\./,/^192\.168\./,/^198\.(1[8-9])\./,/^198\.51\.100\./,/^203\.0\.113\./,/^2(2[4-9]|3[0-9])\./,/^24[0-9]\./,/^255\.255\.255\.255$/].some(t=>t.test(e))||!!e.includes(":")&&this.isPrivateIPv6(e)}isPrivateIPv6(e){let t=e.toLowerCase().trim().replace(/^\[|\]$/g,""),i=t.split("%")[0]??t;if(/^(0:){7}1$/.test(i)||"::1"===i||/^(0:){7}0$/.test(i)||"::"===i)return!0;let r=this.expandIPv6(i);if(!r)return this.isPrivateIPv6Prefix(i);let n=parseInt(r.substring(0,2),16);if(n>=252&&n<=253)return!0;if(254===n){let e=parseInt(r.substring(2,4),16);if(e>=128&&e<=191)return!0}return 255===n}expandIPv6(e){try{if(e.includes("::")){let t=e.split("::");if(t.length>2)return null;let i=t[0]?t[0].split(":"):[],r=t[1]?t[1].split(":"):[],n=8-i.length-r.length;if(n<0)return null;let s=Array(n).fill("0000");return[...i,...s,...r].map(e=>e.padStart(4,"0")).join(":")}{let t=e.split(":");return 8!==t.length?null:t.map(e=>e.padStart(4,"0")).join(":")}}catch{return null}}isPrivateIPv6Prefix(e){return!!(/^fc[0-9a-f]{0,2}:?/i.test(e)||/^fd[0-9a-f]{0,2}:?/i.test(e)||/^fe[89ab][0-9a-f]:?/i.test(e)||/^ff[0-9a-f]{0,2}:?/i.test(e))}validateCspNonce(e){return e&&"string"==typeof e?e.length<16?{valid:!1,error:"CSP nonce is too short (minimum 16 characters recommended)"}:/^[A-Za-z0-9+/=_-]+$/.test(e)?{valid:!0,sanitized:e}:{valid:!1,error:"CSP nonce contains invalid characters"}:{valid:!1,error:"CSP nonce must be a non-empty string"}}validateImageTimeout(e){return"number"!=typeof e||isNaN(e)?{valid:!1,error:"Image timeout must be a number"}:e<0?{valid:!1,error:"Image timeout cannot be negative"}:this.config.maxImageTimeout&&e>this.config.maxImageTimeout?{valid:!1,error:`Image timeout ${e}ms exceeds maximum allowed ${this.config.maxImageTimeout}ms`}:{valid:!0,sanitized:e}}validateDimensions(e,t){if("number"!=typeof e||"number"!=typeof t)return{valid:!1,error:"Dimensions must be numbers"};if(isNaN(e)||isNaN(t))return{valid:!1,error:"Dimensions cannot be NaN"};if(e<=0||t<=0)return{valid:!1,error:"Dimensions must be positive"};let i=32767;return e>i||t>i?{valid:!1,error:`Dimensions exceed maximum allowed (${i}px)`}:{valid:!0,sanitized:{width:e,height:t}}}validateScale(e){return"number"!=typeof e||isNaN(e)?{valid:!1,error:"Scale must be a number"}:e<=0?{valid:!1,error:"Scale must be positive"}:e>10?{valid:!1,error:"Scale factor too large (maximum 10x)"}:{valid:!0,sanitized:e}}validateElement(e){if(!e)return{valid:!1,error:"Element is required"};if("object"!=typeof e)return{valid:!1,error:"Element must be an object"};let t=e;return typeof HTMLElement<"u"&&e instanceof HTMLElement?e.ownerDocument?{valid:!0}:{valid:!1,error:"Element must be attached to a document"}:t.ownerDocument?t.ownerDocument.defaultView?{valid:!0}:{valid:!1,error:"Document must be attached to a window (ownerDocument.defaultView required)"}:{valid:!1,error:"Element must be attached to a document (ownerDocument required)"}}validateOptions(e){let t=[],i=e.proxy;if(null!=i&&"string"==typeof i&&i.length>0){let e=this.validateUrl(i,"proxy");e.valid||t.push(`Proxy: ${e.error}`)}if(void 0!==e.imageTimeout){let i=this.validateImageTimeout(e.imageTimeout);i.valid||t.push(`Image timeout: ${i.error}`)}if(void 0!==e.width||void 0!==e.height){let i=e.width??800,r=e.height??600,n=this.validateDimensions(i,r);n.valid||t.push(`Dimensions: ${n.error}`)}if(void 0!==e.scale){let i=this.validateScale(e.scale);i.valid||t.push(`Scale: ${i.error}`)}if(void 0!==e.cspNonce){let i=this.validateCspNonce(e.cspNonce);i.valid||t.push(`CSP nonce: ${i.error}`)}if(this.config.customValidator){let i=this.config.customValidator(e,"options");i.valid||t.push(`Custom validation: ${i.error}`)}return t.length>0?{valid:!1,error:t.join("; ")}:{valid:!0}}},kt=class{context;activeMetrics=new Map;completedMetrics=[];enabled;getTime;constructor(e,t=!0){this.context=e,this.enabled=t,this.getTime=typeof performance<"u"&&"function"==typeof performance.now?()=>performance.now():()=>Date.now()}start(e,t){this.enabled&&(this.activeMetrics.has(e)&&this.context?.logger.warn(`Performance metric '${e}' already started. Overwriting.`),this.activeMetrics.set(e,{name:e,startTime:this.getTime(),metadata:t}))}end(e){if(!this.enabled)return;let t=this.activeMetrics.get(e);if(t)return t.endTime=this.getTime(),t.duration=t.endTime-t.startTime,this.completedMetrics.push(t),this.activeMetrics.delete(e),this.context?.logger.debug(`\u23f1\ufe0f ${e}: ${t.duration.toFixed(2)}ms`,t.metadata),t;this.context?.logger.warn(`Performance metric '${e}' not found. Was start() called?`)}measure(e,t,i){this.start(e,i);try{let i=t();return this.end(e),i}catch(t){throw this.end(e),t}}async measureAsync(e,t,i){this.start(e,i);try{let i=await t();return this.end(e),i}catch(t){throw this.end(e),t}}getMetrics(){return[...this.completedMetrics]}getMetric(e){return this.completedMetrics.find(t=>t.name===e)}getSummary(){let e=this.completedMetrics.reduce((e,t)=>e+(t.duration||0),0),t=this.completedMetrics.map(t=>({name:t.name,duration:t.duration||0,percentage:e>0?((t.duration||0)/e*100).toFixed(1)+"%":"0%"}));return{totalDuration:e,metrics:this.getMetrics(),breakdown:t}}logSummary(){if(!this.enabled||0===this.completedMetrics.length||!this.context)return;let e=this.getSummary();this.context.logger.info(`\n\ud83d\udcca Performance Summary (Total: ${e.totalDuration.toFixed(2)}ms):`),e.breakdown.sort((e,t)=>t.duration-e.duration).forEach(e=>{this.context.logger.info(` ${e.name.padEnd(20)} ${e.duration.toFixed(2).padStart(8)}ms ${e.percentage.padStart(6)}`)})}clear(){this.activeMetrics.clear(),this.completedMetrics.splice(0)}isEnabled(){return this.enabled}getActiveMetrics(){return Array.from(this.activeMetrics.keys())}},Ct=class e{left;top;width;height;constructor(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}add(t,i,r,n){return new e(this.left+t,this.top+i,this.width+r,this.height+n)}static fromClientRect(t,i){return new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height)}static fromDOMRectList(t,i){let r=Array.from(i),n=r.find(e=>0!==e.width);return n||(n=r.find(e=>0!==e.height)),!n&&r.length>0&&(n=r[0]),n?new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):e.EMPTY}static EMPTY=new e(0,0,0,0)},St=(e,t)=>Ct.fromClientRect(e,t.getBoundingClientRect()),Et=e=>{let t=e.body,i=e.documentElement;if(!t||!i)throw new Error("Unable to get document size");return new Ct(0,0,Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight)))},Mt=(e,t)=>{let i=e[t];if(void 0===i)throw new Error(`Missing element at index ${t}`);return i},At=e=>e>=48&&e<=57,Tt=e=>e>=55296&&e<=57343,Lt=e=>At(e)||e>=65&&e<=70||e>=97&&e<=102,Rt=e=>e>=97&&e<=122,Bt=e=>e>=65&&e<=90,Pt=e=>Rt(e)||Bt(e),It=e=>e>=128,Nt=e=>10===e||9===e||32===e,Dt=e=>Pt(e)||It(e)||95===e,Ot=e=>Dt(e)||At(e)||45===e,$t=e=>e>=0&&e<=8||11===e||e>=14&&e<=31||127===e,Ft=(e,t)=>92===e&&10!==t,zt=(e,t,i)=>45===e?Dt(t)||Ft(t,i):!!Dt(e)||!(92!==e||!Ft(e,t)),_t=(e,t,i)=>43===e||45===e?!!At(t)||46===t&&At(i):At(46===e?t:e),Wt=e=>{let t=0,i=1;(43===e[t]||45===e[t])&&(45===e[t]&&(i=-1),t++);let r=[];for(;At(e[t]??NaN);)r.push(Mt(e,t)),t++;let n=r.length?parseInt(String.fromCodePoint(...r),10):0;46===e[t]&&t++;let s=[];for(;At(e[t]??NaN);)s.push(Mt(e,t)),t++;let o=s.length,a=o?parseInt(String.fromCodePoint(...s),10):0;(69===e[t]||101===e[t])&&t++;let l=1;(43===e[t]||45===e[t])&&(45===e[t]&&(l=-1),t++);let d=[];for(;At(e[t]??NaN);)d.push(Mt(e,t)),t++;let c=d.length?parseInt(String.fromCodePoint(...d),10):0;return i*(n+a*Math.pow(10,-o))*Math.pow(10,l*c)},Ht={type:2},Vt={type:3},jt={type:4},Ut={type:13},qt={type:8},Gt={type:21},Yt={type:9},Kt={type:10},Xt={type:11},Jt={type:12},Qt={type:14},Zt={type:23},ei={type:1},ti={type:25},ii={type:24},ri={type:26},ni={type:27},si={type:28},oi={type:29},ai={type:31},li={type:32},di=class e{static _pool=[];static MAX_POOL_SIZE=40;static get(){return e._pool.pop()||new e}static release(t){e._pool.length<e.MAX_POOL_SIZE&&(t._reset(),e._pool.push(t))}_value;_cursor;constructor(){this._value=[],this._cursor=0}_reset(){this._value=[],this._cursor=0}write(e){this._cursor>0&&(this._value=this._value.slice(this._cursor),this._cursor=0),this._value=this._value.concat([...e].map(e=>e.codePointAt(0)))}read(){let e=[],t=this.consumeToken();for(;t!==li;)e.push(t),t=this.consumeToken();return e}consumeToken(){let e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Ot(e)||Ft(t,i)){let r=zt(e,t,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break}case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ut;break;case 39:return this.consumeStringToken(39);case 40:return Ht;case 41:return Vt;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Qt;break;case 43:if(_t(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return jt;case 45:{let t=e,i=this.peekCodePoint(0),r=this.peekCodePoint(1);if(_t(t,i,r))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(zt(t,i,r))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===i&&62===r)return this.consumeCodePoint(),this.consumeCodePoint(),ii;break}case 46:if(_t(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){let e=this.consumeCodePoint();if(42===e&&(e=this.consumeCodePoint(),47===e))return this.consumeToken();if(-1===e)return this.consumeToken()}break;case 58:return ri;case 59:return ni;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),this.consumeCodePoint(),ti;break;case 64:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),i=this.peekCodePoint(2);if(zt(e,t,i))return{type:7,value:this.consumeName()};break}case 91:return si;case 92:if(Ft(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return oi;case 94:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),qt;break;case 123:return Xt;case 125:return Jt;case 117:case 85:{let t=this.peekCodePoint(0),i=this.peekCodePoint(1);return 43!==t||!Lt(i)&&63!==i?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):(this.consumeCodePoint(),this.consumeUnicodeRangeToken())}case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Yt;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Gt;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Kt;break;case-1:return li}return Nt(e)?(this.consumeWhiteSpace(),ai):At(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Dt(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:String.fromCodePoint(e)}}consumeCodePoint(){let e=this._value[this._cursor];return void 0===e?-1:(this._cursor++,e)}reconsumeCodePoint(e){this._cursor>0&&this._value[this._cursor-1]===e?this._cursor--:this._value.splice(this._cursor,0,e)}peekCodePoint(e){let t=this._value[this._cursor+e];return void 0!==t?t:-1}consumeUnicodeRangeToken(){let e=[],t=this.consumeCodePoint();for(;Lt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();let i=!1;for(;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(String.fromCodePoint(...e.map(e=>63===e?48:e)),16),end:parseInt(String.fromCodePoint(...e.map(e=>63===e?70:e)),16)};let r=parseInt(String.fromCodePoint(...e),16);if(45===t&&Lt(this.peekCodePoint(0))){t=this.consumeCodePoint();let e=[];for(;Lt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(String.fromCodePoint(...e),16)}}return{type:30,start:r,end:r}}consumeIdentLikeToken(){let e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}}consumeUrlToken(){let e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};let t=this.peekCodePoint(0);if(39===t||34===t){let e=this.consumeStringToken(this.consumeCodePoint());return 0===e.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Zt)}for(;;){let t=this.consumeCodePoint();if(-1===t||41===t)return{type:22,value:String.fromCodePoint(...e)};if(Nt(t))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:String.fromCodePoint(...e)}):(this.consumeBadUrlRemnants(),Zt);if(34===t||39===t||40===t||$t(t))return this.consumeBadUrlRemnants(),Zt;if(92===t){if(!Ft(t,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Zt;e.push(this.consumeEscapedCodePoint())}else e.push(t)}}consumeWhiteSpace(){for(;Nt(this.peekCodePoint(0));)this.consumeCodePoint()}consumeBadUrlRemnants(){for(;;){let e=this.consumeCodePoint();if(41===e||-1===e)return;Ft(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}}consumeStringSlice(e){let t="",i=this._cursor+e,r=this._cursor;for(;r<i;){let e=Math.min(i,r+5e4);t+=String.fromCodePoint(...this._value.slice(r,e)),r=e}return this._cursor=i+1,t}consumeStringToken(e){let t="",i=0;for(;;){let r=this._value[this._cursor+i];if(-1===r||void 0===r||r===e)return t+=this.consumeStringSlice(i),{type:0,value:t};if(10===r)return this._cursor+=i,ei;if(92===r){let e=this._value[this._cursor+i+1];-1!==e&&void 0!==e&&(10===e?(t+=this.consumeStringSlice(i),i=-1,this._cursor++):Ft(r,e)&&(t+=this.consumeStringSlice(i),t+=String.fromCodePoint(this.consumeEscapedCodePoint()),i=-1))}i++}}consumeNumber(){let e=[],t=4,i=this.peekCodePoint(0);for((43===i||45===i)&&e.push(this.consumeCodePoint());At(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);let r=this.peekCodePoint(1);if(46===i&&At(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;At(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);let n=this.peekCodePoint(2);if((69===i||101===i)&&((43===r||45===r)&&At(n)||At(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;At(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Wt(e),t]}consumeNumericToken(){let[e,t]=this.consumeNumber(),i=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);return zt(i,r,n)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}}consumeEscapedCodePoint(){let e=this.consumeCodePoint();if(Lt(e)){let t=String.fromCodePoint(e);for(;Lt(this.peekCodePoint(0))&&t.length<6;)t+=String.fromCodePoint(this.consumeCodePoint());Nt(this.peekCodePoint(0))&&this.consumeCodePoint();let i=parseInt(t,16);return 0===i||Tt(i)||i>1114111?65533:i}return-1===e?65533:e}consumeName(){let e="";for(;;){let t=this.consumeCodePoint();if(Ot(t))e+=String.fromCodePoint(t);else{if(!Ft(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=String.fromCodePoint(this.consumeEscapedCodePoint())}}}},ci=class e{_tokens;constructor(e){this._tokens=e}static create(t){let i=new di;return i.write(t),new e(i.read())}static parseValue(t){return e.create(t).parseComponentValue()}static parseValues(t){return e.create(t).parseComponentValues()}parseComponentValue(){let e=this.consumeToken();for(;31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);let t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")}parseComponentValues(){let e=[];for(;;){let t=this.consumeComponentValue();if(32===t.type)return e;e.push(t)}}consumeComponentValue(){let e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e}consumeSimpleBlock(e){let t={type:e,values:[]},i=this.consumeToken();for(;;){if(32===i.type||yi(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}}consumeFunction(e){let t={name:e.value,values:[],type:18};for(;;){let e=this.consumeToken();if(32===e.type||3===e.type)return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue())}}consumeToken(){let e=this._tokens.shift();return typeof e>"u"?li:e}reconsumeToken(e){this._tokens.unshift(e)}},pi=e=>15===e.type,hi=e=>17===e.type,ui=e=>20===e.type,fi=e=>0===e.type,gi=(e,t)=>ui(e)&&e.value===t,mi=e=>31!==e.type,bi=e=>31!==e.type&&4!==e.type,xi=e=>{let t=[],i=[];return e.forEach(e=>{4!==e.type?31!==e.type&&i.push(e):i.length&&(t.push(i),i=[])}),i.length&&t.push(i),t},yi=(e,t)=>11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type,vi=/(\d+(?:\.\d+)?|[+\-*/()])/g,wi=e=>{let t=e.match(vi);if(!t)return NaN;let i=[],r=[],n={"+":1,"-":1,"*":2,"/":2};for(let e of t)if(/^\d+(?:\.\d+)?$/.test(e))i.push(parseFloat(e));else if("("===e)r.push(e);else if(")"===e){for(;r.length&&"("!==r[r.length-1];)i.push(r.pop());if(!r.length)return NaN;r.pop()}else{for(;r.length&&(n[Mt(r,r.length-1)]??0)>=(n[e]??0);)i.push(r.pop());r.push(e)}for(;r.length;){let e=r.pop();if("("===e)return NaN;i.push(e)}let s=[];for(let e of i)if("number"==typeof e)s.push(e);else{let t=s.pop(),i=s.pop();if(void 0===i||void 0===t)return NaN;switch(e){case"+":s.push(i+t);break;case"-":s.push(i-t);break;case"*":s.push(i*t);break;case"/":s.push(0===t?NaN:i/t);break;default:return NaN}}return 1===s.length?s[0]??NaN:NaN},ki=(e,t,i)=>Math.min(Math.max(e,t),i),Ci=(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]],Si=e=>Ci([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],e),Ei=e=>Ci([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],e),Mi=e=>{let[t,i,r]=e,n=e=>{let t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e};return[n(t),n(i),n(r)]},Ai=e=>{let[t,i,r]=e,n=e=>{let t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4};return[n(t),n(i),n(r)]},Ti=e=>{let[t,i,r]=Mi(Si([e[0],e[1],e[2]]));return[t,i,r,e[3]]},Li=e=>{let[t,i,r]=Si([e[0],e[1],e[2]]);return[ki(Math.round(255*t),0,255),ki(Math.round(255*i),0,255),ki(Math.round(255*r),0,255),e[3]]},Ri=e=>17===e.type||15===e.type,Bi=e=>16===e.type||Ri(e)||Pi(e),Pi=e=>17===e.type&&void 0!==e._calcPercentage,Ii=e=>18===e.type&&"calc"===e.name,Ni=e=>{let t=Oi(e,0);if(!t)return null;let i=Oi(e,100);if(!i)return null;let r=t.number,n=i.number-r;return 0===n?t:{type:17,number:r,flags:4,_calcPercentage:n,_calcPixelOffset:r}},Di=e=>Ii(e)?Ni(e):Bi(e)?e:null,Oi=(e,t=0)=>{let i=e=>{let r="";for(let n of e)if(31!==n.type)if(18===n.type){if("calc"!==n.name)return null;{let e=i(n.values);if(null===e)return null;r+=`(${e})`}}else if(17===n.type)r+=n.number.toString();else if(15===n.type)"px"===n.unit?r+=n.number.toString():"rem"===n.unit||"em"===n.unit?r+=(16*n.number).toString():r+=n.number.toString();else if(16===n.type)r+=(n.number/100*t).toString();else if(6===n.type){let e=n.value;"+"===e||"-"===e||"*"===e||"/"===e?r+=` ${e} `:"("===e?r+="(":")"===e&&(r+=")")}return r};try{let t=i(e.values);if(null===t||""===t.trim())return null;let r=wi(t);if("number"==typeof r&&!isNaN(r))return{type:17,number:r,flags:4}}catch{return null}return null},$i=e=>e.length>1?[Mt(e,0),Mt(e,1)]:[Mt(e,0)],Fi={type:17,number:0,flags:4},zi={type:16,number:50,flags:4},_i={type:16,number:100,flags:4},Wi=(e,t,i)=>{let[r,n]=e;return[Hi(r,t),Hi(typeof n<"u"?n:r,i)]},Hi=(e,t)=>{if(Pi(e))return e._calcPercentage/100*t+e._calcPixelOffset;if(16===e.type)return e.number/100*t;if(pi(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Vi="grad",ji="turn",Ui={name:"angle",parse:(e,t)=>{if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Vi:return Math.PI/200*t.number;case"rad":return t.number;case ji:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},qi=e=>15===e.type&&("deg"===e.unit||e.unit===Vi||"rad"===e.unit||e.unit===ji),Gi=e=>{switch(e.filter(ui).map(e=>e.value).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Fi,Fi];case"to top":case"bottom":return Yi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Fi,_i];case"to right":case"left":return Yi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[_i,_i];case"to bottom":case"top":return Yi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[_i,Fi];case"to left":case"right":return Yi(270)}return 0},Yi=e=>Math.PI*e/180,Ki=e=>!(255&e),Xi=e=>{let t=255&e,i=255&e>>8,r=255&e>>16,n=255&e>>24;return t<255?`rgba(${n},${r},${i},${t/255})`:`rgb(${n},${r},${i})`},Ji=(e,t,i,r)=>(e<<24|t<<16|i<<8|Math.round(255*r))>>>0,Qi=(e,t)=>{if(17===e.type)return e.number;if(16===e.type){let i=3===t?1:255;return 3===t?e.number/100*i:Math.round(e.number/100*i)}return 0},Zi=e=>{let t=e[0];return"from"===(t&&20===t.type?t.value:"unknown")},er=e=>Ji(ki(Math.round(255*e[0]),0,255),ki(Math.round(255*e[1]),0,255),ki(Math.round(255*e[2]),0,255),ki(e[3],0,1)),tr=e=>{let[t,i,r,n]=e,s=Mi([t,i,r]);return Ji(ki(Math.round(255*s[0]),0,255),ki(Math.round(255*s[1]),0,255),ki(Math.round(255*s[2]),0,255),n)},ir=e=>{let t=Si([e[0],e[1],e[2]]);return tr([t[0],t[1],t[2],e[3]])},rr=(e,t)=>{if(Zi(t.filter(bi)))throw new Error("Relative color not supported for lab()");let[i,r,n,s]=pr(t),o=nr(t)?100*i:i,a=Mi(Si(yr([o,r,n])));return Ji(ki(Math.round(255*a[0]),0,255),ki(Math.round(255*a[1]),0,255),ki(Math.round(255*a[2]),0,255),s)},nr=e=>{let t=e.filter(bi)[0];return void 0!==t&&16===t.type},sr=(e,t)=>{if(Zi(t.filter(bi)))throw new Error("Relative color not supported for oklab()");let[i,r,n,s]=pr(t),o=Mi(Si(xr([i,r,n])));return Ji(ki(Math.round(255*o[0]),0,255),ki(Math.round(255*o[1]),0,255),ki(Math.round(255*o[2]),0,255),s)},or=(e,t)=>{if(Zi(t.filter(bi)))throw new Error("Relative color not supported for oklch()");let[i,r,n,s]=hr(t),o=Mi(Si(xr(br([i,r,n]))));return Ji(ki(Math.round(255*o[0]),0,255),ki(Math.round(255*o[1]),0,255),ki(Math.round(255*o[2]),0,255),s)},ar=(e,t)=>{if(Zi(t.filter(bi)))throw new Error("Relative color not supported for lch()");let[i,r,n,s]=cr(t),o=Mi(Si(yr(br([i,r,n]))));return Ji(ki(Math.round(255*o[0]),0,255),ki(Math.round(255*o[1]),0,255),ki(Math.round(255*o[2]),0,255),s)},lr=(e,t)=>{let i=t.filter(bi),r=i[0],n=i[1],s=i[2],o=i[3],a=void 0!==o&&6===o.type&&"/"===o.value?i[4]:i[3];return[r?(17===r.type?Yi(r.number):Ui.parse(e,r))/(2*Math.PI):0,void 0!==n&&Bi(n)?n.number/100:0,void 0!==s&&Bi(s)?s.number/100:0,void 0!==a&&Bi(a)?Hi(a,1):1]},dr=(e,t)=>{if(Zi(t))throw new Error("Relative color not supported for hsl()");let[i,r,n,s]=lr(e,t),o=mr([i,r,n]);return Ji(255*o[0],255*o[1],255*o[2],s)},cr=e=>{let t=e.filter(bi),i=t[0],r=t[1],n=t[2],s=t[4];return[void 0!==i&&Bi(i)?i.number:0,void 0!==r&&Bi(r)?r.number:0,void 0!==n&&(hi(n)||pi(n))?n.number:0,void 0!==s&&Bi(s)?Hi(s,1):1]},pr=e=>{let t=e.filter(bi),i=t[0],r=t[1],n=t[2],s=t[4];return[void 0!==i?16===i.type?i.number/100:hi(i)?i.number:0:0,void 0!==r?16===r.type?r.number/100:hi(r)?r.number:0:0,void 0!==n&&(hi(n)||pi(n))?n.number:0,void 0!==s&&Bi(s)?Hi(s,1):1]},hr=e=>{let t=e.filter(bi),i=t[0],r=t[1],n=t[2],s=t[4];return[void 0!==i?16===i.type?i.number/100:hi(i)?i.number:0:0,void 0!==r?16===r.type?r.number/100:hi(r)?r.number:0:0,void 0!==n&&(hi(n)||pi(n))?n.number:0,void 0!==s&&Bi(s)?Hi(s,1):1]},ur=e=>Ci([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],e),fr=e=>Ci([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],e),gr=(e,t,i)=>(i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(t-e)*i*6+e:i<.5?t:i<2/3?6*(t-e)*(2/3-i)+e:e),mr=([e,t,i])=>{if(0===t)return[i,i,i];let r=i<=.5?i*(t+1):i+t-i*t,n=2*i-r;return[gr(n,r,e+1/3),gr(n,r,e),gr(n,r,e-1/3)]},br=([e,t,i])=>(t<0&&(t=0),isNaN(i)&&(i=0),[e,t*Math.cos(i*Math.PI/180),t*Math.sin(i*Math.PI/180)]),xr=e=>{let t=Ci([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],e),i=[t[0]**3,t[1]**3,t[2]**3];return Ci([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],i)},yr=e=>{let t=(e[0]+16)/116,i=e[1]/500+t,r=t-e[2]/200,n=24389/27,s=24/116,o=[.3457*(i>s?i**3:(116*i-16)/n)/.3585,e[0]>8?t**3:e[0]/n,.2958*(r>s?r**3:(116*r-16)/n)/.3585];return fr([o[0],o[1],o[2]])},vr=(e,t)=>{let i=t.filter(bi);if(3===i.length||4===i.length){let e=Qi(Mt(i,0),0),t=Qi(Mt(i,1),1),r=Qi(Mt(i,2),2),n=4===i.length?Qi(Mt(i,3),3):1,s=Ai([e/255,t/255,r/255]),[o,a,l]=Ei([s[0],s[1],s[2]]);return[o,a,l,n]}return[0,0,0,1]},wr=(e,t)=>{let[i,r,n,s]=lr(e,t),o=Ai(mr([i,r,n])),[a,l,d]=Ei([o[0],o[1],o[2]]);return[a,l,d,s]},kr=(e,t)=>{let[i,r,n,s]=pr(t),[o,a,l]=yr([i,r,n]);return[o,a,l,s]},Cr=(e,t)=>{let[i,r,n,s]=cr(t),[o,a,l]=yr(br([i,r,n]));return[o,a,l,s]},Sr=(e,t)=>{let[i,r,n,s]=hr(t),[o,a,l]=xr(br([i,r,n]));return[o,a,l,s]},Er=(e,t)=>{let[i,r,n,s]=pr(t),[o,a,l]=xr([i,r,n]);return[o,a,l,s]},Mr=e=>fr([e[0],e[1],e[2]]),Ar=e=>e,Tr=e=>{let[t,i,r]=ur([e[0],e[2],e[3]]);return[t,i,r,e[3]]},Lr=e=>ir([e[0],e[1],e[2],e[3]]),Rr=e=>{let t=Mr([e[0],e[1],e[2]]);return ir([t[0],t[1],t[2],e[3]])},Br=e=>Ci([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],e),Pr=e=>Ci([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],e),Ir=e=>{let t=e=>{let t=e<0?-1:1;return e*t<=.04045?e/12.92:t*((e+.055)/1.055)**2.4||0};return[t(e[0]),t(e[1]),t(e[2])]},Nr=e=>Mi(e),Dr=e=>{let t=Ir([e[0],e[1],e[2]]);return Br([t[0],t[1],t[2]])},Or=e=>{let[t,i,r]=Nr(Pr([e[0],e[1],e[2]]));return[t,i,r,e[3]]},$r=e=>{let t=Dr([e[0],e[1],e[2]]);return ir([t[0],t[1],t[2],e[3]])},Fr=e=>Ci([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],e),zr=e=>Ci([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],e),_r=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**2.19921875);return[t[0]??0,t[1]??0,t[2]??0]},Wr=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**.4547069271758437);return[t[0]??0,t[1]??0,t[2]??0]},Hr=e=>{let[t,i,r]=Wr(Fr([e[0],e[1],e[2]]));return[t,i,r,e[3]]},Vr=e=>{let t=Si(zr(_r([e[0],e[1],e[2]])));return tr([t[0],t[1],t[2],e[3]])},jr=e=>Ci([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],e),Ur=e=>Ci([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],e),qr=e=>{let[t,i,r]=e,n=e=>e<16/512?e/16:e**1.8;return[n(t),n(i),n(r)]},Gr=e=>{let[t,i,r]=e,n=e=>e>1/512?e**(1/1.8):16*e;return[n(t),n(i),n(r)]},Yr=e=>{let t=qr([e[0],e[1],e[2]]);return fr(jr([t[0],t[1],t[2]]))},Kr=e=>{let[t,i,r]=Gr(Ur(ur([e[0],e[1],e[2]])));return[t,i,r,e[3]]},Xr=e=>{let t=Yr([e[0],e[1],e[2]]);return ir([t[0],t[1],t[2],e[3]])},Jr=1.09929682680944,Qr=.018053968510807,Zr=e=>{let t=e=>e<4.5*Qr?e/4.5:Math.pow((e+Jr-1)/Jr,2.2222222222222223);return[t(e[0]),t(e[1]),t(e[2])]},en=e=>{let t=e=>e>=Qr?Jr*Math.pow(e,.45)-.09929682680944008:4.5*e;return[t(e[0]),t(e[1]),t(e[2])]},tn=e=>Ci([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],e),rn=e=>Ci([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],e),nn=e=>{let t=Zr([e[0],e[1],e[2]]);return tn([t[0],t[1],t[2]])},sn=e=>{let[t,i,r]=en(rn([e[0],e[1],e[2]]));return[t,i,r,e[3]]},on=e=>{let t=nn([e[0],e[1],e[2]]);return ir([t[0],t[1],t[2],e[3]])},an={lch:2,oklch:2,hsl:0},ln=[1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],cn=(dn=e=>{let t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],d=e[8],c=t*(s*d-o*l)-i*(n*d-o*a)+r*(n*l-s*a);return[(s*d-o*l)/c,(r*l-i*d)/c,(i*o-r*s)/c,(o*a-n*d)/c,(t*d-r*a)/c,(r*n-t*o)/c,(n*l-s*a)/c,(i*a-t*l)/c,(t*s-i*n)/c]})([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816]),pn=dn(ln),hn=24389/27,fn=(un=24/116)*un*un,gn=.3457/.3585,mn=.2958/.3585,bn=e=>[(255&e>>24)/255,(255&e>>16)/255,(255&e>>8)/255],xn=e=>{let[t,i,r]=ur([e[0],e[1],e[2]]),n=t/gn,s=i,o=r/mn,a=n>fn?Math.cbrt(n):(hn*n+16)/116,l=s>fn?Math.cbrt(s):(hn*s+16)/116;return[116*l-16,500*(a-l),200*(l-(o>fn?Math.cbrt(o):(hn*o+16)/116))]},yn=e=>{let t=Ci(cn,e),i=[Math.cbrt(t[0]),Math.cbrt(t[1]),Math.cbrt(t[2])];return Ci(pn,i)},vn=e=>{let t=Math.hypot(e[1],e[2]),i=180*Math.atan2(e[2],e[1])/Math.PI;return[e[0],t,(i+360)%360]},wn=e=>{let t=e[0],i=e[1],r=e[2],n=Math.max(t,i,r),s=Math.min(t,i,r),o=(n+s)/2;if(n===s)return[0,0,o];let a,l=n-s;return a=n===t?((i-r)/l+(i<r?6:0))/6:n===i?((r-t)/l+2)/6:((t-i)/l+4)/6,[a,o>.5?l/(2-n-s):l/(n+s),o]},kn=(e,t)=>{let i,r=(255&e)/255,n=bn(e),s=Ai(n),o=Ei(s);switch(t){case"srgb":i=n;break;case"srgb-linear":i=s;break;case"xyz":case"xyz-d65":i=o;break;case"xyz-d50":i=ur(o);break;case"lab":i=xn(o);break;case"oklab":i=yn(o);break;case"lch":i=vn(xn(o));break;case"oklch":i=vn(yn(o));break;case"hsl":i=[360*wn(n)[0],wn(n)[1],wn(n)[2]]}return[i[0],i[1],i[2],r]},Cn=(e,t)=>{let i=e[0],r=e[1],n=e[2],s=e[3];switch(t){case"srgb":return er([i,r,n,s]);case"srgb-linear":return tr([i,r,n,s]);case"xyz":case"xyz-d65":return ir([i,r,n,s]);case"xyz-d50":return ir([...fr([i,r,n]),s]);case"lab":return Sn(yr([i,r,n]),s);case"oklab":return Sn(xr([i,r,n]),s);case"lch":return Sn(yr(br([i,r,n])),s);case"oklch":return Sn(xr(br([i,r,n])),s);case"hsl":{let e=mr([i/360,r,n]);return er([e[0],e[1],e[2],s])}}},Sn=(e,t)=>{let i=Mi(Si(e));return er([i[0],i[1],i[2],t])},En=(e,t,i,r,n="shorter")=>{let s=i+r;if(0===s)return e;let o=((t-e)%360+360)%360;switch(n){case"shorter":o>180&&(o-=360);break;case"longer":o<180&&(o-=360);break;case"increasing":break;case"decreasing":o>0&&(o-=360)}return e+o*(r/s)},Mn=(e,t)=>{let i,r=null;for(let e of t)if(31!==e.type&&4!==e.type)if(16===e.type)r=e.number;else if(ui(e)&&"none"===e.value)null===r&&(r=0);else{if(void 0!==i)throw new Error("Unexpected token in color-mix() component");i=e}if(void 0===i)throw new Error("color-mix() component is missing a color");let n=i;return{color:Rn.parse(e,n),percentage:r}},An=["srgb","srgb-linear","lab","oklab","lch","oklch","hsl","xyz","xyz-d50","xyz-d65"],Tn=(e,t,i,r,n,s)=>{let o=an[n],a=[e[0]*e[3],e[1]*e[3],e[2]*e[3],e[3]],l=[t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]],d=i*a[3]+r*l[3];if(d<=0)return[0,0,0,0];let c=[0,0,0,d];for(let e=0;e<3;e++)e!==o&&(c[e]=(i*Mt(a,e)+r*Mt(l,e))/d);if(void 0!==o){let n=Mt(e,o),a=Mt(t,o);0===e[1]&&(n=a),0===t[1]&&(a=n),c[o]=En(n,a,i,r,s)}return c},Ln=(e,t)=>{let i=[[]];for(let e of t)4===e.type?i.push([]):i[i.length-1].push(e);let r=i.map(e=>e.filter(e=>31!==e.type));if(3!==r.length)throw new Error("color-mix() requires exactly two color components");let n=r[0],s=n?n[0]:void 0,o=void 0!==s&&ui(s)&&"in"===s.value;if(!n||n.length<2||!o)throw new Error("color-mix() requires an interpolation space after `in`");let a=n[1];if(!a||!ui(a))throw new Error("color-mix() space must be an identifier");let l=a.value;if(-1===An.indexOf(l))throw new Error(`Unsupported color-mix() interpolation space "${l}"`);let d="shorter",c=n.slice(2);if(c.length>0){let e=c[0],t=c[1];if(!(e&&t&&ui(e)&&ui(t)&&"hue"===t.value))throw new Error("Unsupported color-mix() hue method syntax");if(-1===["shorter","longer","increasing","decreasing"].indexOf(e.value))throw new Error(`Unsupported color-mix() hue method "${e.value}"`);d=e.value}let p=r[1],h=r[2];if(!p||!h)throw new Error("color-mix() requires exactly two color components");let u=Mn(e,p),f=Mn(e,h),g=u.percentage,m=f.percentage;if(null===g&&null===m)g=50,m=50;else if(null===g)g=100-(m??0);else if(null===m)m=100-g;else{let e=g+m;e>0&&(g=g/e*100,m=m/e*100)}let b=(g??0)/100,x=(m??0)/100,y=Tn(kn(u.color,l),kn(f.color,l),b,x,l,d);return Cn(y,l)},Rn={name:"color",parse:(e,t)=>{if(18===t.type){let i=$n[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported color function "${t.name}"`);return i(e,t.values)}if(5===t.type){let[e,i,r,n]=Bn(t);return Ji(e,i,r,n)}if(20===t.type){let e=zn[t.value.toUpperCase()];if(typeof e<"u")return e}return 0}},Bn=e=>{if(3===e.value.length){let t=e.value.substring(0,1),i=e.value.substring(1,2),r=e.value.substring(2,3);return[parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16),1]}if(4===e.value.length){let t=e.value.substring(0,1),i=e.value.substring(1,2),r=e.value.substring(2,3),n=e.value.substring(3,4);return[parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16),parseInt(n+n,16)/255]}if(6===e.value.length){let t=e.value.substring(0,2),i=e.value.substring(2,4),r=e.value.substring(4,6);return[parseInt(t,16),parseInt(i,16),parseInt(r,16),1]}if(8===e.value.length){let t=e.value.substring(0,2),i=e.value.substring(2,4),r=e.value.substring(4,6),n=e.value.substring(6,8);return[parseInt(t,16),parseInt(i,16),parseInt(r,16),parseInt(n,16)/255]}return[0,0,0,1]},In=(e,t)=>{let i=t.filter(bi),r=i[0],n=r&&20===r.type?r.value:"unknown";if(Zi(i)){let t=(e,t)=>{if(hi(t))return t.number;if(ui(t)){let i=(e=>"r"===e||"x"===e?0:"g"===e||"y"===e?1:2)(t.value);return Mt(e,i)}let i=e=>{let t=e.filter(bi),r="(";for(let e of t)r+=18===e.type&&"calc"===e.name?i(e.values):hi(e)?e.number:6===e.type||ui(e)?e.value:"";return r+=")",r};if(18===t.type){let r=t.values.filter(bi);if("calc"===t.name){let t=i(r).replace(/r|x/,e[0].toString()).replace(/g|y/,e[1].toString()).replace(/b|z/,e[2].toString());return wi(t)}}return null},r=Mt(i,1),n=18===r.type?r.name:ui(r)||5===r.type?"rgb":"unknown",s=Mt(i,2),o=ui(s)?s.value:"unknown",a=18===r.type?r.values:ui(r)?[r]:[];if(ui(r)){if(typeof zn[r.value.toUpperCase()]>"u")throw new Error("Attempting to use unknown color in relative color 'from'");{let t=Fn(e,r.value),i=255&t;a=[{type:17,number:255&t>>24,flags:1},{type:17,number:255&t>>16,flags:1},{type:17,number:255&t>>8,flags:1},{type:17,number:i>1?i/255:i,flags:1}]}}else if(5===r.type){let[e,t,i,n]=Bn(r);a=[{type:17,number:e,flags:1},{type:17,number:t,flags:1},{type:17,number:i,flags:1},{type:17,number:n>1?n/255:n,flags:1}]}if(0===a.length)throw new Error("Attempting to use unknown color in relative color 'from'");if("unknown"===o)throw new Error("Attempting to use unknown colorspace in relative color 'to'");let l=Dn[n],d=On[o],c=Nn[o];if(typeof l>"u")throw new Error(`Attempting to parse an unsupported color space "${n}" for color() function`);if(typeof d>"u")throw new Error(`Attempting to parse an unsupported color space "${o}" for color() function`);let p=d(l(e,a)),h=t(p,Mt(i,3)),u=t(p,Mt(i,4)),f=t(p,Mt(i,5)),g=i[6],m=i[7],b=void 0!==g&&6===g.type&&"/"===g.value&&void 0!==m&&hi(m)?m.number:1;if(null===h||null===u||null===f)throw new Error("Invalid relative color in color() function");if(typeof c>"u")throw new Error(`Attempting to parse an unsupported color space "${o}" for color() function`);return c([h,u,f,b])}{let e=n,t=Nn[e];if(typeof t>"u")throw new Error(`Attempting to parse an unsupported color space "${e}" for color() function`);let r=Mt(i,1),s=Mt(i,2),o=Mt(i,3),a=i[4],l=i[5];return t([hi(r)?r.number:0,hi(s)?s.number:0,hi(o)?o.number:0,void 0!==a&&6===a.type&&"/"===a.value&&void 0!==l&&hi(l)?l.number:1])}},Nn={srgb:er,"srgb-linear":tr,"display-p3":$r,"a98-rgb":Vr,"prophoto-rgb":Xr,xyz:Lr,"xyz-d50":Rr,"xyz-d65":Lr,rec2020:on},Dn={rgb:vr,hsl:wr,lab:kr,lch:Cr,oklab:Er,oklch:Sr},On={srgb:Ti,"srgb-linear":Li,"display-p3":Or,"a98-rgb":Hr,"prophoto-rgb":Kr,xyz:Ar,"xyz-d50":Tr,"xyz-d65":Ar,rec2020:sn},$n={hsl:dr,hsla:dr,rgb:Pn=(e,t)=>{let i=t.filter(bi);if(Zi(i))throw new Error("Relative color not supported for rgb()");if(3===i.length||4===i.length){let e=Qi(Mt(i,0),0),t=Qi(Mt(i,1),1),r=Qi(Mt(i,2),2),n=4===i.length?Qi(Mt(i,3),3):1;return Ji(e,t,r,n)}if(5===i.length){let e=Mt(i,3);if(6===e.type&&"/"===e.value){let e=Qi(Mt(i,0),0),t=Qi(Mt(i,1),1),r=Qi(Mt(i,2),2),n=Qi(Mt(i,4),3);return Ji(e,t,r,n)}}return 0},rgba:Pn,lch:ar,oklch:or,oklab:sr,lab:rr,color:In,"color-mix":(e,t)=>{try{return Ln(e,t)}catch(t){return e.logger.warn(`Unsupported color-mix() value: ${t instanceof Error?t.message:t}`),0}}},Fn=(e,t)=>Rn.parse(e,ci.create(t).parseComponentValue()),zn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},_n=e=>e.nodeType===Node.ELEMENT_NODE,Wn=e=>e.nodeType===Node.TEXT_NODE,Hn=e=>"object"==typeof e.className,Vn=e=>_n(e)&&typeof e.style<"u"&&!Hn(e),jn=e=>"INPUT"===e.tagName,Un=e=>"HTML"===e.tagName,qn=e=>"svg"===e.tagName,Gn=e=>"BODY"===e.tagName,Yn=e=>"CANVAS"===e.tagName,Kn=e=>"VIDEO"===e.tagName,Xn=e=>"IMG"===e.tagName,Jn=e=>"IFRAME"===e.tagName,Qn=e=>"STYLE"===e.tagName,Zn=e=>"SCRIPT"===e.tagName,es=e=>"TEXTAREA"===e.tagName,ts=e=>"SELECT"===e.tagName,is=e=>"SLOT"===e.tagName,rs=e=>"LI"===e.tagName,ns=e=>"OL"===e.tagName,ss=e=>!Hn(e)&&e.tagName.indexOf("-")>0,os=new Set(["IMG","VIDEO","AUDIO","CANVAS","IFRAME","INPUT","TEXTAREA","SELECT","BR","HR","META","LINK","BASE","COL","SOURCE","TRACK","WBR","AREA","PARAM","EMBED","OBJECT"]),as=e=>!Hn(e)&&!os.has(e.tagName),ls={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},ds=(e,t)=>0!==(e&t),cs=class{counters={};getCounterValue(e){let t=this.counters[e];return t&&t.length?Mt(t,t.length-1):1}getCounterValues(e){return this.counters[e]||[]}pop(e){e.forEach(e=>this.counters[e]?.pop())}parse(e){let t=e.counterIncrement,i=e.counterReset,r=!0;null!==t&&t.forEach(e=>{let t=this.counters[e.counter];if(t&&0!==e.increment){r=!1,t.length||t.push(1);let i=Math.max(0,t.length-1);t[i]=(t[i]??0)+e.increment}});let n=[];return r&&i.forEach(e=>{let t=this.counters[e.counter];n.push(e.counter),t||(t=this.counters[e.counter]=[]),t.push(e.reset)}),n}},ps={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},hs={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054f","\u054e","\u054d","\u054c","\u054b","\u054a","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053f","\u053e","\u053d","\u053c","\u053b","\u053a","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},us={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05d9\u05f3","\u05d8\u05f3","\u05d7\u05f3","\u05d6\u05f3","\u05d5\u05f3","\u05d4\u05f3","\u05d3\u05f3","\u05d2\u05f3","\u05d1\u05f3","\u05d0\u05f3","\u05ea","\u05e9","\u05e8","\u05e7","\u05e6","\u05e4","\u05e2","\u05e1","\u05e0","\u05de","\u05dc","\u05db","\u05d9\u05d8","\u05d9\u05d7","\u05d9\u05d6","\u05d8\u05d6","\u05d8\u05d5","\u05d9","\u05d8","\u05d7","\u05d6","\u05d5","\u05d4","\u05d3","\u05d2","\u05d1","\u05d0"]},fs={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10f5","\u10f0","\u10ef","\u10f4","\u10ee","\u10ed","\u10ec","\u10eb","\u10ea","\u10e9","\u10e8","\u10e7","\u10e6","\u10e5","\u10e4","\u10f3","\u10e2","\u10e1","\u10e0","\u10df","\u10de","\u10dd","\u10f2","\u10dc","\u10db","\u10da","\u10d9","\u10d8","\u10d7","\u10f1","\u10d6","\u10d5","\u10d4","\u10d3","\u10d2","\u10d1","\u10d0"]},gs=(e,t,i,r,n,s)=>e<t||e>i?Ss(e,n,s.length>0):r.integers.reduce((t,i,n)=>{for(;e>=i;)e-=i,t+=r.values[n];return t},"")+s,ms=(e,t,i,r)=>{let n="";do{i||e--,n=r(e)+n,e/=t}while(e*t>=t);return n},bs=(e,t,i,r,n)=>{let s=i-t+1;return(e<0?"-":"")+(ms(Math.abs(e),s,r,e=>String.fromCodePoint(Math.floor(e%s)+t))+n)},xs=(e,t,i=". ")=>{let r=t.length;return ms(Math.abs(e),r,!1,e=>String(t[Math.floor(e%r)]))+i},ys=(e,t,i,r,n,s)=>{if(e<-9999||e>9999)return Ss(e,4,n.length>0);let o=Math.abs(e),a=n;if(0===o)return t[0]+a;for(let r=0;o>0&&r<=4;r++){let n=o%10;0===n&&ds(s,1)&&""!==a?a=t[n]+a:n>1||1===n&&0===r||1===n&&1===r&&ds(s,2)||1===n&&1===r&&ds(s,4)&&e>100||1===n&&r>1&&ds(s,8)?a=(t[n]??"")+(r>0?i[r-1]??"":"")+a:1===n&&r>0&&(a=(i[r-1]??"")+a),o=Math.floor(o/10)}return(e<0?r:"")+a},vs="\u5341\u767e\u5343\u842c",ws="\u62fe\u4f70\u4edf\u842c",ks="\u30de\u30a4\u30ca\u30b9",Cs="\ub9c8\uc774\ub108\uc2a4",Ss=(e,t,i)=>{let r=i?". ":"",n=i?"\u3001":"",s=i?", ":"",o=i?" ":"";switch(t){case 0:return"\u2022"+o;case 1:return"\u25e6"+o;case 2:return"\u25fe"+o;case 5:let t=bs(e,48,57,!0,r);return t.length<4?`0${t}`:t;case 4:return xs(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",n);case 6:return gs(e,1,3999,ps,3,r).toLowerCase();case 7:return gs(e,1,3999,ps,3,r);case 8:return bs(e,945,969,!1,r);case 9:return bs(e,97,122,!1,r);case 10:return bs(e,65,90,!1,r);case 11:return bs(e,1632,1641,!0,r);case 12:case 49:return gs(e,1,9999,hs,3,r);case 35:return gs(e,1,9999,hs,3,r).toLowerCase();case 13:return bs(e,2534,2543,!0,r);case 14:case 30:return bs(e,6112,6121,!0,r);case 15:return xs(e,"\u5b50\u4e11\u5bc5\u536f\u8fb0\u5df3\u5348\u672a\u7533\u9149\u620c\u4ea5",n);case 16:return xs(e,"\u7532\u4e59\u4e19\u4e01\u620a\u5df1\u5e9a\u8f9b\u58ec\u7678",n);case 17:case 48:return ys(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",vs,"\u8ca0",n,14);case 47:return ys(e,"\u96f6\u58f9\u8cb3\u53c3\u8086\u4f0d\u9678\u67d2\u634c\u7396",ws,"\u8ca0",n,15);case 42:return ys(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",vs,"\u8d1f",n,14);case 41:return ys(e,"\u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396",ws,"\u8d1f",n,15);case 26:return ys(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u4e07",ks,n,0);case 25:return ys(e,"\u96f6\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343\u4e07",ks,n,7);case 31:return ys(e,"\uc601\uc77c\uc774\uc0bc\uc0ac\uc624\uc721\uce60\ud314\uad6c","\uc2ed\ubc31\ucc9c\ub9cc",Cs,s,7);case 33:return ys(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c",Cs,s,0);case 32:return ys(e,"\u96f6\u58f9\u8cb3\u53c3\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343",Cs,s,7);case 18:return bs(e,2406,2415,!0,r);case 20:return gs(e,1,19999,fs,3,r);case 21:return bs(e,2790,2799,!0,r);case 22:return bs(e,2662,2671,!0,r);case 52:return gs(e,1,10999,us,3,r);case 23:return xs(e,"\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u3055\u3057\u3059\u305b\u305d\u305f\u3061\u3064\u3066\u3068\u306a\u306b\u306c\u306d\u306e\u306f\u3072\u3075\u3078\u307b\u307e\u307f\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308a\u308b\u308c\u308d\u308f\u3090\u3091\u3092\u3093");case 24:return xs(e,"\u3044\u308d\u306f\u306b\u307b\u3078\u3068\u3061\u308a\u306c\u308b\u3092\u308f\u304b\u3088\u305f\u308c\u305d\u3064\u306d\u306a\u3089\u3080\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304d\u3086\u3081\u307f\u3057\u3091\u3072\u3082\u305b\u3059");case 27:return bs(e,3302,3311,!0,r);case 28:return xs(e,"\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f0\u30f1\u30f2\u30f3",n);case 29:return xs(e,"\u30a4\u30ed\u30cf\u30cb\u30db\u30d8\u30c8\u30c1\u30ea\u30cc\u30eb\u30f2\u30ef\u30ab\u30e8\u30bf\u30ec\u30bd\u30c4\u30cd\u30ca\u30e9\u30e0\u30a6\u30f0\u30ce\u30aa\u30af\u30e4\u30de\u30b1\u30d5\u30b3\u30a8\u30c6\u30a2\u30b5\u30ad\u30e6\u30e1\u30df\u30b7\u30f1\u30d2\u30e2\u30bb\u30b9",n);case 34:return bs(e,3792,3801,!0,r);case 37:return bs(e,6160,6169,!0,r);case 38:return bs(e,4160,4169,!0,r);case 39:return bs(e,2918,2927,!0,r);case 40:return bs(e,1776,1785,!0,r);case 43:return bs(e,3046,3055,!0,r);case 44:return bs(e,3174,3183,!0,r);case 45:return bs(e,3664,3673,!0,r);case 46:return bs(e,3872,3881,!0,r);default:return bs(e,48,57,!0,r)}},Es={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:(e,t)=>t.filter(ui).reduce((e,t)=>e|Ms(t.value),0)},Ms=e=>{switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},As={name:"float",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Ts={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:(e,t)=>t.filter(ui).map(e=>{switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})},Ls={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Rs={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>t.filter(ui).map(e=>{switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(e=>0!==e)},Bs={name:"content",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>{if(0===t.length)return[];let i=t[0];return i&&20===i.type&&"none"===i.value?[]:t}},Ps={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>{if(0===t.length)return null;let i=t[0];if(i&&20===i.type&&"none"===i.value)return null;let r=[],n=t.filter(fi);if(n.length%2!=0)return null;for(let e=0;e<n.length;e+=2){let t=Mt(n,e).value,i=Mt(n,e+1).value;r.push({open:t,close:i})}return r}},Is=(e,t,i)=>{if(!e)return"";let r=e[Math.min(t,e.length-1)];return r?i?r.open:r.close:""},Ns=(e,t)=>{let i=[],r=e.filter(mi);for(let e=0;e<r.length;e++){let n=r[e],s=r[e+1];if(n&&20===n.type){let e=s&&hi(s)?s.number:t;i.push([n.value,e])}}return i},Ds={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>{if(0===t.length)return null;let i=t[0];return i&&20===i.type&&"none"===i.value?null:Ns(t,1).map(([e,t])=>({counter:e,increment:t}))}},Os={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:(e,t)=>0===t.length?[]:Ns(t,0).filter(([e])=>"none"!==e).map(([e,t])=>({counter:e,reset:t}))},$s={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(ui(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2;case"text":return 3}return 0})},Fs={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},zs=(e,t)=>{let i=Rn.parse(e,Mt(t,0)),r=t[1];return r&&Bi(r)?{color:i,stop:r}:{color:i,stop:null}},_s=(e,t)=>{let i=e.map(e=>({color:e.color,stop:e.stop})),r=Mt(i,0),n=Mt(i,i.length-1);null===r.stop&&(r.stop=Fi),null===n.stop&&(n.stop=_i);let s=[],o=0;for(let e=0;e<i.length;e++){let r=Mt(i,e).stop;if(null!==r){let e=Hi(r,t);e>o?s.push(e):s.push(o),o=e}else s.push(null)}let a=null;for(let e=0;e<s.length;e++){let t=Mt(s,e);if(null===t)null===a&&(a=e);else if(null!==a){let i=e-a,r=(t-s[a-1])/(i+1);for(let e=1;e<=i;e++)s[a+e-1]=r*e;a=null}}return i.map(({color:e},i)=>({color:e,stop:Math.max(Math.min(1,s[i]/t),0)}))},Ws=(e,t,i)=>{let r=t/2,n=i/2,s=Hi(e[0],t)-r,o=n-Hi(e[1],i);return(Math.atan2(o,s)+2*Math.PI)%(2*Math.PI)},Hs=(e,t,i)=>{let r="number"==typeof e?e:Ws(e,t,i),n=Math.abs(t*Math.sin(r))+Math.abs(i*Math.cos(r)),s=t/2,o=i/2,a=n/2,l=Math.sin(r-Math.PI/2)*a,d=Math.cos(r-Math.PI/2)*a;return[n,s-d,s+d,o-l,o+l]},Vs=(e,t)=>Math.sqrt(e*e+t*t),js=(e,t,i,r,n)=>[[0,0],[0,t],[e,0],[e,t]].reduce((e,t)=>{let[s,o]=t,a=Vs(i-s,r-o);return(n?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner,Us=(e,t,i,r,n)=>{let s=0,o=0;switch(e.size){case 0:0===e.shape?s=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(i),Math.abs(i-n)));break;case 2:if(0===e.shape)s=o=Math.min(Vs(t,i),Vs(t,i-n),Vs(t-r,i),Vs(t-r,i-n));else if(1===e.shape){let e=Math.min(Math.abs(i),Math.abs(i-n))/Math.min(Math.abs(t),Math.abs(t-r)),[a,l]=js(r,n,t,i,!0);s=Vs(a-t,(l-i)/e),o=e*s}break;case 1:0===e.shape?s=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(i),Math.abs(i-n)));break;case 3:if(0===e.shape)s=o=Math.max(Vs(t,i),Vs(t,i-n),Vs(t-r,i),Vs(t-r,i-n));else if(1===e.shape){let e=Math.max(Math.abs(i),Math.abs(i-n))/Math.max(Math.abs(t),Math.abs(t-r)),[a,l]=js(r,n,t,i,!1);s=Vs(a-t,(l-i)/e),o=e*s}}if(Array.isArray(e.size)){let t=e.size;s=Hi(Mt(t,0),r),o=2===t.length?Hi(Mt(t,1),n):s}return[s,o]},Ys="closest-side",Ks="farthest-side",Xs="closest-corner",Js="farthest-corner",Qs="circle",Zs="ellipse",eo="cover",to="contain",no=(e,t)=>({...qs(e,t),type:3}),so=(e,t)=>({...io(e,t),type:4}),ao=(e,t)=>({...oo(e,t),type:6}),lo=e=>e&&(pi(e)&&("dppx"===e.unit||"x"===e.unit)||hi(e))?e.number:1,co=(e,t)=>{let i=xi(t),r=e.config.window.devicePixelRatio||1,n=[];for(let e of i){let t=e.find(e=>22===e.type||18===e.type);if(!t)continue;let i=e.find(e=>pi(e)||hi(e));n.push({imageToken:t,resolution:lo(i)})}if(0===n.length)throw new Error("image-set() requires at least one image candidate");let s=n.filter(e=>e.resolution>=r).sort((e,t)=>e.resolution-t.resolution),o=Mt(s.length>0?s:n.slice().sort((e,t)=>t.resolution-e.resolution),0);return bo.parse(e,o.imageToken)},po=e=>1===e.type,ho=e=>2===e.type,uo=e=>3===e.type,fo=e=>4===e.type,go=e=>5===e.type,mo=e=>6===e.type,bo={name:"image",parse:(e,t)=>{if(22===t.type){let i={url:t.value,type:0};return e.cache.addImage(t.value),i}if(18===t.type){let i=xo[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported image function "${t.name}"`);return i(e,t.values)}throw new Error(`Unsupported image type ${t.type}`)}},xo={"linear-gradient":qs=(e,t)=>{let i=Yi(180),r=[];return xi(t).forEach((t,n)=>{if(0===n){let r=t[0];if(r&&20===r.type&&"to"===r.value)return void(i=Gi(t));if(r&&qi(r))return void(i=Ui.parse(e,r))}let s=zs(e,t);r.push(s)}),{angle:i,stops:r,type:1}},"-moz-linear-gradient":Gs=(e,t)=>{let i=Yi(180),r=[];return xi(t).forEach((t,n)=>{if(0===n){let r=t[0];if(r&&20===r.type&&-1!==["top","left","right","bottom"].indexOf(r.value))return void(i=Gi(t));if(r&&qi(r))return void(i=(Ui.parse(e,r)+Yi(270))%Yi(360))}let s=zs(e,t);r.push(s)}),{angle:i,stops:r,type:1}},"-ms-linear-gradient":Gs,"-o-linear-gradient":Gs,"-webkit-linear-gradient":Gs,"radial-gradient":io=(e,t)=>{let i=1,r=3,n=[],s=[];return xi(t).forEach((t,o)=>{let a=!0;if(0===o){let e=!1;a=t.reduce((t,n)=>{if(e)if(ui(n))switch(n.value){case"center":return s.push(zi),t;case"top":case"left":return s.push(Fi),t;case"right":case"bottom":return s.push(_i),t}else(Bi(n)||Ri(n))&&s.push(n);else if(ui(n))switch(n.value){case Qs:return i=0,!1;case Zs:return i=1,!1;case"at":return e=!0,!1;case Ys:return r=0,!1;case eo:case Ks:return r=1,!1;case to:case Xs:return r=2,!1;case Js:return r=3,!1}else if(Ri(n)||Bi(n))return Array.isArray(r)||(r=[]),r.push(n),!1;return t},a)}if(a){let i=zs(e,t);n.push(i)}}),{size:r,shape:i,stops:n,position:s,type:2}},"-moz-radial-gradient":ro=(e,t)=>{let i=1,r=3,n=[],s=[];return xi(t).forEach((t,o)=>{let a=!0;if(0===o?a=t.reduce((e,t)=>{if(ui(t))switch(t.value){case"center":return s.push(zi),!1;case"top":case"left":return s.push(Fi),!1;case"right":case"bottom":return s.push(_i),!1}else if(Bi(t)||Ri(t))return s.push(t),!1;return e},a):1===o&&(a=t.reduce((e,t)=>{if(ui(t))switch(t.value){case Qs:return i=0,!1;case Zs:return i=1,!1;case to:case Ys:return r=0,!1;case Ks:return r=1,!1;case Xs:return r=2,!1;case eo:case Js:return r=3,!1}else if(Ri(t)||Bi(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},a)),a){let i=zs(e,t);n.push(i)}}),{size:r,shape:i,stops:n,position:s,type:2}},"-ms-radial-gradient":ro,"-o-radial-gradient":ro,"-webkit-radial-gradient":ro,"-webkit-gradient":(e,t)=>{let i=Yi(180),r=[],n=1;return xi(t).forEach((t,i)=>{let s=t[0];if(s){if(0===i){if(ui(s)&&"linear"===s.value)return void(n=1);if(ui(s)&&"radial"===s.value)return void(n=2)}if(18===s.type)if("from"===s.name){let t=Rn.parse(e,Mt(s.values,0));r.push({stop:Fi,color:t})}else if("to"===s.name){let t=Rn.parse(e,Mt(s.values,0));r.push({stop:_i,color:t})}else if("color-stop"===s.name){let t=s.values.filter(bi);if(2===t.length){let i=Rn.parse(e,Mt(t,1)),n=Mt(t,0);hi(n)&&r.push({stop:{type:16,number:100*n.number,flags:n.flags},color:i})}}}}),1===n?{angle:(i+Yi(180))%Yi(360),stops:r,type:n}:{size:3,shape:0,stops:r,position:[],type:n}},"repeating-linear-gradient":no,"-webkit-repeating-linear-gradient":no,"-moz-repeating-linear-gradient":no,"-ms-repeating-linear-gradient":no,"-o-repeating-linear-gradient":no,"repeating-radial-gradient":so,"-webkit-repeating-radial-gradient":so,"-moz-repeating-radial-gradient":so,"conic-gradient":oo=(e,t)=>{let i=0,r=[],n=[];return xi(t).forEach((t,s)=>{let o=!0;if(0===s){let n=!1,s=!1;o=t.reduce((t,o)=>{if(ui(o))switch(o.value){case"from":return n=!0,s=!1,!1;case"at":return n=!1,s=!0,!1;case"center":return r.push(zi),t;case"top":case"left":return r.push(Fi),t;case"right":case"bottom":return r.push(_i),t}return n?(i=Ui.parse(e,o),!1):(s&&Bi(o)&&r.push(o),t)},!0)}o&&t.length>0&&n.push(zs(e,t))}),{type:5,angle:i,position:r,stops:n}},"-webkit-conic-gradient":oo,"-moz-conic-gradient":oo,"repeating-conic-gradient":ao,"-webkit-repeating-conic-gradient":ao,"-moz-repeating-conic-gradient":ao,"image-set":co,"-webkit-image-set":co},yo={name:"background-image",initialValue:"none",type:1,prefix:!1,skipCache:!0,parse:(e,t)=>{if(0===t.length)return[];let i=t[0];return i&&20===i.type&&"none"===i.value?[]:t.filter(e=>bi(e)&&ht(e)).map(t=>bo.parse(e,t))}},vo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(ui(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})},wo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:(e,t)=>xi(t).map(e=>e.map(Di).filter(e=>null!==e)).map($i)},ko={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:(e,t)=>xi(t).map(e=>e.filter(ui).map(e=>e.value).join(" ")).map(Co)},Co=e=>{switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},So={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:(e,t)=>xi(t).map(e=>e.map(e=>Eo(e)?e:Di(e)).filter(e=>null!==e))},Eo=e=>ui(e)||Bi(e),Ao=(Mo=e=>({name:`border-${e}-color`,initialValue:"transparent",prefix:!1,type:3,format:"color"}))("top"),To=Mo("right"),Lo=Mo("bottom"),Ro=Mo("left"),Po=(Bo=e=>({name:`border-${e}-radius`,initialValue:"0 0",prefix:!1,type:1,parse:(e,t)=>$i(t.filter(Bi))}))("top-left"),Io=Bo("top-right"),No=Bo("bottom-right"),Do=Bo("bottom-left"),$o=(Oo=e=>({name:`border-${e}-style`,initialValue:"solid",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}))("top"),Fo=Oo("right"),zo=Oo("bottom"),_o=Oo("left"),Ho=(Wo=e=>({name:`border-${e}-width`,initialValue:"0",type:0,prefix:!1,parse:(e,t)=>pi(t)?t.number:0}))("top"),Vo=Wo("right"),jo=Wo("bottom"),Uo=Wo("left"),qo={type:0},Go=e=>{let[t]=e;return t?ui(t)?"farthest-side"===t.value?"farthest-side":"closest-side":Bi(t)?t:"closest-side":"closest-side"},Yo=e=>{let t=null,i=null;for(let r of e)if(ui(r))switch(r.value){case"left":t=Fi;break;case"right":t=_i;break;case"top":i=Fi;break;case"bottom":i=_i;break;case"center":null===t?t=zi:null===i&&(i=zi)}else Bi(r)&&(null===t?t=r:null===i&&(i=r));return{cx:t??zi,cy:i??zi}},Ko=e=>{let t=[];for(let i of e)if(31!==i.type){if(ui(i)&&"round"===i.value)break;Bi(i)&&t.push(i)}let i=t[0]??Fi,r=t[1]??i;return{type:1,top:i,right:r,bottom:t[2]??i,left:t[3]??r}},Xo=e=>{let t=e.filter(mi),i=t.findIndex(e=>gi(e,"at")),r=-1===i?t:t.slice(0,i),n=-1===i?[]:t.slice(i+1);return{type:2,radius:Go(r),...Yo(n)}},Jo=e=>{let t=e.filter(mi),i=t.findIndex(e=>gi(e,"at")),r=-1===i?t:t.slice(0,i),n=-1===i?[]:t.slice(i+1);return{type:3,rx:Go(r.slice(0,1)),ry:Go(r.slice(1,2)),...Yo(n)}},Qo=e=>{let t=xi(e),i=[];for(let e of t){if(1===e.length&&e[0]&&ui(e[0]))continue;let t=e.filter(Bi);t.length>=2&&i.push([Mt(t,0),Mt(t,1)])}return{type:4,points:i}},Zo=e=>{let t=e.find(e=>0===e.type);return t?{type:5,d:t.value}:qo},ea=e=>{let t=[];for(let i of e)if(31!==i.type){if(ui(i)&&"round"===i.value)break;Bi(i)&&t.push(i)}return t.length<4?qo:{type:6,x:Mt(t,0),y:Mt(t,1),width:Mt(t,2),height:Mt(t,3)}},ta=e=>{let t=[];for(let i of e)if(31!==i.type){if(ui(i)){if("round"===i.value)break;if("auto"===i.value){t.push("auto");continue}return qo}Bi(i)&&t.push(i)}if(4!==t.length)return qo;let i=(e,t)=>"auto"!==e?e:"top"===t||"left"===t?Fi:_i;return{type:1,top:i(Mt(t,0),"top"),right:i(Mt(t,1),"right"),bottom:i(Mt(t,2),"bottom"),left:i(Mt(t,3),"left")}},ia={name:"clip-path",initialValue:"none",prefix:!1,type:0,parse:(e,t)=>{if(ui(t)&&"none"===t.value)return qo;if(18===t.type)switch(t.name){case"inset":return Ko(t.values);case"circle":return Xo(t.values);case"ellipse":return Jo(t.values);case"polygon":return Qo(t.values);case"path":return Zo(t.values);case"xywh":return ea(t.values);case"rect":return ta(t.values)}return qo}},ra={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},na={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:(e,t)=>"rtl"===t?1:0},sa={name:"font-family",initialValue:"",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=[],n=[],s=!1;return t.forEach(e=>{switch(e.type){case 20:i.push(e.value);break;case 0:s=!0,i.push(e.value);break;case 17:i.push(e.number.toString());break;case 4:r.push(i.join(" ")),n.push(s),s=!1,i.length=0}}),i.length&&(r.push(i.join(" ")),n.push(s)),r.map((e,t)=>n[t]||-1!==e.indexOf(" ")?`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}'`:e)}},oa={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},aa={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:(e,t)=>20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0},la={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>"strict"===t?"strict":"normal"},da={name:"line-height",initialValue:"normal",prefix:!1,type:4},ca=(e,t)=>ui(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Bi(e)?Hi(e,t):t,pa={name:"list-style-image",initialValue:"none",type:0,prefix:!1,skipCache:!0,parse:(e,t)=>20===t.type&&"none"===t.value||!ht(t)?null:bo.parse(e,t)},ha={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:(e,t)=>"inside"===t?0:1},fa=(ua=e=>({name:`margin-${e}`,initialValue:"0",prefix:!1,type:4}))("top"),ga=ua("right"),ma=ua("bottom"),ba=ua("left"),xa={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>"break-word"===t?"break-word":"normal"},va=(ya=e=>({name:`padding-${e}`,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}))("top"),wa=ya("right"),ka=ya("bottom"),Ca=ya("left"),Sa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Ea={name:"position",initialValue:"static",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Ma={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>1===t.length&&gi(Mt(t,0),"none")?[]:xi(t).map(t=>{let i={color:0,offsetX:Fi,offsetY:Fi,blur:Fi},r=0;for(let n=0;n<t.length;n++){let s=t[n];s&&(Ri(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:i.blur=s,r++):i.color=Rn.parse(e,s))}return i})},Aa={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Ta={name:"transform",initialValue:"none",prefix:!0,type:0,parse:(e,t)=>{if(20===t.type&&"none"===t.value)return null;if(18===t.type){let i=La[t.name];if(typeof i>"u")throw new Error(`Attempting to parse an unsupported transform function "${t.name}"`);return i(e,t.values)}return null}},La={matrix:(e,t)=>{let i=t.filter(e=>17===e.type).map(e=>e.number);return 6===i.length?i:null},matrix3d:(e,t)=>{let i=t.filter(e=>17===e.type).map(e=>e.number);return 16!==i.length?null:[Mt(i,0),Mt(i,1),Mt(i,4),Mt(i,5),Mt(i,12),Mt(i,13)]},rotate:(e,t)=>{if(1!==t.length)return null;let i=Mt(t,0),r=0;if(17===i.type&&0===i.number)r=0;else{if(15!==i.type)return null;r=Ui.parse(e,i)}let n=Math.cos(r),s=Math.sin(r);return[n,s,-s,n,0,0]}},Ba=[Ra={type:16,number:50,flags:4},Ra],Pa={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:(e,t)=>{let i=t.filter(Bi);return 2!==i.length?Ba:[Mt(i,0),Mt(i,1)]}},Ia={name:"rotate",initialValue:"none",prefix:!1,type:0,parse:(e,t)=>20===t.type&&"none"===t.value?null:17===t.type&&0===t.number?0:15===t.type?180*Ui.parse(e,t)/Math.PI:null},Na={name:"visibility",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Da={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"break-all":return"break-all";case"keep-all":return"keep-all";default:return"normal"}}},Oa={name:"white-space",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"pre":return"pre";case"nowrap":return"nowrap";case"pre-wrap":return"pre-wrap";case"pre-line":return"pre-line";default:return"normal"}}},$a=e=>0!==e,Fa=e=>3===e||4===e,za={name:"writing-mode",initialValue:"horizontal-tb",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"vertical-rl":return 1;case"vertical-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4;default:return 0}}},_a={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>{if(20===t.type)return{auto:!0,order:0};if(hi(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Wa={name:"time",parse:(e,t)=>{if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},Ha={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:(e,t)=>hi(t)?t.number:1},Va={name:"text-decoration-style",initialValue:"solid",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"double":return 1;case"dotted":return 2;case"dashed":return 3;case"wavy":return 4;default:return 0}}},ja={name:"text-decoration-thickness",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>{if(ui(t))switch(t.value){case"auto":return"auto";case"from-font":return"from-font"}return pi(t)?t.number:"auto"}},Ua={name:"text-underline-offset",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>ui(t)&&"auto"===t.value?"auto":pi(t)?t.number:"auto"},qa={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:(e,t)=>hi(t)?t.number:ui(t)&&"bold"===t.value?700:400},Ga={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>t.filter(ui).map(e=>e.value)},Ya={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Ka={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:(e,t)=>t.filter(pi).map(t=>Wa.parse(e,t))},Xa={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:(e,t)=>1===t.length&&gi(Mt(t,0),"none")?[]:xi(t).map(t=>{let i={color:255,offsetX:Fi,offsetY:Fi,blur:Fi,spread:Fi,inset:!1},r=0;for(let n=0;n<t.length;n++){let s=t[n];s&&(gi(s,"inset")?i.inset=!0:Ri(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:2===r?i.blur=s:i.spread=s,r++):i.color=Rn.parse(e,s))}return i})},Ja={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:(e,t)=>{let i=[];return t.filter(ui).forEach(e=>{switch(e.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2)}}),[0,1,2].forEach(e=>{-1===i.indexOf(e)&&i.push(e)}),i}},Qa={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Za={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:(e,t)=>pi(t)?t.number:0},el={name:"-webkit-line-clamp",initialValue:"none",prefix:!0,type:0,parse:(e,t)=>20===t.type&&"none"===t.value?0:17===t.type?Math.max(0,Math.floor(t.number)):0},tl={name:"object-fit",initialValue:"fill",prefix:!1,type:1,parse:(e,t)=>t.filter(ui).reduce((e,t)=>e|il(t.value),0)},il=e=>{switch(e){case"contain":return 2;case"cover":return 4;case"none":return 8;case"scale-down":return 16}return 0},rl={name:"text-overflow",initialValue:"clip",prefix:!1,type:2,parse:(e,t)=>"ellipsis"===t?1:0},nl={name:"image-rendering",initialValue:"auto",prefix:!1,type:2,parse:(e,t)=>{switch(t.toLowerCase()){case"crisp-edges":case"-webkit-crisp-edges":case"-moz-crisp-edges":return 1;case"pixelated":case"-webkit-optimize-contrast":return 2;case"smooth":case"high-quality":return 3;default:return 0}}},sl={NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"},ol=new Set(Object.values(sl)),al={name:"mix-blend-mode",initialValue:"normal",type:2,prefix:!1,parse:(e,t)=>ol.has(t)?t:sl.NORMAL},ll={name:"filter",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{if(1===t.length){let e=Mt(t,0);if(20===e.type&&"none"===e.value)return null}let i=[];for(let e of t)if(22!==e.type){if(18===e.type){let t=e,r=dl(t.values);switch(t.name){case"blur":i.push(`blur(${r})`);break;case"brightness":case"contrast":case"invert":case"opacity":case"saturate":case"sepia":default:i.push(`${t.name}(${r})`);break;case"grayscale":i.push(`grayscale(${r})`);break;case"hue-rotate":i.push(`hue-rotate(${r})`);break;case"drop-shadow":i.push(`drop-shadow(${r})`)}}}else i.push(`url("${e.value}")`);return i.length>0?i.join(" "):null}},dl=e=>{let t=[];for(let i of e)31!==i.type?18===i.type?t.push(`${i.name}(${dl(i.values)})`):4===i.type?t.push(","):6===i.type?t.push(i.value):15===i.type?t.push(`${i.number}${i.unit}`):17===i.type?t.push(`${i.number}`):16===i.type?t.push(`${i.number}%`):20===i.type?t.push(i.value):5===i.type&&t.push(`#${i.value}`):t.push(" ");return t.join("").trim()},cl={name:"font-variant-ligatures",initialValue:"normal",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"none":return 1;case"common-ligatures":return 2;case"no-common-ligatures":return 3;case"discretionary-ligatures":return 4;case"no-discretionary-ligatures":return 5;case"historical-ligatures":return 6;case"no-historical-ligatures":return 7;case"contextual":return 8;case"no-contextual":return 9;default:return 0}}},pl={name:"zoom",initialValue:"1",type:0,prefix:!1,parse:(e,t)=>16===t.type?Math.max(0,t.number/100):17===t.type?Math.max(0,t.number):1},hl={name:"object-position",initialValue:"50% 50%",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=0;for(;r<t.length&&i.length<2;){let e=t[r];if(!e)break;if(ui(e))switch(e.value){case"left":case"top":i.push(Fi);break;case"center":i.push(zi);break;case"right":case"bottom":i.push(_i)}else Bi(e)&&i.push(e);r++}for(;i.length<2;)i.push(zi);return[Mt(i,0),Mt(i,1)]}},ul=new Set(Object.values({NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"})),fl={name:"background-blend-mode",initialValue:"normal",prefix:!1,type:1,parse:(e,t)=>{let i=[],r=t.filter(bi);for(let e of r)ui(e)&&ul.has(e.value)&&i.push(e.value);return i.length>0?i:["normal"]}},gl={name:"border-image-source",initialValue:"none",prefix:!1,type:1,skipCache:!0,parse:(e,t)=>{if(0===t.length)return null;let i=t.filter(e=>bi(e)&&ht(e));return 0===i.length?null:bo.parse(e,Mt(i,0))}},ml=e=>{let t=[...e];if(1===t.length){let e=Mt(t,0);t.push(e,e,e)}else 2===t.length?t.push(Mt(t,0),Mt(t,1)):3===t.length&&t.push(Mt(t,1));return[Mt(t,0),Mt(t,1),Mt(t,2),Mt(t,3)]},bl={name:"border-image-slice",initialValue:"100%",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(mi),r=[],n=!1,s="percent";for(let e of i)ui(e)&&"fill"===e.value?n=!0:17===e.type?(r.push(e.number),s="number"):16===e.type&&(r.push(e.number),s="percent");let[o,a,l,d]=ml(r.length>0?r:[100]);return{top:o,right:a,bottom:l,left:d,fill:n,unit:s}}},xl=e=>{switch(e){case"repeat":return 1;case"round":return 2;case"space":return 3;default:return 0}},yl={name:"border-image-repeat",initialValue:"stretch",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(mi),r=[];for(let e of i)ui(e)&&r.push(xl(e.value));let n=r[0]??0;return{horizontal:n,vertical:r[1]??n}}},vl={name:"box-decoration-break",initialValue:"slice",prefix:!1,type:2,parse:(e,t)=>"clone"===t?1:0},wl={name:"accent-color",initialValue:"auto",prefix:!1,type:0,parse:(e,t)=>ui(t)&&"auto"===t.value?null:Rn.parse(e,t)},kl={name:"-webkit-text-fill-color",initialValue:"currentcolor",prefix:!0,type:0,parse:(e,t)=>ui(t)&&"currentcolor"===t.value?null:Rn.parse(e,t)},Cl={name:"isolation",initialValue:"auto",prefix:!1,type:2,parse:(e,t)=>"isolate"===t?1:0},Sl={name:"outline-style",initialValue:"none",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"solid":return 2;case"dashed":return 3;case"dotted":return 4;case"double":return 5;case"auto":return 1;default:return 0}}},El={name:"outline-color",initialValue:"currentcolor",prefix:!1,type:0,parse:(e,t)=>!ui(t)||"currentcolor"!==t.value&&"invert"!==t.value?Rn.parse(e,t):null},Ml={name:"outline-width",initialValue:"medium",prefix:!1,type:0,parse:Ho.parse},Al={name:"backdrop-filter",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>ll.parse(e,t)},Tl=["dot","circle","double-circle","triangle","sesame"],Ll=e=>{let t=[...e];if(1===t.length){let e=Mt(t,0);t.push(e,e,e)}else 2===t.length?t.push(Mt(t,0),Mt(t,1)):3===t.length&&t.push(Mt(t,1));return[Mt(t,0),Mt(t,1),Mt(t,2),Mt(t,3)]},Rl=e=>ui(e)&&"auto"===e.value?{kind:"auto"}:17===e.type?{kind:"number",value:e.number}:15===e.type&&"px"===e.unit?{kind:"length",value:e.number}:16===e.type?{kind:"percentage",value:e.number}:null,Bl=e=>{let t=[];for(let i of e){if(31===i.type)continue;let e=Rl(i);if(!e)return null;t.push(e)}return 0===t.length||t.length>4?null:Ll(t)},Pl=[["animationDuration",Ka,"animationDuration"],["backgroundClip",$s,"backgroundClip"],["backgroundColor",Fs,"backgroundColor"],["backgroundImage",yo,"backgroundImage"],["backgroundOrigin",vo,"backgroundOrigin"],["backgroundPosition",wo,"backgroundPosition"],["backgroundRepeat",ko,"backgroundRepeat"],["backgroundSize",So,"backgroundSize"],["borderTopColor",Ao,"borderTopColor"],["borderRightColor",To,"borderRightColor"],["borderBottomColor",Lo,"borderBottomColor"],["borderLeftColor",Ro,"borderLeftColor"],["borderTopLeftRadius",Po,"borderTopLeftRadius"],["borderTopRightRadius",Io,"borderTopRightRadius"],["borderBottomRightRadius",No,"borderBottomRightRadius"],["borderBottomLeftRadius",Do,"borderBottomLeftRadius"],["borderTopStyle",$o,"borderTopStyle"],["borderRightStyle",Fo,"borderRightStyle"],["borderBottomStyle",zo,"borderBottomStyle"],["borderLeftStyle",_o,"borderLeftStyle"],["borderTopWidth",Ho,"borderTopWidth"],["borderRightWidth",Vo,"borderRightWidth"],["borderBottomWidth",jo,"borderBottomWidth"],["borderLeftWidth",Uo,"borderLeftWidth"],["boxShadow",Xa,"boxShadow"],["clipPath",ia,"clipPath"],["color",ra,"color"],["direction",na,"direction"],["display",Es,"display"],["fontFamily",sa,"fontFamily"],["fontSize",oa,"fontSize"],["fontStyle",Ya,"fontStyle"],["fontVariant",Ga,"fontVariant"],["fontWeight",qa,"fontWeight"],["letterSpacing",aa,"letterSpacing"],["lineBreak",la,"lineBreak"],["lineHeight",da,"lineHeight"],["listStyleImage",pa,"listStyleImage"],["listStylePosition",ha,"listStylePosition"],["listStyleType",ls,"listStyleType"],["marginTop",fa,"marginTop"],["marginRight",ga,"marginRight"],["marginBottom",ma,"marginBottom"],["marginLeft",ba,"marginLeft"],["opacity",Ha,"opacity"],["overflowWrap",xa,"overflowWrap"],["paddingTop",va,"paddingTop"],["paddingRight",wa,"paddingRight"],["paddingBottom",ka,"paddingBottom"],["paddingLeft",Ca,"paddingLeft"],["paintOrder",Ja,"paintOrder"],["position",Ea,"position"],["textAlign",Sa,"textAlign"],["textDecorationStyle",Va,"textDecorationStyle"],["textDecorationThickness",ja,"textDecorationThickness"],["textUnderlineOffset",Ua,"textUnderlineOffset"],["textShadow",Ma,"textShadow"],["textTransform",Aa,"textTransform"],["textOverflow",rl,"textOverflow"],["transform",Ta,"transform"],["transformOrigin",Pa,"transformOrigin"],["rotate",Ia,"rotate"],["translate",{name:"translate",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=[];for(let e of t)Bi(e)&&i.push(e);return 0===i.length?null:[Mt(i,0),i.length>1?Mt(i,1):Fi]}},"translate"],["scale",{name:"scale",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=[];for(let e of t)hi(e)&&i.push(e.number);return 0===i.length?null:[Mt(i,0),i.length>1?Mt(i,1):Mt(i,0)]}},"scale"],["visibility",Na,"visibility"],["webkitTextStrokeColor",Qa,"webkitTextStrokeColor"],["webkitTextStrokeWidth",Za,"webkitTextStrokeWidth"],["webkitLineClamp",el,"webkitLineClamp"],["wordBreak",Da,"wordBreak"],["whiteSpace",Oa,"whiteSpace"],["writingMode",za,"writingMode"],["zIndex",_a,"zIndex"],["objectFit",tl,"objectFit"],["imageRendering",nl,"imageRendering"],["mixBlendMode",al,"mixBlendMode"],["filter",ll,"filter"],["fontVariantLigatures",cl,"fontVariantLigatures"],["zoom",pl,"zoom"],["objectPosition",hl,"objectPosition"],["backgroundBlendMode",fl,"backgroundBlendMode"],["borderImageSource",gl,"borderImageSource"],["borderImageSlice",bl,"borderImageSlice"],["borderImageRepeat",yl,"borderImageRepeat"],["boxDecorationBreak",vl,"boxDecorationBreak"],["accentColor",wl,"accentColor"],["webkitTextFillColor",kl,"webkitTextFillColor"],["isolation",Cl,"isolation"],["outlineColor",El,"outlineColor"],["outlineStyle",Sl,"outlineStyle"],["outlineWidth",Ml,"outlineWidth"],["outlineOffset",{name:"outline-offset",initialValue:"0px",prefix:!1,type:0,parse:(e,t)=>pi(t)||hi(t)?t.number:0},"outlineOffset"],["backdropFilter",Al,"backdropFilter"],["maskImage",{name:"mask-image",initialValue:"none",prefix:!1,type:1,skipCache:!0,parse:yo.parse},"maskImage"],["maskPosition",{name:"mask-position",initialValue:"0%",prefix:!1,type:1,parse:wo.parse},"maskPosition"],["maskRepeat",{name:"mask-repeat",initialValue:"repeat",prefix:!1,type:1,parse:ko.parse},"maskRepeat"],["maskSize",{name:"mask-size",initialValue:"auto",prefix:!1,type:1,parse:So.parse},"maskSize"],["textEmphasisStyle",{name:"text-emphasis-style",initialValue:"none",prefix:!1,type:1,parse:(e,t)=>{let i=t.filter(mi);if(0===i.length)return null;let r=Mt(i,0);if(0===r.type)return r.value;if(ui(r)){if("none"===r.value)return null;if("filled"!==r.value&&"open"!==r.value&&-1===Tl.indexOf(r.value))return r.value}let n=!0,s="circle";for(let e of i)ui(e)&&("filled"===e.value?n=!0:"open"===e.value?n=!1:-1!==Tl.indexOf(e.value)&&(s=e.value));return{fill:n,shape:s}}},"textEmphasisStyle"],["textEmphasisColor",{name:"text-emphasis-color",initialValue:"currentcolor",prefix:!1,type:0,parse:(e,t)=>ui(t)&&"currentcolor"===t.value?null:Rn.parse(e,t)},"textEmphasisColor"],["textEmphasisPosition",{name:"text-emphasis-position",initialValue:"over right",prefix:!1,type:1,parse:(e,t)=>{let i=!0,r=!0;for(let e of t)if(ui(e))switch(e.value){case"over":i=!0;break;case"under":i=!1;break;case"right":r=!0;break;case"left":r=!1}return{over:i,right:r}}},"textEmphasisPosition"],["borderImageWidth",{name:"border-image-width",initialValue:"auto",prefix:!1,type:1,parse:(e,t)=>{let i=Bl(t),r={kind:"auto"};return i?{top:i[0],right:i[1],bottom:i[2],left:i[3]}:{top:r,right:r,bottom:r,left:r}}},"borderImageWidth"],["borderImageOutset",{name:"border-image-outset",initialValue:"0px",prefix:!1,type:1,parse:(e,t)=>{let i=Bl(t),r={kind:"length",value:0};return i?{top:i[0],right:i[1],bottom:i[2],left:i[3]}:{top:r,right:r,bottom:r,left:r}}},"borderImageOutset"],["webkitBoxReflect",{name:"-webkit-box-reflect",initialValue:"none",prefix:!0,type:1,skipCache:!0,parse:(e,t)=>{let i=null,r=0,n=null;for(let s of t)if(31!==s.type){if(null===i&&ui(s)){if("below"===s.value||"above"===s.value||"left"===s.value||"right"===s.value){i=s.value;continue}if("none"===s.value)return null}if(0===r&&pi(s)&&"px"===s.unit){r=s.number;continue}if(null===n&&ht(s)){n=bo.parse(e,s);continue}}return null===i?null:{direction:i,offset:r,mask:n}}},"webkitBoxReflect"]],Il=new Map,Nl=(e,t,i)=>{let r=null!==i&&typeof i<"u"?i.toString():t.initialValue;""===r.trim()&&(r=t.initialValue);let n=Il.get(t);if(n){let e=n.get(r);if(void 0!==e)return n.delete(r),n.set(r,e),e}let s=di.get();s.write(r);let o=new ci(s.read());di.release(s);let a=(()=>{switch(t.type){case 2:{let i=o.parseComponentValue();return t.parse(e,ui(i)?i.value:t.initialValue)}case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Ui.parse(e,o.parseComponentValue());case"color":return Rn.parse(e,o.parseComponentValue());case"image":return bo.parse(e,o.parseComponentValue());case"length":{let e=o.parseComponentValue();return Ri(e)?e:Fi}case"length-percentage":{let e=o.parseComponentValue();return Bi(e)?e:Fi}case"time":return Wa.parse(e,o.parseComponentValue())}}})();if(n||(n=new Map,Il.set(t,n)),!(t.skipCache||3===t.type&&"image"===t.format)){if(n.size>=200){let e=n.keys().next().value;void 0!==e&&n.delete(e)}n.set(r,a)}return a},Dl=class{styles;constructor(e){this.styles=e}get topColor(){return this.styles.borderTopColor}get rightColor(){return this.styles.borderRightColor}get bottomColor(){return this.styles.borderBottomColor}get leftColor(){return this.styles.borderLeftColor}get topStyle(){return this.styles.borderTopStyle}get rightStyle(){return this.styles.borderRightStyle}get bottomStyle(){return this.styles.borderBottomStyle}get leftStyle(){return this.styles.borderLeftStyle}get topWidth(){return this.styles.borderTopWidth}get rightWidth(){return this.styles.borderRightWidth}get bottomWidth(){return this.styles.borderBottomWidth}get leftWidth(){return this.styles.borderLeftWidth}get topLeftRadius(){return this.styles.borderTopLeftRadius}get topRightRadius(){return this.styles.borderTopRightRadius}get bottomRightRadius(){return this.styles.borderBottomRightRadius}get bottomLeftRadius(){return this.styles.borderBottomLeftRadius}get imageSource(){return this.styles.borderImageSource}get imageSlice(){return this.styles.borderImageSlice}get imageRepeat(){return this.styles.borderImageRepeat}get boxShadow(){return this.styles.boxShadow}},Ol=class{styles;constructor(e){this.styles=e}get color(){return this.styles.backgroundColor}get image(){return this.styles.backgroundImage}get clip(){return this.styles.backgroundClip}get origin(){return this.styles.backgroundOrigin}get position(){return this.styles.backgroundPosition}get repeat(){return this.styles.backgroundRepeat}get size(){return this.styles.backgroundSize}get blendMode(){return this.styles.backgroundBlendMode}},$l=class{styles;constructor(e){this.styles=e}get family(){return this.styles.fontFamily}get size(){return this.styles.fontSize}get style(){return this.styles.fontStyle}get variant(){return this.styles.fontVariant}get weight(){return this.styles.fontWeight}get ligatures(){return this.styles.fontVariantLigatures}get color(){return this.styles.color}get letterSpacing(){return this.styles.letterSpacing}get lineHeight(){return this.styles.lineHeight}get textAlign(){return this.styles.textAlign}get textTransform(){return this.styles.textTransform}get textOverflow(){return this.styles.textOverflow}get textShadow(){return this.styles.textShadow}get textDecorationColor(){return this.styles.textDecorationColor}get textDecorationLine(){return this.styles.textDecorationLine}get textDecorationStyle(){return this.styles.textDecorationStyle}get textDecorationThickness(){return this.styles.textDecorationThickness}get textUnderlineOffset(){return this.styles.textUnderlineOffset}get wordBreak(){return this.styles.wordBreak}get lineBreak(){return this.styles.lineBreak}get overflowWrap(){return this.styles.overflowWrap}get writingMode(){return this.styles.writingMode}get direction(){return this.styles.direction}get webkitTextStrokeColor(){return this.styles.webkitTextStrokeColor}get webkitTextStrokeWidth(){return this.styles.webkitTextStrokeWidth}get webkitLineClamp(){return this.styles.webkitLineClamp}get paintOrder(){return this.styles.paintOrder}},Fl=class{styles;constructor(e){this.styles=e}get display(){return this.styles.display}get position(){return this.styles.position}get float(){return this.styles.float}get zIndex(){return this.styles.zIndex}get marginTop(){return this.styles.marginTop}get marginRight(){return this.styles.marginRight}get marginBottom(){return this.styles.marginBottom}get marginLeft(){return this.styles.marginLeft}get paddingTop(){return this.styles.paddingTop}get paddingRight(){return this.styles.paddingRight}get paddingBottom(){return this.styles.paddingBottom}get paddingLeft(){return this.styles.paddingLeft}get overflowX(){return this.styles.overflowX}get overflowY(){return this.styles.overflowY}get opacity(){return this.styles.opacity}get visibility(){return this.styles.visibility}get transform(){return this.styles.transform}get transformOrigin(){return this.styles.transformOrigin}get rotate(){return this.styles.rotate}get zoom(){return this.styles.zoom}get clipPath(){return this.styles.clipPath}get mixBlendMode(){return this.styles.mixBlendMode}get filter(){return this.styles.filter}get imageRendering(){return this.styles.imageRendering}get objectFit(){return this.styles.objectFit}get objectPosition(){return this.styles.objectPosition}get boxDecorationBreak(){return this.styles.boxDecorationBreak}get listStyleImage(){return this.styles.listStyleImage}get listStylePosition(){return this.styles.listStylePosition}get listStyleType(){return this.styles.listStyleType}get animationDuration(){return this.styles.animationDuration}isVisible(){return this.styles.isVisible()}isTransparent(){return this.styles.isTransparent()}isTransformed(){return this.styles.isTransformed()}isPositioned(){return this.styles.isPositioned()}isPositionedWithZIndex(){return this.styles.isPositionedWithZIndex()}isFloating(){return this.styles.isFloating()}isInlineLevel(){return this.styles.isInlineLevel()}},zl=class{animationDuration;backgroundClip;backgroundColor;backgroundImage;backgroundOrigin;backgroundPosition;backgroundRepeat;backgroundSize;borderTopColor;borderRightColor;borderBottomColor;borderLeftColor;borderTopLeftRadius;borderTopRightRadius;borderBottomRightRadius;borderBottomLeftRadius;borderTopStyle;borderRightStyle;borderBottomStyle;borderLeftStyle;borderTopWidth;borderRightWidth;borderBottomWidth;borderLeftWidth;boxShadow;clipPath;color;direction;display;float;fontFamily;fontSize;fontStyle;fontVariant;fontWeight;letterSpacing;lineBreak;lineHeight;listStyleImage;listStylePosition;listStyleType;marginTop;marginRight;marginBottom;marginLeft;opacity;overflowX;overflowY;overflowWrap;paddingTop;paddingRight;paddingBottom;paddingLeft;paintOrder;position;textAlign;textDecorationColor;textDecorationLine;textDecorationStyle;textDecorationThickness;textUnderlineOffset;textShadow;textTransform;textOverflow;transform;transformOrigin;rotate;translate;scale;visibility;webkitTextStrokeColor;webkitTextStrokeWidth;webkitLineClamp;wordBreak;whiteSpace;writingMode;zIndex;objectFit;imageRendering;mixBlendMode;filter;fontVariantLigatures;zoom;objectPosition;backgroundBlendMode;borderImageSource;borderImageSlice;borderImageRepeat;boxDecorationBreak;accentColor;webkitTextFillColor;isolation;outlineColor;outlineStyle;outlineWidth;outlineOffset;backdropFilter;maskImage;maskPosition;maskRepeat;maskSize;textEmphasisStyle;textEmphasisColor;textEmphasisPosition;borderImageWidth;borderImageOutset;webkitBoxReflect;_border;_background;_font;_layout;get border(){return this._border??(this._border=new Dl(this))}get background(){return this._background??(this._background=new Ol(this))}get font(){return this._font??(this._font=new $l(this))}get layout(){return this._layout??(this._layout=new Fl(this))}constructor(e,t){if("none"!==t.display){for(let[i,r,n]of Pl)this[i]=Nl(e,r,t[n]);Object.assign(this,_l(e,t))}else{this.display=0;for(let[t,i]of Pl)"display"!==t&&(this[t]=Nl(e,i,void 0));Object.assign(this,_l(e,null))}}isVisible(){return this.display>0&&this.opacity>0&&0===this.visibility}isTransparent(){return Ki(this.backgroundColor)}isTransformed(){return null!==this.transform||null!==this.rotate||null!==this.translate||null!==this.scale}isPositioned(){return 0!==this.position}isPositionedWithZIndex(){return this.isPositioned()&&!this.zIndex.auto}isFloating(){return 0!==this.float}isInlineLevel(){return ds(this.display,4)||ds(this.display,33554432)||ds(this.display,268435456)||ds(this.display,536870912)||ds(this.display,67108864)||ds(this.display,134217728)}},_l=(e,t)=>{let i=(e,i)=>{if(t)return t[e]??i},r=Nl(e,Ts,i("overflow"));return{float:Nl(e,As,i("cssFloat")),textDecorationColor:Nl(e,Ls,i("textDecorationColor",i("color"))),textDecorationLine:Nl(e,Rs,i("textDecorationLine",i("textDecoration"))),overflowX:r[0],overflowY:r[r.length>1?1:0]}},Wl=class{content;quotes;constructor(e,t){this.content=Nl(e,Bs,t.content),this.quotes=Nl(e,Ps,t.quotes)}},Hl=class{counterIncrement;counterReset;constructor(e,t){this.counterIncrement=Nl(e,Ds,t.counterIncrement),this.counterReset=Nl(e,Os,t.counterReset)}},Vl=e=>{if("function"!=typeof e.getAttribute)return 0;switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},jl=(e,t)=>{let i=Vl(e);return 1===i||t===i},Ul=e=>{let t="";for(let i of e)try{let e=i.cssRules;for(let i=0;i<e.length;i++){let r=e[i];r&&"string"==typeof r.cssText&&(t+=r.cssText)}}catch{}return t},ql=(e,t,i)=>{let r=Ul(t);if(!r)return null;let n=e.createElement("style");return n.textContent=r,i&&(n.nonce=i),n},Gl=class{cloneNodeFn;options;context;constructor(e,t,i){this.cloneNodeFn=e,this.options=t,this.context=i}appendChildNode(e,t,i){this.safeAppendClonedChild(e,t,i)}cloneChildNodes(e,t,i){e.shadowRoot&&t.shadowRoot?(this.cloneShadowDOMChildren(e.shadowRoot,t.shadowRoot,i),this.cloneLightDOMChildren(e,t,i)):e.shadowRoot&&!t.shadowRoot?this.cloneShadowDOMAsLightDOM(e.shadowRoot,t,i):this.cloneLightDOMChildren(e,t,i)}shouldCloneChild(e){return!(_n(e)&&(Zn(e)||e.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e)))}shouldCloneStyleElement(e){return!this.options.copyStyles||!_n(e)||!Qn(e)}safeAppendClonedChild(e,t,i){this.shouldCloneChild(t)&&this.shouldCloneStyleElement(t)&&e.appendChild(this.cloneNodeFn(t,i))}cloneAssignedNodes(e,t,i){e.forEach(e=>{this.safeAppendClonedChild(t,e,i)})}cloneSlotFallbackContent(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)this.safeAppendClonedChild(t,r,i)}cloneSlotElement(e,t,i){if(!is(e))return;let r=e;if("function"!=typeof r.assignedNodes)return this.context.logger.warn("HTMLSlotElement.assignedNodes is not available",e),void this.cloneSlotFallbackContent(e,t,i);let n=r.assignedNodes();if(!n||!Array.isArray(n))return this.context.logger.warn("assignedNodes() did not return a valid array",e),void this.cloneSlotFallbackContent(e,t,i);n.length>0?this.cloneAssignedNodes(n,t,i):this.cloneSlotFallbackContent(e,t,i)}cloneShadowDOMChildren(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)_n(r)&&is(r)?this.cloneSlotElement(r,t,i):this.safeAppendClonedChild(t,r,i);this.appendAdoptedStyleSheets(e,t,i)}cloneLightDOMChildren(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i)}cloneSlotElementAsLightDOM(e,t,i){if(!is(e))return;let r=e;if("function"!=typeof r.assignedNodes){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i);return}let n=r.assignedNodes();if(n&&Array.isArray(n)&&n.length>0)n.forEach(e=>this.appendChildNode(t,e,i));else for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,i)}cloneShadowDOMAsLightDOM(e,t,i){for(let r=e.firstChild;r;r=r.nextSibling)_n(r)&&is(r)?this.cloneSlotElementAsLightDOM(r,t,i):this.appendChildNode(t,r,i);this.appendAdoptedStyleSheets(e,t,i)}appendAdoptedStyleSheets(e,t,i){if(i)return;let r=e.adoptedStyleSheets;if(!r||0===r.length)return;let n="host"in t?t.host.ownerDocument:t.ownerDocument;if(!n)return;let s=ql(n,r,this.options.cspNonce);s&&t.appendChild(s)}},Yl=["all","d","content"],Kl=(e,t)=>{let i=[];for(let t=e.length-1;t>=0;t--){let r=e.item(t);if(-1===Yl.indexOf(r)&&!r.startsWith("--")){let t=e.getPropertyValue(r);if(t){let n=e.getPropertyPriority(r);i.push(n?`${r}:${t} !${n}`:`${r}:${t}`)}}}return i.length>0&&(t.style.cssText=i.join(";")+";"),t},Xl="___html2canvas___pseudoelement_before",Jl="___html2canvas___pseudoelement_after",Ql='{\n content: "" !important;\n display: none !important;\n}',Zl=(e,t)=>{ed(e,`.${Xl}:before${Ql}\n .${Jl}:after${Ql}`,t)},ed=(e,t,i)=>{let r=e.ownerDocument;if(r){let n=r.createElement("style");n.textContent=t,i&&(n.nonce=i),e.appendChild(n)}},td=class{context;counters;quoteDepth=0;constructor(e,t){this.context=e,this.counters=t}resolvePseudoContent(e,t,i,r){if(!i)return;let n=i.content,s=t.ownerDocument;if(!s||!n||"none"===n||"-moz-alt-content"===n||"none"===i.display)return;this.counters.parse(new Hl(this.context,i));let o=new Wl(this.context,i),a=s.createElement("html2canvaspseudoelement");Kl(i,a),o.content.forEach(t=>{if(0===t.type)a.appendChild(s.createTextNode(t.value));else if(22===t.type){let e=s.createElement("img");e.src=t.value,e.style.opacity="1",a.appendChild(e)}else if(18===t.type){if("attr"===t.name){let i=t.values.filter(ui);i.length&&i[0]&&a.appendChild(s.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){let[e,i]=t.values.filter(bi);if(e&&ui(e)){let t=this.counters.getCounterValue(e.value),r=i&&ui(i)?ls.parse(this.context,i.value):3;a.appendChild(s.createTextNode(Ss(t,r,!1)))}}else if("counters"===t.name){let[e,i,r]=t.values.filter(bi);if(e&&ui(e)){let t=this.counters.getCounterValues(e.value),n=r&&ui(r)?ls.parse(this.context,r.value):3,o=i&&0===i.type?i.value:"",l=t.map(e=>Ss(e,n,!1)).join(o);a.appendChild(s.createTextNode(l))}}}else if(20===t.type)switch(t.value){case"open-quote":a.appendChild(s.createTextNode(Is(o.quotes,this.quoteDepth++,!0)));break;case"close-quote":{let e=this.quoteDepth>0;this.quoteDepth=Math.max(0,this.quoteDepth-1),e&&a.appendChild(s.createTextNode(Is(o.quotes,this.quoteDepth,!1)));break}default:a.appendChild(s.createTextNode(t.value))}}),a.className=`${Xl} ${Jl}`;let l=0===r?` ${Xl}`:` ${Jl}`;return Hn(t)?t.className.baseValue+=l:t.className+=l,a}},id=e=>{if(e?.aborted)throw new DOMException("The operation was aborted.","AbortError")},rd=new WeakMap,nd=e=>{let t=e&&e.trustedTypes;if(!t)return null;if(rd.has(t))return rd.get(t)??null;let i=null;try{i=t.getPolicy?.("html2canvas-pro")??t.createPolicy("html2canvas-pro",{createHTML:e=>e})}catch{i=null}return rd.set(t,i),i},sd=(e,t,i)=>{let r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling="no",r.setAttribute("data-html2canvas-ignore","true"),(i||e.body).appendChild(r),r},od=e=>new Promise(t=>{e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}),ad=e=>Promise.all([].slice.call(e.images,0).map(od)),ld=(e,t,i)=>new Promise((r,n)=>{let s=e.contentWindow;if(!s)return n("No window assigned for iframe");let o,a=s.document,l=setTimeout(()=>{o&&clearInterval(o),n(new Error("Cloned iframe did not fire its load event within 60000ms"))},6e4),d=()=>{o&&clearInterval(o),clearTimeout(l),n(new DOMException("The operation was aborted.","AbortError"))};s.onload=e.onload=()=>{s.onload=e.onload=null;let n=Math.ceil(600),c=0;o=setInterval(()=>{c++,i?.aborted?d():a.body.childNodes.length>0&&"complete"===a.readyState?(clearInterval(o),o=void 0,clearTimeout(l),r(e)):c>=n&&(clearInterval(o),o=void 0,t?.warn("Cloned iframe did not become ready within 30 seconds; continuing with a possibly incomplete document"),r(e))},50)},i&&(i.aborted?d():i.addEventListener("abort",d,{once:!0}))}),dd=e=>{let t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=" "+e.internalSubset.replace(/"/g,""").replace(/>/g,">")),e.publicId?(t+=' PUBLIC "'+e.publicId.replace(/"/g,""")+'"',e.systemId&&(t+=' "'+e.systemId.replace(/"/g,""")+'"')):e.systemId&&(t+=' SYSTEM "'+e.systemId.replace(/"/g,""")+'"'),t+=">"),t},cd=(e,t,i)=>{e&&e.defaultView&&(t!==e.defaultView.pageXOffset||i!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,i)},pd=([e,t,i])=>{e.scrollLeft=t,e.scrollTop=i},hd=(e,t)=>{let i=e.ownerDocument.createElement("base");i.href=t;let r=e.getElementsByTagName("head").item(0);r?.insertBefore(i,r?.firstChild??null)},ud=(e,t,i,r)=>{let n=sd(t,i,r.container);if(!n.contentWindow)throw new Error("Unable to find iframe window");let s=t.defaultView.pageXOffset,o=t.defaultView.pageYOffset,a=n.contentWindow,l=a.document,d=ld(n,e.logger,r.signal).then(async()=>{r.scrolledElements.forEach(pd),a&&a.scrollTo(i.left,i.top);let t=r.onclone,s=r.clonedReferenceElement;if(typeof s>"u")throw new Error(`Error finding the ${r.referenceElementName} in the cloned document`);return id(r.signal),l.fonts&&l.fonts.ready&&await l.fonts.ready,id(r.signal),/(AppleWebKit)/g.test(navigator.userAgent)&&(await ad(l),id(r.signal)),"function"==typeof t&&await Promise.resolve().then(()=>t(l,s)),a.scrollTo(i.left,i.top),/AppleWebKit/g.test(navigator.userAgent)&&(a.scrollY!==i.top||a.scrollX!==i.left)&&(e.logger.warn("Unable to restore scroll position for cloned document"),e.adjustWindowBounds(a.scrollX-i.left,a.scrollY-i.top)),n}),c=t.baseURI;l.open();let p=dd(t.doctype)+"<html></html>";try{let e=nd(t.defaultView),i=e?e.createHTML(p):p;l.write(i)}catch{l.write(p)}cd(t,s,o),l.close();let h=l.adoptNode(r.documentElement);return hd(h,c),l.replaceChild(h,l.documentElement),d},fd=e=>{let t=e;for(;t;){if(t.parentNode&&t.parentNode.host)return t.parentNode;let e=t.getRootNode();if(e&&e!==t.ownerDocument&&e.host)return e;t=t.parentNode}return null},gd=class{context;options;scrolledElements;referenceElement;clonedReferenceElement;documentElement;counters;pseudoContents;slotCloner;constructor(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new cs,this.pseudoContents=new td(e,this.counters),this.slotCloner=new Gl((e,t)=>this.cloneNode(e,t),{ignoreElements:i.ignoreElements,copyStyles:i.copyStyles??!0,cspNonce:i.cspNonce},e),!t.ownerDocument)throw new Error("Cloned element does not have an owner document");if(!this.options.iframeContainer){let e=fd(t);e&&(this.options.iframeContainer=e)}this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1),this.appendDocumentAdoptedStyles(t.ownerDocument)}appendDocumentAdoptedStyles(e){if(this.options.copyStyles)return;let t=e.adoptedStyleSheets;if(!t||0===t.length)return;let i=this.documentElement.getElementsByTagName("head").item(0);if(!i)return;let r=ql(this.documentElement.ownerDocument??e,t,this.options.cspNonce);r&&i.appendChild(r)}toIFrame(e,t){return ud(this.context,e,t,{documentElement:this.documentElement,clonedReferenceElement:this.clonedReferenceElement,referenceElementName:this.referenceElement.nodeName,scrolledElements:this.scrolledElements,onclone:this.options.onclone,container:this.options.iframeContainer,signal:this.options.signal})}createElementClone(e){if(jl(e,2),Yn(e))return this.createCanvasClone(e);if(Kn(e))return this.createVideoClone(e);if(Qn(e))return this.createStyleClone(e);let t=e.cloneNode(!1);return Xn(t)&&(Xn(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),ss(t)&&!Hn(t)?this.createCustomElementClone(e,t):t}createCustomElementClone(e,t){let i=document.createElement("div");i.className=t.className,Kl(t.style,i);let r=t.attributes;for(let e=0;e<r.length;e++){let t=r.item(e);t&&"class"!==t.name&&"style"!==t.name&&i.setAttribute(t.name,t.value)}if(e.shadowRoot)try{i.attachShadow({mode:"open"})}catch(e){this.context.logger.error("Failed to attach shadow root to custom element clone:",e)}return i}createStyleClone(e){try{let t=e.sheet;if(t&&t.cssRules){let i=[].slice.call(t.cssRules,0).reduce((e,t)=>t&&"string"==typeof t.cssText?e+t.cssText:e,""),r=e.cloneNode(!1);return r.textContent=i,this.options.cspNonce&&(r.nonce=this.options.cspNonce),r}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}let t=e.cloneNode(!1);return this.options.cspNonce&&(t.nonce=this.options.cspNonce),t}createCanvasClone(e){if(this.options.inlineImages&&e.ownerDocument){let t=e.ownerDocument.createElement("img");try{return t.src=e.toDataURL(),t}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}let t=e.cloneNode(!1);try{t.width=e.width,t.height=e.height;let i=e.getContext("2d"),r=t.getContext("2d",{willReadFrequently:!0});if(r)if(!this.options.allowTaint&&i)r.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{let t=e.getContext("webgl2")??e.getContext("webgl");t&&!1===t.getContextAttributes()?.preserveDrawingBuffer&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e),r.drawImage(e,0,0)}return t}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return t}createVideoClone(e){let t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;let i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}let r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r}appendChildNode(e,t,i){this.slotCloner.appendChildNode(e,t,i)}cloneChildNodes(e,t,i){this.slotCloner.cloneChildNodes(e,t,i)}cloneNode(e,t){if(Wn(e))return(e.ownerDocument??document).createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);let i=e.ownerDocument.defaultView;if(i&&_n(e)&&(Vn(e)||Hn(e))){let r=this.createElementClone(e);r.style.transitionProperty="none";let n=i.getComputedStyle(e),s=as(e);this.referenceElement===e&&Vn(r)&&(this.clonedReferenceElement=r),Gn(r)&&Zl(r,this.options.cspNonce);let o=this.counters.parse(new Hl(this.context,n));if(s){let t=i.getComputedStyle(e,":before"),n=this.pseudoContents.resolvePseudoContent(e,r,t,0);n&&r.insertBefore(n,r.firstChild)}if(ss(e)&&(t=!0),Kn(e)||this.cloneChildNodes(e,r,t),s){let t=i.getComputedStyle(e,":after"),n=this.pseudoContents.resolvePseudoContent(e,r,t,1);n&&r.appendChild(n)}return this.counters.pop(o),(n&&(this.options.copyStyles||Hn(e))&&!Jn(e)||t)&&Kl(n,r),(0!==e.scrollTop||0!==e.scrollLeft)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(es(e)||ts(e))&&(es(r)||ts(r))&&(r.value=e.value),r}return e.cloneNode(!1)}static destroy(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)}},md=class{static normalizeElement(e,t){let i={};if(!Vn(e)&&!Hn(e))return i;t.animationDuration.some(e=>e>0)&&(i.animationDuration=e.style.animationDuration,e.style.animationDuration="0s"),null!==t.transform&&(i.transform=e.style.transform,e.style.transform="translate(0, 0)");let r=!1;return null!==t.rotate&&(i.rotate=e.style.rotate,e.style.rotate="0deg",r=!0),null!==t.translate&&(i.translate=e.style.translate,e.style.translate="0px",r=!0),null!==t.scale&&(i.scale=e.style.scale,e.style.scale="1",r=!0),r&&void 0===i.transform&&(i.transform=e.style.transform,e.style.transform="translate(0, 0)"),i}static restoreElement(e,t){!Vn(e)&&!Hn(e)||(void 0!==t.animationDuration&&(e.style.animationDuration=t.animationDuration),void 0!==t.transform&&(e.style.transform=t.transform),void 0!==t.rotate&&(e.style.rotate=t.rotate),void 0!==t.translate&&(e.style.translate=t.translate),void 0!==t.scale&&(e.style.scale=t.scale))}},bd=class{context;styles;textNodes=[];elements=[];bounds;legendBounds;createsStackingContext=!1;createsRealStackingContext=!1;isListOwner=!1;debugRender=!1;originalStyles;originalElement;constructor(e,t,i={}){if(this.context=e,jl(t,3),this.styles=new zl(e,e.config.window.getComputedStyle(t,null)),!1!==i.normalizeDom&&(Vn(t)||Hn(t))&&(this.originalStyles=md.normalizeElement(t,this.styles),this.originalElement=t),this.bounds=St(this.context,t),"FIELDSET"===t.tagName){let e=t.querySelector(":scope > legend");if(e){let t=St(this.context,e);this.legendBounds=t;let i=t.top+t.height/2-this.styles.borderTopWidth/2;this.bounds=new Ct(this.bounds.left,i,this.bounds.width,this.bounds.height-(i-this.bounds.top))}}jl(t,4)&&(this.debugRender=!0)}restore(){this.originalStyles&&this.originalElement&&(md.restoreElement(this.originalElement,this.originalStyles),this.originalStyles=void 0,this.originalElement=void 0)}restoreTree(){this.restore();for(let e of this.elements)e.restoreTree()}},xd=e=>{if(e.createRange){let t=e.createRange();if(t.getBoundingClientRect){let i=e.createElement("boundtest");i.style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i);let r=t.getBoundingClientRect(),n=Math.round(r.height);if(e.body.removeChild(i),123===n)return!0}}return!1},yd=()=>typeof(new Image).crossOrigin<"u",vd=e=>{let t=new Image,i=e.createElement("canvas"),r=i.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),i.toDataURL()}catch{return!1}return!0},wd=(e,t,i,r,n)=>{let s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",i.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(n),o},kd=e=>new Promise((t,i)=>{let r=new Image;r.onload=()=>t(r),r.onerror=i,r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent((new XMLSerializer).serializeToString(e))}`}),Cd={get SUPPORT_RANGE_BOUNDS(){let e=xd(document);return Object.defineProperty(Cd,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){let e=vd(document);return Object.defineProperty(Cd,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){let e=yd();return Object.defineProperty(Cd,"SUPPORT_CORS_IMAGES",{value:e}),e}},Sd=class{text;bounds;constructor(e,t){this.text=e,this.bounds=t}},Ed=(e,t,i,r)=>{let n=Pd(t,i),s=[],o=0;return n.forEach(t=>{if(i.textDecorationLine.length||t.trim().length>0)if(Cd.SUPPORT_RANGE_BOUNDS){let i=Ad(r,o,t.length).getClientRects();if(i.length>1){let i=Rd(t),n=0;i.forEach(t=>{s.push(new Sd(t,Ct.fromDOMRectList(e,Ad(r,n+o,t.length).getClientRects()))),n+=t.length})}else s.push(new Sd(t,Ct.fromDOMRectList(e,i)))}else{let i=r.splitText(t.length);s.push(new Sd(t,Md(e,r))),r=i}else Cd.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length}),s},Md=(e,t)=>{let i=t.ownerDocument;if(i){let r=i.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));let n=t.parentNode;if(n){n.replaceChild(r,t);let i=St(e,r);return r.firstChild&&n.replaceChild(r.firstChild,r),i}}return Ct.EMPTY},Ad=(e,t,i)=>{let r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");let n=r.createRange();return n.setStart(e,t),n.setEnd(e,t+i),n},Td=new Map,Ld=e=>{let t=Td.get(e);return t||(t=new Intl.Segmenter(void 0,{granularity:e}),Td.set(e,t)),t},Rd=e=>Array.from(Ld("grapheme").segment(e),e=>e.segment),Bd=e=>Array.from(Ld("word").segment(e),e=>e.segment),Pd=(e,t)=>$a(t.writingMode)||0!==t.letterSpacing?Rd(e):Bd(e),Id=class{text;textBounds;constructor(e,t,i){this.text=Nd(t.data,i.textTransform),this.text.length!==t.data.length&&(t.data=this.text),this.textBounds=Ed(e,this.text,i,t)}},Nd=(e,t)=>{switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Dd,Od);case 2:return e.toUpperCase();default:return e}},Dd=/(^|\s|:|-|\(|\))([a-z])/g,Od=(e,t,i)=>e.length>0?t+i.toUpperCase():e,$d=class extends bd{src;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i),this.src=t.currentSrc||t.src,this.intrinsicWidth=t.naturalWidth,this.intrinsicHeight=t.naturalHeight,this.context.cache.addImage(this.src)}},Fd=class extends bd{canvas;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i),this.canvas=t,this.intrinsicWidth=t.width,this.intrinsicHeight=t.height}},zd=["position","inset","top","right","bottom","left","inset-inline","inset-inline-start","inset-inline-end","inset-block","inset-block-start","inset-block-end","margin","margin-top","margin-right","margin-bottom","margin-left","margin-inline","margin-inline-start","margin-inline-end","margin-block","margin-block-start","margin-block-end"],_d=(e,t)=>{let i=t.getAttribute("style");zd.forEach(e=>t.style.removeProperty(e));let r=e.serializeToString(t);return null===i?t.removeAttribute("style"):t.setAttribute("style",i),r},Wd=class extends bd{svg;intrinsicWidth;intrinsicHeight;constructor(e,t,i={}){super(e,t,i);let r=new XMLSerializer,n=St(e,t);t.setAttribute("width",`${n.width}px`),t.setAttribute("height",`${n.height}px`),this.svg=`data:image/svg+xml,${encodeURIComponent(_d(r,t))}`,this.intrinsicWidth=t.width.baseVal.value,this.intrinsicHeight=t.height.baseVal.value,this.context.cache.addImage(this.svg)}},Hd=class extends bd{value;constructor(e,t,i={}){super(e,t,i),this.value=t.value}},Vd=class extends bd{start;reversed;constructor(e,t,i={}){super(e,t,i),this.start=t.start,this.reversed="boolean"==typeof t.reversed&&!0===t.reversed}},jd=[{type:15,flags:0,unit:"px",number:3}],Ud=[{type:16,flags:0,number:50}],qd=e=>e.width>e.height?new Ct(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new Ct(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e,Gd=e=>{let t="password"===e.type?new Array(e.value.length+1).join("\u2022"):e.value;return 0===t.length?e.placeholder||"":t},Yd=e=>0===e.value.length&&!!e.placeholder,Kd=class extends bd{type;checked;value;isPlaceholder;constructor(e,t,i={}){switch(super(e,t,i),this.type=t.type.toLowerCase(),this.checked=t.checked,this.value=Gd(t),this.isPlaceholder=Yd(t),("checkbox"===this.type||"radio"===this.type)&&(this.styles.backgroundColor=3739148031,this.styles.borderTopColor=this.styles.borderRightColor=this.styles.borderBottomColor=this.styles.borderLeftColor=2779096575,this.styles.borderTopWidth=this.styles.borderRightWidth=this.styles.borderBottomWidth=this.styles.borderLeftWidth=1,this.styles.borderTopStyle=this.styles.borderRightStyle=this.styles.borderBottomStyle=this.styles.borderLeftStyle=1,this.styles.backgroundClip=[0],this.styles.backgroundOrigin=[0],this.bounds=qd(this.bounds)),this.type){case"checkbox":this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=jd;break;case"radio":this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Ud}}},Xd=class extends bd{value;constructor(e,t,i={}){super(e,t,i);let r=t.options[t.selectedIndex||0];this.value=r&&r.text||""}},Jd=class extends bd{value;constructor(e,t,i={}){super(e,t,i),this.value=t.value}},Qd=class extends bd{src;width;height;tree;backgroundColor;parseTreeFn;constructor(e,t,i,r={}){super(e,t,r),this.src=t.src,this.width=parseInt(t.width,10)||0,this.height=parseInt(t.height,10)||0,this.backgroundColor=this.styles.backgroundColor,this.parseTreeFn=i;try{let i=t.contentWindow,r=i?.document;if(i&&r&&r.documentElement&&this.parseTreeFn){this.tree=this.parseTreeFn(e,r.documentElement);let t=Fn(e,i.getComputedStyle(r.documentElement).backgroundColor),n=r.body?Fn(e,i.getComputedStyle(r.body).backgroundColor):0;this.backgroundColor=Ki(t)?Ki(n)?this.styles.backgroundColor:n:t}}catch(e){let t=e instanceof Error?e:new Error(String(e));this.context.logger.warn(`Unable to render iframe content${this.src?` from ${this.src}`:""}: ${t.message}`),this.context.onError?.(t)}}},Zd=["OL","UL","MENU"],ec=(e,t,i,r,n=1,s={})=>{for(let o,a=t.firstChild;a;a=o)o=a.nextSibling,tc(e,a,i,r,n,s)},tc=(e,t,i,r,n=1,s={})=>{if(Wn(t)&&t.data.length>0){let r=new Id(e,t,i.styles);if(1!==n){let e=i.bounds.left,t=i.bounds.top;r.textBounds=r.textBounds.map(i=>new Sd(i.text,new Ct(e+(i.bounds.left-e)/n,t+(i.bounds.top-t)/n,i.bounds.width/n,i.bounds.height/n)))}i.textNodes.push(r)}else if(_n(t))if(is(t)&&t.assignedNodes)t.assignedNodes().forEach(t=>tc(e,t,i,r,n,s));else{let o=ic(e,t,s),a=o.styles.zoom||1;if(1!==a&&(o.bounds=new Ct(o.bounds.left,o.bounds.top,o.bounds.width/a,o.bounds.height/a)),o.styles.isVisible()){nc(t,o,r)?o.createsRealStackingContext=!0:sc(o.styles)&&(o.createsStackingContext=!0),-1!==Zd.indexOf(t.tagName)&&(o.isListOwner=!0),i.elements.push(o);let a=n*(o.styles.zoom||1);t.shadowRoot?ec(e,t.shadowRoot,o,r,a,s):!es(t)&&!qn(t)&&!ts(t)&&ec(e,t,o,r,a,s)}}},ic=(e,t,i={})=>Xn(t)?new $d(e,t,i):Yn(t)?new Fd(e,t,i):qn(t)?new Wd(e,t,i):rs(t)?new Hd(e,t,i):ns(t)?new Vd(e,t,i):jn(t)?new Kd(e,t,i):ts(t)?new Xd(e,t,i):es(t)?new Jd(e,t,i):Jn(t)?new Qd(e,t,(e,t)=>rc(e,t,i),i):new bd(e,t,i),rc=(e,t,i={})=>{let r=ic(e,t,i);return r.createsRealStackingContext=!0,ec(e,t,r,r,1,i),r},nc=(e,t,i)=>t.styles.isPositionedWithZIndex()||t.styles.opacity<1||!!t.styles.filter||!!t.styles.backdropFilter||t.styles.maskImage.length>0||!!t.styles.webkitBoxReflect||1===t.styles.isolation||t.styles.isTransformed()||Gn(e)&&i.styles.isTransparent(),sc=e=>!(!e.isPositioned()&&!e.isFloating()&&e.mixBlendMode===sl.NORMAL)||ds(e.display,268435456)||ds(e.display,33554432)||ds(e.display,536870912)||ds(e.display,134217728),oc=(e,t)=>e.length===t.length&&e.some((e,i)=>e===t[i]),ac=(e,t,i,r,n)=>e.map((e,s)=>{switch(s){case 0:return e.add(t,i);case 1:return e.add(t+r,i);case 2:return e.add(t+r,i+n);case 3:return e.add(t,i+n)}return e}),lc=class e{type;x;y;constructor(e,t){this.type=0,this.x=e,this.y=t}add(t,i){return new e(this.x+t,this.y+i)}},dc=(e,t,i)=>new lc(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i),cc=class e{type;start;startControl;endControl;end;constructor(e,t,i,r){this.type=1,this.start=e,this.startControl=t,this.endControl=i,this.end=r}subdivide(t,i){let r=dc(this.start,this.startControl,t),n=dc(this.startControl,this.endControl,t),s=dc(this.endControl,this.end,t),o=dc(r,n,t),a=dc(n,s,t),l=dc(o,a,t);return i?new e(this.start,r,o,l):new e(l,a,s,this.end)}add(t,i){return new e(this.start.add(t,i),this.startControl.add(t,i),this.endControl.add(t,i),this.end.add(t,i))}reverse(){return new e(this.end,this.endControl,this.startControl,this.start)}},pc=e=>1===e.type,hc=class{topLeftBorderDoubleOuterBox;topRightBorderDoubleOuterBox;bottomRightBorderDoubleOuterBox;bottomLeftBorderDoubleOuterBox;topLeftBorderDoubleInnerBox;topRightBorderDoubleInnerBox;bottomRightBorderDoubleInnerBox;bottomLeftBorderDoubleInnerBox;topLeftBorderStroke;topRightBorderStroke;bottomRightBorderStroke;bottomLeftBorderStroke;topLeftBorderBox;topRightBorderBox;bottomRightBorderBox;bottomLeftBorderBox;topLeftPaddingBox;topRightPaddingBox;bottomRightPaddingBox;bottomLeftPaddingBox;topLeftContentBox;topRightContentBox;bottomRightContentBox;bottomLeftContentBox;constructor(e){let t=e.styles,i=e.bounds,[r,n]=Wi(t.borderTopLeftRadius,i.width,i.height),[s,o]=Wi(t.borderTopRightRadius,i.width,i.height),[a,l]=Wi(t.borderBottomRightRadius,i.width,i.height),[d,c]=Wi(t.borderBottomLeftRadius,i.width,i.height),p=[];p.push((r+s)/i.width),p.push((d+a)/i.width),p.push((n+c)/i.height),p.push((o+l)/i.height);let h=Math.max(...p);h>1&&(r/=h,n/=h,s/=h,o/=h,a/=h,l/=h,d/=h,c/=h);let u=i.width-s,f=i.height-l,g=i.width-a,m=i.height-c,b=t.borderTopWidth,x=t.borderRightWidth,y=t.borderBottomWidth,v=t.borderLeftWidth,w=Hi(t.paddingTop,e.bounds.width),k=Hi(t.paddingRight,e.bounds.width),C=Hi(t.paddingBottom,e.bounds.width),S=Hi(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||n>0?uc(i.left+v/3,i.top+b/3,r-v/3,n-b/3,0):new lc(i.left+v/3,i.top+b/3),this.topRightBorderDoubleOuterBox=s>0||o>0?uc(i.left+u,i.top+b/3,s-x/3,o-b/3,1):new lc(i.left+i.width-x/3,i.top+b/3),this.bottomRightBorderDoubleOuterBox=a>0||l>0?uc(i.left+g,i.top+f,a-x/3,l-y/3,2):new lc(i.left+i.width-x/3,i.top+i.height-y/3),this.bottomLeftBorderDoubleOuterBox=d>0||c>0?uc(i.left+v/3,i.top+m,d-v/3,c-y/3,3):new lc(i.left+v/3,i.top+i.height-y/3),this.topLeftBorderDoubleInnerBox=r>0||n>0?uc(i.left+2*v/3,i.top+2*b/3,r-2*v/3,n-2*b/3,0):new lc(i.left+2*v/3,i.top+2*b/3),this.topRightBorderDoubleInnerBox=s>0||o>0?uc(i.left+u,i.top+2*b/3,s-2*x/3,o-2*b/3,1):new lc(i.left+i.width-2*x/3,i.top+2*b/3),this.bottomRightBorderDoubleInnerBox=a>0||l>0?uc(i.left+g,i.top+f,a-2*x/3,l-2*y/3,2):new lc(i.left+i.width-2*x/3,i.top+i.height-2*y/3),this.bottomLeftBorderDoubleInnerBox=d>0||c>0?uc(i.left+2*v/3,i.top+m,d-2*v/3,c-2*y/3,3):new lc(i.left+2*v/3,i.top+i.height-2*y/3),this.topLeftBorderStroke=r>0||n>0?uc(i.left+v/2,i.top+b/2,r-v/2,n-b/2,0):new lc(i.left+v/2,i.top+b/2),this.topRightBorderStroke=s>0||o>0?uc(i.left+u,i.top+b/2,s-x/2,o-b/2,1):new lc(i.left+i.width-x/2,i.top+b/2),this.bottomRightBorderStroke=a>0||l>0?uc(i.left+g,i.top+f,a-x/2,l-y/2,2):new lc(i.left+i.width-x/2,i.top+i.height-y/2),this.bottomLeftBorderStroke=d>0||c>0?uc(i.left+v/2,i.top+m,d-v/2,c-y/2,3):new lc(i.left+v/2,i.top+i.height-y/2),this.topLeftBorderBox=r>0||n>0?uc(i.left,i.top,r,n,0):new lc(i.left,i.top),this.topRightBorderBox=s>0||o>0?uc(i.left+u,i.top,s,o,1):new lc(i.left+i.width,i.top),this.bottomRightBorderBox=a>0||l>0?uc(i.left+g,i.top+f,a,l,2):new lc(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=d>0||c>0?uc(i.left,i.top+m,d,c,3):new lc(i.left,i.top+i.height),this.topLeftPaddingBox=r>0||n>0?uc(i.left+v,i.top+b,Math.max(0,r-v),Math.max(0,n-b),0):new lc(i.left+v,i.top+b),this.topRightPaddingBox=s>0||o>0?uc(i.left+Math.min(u,i.width-x),i.top+b,u>i.width+x?0:Math.max(0,s-x),Math.max(0,o-b),1):new lc(i.left+i.width-x,i.top+b),this.bottomRightPaddingBox=a>0||l>0?uc(i.left+Math.min(g,i.width-v),i.top+Math.min(f,i.height-y),Math.max(0,a-x),Math.max(0,l-y),2):new lc(i.left+i.width-x,i.top+i.height-y),this.bottomLeftPaddingBox=d>0||c>0?uc(i.left+v,i.top+Math.min(m,i.height-y),Math.max(0,d-v),Math.max(0,c-y),3):new lc(i.left+v,i.top+i.height-y),this.topLeftContentBox=r>0||n>0?uc(i.left+v+S,i.top+b+w,Math.max(0,r-(v+S)),Math.max(0,n-(b+w)),0):new lc(i.left+v+S,i.top+b+w),this.topRightContentBox=s>0||o>0?uc(i.left+Math.min(u,i.width+v+S),i.top+b+w,u>i.width+v+S?0:s-v+S,o-(b+w),1):new lc(i.left+i.width-(x+k),i.top+b+w),this.bottomRightContentBox=a>0||l>0?uc(i.left+Math.min(g,i.width-(v+S)),i.top+Math.min(f,i.height+b+w),Math.max(0,a-(x+k)),l-(y+C),2):new lc(i.left+i.width-(x+k),i.top+i.height-(y+C)),this.bottomLeftContentBox=d>0||c>0?uc(i.left+v+S,i.top+m,Math.max(0,d-(v+S)),c-(y+C),3):new lc(i.left+v+S,i.top+i.height-(y+C))}},uc=(e,t,i,r,n)=>{let s=(Math.sqrt(2)-1)/3*4,o=i*s,a=r*s,l=e+i,d=t+r;switch(n){case 0:return new cc(new lc(e,d),new lc(e,d-a),new lc(l-o,t),new lc(l,t));case 1:return new cc(new lc(e,t),new lc(e+o,t),new lc(l,d-a),new lc(l,d));case 2:return new cc(new lc(l,t),new lc(l,t+a),new lc(e+o,d),new lc(e,d));default:return new cc(new lc(l,d),new lc(l-o,d),new lc(e,t+a),new lc(e,t))}},fc=e=>[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox],gc=e=>[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox],mc=e=>[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox],bc=class{offsetX;offsetY;matrix;type=0;target=6;constructor(e,t,i){this.offsetX=e,this.offsetY=t,this.matrix=i}},xc=class{path;target;type=1;constructor(e,t){this.path=e,this.target=t}},yc=class{opacity;type=2;target=6;constructor(e){this.opacity=e}},vc=class{applyClip;type=3;target=6;constructor(e){this.applyClip=e}},wc={[sl.NORMAL]:"source-over",[sl.MULTIPLY]:"multiply",[sl.SCREEN]:"screen",[sl.OVERLAY]:"overlay",[sl.DARKEN]:"darken",[sl.LIGHTEN]:"lighten",[sl.COLOR_DODGE]:"color-dodge",[sl.COLOR_BURN]:"color-burn",[sl.HARD_LIGHT]:"hard-light",[sl.SOFT_LIGHT]:"soft-light",[sl.DIFFERENCE]:"difference",[sl.EXCLUSION]:"exclusion",[sl.HUE]:"hue",[sl.SATURATION]:"saturation",[sl.COLOR]:"color",[sl.LUMINOSITY]:"luminosity"},kc=class{mixBlendMode;type=4;target=6;compositeOperation;constructor(e){this.mixBlendMode=e,this.compositeOperation=wc[e]}},Cc=class e{type=5;target=6;safeFilterString;shadow;constructor(t){let i=e.parseDropShadow(t);this.shadow=i.shadow,this.safeFilterString=i.safeFilterString}static parseDropShadow(t){if(!t)return{safeFilterString:""};let i=e.findDropShadows(t);if(0===i.length)return{safeFilterString:t};let r=e.parseDropShadowBody(Mt(i,0).body),n="",s=0;for(let e of i)n+=t.slice(s,e.start),s=e.end;return n+=t.slice(s),{shadow:r,safeFilterString:n.replace(/\s+/g," ").trim()}}static findDropShadows(e){let t,i=[],r=/drop-shadow\(/gi;for(;null!==(t=r.exec(e));){let r=t.index+12-1,n=t.index,s=1,o=r+1;for(;o<e.length&&s>0;){let t=e[o]??"";"("===t?s++:")"===t&&s--,o++}if(0!==s)break;let a=e.slice(r+1,o-1);i.push({body:a,start:n,end:o})}return i}static parseDropShadowBody(t){let i,r=e.tokenizeFilterArgs(t.trim()),n=[];for(let t of r)e.isCSSLength(t)?n.push(parseFloat(t)):t&&(i=t);if(!(n.length<2||n.length>3))return{offsetX:Mt(n,0),offsetY:Mt(n,1),blur:n.length>2?Mt(n,2):0,color:i??"rgba(0,0,0,1)"}}static tokenizeFilterArgs(e){let t=[],i="",r=0;for(let n=0;n<e.length;n++){let s=e[n]??"";"("===s?(r++,i+=s):")"===s?(r--,i+=s):/\s/.test(s)?r>0?i+=s:i&&(t.push(i),i=""):i+=s}return i&&t.push(i),t}static isCSSLength(e){return/^-?[\d.]+(px|em|rem|pt|cm|mm|in|pc|ex|ch|vw|vh|vmin|vmax|%)?$/i.test(e)}},Sc=e=>0===e.type,Ec=e=>1===e.type,Mc=e=>2===e.type,Ac=e=>3===e.type,Tc=e=>4===e.type,Lc=e=>5===e.type,Rc=class{element;negativeZIndex;zeroOrAutoZIndexOrTransformedOrOpacity;positiveZIndex;nonPositionedFloats;nonPositionedInlineLevel;inlineLevel;nonInlineLevel;constructor(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}},Bc=class{container;parent;effects=[];curves;listValue;plainEffectsCache=null;constructor(e,t){if(this.container=e,this.parent=t,this.curves=new hc(this.container),this.container.styles.opacity<1&&this.effects.push(new yc(this.container.styles.opacity)),null!==this.container.styles.translate){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Hi(e[0],this.container.bounds.width),i=this.container.bounds.top+Hi(e[1],this.container.bounds.height),[r,n]=this.container.styles.translate,s=Hi(r,this.container.bounds.width),o=Hi(n,this.container.bounds.height);this.effects.push(new bc(t,i,[1,0,0,1,s,o]))}if(null!==this.container.styles.rotate){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Hi(e[0],this.container.bounds.width),i=this.container.bounds.top+Hi(e[1],this.container.bounds.height),r=this.container.styles.rotate*Math.PI/180,n=Math.cos(r),s=Math.sin(r),o=[n,s,-s,n,0,0];this.effects.push(new bc(t,i,o))}if(null!==this.container.styles.scale){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Hi(e[0],this.container.bounds.width),i=this.container.bounds.top+Hi(e[1],this.container.bounds.height),[r,n]=this.container.styles.scale;this.effects.push(new bc(t,i,[r,0,0,n,0,0]))}if(null!==this.container.styles.transform){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+Hi(e[0],this.container.bounds.width),i=this.container.bounds.top+Hi(e[1],this.container.bounds.height),r=this.container.styles.transform;this.effects.push(new bc(t,i,r))}if(Pc(this.container.styles)){let e=fc(this.curves),t=mc(this.curves);oc(e,t)?this.effects.push(new xc(e,6)):(this.effects.push(new xc(e,2)),this.effects.push(new xc(t,4)))}if(0!==this.container.styles.clipPath.type){let e=Nc(this.container.styles.clipPath,this.container.bounds);e&&this.effects.push(e)}if(this.container.styles.mixBlendMode!==sl.NORMAL&&this.effects.push(new kc(this.container.styles.mixBlendMode)),null!==this.container.styles.filter&&this.effects.push(new Cc(this.container.styles.filter)),1!==this.container.styles.zoom){let e=this.container.bounds.left,t=this.container.bounds.top,i=this.container.styles.zoom,r=[i,0,0,i,0,0];this.effects.push(new bc(e,t,r))}}getEffects(e,t){if(!t){let t=this.plainEffectsCache;t||(t=new Map,this.plainEffectsCache=t);let i=t.get(e);return i||(i=this.computeEffects(e),t.set(e,i)),i}return this.computeEffects(e,t)}computeEffects(e,t){let i=-1===[2,3].indexOf(this.container.styles.position),r=this===t?null:this.parent,n=e=>e.effects.filter(i=>e!==t||!Lc(i)&&!Mc(i)&&!Tc(i)),s=n(this);for(;r;){let e=n(r).filter(e=>!Ec(e));if(i||0!==r.container.styles.position||!r.parent){if(i=-1===[2,3].indexOf(r.container.styles.position),Pc(r.container.styles)){let e=fc(r.curves),t=mc(r.curves);oc(e,t)||s.unshift(new xc(t,6))}s.unshift(...e)}else s.unshift(...e);r=r===t?null:r.parent}return s.filter(t=>ds(t.target,e))}},Pc=e=>0!==e.overflowX||0!==e.overflowY,Ic=(e,t,i,r,n)=>"closest-side"===e?Math.min(t-i,r-t):"farthest-side"===e?Math.max(t-i,r-t):Hi(e,n),Nc=(e,t)=>{let{left:i,top:r,width:n,height:s}=t;switch(e.type){case 1:{let t=Hi(e.left,n),o=Hi(e.top,s),a=i+t,l=r+o,d=Math.max(0,n-t-Hi(e.right,n)),c=Math.max(0,s-o-Hi(e.bottom,s));return new vc(e=>{e.beginPath(),e.rect(a,l,d,c),e.clip()})}case 2:{let t,o=i+Hi(e.cx,n),a=r+Hi(e.cy,s);return t="closest-side"===e.radius?Math.min(o-i,a-r,i+n-o,r+s-a):"farthest-side"===e.radius?Math.max(o-i,a-r,i+n-o,r+s-a):Hi(e.radius,Math.sqrt(n*n+s*s)/Math.SQRT2),new vc(e=>{e.beginPath(),e.arc(o,a,Math.max(0,t),0,2*Math.PI),e.clip()})}case 3:{let t=i+Hi(e.cx,n),o=r+Hi(e.cy,s),a=Ic(e.rx,t,i,i+n,n),l=Ic(e.ry,o,r,r+s,s);return new vc(e=>{e.beginPath(),e.ellipse(t,o,Math.max(0,a),Math.max(0,l),0,0,2*Math.PI),e.clip()})}case 4:{let t=e.points.map(([e,t])=>[i+Hi(e,n),r+Hi(t,s)]);return new vc(e=>{if(e.beginPath(),t.length>0){e.moveTo(Mt(Mt(t,0),0),Mt(Mt(t,0),1));for(let i=1;i<t.length;i++)e.lineTo(Mt(Mt(t,i),0),Mt(Mt(t,i),1));e.closePath()}e.clip()})}case 5:{let{d:t}=e,n=null;return new vc(e=>{try{n||(n=new Path2D(t));let s=e.getTransform();e.translate(i,r),e.clip(n),e.setTransform(s)}catch{}})}case 6:{let t=i+Hi(e.x,n),o=r+Hi(e.y,s),a=Math.max(0,Hi(e.width,n)),l=Math.max(0,Hi(e.height,s));return new vc(e=>{e.beginPath(),e.rect(t,o,a,l),e.clip()})}default:return null}},Dc=(e,t,i,r)=>{e.container.elements.forEach(n=>{let s=n.createsRealStackingContext,o=n.createsStackingContext,a=new Bc(n,e);ds(n.styles.display,2048)&&r.push(a);let l=n.isListOwner?[]:r;if(s||o){let e=s||n.styles.isPositioned()?i:t,r=new Rc(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){let t=n.styles.zIndex.order;if(t<0){let i=0;e.negativeZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(i=r+1,!1):i>0),e.negativeZIndex.splice(i,0,r)}else if(t>0){let i=0;e.positiveZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(i=r+1,!1):i>0),e.positiveZIndex.splice(i,0,r)}else e.zeroOrAutoZIndexOrTransformedOrOpacity.push(r)}else n.styles.isFloating()?e.nonPositionedFloats.push(r):e.nonPositionedInlineLevel.push(r);Dc(a,r,s?r:i,l)}else n.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),Dc(a,t,i,l);n.isListOwner&&Oc(n,l)})},Oc=(e,t)=>{let i=e instanceof Vd?e.start:1,r=e instanceof Vd&&e.reversed;for(let e=0;e<t.length;e++){let n=Mt(t,e);n.container instanceof Hd&&"number"==typeof n.container.value&&0!==n.container.value&&(i=n.container.value),n.listValue=Ss(i,n.container.styles.listStyleType,!0),i+=r?-1:1}},$c=e=>{let t=new Bc(e,null),i=new Rc(t),r=[];return Dc(t,i,i,r),Oc(t.container,r),i},Fc=e=>Math.min(1,Math.max(0,e)),zc=e=>{let t=Mt(e,0),i=Mt(e,e.length-1);if(i.stop-t.stop<1e-6)return null;let r=Math.max(i.stop-t.stop,.01),n=[],s=Math.ceil(1/r);for(let i=0;i<s;i++)for(let s of e){let e=i*r+(s.stop-t.stop);if(e>1)break;n.push({stop:e,color:Xi(s.color)})}let o=n[n.length-1];return(!o||o.stop<1)&&n.push({stop:1,color:Xi(i.color)}),n},_c=e=>e.map(e=>({stop:Fc(e.stop),color:Xi(e.color)})),Wc=(e,t,i,r,n=!1)=>{let s=_s(r,t),o=Mt(s,s.length-1),a=Xi(o.color),l=e.createElement("canvas");l.width=Math.max(1,Math.ceil(2*t)),l.height=Math.max(1,Math.ceil(2*i));let d,c=l.getContext("2d");if(!c)return null;if(n){let e=zc(s);if(!e)return c.fillStyle=a,c.fillRect(0,0,l.width,l.height),{canvas:l,lastColor:a,rx:t,ry:i};d=e}else d=_c(s);let p=c.createRadialGradient(t,t,0,t,t,t);return d.forEach(e=>p.addColorStop(Fc(e.stop),e.color)),c.fillStyle=p,t!==i&&c.scale(1,i/t),c.fillRect(0,0,2*t,2*t),{canvas:l,lastColor:a,rx:t,ry:i}},Hc=e=>{let t=e.bounds,i=e.styles;return t.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},Vc=e=>{let t=e.styles,i=e.bounds,r=Hi(t.paddingLeft,i.width),n=Hi(t.paddingRight,i.width),s=Hi(t.paddingTop,i.width),o=Hi(t.paddingBottom,i.width);return i.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+n),-(t.borderTopWidth+t.borderBottomWidth+s+o))},jc=(e,t)=>0===e?t.bounds:2===e?Vc(t):Hc(t),Uc=(e,t)=>0===e?t.bounds:2===e?Vc(t):Hc(t),qc=(e,t,i)=>{let r=jc(Xc(e.styles.backgroundOrigin,t),e),n=Uc(Xc(e.styles.backgroundClip,t),e),s=Kc(Xc(e.styles.backgroundSize,t),i,r),[o,a]=s,l=Wi(Xc(e.styles.backgroundPosition,t),r.width-o,r.height-a),d=Jc(Xc(e.styles.backgroundRepeat,t),l,s,r,n),c=Math.round(r.left+l[0]),p=Math.round(r.top+l[1]);return o=Math.max(1,o),a=Math.max(1,a),[d,c,p,o,a]},Gc=e=>ui(e)&&"auto"===e.value,Yc=e=>"number"==typeof e,Kc=(e,[t,i,r],n)=>{let[s,o]=e;if(!s)return[0,0];if(Bi(s)&&o&&Bi(o))return[Hi(s,n.width),Hi(o,n.height)];let a=Yc(r);if(ui(s)&&("contain"===s.value||"cover"===s.value))return Yc(r)?n.width/n.height<r!=("cover"===s.value)?[n.width,n.width/r]:[n.height*r,n.height]:[n.width,n.height];let l=Yc(t),d=Yc(i),c=l||d;if(Gc(s)&&(!o||Gc(o)))return l&&d?[t,i]:a||c?c&&a?[l?t:i*r,d?i:t/r]:[l?t:n.width,d?i:n.height]:[n.width,n.height];if(a){let e=0,t=0;return Bi(s)?e=Hi(s,n.width):o&&Bi(o)&&(t=Hi(o,n.height)),Gc(s)?e=t*r:(!o||Gc(o))&&(t=e/r),[e,t]}let p=null,h=null;if(Bi(s)?p=Hi(s,n.width):o&&Bi(o)&&(h=Hi(o,n.height)),null!==p&&(!o||Gc(o))&&(h=l&&d?p/t*i:n.height),null!==h&&Gc(s)&&(p=l&&d?h/i*t:n.width),null!==p&&null!==h)return[p,h];throw new Error("Unable to calculate background-size for element")},Xc=(e,t)=>{let i=e[t];return typeof i>"u"?Mt(e,0):i},Jc=(e,[t,i],[r,n],s,o)=>{switch(e){case 2:return[new lc(Math.round(s.left),Math.round(s.top+i)),new lc(Math.round(s.left+s.width),Math.round(s.top+i)),new lc(Math.round(s.left+s.width),Math.round(n+s.top+i)),new lc(Math.round(s.left),Math.round(n+s.top+i))];case 3:return[new lc(Math.round(s.left+t),Math.round(s.top)),new lc(Math.round(s.left+t+r),Math.round(s.top)),new lc(Math.round(s.left+t+r),Math.round(s.height+s.top)),new lc(Math.round(s.left+t),Math.round(s.height+s.top))];case 1:return[new lc(Math.round(s.left+t),Math.round(s.top+i)),new lc(Math.round(s.left+t+r),Math.round(s.top+i)),new lc(Math.round(s.left+t+r),Math.round(s.top+i+n)),new lc(Math.round(s.left+t),Math.round(s.top+i+n))];default:return[new lc(Math.round(o.left),Math.round(o.top)),new lc(Math.round(o.left+o.width),Math.round(o.top)),new lc(Math.round(o.left+o.width),Math.round(o.height+o.top)),new lc(Math.round(o.left),Math.round(o.height+o.top))]}},Qc=class extends Error{},Zc=e=>{e.width=e.height=0},ep=["brightness","contrast","grayscale","hue-rotate","invert","opacity","saturate","sepia"],tp=256,ip=new Map,rp={functions:[]},np=e=>{let t=[],i=0;for(;i<e.length;){let r=e[i];if(" "===r||"\n"===r||"\t"===r){i++;continue}let n=e.indexOf("(",i);if(-1===n)return null;let s=e.slice(i,n).trim();if(!/^[a-zA-Z-]+$/.test(s))return null;let o=sp(e,n);if(-1===o)return null;let a=ap(s,e.slice(n+1,o).trim());if(!a)return null;t.push(a),i=o+1}return{functions:t}},sp=(e,t)=>{let i=1;for(let r=t+1;r<e.length;r++){let t=e[r];if("("===t)i++;else if(")"===t&&(i--,0===i))return r}return-1},op=/^-?\d+(?:\.\d+)?px$/,ap=(e,t)=>{if("blur"===e){if("0"===t)return{kind:"blur",value:0};if(!op.test(t))return null;let e=Number.parseFloat(t);return e<0?null:{kind:"blur",value:e}}if("drop-shadow"===e)return dp(t);if(-1!==ep.indexOf(e)){let i=e;if("hue-rotate"===i){let e=cp(t);return null===e?null:{kind:"unitless",name:i,value:e}}let r=t.trim(),n=r.endsWith("%"),s=n?r.slice(0,-1):r;return/^-?\d+(?:\.\d+)?$/.test(s)?{kind:"unitless",name:i,value:Number.parseFloat(s)*(n?.01:1)}:null}return null},lp=e=>{let t=[],i=0,r="";for(let n of e)"("===n?i++:")"===n&&i--," "!==n||0!==i?r+=n:(r&&t.push(r),r="");return r&&t.push(r),t},dp=e=>{let t=lp(e),i=t.filter(e=>op.test(e)).map(e=>Number.parseFloat(e));if(i.length<2||i.length>3)return null;let r=t.filter(e=>!op.test(e));return t.length-r.length!==i.length?null:{kind:"drop-shadow",x:i[0],y:i[1],blur:i[2]??0,color:r.join(" ")||"rgba(0, 0, 0, 0)"}},cp=e=>{let t=e.trim();if("0"===t)return 0;let i=Number.parseFloat(t);return Number.isNaN(i)?null:t.endsWith("deg")?i:t.endsWith("grad")?.9*i:t.endsWith("rad")?180*i/Math.PI:t.endsWith("turn")?360*i:null},pp=(e,t)=>e.functions.map(e=>{switch(e.kind){case"blur":return`blur(${e.value*t}px)`;case"drop-shadow":return`drop-shadow(${e.x*t}px ${e.y*t}px ${e.blur*t}px ${e.color})`;case"unitless":return"hue-rotate"===e.name?`hue-rotate(${e.value}deg)`:`${e.name}(${e.value})`}}).join(" "),hp=(e,t)=>new Promise((i,r)=>{let n=e=>{clearTimeout(o),t?.removeEventListener("abort",s),e?r(e):i()},s=()=>n(new DOMException("The operation was aborted.","AbortError")),o=setTimeout(()=>n(new Qc("Filter surface image decode timed out")),1e4);t?.addEventListener("abort",s,{once:!0}),t?.aborted?s():e.decode().then(()=>n(),()=>n(new Qc("Filter surface image decode failed")))}),up=new WeakMap,fp=e=>{let t=0,i=0;for(let r of e.functions)if("blur"===r.kind)t++;else{if("drop-shadow"!==r.kind)return!1;i++}return!(t>1||i>1||t>0&&i>0&&!(e.functions.findIndex(e=>"blur"===e.kind)<e.functions.findIndex(e=>"drop-shadow"===e.kind)))},gp=(e,t)=>e.add(-t,-t,2*t,2*t),mp=(e,t)=>new Ct(Math.min(e.left,t.left),Math.min(e.top,t.top),Math.max(e.left+e.width,t.left+t.width)-Math.min(e.left,t.left),Math.max(e.top+e.height,t.top+t.height)-Math.min(e.top,t.top)),bp=class{ctx;constructor(e){this.ctx=e}render(e,t){this.ctx.fillStyle=Xi(t.textDecorationColor??t.color);let i=1;"number"==typeof t.textDecorationThickness?i=t.textDecorationThickness:"from-font"===t.textDecorationThickness&&(i=Math.max(1,Math.floor(.05*t.fontSize.number)));let r=0;"number"==typeof t.textUnderlineOffset&&(r=t.textUnderlineOffset);let n=t.textDecorationStyle;t.textDecorationLine.forEach(t=>{let s=0;switch(t){case 1:s=e.top+e.height-i+r;break;case 2:s=e.top;break;case 3:s=e.top+(e.height/2-i/2);break;default:return}this.draw(e.left,s,e.width,i,n)})}draw(e,t,i,r,n){switch(n){case 0:default:this.ctx.fillRect(e,t,i,r);break;case 1:{let n=Math.max(1,r);this.ctx.fillRect(e,t,i,r),this.ctx.fillRect(e,t+r+n,i,r);break}case 2:this.drawPattern(e,t,i,r,[r,2*r]);break;case 3:this.drawPattern(e,t,i,r,[3*r,2*r]);break;case 4:this.drawWavy(e,t,i,r)}}drawPattern(e,t,i,r,n){this.ctx.save(),this.ctx.beginPath(),this.ctx.setLineDash(n),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.moveTo(e,t+r/2),this.ctx.lineTo(e+i,t+r/2),this.ctx.stroke(),this.ctx.restore()}drawWavy(e,t,i,r){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle;let n=2*r,s=4*r,o=e;for(this.ctx.moveTo(o,t+r/2);o<e+i;){let a=Math.min(o+s/2,e+i);if(this.ctx.quadraticCurveTo(o+s/4,t+r/2-n,a,t+r/2),o=a,o<e+i){let a=Math.min(o+s/2,e+i);this.ctx.quadraticCurveTo(o+s/4,t+r/2+n,a,t+r/2),o=a}}this.ctx.stroke(),this.ctx.restore()}},xp=e=>void 0!==e&&!Number.isNaN(e),yp=(e,t)=>{let i=e.measureText("Mg"),r=i;return{baseline:xp(r.fontBoundingBoxAscent)?r.fontBoundingBoxAscent:xp(i.actualBoundingBoxAscent)?i.actualBoundingBoxAscent:t,height:xp(r.fontBoundingBoxAscent)&&xp(r.fontBoundingBoxDescent)?r.fontBoundingBoxAscent+r.fontBoundingBoxDescent:xp(i.actualBoundingBoxAscent)&&xp(i.actualBoundingBoxDescent)?i.actualBoundingBoxAscent+i.actualBoundingBoxDescent:t}},vp=(e,t)=>yp(e,t).baseline,wp=/[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/,kp=e=>wp.test(e),Cp=()=>!(typeof navigator>"u"||void 0===navigator.userAgentData&&void 0===(typeof window<"u"?window:void 0)?.chrome),Sp=()=>Cp()?"miter":"round",Ep=class{ctx;options;decorationRenderer;baselineCache=new Map;glyphWidthCache=null;constructor(e){this.ctx=e.ctx,this.options=e.options,this.decorationRenderer=new bp(e.ctx)}cachedMeasureText(e,t){let i=this.glyphWidthCache;i||(i=new Map,this.glyphWidthCache=i);let r=e+t,n=i.get(r);return void 0===n&&(n=this.ctx.measureText(e).width,i.set(r,n)),n}iterateLettersWithLetterSpacing(e,t,i,r,n){if($a(r))return void this.iterateVerticalGlyphs(e,t,i,r,n);let s=Rd(e.text),o=e.bounds.top+i,a=this.ctx.font,l=e.bounds.left;for(let e of s)n(e,l,o),l+=this.cachedMeasureText(e,a)+t}iterateVerticalGlyphs(e,t,i,r,n){let s=Rd(e.text),o=this.ctx.font,a=4===r?-Math.PI/2:Math.PI/2,l=e.bounds.top;for(let d=0;d<s.length;){let c=s[d];if(!(Fa(r)||!kp(c)&&c.trim().length>0)){let r=this.ctx.textBaseline;kp(c)&&(this.ctx.textBaseline="ideographic"),n(c,e.bounds.left,l+i),this.ctx.textBaseline=r,l+=this.cachedMeasureText(c,o)+t,d++;continue}let p=d;for(;d<s.length;){let e=s[d];if(!Fa(r)&&!kp(e)&&0===e.trim().length)break;if(!(Fa(r)||!kp(e)&&e.trim().length>0))break;d++}this.ctx.save(),this.ctx.translate(e.bounds.left+i,l),this.ctx.rotate(a);let h=0;for(let e=p;e<d;e++){let i=s[e];n(i,0,h),h+=this.cachedMeasureText(i,o)+t}this.ctx.restore(),l+=h}}renderTextWithLetterSpacing(e,t,i,r=0){this.renderFillText(e,t,i,r)}canRenderWholeText(e,t){return 0===e&&!$a(t)}renderFillText(e,t,i,r){this.canRenderWholeText(t,r)?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i):this.iterateLettersWithLetterSpacing(e,t,i,r,(e,t,i)=>{this.ctx.fillText(e,t,i)})}renderStrokeText(e,t,i,r){this.canRenderWholeText(t,r)?this.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+i):this.iterateLettersWithLetterSpacing(e,t,i,r,(e,t,i)=>{this.ctx.strokeText(e,t,i)})}renderTextStrokeWithStyle(e,t,i){!t.webkitTextStrokeWidth||!e.text.trim().length||(this.ctx.strokeStyle=Xi(t.webkitTextStrokeColor),this.ctx.lineWidth=t.webkitTextStrokeWidth,this.ctx.lineJoin=Sp(),this.renderStrokeText(e,t.letterSpacing,i,t.writingMode),this.ctx.strokeStyle="",this.ctx.lineWidth=0,this.ctx.lineJoin="miter")}renderTextFillWithShadows(e,t,i){this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,i,t.writingMode);let r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(r=>{this.ctx.shadowColor=Xi(r.color),this.ctx.shadowOffsetX=r.offsetX.number*this.options.scale,this.ctx.shadowOffsetY=r.offsetY.number*this.options.scale,this.ctx.shadowBlur=r.blur.number*this.options.scale,this.renderTextWithLetterSpacing(e,t.letterSpacing,i,t.writingMode)}),this.ctx.shadowColor="",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0)}renderTextBoundWithPaintOrder(e,t,i,r){i.forEach(i=>{switch(i){case 0:this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,r,t.writingMode);break;case 1:this.renderTextStrokeWithStyle(e,t,r)}})}renderTextDecoration(e,t){this.decorationRenderer.render(e,t)}truncateTextWithEllipsis(e,t,i){let r=this.ctx.measureText("\u2026").width,n=Rd(e);if(0===i){let e=e=>this.ctx.measureText(n.slice(0,e).join("")).width+r<=t,i=0,s=n.length;for(;i<s;){let t=i+s+1>>1;e(t)?i=t:s=t-1}return n.slice(0,i).join("")+"\u2026"}{let e=this.ctx.font,s=r,o=[];for(let r of n){let n=this.cachedMeasureText(r,e);if(s+n>t)break;o.push(r),s+=n+i}return o.join("")+"\u2026"}}createFontStyle(e){let t=e.fontVariant.filter(e=>"normal"===e||"small-caps"===e).join(""),i=e.fontFamily.join(", "),r=pi(e.fontSize)?`${e.fontSize.number}${e.fontSize.unit}`:`${e.fontSize.number}px`;return[[e.fontStyle,t,e.fontWeight,r,i].join(" "),i,r]}resolveFillColor(e){return Xi(e.webkitTextFillColor??e.color)}renderLineClampedText(e,t,i,r,n){let s=ca(t.lineHeight,t.fontSize.number),o=[],a=[],l=Mt(e.textBounds,0).bounds.top;e.textBounds.forEach(e=>{Math.abs(e.bounds.top-l)>=.5*s?(a.length>0&&o.push(a),a=[e],l=e.bounds.top):a.push(e)}),a.length>0&&o.push(a);let d=t.webkitLineClamp;if(o.length<=d)return!1;for(let e=0;e<d-1;e++)Mt(o,e).forEach(e=>this.renderTextBoundWithPaintOrder(e,t,i,r));let c=o[d-1];if(c?.length&&n){let e=c.map(e=>e.text).join(""),s=Mt(c,0),o=n.width-(s.bounds.left-n.left),a=new Sd(this.truncateTextWithEllipsis(e,o,t.letterSpacing),s.bounds);for(let e of i)0===e?(this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(a,t.letterSpacing,r,t.writingMode)):1===e&&this.renderTextStrokeWithStyle(a,t,r)}return!0}renderEllipsisText(e,t,i,r,n){let s=ca(t.lineHeight,t.fontSize.number),o=Mt(e.textBounds,0).bounds.top;if(!e.textBounds.every(e=>Math.abs(e.bounds.top-o)<.5*s))return!1;let a=e.textBounds.map(e=>e.text).join("").replace(/\s+/g," ").trim();if(this.ctx.measureText(a).width<=n.width+1)return!1;let l=new Sd(this.truncateTextWithEllipsis(a,n.width,t.letterSpacing),Mt(e.textBounds,0).bounds);for(let e of i)0===e?this.renderTextFillWithShadows(l,t,r):1===e&&this.renderTextStrokeWithStyle(l,t,r);return!0}measureBaselineCached(e,t){let i=this.baselineCache.get(e);return void 0===i&&(i=vp(this.ctx,t),this.baselineCache.size>=64&&this.baselineCache.clear(),this.baselineCache.set(e,i)),i}async renderTextNode(e,t,i){this.glyphWidthCache=null;let[r]=this.createFontStyle(t);this.ctx.font=r??"",this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic";let n=t.paintOrder,s=this.measureBaselineCached(r??"",t.fontSize.number);t.webkitLineClamp>0&&34&t.display&&1===t.overflowY&&e.textBounds.length>0&&this.renderLineClampedText(e,t,n,s,i)||1===t.textOverflow&&i&&1===t.overflowX&&e.textBounds.length>0&&this.renderEllipsisText(e,t,n,s,i)||(e.textBounds.forEach(e=>{n.forEach(i=>{0===i?(this.renderTextFillWithShadows(e,t,s),t.textDecorationLine.length&&this.renderTextDecoration(e.bounds,t)):1===i&&this.renderTextStrokeWithStyle(e,t,s)})}),t.textEmphasisStyle&&this.renderTextEmphasis(e,t,s))}renderTextEmphasis(e,t,i){if($a(t.writingMode))return;let r=t.textEmphasisStyle;if(!r)return;let n=t.fontSize.number,s=.5*n,o=Xi(t.textEmphasisColor??t.color),a=t.textEmphasisPosition,l=(e,t)=>{if("string"==typeof r){let i=this.ctx.font;return this.ctx.font=i.replace(/^\S+/,`${s}px`),this.ctx.textAlign="center",this.ctx.fillText(r,e,t+s/3),this.ctx.font=i,void(this.ctx.textAlign="left")}let{fill:i,shape:n}=r,o=s*("dot"===n?.3:"sesame"===n?.26:.34);this.ctx.beginPath(),"sesame"===n?this.ctx.ellipse(e,t,1.3*o,.8*o,Math.PI/4,0,2*Math.PI):"triangle"===n?(this.ctx.moveTo(e,t-o),this.ctx.lineTo(e+1.1*o,t+.8*o),this.ctx.lineTo(e-1.1*o,t+.8*o),this.ctx.closePath()):this.ctx.arc(e,t,o,0,2*Math.PI),i?"double-circle"===n?(this.ctx.lineWidth=.7*o,this.ctx.stroke(),this.ctx.beginPath(),this.ctx.arc(e,t,.4*o,0,2*Math.PI),this.ctx.lineWidth=.35*o,this.ctx.stroke()):this.ctx.fill():(this.ctx.lineWidth=Math.max(1,.35*o),this.ctx.stroke(),"double-circle"===n&&(this.ctx.beginPath(),this.ctx.arc(e,t,.5*o,0,2*Math.PI),this.ctx.stroke()))},d=this.ctx.font;for(let r of e.textBounds){let e=r.bounds.top+i,c=a.over?e-n-.4*s:e+.9*s,p=r.bounds.left;for(let e of Rd(r.text)){let i=this.cachedMeasureText(e,d);this.ctx.save();try{this.ctx.fillStyle=o,this.ctx.strokeStyle=o,this.ctx.lineWidth=1,l(p+i/2+t.letterSpacing/2,c)}finally{this.ctx.restore()}p+=i+t.letterSpacing}}}},Mp=(e,t)=>{t.forEach((t,i)=>{let r=pc(t)?t.start:t;0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y),pc(t)&&e.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},Ap=(e,t)=>{e.beginPath(),Mp(e,t),e.closePath()},Tp=class{maxSize;_map;constructor(e){this.maxSize=e,this._map=new Map}get(e){if(!this._map.has(e))return;let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t}set(e,t){if(this._map.has(e))this._map.delete(e);else if(this._map.size>=this.maxSize){let e=this._map.keys().next().value;void 0!==e&&this._map.delete(e)}this._map.set(e,t)}get size(){return this._map.size}clear(){this._map.clear()}},Lp=class{ctx;context;canvas;patternCache=new Tp(50);constructor(e){this.ctx=e.ctx,this.context=e.context,this.canvas=e.canvas}async renderBackgroundImage(e){let t=e.styles.backgroundImage.length-1,i=e.styles.backgroundBlendMode,r=0;for(let n of e.styles.backgroundImage.slice(0).reverse()){if(r>0){let e=i[r]??i[0]??"normal";"normal"!==e&&(this.ctx.save(),this.ctx.globalCompositeOperation=e)}0===n.type?await this.renderBackgroundURLImage(e,n,t):po(n)?this.renderLinearGradient(e,n,t):uo(n)?this.renderRepeatingLinearGradient(e,n,t):ho(n)?this.renderRadialGradient(e,n,t):fo(n)?this.renderRepeatingRadialGradient(e,n,t):go(n)?this.renderConicGradient(e,n,t):mo(n)&&this.renderRepeatingConicGradient(e,n,t),r>0&&"normal"!==(i[r]??i[0]??"normal")&&this.ctx.restore(),t--,r++}}async renderBackgroundURLImage(e,t,i){let r,n=t.url;try{r=await this.context.cache.match(n)}catch{this.context.logger.error(`Error loading background-image ${n}`)}if(r){let t=isNaN(r.width)||0===r.width?1:r.width,s=isNaN(r.height)||0===r.height?1:r.height,[o,a,l,d,c]=qc(e,i,[t,s,t/s]),p=Xc(e.styles.backgroundRepeat,i),h=1===p?"no-repeat":2===p?"repeat-x":3===p?"repeat-y":"repeat",u=`${n}|${Math.round(d)}x${Math.round(c)}|${e.styles.imageRendering}|${h}`,f=this.patternCache.get(u);if(!f){let t=this.resizeImage(r,d,c,e.styles.imageRendering);f=this.ctx.createPattern(t,h),this.patternCache.set(u,f)}this.renderRepeat(o,f,a,l)}}renderRepeatingLinearGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),[l,d,c,p,h]=Hs(t.angle,o,a),u=n+d,f=n+c,g=s+p,m=s+h,b=_s(t.stops,l||1),x=zc(b),y=this.ctx.createLinearGradient(u,g,f,m);if(x)x.forEach(e=>y.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color));else{let e=Xi(Mt(b,b.length-1).color);y.addColorStop(0,e),y.addColorStop(1,e)}this.path(r),this.ctx.fillStyle=y,this.ctx.fill()}renderLinearGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),[l,d,c,p,h]=Hs(t.angle,o,a),u=`lg|${t.angle}|${Math.round(o)}x${Math.round(a)}|${JSON.stringify(t.stops)}`,f=this.patternCache.get(u);if(!f){let e=(this.canvas.ownerDocument??document).createElement("canvas");e.width=o,e.height=a;let i=e.getContext("2d");if(!i)return;let r=i.createLinearGradient(d,p,c,h);_s(t.stops,l||1).forEach(e=>r.addColorStop(e.stop,Xi(e.color))),i.fillStyle=r,i.fillRect(0,0,o,a),o>0&&a>0&&(f=this.ctx.createPattern(e,"repeat"),this.patternCache.set(u,f))}f&&this.renderRepeat(r,f,n,s)}renderRadialGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),l=0===t.position.length?[zi]:t.position,d=Hi(Mt(l,0),o),c=Hi(Mt(l,l.length-1),a),[p,h]=Us(t,d,c,o,a);if((0===p||0===h)&&(p=Math.max(p,.01),h=Math.max(h,.01)),p>0&&h>0){let e=`rg|${Math.round(d)}x${Math.round(c)}|${Math.round(p)}x${Math.round(h)}|${JSON.stringify(t.stops)}`,i=_s(t.stops,p),o=Xi(Mt(i,i.length-1).color),a=this.patternCache.get(e);if(!a){let i=this.canvas.ownerDocument??document,r=Wc(i,p,h,t.stops,!1);if(!r)return;a=this.ctx.createPattern(r.canvas,"no-repeat"),this.patternCache.set(e,a)}this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=o,this.ctx.fill(),this.ctx.translate(n+d-p,s+c-h),this.ctx.fillStyle=a,this.ctx.fillRect(0,0,2*p,2*h),this.ctx.restore()}}renderRepeatingRadialGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),l=0===t.position.length?[zi]:t.position,d=Hi(Mt(l,0),o),c=Hi(Mt(l,l.length-1),a),[p,h]=Us(t,d,c,o,a);if((0===p||0===h)&&(p=Math.max(p,.01),h=Math.max(h,.01)),!(p>0&&h>0))return;let u=`rrg|${Math.round(d)}x${Math.round(c)}|${Math.round(p)}x${Math.round(h)}|${JSON.stringify(t.stops)}`,f=this.patternCache.get(u);if(!f){let e=this.canvas.ownerDocument??document,i=Wc(e,p,h,t.stops,!0);if(!i)return;f=this.ctx.createPattern(i.canvas,"no-repeat"),this.patternCache.set(u,f)}f&&(this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.translate(n+d-p,s+c-h),this.ctx.fillStyle=f,this.ctx.fillRect(0,0,2*p,2*h),this.ctx.restore())}renderConicGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),l=0===t.position.length?[zi]:t.position,d=n+Hi(Mt(l,0),o),c=s+Hi(Mt(l,l.length-1),a),p=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);_s(t.stops,1).forEach(e=>{p.addColorStop(Math.min(1,Math.max(0,e.stop)),Xi(e.color))}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=p,this.ctx.fill(),this.ctx.restore()}renderRepeatingConicGradient(e,t,i){let[r,n,s,o,a]=qc(e,i,[null,null,null]),l=0===t.position.length?[zi]:t.position,d=n+Hi(Mt(l,0),o),c=s+Hi(Mt(l,l.length-1),a),p=_s(t.stops,1),h=Mt(p,0),u=Mt(p,p.length-1),f=Math.max(u.stop-h.stop,.01);if(u.stop-h.stop<1e-6){let e=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);return e.addColorStop(0,Xi(u.color)),e.addColorStop(1,Xi(u.color)),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=e,this.ctx.fill(),void this.ctx.restore()}let g=[],m=Math.ceil(1/f);for(let e=0;e<m;e++)for(let t of p){let i=e*f+(t.stop-h.stop);if(i>1)break;g.push({stop:i,color:Xi(t.color)})}let b=Mt(g,g.length-1);b&&b.stop<1&&g.push({stop:1,color:b.color});let x=this.ctx.createConicGradient(t.angle-Math.PI/2,d,c);g.forEach(e=>{x.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=x,this.ctx.fill(),this.ctx.restore()}renderRepeat(e,t,i,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(i,r),this.ctx.fill(),this.ctx.translate(-i,-r)}resizeImage(e,t,i,r){let n=(this.canvas.ownerDocument??document).createElement("canvas");n.width=Math.max(1,t),n.height=Math.max(1,i);let s=n.getContext("2d");return s?(2===r||1===r?(this.context.logger.debug("Disabling image smoothing for background image due to CSS image-rendering"),s.imageSmoothingEnabled=!1):3===r?(this.context.logger.debug("Enabling image smoothing for background image due to CSS image-rendering: smooth"),s.imageSmoothingEnabled=!0):s.imageSmoothingEnabled=this.ctx.imageSmoothingEnabled,this.ctx.imageSmoothingQuality&&(s.imageSmoothingQuality=this.ctx.imageSmoothingQuality),s.drawImage(e,0,0,e.width,e.height,0,0,t,i),n):e}path(e){Ap(this.ctx,e)}},Rp=(e,t)=>{switch(t){case 0:return Dp(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Dp(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Dp(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return Dp(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Bp=(e,t)=>{switch(t){case 0:return Dp(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Dp(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Dp(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return Dp(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Pp=(e,t)=>{switch(t){case 0:return Dp(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Dp(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Dp(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return Dp(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Ip=(e,t)=>{switch(t){case 0:return Np(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Np(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Np(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Np(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Np=(e,t)=>{let i=[];return pc(e)?i.push(e.subdivide(.5,!1)):i.push(e),pc(t)?i.push(t.subdivide(.5,!0)):i.push(t),i},Dp=(e,t,i,r)=>{let n=[];return pc(e)?n.push(e.subdivide(.5,!1)):n.push(e),pc(i)?n.push(i.subdivide(.5,!0)):n.push(i),pc(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),pc(t)?n.push(t.subdivide(.5,!1).reverse()):n.push(t),n},Op=class{ctx;pathCallbacks;constructor(e,t){this.ctx=e.ctx,this.pathCallbacks=t}async renderSolidBorder(e,t,i){this.pathCallbacks.path(Rp(i,t)),this.ctx.fillStyle=Xi(e),this.ctx.fill()}async renderDoubleBorder(e,t,i,r){if(t<3)return void await this.renderSolidBorder(e,i,r);let n=Bp(r,i);this.pathCallbacks.path(n),this.ctx.fillStyle=Xi(e),this.ctx.fill();let s=Pp(r,i);this.pathCallbacks.path(s),this.ctx.fill()}async renderDashedDottedBorder(e,t,i,r,n){this.ctx.save();let s,o,a,l,d,c=Ip(r,i),p=Rp(r,i);2===n&&(this.pathCallbacks.path(p),this.ctx.clip()),pc(Mt(p,0))?(s=Mt(p,0).start.x,o=Mt(p,0).start.y):(s=Mt(p,0).x,o=Mt(p,0).y),pc(Mt(p,1))?(a=Mt(p,1).end.x,l=Mt(p,1).end.y):(a=Mt(p,1).x,l=Mt(p,1).y),d=0===i||2===i?Math.abs(s-a):Math.abs(o-l),this.ctx.beginPath(),3===n?this.pathCallbacks.formatPath(c):this.pathCallbacks.formatPath(p.slice(0,2));let h=t<3?3*t:2*t,u=t<3?2*t:t;3===n&&(h=t,u=t);let f=!0;if(d<=2*h)f=!1;else if(d<=2*h+u){let e=d/(2*h+u);h*=e,u*=e}else{let e=Math.floor((d+u)/(h+u)),t=(d-e*h)/(e-1),i=(d-(e+1)*h)/e;u=i<=0||Math.abs(u-t)<Math.abs(u-i)?t:i}if(f&&(3===n?this.ctx.setLineDash([0,h+u]):this.ctx.setLineDash([h,u])),3===n?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=Xi(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===n){if(pc(Mt(p,0))){let e=Mt(p,3),t=Mt(p,0);this.ctx.beginPath(),this.pathCallbacks.formatPath([new lc(e.end.x,e.end.y),new lc(t.start.x,t.start.y)]),this.ctx.stroke()}if(pc(Mt(p,1))){let e=Mt(p,1),t=Mt(p,2);this.ctx.beginPath(),this.pathCallbacks.formatPath([new lc(e.end.x,e.end.y),new lc(t.start.x,t.start.y)]),this.ctx.stroke()}}this.ctx.restore()}},$p=(e,t,i)=>{let r=e?[e.top,e.right,e.bottom,e.left]:null;return[0,1,2,3].map(e=>{let n=r?r[e]:null,s=t[e]??0;return n&&"auto"!==n.kind?"number"===n.kind?s*(n.value??1):"length"===n.kind?n.value??0:(n.value??0)/100*(0===e||2===e?i.height:i.width):s})},Fp=(e,t)=>{let i=e?[e.top,e.right,e.bottom,e.left]:null,r=e=>{let r=i?i[e]:null;return r?"number"===r.kind?(t[e]??0)*(r.value??0):r.value??0:0};return{top:r(0),right:r(1),bottom:r(2),left:r(3)}},zp=class{ctx;constructor(e){this.ctx=e}renderBorderImage(e,t,i,r,n,s,o,a,l={top:0,right:0,bottom:0,left:0}){e=e.add(-l.left,-l.top,l.left+l.right,l.top+l.bottom);let d=t.naturalWidth||t.width,c=t.naturalHeight||t.height;if(d<=0||c<=0)return;let p=Math.min("percent"===i.unit?i.top/100*c:Math.min(i.top,c),c),h=Math.min("percent"===i.unit?i.right/100*d:Math.min(i.right,d),d),u=Math.min("percent"===i.unit?i.bottom/100*c:Math.min(i.bottom,c),c),f=Math.min("percent"===i.unit?i.left/100*d:Math.min(i.left,d),d),{left:g,top:m,width:b,height:x}=e;if(b<=0||x<=0)return;let y=Math.min(n,x),v=Math.min(s,b),w=Math.min(o,x-y),k=Math.min(a,b-v);this.drawRegion(t,0,0,f,p,g,m,k,y),this.drawRegion(t,d-h,0,h,p,g+b-v,m,v,y),this.drawRegion(t,d-h,c-u,h,u,g+b-v,m+x-w,v,w),this.drawRegion(t,0,c-u,f,u,g,m+x-w,k,w);let C=[{sx:f,sy:0,sw:d-f-h,sh:p,dx:g+k,dy:m,dw:b-k-v,dh:y,repeat:r.horizontal,horizontal:!0},{sx:d-h,sy:p,sw:h,sh:c-p-u,dx:g+b-v,dy:m+y,dw:v,dh:x-y-w,repeat:r.vertical,horizontal:!1},{sx:f,sy:c-u,sw:d-f-h,sh:u,dx:g+k,dy:m+x-w,dw:b-k-v,dh:w,repeat:r.horizontal,horizontal:!0},{sx:0,sy:p,sw:f,sh:c-p-u,dx:g,dy:m+y,dw:k,dh:x-y-w,repeat:r.vertical,horizontal:!1}];for(let e of C)e.sw<=0||e.sh<=0||e.dw<=0||e.dh<=0||(0===e.repeat?this.ctx.drawImage(t,e.sx,e.sy,e.sw,e.sh,e.dx,e.dy,e.dw,e.dh):(1===e.repeat||2===e.repeat)&&this.drawRepeatedEdge(t,e,e.horizontal,2===e.repeat));i.fill&&this.drawCenterRegion(t,{sx:f,sy:p,sw:d-f-h,sh:c-p-u},{dx:g+k,dy:m+y,dw:b-k-v,dh:x-y-w},r)}drawRegion(e,t,i,r,n,s,o,a,l){r>0&&n>0&&a>0&&l>0&&this.ctx.drawImage(e,t,i,r,n,s,o,a,l)}drawRepeatedEdge(e,t,i,r){let n,s,o=i?t.sw:t.sh,a=i?t.dw:t.dh;if(!(o<=0||a<=0)){r?(s=Math.max(1,Math.round(a/o)),n=a/s):(n=o,s=Math.ceil(a/n)),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.dx,t.dy,t.dw,t.dh),this.ctx.clip();for(let r=0;r<s;r++){let s=r*n;i?this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx+s,t.dy,n,t.dh):this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx,t.dy+s,t.dw,n)}this.ctx.restore()}}drawCenterRegion(e,t,i,r){if(t.sw<=0||t.sh<=0||i.dw<=0||i.dh<=0)return;let n=(e,t,i)=>{if(0===e)return{size:i,count:1};if(2===e){let e=Math.max(1,Math.round(i/t));return{size:i/e,count:e}}return{size:t,count:Math.max(1,Math.ceil(i/t))}},s=n(r.horizontal,t.sw,i.dw),o=n(r.vertical,t.sh,i.dh);this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(i.dx,i.dy,i.dw,i.dh),this.ctx.clip();for(let r=0;r<o.count;r++)for(let n=0;n<s.count;n++)this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,i.dx+n*s.size,i.dy+r*o.size,s.size,o.size);this.ctx.restore()}},_p=/blur\((\d+(?:\.\d+)?)px\)/gi,Wp=(e,t)=>1===t?e:e.replace(_p,(e,i)=>`blur(${parseFloat(i)*t}px)`),Hp=class{ctx;pathCallback;scale;activeEffects=[];didSave=!1;saveAtDepth=-1;constructor(e,t){this.ctx=e.ctx,this.pathCallback=t,this.scale=e.scale??1}applyEffects(e){for(;this.activeEffects.length;)this.popEffect();this.didSave=!1,this.saveAtDepth=-1;let t=e=>Sc(e)||Ec(e)||Ac(e),i=e.reduceRight((e,i,r)=>-1!==e?e:t(i)?r:-1,-1);for(let r=0;r<e.length;r++){let n=Mt(e,r);t(n)&&(this.didSave||(this.ctx.save(),this.didSave=!0),r===i&&(this.saveAtDepth=this.activeEffects.length)),this.applyEffect(n)}}applyEffect(e){Sc(e)?(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)):Ec(e)?(this.pathCallback.path(e.path),this.ctx.clip()):Ac(e)?e.applyClip(this.ctx):Mc(e)?this.ctx.globalAlpha*=e.opacity:Tc(e)?this.ctx.globalCompositeOperation=e.compositeOperation:Lc(e)&&(this.ctx.filter=Wp(e.safeFilterString,this.scale)||"none",e.shadow&&(this.ctx.shadowOffsetX=e.shadow.offsetX*this.scale,this.ctx.shadowOffsetY=e.shadow.offsetY*this.scale,this.ctx.shadowBlur=e.shadow.blur*this.scale,this.ctx.shadowColor=e.shadow.color)),this.activeEffects.push(e)}popEffect(){0!==this.activeEffects.length&&(this.didSave&&this.activeEffects.length-1===this.saveAtDepth&&(this.ctx.restore(),this.didSave=!1,this.saveAtDepth=-1),this.activeEffects.pop(),!this.didSave&&0===this.activeEffects.length&&(this.ctx.globalAlpha=1,this.ctx.globalCompositeOperation="source-over",this.ctx.filter="none",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0,this.ctx.shadowColor="rgba(0, 0, 0, 0)"))}getActiveEffectCount(){return this.activeEffects.length}hasActiveEffects(){return this.activeEffects.length>0}},Vp=(e,t)=>0===e.length?void 0:e[t%e.length]??e[0],jp=(e,t,i,r)=>{let n=e?e[0]:void 0,s=e&&e.length>1?Mt(e,1):void 0,o=(e,t,i)=>void 0===e||ui(e)?null:Bi(e)?Hi(e,t):i,a=void 0!==(l=n)&&ui(l)?l.value:null;var l;if("contain"===a||"cover"===a){let e="contain"===a?Math.min(t.width/i,t.height/r):Math.max(t.width/i,t.height/r);return{width:i*e,height:r*e}}let d=o(n,t.width,i),c=o(s,t.height,r);return null===d&&null===c?(d=i,c=r):null===d?d=i/r*c:null===c&&(c=r/i*d),{width:d,height:c}},Up=(e,t,i,r,n)=>{let s=t.naturalWidth||t.width||n.width,o=t.naturalHeight||t.height||n.height,{width:a,height:l}=jp(Vp(i.maskSize,r),n,s,o),d=Vp(i.maskPosition,r)??[],c=n.left+Hi(Mt(d,0),n.width-a),p=n.top+Hi(Mt(d,d.length-1),n.height-l),h=Vp(i.maskRepeat,r)??0,u=0===h||2===h,f=0===h||3===h,g=u?Math.ceil((c-n.left)/a):0,m=f?Math.ceil((p-n.top)/l):0,b=u?Math.ceil((n.left+n.width-c)/a):0,x=f?Math.ceil((n.top+n.height-p)/l):0;for(let i=-m;i<=x;i++)for(let r=-g;r<=b;r++)e.drawImage(t,c+r*a,p+i*l,a,l)},qp=(e,t,i)=>{let{width:r,height:n}=i,s=0===t.position.length?[zi]:t.position,o=Hi(Mt(s,0),r),a=Hi(Mt(s,s.length-1),n),[l,d]=Us(t,o,a,r,n);l=Math.max(l,.01),d=Math.max(d,.01);let c=e.canvas.ownerDocument??document,p=Wc(c,l,d,t.stops,fo(t));p&&(e.fillStyle=p.lastColor,e.fillRect(i.left,i.top,i.width,i.height),e.drawImage(p.canvas,i.left+o-l,i.top+a-d,2*l,2*d))},Gp=(e,t,i)=>{let{width:r,height:n}=i;if(r<=0||n<=0)return;if(ho(t)||fo(t))return void qp(e,t,i);let s=null;if(1===t.type||3===t.type){let o=t,[a,l,d,c,p]=Hs(o.angle||0,r,n),h=_s(o.stops,a||1);if(3===t.type){let t=zc(h);if(!t)return e.fillStyle=Xi(Mt(h,h.length-1).color),void e.fillRect(i.left,i.top,r,n);s=e.createLinearGradient(i.left+l,i.top+c,i.left+d,i.top+p),t.forEach(e=>s.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}else s=e.createLinearGradient(i.left+l,i.top+c,i.left+d,i.top+p),_c(h).forEach(e=>s.addColorStop(e.stop,e.color))}else if(5===t.type||6===t.type){let o=t,a=_s(o.stops,1),l=6===t.type;if(l&&!zc(a))return e.fillStyle=Xi(Mt(a,a.length-1).color),void e.fillRect(i.left,i.top,r,n);s=e.createConicGradient(o.angle-Math.PI/2,i.left+r/2,i.top+n/2),((l?zc(a):null)??_c(a)).forEach(e=>s.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}s&&(e.fillStyle=s,e.fillRect(i.left,i.top,r,n))},Yp=async(e,t,i,r,n)=>{for(let s=0;s<t.length;s++){let o=Mt(t,s);if(0===o.type){let t=await n(o.url);t&&Up(e,t,i,s,r)}else Gp(e,o,r)}},Kp=(e,t,i,r,n)=>{let s=0,o=0,a=e,l=t,d=i.left,c=i.top,p=i.width,h=i.height,u=p/h,f=a/l,g=n?Hi(n[0],1):.5,m=n?Hi(n[1],1):.5;return 2===r?f>u?(h=p/f,c+=(i.height-h)*m):(p=h*f,d+=(i.width-p)*g):4===r?f>u?(a=l*u,s+=(e-a)*g):(l=a/u,o+=(t-l)*m):8===r?(a>p?(s+=(a-p)*g,a=p):(d+=(p-a)*g,p=a),l>h?(o+=(l-h)*m,l=h):(c+=(h-l)*m,h=l)):16===r&&((f>u?p:h*f)*(f>u?p/f:h)<Math.min(a,p)*Math.min(l,h)?f>u?(h=p/f,c+=(i.height-h)*m):(p=h*f,d+=(i.width-p)*g):(a>p?(s+=(a-p)*g,a=p):(d+=(p-a)*g,p=a),l>h?(o+=(l-h)*m,l=h):(c+=(h-l)*m,h=l))),{sx:s,sy:o,sw:a,sh:l,dx:d,dy:c,dw:p,dh:h}},Xp=(e,t,i)=>e.height<i?new Ct(e.left,t.top,e.width,t.height):e,Jp=(e,t,i,r)=>{let n=[],s=t.split("\n");for(let t of s){if(r){n.push(t);continue}let s=t.split(/(\s+)/),o="";for(let t of s){let r=o+t;e.measureText(r).width<=i||""===o?o=r:(n.push(o),o=t)}n.push(o)}return n},Qp=e=>e instanceof Jd||e instanceof Xd||e instanceof Kd&&"radio"!==e.type&&"checkbox"!==e.type,Zp=e=>{switch(e){case 1:return"center";case 2:return"right";default:return"left"}},eh=(e,t)=>{let i=t>e?t*(1+Math.pow(e/t-1,3)):t;return Math.max(0,e+i)},th=(e,t)=>{if(0===t)return e;let i=e.map((e,t)=>pc(e)?{x:t%2==0?e.start.x:e.end.x,y:t%2==0?e.end.y:e.start.y,rx:Math.abs(e.end.x-e.start.x),ry:Math.abs(e.end.y-e.start.y)}:{x:e.x,y:e.y,rx:0,ry:0}),r=Mt(i,1).x-Mt(i,0).x+2*t,n=Mt(i,3).y-Mt(i,0).y+2*t;if(r<=0||n<=0)return[];let s=i.map(e=>({x:eh(e.rx,t),y:eh(e.ry,t)})),o=(e,t)=>t>0?e/t:1,a=Math.min(1,o(r,Mt(s,0).x+Mt(s,1).x),o(r,Mt(s,3).x+Mt(s,2).x),o(n,Mt(s,0).y+Mt(s,3).y),o(n,Mt(s,1).y+Mt(s,2).y));return e.map((e,r)=>{let n=Mt(i,r),o=n.x+(1===r||2===r?t:-t),l=n.y+(r>=2?t:-t);if(!pc(e))return new lc(o,l);let d=Mt(s,r).x*a,c=Mt(s,r).y*a;if(!d||!c)return new lc(o,l);let p=d/n.rx,h=c/n.ry,u=e=>new lc(o+(e.x-n.x)*p,l+(e.y-n.y)*h);return new cc(u(e.start),u(e.startControl),u(e.endControl),u(e.end))})},ih=(e,t,i)=>{let{a:r,b:n,c:s,d:o,e:a,f:l}=e;if(![r,n,s,o,a,l,t,i].every(Number.isFinite))return null;let d=r*o-n*s;if(!Number.isFinite(d)||0===d)return null;let c=(e,t)=>({x:(o*(e-a)-s*(t-l))/d,y:(-n*(e-a)+r*(t-l))/d}),p=[c(0,0),c(t,0),c(t,i),c(0,i)];if(!p.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)))return null;let h=Math.min(...p.map(e=>e.x)),u=Math.min(...p.map(e=>e.y)),f=Math.max(...p.map(e=>e.x)),g=Math.max(...p.map(e=>e.y)),m=r*r+n*n,b=s*s+o*o,x=r*s+n*o,y=Math.sqrt((m+b+Math.hypot(m-b,2*x))/2);if(!Number.isFinite(y)||y<=0)return null;let v=1e-10*Math.max(m,b);return{matrix:e,viewport:new Ct(h,u,f-h,g-u),scale:y,uniform:Math.abs(m-b)<=v&&Math.abs(x)<=v}},rh=(e,t,i)=>{e.beginPath(),e.rect(t.left,t.top,t.width,t.height),i.length&&(Mp(e,i),e.closePath())},nh=(e,t)=>{let i=t.spread.number,r=Hc(e.container);return r.width-2*i<=0||r.height-2*i<=0?[]:th(mc(e.curves),-i)},sh=async(e,t,i,r,n,s)=>{let o=Hc(t.container),a=i.blur.number/2,l=Math.ceil(3*a)+2,d=i.spread.number,c=yt((i.inset?o:t.container.bounds.add(i.offsetX.number-d,i.offsetY.number-d,2*d,2*d)).add(-l,-l,2*l,2*l),s.viewport,l,s.scale);if(!c.width||!c.height)return!0;let p,h,u=Math.ceil(c.width*s.scale),f=Math.ceil(c.height*s.scale),g=bt(n,u,f);if(!g)return!1;try{p=e.canvas.ownerDocument.createElement("canvas"),p.width=u,p.height=f;let n=p.getContext("2d");if(!n)return!1;n.scale(s.scale,s.scale),n.translate(-c.left,-c.top);let o=i.inset?nh(t,i):th(fc(t.curves),d),l=ac(o,i.offsetX.number,i.offsetY.number,0,0);i.inset?rh(n,c,l):Ap(n,l),n.fillStyle=Xi(i.color),n.fill(i.inset?"evenodd":"nonzero"),h=await mt(p,{functions:[{kind:"blur",value:a}]},1,s.scale,r.signal),e.save();try{i.inset?(Ap(e,mc(t.curves)),e.clip()):(rh(e,s.viewport,fc(t.curves)),e.clip("evenodd")),e.drawImage(h,c.left,c.top,h.width/s.scale,h.height/s.scale)}finally{e.restore()}return!0}catch(e){if(!(e instanceof Qc))throw e;return!1}finally{h&&h!==p&&Zc(h),p&&Zc(p),n.pixels-=g}},oh=async(e,t,i,r,n)=>{if(r.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(Ki(i.color))return;let s=i.spread.number;if(!i.inset&&(t.container.bounds.width+2*s<=0||t.container.bounds.height+2*s<=0))return;let o="function"==typeof e.getTransform,a=o?e.getTransform():{a:r.scale,b:0,c:0,d:r.scale,e:-r.x*r.scale,f:-r.y*r.scale},l=ih(a,e.canvas.width,e.canvas.height);if(!l)return;let{viewport:d}=l;if(i.blur.number>0&&(i.inset||!l.uniform)&&await sh(e,t,i,r,n,l))return;let c=Hc(t.container);e.save();try{if(i.inset&&0===i.blur.number)return Ap(e,mc(t.curves)),e.clip(),rh(e,c,ac(nh(t,i),i.offsetX.number,i.offsetY.number,0,0)),e.fillStyle=Xi(i.color),void e.fill("evenodd");let r=Math.ceil(2*i.blur.number+Math.abs(s)+Math.abs(i.offsetX.number)+Math.abs(i.offsetY.number))+2,n=i.inset?c.add(-r,-r,2*r,2*r):t.container.bounds.add(-s,-s,2*s,2*s),{a:p,b:h,c:u,d:f,e:g,f:m}=a,b=n.left+n.width,x=n.top+n.height,y=Math.max(p*n.left+u*n.top+g,p*b+u*n.top+g,p*b+u*x+g,p*n.left+u*x+g),v=Math.max(1e4,y+r*l.scale+2);i.inset?(Ap(e,mc(t.curves)),e.clip()):(rh(e,d,fc(t.curves)),e.clip("evenodd")),o?e.setTransform(p,h,u,f,g-v,m):e.translate(-v/p,0),i.inset?rh(e,n,nh(t,i)):Ap(e,th(fc(t.curves),s)),o?e.setTransform(p,h,u,f,g,m):e.translate(v/p,0),e.shadowOffsetX=v+p*i.offsetX.number+u*i.offsetY.number,e.shadowOffsetY=h*i.offsetX.number+f*i.offsetY.number,e.shadowBlur=i.blur.number*l.scale,e.shadowColor=Xi(i.color),e.fillStyle="rgb(0, 0, 0)",e.fill(i.inset?"evenodd":"nonzero")}finally{e.restore()}},ah=class{ctx;context;scale;createFontStyle;constructor(e){this.ctx=e.ctx,this.context=e.context,this.scale=e.scale,this.createFontStyle=e.createFontStyle}async render(e){let t=e.container,i=t.styles,r=t.bounds,n=this.scale;if(r.width<=0||r.height<=0)return;let s=this.ctx.canvas.ownerDocument??document,o=Math.ceil(r.width),a=Math.ceil(r.height),l=Math.ceil(r.width*n),d=Math.ceil(r.height*n),c=this.createLayer(s,l,d);if(!c)return;let p=null,h=null,u=null;try{c.ctx.scale(n,n);let[f]=this.createFontStyle(i);c.ctx.font=f??"",c.ctx.textBaseline="alphabetic",c.ctx.textAlign="left",c.ctx.direction=1===i.direction?"rtl":"ltr";let g=vp(c.ctx,i.fontSize.number),m=new Lp({ctx:c.ctx,context:this.context,canvas:c.canvas,options:{width:o,height:a,scale:1}});Ki(i.backgroundColor)||(c.ctx.fillStyle=Xi(i.backgroundColor),c.ctx.fillRect(0,0,o,a)),c.ctx.save(),c.ctx.translate(-r.left,-r.top),await m.renderBackgroundImage(t),c.ctx.restore();let b={bounds:r,baseline:g,letterSpacing:i.letterSpacing,writingMode:i.writingMode};if(p=this.createGlyphLayer(s,l,d,c.ctx),!p)return;let x=!!i.webkitTextStrokeWidth;x&&(p.ctx.strokeStyle=Xi(i.webkitTextStrokeColor),p.ctx.lineWidth=i.webkitTextStrokeWidth,p.ctx.lineJoin=Sp());for(let e of t.textNodes)for(let t of e.textBounds)this.drawGlyphs(p,t,b,(e,t,i,r)=>{e.fillText(t,i,r),x&&e.strokeText(t,i,r)});if(c.ctx.globalCompositeOperation="destination-in",c.ctx.drawImage(p.canvas,0,0,o,a),u=this.renderShadowSilhouettes(e,s,l,d,c.ctx,i,b),u){if(h=this.createLayer(s,l,d),!h)return;for(let e of u)h.ctx.drawImage(e,0,0);h.ctx.drawImage(c.canvas,0,0),this.ctx.drawImage(h.canvas,r.left,r.top,r.width,r.height)}else this.ctx.drawImage(c.canvas,r.left,r.top,r.width,r.height)}finally{Zc(c.canvas),p&&Zc(p.canvas),h&&Zc(h.canvas),u&&u.forEach(Zc)}}createLayer(e,t,i){let r=e.createElement("canvas");r.width=t,r.height=i;let n=r.getContext("2d");return n?{canvas:r,ctx:n}:null}createGlyphLayer(e,t,i,r){let n=this.createLayer(e,t,i);return n?(n.ctx.scale(this.scale,this.scale),n.ctx.font=r.font,n.ctx.textBaseline=r.textBaseline,n.ctx.textAlign=r.textAlign,n.ctx.direction=r.direction,n.ctx.fillStyle="#000",n):null}drawGlyphs(e,t,i,r){let n=t.bounds.left-i.bounds.left,s=t.bounds.top-i.bounds.top+i.baseline,{letterSpacing:o,writingMode:a}=i;if(o<=0)return void r(e.ctx,t.text,n,s);if($a(a))return void r(e.ctx,t.text,n,s);let l=n;for(let i of Rd(t.text))r(e.ctx,i,l,s),l+=e.ctx.measureText(i).width+o}renderShadowSilhouettes(e,t,i,r,n,s,o){let a=s.textShadow;if(!a.length)return null;let l=[];for(let s=a.length-1;s>=0;s--){let d=Mt(a,s),c=this.createGlyphLayer(t,i,r,n);if(c){c.ctx.shadowColor=Xi(d.color),c.ctx.shadowOffsetX=d.offsetX.number*this.scale,c.ctx.shadowOffsetY=d.offsetY.number*this.scale,c.ctx.shadowBlur=d.blur.number*this.scale,c.ctx.fillStyle=Xi(d.color);for(let t of e.container.textNodes)for(let e of t.textBounds)this.drawGlyphs(c,e,o,(e,t,i,r)=>{e.fillText(t,i,r)});l.push(c.canvas)}}return l.length?l:null}},lh=class e{surfaceRoot;surfaceBudget;canvas;ctx;context;options;backgroundRenderer;borderRenderer;borderImageRenderer;effectsRenderer;textRenderer;textClipRenderer;legacySubtree=!1;constructor(e,t,i,r={pixels:0}){this.surfaceRoot=i,this.surfaceBudget=r,this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement("canvas");let n=this.canvas.getContext("2d");if(!n)throw t.canvas||Zc(this.canvas),i?new Qc("Filter surface canvas is unavailable"):new Error("Failed to get 2D rendering context from canvas");this.ctx=n,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.ctx.textBaseline="bottom",void 0!==t.imageSmoothing&&(this.ctx.imageSmoothingEnabled=t.imageSmoothing),t.imageSmoothingQuality&&(this.ctx.imageSmoothingQuality=t.imageSmoothingQuality),this.backgroundRenderer=new Lp({ctx:this.ctx,context:this.context,canvas:this.canvas,options:{width:t.width,height:t.height,scale:t.scale}}),this.borderRenderer=new Op({ctx:this.ctx},{path:e=>this.path(e),formatPath:e=>this.formatPath(e)}),this.borderImageRenderer=new zp(this.ctx),this.effectsRenderer=new Hp({ctx:this.ctx,scale:t.scale},{path:e=>this.path(e)}),this.textRenderer=new Ep({ctx:this.ctx,options:{scale:t.scale}}),this.textClipRenderer=new ah({ctx:this.ctx,context:this.context,scale:t.scale,createFontStyle:e=>this.textRenderer.createFontStyle(e)}),this.context.logger.debug(`Canvas renderer initialized (${t.width}x${t.height}) with scale ${t.scale}`)}async renderStack(e){let t=e.element.container.styles;if(t.isVisible()){let i=ut(t.filter),r=null!==i&&i.functions.length>0,n=t.maskImage.length>0,s=t.webkitBoxReflect,o=t.mixBlendMode!==sl.NORMAL;if(e.element!==this.surfaceRoot&&!this.legacySubtree&&(n||s||o||null!==i&&(r||t.opacity<1))&&this.canComposite(e.element)){if(!await this.renderCompositedStack(e,i,n,s,o)){this.legacySubtree=!0;try{await this.renderStackContent(e)}finally{this.legacySubtree=!1}}return}await this.renderStackContent(e)}}canComposite(e){let t=e=>{let t=e.styles;return!t.isTransformed()&&1===t.zoom&&0===t.clipPath.type&&!ds(t.display,2048)&&null!==ut(t.filter)},i=e=>t(e)&&e.elements.every(i),r=e.parent;for(;r&&r!==this.surfaceRoot;){if(!t(r.container))return!1;r=r.parent}return i(e.container)}async renderCompositedStack(t,i,r,n,s=!1){let o=this.options.signal;if(o?.aborted)throw new DOMException("The operation was aborted.","AbortError");let a=yt(xt(t.element.container),new Ct(this.options.x,this.options.y,this.options.width,this.options.height),i?ft(i):0,this.options.scale);if(!a.width||!a.height)return!0;let l=bt(this.surfaceBudget,Math.ceil(a.width*this.options.scale),Math.ceil(a.height*this.options.scale));if(!l)return this.context.logger.info("Filter surface budget exceeded; using the existing renderer"),!1;let d,c,p={...this.options,canvas:void 0,backgroundColor:null,x:a.left,y:a.top,width:a.width,height:a.height};try{d=new e(this.context,p,t.element,this.surfaceBudget),await d.renderStackContent(t),d.effectsRenderer.applyEffects([]),i&&(c=await mt(d.canvas,i,t.element.container.styles.opacity,p.scale,o));let l=c??d.canvas;if(r&&await this.applyMask(l,t.element.container.styles,a),o?.aborted)throw new DOMException("The operation was aborted.","AbortError");let h=t.element.effects,u=t.element.getEffects(4,this.surfaceRoot).filter(e=>!h.includes(e)||!Lc(e)&&!Mc(e)&&!Tc(e)&&!Ec(e));return this.effectsRenderer.applyEffects(u),s?(this.ctx.save(),this.ctx.globalCompositeOperation=t.element.container.styles.mixBlendMode,this.ctx.drawImage(l,p.x,p.y,l.width/p.scale,l.height/p.scale),this.ctx.restore()):this.ctx.drawImage(l,p.x,p.y,l.width/p.scale,l.height/p.scale),n&&await this.drawReflection(l,t.element.container.bounds,a,n),!0}catch(e){if(!(e instanceof Qc))throw e;return this.context.logger.info(`${e.message}; using the existing renderer`),!1}finally{d&&Zc(d.canvas),c&&Zc(c),this.surfaceBudget.pixels-=l}}async applyMask(e,t,i){let r=e.getContext("2d");if(!r)return;let n=this.context.resourceDocument.createElement("canvas");n.width=e.width,n.height=e.height;let s=n.getContext("2d");if(s){s.scale(this.options.scale,this.options.scale),s.translate(-i.left,-i.top);try{await Yp(s,t.maskImage,t,{left:i.left,top:i.top,width:i.width,height:i.height},async e=>await this.context.cache.match(e))}catch(e){return void this.context.logger.error(`Error rendering mask-image: ${e instanceof Error?e.message:e}`)}r.save();try{r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation="destination-in",r.drawImage(n,0,0)}finally{r.restore()}}}async drawReflection(e,t,i,r){let n=this.options.scale,s=Math.ceil(t.width*n),o=Math.ceil(t.height*n);if(s<=0||o<=0)return;let a,l,d=bt(this.surfaceBudget,s,o);if(d)try{a=this.context.resourceDocument.createElement("canvas"),a.width=s,a.height=o;let d=a.getContext("2d");if(!d)return;let c=Math.round((t.left-i.left)*n),p=Math.round((t.top-i.top)*n),h="left"===r.direction||"right"===r.direction;d.save();try{h?(d.translate(s,0),d.scale(-1,1)):(d.translate(0,o),d.scale(1,-1)),d.drawImage(e,-c,-p)}finally{d.restore()}if(r.mask){l=this.context.resourceDocument.createElement("canvas"),l.width=s,l.height=o;let e=l.getContext("2d");if(e){e.scale(n,n),await Yp(e,[r.mask],{maskPosition:[],maskRepeat:[],maskSize:[]},{left:0,top:0,width:t.width,height:t.height},async e=>await this.context.cache.match(e)),d.save();try{h?(d.translate(s,0),d.scale(-1,1)):(d.translate(0,o),d.scale(1,-1)),d.globalCompositeOperation="destination-in",d.drawImage(l,0,0,s,o)}finally{d.restore()}}}let u=r.offset,f=t.left,g=t.top;"below"===r.direction?g=t.top+t.height+u:"above"===r.direction?g=t.top-t.height-u:f="right"===r.direction?t.left+t.width+u:t.left-t.width-u,this.ctx.save();try{this.ctx.filter="none",this.ctx.drawImage(a,f,g,t.width,t.height)}finally{this.ctx.restore()}}finally{a&&Zc(a),l&&Zc(l),this.surfaceBudget.pixels-=d}}async renderNode(e){e.container.debugRender,e.container.styles.isVisible()&&(await this.renderNodeBackgroundAndBorders(e),await this.renderNodeContent(e))}renderReplacedElement(e,t,i){let r=i.naturalWidth||e.intrinsicWidth,n=i.naturalHeight||e.intrinsicHeight;if(i&&r>0&&n>0){let s=Vc(e),o=mc(t);this.path(o),this.ctx.save(),this.ctx.clip();let{sx:a,sy:l,sw:d,sh:c,dx:p,dy:h,dw:u,dh:f}=Kp(r,n,s,e.styles.objectFit,e.styles.objectPosition);this.ctx.drawImage(i,a,l,d,c,p,h,u,f),this.ctx.restore()}}async renderNodeContent(t){this.effectsRenderer.applyEffects(t.getEffects(4,this.surfaceRoot));let i=t.container,r=t.curves,n=i.styles,s=Vc(i);for(let e of i.textNodes)await this.textRenderer.renderTextNode(e,n,s);await async function(t,i,r,n,s,o,a,l){if(s instanceof $d)try{let e=await i.cache.match(s.src),r=t.imageSmoothingEnabled;2===a.imageRendering||1===a.imageRendering?t.imageSmoothingEnabled=!1:3===a.imageRendering&&(t.imageSmoothingEnabled=!0),l(s,o,e),t.imageSmoothingEnabled=r}catch{i.logger.error(`Error loading image ${s.src}`)}if(s instanceof Fd&&l(s,o,s.canvas),s instanceof Wd)try{l(s,o,await i.cache.match(s.svg))}catch{i.logger.error(`Error loading svg ${s.svg.substring(0,255)}`)}if(s instanceof Qd&&s.tree){let n=await((t,i)=>new e(t,i))(i,{scale:r.scale,backgroundColor:s.backgroundColor,x:0,y:0,width:s.width,height:s.height}).render(s.tree);s.width&&s.height&&t.drawImage(n,0,0,s.width,s.height,s.bounds.left,s.bounds.top,s.bounds.width,s.bounds.height)}}(this.ctx,this.context,{scale:this.options.scale,backgroundColor:this.options.backgroundColor,x:this.options.x,y:this.options.y,width:this.options.width,height:this.options.height},0,i,r,n,(e,t,i)=>this.renderReplacedElement(e,t,i)),function(e,t,i,r,n){if(r instanceof Kd){let t=Math.min(r.bounds.width,r.bounds.height);"checkbox"===r.type&&r.checked?(e.save(),i([new lc(r.bounds.left+.39363*t,r.bounds.top+.79*t),new lc(r.bounds.left+.16*t,r.bounds.top+.5549*t),new lc(r.bounds.left+.27347*t,r.bounds.top+.44071*t),new lc(r.bounds.left+.39694*t,r.bounds.top+.5649*t),new lc(r.bounds.left+.72983*t,r.bounds.top+.23*t),new lc(r.bounds.left+.84*t,r.bounds.top+.34085*t),new lc(r.bounds.left+.39363*t,r.bounds.top+.79*t)]),e.fillStyle=Xi(r.styles.accentColor??7733247),e.fill(),e.restore()):"radio"===r.type&&r.checked&&(e.save(),e.beginPath(),e.arc(r.bounds.left+t/2,r.bounds.top+t/2,t/4,0,2*Math.PI,!0),e.fillStyle=Xi(r.styles.accentColor??7733247),e.fill(),e.restore())}if(Qp(r)&&r.value.length){let[s]=t.createFontStyle(n);e.font=s??"";let o=Hi(n.fontSize,0),{baseline:a,height:l}=yp(e,o);e.fillStyle=r instanceof Kd&&r.isPlaceholder?Xi(1970632191):Xi(n.color),e.textBaseline="alphabetic",e.textAlign=Zp(r.styles.textAlign);let d=Vc(r),c=r instanceof Kd?Xp(d,Hc(r),l):d,p=0;switch(r.styles.textAlign){case 1:p+=d.width/2;break;case 2:p+=d.width}let h=0;r instanceof Kd&&(h=(d.height-l)/2);let u=d.add(p,h,0,0);e.save(),i([new lc(c.left,c.top),new lc(c.left+c.width,c.top),new lc(c.left+c.width,c.top+c.height),new lc(c.left,c.top+c.height)]),e.clip();let f=Jp(e,r.value,d.width,"pre"===n.whiteSpace||"nowrap"===n.whiteSpace),g=ca(n.lineHeight,o);f.forEach((i,r)=>{let s=u.left,o=e.measureText(i).width;switch(n.textAlign){case 1:s+=(d.width-o)/2;break;case 2:s+=d.width-o}let l=new Ct(s,u.top+r*g,0,0);t.renderTextWithLetterSpacing(new Sd(i,l),n.letterSpacing,a,n.writingMode)}),e.restore(),e.textBaseline="alphabetic",e.textAlign="left"}}(this.ctx,this.textRenderer,this.path.bind(this),i,n),await async function(e,t,i,r,n,s){if(ds(n.styles.display,2048))if(null!==n.styles.listStyleImage){let i=n.styles.listStyleImage;if(0===i.type){let r=i.url;try{let i=await t.cache.match(r),o=Hi(s.fontSize,0),a=i?.naturalWidth||i.width,l=i?.naturalHeight||i.height;if(a<=0||l<=0)return;let d=Math.min(o/a,o/l),c=a*d,p=l*d,h=n.bounds.top+Hi(n.styles.paddingTop,n.bounds.width)+ca(s.lineHeight,s.fontSize.number)/2;e.drawImage(i,n.bounds.left-(c+10),h-p/2,c,p)}catch{t.logger.error(`Error loading list-style-image ${r}`)}}}else if(r.listValue&&-1!==n.styles.listStyleType){let t=n.styles.listStyleType;if(0===t||1===t||2===t){let i=.45*s.fontSize.number,r=n.bounds.left-.9*i,o=n.bounds.top+Hi(n.styles.paddingTop,n.bounds.width)+ca(s.lineHeight,s.fontSize.number)/2;e.save(),e.fillStyle=Xi(s.color),e.beginPath(),2===t?e.rect(r-i/2,o-i/2,i,i):(e.arc(r,o,i/2,0,2*Math.PI),1===t&&(e.strokeStyle=Xi(s.color),e.lineWidth=.18*i)),1===t?e.stroke():e.fill(),e.restore()}else{let[t]=i.createFontStyle(s);e.font=t??"",e.fillStyle=Xi(s.color),e.textBaseline="middle",e.textAlign="right";let o=new Ct(n.bounds.left,n.bounds.top+Hi(n.styles.paddingTop,n.bounds.width),n.bounds.width,ca(s.lineHeight,s.fontSize.number)/2+1);i.renderTextWithLetterSpacing(new Sd(r.listValue,o),s.letterSpacing,ca(s.lineHeight,s.fontSize.number)/2+2,s.writingMode),e.textBaseline="bottom",e.textAlign="left"}}}(this.ctx,this.context,this.textRenderer,t,i,n)}async renderStackContent(e){e.element.container.debugRender;let t=this.options.signal;await this.renderNodeBackgroundAndBorders(e.element);for(let i of e.negativeZIndex){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderNodeContent(e.element);for(let t of e.nonInlineLevel)await this.renderNode(t);for(let i of e.nonPositionedFloats){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let i of e.nonPositionedInlineLevel){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let t of e.inlineLevel)await this.renderNode(t);for(let i of e.zeroOrAutoZIndexOrTransformedOrOpacity){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}for(let i of e.positiveZIndex){if(t?.aborted)throw new DOMException("The operation was aborted.","AbortError");await this.renderStack(i)}}path(e){Ap(this.ctx,e)}formatPath(e){Mp(this.ctx,e)}async renderSurfaceBoxShadow(e,t){let i=t.spread.number,r=t.blur.number/2,n=Math.ceil(3*r)+1,s=e.container.bounds.add(-i,-i,2*i,2*i);if(s.width<=0||s.height<=0)return;let o=this.options.scale,a=yt(s.add(-n,-n,2*n,2*n),new Ct(this.options.x-t.offsetX.number,this.options.y-t.offsetY.number,this.options.width,this.options.height),n,o);if(!a.width||!a.height)return;let l,d,c=Math.ceil(a.width*o),p=Math.ceil(a.height*o),h=bt(this.surfaceBudget,c,p);if(!h)throw new Qc("Box shadow surface budget exceeded");try{l=this.context.resourceDocument.createElement("canvas"),l.width=c,l.height=p;let n=l.getContext("2d");if(!n)throw new Qc("Box shadow surface canvas is unavailable");n.scale(o,o),n.translate(-a.left,-a.top),Ap(n,ac(fc(e.curves),-i,-i,2*i,2*i)),n.fillStyle=Xi(t.color),n.fill(),d=await mt(l,{functions:[{kind:"blur",value:r}]},1,o,this.options.signal),this.ctx.save();try{this.ctx.beginPath(),this.ctx.rect(this.options.x,this.options.y,this.options.width,this.options.height),Mp(this.ctx,fc(e.curves)),this.ctx.closePath(),this.ctx.clip("evenodd"),this.ctx.drawImage(d,a.left+t.offsetX.number,a.top+t.offsetY.number,d.width/o,d.height/o)}finally{this.ctx.restore()}}finally{l&&Zc(l),d&&Zc(d),this.surfaceBudget.pixels-=h}}async renderNodeBackgroundAndBorders(e){this.effectsRenderer.applyEffects(e.getEffects(2,this.surfaceRoot)),!this.surfaceRoot&&e.container.styles.backdropFilter&&await this.renderBackdropFilter(e);let t=e.container.styles,i=!Ki(t.backgroundColor)||t.backgroundImage.length,r=ch(t),n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=Xc(t.backgroundClip,0),o=dh(s,e.curves);if(i||t.boxShadow.length){r&&e.container.textNodes.length>0?await this.textClipRenderer.render(e):(this.ctx.save(),this.path(o),this.ctx.clip(),Ki(t.backgroundColor)||(this.ctx.fillStyle=Xi(t.backgroundColor),this.ctx.fill()),await this.backgroundRenderer.renderBackgroundImage(e.container),this.ctx.restore());for(let i of t.boxShadow.slice(0).reverse())!this.surfaceRoot||i.inset?await oh(this.ctx,e,i,this.options,this.surfaceBudget):await this.renderSurfaceBoxShadow(e,i)}if(t.borderImageSource){let i=t.borderImageSource,r=e.container.bounds,n=[Math.max(0,t.borderTopWidth),Math.max(0,t.borderRightWidth),Math.max(0,t.borderBottomWidth),Math.max(0,t.borderLeftWidth)],s=null;if(0===i.type){let e=i.url;try{s=await this.context.cache.match(e)??null}catch{this.context.logger.error(`Error loading border-image ${e}`)}}else s=this.rasterizeGradientSource(i,r);if(s){let e=Fp(t.borderImageOutset,n),i=r.add(-e.left,-e.top,e.left+e.right,e.top+e.bottom),o=$p(t.borderImageWidth,n,i);this.borderImageRenderer.renderBorderImage(r,s,t.borderImageSlice,t.borderImageRepeat,o[0],o[1],o[2],o[3],e)}return}let a=0;for(let t of n){if(0!==t.style&&!Ki(t.color)&&t.width>0){let i=async()=>{2===t.style?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,a,e.curves,2):3===t.style?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,a,e.curves,3):4===t.style?await this.borderRenderer.renderDoubleBorder(t.color,t.width,a,e.curves):await this.borderRenderer.renderSolidBorder(t.color,a,e.curves)},r=e.container.legendBounds;if(0===a&&r){let t=e.container.bounds,n=r.left-t.left,s=r.left+r.width-t.left;n>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,n,t.height),this.ctx.clip(),await i(),this.ctx.restore());let o=t.left+s,a=t.width-s;a>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(o,t.top,a,t.height),this.ctx.clip(),await i(),this.ctx.restore())}else await i()}a++}this.renderOutline(e)}renderOutline(e){let t=e.container.styles;if(0===t.outlineStyle||1===t.outlineStyle)return;let i=Math.max(0,t.outlineWidth);if(i<=0)return;let r=t.outlineColor??t.color;if(Ki(r))return;let n=Math.max(0,t.outlineOffset)+i/2,s=ac(fc(e.curves),-n,-n,2*n,2*n);this.ctx.save();try{this.ctx.strokeStyle=Xi(r),this.ctx.lineWidth=i,3===t.outlineStyle?this.ctx.setLineDash([3*i,3*i]):4===t.outlineStyle&&this.ctx.setLineDash([i,2*i]),this.path(s),this.ctx.stroke()}finally{this.ctx.restore()}}rasterizeGradientSource(e,t){let i=Math.max(1,Math.ceil(t.width)),r=Math.max(1,Math.ceil(t.height)),n=(this.ctx.canvas.ownerDocument??document).createElement("canvas");n.width=i,n.height=r;let s=n.getContext("2d");if(!s)return null;if(1===e.type||3===e.type){let t=e,[o,a,l,d,c]=Hs(t.angle,i,r),p=_s(t.stops,o||i),h=3===e.type,u=h?zc(p):null,f=s.createLinearGradient(a,l,d,c);if(u)u.forEach(e=>{f.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)});else if(h){let e=Xi(Mt(p,p.length-1).color);f.addColorStop(0,e),f.addColorStop(1,e)}else _c(p).forEach(e=>{f.addColorStop(e.stop,e.color)});return s.fillStyle=f,s.fillRect(0,0,i,r),n}if(2===e.type||4===e.type){let t=e,o=0===t.position.length?[zi]:t.position,a=Hi(Mt(o,0),i),l=Hi(Mt(o,o.length-1),r),[d,c]=Us(t,a,l,i,r);if(d<=0||c<=0)return null;let p=this.ctx.canvas.ownerDocument??document,h=Wc(p,d,c,t.stops,4===e.type);return h?(s.fillStyle=h.lastColor,s.fillRect(0,0,i,r),s.drawImage(h.canvas,a-d,l-c,2*d,2*c),n):null}if(5===e.type||6===e.type){let t,o=e,a=Hi(Mt(o.position,0),i),l=Hi(Mt(o.position,1),r),d=s.createConicGradient(o.angle-Math.PI/2,a,l);if(6===e.type){let e=_s(o.stops,1),i=Mt(e,0),r=Mt(e,e.length-1),n=Math.max(r.stop-i.stop,.01);t=[];let s=Math.ceil(1/n);for(let r=0;r<s;r++)for(let s of e){let e=r*n+(s.stop-i.stop);if(e>1)break;t.push({stop:e,color:Xi(s.color)})}let a=Mt(t,t.length-1);a&&a.stop<1&&t.push({stop:1,color:a.color})}else t=_s(o.stops,Math.max(i,r)).map(e=>({stop:e.stop,color:Xi(e.color)}));return t.forEach(e=>{d.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),s.fillStyle=d,s.fillRect(0,0,i,r),n}return this.context.logger.warn("Unsupported border-image source; only URL and gradient images are supported"),null}async renderBackdropFilter(e){let t=ut(e.container.styles.backdropFilter);if(!t||0===t.functions.length)return;let i=e.container.bounds;if(i.width<=0||i.height<=0)return;let r=this.options.scale,n=Math.ceil(i.width*r),s=Math.ceil(i.height*r);if(n<=0||s<=0)return;let o,a,l=bt(this.surfaceBudget,n,s);if(l)try{o=this.context.resourceDocument.createElement("canvas"),o.width=n,o.height=s;let e=o.getContext("2d");if(!e)return;let l=Math.round((i.left-this.options.x)*r),d=Math.round((i.top-this.options.y)*r);e.drawImage(this.canvas,l,d,n,s,0,0,n,s);try{a=await mt(o,t,1,r,this.options.signal)}catch(e){if(e instanceof Qc)return void this.context.logger.info(`${e.message}; rendering without the backdrop effect`);throw e}if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");this.ctx.save();try{this.ctx.filter="none",this.ctx.drawImage(a,i.left,i.top,i.width,i.height)}finally{this.ctx.restore()}}finally{o&&Zc(o),a&&Zc(a),this.surfaceBudget.pixels-=l}}async render(e){try{this.options.backgroundColor&&(this.ctx.fillStyle=Xi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height));let t=$c(e);return await this.renderStack(t),this.effectsRenderer.applyEffects([]),this.canvas}catch(e){throw this.options.canvas||Zc(this.canvas),e}}},dh=(e,t)=>{switch(e){case 0:return fc(t);case 2:return gc(t);default:return mc(t)}},ch=e=>e.backgroundClip.some(e=>3===e),ph=class{canvas;ctx;options;context;constructor(e,t){this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement("canvas");let i=this.canvas.getContext("2d");if(!i)throw new Error("Failed to get 2D rendering context from canvas");this.ctx=i,this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`,this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (${t.width}x${t.height} at ${t.x},${t.y}) with scale ${t.scale}`)}async render(e){if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");let t=uh(e),i=wd(this.options.width,this.options.height,0,0,e),r=kd(i);t();let n=await r;if(this.options.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");return this.options.backgroundColor&&(this.ctx.fillStyle=Xi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),this.ctx.drawImage(n,this.options.x,this.options.y,this.options.width,this.options.height),this.canvas}},hh=["marginTop","marginRight","marginBottom","marginLeft","top","right","bottom","left"],uh=e=>{let t=e.style,i=hh.map(e=>[e,t[e]]);for(let e of hh)t[e]=e.startsWith("margin")?"0px":"auto";return()=>{for(let[e,r]of i)t[e]=r}},fh=class{id;enabled;start;constructor({id:e,enabled:t}){this.id=e,this.enabled=t,this.start=Date.now()}debug(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.debug?(this.id,this.getTime()):this.info(...e))}getTime(){return Date.now()-this.start}info(...e){this.enabled&&typeof window<"u"&&window.console&&"function"==typeof console.info&&(this.id,this.getTime())}warn(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.warn?console.warn(this.id,`${this.getTime()}ms`,...e):this.info(...e))}error(...e){this.enabled&&(typeof window<"u"&&window.console&&"function"==typeof console.error?console.error(this.id,`${this.getTime()}ms`,...e):this.info(...e))}},gh=class{context;_options;_cache=new Map;maxSize;_pendingOperations=new Map;_deferMode=!1;_collectedUrls=new Set;_evictionSuspendCount=0;get _evictionEnabled(){return 0===this._evictionSuspendCount}constructor(e,t){if(this.context=e,this._options=t,this.maxSize=t.maxCacheSize??100,this.maxSize<1)throw new Error("Cache maxSize must be at least 1");this.maxSize>1e4&&this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`)}startDefer(){this._deferMode=!0,this._evictionSuspendCount++}async preloadAll(e=10,t,i){this._deferMode=!1;let r=Array.from(this._collectedUrls);this._collectedUrls.clear();try{if(0===r.length)return;let n=Math.max(1,Math.min(e,100));this.context.logger.debug(`Preloading ${r.length} image(s) with concurrency ${n}`);let s=0,o=i?new Promise((e,t)=>{let r=()=>t(new DOMException("The operation was aborted.","AbortError"));i.aborted?r():i.addEventListener("abort",r,{once:!0})}):null;o?.catch(()=>{}),t?.(0,r.length);for(let e=0;e<r.length;e+=n){id(i);let a=r.slice(e,e+n);a.map(e=>this._addImageWithPending(e));let l=Promise.allSettled(a.map(e=>this._cache.get(e)?.value??Promise.resolve()));await(o?Promise.race([l,o]):l),s+=a.length,t?.(s,r.length)}}finally{this._evictionSuspendCount=Math.max(0,this._evictionSuspendCount-1)}}addImage(e){if(this._deferMode)return!this.has(e)&&(kh(e)||yh(e))&&this._collectedUrls.add(e),Promise.resolve();let t=this._pendingOperations.get(e);if(t)return t;if(this.has(e)){let t=this._cache.get(e);return this._cache.delete(e),this._cache.set(e,t),Promise.resolve()}return kh(e)||yh(e)?this._addImageWithPending(e):Promise.resolve()}_addImageWithPending(e){let t=this._pendingOperations.get(e);if(t)return t;let i=this._addImageInternal(e);return this._pendingOperations.set(e,i),i.finally(()=>{this._pendingOperations.delete(e)}),i}async _addImageInternal(e){let t=this._options.imageTimeout??15e3,i=this.withTimeout(this.loadImage(e),t,`Timed out (${t}ms) loading image`);i.catch(t=>{let i=t instanceof Error?t.message:String(t),r=`Failed to load image ${e.substring(0,256)}: ${i}`;this.context.logger.error(r),this.context.onError?.(new Error(r))}),this.set(e,i)}withTimeout(e,t,i){if(t<=0)return e;let r,n=new Promise((e,n)=>{r=setTimeout(()=>n(new Error(i)),t)});return Promise.race([e,n]).finally(()=>{void 0!==r&&clearTimeout(r)})}match(e){let t=this._cache.get(e);if(t)return this._cache.delete(e),this._cache.set(e,t),t.value}set(e,t){if(this._cache.has(e))this._cache.delete(e);else if(this._evictionEnabled&&this._cache.size>=this.maxSize){let e=this._cache.keys().next().value;void 0!==e&&(this._cache.delete(e),this.context.logger.debug(`Cache: Evicted LRU entry: ${e}`))}this._cache.set(e,{value:t})}size(){return this._cache.size}getMaxSize(){return this.maxSize}clear(){this._cache.clear()}async loadImage(e){let t=this.context.originChecker,i=e=>t.isSameOrigin(e),r="function"==typeof this._options.customIsSameOrigin?await this._options.customIsSameOrigin(e,i):i(e),n=!r&&!1===this._options.allowTaint&&!vh(e)&&!kh(e)&&"string"!=typeof this._options.proxy,s=!vh(e)&&(!0===this._options.useCORS||n)&&Cd.SUPPORT_CORS_IMAGES&&!r,o=!(vh(e)||r||kh(e)||"string"!=typeof this._options.proxy||s);if(!(r||!1!==this._options.allowTaint||vh(e)||kh(e)||o||s))return;let a=e;o&&(a=await this.proxy(a)),this.context.logger.debug(`Added image ${e.substring(0,256)}`);let l=this.context.config.window.Image??Image;return await new Promise((e,t)=>{let i=new l;i.onload=()=>e(i),i.onerror=t,(wh(a)||s)&&(i.crossOrigin="anonymous"),i.src=a,!0===i.complete&&("function"==typeof i.decode?i.decode().then(()=>e(i),()=>t(new Error(`Failed to decode image ${a.substring(0,256)}`))):setTimeout(()=>e(i),500))})}has(e){return this._cache.has(e)}keys(){return Promise.resolve(Array.from(this._cache.keys()))}proxy(e){let t=this._options.proxy;if(!t)throw new Error("No proxy defined");let i=e.substring(0,256);return new Promise((r,n)=>{let s=new XMLHttpRequest;s.onload=()=>{if(200===s.status){let e=new FileReader;e.addEventListener("load",()=>r(e.result),!1),e.addEventListener("error",e=>n(e),!1),e.readAsDataURL(s.response)}else n(`Failed to proxy resource ${i} with status code ${s.status}`)},s.onerror=n;let o=t.indexOf("?")>-1?"&":"?";if(s.open("GET",`${t}${o}url=${encodeURIComponent(e)}&responseType=blob`),s.responseType="blob",this._options.imageTimeout){let e=this._options.imageTimeout;s.timeout=e,s.ontimeout=()=>n(`Timed out (${e}ms) proxying ${i}`)}s.send()})}},mh=/^data:image\/svg\+xml/i,bh=/^data:image\/.*;base64,/i,xh=/^data:image\/.*/i,yh=e=>Cd.SUPPORT_SVG_DRAWING||!Ch(e),vh=e=>xh.test(e),wh=e=>bh.test(e),kh=e=>"blob"===e.substring(0,4),Ch=e=>"svg"===e.slice(-3).toLowerCase()||mh.test(e),Sh=class{baseUri;origin;constructor(e){if(!e||!e.document)throw new Error("Valid window object required for OriginChecker");if(!e.location||!e.location.href)throw new Error("Window object must have valid location");this.baseUri=e.location.href,this.origin=this.getOrigin(e.location.href)}getOrigin(e){try{return new URL(e,this.baseUri).origin}catch{return""}}isSameOrigin(e){return this.getOrigin(e)===this.origin}getContextOrigin(){return this.origin}},Eh=class e{static instanceCount=1;instanceName="#"+e.instanceCount++;logger;cache;originChecker;config;onError;_windowBounds;constructor(e,t,i){this.config=i,this.logger=new fh({id:this.instanceName,enabled:e.logging}),this.originChecker=new Sh(i.window),this.cache=e.cache??i.cache??new gh(this,e),this.onError=e.onError,this._windowBounds=t}get windowBounds(){return this._windowBounds}get resourceDocument(){return this.config.window.document||(typeof document<"u"?document:void 0)}adjustWindowBounds(e,t){this._windowBounds=this._windowBounds.add(e,t,0,0)}},Mh=e=>{["scale","width","height","imageTimeout","x","y","windowWidth","windowHeight","scrollX","scrollY"].forEach(t=>{let i=e[t];if(null!=i&&"number"!=typeof i){let r=Number(i);Number.isNaN(r)||(e[t]=r)}})},Ah=e=>({allowTaint:e.allowTaint??!1,imageTimeout:e.imageTimeout??15e3,proxy:e.proxy,useCORS:e.useCORS??!1,customIsSameOrigin:e.customIsSameOrigin,maxCacheSize:e.maxCacheSize}),Th=(e,t,i)=>({logging:e.logging??!0,cache:e.cache??t.cache,...i}),Lh=(e,t)=>{let i=t;return{windowWidth:e.windowWidth??i.innerWidth??800,windowHeight:e.windowHeight??i.innerHeight??600,scrollX:e.scrollX??i.pageXOffset??0,scrollY:e.scrollY??i.pageYOffset??0}},Rh=(e,t,i)=>({allowTaint:e.allowTaint??!1,onclone:e.onclone,ignoreElements:e.ignoreElements,iframeContainer:e.iframeContainer,inlineImages:i,copyStyles:i,cspNonce:e.cspNonce??t.cspNonce,signal:e.signal}),Bh=(e,t,i,r,n,s,o)=>({canvas:e.canvas,backgroundColor:t,signal:e.signal,scale:e.scale??o??1,x:(e.x??0)+i,y:(e.y??0)+r,width:e.width??Math.ceil(n),height:e.height??Math.ceil(s),imageSmoothing:e.imageSmoothing,imageSmoothingQuality:e.imageSmoothingQuality}),Ph=(e,t,i)=>{let r=t.ownerDocument,n=r.documentElement?Fn(e,getComputedStyle(r.documentElement).backgroundColor):0,s=r.body?Fn(e,getComputedStyle(r.body).backgroundColor):0,o="string"==typeof i?Fn(e,i):null===i?0:4294967295;return t===r.documentElement?Ki(n)?Ki(s)?o:s:n:o},Ih=(e,t,i,r)=>{if(e)try{e(i,r)}catch(e){t.logger.error(`onProgress callback failed: ${e instanceof Error?e.message:String(e)}`)}},Nh=async(e,t,i)=>{if(Mh(t),!t.skipValidation){let i=t.validator||pt(),r=i.validateElement(e);if(!r.valid)throw new Error(r.error);let n=i.validateOptions(t);if(!n.valid)throw new Error(`Invalid options: ${n.error}`)}if(!e||"object"!=typeof e)throw new Error("Invalid element provided as first argument");let r=e.ownerDocument;if(!r)throw new Error("Element is not attached to a Document");let n=r.defaultView;if(!n)throw new Error("Document is not attached to a Window");let s=Ah(t),o=Th(t,i,s),a=Lh(t,n),l=new Ct(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),d=new Eh(o,l,i),c=t.enablePerformanceMonitoring??t.logging??!1,p=new kt(d,c);p.start("total",{width:a.windowWidth,height:a.windowHeight});let h=t.signal;id(h);let u=t.foreignObjectRendering??!1,f=Rh(t,i,u);d.logger.debug(`Starting document clone with size ${l.width}x${l.height} scrolled to ${-l.left},${-l.top}`),Ih(t.onProgress,d,"clone",10),p.start("clone");let g=new gd(d,e,f),m=g.clonedReferenceElement;if(!m)throw new Error("Unable to find element in cloned iframe");let b=await g.toIFrame(r,l);p.end("clone"),Ih(t.onProgress,d,"clone",30),h?.aborted&&((t.removeContainer??!0)&&gd.destroy(b),id(h));let x,y,{width:v,height:w,left:k,top:C}=Gn(m)||Un(m)?Et(m.ownerDocument):St(d,m),S=Ph(d,m,t.backgroundColor),E=Bh(t,S,k,C,v,w,n.devicePixelRatio??1);try{u?(d.logger.debug("Document cloned, using foreign object rendering"),p.start("render-foreignobject"),x=await new ph(d,E).render(m),p.end("render-foreignobject")):(d.logger.debug(`Document cloned, element located at ${k},${C} with size ${v}x${w} using computed rendering`),d.logger.debug("Starting DOM parsing"),p.start("parse"),id(h),d.cache.startDefer(),y=rc(d,m,{normalizeDom:t.normalizeDom}),p.end("parse"),Ih(t.onProgress,d,"parse",50),p.start("preload"),await d.cache.preloadAll(10,(e,i)=>{Ih(t.onProgress,d,"preload",50+Math.round(e/i*10))},h),p.end("preload"),Ih(t.onProgress,d,"layout",60),S===y.styles.backgroundColor&&(y.styles.backgroundColor=0),d.logger.debug(`Starting renderer for element at ${E.x},${E.y} with size ${E.width}x${E.height}`),p.start("render"),id(h),x=await new lh(d,E).render(y),p.end("render")),Ih(t.onProgress,d,"render",90)}finally{p.start("cleanup");try{y&&y.restoreTree()}finally{(t.removeContainer??!0)&&gd.destroy(b),p.end("cleanup")}}return p.end("total"),d.logger.debug("Finished rendering"),c&&p.logSummary(),Ih(t.onProgress,d,"render",100),x},Dh=(e,t={},i)=>{let r=i||vt.fromElement(e,{cspNonce:t.cspNonce,cache:t.cache});return Nh(e,t,r)}}),Fh=i(()=>{Oh={"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"}}),zh={};r(zh,{de:()=>_h});var _h,Wh=i(()=>{_h={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping-Feedback-Panel","panel.feedbackList":"Feedbackliste","panel.loading":"Feedbacks werden geladen","panel.close":"Panel schlie\xdfen","panel.deleteAll":"Alle l\xf6schen","panel.deleteAllConfirmTitle":"Alle l\xf6schen","panel.deleteAllConfirmMessage":"Alle Feedbacks f\xfcr dieses Projekt l\xf6schen? Diese Aktion kann nicht r\xfcckg\xe4ngig gemacht werden.","panel.search":"Suchen...","panel.searchAria":"Feedbacks suchen","panel.filterAll":"Alle","panel.loadError":"Laden fehlgeschlagen","panel.retry":"Erneut versuchen","panel.empty":"Noch kein Feedback","panel.showMore":"Mehr anzeigen","panel.notOnPage":"Auf dieser Seite nicht sichtbar","panel.showLess":"Weniger anzeigen","panel.resolve":"Erledigen","panel.reopen":"Wieder \xf6ffnen","panel.delete":"L\xf6schen","panel.cancel":"Abbrechen","panel.confirmDelete":"L\xf6schen","panel.loadMore":"Mehr laden ({remaining} verbleibend)","panel.statusAll":"Alle","panel.statusOpen":"Offen","panel.statusResolved":"Erledigt","panel.statusInProgress":"In Arbeit","panel.statusWontFix":"Wird nicht behoben","panel.statusClosed":"Geschlossen","type.label":"Typ","type.question":"Frage","type.change":"\xc4nderung","type.bug":"Fehler","type.other":"Sonstiges","status.label":"Status","scope.label":"Bereich","scope.thisPage":"Diese Seite","scope.thisType":"Dieser Typ","scope.all":"Alle Seiten","panel.filterMine":"Meine","panel.filterMineHint":"Nur das Feedback, das von diesem Browser gesendet wurde","fab.aria":"Siteping \u2014 Feedback-Men\xfc","fab.messages":"Seitenleiste anzeigen","fab.annotate":"Neue Anmerkung erstellen","fab.annotations":"Markierungen ein- oder ausblenden","annotator.instruction":"Zeichne ein Rechteck um den Bereich, den du kommentieren m\xf6chtest \u2014 oder dr\xfccke die Eingabetaste, um das zuletzt fokussierte Element zu kommentieren","annotator.instantInstruction":"Kommentar zur angeklickten Stelle","annotator.touchInstruction":"Tippe auf ein Element oder ziehe, um einen Bereich auszuw\xe4hlen","annotator.cancel":"Abbrechen","popup.ariaLabel":"Feedbackformular","popup.placeholder":"Beschreibe dein Feedback...","popup.textareaAria":"Feedbacknachricht","popup.submitHintMac":"\u2318+Enter zum Senden","popup.submitHintOther":"Strg+Enter zum Senden","popup.cancel":"Abbrechen","popup.submit":"Senden","identity.title":"Identifiziere dich","identity.nameLabel":"Name","identity.namePlaceholder":"Dein Name","identity.emailLabel":"E-Mail","identity.emailPlaceholder":"deine@email.de","identity.cancel":"Abbrechen","identity.submit":"Fortfahren","marker.approximate":"Ungef\xe4hre Position (Konfidenz: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"Angezeigte Feedback-Markierungen: {count}","fab.badge":"Unerledigte Feedbacks: {count}","feedback.sent.confirmation":"Feedback erfolgreich gesendet","feedback.error.message":"Feedback konnte nicht gesendet werden","feedback.queued":"Auf diesem Ger\xe4t gespeichert. Wird beim n\xe4chsten Besuch gesendet.","feedback.deleted.confirmation":"Feedback gel\xf6scht","badge.count":"Unerledigte Feedbacks: {count}","bulk.aria":"Sammelaktionen","bulk.selectAll":"Alle ausw\xe4hlen","bulk.selectFeedback":"Ausw\xe4hlen: {label}","bulk.selected":"{count} ausgew\xe4hlt","bulk.resolve":"Erledigen","bulk.delete":"L\xf6schen","bulk.deselect":"Abw\xe4hlen","sort.newest":"Neueste zuerst","sort.oldest":"\xc4lteste zuerst","sort.byType":"Nach Typ","sort.openFirst":"Offene zuerst","sort.label":"Sortieren","group.byPage":"Nach Seite","group.feedbacks":"Feedbacks: {count}","stats.aria":"Feedbackstatistik","stats.open":"Offen","stats.closed":"Geschlossen","stats.bugs":"Fehler","stats.progress":"{percent}% geschlossen","detail.back":"Zur\xfcck","detail.aria":"Feedbackdetails","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Nachricht","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot des markierten Bereichs","detail.metadata":"Details","detail.annotation":"Anmerkung","detail.page":"Seite","detail.author":"Autor","detail.date":"Erstellt","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Erledigt am","detail.closedAt":"Geschlossen am","detail.goToAnnotation":"Zur Anmerkung","detail.element":"Element","detail.selector":"Selektor","detail.position":"Position","detail.resolve":"Erledigen","detail.reopen":"Wieder \xf6ffnen","detail.delete":"L\xf6schen","detail.diagnostics":"Diagnose","detail.diagnostics.console":"Konsole","detail.diagnostics.network":"Fehlgeschlagenes Netzwerk","detail.diagnostics.expand":"Diagnose anzeigen","detail.diagnostics.collapse":"Diagnose ausblenden","detail.diagnostics.noEntries":"Keine Eintr\xe4ge","comments.title":"Antworten","comments.placeholder":"Dem Team antworten...","comments.error":"Nicht gesendet. Versuch es noch einmal.","comments.full":"Dieser Verlauf ist voll.","comments.team":"Team","shortcuts.title":"Tastenk\xfcrzel","shortcuts.navigate":"Feedbacks navigieren","shortcuts.resolve":"Erledigen / Wieder \xf6ffnen","shortcuts.delete":"L\xf6schen","shortcuts.search":"Suche fokussieren","shortcuts.select":"Auswahl umschalten","shortcuts.help":"K\xfcrzel anzeigen","shortcuts.close":"Schlie\xdfen","shortcuts.hint":"Tastenk\xfcrzel","export.label":"Exportieren","export.csv":"CSV exportieren","export.json":"JSON exportieren"}}),Hh={};r(Hh,{es:()=>Vh});var Vh,jh=i(()=>{Vh={"panel.title":"Comentarios","panel.ariaLabel":"Panel de comentarios de Siteping","panel.feedbackList":"Lista de comentarios","panel.loading":"Cargando comentarios","panel.close":"Cerrar panel","panel.deleteAll":"Eliminar todo","panel.deleteAllConfirmTitle":"Eliminar todo","panel.deleteAllConfirmMessage":"\xbfEliminar todos los comentarios de este proyecto? Esta acci\xf3n no se puede deshacer.","panel.search":"Buscar...","panel.searchAria":"Buscar comentarios","panel.filterAll":"Todos","panel.loadError":"No se pudo cargar","panel.retry":"Reintentar","panel.empty":"A\xfan no hay comentarios","panel.showMore":"Mostrar m\xe1s","panel.notOnPage":"No visible en esta p\xe1gina","panel.showLess":"Mostrar menos","panel.resolve":"Resolver","panel.reopen":"Reabrir","panel.delete":"Eliminar","panel.cancel":"Cancelar","panel.confirmDelete":"Eliminar","panel.loadMore":"Cargar m\xe1s ({remaining} restantes)","panel.statusAll":"Todos","panel.statusOpen":"Abierto","panel.statusResolved":"Resuelto","panel.statusInProgress":"En curso","panel.statusWontFix":"No se corregir\xe1","panel.statusClosed":"Cerrado","type.label":"Tipo","type.question":"Pregunta","type.change":"Cambio","type.bug":"Error","type.other":"Otro","status.label":"Estado","scope.label":"\xc1mbito","scope.thisPage":"Esta p\xe1gina","scope.thisType":"Este tipo","scope.all":"Todas las p\xe1ginas","panel.filterMine":"M\xedos","panel.filterMineHint":"Solo los comentarios enviados desde este navegador","fab.aria":"Siteping \u2014 Men\xfa de comentarios","fab.messages":"Mostrar barra lateral","fab.annotate":"Crear nueva anotaci\xf3n","fab.annotations":"Mostrar u ocultar marcadores","annotator.instruction":"Dibuja un rect\xe1ngulo sobre el \xe1rea que quieres comentar \u2014 o pulsa Intro para comentar el \xfaltimo elemento enfocado","annotator.instantInstruction":"Comentar el punto seleccionado","annotator.touchInstruction":"Toca un elemento o arrastra para seleccionar un \xe1rea","annotator.cancel":"Cancelar","popup.ariaLabel":"Formulario de comentarios","popup.placeholder":"Describe tu comentario...","popup.textareaAria":"Mensaje de comentario","popup.submitHintMac":"\u2318+Enter para enviar","popup.submitHintOther":"Ctrl+Enter para enviar","popup.cancel":"Cancelar","popup.submit":"Enviar","identity.title":"Identif\xedcate","identity.nameLabel":"Nombre","identity.namePlaceholder":"Tu nombre","identity.emailLabel":"Correo electr\xf3nico","identity.emailPlaceholder":"tu@email.com","identity.cancel":"Cancelar","identity.submit":"Continuar","marker.approximate":"Posici\xf3n aproximada (confianza: {confidence}%)","marker.aria":"Comentario #{number}: {type}, {status} \u2014 {message}","marker.count":"Marcadores de feedback mostrados: {count}","fab.badge":"Comentarios sin resolver: {count}","feedback.sent.confirmation":"Comentario enviado correctamente","feedback.error.message":"No se pudo enviar el comentario","feedback.queued":"Guardado en este dispositivo. Se enviar\xe1 en tu pr\xf3xima visita.","feedback.deleted.confirmation":"Comentario eliminado","badge.count":"Comentarios sin resolver: {count}","bulk.aria":"Acciones en lote","bulk.selectAll":"Seleccionar todo","bulk.selectFeedback":"Seleccionar {label}","bulk.selected":"{count} seleccionados","bulk.resolve":"Resolver","bulk.delete":"Eliminar","bulk.deselect":"Deseleccionar","sort.newest":"M\xe1s recientes","sort.oldest":"M\xe1s antiguos","sort.byType":"Por tipo","sort.openFirst":"Abiertos primero","sort.label":"Ordenar","group.byPage":"Por p\xe1gina","group.feedbacks":"Comentarios: {count}","stats.aria":"Estad\xedsticas de comentarios","stats.open":"Abiertos","stats.closed":"Cerrados","stats.bugs":"Errores","stats.progress":"{percent}% cerrados","detail.back":"Atr\xe1s","detail.aria":"Detalle del comentario","detail.title":"Comentario #{number}","detail.status":"Estado","detail.message":"Mensaje","detail.screenshot":"Captura","detail.screenshotAlt":"Captura del \xe1rea anotada","detail.metadata":"Detalles","detail.annotation":"Anotaci\xf3n","detail.page":"P\xe1gina","detail.author":"Autor","detail.date":"Creado","detail.viewport":"Viewport","detail.browser":"Navegador","detail.resolvedAt":"Resuelto el","detail.closedAt":"Cerrado el","detail.goToAnnotation":"Ir a la anotaci\xf3n","detail.element":"Elemento","detail.selector":"Selector","detail.position":"Posici\xf3n","detail.resolve":"Resolver","detail.reopen":"Reabrir","detail.delete":"Eliminar","detail.diagnostics":"Diagn\xf3stico","detail.diagnostics.console":"Consola","detail.diagnostics.network":"Red fallida","detail.diagnostics.expand":"Mostrar diagn\xf3stico","detail.diagnostics.collapse":"Ocultar diagn\xf3stico","detail.diagnostics.noEntries":"Sin entradas","comments.title":"Respuestas","comments.placeholder":"Responder al equipo...","comments.error":"No se envi\xf3. Int\xe9ntalo de nuevo.","comments.full":"Este hilo est\xe1 completo.","comments.team":"Equipo","shortcuts.title":"Atajos de teclado","shortcuts.navigate":"Navegar comentarios","shortcuts.resolve":"Resolver / Reabrir","shortcuts.delete":"Eliminar","shortcuts.search":"Buscar","shortcuts.select":"Alternar selecci\xf3n","shortcuts.help":"Mostrar atajos","shortcuts.close":"Cerrar","shortcuts.hint":"Atajos de teclado","export.label":"Exportar","export.csv":"Exportar CSV","export.json":"Exportar JSON"}}),Uh={};r(Uh,{fr:()=>qh});var qh,Gh=i(()=>{qh={"panel.title":"Feedbacks","panel.ariaLabel":"Panneau de feedback Siteping","panel.feedbackList":"Liste des feedbacks","panel.loading":"Chargement des feedbacks","panel.close":"Fermer le panneau","panel.deleteAll":"Tout supprimer","panel.deleteAllConfirmTitle":"Tout supprimer","panel.deleteAllConfirmMessage":"Supprimer tous les feedbacks de ce projet ? Cette action est irr\xe9versible.","panel.search":"Rechercher...","panel.searchAria":"Rechercher dans les feedbacks","panel.filterAll":"Tous","panel.loadError":"Erreur de chargement","panel.retry":"R\xe9essayer","panel.empty":"Aucun feedback pour le moment","panel.showMore":"Voir plus","panel.notOnPage":"Pas visible sur cette page","panel.showLess":"Voir moins","panel.resolve":"R\xe9soudre","panel.reopen":"Rouvrir","panel.delete":"Supprimer","panel.cancel":"Annuler","panel.confirmDelete":"Supprimer","panel.loadMore":"Voir plus ({remaining} restants)","panel.statusAll":"Tous","panel.statusOpen":"Ouvert","panel.statusResolved":"R\xe9solu","panel.statusInProgress":"En cours","panel.statusWontFix":"Sans suite","panel.statusClosed":"Cl\xf4tur\xe9","type.label":"Type","type.question":"Question","type.change":"Changement","type.bug":"Bug","type.other":"Autre","status.label":"Statut","scope.label":"Port\xe9e","scope.thisPage":"Cette page","scope.thisType":"Ce type","scope.all":"Toutes les pages","panel.filterMine":"Mes feedbacks","panel.filterMineHint":"Uniquement les feedbacks envoy\xe9s depuis ce navigateur","fab.aria":"Siteping \u2014 Menu feedback","fab.messages":"Afficher la barre lat\xe9rale","fab.annotate":"Cr\xe9er une nouvelle annotation","fab.annotations":"Afficher ou masquer les marqueurs","annotator.instruction":"Tracez un rectangle sur la zone \xe0 commenter \u2014 ou appuyez sur Entr\xe9e pour commenter le dernier \xe9l\xe9ment actif","annotator.instantInstruction":"Commenter l'endroit cliqu\xe9","annotator.touchInstruction":"Touchez un \xe9l\xe9ment ou faites glisser pour s\xe9lectionner une zone","annotator.cancel":"Annuler","popup.ariaLabel":"Formulaire de feedback","popup.placeholder":"D\xe9crivez votre retour...","popup.textareaAria":"Message de feedback","popup.submitHintMac":"\u2318+Entr\xe9e pour envoyer","popup.submitHintOther":"Ctrl+Entr\xe9e pour envoyer","popup.cancel":"Annuler","popup.submit":"Envoyer","identity.title":"Identifiez-vous","identity.nameLabel":"Nom","identity.namePlaceholder":"Votre nom","identity.emailLabel":"Email","identity.emailPlaceholder":"votre@email.com","identity.cancel":"Annuler","identity.submit":"Continuer","marker.approximate":"Position approximative (confiance : {confidence}%)","marker.aria":"Feedback n\xb0{number} : {type}, {status} \u2014 {message}","marker.count":"Marqueurs de feedback affich\xe9s : {count}","fab.badge":"Feedbacks non r\xe9solus : {count}","feedback.sent.confirmation":"Feedback envoy\xe9 avec succ\xe8s","feedback.error.message":"\xc9chec de l'envoi du feedback","feedback.queued":"Enregistr\xe9 sur cet appareil. Il sera envoy\xe9 \xe0 votre prochaine visite.","feedback.deleted.confirmation":"Feedback supprim\xe9","badge.count":"Feedbacks non r\xe9solus : {count}","bulk.aria":"Actions group\xe9es","bulk.selectAll":"Tout s\xe9lectionner","bulk.selectFeedback":"S\xe9lectionner {label}","bulk.selected":"{count} s\xe9lectionn\xe9(s)","bulk.resolve":"R\xe9soudre","bulk.delete":"Supprimer","bulk.deselect":"D\xe9s\xe9lectionner","sort.newest":"Plus r\xe9cents","sort.oldest":"Plus anciens","sort.byType":"Par type","sort.openFirst":"Ouverts d'abord","sort.label":"Trier","group.byPage":"Par page","group.feedbacks":"Feedbacks : {count}","stats.aria":"Statistiques des feedbacks","stats.open":"Ouverts","stats.closed":"Cl\xf4tur\xe9s","stats.bugs":"Bugs","stats.progress":"{percent}% cl\xf4tur\xe9s","detail.back":"Retour","detail.aria":"D\xe9tail du feedback","detail.title":"Feedback n\xb0{number}","detail.status":"Statut","detail.message":"Message","detail.screenshot":"Capture d'\xe9cran","detail.screenshotAlt":"Capture d'\xe9cran de la zone annot\xe9e","detail.metadata":"D\xe9tails","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Auteur","detail.date":"Cr\xe9\xe9 le","detail.viewport":"Viewport","detail.browser":"Navigateur","detail.resolvedAt":"R\xe9solu le","detail.closedAt":"Cl\xf4tur\xe9 le","detail.goToAnnotation":"Aller \xe0 l'annotation","detail.element":"\xc9l\xe9ment","detail.selector":"S\xe9lecteur","detail.position":"Position","detail.resolve":"R\xe9soudre","detail.reopen":"Rouvrir","detail.delete":"Supprimer","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"R\xe9seau en \xe9chec","detail.diagnostics.expand":"Afficher les diagnostics","detail.diagnostics.collapse":"Masquer les diagnostics","detail.diagnostics.noEntries":"Aucune entr\xe9e","comments.title":"R\xe9ponses","comments.placeholder":"R\xe9pondre \xe0 l'\xe9quipe...","comments.error":"Non envoy\xe9. R\xe9essayez.","comments.full":"Ce fil est complet.","comments.team":"\xc9quipe","shortcuts.title":"Raccourcis clavier","shortcuts.navigate":"Naviguer les feedbacks","shortcuts.resolve":"R\xe9soudre / Rouvrir","shortcuts.delete":"Supprimer","shortcuts.search":"Rechercher","shortcuts.select":"S\xe9lectionner","shortcuts.help":"Raccourcis","shortcuts.close":"Fermer","shortcuts.hint":"Raccourcis clavier","export.label":"Exporter","export.csv":"Exporter CSV","export.json":"Exporter JSON"}}),Yh={};r(Yh,{it:()=>Kh});var Kh,Xh=i(()=>{Kh={"panel.title":"Feedback","panel.ariaLabel":"Pannello feedback di Siteping","panel.feedbackList":"Elenco feedback","panel.loading":"Caricamento feedback","panel.close":"Chiudi pannello","panel.deleteAll":"Elimina tutto","panel.deleteAllConfirmTitle":"Elimina tutto","panel.deleteAllConfirmMessage":"Eliminare tutti i feedback per questo progetto? Questa azione non pu\xf2 essere annullata.","panel.search":"Cerca...","panel.searchAria":"Cerca feedback","panel.filterAll":"Tutti","panel.loadError":"Caricamento non riuscito","panel.retry":"Riprova","panel.empty":"Nessun feedback ancora","panel.showMore":"Mostra di pi\xf9","panel.notOnPage":"Non visibile in questa pagina","panel.showLess":"Mostra meno","panel.resolve":"Risolvi","panel.reopen":"Riapri","panel.delete":"Elimina","panel.cancel":"Annulla","panel.confirmDelete":"Elimina","panel.loadMore":"Carica altro ({remaining} rimanenti)","panel.statusAll":"Tutti","panel.statusOpen":"Aperto","panel.statusResolved":"Risolto","panel.statusInProgress":"In corso","panel.statusWontFix":"Non verr\xe0 corretto","panel.statusClosed":"Chiuso","type.label":"Tipo","type.question":"Domanda","type.change":"Modifica","type.bug":"Bug","type.other":"Altro","status.label":"Stato","scope.label":"Ambito","scope.thisPage":"Questa pagina","scope.thisType":"Questo tipo","scope.all":"Tutte le pagine","panel.filterMine":"Miei","panel.filterMineHint":"Solo i feedback inviati da questo browser","fab.aria":"Siteping \u2014 Menu feedback","fab.messages":"Mostra barra laterale","fab.annotate":"Crea nuova annotazione","fab.annotations":"Mostra o nascondi i marcatori","annotator.instruction":"Disegna un rettangolo sull'area da commentare \u2014 oppure premi Invio per commentare l'ultimo elemento attivo","annotator.instantInstruction":"Commenta il punto selezionato","annotator.touchInstruction":"Tocca un elemento o trascina per selezionare un'area","annotator.cancel":"Annulla","popup.ariaLabel":"Modulo feedback","popup.placeholder":"Descrivi il tuo feedback...","popup.textareaAria":"Messaggio di feedback","popup.submitHintMac":"\u2318+Invio per inviare","popup.submitHintOther":"Ctrl+Invio per inviare","popup.cancel":"Annulla","popup.submit":"Invia","identity.title":"Identificati","identity.nameLabel":"Nome","identity.namePlaceholder":"Il tuo nome","identity.emailLabel":"Email","identity.emailPlaceholder":"tua@email.com","identity.cancel":"Annulla","identity.submit":"Continua","marker.approximate":"Posizione approssimativa (confidenza: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"Marcatori di feedback visualizzati: {count}","fab.badge":"Feedback non risolti: {count}","feedback.sent.confirmation":"Feedback inviato con successo","feedback.error.message":"Invio del feedback non riuscito","feedback.queued":"Salvato su questo dispositivo. Verr\xe0 inviato alla prossima visita.","feedback.deleted.confirmation":"Feedback eliminato","badge.count":"Feedback non risolti: {count}","bulk.aria":"Azioni di gruppo","bulk.selectAll":"Seleziona tutto","bulk.selectFeedback":"Seleziona {label}","bulk.selected":"{count} selezionati","bulk.resolve":"Risolvi","bulk.delete":"Elimina","bulk.deselect":"Deseleziona","sort.newest":"Pi\xf9 recenti","sort.oldest":"Pi\xf9 vecchi","sort.byType":"Per tipo","sort.openFirst":"Aperti prima","sort.label":"Ordina","group.byPage":"Per pagina","group.feedbacks":"Feedback: {count}","stats.aria":"Statistiche dei feedback","stats.open":"Aperti","stats.closed":"Chiusi","stats.bugs":"Bug","stats.progress":"{percent}% chiusi","detail.back":"Indietro","detail.aria":"Dettaglio del feedback","detail.title":"Feedback #{number}","detail.status":"Stato","detail.message":"Messaggio","detail.screenshot":"Schermata","detail.screenshotAlt":"Schermata dell'area annotata","detail.metadata":"Dettagli","detail.annotation":"Annotazione","detail.page":"Pagina","detail.author":"Autore","detail.date":"Creato","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Risolto il","detail.closedAt":"Chiuso il","detail.goToAnnotation":"Vai all'annotazione","detail.element":"Elemento","detail.selector":"Selettore","detail.position":"Posizione","detail.resolve":"Risolvi","detail.reopen":"Riapri","detail.delete":"Elimina","detail.diagnostics":"Diagnostica","detail.diagnostics.console":"Console","detail.diagnostics.network":"Rete fallita","detail.diagnostics.expand":"Mostra diagnostica","detail.diagnostics.collapse":"Nascondi diagnostica","detail.diagnostics.noEntries":"Nessuna voce","comments.title":"Risposte","comments.placeholder":"Rispondi al team...","comments.error":"Non inviata. Riprova.","comments.full":"Questa discussione \xe8 piena.","comments.team":"Team","shortcuts.title":"Scorciatoie da tastiera","shortcuts.navigate":"Naviga i feedback","shortcuts.resolve":"Risolvi / Riapri","shortcuts.delete":"Elimina","shortcuts.search":"Cerca","shortcuts.select":"Attiva selezione","shortcuts.help":"Mostra scorciatoie","shortcuts.close":"Chiudi","shortcuts.hint":"Scorciatoie da tastiera","export.label":"Esporta","export.csv":"Esporta CSV","export.json":"Esporta JSON"}}),Jh={};r(Jh,{ja:()=>Qh});var Qh,Zh=i(()=>{Qh={"panel.title":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af","panel.ariaLabel":"Siteping \u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30d1\u30cd\u30eb","panel.feedbackList":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u4e00\u89a7","panel.loading":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u8aad\u307f\u8fbc\u307f\u4e2d","panel.close":"\u30d1\u30cd\u30eb\u3092\u9589\u3058\u308b","panel.deleteAll":"\u5168\u524a\u9664","panel.deleteAllConfirmTitle":"\u3059\u3079\u3066\u524a\u9664","panel.deleteAllConfirmMessage":"\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u3059\u3079\u3066\u524a\u9664\u3057\u307e\u3059\u304b\uff1f\u3053\u306e\u64cd\u4f5c\u306f\u53d6\u308a\u6d88\u305b\u307e\u305b\u3093\u3002","panel.search":"\u691c\u7d22...","panel.searchAria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u691c\u7d22","panel.filterAll":"\u3059\u3079\u3066","panel.loadError":"\u8aad\u307f\u8fbc\u307f\u306b\u5931\u6557\u3057\u307e\u3057\u305f","panel.retry":"\u518d\u8a66\u884c","panel.empty":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306f\u307e\u3060\u3042\u308a\u307e\u305b\u3093","panel.showMore":"\u3082\u3063\u3068\u898b\u308b","panel.notOnPage":"\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u305b\u3093","panel.showLess":"\u6298\u308a\u305f\u305f\u3080","panel.resolve":"\u89e3\u6c7a","panel.reopen":"\u518d\u30aa\u30fc\u30d7\u30f3","panel.delete":"\u524a\u9664","panel.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","panel.confirmDelete":"\u524a\u9664","panel.loadMore":"\u3055\u3089\u306b\u8aad\u307f\u8fbc\u3080\uff08\u6b8b\u308a {remaining} \u4ef6\uff09","panel.statusAll":"\u3059\u3079\u3066","panel.statusOpen":"\u672a\u5bfe\u5fdc","panel.statusResolved":"\u89e3\u6c7a\u6e08\u307f","panel.statusInProgress":"\u5bfe\u5fdc\u4e2d","panel.statusWontFix":"\u5bfe\u5fdc\u3057\u306a\u3044","panel.statusClosed":"\u30af\u30ed\u30fc\u30ba\u6e08\u307f","type.label":"\u7a2e\u985e","type.question":"\u8cea\u554f","type.change":"\u5909\u66f4\u4f9d\u983c","type.bug":"\u4e0d\u5177\u5408","type.other":"\u305d\u306e\u4ed6","status.label":"\u30b9\u30c6\u30fc\u30bf\u30b9","scope.label":"\u7bc4\u56f2","scope.thisPage":"\u3053\u306e\u30da\u30fc\u30b8","scope.thisType":"\u3053\u306e\u30da\u30fc\u30b8\u7a2e\u5225","scope.all":"\u3059\u3079\u3066\u306e\u30da\u30fc\u30b8","panel.filterMine":"\u81ea\u5206\u306e\u6295\u7a3f","panel.filterMineHint":"\u3053\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u9001\u4fe1\u3057\u305f\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u307f","fab.aria":"Siteping \u2014 \u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30e1\u30cb\u30e5\u30fc","fab.messages":"\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a","fab.annotate":"\u65b0\u3057\u3044\u6ce8\u91c8\u3092\u4f5c\u6210","fab.annotations":"\u30de\u30fc\u30ab\u30fc\u306e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048","annotator.instruction":"\u30b3\u30e1\u30f3\u30c8\u3057\u305f\u3044\u7bc4\u56f2\u3092\u56db\u89d2\u3067\u56f2\u3093\u3067\u304f\u3060\u3055\u3044 \u2014 \u307e\u305f\u306f Enter \u30ad\u30fc\u3067\u6700\u5f8c\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u305f\u8981\u7d20\u306b\u30b3\u30e1\u30f3\u30c8\u3067\u304d\u307e\u3059","annotator.instantInstruction":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u7b87\u6240\u306b\u30b3\u30e1\u30f3\u30c8","annotator.touchInstruction":"\u8981\u7d20\u3092\u30bf\u30c3\u30d7\u3059\u308b\u304b\u3001\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u7bc4\u56f2\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","annotator.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","popup.ariaLabel":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30d5\u30a9\u30fc\u30e0","popup.placeholder":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044...","popup.textareaAria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u672c\u6587","popup.submitHintMac":"\u2318+Enter \u3067\u9001\u4fe1","popup.submitHintOther":"Ctrl+Enter \u3067\u9001\u4fe1","popup.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","popup.submit":"\u9001\u4fe1","identity.title":"\u304a\u540d\u524d\u3068\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b","identity.nameLabel":"\u540d\u524d","identity.namePlaceholder":"\u304a\u540d\u524d","identity.emailLabel":"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9","identity.emailPlaceholder":"your@email.com","identity.cancel":"\u30ad\u30e3\u30f3\u30bb\u30eb","identity.submit":"\u7d9a\u3051\u308b","marker.approximate":"\u304a\u304a\u3088\u305d\u306e\u4f4d\u7f6e\uff08\u78ba\u5ea6: {confidence}%\uff09","marker.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af #{number}: {type}\u3001{status} \u2014 {message}","marker.count":"{count} \u4ef6\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30de\u30fc\u30ab\u30fc\u3092\u8868\u793a\u4e2d","fab.badge":"\u672a\u89e3\u6c7a\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","feedback.sent.confirmation":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f","feedback.error.message":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u9001\u4fe1\u306b\u5931\u6557\u3057\u307e\u3057\u305f","feedback.queued":"\u3053\u306e\u7aef\u672b\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002\u6b21\u56de\u306e\u30a2\u30af\u30bb\u30b9\u6642\u306b\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002","feedback.deleted.confirmation":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u524a\u9664\u3057\u307e\u3057\u305f","badge.count":"\u672a\u89e3\u6c7a\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","bulk.aria":"\u4e00\u62ec\u64cd\u4f5c","bulk.selectAll":"\u3059\u3079\u3066\u9078\u629e","bulk.selectFeedback":"{label}\u3092\u9078\u629e","bulk.selected":"{count} \u4ef6\u9078\u629e\u4e2d","bulk.resolve":"\u89e3\u6c7a","bulk.delete":"\u524a\u9664","bulk.deselect":"\u9078\u629e\u3092\u89e3\u9664","sort.newest":"\u65b0\u3057\u3044\u9806","sort.oldest":"\u53e4\u3044\u9806","sort.byType":"\u7a2e\u985e\u5225","sort.openFirst":"\u672a\u5bfe\u5fdc\u3092\u5148\u982d\u306b","sort.label":"\u4e26\u3073\u66ff\u3048","group.byPage":"\u30da\u30fc\u30b8\u5225","group.feedbacks":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af {count} \u4ef6","stats.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u7d71\u8a08","stats.open":"\u672a\u5bfe\u5fdc","stats.closed":"\u30af\u30ed\u30fc\u30ba\u6e08\u307f","stats.bugs":"\u4e0d\u5177\u5408","stats.progress":"{percent}% \u30af\u30ed\u30fc\u30ba\u6e08\u307f","detail.back":"\u623b\u308b","detail.aria":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u8a73\u7d30","detail.title":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af #{number}","detail.status":"\u30b9\u30c6\u30fc\u30bf\u30b9","detail.message":"\u30e1\u30c3\u30bb\u30fc\u30b8","detail.screenshot":"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8","detail.screenshotAlt":"\u6ce8\u91c8\u304c\u4ed8\u3044\u305f\u7bc4\u56f2\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8","detail.metadata":"\u8a73\u7d30","detail.annotation":"\u6ce8\u91c8","detail.page":"\u30da\u30fc\u30b8","detail.author":"\u6295\u7a3f\u8005","detail.date":"\u4f5c\u6210\u65e5\u6642","detail.viewport":"\u30d3\u30e5\u30fc\u30dd\u30fc\u30c8","detail.browser":"\u30d6\u30e9\u30a6\u30b6","detail.resolvedAt":"\u89e3\u6c7a\u65e5\u6642","detail.closedAt":"\u30af\u30ed\u30fc\u30ba\u65e5\u6642","detail.goToAnnotation":"\u6ce8\u91c8\u3078\u79fb\u52d5","detail.element":"\u8981\u7d20","detail.selector":"\u30bb\u30ec\u30af\u30bf\u30fc","detail.position":"\u4f4d\u7f6e","detail.resolve":"\u89e3\u6c7a","detail.reopen":"\u518d\u30aa\u30fc\u30d7\u30f3","detail.delete":"\u524a\u9664","detail.diagnostics":"\u8a3a\u65ad\u60c5\u5831","detail.diagnostics.console":"\u30b3\u30f3\u30bd\u30fc\u30eb","detail.diagnostics.network":"\u5931\u6557\u3057\u305f\u901a\u4fe1","detail.diagnostics.expand":"\u8a3a\u65ad\u60c5\u5831\u3092\u8868\u793a","detail.diagnostics.collapse":"\u8a3a\u65ad\u60c5\u5831\u3092\u96a0\u3059","detail.diagnostics.noEntries":"\u9805\u76ee\u306f\u3042\u308a\u307e\u305b\u3093","comments.title":"\u8fd4\u4fe1","comments.placeholder":"\u30c1\u30fc\u30e0\u306b\u8fd4\u4fe1...","comments.error":"\u9001\u4fe1\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3082\u3046\u4e00\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002","comments.full":"\u3053\u306e\u30b9\u30ec\u30c3\u30c9\u306f\u4e0a\u9650\u306b\u9054\u3057\u307e\u3057\u305f\u3002","comments.team":"\u30c1\u30fc\u30e0","shortcuts.title":"\u30ad\u30fc\u30dc\u30fc\u30c9\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8","shortcuts.navigate":"\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u79fb\u52d5","shortcuts.resolve":"\u89e3\u6c7a / \u518d\u30aa\u30fc\u30d7\u30f3","shortcuts.delete":"\u524a\u9664","shortcuts.search":"\u691c\u7d22\u306b\u30d5\u30a9\u30fc\u30ab\u30b9","shortcuts.select":"\u9078\u629e\u3092\u5207\u308a\u66ff\u3048","shortcuts.help":"\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u8868\u793a","shortcuts.close":"\u9589\u3058\u308b","shortcuts.hint":"\u30ad\u30fc\u30dc\u30fc\u30c9\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8","export.label":"\u51fa\u529b","export.csv":"CSV \u3067\u51fa\u529b","export.json":"JSON \u3067\u51fa\u529b"}}),eu={};r(eu,{ko:()=>tu});var tu,iu=i(()=>{tu={"panel.title":"\ud53c\ub4dc\ubc31","panel.ariaLabel":"Siteping \ud53c\ub4dc\ubc31 \ud328\ub110","panel.feedbackList":"\ud53c\ub4dc\ubc31 \ubaa9\ub85d","panel.loading":"\ud53c\ub4dc\ubc31\uc744 \ubd88\ub7ec\uc624\ub294 \uc911","panel.close":"\ud328\ub110 \ub2eb\uae30","panel.deleteAll":"\ubaa8\ub450 \uc0ad\uc81c","panel.deleteAllConfirmTitle":"\ubaa8\ub450 \uc0ad\uc81c","panel.deleteAllConfirmMessage":"\uc774 \ud504\ub85c\uc81d\ud2b8\uc758 \ud53c\ub4dc\ubc31\uc744 \ubaa8\ub450 \uc0ad\uc81c\ud560\uae4c\uc694? \uc774 \uc791\uc5c5\uc740 \ub418\ub3cc\ub9b4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.","panel.search":"\uac80\uc0c9...","panel.searchAria":"\ud53c\ub4dc\ubc31 \uac80\uc0c9","panel.filterAll":"\uc804\uccb4","panel.loadError":"\ubd88\ub7ec\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4","panel.retry":"\ub2e4\uc2dc \uc2dc\ub3c4","panel.empty":"\uc544\uc9c1 \ud53c\ub4dc\ubc31\uc774 \uc5c6\uc2b5\ub2c8\ub2e4","panel.showMore":"\ub354 \ubcf4\uae30","panel.notOnPage":"\uc774 \ud398\uc774\uc9c0\uc5d0\uc11c \ubcf4\uc774\uc9c0 \uc54a\uc74c","panel.showLess":"\uc811\uae30","panel.resolve":"\ud574\uacb0","panel.reopen":"\ub2e4\uc2dc \uc5f4\uae30","panel.delete":"\uc0ad\uc81c","panel.cancel":"\ucde8\uc18c","panel.confirmDelete":"\uc0ad\uc81c","panel.loadMore":"\ub354 \ubd88\ub7ec\uc624\uae30 ({remaining}\uac74 \ub0a8\uc74c)","panel.statusAll":"\uc804\uccb4","panel.statusOpen":"\uc5f4\ub9bc","panel.statusResolved":"\ud574\uacb0\ub428","panel.statusInProgress":"\uc9c4\ud589 \uc911","panel.statusWontFix":"\ucc98\ub9ac \uc548 \ud568","panel.statusClosed":"\uc885\ub8cc\ub428","type.label":"\uc720\ud615","type.question":"\uc9c8\ubb38","type.change":"\uc218\uc815 \uc694\uccad","type.bug":"\ubc84\uadf8","type.other":"\uae30\ud0c0","status.label":"\uc0c1\ud0dc","scope.label":"\ubc94\uc704","scope.thisPage":"\uc774 \ud398\uc774\uc9c0","scope.thisType":"\uac19\uc740 \uc720\ud615\uc758 \ud398\uc774\uc9c0","scope.all":"\ubaa8\ub4e0 \ud398\uc774\uc9c0","panel.filterMine":"\ub0b4 \ud53c\ub4dc\ubc31","panel.filterMineHint":"\uc774 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \ubcf4\ub0b8 \ud53c\ub4dc\ubc31\ub9cc \ubd05\ub2c8\ub2e4","fab.aria":"Siteping \u2014 \ud53c\ub4dc\ubc31 \uba54\ub274","fab.messages":"\uc0ac\uc774\ub4dc\ubc14 \ubcf4\uae30","fab.annotate":"\uc0c8 \uc8fc\uc11d \ub9cc\ub4e4\uae30","fab.annotations":"\ub9c8\ucee4 \ubcf4\uc774\uae30 \ub610\ub294 \uc228\uae30\uae30","annotator.instruction":"\ub313\uae00\uc744 \ub0a8\uae38 \uc601\uc5ed\uc5d0 \uc0ac\uac01\ud615\uc744 \uadf8\ub9ac\uc138\uc694. Enter \ud0a4\ub97c \ub204\ub974\uba74 \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud3ec\ucee4\uc2a4\ud55c \uc694\uc18c\uc5d0 \ub313\uae00\uc744 \ub0a8\uae41\ub2c8\ub2e4","annotator.instantInstruction":"\ud074\ub9ad\ud55c \uc704\uce58\uc5d0 \ub313\uae00\uc744 \ub0a8\uae41\ub2c8\ub2e4","annotator.touchInstruction":"\uc694\uc18c\ub97c \ud0ed\ud558\uac70\ub098 \ub4dc\ub798\uadf8\ud574\uc11c \uc601\uc5ed\uc744 \uc120\ud0dd\ud558\uc138\uc694","annotator.cancel":"\ucde8\uc18c","popup.ariaLabel":"\ud53c\ub4dc\ubc31 \uc791\uc131","popup.placeholder":"\ud53c\ub4dc\ubc31 \ub0b4\uc6a9\uc744 \uc785\ub825\ud558\uc138\uc694...","popup.textareaAria":"\ud53c\ub4dc\ubc31 \ub0b4\uc6a9","popup.submitHintMac":"\u2318+Enter\ub85c \ubcf4\ub0b4\uae30","popup.submitHintOther":"Ctrl+Enter\ub85c \ubcf4\ub0b4\uae30","popup.cancel":"\ucde8\uc18c","popup.submit":"\ubcf4\ub0b4\uae30","identity.title":"\uc791\uc131\uc790 \uc815\ubcf4","identity.nameLabel":"\uc774\ub984","identity.namePlaceholder":"\uc774\ub984","identity.emailLabel":"\uc774\uba54\uc77c","identity.emailPlaceholder":"you@example.com","identity.cancel":"\ucde8\uc18c","identity.submit":"\uacc4\uc18d","marker.approximate":"\ub300\ub7b5\uc801\uc778 \uc704\uce58 (\uc2e0\ub8b0\ub3c4: {confidence}%)","marker.aria":"\ud53c\ub4dc\ubc31 #{number}: {type}, {status} \u2014 {message}","marker.count":"\ud53c\ub4dc\ubc31 \ub9c8\ucee4 {count}\uac1c \ud45c\uc2dc \uc911","fab.badge":"\ud574\uacb0\ub418\uc9c0 \uc54a\uc740 \ud53c\ub4dc\ubc31 {count}\uac74","feedback.sent.confirmation":"\ud53c\ub4dc\ubc31\uc744 \ubcf4\ub0c8\uc2b5\ub2c8\ub2e4","feedback.error.message":"\ud53c\ub4dc\ubc31\uc744 \ubcf4\ub0b4\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4","feedback.queued":"\uc774 \uae30\uae30\uc5d0 \uc800\uc7a5\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ubc29\ubb38 \uc2dc \uc804\uc1a1\ub429\ub2c8\ub2e4.","feedback.deleted.confirmation":"\ud53c\ub4dc\ubc31\uc744 \uc0ad\uc81c\ud588\uc2b5\ub2c8\ub2e4","badge.count":"\ud574\uacb0\ub418\uc9c0 \uc54a\uc740 \ud53c\ub4dc\ubc31 {count}\uac74","bulk.aria":"\uc77c\uad04 \uc791\uc5c5","bulk.selectAll":"\ubaa8\ub450 \uc120\ud0dd","bulk.selectFeedback":"{label} \uc120\ud0dd","bulk.selected":"{count}\uac74 \uc120\ud0dd\ub428","bulk.resolve":"\ud574\uacb0","bulk.delete":"\uc0ad\uc81c","bulk.deselect":"\uc120\ud0dd \ud574\uc81c","sort.newest":"\ucd5c\uc2e0\uc21c","sort.oldest":"\uc624\ub798\ub41c\uc21c","sort.byType":"\uc720\ud615\ubcc4","sort.openFirst":"\uc5f4\ub9b0 \ud56d\ubaa9 \uba3c\uc800","sort.label":"\uc815\ub82c","group.byPage":"\ud398\uc774\uc9c0\ubcc4","group.feedbacks":"\ud53c\ub4dc\ubc31 {count}\uac74","stats.aria":"\ud53c\ub4dc\ubc31 \ud1b5\uacc4","stats.open":"\uc5f4\ub9bc","stats.closed":"\uc885\ub8cc\ub428","stats.bugs":"\ubc84\uadf8","stats.progress":"{percent}% \uc885\ub8cc","detail.back":"\ub4a4\ub85c","detail.aria":"\ud53c\ub4dc\ubc31 \uc0c1\uc138","detail.title":"\ud53c\ub4dc\ubc31 #{number}","detail.status":"\uc0c1\ud0dc","detail.message":"\ub0b4\uc6a9","detail.screenshot":"\uc2a4\ud06c\ub9b0\uc0f7","detail.screenshotAlt":"\uc8fc\uc11d\uc744 \ub2e8 \uc601\uc5ed\uc758 \uc2a4\ud06c\ub9b0\uc0f7","detail.metadata":"\uc0c1\uc138 \uc815\ubcf4","detail.annotation":"\uc8fc\uc11d","detail.page":"\ud398\uc774\uc9c0","detail.author":"\uc791\uc131\uc790","detail.date":"\uc791\uc131\uc77c","detail.viewport":"\ubdf0\ud3ec\ud2b8","detail.browser":"\ube0c\ub77c\uc6b0\uc800","detail.resolvedAt":"\ud574\uacb0\uc77c","detail.closedAt":"\uc885\ub8cc\uc77c","detail.goToAnnotation":"\uc8fc\uc11d \uc704\uce58\ub85c \uc774\ub3d9","detail.element":"\uc694\uc18c","detail.selector":"\uc120\ud0dd\uc790","detail.position":"\uc704\uce58","detail.resolve":"\ud574\uacb0","detail.reopen":"\ub2e4\uc2dc \uc5f4\uae30","detail.delete":"\uc0ad\uc81c","detail.diagnostics":"\uc9c4\ub2e8 \uc815\ubcf4","detail.diagnostics.console":"\ucf58\uc194","detail.diagnostics.network":"\uc2e4\ud328\ud55c \ub124\ud2b8\uc6cc\ud06c \uc694\uccad","detail.diagnostics.expand":"\uc9c4\ub2e8 \uc815\ubcf4 \ubcf4\uae30","detail.diagnostics.collapse":"\uc9c4\ub2e8 \uc815\ubcf4 \uc228\uae30\uae30","detail.diagnostics.noEntries":"\uae30\ub85d\uc774 \uc5c6\uc2b5\ub2c8\ub2e4","comments.title":"\ub2f5\uae00","comments.placeholder":"\ud300\uc5d0 \ub2f5\uae00 \ub0a8\uae30\uae30...","comments.error":"\ubcf4\ub0b4\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\uc2dc \uc2dc\ub3c4\ud558\uc138\uc694.","comments.full":"\uc774 \uc2a4\ub808\ub4dc\uc5d0\ub294 \ub354 \uc774\uc0c1 \ub2f5\uae00\uc744 \ub2ec \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.","comments.team":"\ud300","shortcuts.title":"\ud0a4\ubcf4\ub4dc \ub2e8\ucd95\ud0a4","shortcuts.navigate":"\ud53c\ub4dc\ubc31 \uac04 \uc774\ub3d9","shortcuts.resolve":"\ud574\uacb0 / \ub2e4\uc2dc \uc5f4\uae30","shortcuts.delete":"\uc0ad\uc81c","shortcuts.search":"\uac80\uc0c9\ucc3d\uc73c\ub85c \uc774\ub3d9","shortcuts.select":"\uc120\ud0dd \uc804\ud658","shortcuts.help":"\ub2e8\ucd95\ud0a4 \ubcf4\uae30","shortcuts.close":"\ub2eb\uae30","shortcuts.hint":"\ud0a4\ubcf4\ub4dc \ub2e8\ucd95\ud0a4","export.label":"\ub0b4\ubcf4\ub0b4\uae30","export.csv":"CSV \ub0b4\ubcf4\ub0b4\uae30","export.json":"JSON \ub0b4\ubcf4\ub0b4\uae30"}}),ru={};r(ru,{pt:()=>nu});var nu,su=i(()=>{nu={"panel.title":"Feedbacks","panel.ariaLabel":"Painel de feedback do Siteping","panel.feedbackList":"Lista de feedbacks","panel.loading":"Carregando feedbacks","panel.close":"Fechar painel","panel.deleteAll":"Excluir tudo","panel.deleteAllConfirmTitle":"Excluir tudo","panel.deleteAllConfirmMessage":"Excluir todos os feedbacks deste projeto? Esta a\xe7\xe3o n\xe3o pode ser desfeita.","panel.search":"Pesquisar...","panel.searchAria":"Pesquisar feedbacks","panel.filterAll":"Todos","panel.loadError":"Falha ao carregar","panel.retry":"Tentar novamente","panel.empty":"Nenhum feedback ainda","panel.showMore":"Mostrar mais","panel.notOnPage":"N\xe3o vis\xedvel nesta p\xe1gina","panel.showLess":"Mostrar menos","panel.resolve":"Resolver","panel.reopen":"Reabrir","panel.delete":"Excluir","panel.cancel":"Cancelar","panel.confirmDelete":"Excluir","panel.loadMore":"Carregar mais ({remaining} restantes)","panel.statusAll":"Todos","panel.statusOpen":"Aberto","panel.statusResolved":"Resolvido","panel.statusInProgress":"Em andamento","panel.statusWontFix":"N\xe3o ser\xe1 corrigido","panel.statusClosed":"Fechado","type.label":"Tipo","type.question":"Pergunta","type.change":"Altera\xe7\xe3o","type.bug":"Bug","type.other":"Outro","status.label":"Status","scope.label":"Escopo","scope.thisPage":"Esta p\xe1gina","scope.thisType":"Este tipo","scope.all":"Todas as p\xe1ginas","panel.filterMine":"Meus","panel.filterMineHint":"Apenas os feedbacks enviados deste navegador","fab.aria":"Siteping \u2014 Menu de feedback","fab.messages":"Exibir barra lateral","fab.annotate":"Criar nova anota\xe7\xe3o","fab.annotations":"Exibir ou ocultar marcadores","annotator.instruction":"Desenhe um ret\xe2ngulo na \xe1rea que deseja comentar \u2014 ou pressione Enter para comentar o \xfaltimo elemento em foco","annotator.instantInstruction":"Comentar o ponto clicado","annotator.touchInstruction":"Toque em um elemento ou arraste para selecionar uma \xe1rea","annotator.cancel":"Cancelar","popup.ariaLabel":"Formul\xe1rio de feedback","popup.placeholder":"Descreva seu feedback...","popup.textareaAria":"Mensagem de feedback","popup.submitHintMac":"\u2318+Enter para enviar","popup.submitHintOther":"Ctrl+Enter para enviar","popup.cancel":"Cancelar","popup.submit":"Enviar","identity.title":"Identifique-se","identity.nameLabel":"Nome","identity.namePlaceholder":"Seu nome","identity.emailLabel":"E-mail","identity.emailPlaceholder":"seu@email.com","identity.cancel":"Cancelar","identity.submit":"Continuar","marker.approximate":"Posi\xe7\xe3o aproximada (confian\xe7a: {confidence}%)","marker.aria":"Feedback #{number}: {type}, {status} \u2014 {message}","marker.count":"Marcadores de feedback exibidos: {count}","fab.badge":"Feedbacks n\xe3o resolvidos: {count}","feedback.sent.confirmation":"Feedback enviado com sucesso","feedback.error.message":"Falha ao enviar feedback","feedback.queued":"Salvo neste dispositivo. Ser\xe1 enviado na sua pr\xf3xima visita.","feedback.deleted.confirmation":"Feedback exclu\xeddo","badge.count":"Feedbacks n\xe3o resolvidos: {count}","bulk.aria":"A\xe7\xf5es em massa","bulk.selectAll":"Selecionar tudo","bulk.selectFeedback":"Selecionar {label}","bulk.selected":"{count} selecionados","bulk.resolve":"Resolver","bulk.delete":"Excluir","bulk.deselect":"Desmarcar","sort.newest":"Mais recentes","sort.oldest":"Mais antigos","sort.byType":"Por tipo","sort.openFirst":"Abertos primeiro","sort.label":"Ordenar","group.byPage":"Por p\xe1gina","group.feedbacks":"Feedbacks: {count}","stats.aria":"Estat\xedsticas de feedbacks","stats.open":"Abertos","stats.closed":"Fechados","stats.bugs":"Bugs","stats.progress":"{percent}% fechados","detail.back":"Voltar","detail.aria":"Detalhes do feedback","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Mensagem","detail.screenshot":"Captura","detail.screenshotAlt":"Captura da \xe1rea anotada","detail.metadata":"Detalhes","detail.annotation":"Anota\xe7\xe3o","detail.page":"P\xe1gina","detail.author":"Autor","detail.date":"Criado","detail.viewport":"Viewport","detail.browser":"Navegador","detail.resolvedAt":"Resolvido em","detail.closedAt":"Fechado em","detail.goToAnnotation":"Ir para anota\xe7\xe3o","detail.element":"Elemento","detail.selector":"Seletor","detail.position":"Posi\xe7\xe3o","detail.resolve":"Resolver","detail.reopen":"Reabrir","detail.delete":"Excluir","detail.diagnostics":"Diagn\xf3stico","detail.diagnostics.console":"Console","detail.diagnostics.network":"Rede com falha","detail.diagnostics.expand":"Mostrar diagn\xf3stico","detail.diagnostics.collapse":"Ocultar diagn\xf3stico","detail.diagnostics.noEntries":"Sem entradas","comments.title":"Respostas","comments.placeholder":"Responder \xe0 equipe...","comments.error":"N\xe3o enviada. Tente novamente.","comments.full":"Esta conversa est\xe1 cheia.","comments.team":"Equipe","shortcuts.title":"Atalhos de teclado","shortcuts.navigate":"Navegar feedbacks","shortcuts.resolve":"Resolver / Reabrir","shortcuts.delete":"Excluir","shortcuts.search":"Buscar","shortcuts.select":"Alternar sele\xe7\xe3o","shortcuts.help":"Mostrar atalhos","shortcuts.close":"Fechar","shortcuts.hint":"Atalhos de teclado","export.label":"Exportar","export.csv":"Exportar CSV","export.json":"Exportar JSON"}}),ou={};r(ou,{ru:()=>au});var au,lu,du=i(()=>{au={"panel.title":"\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c","panel.ariaLabel":"\u041f\u0430\u043d\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 Siteping","panel.feedbackList":"\u0421\u043f\u0438\u0441\u043e\u043a \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c","panel.deleteAll":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0451","panel.deleteAllConfirmTitle":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0451","panel.deleteAllConfirmMessage":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0442\u0437\u044b\u0432\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430? \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0435\u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e.","panel.search":"\u041f\u043e\u0438\u0441\u043a...","panel.searchAria":"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u043e\u0442\u0437\u044b\u0432\u0430\u043c","panel.filterAll":"\u0412\u0441\u0435","panel.loadError":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","panel.retry":"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c","panel.empty":"\u041f\u043e\u043a\u0430 \u043d\u0435\u0442 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","panel.showMore":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435","panel.notOnPage":"\u041d\u0435 \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435","panel.showLess":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435","panel.resolve":"\u0420\u0435\u0448\u0435\u043d\u043e","panel.reopen":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e","panel.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","panel.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","panel.confirmDelete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","panel.loadMore":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0451 ({remaining} \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c)","panel.statusAll":"\u0412\u0441\u0435","panel.statusOpen":"\u041e\u0442\u043a\u0440\u044b\u0442","panel.statusResolved":"\u0420\u0435\u0448\u0451\u043d","panel.statusInProgress":"\u0412 \u0440\u0430\u0431\u043e\u0442\u0435","panel.statusWontFix":"\u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e","panel.statusClosed":"\u0417\u0430\u043a\u0440\u044b\u0442","type.label":"\u0422\u0438\u043f","type.question":"\u0412\u043e\u043f\u0440\u043e\u0441","type.change":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435","type.bug":"\u0411\u0430\u0433","type.other":"\u0414\u0440\u0443\u0433\u043e\u0435","status.label":"\u0421\u0442\u0430\u0442\u0443\u0441","scope.label":"\u041e\u0431\u043b\u0430\u0441\u0442\u044c","scope.thisPage":"\u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","scope.thisType":"\u042d\u0442\u043e\u0442 \u0442\u0438\u043f","scope.all":"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b","panel.filterMine":"\u041c\u043e\u0438","panel.filterMineHint":"\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0437\u044b\u0432\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430","fab.aria":"Siteping \u2014 \u041c\u0435\u043d\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438","fab.messages":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c","fab.annotate":"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e","fab.annotations":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043b\u0438 \u0441\u043a\u0440\u044b\u0442\u044c \u043c\u0435\u0442\u043a\u0438","annotator.instruction":"\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u2014 \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442","annotator.instantInstruction":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435","annotator.touchInstruction":"\u041a\u043e\u0441\u043d\u0438\u0442\u0435\u0441\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u043b\u044c\u0446\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c","annotator.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","popup.ariaLabel":"\u0424\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438","popup.placeholder":"\u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435...","popup.textareaAria":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435","popup.submitHintMac":"\u2318+Enter \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","popup.submitHintOther":"Ctrl+Enter \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","popup.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","popup.submit":"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","identity.title":"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435\u0441\u044c","identity.nameLabel":"\u0418\u043c\u044f","identity.namePlaceholder":"\u0412\u0430\u0448\u0435 \u0438\u043c\u044f","identity.emailLabel":"Email","identity.emailPlaceholder":"\u0432\u0430\u0448@email.com","identity.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","identity.submit":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c","marker.approximate":"\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c: {confidence}%)","marker.aria":"\u041e\u0442\u0437\u044b\u0432 #{number}: {type}, {status} \u2014 {message}","marker.count":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","fab.badge":"\u041d\u0435\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","feedback.sent.confirmation":"\u041e\u0442\u0437\u044b\u0432 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d","feedback.error.message":"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432","feedback.queued":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0438.","feedback.deleted.confirmation":"\u041e\u0442\u0437\u044b\u0432 \u0443\u0434\u0430\u043b\u0451\u043d","badge.count":"\u041d\u0435\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","bulk.aria":"\u041c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","bulk.selectAll":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435","bulk.selectFeedback":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c: {label}","bulk.selected":"\u0412\u044b\u0431\u0440\u0430\u043d\u043e: {count}","bulk.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c","bulk.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","bulk.deselect":"\u0421\u043d\u044f\u0442\u044c \u0432\u044b\u0431\u043e\u0440","sort.newest":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u043e\u0432\u044b\u0435","sort.oldest":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0440\u044b\u0435","sort.byType":"\u041f\u043e \u0442\u0438\u043f\u0443","sort.openFirst":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435","sort.label":"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430","group.byPage":"\u041f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435","group.feedbacks":"\u041e\u0442\u0437\u044b\u0432\u043e\u0432: {count}","stats.aria":"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432","stats.open":"\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435","stats.closed":"\u0417\u0430\u043a\u0440\u044b\u0442\u044b\u0435","stats.bugs":"\u0411\u0430\u0433\u0438","stats.progress":"\u0417\u0430\u043a\u0440\u044b\u0442\u043e: {percent}%","detail.back":"\u041d\u0430\u0437\u0430\u0434","detail.aria":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0437\u044b\u0432\u0430","detail.title":"\u041e\u0442\u0437\u044b\u0432 #{number}","detail.status":"\u0421\u0442\u0430\u0442\u0443\u0441","detail.message":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435","detail.screenshot":"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442","detail.screenshotAlt":"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438","detail.metadata":"\u0414\u0435\u0442\u0430\u043b\u0438","detail.annotation":"\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f","detail.page":"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430","detail.author":"\u0410\u0432\u0442\u043e\u0440","detail.date":"\u0421\u043e\u0437\u0434\u0430\u043d","detail.viewport":"Viewport","detail.browser":"\u0411\u0440\u0430\u0443\u0437\u0435\u0440","detail.resolvedAt":"\u0420\u0435\u0448\u0451\u043d","detail.closedAt":"\u0417\u0430\u043a\u0440\u044b\u0442","detail.goToAnnotation":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438","detail.element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442","detail.selector":"\u0421\u0435\u043b\u0435\u043a\u0442\u043e\u0440","detail.position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","detail.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c","detail.reopen":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e","detail.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","detail.diagnostics":"\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430","detail.diagnostics.console":"\u041a\u043e\u043d\u0441\u043e\u043b\u044c","detail.diagnostics.network":"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438","detail.diagnostics.expand":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443","detail.diagnostics.collapse":"\u0421\u043a\u0440\u044b\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443","detail.diagnostics.noEntries":"\u041d\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0435\u0439","comments.title":"\u041e\u0442\u0432\u0435\u0442\u044b","comments.placeholder":"\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0435...","comments.error":"\u041d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.","comments.full":"\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e.","comments.team":"\u041a\u043e\u043c\u0430\u043d\u0434\u0430","shortcuts.title":"\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438","shortcuts.navigate":"\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043e\u0442\u0437\u044b\u0432\u0430\u043c","shortcuts.resolve":"\u0420\u0435\u0448\u0438\u0442\u044c / \u041f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u044c","shortcuts.delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","shortcuts.search":"\u041f\u043e\u0438\u0441\u043a","shortcuts.select":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440","shortcuts.help":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0438","shortcuts.close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","shortcuts.hint":"\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438","export.label":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","export.csv":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","export.json":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 JSON"}});function cu(e,t){switch(e){case"question":return t("type.question");case"change":return t("type.change");case"bug":return t("type.bug");case"other":return t("type.other");default:return e}}function pu(e,t){switch(e){case"open":return t("panel.statusOpen");case"in_progress":return t("panel.statusInProgress");case"resolved":return t("panel.statusResolved");case"wont_fix":return t("panel.statusWontFix");default:return e}}e.registerLocale=void 0,e.loadLocale=void 0;var hu,uu,fu=i(()=>{$(),Fh(),lu=function(e,t){let i=Object.assign(Object.create(null),{en:e}),r=Object.create(null);function n(e){return Object.hasOwn(t,e)}return{registerLocale(e,t){let i=m(e);r[i]={...r[i],...t}},async loadLocale(e){let s=m(e);return n(s)&&(i[s]??=await t[s]()),r[s]?{...i[s],...r[s]}:i[s]??null},createT(t){let s=m(t);return!i[s]&&!r[s]&&!n(s)&&console.warn(`[siteping] Unknown locale "${t}", falling back to "en"`),t=>r[s]?.[t]??i[s]?.[t]??e[t]??t}}}(Oh,{de:()=>Promise.resolve().then(()=>(Wh(),zh)).then(e=>e.de),es:()=>Promise.resolve().then(()=>(jh(),Hh)).then(e=>e.es),fr:()=>Promise.resolve().then(()=>(Gh(),Uh)).then(e=>e.fr),it:()=>Promise.resolve().then(()=>(Xh(),Yh)).then(e=>e.it),ja:()=>Promise.resolve().then(()=>(Zh(),Jh)).then(e=>e.ja),ko:()=>Promise.resolve().then(()=>(iu(),eu)).then(e=>e.ko),pt:()=>Promise.resolve().then(()=>(su(),ru)).then(e=>e.pt),ru:()=>Promise.resolve().then(()=>(du(),ou)).then(e=>e.ru)}),e.registerLocale=lu.registerLocale,e.loadLocale=lu.loadLocale,hu=lu.createT,uu=b});function gu(e,t,i){let r=new Blob([e],{type:i}),n=URL.createObjectURL(r),s=document.createElement("a");s.href=n,s.download=t,s.style.display="none",re(s),document.body.appendChild(s),s.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(n),s.remove()})}var mu,bu,xu,yu,vu,wu=i(()=>{te(),ze(),mu=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"],bu=class{constructor(e,t,i){this.getFeedbacks=t,this.element=j("div",{style:"position: relative; display: inline-flex;"});let r=document.createElement("button");r.className="sp-export-btn",r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(V('<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>'));let n=document.createElement("span");U(n,i("export.label")),r.appendChild(n),r.title=i("export.label"),r.addEventListener("click",e=>{e.stopPropagation(),this.toggle()}),this.menu=j("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let s=this.createOption('<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>',i("export.csv"),()=>{this.exportAs("csv")}),o=this.createOption('<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>',i("export.json"),()=>{this.exportAs("json")});this.menu.appendChild(s),this.menu.appendChild(o),this.element.appendChild(r),this.element.appendChild(this.menu),this.element.addEventListener("keydown",e=>{"Escape"!==e.key||!this.isOpen||(e.stopPropagation(),this.close(),r.focus())})}getFeedbacks;element;menu;isOpen=!1;removeOutsideClick=null;createOption(e,t,i){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let n=j("span",{class:"sp-export-option-icon"});n.appendChild(V(e));let s=j("span",{class:"sp-export-option-label"});return U(s,t),r.appendChild(n),r.appendChild(s),r.addEventListener("click",e=>{e.stopPropagation(),i(),this.close()}),r}toggle(){this.isOpen?this.close():this.open()}open(){this.isOpen=!0,this.removeOutsideClick=q(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=!1,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 t=this.getFeedbacks();if(0===t.length)return;let i=t[0]?.projectName??"feedbacks",r=(new Date).toISOString().slice(0,10),n=i.replace(/[^a-zA-Z0-9_-]/g,"_");if("csv"===e){let e=`\ufeff${function(e){let t=mu.join(","),i=e.map(e=>mu.map(t=>{let i=e[t];return function(e){let t=/^[=+\-@\t\r]/.test(e)?`'${e}`:e;return t.includes('"')||t.includes(",")||t.includes("\n")||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t}(null==i?"":String(i))}).join(","));return[t,...i].join("\n")}(t)}`;gu(e,`feedbacks-${n}-${r}.csv`,"text/csv;charset=utf-8")}else gu((s=t,JSON.stringify(s,null,2)),`feedbacks-${n}-${r}.json`,"application/json;charset=utf-8");var s}destroy(){this.close(),this.element.remove()}}}),ku=i(()=>{te(),fu(),xu='<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>',yu='<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>',vu=class{constructor(e,t,i){this.callbacks=t,this.t=i,this.barElement=j("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label",i("bulk.aria")),Y(this.barElement,!0),this.countLabel=j("span",{class:"sp-bulk-bar-count"}),U(this.countLabel,uu(this.t,"bulk.selected",{count:0}));let r=j("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 n=document.createElement("button");n.className="sp-bulk-btn-deselect",n.type="button",n.setAttribute("aria-label",this.t("bulk.deselect")),n.appendChild(V('<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>')),n.addEventListener("click",()=>this.deselectAll()),r.appendChild(this.resolveBtn),r.appendChild(this.deleteBtn),r.appendChild(n),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(r),this.updateButtonLabels()}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=!1;t;createCheckbox(e,t){let i=j("div",{class:"sp-bulk-checkbox"});return i.setAttribute("role","checkbox"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",uu(this.t,"bulk.selectFeedback",{label:t})),i.addEventListener("click",t=>{t.stopPropagation(),this.toggle(e)}),i.addEventListener("keydown",t=>{(" "===t.key||"Enter"===t.key)&&(t.preventDefault(),t.stopPropagation(),this.toggle(e))}),this.checkboxMap.set(e,i),this.updateCheckbox(e),i}isSelected(e){return this.selected.has(e)}createSelectAllBar(e,t){let i=j("div",{class:"sp-bulk-select-all"}),r=j("div",{class:"sp-bulk-checkbox"});r.setAttribute("role","checkbox"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",t),this.selectAllCheckbox=r,this.updateSelectAllCheckbox(e.length>0&&e.every(e=>this.selected.has(e)));let n=j("span");U(n,t),i.appendChild(r),i.appendChild(n);let s=()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e)};return i.addEventListener("click",s),r.addEventListener("keydown",e=>{(" "===e.key||"Enter"===e.key)&&(e.preventDefault(),e.stopPropagation(),s())}),i}setListContainer(e){this.listContainer=e}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e))}selectAll(e){if(!this.isProcessing){for(let t of e)this.selected.add(t),this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass()}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let t of e)this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass()}get selectedIds(){return[...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=!1,this.updateBar(),this.updateListSelectionClass()}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove()}updateBar(){let e=this.selected.size,t=e>0;!t&&K(this.barElement)&&this.selectAllCheckbox?.focus(),Y(this.barElement,!t),this.barElement.classList.toggle("sp-bulk-bar--visible",t),U(this.countLabel,uu(this.t,"bulk.selected",{count:e}));let i=[...this.selected];G(this.resolveBtn,!1===this.callbacks.permits?.(i,"canChangeStatus")),G(this.deleteBtn,!1===this.callbacks.permits?.(i,"canDelete")),this.updateButtonLabels()}updateButtonLabels(){let e=this.selected.size,t=this.t("bulk.resolve"),i=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");U(r,t),this.resolveBtn.appendChild(r),this.resolveBtn.setAttribute("aria-label",e>0?`${t} ${e}`:t),this.deleteBtn.replaceChildren();let n=document.createElement("span");U(n,i),this.deleteBtn.appendChild(n),this.deleteBtn.setAttribute("aria-label",e>0?`${i} ${e}`:i)}updateCheckbox(e){let t=this.checkboxMap.get(e);if(!t)return;let i=this.selected.has(e);t.classList.toggle("sp-bulk-checkbox--checked",i),t.setAttribute("aria-checked",String(i)),t.replaceChildren(),t.appendChild(V(i?yu:xu))}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(V(e?yu:xu)))}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0)}updateCardSelectedState(e){if(!this.listContainer)return;let t=CSS.escape(e),i=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);i&&i.classList.toggle("sp-card--selected",this.selected.has(e))}async handleResolve(){if(this.isProcessing||0===this.selected.size)return;this.isProcessing=!0;let e=[...this.selected];X(this.resolveBtn),this.deleteBtn.disabled=!0;try{await this.callbacks.onResolve(e)}catch{return}finally{this.endProcessing()}this.deselectAll()}async handleDelete(){if(this.isProcessing||0===this.selected.size)return;this.isProcessing=!0;let e=[...this.selected];X(this.deleteBtn),this.resolveBtn.disabled=!0;try{await this.callbacks.onDelete(e)}catch{return}finally{this.endProcessing()}this.deselectAll()}endProcessing(){this.isProcessing=!1,this.resolveBtn.disabled=!1,this.deleteBtn.disabled=!1,this.updateButtonLabels()}}});function Cu(e){for(let t of[...e.attributes])(!Au.has(t.name.toLowerCase())||!Lu(t.value))&&e.removeAttribute(t.name);for(let t of[...e.children])Mu.has(t.localName.toLowerCase())?Cu(t):t.remove()}function Su(e){let t=(new DOMParser).parseFromString(e,"text/html").body.firstElementChild;return"http://www.w3.org/2000/svg"!==t?.namespaceURI||"svg"!==t.localName?null:(Cu(t),t.setAttribute("aria-hidden","true"),document.importNode(t,!0))}function Eu(e){try{let t=new URL(e,document.baseURI);return/^(https?|mailto):$/.test(t.protocol)?t.href:null}catch{return null}}var Mu,Au,Tu,Lu,Ru,Bu,Pu=i(()=>{Mu=new Set(["svg","g","path","circle","ellipse","line","polyline","polygon","rect","defs","lineargradient","radialgradient","stop","clippath","mask"]),Au=new Set("id viewbox preserveaspectratio width height x y x1 y1 x2 y2 cx cy r rx ry fx fy fr d points pathlength\n transform opacity color fill fill-opacity fill-rule stroke stroke-width stroke-linecap stroke-linejoin\n stroke-miterlimit stroke-dasharray stroke-dashoffset stroke-opacity clip-path clip-rule mask offset\n stop-color stop-opacity gradientunits gradienttransform spreadmethod clippathunits maskunits\n maskcontentunits".split(/\s+/)),Tu=/\b(?:(?:rgba?|hsla?|matrix|translate|scale|rotate|skewx|skewy)\([^()\\]*\)|url\(\s*(['"]?)#[\w-]+\1\s*\))/gi,Lu=e=>!e.includes("\\")&&!e.replace(Tu,"").includes("("),Ru=e=>"function"==typeof e.onAction&&void 0===e.href,Bu=e=>("string"==typeof e.href||"function"==typeof e.href)&&void 0===e.onAction});function Iu(e,t){try{return new Date(e).toLocaleString(t,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function Nu(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}function Du(e){return!Number.isFinite(e)||e<0?"\u2014":e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)} s`}function Ou({action:e,icon:t}){let i=document.createElement("span");return U(i,e.label),t?[t.cloneNode(!0),i]:[i]}var $u,Fu,zu,_u=i(()=>{$(),te(),fu(),_e(),Pu(),it(),$u='<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>',Fu='<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>',zu=class{constructor(e,t,i,r,n=[]){this.colors=e,this.callbacks=t,this.customActions=n,this.t=i,this.locale=r,this.element=j("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label",i("detail.aria")),this.element.setAttribute("aria-hidden","true"),Y(this.element,!0);let s=j("div",{class:"sp-detail-header"}),o=document.createElement("button");o.type="button",o.className="sp-detail-back",o.setAttribute("aria-label",this.t("detail.back")),o.appendChild(V('<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>')),o.addEventListener("click",()=>{this.hide(),this.callbacks.onBack()}),this.element.appendChild(s),s.appendChild(o),this.content=j("div",{class:"sp-detail-content"}),this.element.appendChild(this.content)}colors;callbacks;customActions;element;_isVisible=!1;opener=null;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;customBtns=[];pending=new Map;show(e,t){this.currentFeedback=e;let i=this.element.querySelector(".sp-detail-header");if(!i)return;let r=i.querySelector(".sp-detail-back");if(!r)return;i.replaceChildren(r);let n=j("span",{class:"sp-detail-title"});U(n,uu(this.t,"detail.title",{number:t})),i.appendChild(n);let s=j("span",{class:"sp-badge"});s.style.color=qe(e.type,this.colors),U(s,cu(e.type,this.t)),i.appendChild(s),this.content.replaceChildren();let o=0,a=this.buildSection(o++);this.buildStatusActions(a,e);let l=this.pending.get(e.id);l&&this.lock(l),this.content.appendChild(a);let d=this.buildSection(o++),c=j("div",{class:"sp-detail-section-title"});U(c,this.t("detail.message")),d.appendChild(c);let p=j("div",{class:"sp-detail-message"});U(p,e.message),d.appendChild(p);let h=this.callbacks.buildThread?.(e);if(h&&d.appendChild(h),this.content.appendChild(d),e.screenshotUrl&&(u=e.screenshotUrl,/^data:image\/(jpeg|png|webp);/i.test(u)||/^https:\/\//i.test(u)||function(e){try{let{protocol:t,hostname:i}=new URL(e);return"http:"===t&&("localhost"===i||i.endsWith(".localhost")||"127.0.0.1"===i||"[::1]"===i)}catch{return!1}}(u))){let t=this.buildSection(o++),i=j("div",{class:"sp-detail-section-title"});U(i,this.t("detail.screenshot")),t.appendChild(i);let r=document.createElement("img");r.className="sp-detail-screenshot",r.src=e.screenshotUrl,r.alt=this.t("detail.screenshotAlt"),r.loading="lazy",r.referrerPolicy="no-referrer",t.appendChild(r),this.content.appendChild(t)}var u;let f=this.buildSection(o++),g=j("div",{class:"sp-detail-section-title"});if(U(g,this.t("detail.metadata")),f.appendChild(g),this.buildMetadata(f,e),this.content.appendChild(f),e.annotations.length>0){let t=this.buildSection(o++),i=j("div",{class:"sp-detail-section-title"});U(i,this.t("detail.annotation")),t.appendChild(i),this.buildAnnotation(t,e),this.content.appendChild(t)}if(function(e){if(!e)return!1;let t=Array.isArray(e.console)?e.console.length:0,i=Array.isArray(e.network)?e.network.length:0;return t>0||i>0}(e.diagnostics)){let t=this.buildSection(o++),i=j("div",{class:"sp-detail-section-title"});U(i,this.t("detail.diagnostics")),t.appendChild(i),this.buildDiagnostics(t,e),this.content.appendChild(t)}if(!this._isVisible){let e=this.element.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null}this._isVisible=!0,this.element.setAttribute("aria-hidden","false"),Y(this.element,!1),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),this.element.parentElement?.classList.add("sp-panel--detail"),requestAnimationFrame(()=>{r.focus({preventScroll:!0})})}hide(){if(!this._isVisible)return;this._isVisible=!1;let e=K(this.element),t=this.currentFeedback?.id;this.element.classList.remove("sp-detail--visible"),this.element.parentElement?.classList.remove("sp-panel--detail"),this.element.setAttribute("aria-hidden","true"),Y(this.element,!0),e&&(this.element.parentElement,(!0===this.opener?.isConnected?this.opener:t?this.element.parentElement?.querySelector(`.sp-card[data-feedback-id="${CSS.escape(t)}"]`):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 t=j("div",{class:"sp-detail-section"});return t.style.animationDelay=40*e+"ms",t}buildStatusActions(e,t){let i=y(t.status),r=j("div",{class:"sp-detail-section-title"});U(r,this.t("detail.status")),e.appendChild(r);let n=t.status.replace(/_/g,"-"),s={open:this.colors.statusOpen,in_progress:this.colors.statusInProgress,resolved:this.colors.statusResolved,wont_fix:this.colors.statusWontFix},o=j("div",{class:"sp-detail-status"}),a=j("span",{class:`sp-detail-status-pill sp-detail-status-pill--${n}`}),l=j("span",{class:"sp-detail-status-dot"});l.style.background=s[t.status]??s.open,a.appendChild(l);let d=j("span");U(d,pu(t.status,this.t)),a.appendChild(d),o.appendChild(a),e.appendChild(o);let c=j("div",{class:"sp-detail-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",this.resolveBtn.className=i?"sp-detail-btn-reopen":"sp-detail-btn-resolve",this.restoreResolveBtn(t),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()),!1!==this.callbacks.permits?.(t,"canChangeStatus")&&c.appendChild(this.resolveBtn),!1!==this.callbacks.permits?.(t,"canDelete")&&c.appendChild(this.deleteBtn),e.appendChild(c),this.buildCustomActions(e,t)}buildCustomActions(e,t){if(this.customBtns=[],0===this.customActions.length)return;let i=(n=t,JSON.parse(JSON.stringify(n),(e,t)=>"object"==typeof t&&null!==t?Object.freeze(t):t)),r=j("div",{class:"sp-detail-actions sp-detail-actions--custom"});var n;for(let e of this.customActions){let t,{action:n}=e;try{if(n.visible&&!n.visible(i))continue;if(void 0===n.href){let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",n.label),r.addEventListener("click",()=>{this.run(e,()=>this.callbacks.onCustomAction(n,i))}),this.customBtns.push(r),t=r}else{let e=Eu("function"==typeof n.href?n.href(i):n.href);if(!e)throw new Error(`[siteping] Panel action "${n.id}": href must be an http(s) or mailto URL.`);let r=document.createElement("a");r.href=e,e.startsWith("mailto:")||(r.target="_blank"),r.rel="noopener noreferrer",t=r}}catch(e){this.callbacks.onCustomActionError(e);continue}t.className="sp-detail-btn-custom",t.setAttribute("data-action-id",n.id),t.title=n.label,t.append(...Ou(e)),r.appendChild(t)}r.childElementCount>0&&e.appendChild(r)}buildMetadata(e,t){let i=j("div",{class:"sp-detail-meta"});if(this.addMetaRow(i,'<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>',this.t("detail.page"),()=>{let e=j("div",{class:"sp-detail-meta-value"});return U(e,Nu(function(e){try{return new URL(e).pathname}catch{return e}}(t.url),60)),e.title=t.url,e}),this.addMetaRow(i,Oe,this.t("detail.author"),()=>{let e=j("div",{class:"sp-detail-meta-value"}),i=t.authorName||"Anonymous",r=t.authorEmail;return U(e,r?`${i} (${r})`:i),e}),this.addMetaRow(i,'<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>',this.t("detail.date"),()=>{let e=j("div",{class:"sp-detail-meta-value"});return U(e,Iu(t.createdAt,this.locale)),e}),this.addMetaRow(i,'<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>',this.t("detail.viewport"),()=>{let e=j("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return U(e,t.viewport||"Unknown"),e}),this.addMetaRow(i,'<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 e=j("div",{class:"sp-detail-meta-value"});return U(e,function(e){if(/Edg\//i.test(e)){let t=e.match(/Edg\/([\d.]+)/);return t?`Edge ${t[1]}`:"Edge"}if(/OPR\//i.test(e)||/Opera/i.test(e)){let t=e.match(/OPR\/([\d.]+)/);return t?`Opera ${t[1]}`:"Opera"}if(/Firefox\//i.test(e)){let t=e.match(/Firefox\/([\d.]+)/);return t?`Firefox ${t[1]}`:"Firefox"}if(/Chrome\//i.test(e)&&!/Chromium/i.test(e)){let t=e.match(/Chrome\/([\d.]+)/);return t?`Chrome ${t[1]}`:"Chrome"}if(/Safari\//i.test(e)&&!/Chrome/i.test(e)){let t=e.match(/Version\/([\d.]+)/);return t?`Safari ${t[1]}`:"Safari"}return"Unknown"}(t.userAgent)),e}),t.resolvedAt){let e=t.resolvedAt,r="wont_fix"===t.status?this.t("detail.closedAt"):this.t("detail.resolvedAt");this.addMetaRow(i,Fu,r,()=>{let t=j("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return U(t,Iu(e,this.locale)),t})}e.appendChild(i)}addMetaRow(e,t,i,r){let n=j("div",{class:"sp-detail-meta-row"});n.appendChild(V(t));let s=j("div",{class:"sp-detail-meta-content"}),o=j("div",{class:"sp-detail-meta-label"});U(o,i),s.appendChild(o),s.appendChild(r()),n.appendChild(s),e.appendChild(n)}buildAnnotation(e,t){let i=t.annotations[0];if(!i)return;let r=j("div",{class:"sp-detail-annotation"}),n=j("div",{class:"sp-detail-annotation-info"});if(this.addAnnotationRow(n,'<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>',this.t("detail.element"),()=>{let e=j("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return U(e,i.elementId?`<${i.elementTag}#${i.elementId}>`:`<${i.elementTag}>`),e}),this.addAnnotationRow(n,'<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>',this.t("detail.selector"),()=>{let e=j("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return U(e,Nu(i.cssSelector,60)),e.title=i.cssSelector,e}),this.addAnnotationRow(n,$u,this.t("detail.position"),()=>{let e=j("span",{class:"sp-detail-annotation-value"}),t=e=>`${(100*e).toFixed(1)}%`;return U(e,`${t(i.xPct)}, ${t(i.yPct)}`+(i.wPct>0||i.hPct>0?` (${t(i.wPct)} \xd7 ${t(i.hPct)})`:"")),e}),r.appendChild(n),e.appendChild(r),!1===this.callbacks.canGoToAnnotation?.(t))return;let s=document.createElement("button");s.type="button",s.className="sp-detail-btn-goto",s.appendChild(V($u));let o=document.createElement("span");U(o,this.t("detail.goToAnnotation")),s.appendChild(o),s.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback)}),r.appendChild(s);let a=this.callbacks.lostNote?.(t.id);a&&r.appendChild(a)}buildDiagnostics(e,t){let i=t.diagnostics;if(!i)return;let r=Array.isArray(i.console)?i.console:[],n=Array.isArray(i.network)?i.network:[],s=r.filter(e=>"error"===e.level).length,o=j("div",{class:"sp-detail-diag"}),a=document.createElement("button");a.type="button",a.className="sp-detail-diag-toggle",a.setAttribute("aria-expanded","false");let l=document.createElement("span"),d=document.createElement("span");d.style.display="inline-flex",d.style.alignItems="center",d.style.gap="8px",d.appendChild(V('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>')),U(l,this.t("detail.diagnostics")),d.appendChild(l),a.appendChild(d);let c=j("span",{class:"sp-detail-diag-counts"}),p=j("span",{class:"sp-detail-diag-count"+(s>0?" sp-detail-diag-count--errors":"")});U(p,`${r.length} console`);let h=j("span",{class:"sp-detail-diag-count"+(n.length>0?" sp-detail-diag-count--errors":"")});U(h,`${n.length} net`),c.appendChild(p),c.appendChild(h),a.appendChild(c);let u=j("div",{class:"sp-detail-diag-body"});if(r.length>0){let e=document.createElement("div"),t=j("div",{class:"sp-detail-diag-group-title"});U(t,this.t("detail.diagnostics.console")),e.appendChild(t);let i=document.createElement("ul");i.className="sp-detail-diag-list";for(let e of r){let t=document.createElement("li"),r=j("span",{class:`sp-detail-diag-level sp-detail-diag-level--${e.level}`});U(r,e.level);let n=j("span",{class:"sp-detail-diag-message"});U(n,Nu(e.message,240)),n.title=e.message,t.appendChild(r),t.appendChild(n),i.appendChild(t)}e.appendChild(i),u.appendChild(e)}if(n.length>0){let e=document.createElement("div"),t=j("div",{class:"sp-detail-diag-group-title"});U(t,this.t("detail.diagnostics.network")),e.appendChild(t);let i=document.createElement("ul");i.className="sp-detail-diag-list";for(let e of n){let t=document.createElement("li");t.classList.add("sp-detail-diag-net");let r=j("span",{class:"sp-detail-diag-net-status"});U(r,0===e.status?"ERR":String(e.status));let n=j("span",{class:"sp-detail-diag-net-method"});U(n,e.method);let s=j("span",{class:"sp-detail-diag-net-url"});U(s,Nu(e.url,120)),s.title=`${e.url} \u2014 ${Du(e.durationMs)}`,t.appendChild(r),t.appendChild(n),t.appendChild(s),i.appendChild(t)}e.appendChild(i),u.appendChild(e)}a.addEventListener("click",()=>{let e="true"===a.getAttribute("aria-expanded");a.setAttribute("aria-expanded",String(!e)),u.classList.toggle("sp-detail-diag-body--open",!e)}),o.appendChild(a),o.appendChild(u),e.appendChild(o)}addAnnotationRow(e,t,i,r){let n=j("div",{class:"sp-detail-annotation-row"});n.appendChild(V(t));let s=j("div",{class:"sp-detail-meta-content"}),o=j("div",{class:"sp-detail-annotation-label"});U(o,i),s.appendChild(o),s.appendChild(r()),n.appendChild(s),e.appendChild(n)}handleResolve(){return this.run("resolve",e=>this.callbacks.onResolve(e))}handleDelete(){return this.run("delete",e=>this.callbacks.onDelete(e))}async run(e,t){let i=this.currentFeedback;if(i&&!this.pending.has(i.id)){this.pending.set(i.id,e),this.lock(e);try{await t(i)}catch{}finally{this.pending.delete(i.id),this.currentFeedback?.id===i.id&&this.unlock(e,this.currentFeedback)}}}lock(e){this.setActionsDisabled(!0);let t=this.buttonFor(e);t&&(this.setButtonLoading(t),t.setAttribute("aria-busy","true"))}unlock(e,t){let i=this.buttonFor(e);i?.removeAttribute("aria-busy"),"resolve"===e?this.restoreResolveBtn(t):"delete"===e?this.restoreDeleteBtn():i?.replaceChildren(...Ou(e)),this.setActionsDisabled(!1)}buttonFor(e){return"resolve"===e?this.resolveBtn:"delete"===e?this.deleteBtn:this.customBtns.find(t=>t.dataset.actionId===e.action.id)??null}setActionsDisabled(e){for(let t of[this.resolveBtn,this.deleteBtn,...this.customBtns])t&&(t.disabled=e)}setButtonLoading(e){e.disabled=!0,e.replaceChildren(j("div",{class:"sp-spinner sp-spinner--sm"}))}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=!1,this.resolveBtn.replaceChildren();let t=y(e.status);this.resolveBtn.appendChild(V(t?'<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>':Fu));let i=document.createElement("span");U(i,t?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(i)}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=!1,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(V('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="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>'));let e=document.createElement("span");U(e,this.t("detail.delete")),this.deleteBtn.appendChild(e)}}});function Wu(e){try{return new URL(e).pathname}catch{return e}}function Hu(e,t){let i=j("div",{class:"sp-group-header"});i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("aria-expanded","true");let r=j("span",{class:"sp-group-header-chevron"});r.appendChild(V(ju)),i.appendChild(r);let n=j("span",{class:"sp-group-header-icon"});n.appendChild(V(Vu)),i.appendChild(n);let s=j("span",{class:"sp-group-header-path"}),o=function(e){if(e.length<=40)return e;let t=Math.floor(19.5);return e.slice(0,t)+"\u2026"+e.slice(-t)}(e);U(s,o),e.length>40&&(s.title=e),i.appendChild(s);let a=j("span",{class:"sp-group-header-count"});U(a,String(t)),i.appendChild(a);let l=()=>{let e="true"===i.getAttribute("aria-expanded");i.setAttribute("aria-expanded",String(!e)),i.classList.toggle("sp-group-header--collapsed",e);let t=i.nextElementSibling;t?.classList.contains("sp-group-content")&&t.classList.toggle("sp-group-content--collapsed",e)};return i.addEventListener("click",l),i.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())}),i}var Vu,ju,Uu,qu,Gu,Yu,Ku,Xu=i(()=>{$(),te(),_e(),Vu='<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>',ju='<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>',Uu={question:0,change:1,bug:2,other:3},qu=class{element;_sortMode="newest";_groupByPage=!1;menuEl=null;sortBtn;sortDropdown;groupToggle;t;onChange;removeOutsideClick=null;constructor(e,t){this.onChange=e,this.t=t,this.element=j("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 i=V('<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>');this.sortBtn.appendChild(i),this.sortBtn.appendChild(j("span",{class:"sp-sort-btn-label"})),this.updateSortLabel(),this.sortBtn.addEventListener("click",e=>{e.stopPropagation(),this.toggleMenu()}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let r=V(Vu);this.groupToggle.appendChild(r);let n=j("span",{class:"sp-group-toggle-label"});U(n,this.t("group.byPage")),this.groupToggle.appendChild(n),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=j("div",{class:"sp-sort-dropdown"}),this.sortDropdown.appendChild(this.sortBtn),this.element.appendChild(this.sortDropdown),this.element.appendChild(this.groupToggle),this.element.addEventListener("keydown",e=>{"Escape"!==e.key||!this.menuEl||(e.stopPropagation(),this.closeMenu(),this.sortBtn.focus())})}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){this.menuEl?this.closeMenu():this.openMenu()}openMenu(){this.menuEl=j("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let t of e){let e=document.createElement("button");e.className="sp-sort-option"+(t.mode===this._sortMode?" sp-sort-option--active":""),e.setAttribute("role","option"),e.setAttribute("aria-selected",String(t.mode===this._sortMode)),U(e,t.label),t.mode===this._sortMode&&e.appendChild(V(Ee)),e.addEventListener("click",e=>{e.stopPropagation(),this._sortMode=t.mode,this.updateSortLabel(),this.closeMenu(),this.onChange()}),this.menuEl.appendChild(e)}this.sortDropdown.appendChild(this.menuEl),this.removeOutsideClick=q(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 e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")}[this._sortMode],t=this.sortBtn.querySelector(".sp-sort-btn-label");t&&U(t,e),this.sortBtn.setAttribute("aria-label",`${this.t("sort.label")}: ${e}`)}destroy(){this.closeMenu()}},Gu='.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;}}'}),Ju=i(()=>{$(),te(),fu(),Yu='.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;}',Ku=class{element;valueOpen;valueClosed;valueBugs;progressFill;progressLabel;t;constructor(e){this.t=e,this.element=j("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label",e("stats.aria")),this.element.hidden=!0;let t=j("div",{class:"sp-stats-row"}),i=j("div",{class:"sp-stats-item"}),r=j("span",{class:"sp-stats-dot"});r.style.background="#22c55e",this.valueOpen=j("span",{class:"sp-stats-value"}),U(this.valueOpen,"0");let n=j("span",{class:"sp-stats-label"});U(n,this.t("stats.open")),i.appendChild(r),i.appendChild(this.valueOpen),i.appendChild(n);let s=j("div",{class:"sp-stats-item"}),o=j("span",{class:"sp-stats-dot"});o.style.background="#9ca3af",this.valueClosed=j("span",{class:"sp-stats-value"}),U(this.valueClosed,"0");let a=j("span",{class:"sp-stats-label"});U(a,this.t("stats.closed")),s.appendChild(o),s.appendChild(this.valueClosed),s.appendChild(a);let l=j("div",{class:"sp-stats-item"}),d=j("span",{class:"sp-stats-dot"});d.style.background="var(--sp-type-bug)",this.valueBugs=j("span",{class:"sp-stats-value"}),U(this.valueBugs,"0");let c=j("span",{class:"sp-stats-label"});U(c,this.t("stats.bugs")),l.appendChild(d),l.appendChild(this.valueBugs),l.appendChild(c),t.appendChild(i),t.appendChild(s),t.appendChild(l);let p=j("div",{class:"sp-stats-progress"}),h=j("div",{class:"sp-stats-progress-track"});this.progressFill=j("div",{class:"sp-stats-progress-fill"}),h.appendChild(this.progressFill),this.progressLabel=j("span",{class:"sp-stats-progress-label"}),U(this.progressLabel,""),p.appendChild(h),p.appendChild(this.progressLabel),this.element.appendChild(t),this.element.appendChild(p)}update(e,t){if(0===t)return void(this.element.hidden=!0);this.element.hidden=!1;let i=0,r=0,n=0;for(let t of e)y(t.status)?r++:i++,"bug"===t.type&&n++;U(this.valueOpen,String(i)),U(this.valueClosed,String(r)),U(this.valueBugs,String(n));let s=e.length,o=s>0?Math.round(r/s*100):0;this.progressFill.style.clipPath=`inset(0 ${100-o}% 0 0 round 2px)`;let a=uu(this.t,"stats.progress",{percent:o});U(this.progressLabel,a)}}});function Qu(e){let t=Array.from(e.querySelectorAll(".sp-card")),i=e.getRootNode().activeElement?.closest(".sp-card"),r=i?t.indexOf(i):-1;return r>=0?r:t.findIndex(e=>e.classList.contains("sp-card--focused"))}var Zu,ef,tf,rf=i(()=>{te(),Zu=[{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"}],ef=class{constructor(e,t,i){this.t=i,this.keyMap=new Map([["j",()=>t.onNavigate("down")],["k",()=>t.onNavigate("up")],["r",()=>t.onResolve()],["d",()=>t.onDelete()],["f",()=>t.onFocusSearch()],["/",()=>t.onFocusSearch()],["x",()=>t.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.isSuspended=t.isSuspended??(()=>!1),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=e=>this.handleKeydown(e)}t;helpOverlay;hintButton;keyMap;isSuspended;boundHandler;shadowRoot=null;enabled=!1;helpVisible=!1;opener=null;destroyed=!1;enable(e){this.destroyed||this.enabled||(e&&(this.shadowRoot=e),(this.shadowRoot??document).addEventListener("keydown",this.boundHandler),this.enabled=!0)}disable(){this.enabled&&((this.shadowRoot??document).removeEventListener("keydown",this.boundHandler),this.enabled=!1,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=!0)}handleKeydown(e){if("Escape"===e.key)return void(this.helpVisible&&(e.preventDefault(),e.stopPropagation(),this.hideHelp()));if(this.helpVisible||this.isSuspended())return;let t=e.composedPath();if(t.some(e=>e instanceof Element&&"true"===e.getAttribute("aria-modal")))return;let i=t[0];if(i){let e=i.tagName?.toLowerCase();if("input"===e||"textarea"===e||"select"===e||i.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let r=this.keyMap.get(e.key);r&&(e.preventDefault(),e.stopPropagation(),r())}showHelp(){let e=this.helpOverlay.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null,this.helpVisible=!0,Y(this.helpOverlay,!1),this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus()}hideHelp(){this.helpVisible=!1;let e=K(this.helpOverlay);Y(this.helpOverlay,!0),this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible"),e&&this.opener?.isConnected&&this.opener.focus(),this.opener=null}buildOverlay(){let e=j("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),Y(e,!0),e.addEventListener("click",t=>{t.target===e&&this.hideHelp()});let t=j("div",{class:"sp-shortcuts-card"}),i=j("div",{class:"sp-shortcuts-title"});i.appendChild(V('<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>'));let r=j("span");U(r,this.t("shortcuts.title")),i.appendChild(r),t.appendChild(i);let n=document.createElement("button");n.className="sp-shortcuts-close",n.setAttribute("aria-label",this.t("shortcuts.close")),n.appendChild(V('<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>')),n.addEventListener("click",()=>this.hideHelp()),t.appendChild(n);let s=j("div",{class:"sp-shortcuts-grid"});for(let e of Zu){let t=j("div",{class:"sp-shortcuts-row"}),i=j("div",{class:"sp-shortcuts-keys"});e.keys.forEach((e,t)=>{if(t>0){let e=j("span",{class:"sp-shortcuts-separator"});U(e,"/"),i.appendChild(e)}let r=j("span",{class:"sp-kbd"});U(r,e),i.appendChild(r)});let r=j("span",{class:"sp-shortcuts-desc"});U(r,this.t(e.label)),t.appendChild(i),t.appendChild(r),s.appendChild(t)}return t.appendChild(s),e.appendChild(t),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),U(e,"?"),e.addEventListener("click",e=>{e.stopPropagation(),this.toggleHelp()}),e}}}),nf=i(()=>{te(),tf=class{element;current;opts;onChange;datasetKey;constructor(e){this.opts=e.options,this.current=e.value,this.onChange=e.onChange,this.datasetKey=e.datasetKey,this.element=j("div",{class:"sp-segmented"+(e.extraClass?` ${e.extraClass}`:""),role:"radiogroup"}),this.element.setAttribute("aria-label",e.ariaLabel);for(let t of this.opts){let i=document.createElement("button");i.type="button",i.className=void 0!==e.modifierPrefix?`sp-segmented__btn ${e.modifierPrefix}${t.value}`:"sp-segmented__btn",i.dataset[this.datasetKey]=t.value,i.setAttribute("role","radio");let r=this.current===t.value;if(i.setAttribute("aria-checked",String(r)),i.tabIndex=r?0:-1,r&&i.classList.add("sp-segmented__btn--active"),t.color&&i.style.setProperty("--sp-chip-color",t.color),t.icon){let e=j("span",{class:"sp-segmented__icon"});e.appendChild(V(t.icon)),i.appendChild(e)}let n=j("span",{class:"sp-segmented__label"});U(n,t.label),i.appendChild(n),i.addEventListener("click",()=>this.select(t.value)),i.addEventListener("keydown",e=>this.handleKey(e,t.value)),this.element.appendChild(i)}}select(e){this.current=e,this.syncSelection(),this.onChange(e)}syncSelection(){let e=this.element.querySelectorAll(".sp-segmented__btn");for(let t of e){let e=t.dataset[this.datasetKey]===this.current;t.classList.toggle("sp-segmented__btn--active",e),t.setAttribute("aria-checked",String(e)),t.tabIndex=e?0:-1}}setOptionVisible(e,t){let i=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return!!i&&(i.style.display=t?"":"none",!0)}get value(){return this.current}focusOption(e){this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`)?.focus()}handleKey(e,t){let i,r=this.opts.map(e=>e.value).filter(e=>{let t=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return null!==t&&"none"!==t.style.display}),n=r.indexOf(t);if(n<0)return;switch(e.key){case"ArrowLeft":i=(n-1+r.length)%r.length;break;case"ArrowRight":i=(n+1)%r.length;break;case"Home":i=0;break;case"End":i=r.length-1;break;default:return}e.preventDefault();let s=r[i];void 0!==s&&(this.select(s),this.focusOption(s))}kebabKey(){return this.datasetKey.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}}});function sf({input:e,send:t},i){e.readOnly=i,t.setAttribute("aria-busy",String(i)),t.setAttribute("aria-disabled",String(i))}var of,af=i(()=>{$(),te(),dt(),of=0}),lf={};function df(e,t){let i=j("div",{class:e});return i.setAttribute("role","list"),i.setAttribute("aria-label",t),i}r(lf,{Panel:()=>pf});var cf,pf,hf=i(()=>{$(),nf(),te(),wu(),H(),ze(),fu(),_e(),Pu(),ku(),_u(),Xu(),Ju(),af(),rf(),it(),dt(),cf=C.filter(e=>!y(e)),pf=class{constructor(e,t,i,r,n,s,o,a,l){this.colors=t,this.bus=i,this.client=r,this.projectName=n,this.markers=s,this.t=o,this.locale=a,this.shadowRoot=e,this.readOnly=!!l?.readOnly,this.resolveIdentity=l?.resolveIdentity??(async()=>null),this.getScope=l?.getScope??(()=>({url:window.location.pathname,urlPattern:null})),this.scopeAnnotationsByUrl=l?.scopeAnnotationsByUrl??!0,this.ownFeedback=l?.ownFeedback??{ids:()=>new Set,remove:()=>{}},this.scrim=j("div",{class:"sp-scrim"}),this.scrim.addEventListener("click",()=>this.close()),this.root=j("div",{class:"sp-panel"}),this.root.setAttribute("role","complementary"),this.root.setAttribute("aria-label",this.t("panel.ariaLabel")),this.root.setAttribute("aria-hidden","true"),Y(this.root,!0);let d=j("div",{class:"sp-panel-header"}),c=j("span",{class:"sp-panel-title"});U(c,this.t("panel.title")),this.closeBtn=document.createElement("button"),this.closeBtn.className="sp-panel-close",this.closeBtn.setAttribute("aria-label",this.t("panel.close")),this.closeBtn.appendChild(V(Ce)),this.closeBtn.addEventListener("click",()=>this.close()),this.deleteAllBtn=document.createElement("button"),this.deleteAllBtn.className="sp-btn-delete-all",this.deleteAllBtn.setAttribute("aria-label",this.t("panel.deleteAll")),this.deleteAllBtn.title=this.t("panel.deleteAll"),this.deleteAllBtn.appendChild(V(De));let p=document.createElement("span");U(p,` ${this.t("panel.deleteAll")}`),this.deleteAllBtn.appendChild(p),this.deleteAllBtn.addEventListener("click",()=>this.confirmDeleteAll()),G(this.deleteAllBtn,!0),this.exportBtn=new bu(t,()=>this.feedbacks,this.t);let h=j("div",{class:"sp-panel-header-right"});h.appendChild(this.exportBtn.element),h.appendChild(this.deleteAllBtn),h.appendChild(this.closeBtn),d.appendChild(c),d.appendChild(h),this.stats=new Ku(this.t);let u=j("div",{class:"sp-filters"}),f=j("div",{class:"sp-search-wrap"}),g=V(Se);g.setAttribute("class","sp-search-icon"),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="sp-search",this.searchInput.placeholder=this.t("panel.search"),this.searchInput.setAttribute("aria-label",this.t("panel.searchAria")),this.searchInput.addEventListener("input",()=>{this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>this.loadFeedbacks().catch(()=>{}),200)}),f.appendChild(g),f.appendChild(this.searchInput);let m=j("div",{class:"sp-filter-bar"});m.appendChild(this.buildTypeDropdown()),m.appendChild(this.buildStatusSegmented()),m.appendChild(this.buildScopeSegmented()),m.appendChild(this.buildMineToggle()),this.sortControls=new qu(()=>this.renderList(),this.t),u.appendChild(f),u.appendChild(m),u.appendChild(this.sortControls.element),this.listContainer=j("div",{class:"sp-list"}),this.bulk=new vu(t,{onResolve:e=>this.bulkResolve(e),onDelete:e=>this.bulkDelete(e),permits:(e,t)=>this.feedbacks.every(i=>!e.includes(i.id)||this.can(i,t))},this.t),this.bulk.setListContainer(this.listContainer),this.detail=new zu(t,{onBack:()=>this.detail.hide(),onResolve:async e=>{try{let t=!y(e.status);await this.client.resolveFeedback(e.id,t),await this.loadFeedbacks(),this.hideDetailOf(e.id)}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}},onDelete:async e=>{try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks(),this.hideDetailOf(e.id)}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}},canGoToAnnotation:e=>!this.scopeAnnotationsByUrl||e.url===this.getScope().url,lostNote:e=>this.lostNote(e),onGoToAnnotation:e=>{if(e.annotations.length>0){let t=e.annotations[0];if(!t)return;this.markers.revealPin(e.id)||(window.scrollTo({left:t.scrollX,top:t.scrollY,behavior:at()?"auto":"smooth"}),this.markers.pinHighlight(e)),nt()&&this.close()}},onCustomAction:async(e,t)=>{try{await e.onAction(t,{refresh:()=>this.refreshDetail(t.id),close:()=>this.close()})}catch(e){this.reportActionError(e)}},onCustomActionError:e=>this.reportActionError(e),permits:(e,t)=>this.can(e,t),buildThread:e=>function(e,{t:t,locale:i,canPost:r,draft:n,post:s}){let o=e.comments??[];if(!r&&0===o.length)return null;let a=j("div"),l=j("ol",{class:"sp-thread-list",role:"list","aria-label":t("comments.title"),"aria-live":"polite"}),d=new Set,c=e=>{if(d.has(e.id))return;d.add(e.id);let r=j("li",{class:"sp-detail-message sp-comment","data-role":e.authorRole}),n=j("div",{class:"sp-comment-head"}),s=j("span");if(U(s,e.authorName),n.appendChild(s),"team"===e.authorRole){let e=j("span",{class:"sp-badge"});U(e,t("comments.team")),n.appendChild(e)}let o=j("time",{datetime:e.createdAt});U(o,Q(e.createdAt,i)),n.appendChild(o);let a=j("div");U(a,e.body),r.append(n,a),l.appendChild(r)};for(let e of o)c(e);if(a.appendChild(l),!r)return a;let p=document.createElement("textarea");p.className="sp-input sp-thread-input",p.rows=3,p.maxLength=E,p.placeholder=t("comments.placeholder"),p.setAttribute("aria-label",p.placeholder),p.value=n.text,p.addEventListener("input",()=>{n.text=p.value});let h=j("div",{class:"sp-thread-foot"}),u=j("span",{id:"sp-thread-hint-"+ ++of});st()||(U(u,t(J()?"popup.submitHintMac":"popup.submitHintOther")),p.setAttribute("aria-describedby",u.id),p.setAttribute("aria-keyshortcuts","Control+Enter Meta+Enter"));let f=document.createElement("button");f.type="button",f.className="sp-btn-primary",U(f,t("popup.submit")),h.append(u,f);let g=j("div",{class:"sp-thread-error",role:"alert"});a.append(p,h,g);let m={add:c,input:p,send:f,error:g};n.view=m,sf(m,!0===n.sending);let b=async()=>{n.text=p.value;let e=n.text.trim();if(n.sending||!e)return;n.sent?.body!==e&&(n.sent={body:e,clientId:R()});let{clientId:i}=n.sent;n.sending=!0,U(g,""),sf(m,!0);let r="",o=null;try{o=await s(e,i)}catch(e){r=t(function(e){return 409===I(e,"status")||"STORE_LIMIT"===I(e,"code")}(e)?"comments.full":"comments.error")}n.sending=!1;let a=n.view??m;sf(a,!1),U(a.error,r),o&&(a.add(o),a.input.value=n.text="",n.sent=void 0)};return f.addEventListener("click",()=>{b()}),p.addEventListener("keydown",e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())}),a}(e,{t:this.t,locale:a,canPost:this.canComment&&!1!==e.permissions?.canComment,draft:this.draftOf(e.id),post:(t,i)=>this.postComment(e,t,i)})},this.t,a,function(e){let t=[];if(!Array.isArray(e))return t;let i=new Set;return e.forEach((e,r)=>{let n=`[siteping] panelActions[${r}]`,s=e?.id;if("string"==typeof s&&s&&"string"==typeof e?.label&&e.label)if(Ru(e)||Bu(e))if("string"!=typeof e.href||Eu(e.href))if(i.has(s))console.warn(`${n} ignored: duplicate id "${s}".`);else{i.add(s);let r=void 0===e.icon?null:Su(e.icon);void 0!==e.icon&&!r&&console.warn(`${n} ("${s}"): \`icon\` is not SVG markup \u2014 showing the label only.`),t.push({action:e,icon:r})}else console.warn(`${n} ("${s}") ignored: \`href\` must be an http(s) or mailto URL.`);else console.warn(`${n} ("${s}") ignored: it needs either an \`onAction\` function or an \`href\`, not both.`);else console.warn(`${n} ignored: it needs a non-empty string \`id\` and \`label\`.`)}),t}(l?.panelActions)),this.shortcuts=new ef(t,{onNavigate:e=>{let t=Qu(this.listContainer);!function(e,t){let i=e.querySelectorAll(".sp-card");if(0===i.length)return;for(let e of i)e.classList.remove("sp-card--focused");let r=i[Math.max(0,Math.min(t,i.length-1))];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest"}),r.focus({preventScroll:!0}))}(this.listContainer,"down"===e?t+1:t-1)},onResolve:()=>this.pressInFocusedCard('[data-action="resolve"]'),onDelete:()=>this.pressInFocusedCard('[data-action="delete"]'),onFocusSearch:()=>this.searchInput.focus(),onToggleSelect:()=>this.pressInFocusedCard(".sp-bulk-checkbox"),isSuspended:()=>this.detail.isVisible},this.t),this.root.appendChild(d),this.root.appendChild(this.stats.element),this.root.appendChild(u),this.root.appendChild(this.listContainer),this.root.appendChild(this.bulk.barElement),this.root.appendChild(this.detail.element),this.root.appendChild(this.shortcuts.helpOverlay),this.root.appendChild(this.shortcuts.hintButton),e.appendChild(this.scrim),e.appendChild(this.root),this.attachSheetDrag(),this.onListClick=e=>{let t=e.target;if(t.closest(".sp-bulk-checkbox"))return;let i=t.closest("[data-action]");if(i){e.stopPropagation();let t=i.closest(".sp-card");if(!t)return;let r=t.dataset.feedbackId,n=this.feedbacks.find(e=>e.id===r);if(!n)return;let s=i.dataset.action;if("expand"===s){let e=t.querySelector(".sp-card-message");if(!e)return;let r=e.classList.toggle("sp-card-message--expanded");U(i,r?this.t("panel.showLess"):this.t("panel.showMore")),i.setAttribute("aria-expanded",String(r))}else if("resolve"===s){if(this.pendingMutations.has(n.id))return;let e=i;this.toggleResolve(n,e).catch(()=>{})}else if("delete"===s){if(this.pendingMutations.has(n.id))return;let e=i;this.deleteFeedback(n,e).catch(()=>{})}return}let r=t.closest(".sp-card");if(r){let e=r.dataset.feedbackId,t=this.feedbacks.find(t=>t.id===e);t&&this.detail.show(t,Number(r.dataset.number))}},this.listContainer.addEventListener("click",this.onListClick),this.onListKeydown=e=>{let t=e;if("Enter"!==t.key&&" "!==t.key)return;let i=t.target,r=i.closest(".sp-card");if(!r||i!==r)return;t.preventDefault();let n=r.dataset.feedbackId,s=this.feedbacks.find(e=>e.id===n);s&&this.detail.show(s,Number(r.dataset.number))},this.listContainer.addEventListener("keydown",this.onListKeydown),this.onListMouseover=e=>{let t=e.target.closest(".sp-card");if(!t)return;let i=t.dataset.feedbackId;i&&this.markers.highlight(i)},this.listContainer.addEventListener("mouseover",this.onListMouseover),this.onListMouseout=e=>{let t=e.relatedTarget;t&&this.listContainer.contains(t)||this.markers.highlight("")},this.listContainer.addEventListener("mouseout",this.onListMouseout),this.bus.on("markers:placed",()=>this.syncLostNotes()),this.bus.on("panel:toggle",e=>{e?this.open():this.close()}),this.bus.on("annotation:start",()=>{this.annotating=!0}),this.bus.on("annotation:end",()=>{this.annotating=!1}),se(e,()=>this.isOpen),oe(e,t=>{if("Escape"===t.key&&this.isOpen){if(this.shortcuts.isHelpVisible)return;return this.detail.isVisible?void this.detail.hide():void this.close()}if("Tab"===t.key&&this.isOpen){let i=e=>{let t=e;for(;t&&t!==this.root;){if("none"===getComputedStyle(t).display)return!1;t=t.parentElement}return!0},r=this.shortcuts.isHelpVisible?this.shortcuts.helpOverlay:this.detail.isVisible?this.detail.element:this.root,n=Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(e=>i(e)&&!e.hasAttribute("disabled")&&!e.closest("[inert]"));if(0===n.length)return;let s=n[0],o=n[n.length-1];if(!s||!o)return;let a=e.activeElement;a&&r.contains(a)?t.shiftKey&&a===s?(t.preventDefault(),o.focus()):!t.shiftKey&&a===o&&(t.preventDefault(),s.focus()):(t.preventDefault(),(t.shiftKey?o:s).focus())}}),this.onMarkerClick=e=>{this.scrollToFeedback(e.detail.feedbackId)},document.addEventListener("sp-marker-click",this.onMarkerClick)}colors;bus;client;projectName;markers;t;locale;root;scrim;listContainer;searchInput;closeBtn;deleteAllBtn;activeFilters=new Set(["all"]);typeDropdownBtn;typeDropdownContainer;typeDropdownMenu=null;removeTypeDropdownOutsideClick=null;statusSegmented;typeOptions;feedbacks=[];currentPage=1;totalFeedbacks=0;isLoadingMore=!1;isOpen=!1;searchTimeout=null;loadController=null;isLoading=!1;pendingScrollId=null;pendingDetail=!1;pendingMutations=new Set;canComment=!1;threadDrafts=new Map;threadWriteCount=0;threadWrites=new Map;readOnly;resolveIdentity;stats;sortControls;bulk;exportBtn;shortcuts;detail;shadowRoot;getScope;scopeAnnotationsByUrl;scopeSegmented;initialScopeFilter="this";mineOnly=!1;ownFeedback;onMarkerClick;onListClick;onListKeydown;onListMouseover;onListMouseout;annotating=!1;onOutsidePointer=e=>{!this.isOpen||this.annotating||0!==e.button||nt()||this.fromWidget(e)||this.hasDraft()||this.hasOpenLayer()||this.close(!1)};onOutsideKeydown=e=>{"Escape"!==e.key||!this.isOpen||this.annotating||e.defaultPrevented||this.fromWidget(e)||this.hasOpenLayer()||(this.detail.isVisible?this.detail.hide():this.close(!1))};fromWidget(e){let t=e.composedPath();if(t.includes(this.shadowRoot.host))return!0;let i=t[0];return i instanceof Element&&z(i)}hasOpenLayer(){return null!==this.shadowRoot.querySelector(".sp-filter-dropdown-menu, .sp-sort-menu, .sp-export-menu--open, .sp-confirm-backdrop, .sp-shortcuts-overlay--visible")}hasDraft(){return Array.from(this.root.querySelectorAll("textarea")).some(e=>""!==e.value.trim())}async open(){if(this.isOpen)return;this.isOpen=!0,document.addEventListener("pointerdown",this.onOutsidePointer,!0),document.addEventListener("keydown",this.onOutsideKeydown);let e=nt();this.root.setAttribute("role",e?"dialog":"complementary"),e?this.root.setAttribute("aria-modal","true"):this.root.removeAttribute("aria-modal"),this.root.classList.add("sp-panel--open"),this.scrim.classList.add("sp-scrim--open"),this.root.setAttribute("aria-hidden","false"),Y(this.root,!1),this.bus.emit("open"),this.shortcuts.enable(this.shadowRoot),await this.loadFeedbacks(),requestAnimationFrame(()=>{!this.isOpen||this.root.contains(this.shadowRoot.activeElement)||(st()?this.closeBtn:this.searchInput).focus()})}close(e=!0){this.isOpen&&(this.isOpen=!1,document.removeEventListener("pointerdown",this.onOutsidePointer,!0),document.removeEventListener("keydown",this.onOutsideKeydown),this.root.classList.remove("sp-panel--open"),this.scrim.classList.remove("sp-scrim--open"),this.root.setAttribute("aria-hidden","true"),Y(this.root,!0),this.bus.emit("close"),this.shortcuts.disable(),this.detail.hide(),this.pendingScrollId=null,this.pendingDetail=!1,e)&&this.root.getRootNode().querySelector(".sp-fab")?.focus()}attachSheetDrag(){let e=0,t=0,i=0,r=!1,n=0,s=0,o=null,a=e=>{let t=e.timeStamp-s;t>0&&e.clientY!==n&&(o=(e.clientY-n)/t),n=e.clientY,s=e.timeStamp},l=-1;this.root.addEventListener("pointerdown",a=>{let d=a.target;r||"mouse"===a.pointerType||!nt()||d.closest("button")||!d.closest(".sp-panel-header, .sp-detail-header")||(r=!0,l=a.pointerId,e=n=a.clientY,t=s=a.timeStamp,i=0,o=null,this.root.style.transition="none",this.scrim.style.transition="none",this.root.setPointerCapture?.(a.pointerId))}),this.root.addEventListener("pointermove",t=>{if(!r||t.pointerId!==l)return;a(t);let n=t.clientY-e;i=n>=0?n:-function(e,t,i=.55){return e*t*i/(t+i*e)}(-n,this.root.offsetHeight),this.root.style.transform=`translateY(${i}px)`,this.scrim.style.opacity=String(1-Math.max(0,i)/Math.max(1,this.root.offsetHeight))});let d=e=>{if(!r||e.pointerId!==l||(r=!1,a(e),this.root.style.transition="",this.root.style.transform="",this.scrim.style.transition="",this.scrim.style.opacity="","pointercancel"===e.type))return;let n=o??Math.max(0,i)/Math.max(1,e.timeStamp-t);i+function(e,t=.998){return e*t/(1-t)}(n)>this.root.offsetHeight/4&&this.close()};this.root.addEventListener("pointerup",d),this.root.addEventListener("pointercancel",d)}showLoading(){this.listContainer.replaceChildren();let e=j("div",{class:"sp-loading"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label",this.t("panel.loading"));let t=j("div",{class:"sp-spinner"});e.appendChild(t),this.listContainer.appendChild(e)}showError(){this.listContainer.replaceChildren();let e=j("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=j("div",{class:"sp-empty-text"});U(t,this.t("panel.loadError"));let i=document.createElement("button");i.className="sp-btn-ghost",i.style.marginTop="8px",U(i,this.t("panel.retry")),i.addEventListener("click",()=>this.loadFeedbacks().catch(()=>{})),e.appendChild(t),e.appendChild(i),this.listContainer.appendChild(e)}statusBucket(e){if("all"!==e)return y(e)?S:cf}async loadFeedbacks(e=1){this.loadController?.abort(),this.loadController=new AbortController;let{signal:t}=this.loadController;this.currentPage=1;let i=this.searchInput.value.trim()||void 0,r=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],n=this.statusBucket(this.statusSegmented.value),s=this.getScope();this.syncScopeAvailability();let o=this.scopeSegmented.value,a={page:1,limit:20};r&&(a.type=r),n&&(a.statuses=n),i&&(a.search=i),"this"===o?a.url=s.url:"template"===o&&s.urlPattern&&(a.urlPattern=s.urlPattern);let l=this.feedbacks.length>0;l||this.showLoading();let d=!this.mineOnly&&this.isMarkerQuery(a,s),c=this.keepThreads();this.isLoading=!0;try{let i=this.mineOnly?this.fetchOwnFeedbacks(a,t):this.client.getFeedbacks(this.projectName,a);d||this.loadPageMarkers(s,t);let r=await i,{feedbacks:n,total:o}=r,l=1;for(;l<e&&n.length<o&&!t.aborted;){l++;let e=await this.client.getFeedbacks(this.projectName,{...a,page:l});n=[...n,...e.feedbacks],o=e.total}if(t.aborted)return;this.currentPage=l,this.feedbacks=n.map(c),this.totalFeedbacks=o,this.canComment=!0===r.capabilities?.comments,G(this.deleteAllBtn,this.readOnly||!1===r.permissions?.canDeleteAll),this.stats.update(n,o),this.bulk.reset(),this.renderList(),this.pendingScrollId&&this.flashCard(this.pendingScrollId,this.pendingDetail),d&&this.renderPageMarkers(n,s)}catch(e){if(t.aborted)return;l||this.showError(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{t.aborted||(this.isLoading=!1,this.pendingScrollId=null,this.pendingDetail=!1)}}async loadMoreFeedbacks(){if(this.isLoadingMore)return;this.isLoadingMore=!0;let e=this.loadController,t=this.currentPage+1,i=this.searchInput.value.trim()||void 0,r=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],n=this.statusBucket(this.statusSegmented.value),s=this.getScope(),o=this.scopeSegmented.value,a={page:t,limit:20};r&&(a.type=r),n&&(a.statuses=n),i&&(a.search=i),"this"===o?a.url=s.url:"template"===o&&s.urlPattern&&(a.urlPattern=s.urlPattern);let l,d=this.listContainer.querySelector(".sp-btn-load-more");d&&(l=X(d));let c=this.keepThreads();try{let{feedbacks:i,total:r}=await this.client.getFeedbacks(this.projectName,a);if(e!==this.loadController)return;this.currentPage=t,this.totalFeedbacks=r,this.feedbacks=[...this.feedbacks,...i.map(c)],this.stats.update(this.feedbacks,r),this.renderList(),this.isMarkerQuery(a,s)&&this.renderPageMarkers(this.feedbacks,s)}catch(e){l&&l(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.isLoadingMore=!1}}isMarkerQuery(e,t){let i=this.scopeAnnotationsByUrl?t.url:void 0;return!(e.type||e.statuses||e.search||e.urlPattern||e.url!==i)}async fetchOwnFeedbacks(e,t){let i,r,n,s=this.ownFeedback.ids(),o=new Map,a=new Set,l=0,d=!0;for(let c=1;o.size<s.size&&!t.aborted;c++){let t=await this.client.getFeedbacks(this.projectName,{...e,page:c,limit:100}),{feedbacks:p,total:h}=t;r=t.capabilities,n=t.permissions,i??=h,d&&=h===i;for(let e of p)a.add(e.id),s.has(e.id)&&o.set(e.id,e);if(l+=p.length,0===p.length||l>=h)break}return Object.keys(e).every(e=>"page"===e||"limit"===e)&&d&&a.size===i&&this.ownFeedback.remove(...[...s].filter(e=>!o.has(e))),{feedbacks:[...o.values()],total:o.size,capabilities:r,permissions:n}}async loadPageMarkers(e,t){let i=this.scopeAnnotationsByUrl?{limit:20,url:e.url}:{limit:20};try{let{feedbacks:r}=await this.client.getFeedbacks(this.projectName,i);t.aborted||this.renderPageMarkers(r,e)}catch{}}renderPageMarkers(e,t){this.markers.render(this.scopeAnnotationsByUrl?e.filter(e=>e.url===t.url):e)}renderList(){if(this.listContainer.replaceChildren(),0===this.feedbacks.length){let e=j("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=j("div",{class:"sp-empty-text"});return U(t,this.t("panel.empty")),e.appendChild(t),void this.listContainer.appendChild(e)}let e=function(e,t){let i=[...e];switch(t){case"newest":i.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());break;case"oldest":i.sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime());break;case"by-type":i.sort((e,t)=>{let i=Uu[e.type]??99,r=Uu[t.type]??99;return i!==r?i-r:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()});break;case"open-first":i.sort((e,t)=>{let i=y(e.status)?1:0,r=y(t.status)?1:0;return i!==r?i-r:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()})}return i}(this.feedbacks,this.sortControls.sortMode),t=e.filter(e=>this.selectable(e)).map(e=>e.id);if(t.length>0&&this.listContainer.appendChild(this.bulk.createSelectAllBar(t,this.t("bulk.selectAll"))),this.sortControls.groupByPage){let t=function(e){let t=new Map;for(let i of e){let e=Wu(i.url),r=t.get(e);r?r.push(i):t.set(e,[i])}return new Map([...t.entries()].sort((e,t)=>t[1].length-e[1].length))}(e),i=0;for(let[e,r]of t){let t=Hu(e,r.length);this.listContainer.appendChild(t);let n=df("sp-group-content",e);for(let e of r)n.appendChild(this.createCard(e,i+1)),i++;this.listContainer.appendChild(n)}}else{let t=df("sp-cards",this.t("panel.feedbackList"));e.forEach((e,i)=>{t.appendChild(this.createCard(e,i+1))}),this.listContainer.appendChild(t)}let i=this.totalFeedbacks-this.feedbacks.length;if(i>0){let e=j("div",{class:"sp-load-more-wrap"}),t=document.createElement("button");t.className="sp-btn-ghost sp-btn-load-more",U(t,uu(this.t,"panel.loadMore",{remaining:i})),t.addEventListener("click",()=>this.loadMoreFeedbacks().catch(()=>{})),e.appendChild(t),this.listContainer.appendChild(e)}}lostNote(e){let t=j("div",{class:"sp-lost"});return t.dataset.lostFor=e,U(t,this.t("panel.notOnPage")),t.hidden=!this.markers.isLost(e),t}syncLostNotes(){for(let e of this.root.querySelectorAll("[data-lost-for]"))e.hidden=!this.markers.isLost(e.dataset.lostFor??"")}createCard(e,t){let i=y(e.status),r=qe(e.type,this.colors),n=j("div",{class:"sp-card "+(i?"sp-card--resolved":"")});n.classList.toggle("sp-card--selected",this.bulk.isSelected(e.id)),n.setAttribute("role","listitem"),n.setAttribute("tabindex","0");let s=uu(this.t,"marker.aria",{number:t,type:cu(e.type,this.t),status:pu(e.status,this.t),message:e.message.slice(0,80)});n.setAttribute("aria-label",s),n.dataset.feedbackId=e.id,n.dataset.number=String(t);let o=j("div",{class:"sp-card-bar"});o.style.background=i?"#9ca3af":r;let a=j("div",{class:"sp-card-body"}),l=j("div",{class:"sp-card-header"});this.selectable(e)&&l.appendChild(this.bulk.createCheckbox(e.id,s));let d=j("span",{class:"sp-card-number"});U(d,`#${t}`);let c=j("span",{class:"sp-badge"}),p=function(e,t){switch(e){case"question":return t.typeQuestionBg;case"change":return t.typeChangeBg;case"bug":return t.typeBugBg;default:return t.typeOtherBg}}(e.type,this.colors);c.style.background=p,c.style.color=r,U(c,cu(e.type,this.t));let h=j("span",{class:"sp-badge sp-badge--status"});h.dataset.status=e.status,h.style.background=function(e,t){switch(e){case"in_progress":return t.statusInProgressBg;case"resolved":return t.statusResolvedBg;case"wont_fix":return t.statusWontFixBg;default:return t.statusOpenBg}}(e.status,this.colors),h.style.color=Ge(e.status,this.colors),U(h,pu(e.status,this.t));let u=j("span",{class:"sp-card-date"});U(u,Q(e.createdAt,this.locale)),l.appendChild(d),l.appendChild(c),l.appendChild(h),l.appendChild(u);let f=j("div",{class:"sp-card-message"});U(f,e.message);let g=document.createElement("button");g.className="sp-card-expand",g.dataset.action="expand",U(g,this.t("panel.showMore")),g.style.display="none",g.setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{f.scrollHeight>f.clientHeight&&(g.style.display="block")});let m=j("div",{class:"sp-card-footer"}),b=document.createElement("button");b.className="sp-btn-resolve",b.dataset.action="resolve",b.appendChild(V(i?Ne:Ee));let x=document.createElement("span");U(x,` ${this.t(i?"panel.reopen":"panel.resolve")}`),b.appendChild(x);let v=document.createElement("button");v.className="sp-btn-delete",v.dataset.action="delete",v.appendChild(V(De));let w=document.createElement("span");return U(w,` ${this.t("panel.delete")}`),v.appendChild(w),this.can(e,"canChangeStatus")&&m.appendChild(b),this.can(e,"canDelete")&&m.appendChild(v),a.appendChild(l),a.appendChild(f),a.appendChild(g),a.appendChild(this.lostNote(e.id)),m.hasChildNodes()&&a.appendChild(m),n.appendChild(o),n.appendChild(a),n}can(e,t){return!this.readOnly&&!1!==e.permissions?.[t]}selectable(e){return this.can(e,"canChangeStatus")||this.can(e,"canDelete")}async bulkResolve(e){let t=new Set(this.feedbacks.filter(e=>y(e.status)).map(e=>e.id)),i=e.filter(e=>!t.has(e)),r=await Promise.allSettled(i.map(e=>this.client.resolveFeedback(e,!0)));await this.settleBulk(i,r)}async bulkDelete(e){let t=await Promise.allSettled(e.map(e=>this.client.deleteFeedback(e)));e.forEach((e,i)=>{"fulfilled"===t[i]?.status&&this.bus.emit("feedback:deleted",e)}),await this.settleBulk(e,t)}async settleBulk(e,t){let i=e.filter((e,i)=>"rejected"===t[i]?.status);i.length<e.length&&await this.loadFeedbacks();let r=t.find(e=>"rejected"===e.status);if(!r)return;let n=new Set(this.feedbacks.map(e=>e.id));this.bulk.selectAll(i.filter(e=>n.has(e)));let s=r.reason instanceof Error?r.reason:new Error(String(r.reason));throw this.bus.emit("feedback:error",s),s}async confirmDeleteAll(){if(await this.showConfirmDialog(this.t("panel.deleteAllConfirmTitle"),this.t("panel.deleteAllConfirmMessage"))){this.deleteAllBtn.disabled=!0;try{await this.client.deleteAllFeedbacks(this.projectName),this.bus.emit("feedback:all-deleted"),await this.loadFeedbacks()}catch(e){this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),await this.loadFeedbacks().catch(()=>{})}finally{this.deleteAllBtn.disabled=!1}}}showConfirmDialog(e,t){return new Promise(i=>{let r=j("div",{class:"sp-confirm-backdrop"}),n=`sp-confirm-title-${Date.now()}`,s=`sp-confirm-msg-${Date.now()}`,o=j("div",{class:"sp-confirm-dialog"});o.setAttribute("role","alertdialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-labelledby",n),o.setAttribute("aria-describedby",s);let a=j("div",{class:"sp-confirm-title"});a.id=n,U(a,e);let l=j("div",{class:"sp-confirm-message"});l.id=s,U(l,t);let d=j("div",{class:"sp-confirm-actions"}),c=document.createElement("button");c.type="button",c.className="sp-btn-ghost",U(c,this.t("panel.cancel"));let p=document.createElement("button");p.type="button",p.className="sp-btn-danger",U(p,this.t("panel.confirmDelete"));let h=!1,u=e=>{h||(h=!0,f(),r.style.opacity="0",o.style.transform="translateY(8px) scale(0.97)",i(e),setTimeout(()=>r.remove(),150))},f=oe(r,e=>{if("Escape"===e.key)return e.stopPropagation(),void u(!1);"Tab"===e.key&&(e.preventDefault(),r.getRootNode().activeElement===c?p.focus():c.focus())});c.addEventListener("click",()=>u(!1)),p.addEventListener("click",()=>u(!0)),r.addEventListener("click",e=>{e.target===r&&u(!1)}),d.appendChild(c),d.appendChild(p),o.appendChild(a),o.appendChild(l),o.appendChild(d),r.appendChild(o),this.root.getRootNode()instanceof ShadowRoot?this.root.getRootNode().appendChild(r):this.root.appendChild(r),r.offsetHeight,r.style.opacity="1",o.style.transform="none",c.focus()})}async deleteFeedback(e,t){this.pendingMutations.add(e.id);let i=X(t);try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks()}catch(e){i(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.pendingMutations.delete(e.id)}}async toggleResolve(e,t){this.pendingMutations.add(e.id);let i=X(t);try{let t=!y(e.status);await this.client.resolveFeedback(e.id,t),await this.loadFeedbacks()}catch(e){i(),this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e)))}finally{this.pendingMutations.delete(e.id)}}buildTypeDropdown(){return this.typeOptions=[{value:"all",label:this.t("panel.filterAll"),icon:Be,color:"var(--sp-accent-text)"},{value:"question",label:this.t("type.question"),icon:Ae,color:"var(--sp-type-question)"},{value:"change",label:this.t("type.change"),icon:Te,color:"var(--sp-type-change)"},{value:"bug",label:this.t("type.bug"),icon:Le,color:"var(--sp-type-bug)"},{value:"other",label:this.t("type.other"),icon:Re,color:"var(--sp-type-other)"}],this.typeDropdownContainer=j("div",{class:"sp-filter-dropdown"}),this.typeDropdownBtn=document.createElement("button"),this.typeDropdownBtn.type="button",this.typeDropdownBtn.className="sp-filter-dropdown-btn",this.typeDropdownBtn.setAttribute("aria-haspopup","listbox"),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.renderTypeDropdownTrigger(),this.typeDropdownBtn.addEventListener("click",e=>{e.stopPropagation(),this.typeDropdownMenu?this.closeTypeDropdown():this.openTypeDropdown()}),this.typeDropdownContainer.addEventListener("keydown",e=>{"Escape"!==e.key||!this.typeDropdownMenu||(e.stopPropagation(),this.closeTypeDropdown(),this.typeDropdownBtn.focus())}),this.typeDropdownContainer.appendChild(this.typeDropdownBtn),this.typeDropdownContainer}renderTypeDropdownTrigger(){let e=this.typeOptions.find(e=>this.activeFilters.has(e.value))??this.typeOptions[0];if(!e)return;this.typeDropdownBtn.replaceChildren(),this.typeDropdownBtn.style.setProperty("--sp-chip-color",e.color),this.typeDropdownBtn.dataset.filter=e.value,this.typeDropdownBtn.classList.toggle("sp-filter-dropdown-btn--filtered","all"!==e.value),this.typeDropdownBtn.setAttribute("aria-label",`${this.t("type.label")}: ${e.label}`);let t=j("span",{class:"sp-filter-dropdown-btn__icon"});t.appendChild(V(e.icon)),this.typeDropdownBtn.appendChild(t);let i=j("span",{class:"sp-filter-dropdown-btn__label"}),r=j("span",{class:"sp-filter-dropdown-btn__prefix"});U(r,this.t("type.label"));let n=j("span",{class:"sp-filter-dropdown-btn__value"});U(n,e.label),i.append(r," ",n),this.typeDropdownBtn.appendChild(i);let s=j("span",{class:"sp-filter-dropdown-btn__chevron"});s.appendChild(V(Ie)),this.typeDropdownBtn.appendChild(s)}openTypeDropdown(){this.typeDropdownMenu=j("div",{class:"sp-filter-dropdown-menu"}),this.typeDropdownMenu.setAttribute("role","listbox"),this.typeDropdownMenu.setAttribute("aria-label",this.t("type.label")),this.typeDropdownBtn.setAttribute("aria-expanded","true");for(let e of this.typeOptions){let t=document.createElement("button");t.type="button";let i=this.activeFilters.has(e.value);t.className="sp-filter-dropdown-option"+(i?" sp-filter-dropdown-option--active":""),t.style.setProperty("--sp-chip-color",e.color),t.dataset.filter=e.value,t.setAttribute("role","option"),t.setAttribute("aria-selected",String(i));let r=j("span",{class:"sp-filter-dropdown-option__icon"});r.appendChild(V(e.icon)),t.appendChild(r);let n=j("span",{class:"sp-filter-dropdown-option__label"});if(U(n,e.label),t.appendChild(n),i){let e=j("span",{class:"sp-filter-dropdown-option__check"});e.appendChild(V(Ee)),t.appendChild(e)}t.addEventListener("click",t=>{t.stopPropagation(),this.selectTypeFilter(e.value)}),this.typeDropdownMenu.appendChild(t)}this.typeDropdownContainer.appendChild(this.typeDropdownMenu),this.removeTypeDropdownOutsideClick=q(this.typeDropdownContainer,()=>this.closeTypeDropdown())}closeTypeDropdown(){this.typeDropdownMenu&&(this.typeDropdownMenu.remove(),this.typeDropdownMenu=null),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.removeTypeDropdownOutsideClick?.(),this.removeTypeDropdownOutsideClick=null}selectTypeFilter(e){this.activeFilters.clear(),this.activeFilters.add(e),this.renderTypeDropdownTrigger(),this.closeTypeDropdown(),this.loadFeedbacks().catch(()=>{})}buildStatusSegmented(){return this.statusSegmented=new tf({options:[{value:"all",label:this.t("panel.statusAll"),icon:Be,color:"var(--sp-accent-text)"},{value:"open",label:this.t("panel.statusOpen"),icon:Pe,color:"var(--sp-status-open)"},{value:"resolved",label:this.t("panel.statusClosed"),icon:Me,color:"var(--sp-status-resolved)"}],value:"all",onChange:()=>{this.loadFeedbacks().catch(()=>{})},ariaLabel:this.t("status.label"),datasetKey:"statusFilter",modifierPrefix:"sp-segmented__btn--"}),this.statusSegmented.element}buildScopeSegmented(){return this.scopeSegmented=new tf({options:[{value:"this",label:this.t("scope.thisPage")},{value:"template",label:this.t("scope.thisType")},{value:"all",label:this.t("scope.all")}],value:this.initialScopeFilter,onChange:()=>{this.loadFeedbacks().catch(()=>{})},ariaLabel:this.t("scope.label"),datasetKey:"scopeFilter",modifierPrefix:"sp-segmented__btn--scope-",extraClass:"sp-segmented--scope"}),this.syncScopeAvailability(),this.scopeSegmented.element}syncScopeAvailability(){if(!this.scopeSegmented)return;let e=!!this.getScope().urlPattern;this.scopeSegmented.setOptionVisible("template",e),!e&&"template"===this.scopeSegmented.value&&this.scopeSegmented.select("this")}buildMineToggle(){let e=document.createElement("button");return e.type="button",e.className="sp-mine-toggle",e.title=this.t("panel.filterMineHint"),e.setAttribute("aria-pressed","false"),e.append(V(Oe),this.t("panel.filterMine")),e.addEventListener("click",()=>{this.mineOnly=!this.mineOnly,e.classList.toggle("sp-mine-toggle--active",this.mineOnly),e.setAttribute("aria-pressed",String(this.mineOnly)),this.loadFeedbacks().catch(()=>{})}),e}pressInFocusedCard(e){this.listContainer.querySelectorAll(".sp-card")[Qu(this.listContainer)]?.querySelector(e)?.click()}scrollToFeedback(e,t=!1){if(this.isLoading)return this.pendingScrollId=e,void(this.pendingDetail=t);this.flashCard(e,t)}showFeedback(e){this.scrollToFeedback(e,!0)}flashCard(e,t){let i=CSS.escape(e),r=this.listContainer.querySelector(`[data-feedback-id="${i}"]`);if(r){r.scrollIntoView({behavior:at()?"auto":"smooth",block:"center"}),r.classList.add("sp-anim-flash"),r.addEventListener("animationend",()=>{r.classList.remove("sp-anim-flash")},{once:!0});let i=this.feedbacks.find(t=>t.id===e);i&&(t||nt())&&this.detail.show(i,Number(r.dataset.number))}}draftOf(e){let t=this.threadDrafts.get(e)??{text:""};return this.threadDrafts.set(e,t),t}async postComment(e,t,i){let r=await this.resolveIdentity();if(!r)return null;try{let n=await this.client.addComment(e.id,{body:t,clientId:i,authorName:r.name,authorEmail:r.email,authorRole:"client"});for(let t of new Set([e,this.feedbacks.find(t=>t.id===e.id)]))t&&!t.comments?.some(e=>e.id===n.id)&&(t.comments=[...t.comments??[],n]);let s=this.threadWrites.get(e.id)?.replies??[];return this.threadWrites.set(e.id,{seq:++this.threadWriteCount,replies:[...s,n]}),this.bus.emit("comment:added",n),n}catch(e){throw this.bus.emit("feedback:error",e instanceof Error?e:new Error(String(e))),e}}keepThreads(){let e=this.threadWriteCount;return t=>{let i=this.threadWrites.get(t.id);if(!i||i.seq<=e)return t;let r=new Set(t.comments?.map(e=>e.id)),n=i.replies.filter(e=>!r.has(e.id));if(0===n.length)return t;let s=[...t.comments??[],...n];return s.sort((e,t)=>e.createdAt<t.createdAt?-1:e.createdAt>t.createdAt?1:0),{...t,comments:s}}}reportActionError(e){this.bus.emit("panel:action-error",e instanceof Error?e:new Error(String(e)))}hideDetailOf(e){this.detail.feedbackId===e&&this.detail.hide()}async refreshDetail(e){if(this.isOpen&&await this.loadFeedbacks(this.currentPage),this.detail.feedbackId!==e)return;let t=this.feedbacks.findIndex(t=>t.id===e),i=this.feedbacks[t];i?this.detail.show(i,t+1):this.detail.hide()}async refresh(){this.isOpen&&await this.loadFeedbacks()}get isCurrentlyOpen(){return this.isOpen}destroy(){this.isOpen=!1,document.removeEventListener("pointerdown",this.onOutsidePointer,!0),document.removeEventListener("keydown",this.onOutsideKeydown),this.loadController?.abort(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.listContainer.removeEventListener("click",this.onListClick),this.listContainer.removeEventListener("keydown",this.onListKeydown),this.listContainer.removeEventListener("mouseover",this.onListMouseover),this.listContainer.removeEventListener("mouseout",this.onListMouseout),document.removeEventListener("sp-marker-click",this.onMarkerClick),this.closeTypeDropdown(),this.sortControls.destroy(),this.bulk.destroy(),this.exportBtn.destroy(),this.shortcuts.destroy(),this.detail.destroy(),this.scrim.remove(),this.root.remove()}}});$(),$(),F();var uf=new Set(["role","name","aria-label","rel","href"]);function ff(e,t){let i=uf.has(e);i||=e.startsWith("data-")&&yf(e);let r=yf(t)&&t.length<100;return r||=t.startsWith("#")&&yf(t.slice(1)),i&&r}function gf(e){return yf(e)}function mf(e){return yf(e)}function bf(e){return!0}function xf(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";let i,r={root:document.body,idName:gf,className:mf,tagName:bf,attr:ff,timeoutMs:1e3,seedMinLength:3,optimizedMinLength:2,maxNumberOfPathChecks:1/0},n=new Date,s={...r,...t},o=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(s.root,r),a=0;for(let t of function*(e,t,i){let r=[],n=[],s=e,o=0;for(;s&&s!==i;){let e=vf(s,t);for(let t of e)t.level=o;if(r.push(e),s=s.parentElement,o++,n.push(...Tf(r)),o>=t.seedMinLength){n.sort(Cf);for(let e of n)yield e;n=[]}}n.sort(Cf);for(let e of n)yield e}(e,s,o)){if((new Date).getTime()-n.getTime()>s.timeoutMs||a>=s.maxNumberOfPathChecks){let t=Ef(e,o);if(!t)throw new Error(`Timeout: Can't find a unique selector after ${s.timeoutMs}ms`);return wf(t)}if(a++,Lf(t,o)){i=t;break}}if(!i)throw new Error("Selector was not found.");let l=[...Rf(i,e,s,o,n)];return l.sort(Cf),l.length>0?wf(l[0]):wf(i)}function yf(e){if(/^[a-z\-]{3,}$/i.test(e)){let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0}return!1}function vf(e,t){let i=[],r=e.getAttribute("id");r&&t.idName(r)&&i.push({name:"#"+CSS.escape(r),penalty:0});for(let r=0;r<e.classList.length;r++){let n=e.classList[r];t.className(n)&&i.push({name:"."+CSS.escape(n),penalty:1})}for(let r=0;r<e.attributes.length;r++){let n=e.attributes[r];t.attr(n.name,n.value)&&i.push({name:`[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,penalty:2})}let n=e.tagName.toLowerCase();if(t.tagName(n)){i.push({name:n,penalty:5});let t=Sf(e,n);void 0!==t&&i.push({name:Af(n,t),penalty:10})}let s=Sf(e);return void 0!==s&&i.push({name:Mf(n,s),penalty:50}),i}function wf(e){let t=e[0],i=t.name;for(let r=1;r<e.length;r++){let n=e[r].level||0;i=t.level===n-1?`${e[r].name} > ${i}`:`${e[r].name} ${i}`,t=e[r]}return i}function kf(e){return e.map(e=>e.penalty).reduce((e,t)=>e+t,0)}function Cf(e,t){return kf(e)-kf(t)}function Sf(e,t){let i=e.parentNode;if(!i)return;let r=i.firstChild;if(!r)return;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&(void 0===t||r.tagName.toLowerCase()===t)&&n++,r!==e);)r=r.nextSibling;return n}function Ef(e,t){let i=0,r=e,n=[];for(;r&&r!==t;){let e=r.tagName.toLowerCase(),t=Sf(r,e);if(void 0===t)return;n.push({name:Af(e,t),penalty:NaN,level:i}),r=r.parentElement,i++}if(Lf(n,t))return n}function Mf(e,t){return"html"===e?"html":`${e}:nth-child(${t})`}function Af(e,t){return"html"===e?"html":`${e}:nth-of-type(${t})`}function*Tf(e,t=[]){if(e.length>0)for(let i of e[0])yield*Tf(e.slice(1,e.length),t.concat(i));else yield t}function Lf(e,t){let i=wf(e);switch(t.querySelectorAll(i).length){case 0:throw new Error(`Can't select any node with this selector: ${i}`);case 1:return!0;default:return!1}}function*Rf(e,t,i,r,n){if(e.length>2&&e.length>i.optimizedMinLength)for(let s=1;s<e.length-1;s++){if((new Date).getTime()-n.getTime()>i.timeoutMs)return;let o=[...e];o.splice(s,1),Lf(o,r)&&r.querySelector(wf(o))===t&&(yield o,yield*Rf(o,t,i,r,n))}}$();var Bf=["role","aria-label","type","name","href","src","data-testid","data-id"];function Pf(e){let t=e.children.length,i=0,r=e.parentElement;if(r)for(let t of r.children){if(t===e)break;t.tagName===e.tagName&&i++}return`${t}:${i}:${If(e)}`}function If(e){let t=[];for(let i of Bf){let r=e.getAttribute(i);r&&t.push(`${i}=${r}`)}return t.length>0?function(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t+e.charCodeAt(i)|0;return(t>>>0).toString(36)}(t.join(",")):"0"}H();var Nf=256;function Df(e,t){let i=e;for(;i&&z(i);)i=i[t];return i}function Of(e){return 1===e.nodeType&&"true"===e.getAttribute("data-siteping-ignore")}function $f(e){return 3===e.nodeType?NodeFilter.FILTER_ACCEPT:Of(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}function Ff(e,t){let i="before"===t?"previousElementSibling":"nextElementSibling",r=Df(e[i],i),n=3;for(;r&&n>0;){let e="before"===t?Wf(r,Nf,!0).trim():_f(r,Nf,!0).trim();if(e)return"before"===t?e.slice(-32):e.slice(0,32);r=Df(r[i],i),n--}return""}function zf(e){let t=Df(e.previousElementSibling,"previousElementSibling"),i=Df(e.nextElementSibling,"nextElementSibling");return[t?_f(t,Nf,!0).trim().slice(0,40):"",i?_f(i,Nf,!0).trim().slice(0,40):""].filter(Boolean).join(" | ")}function _f(e,t,i=!1){let r="";if(null===e.firstElementChild){for(let i of e.childNodes)if(3===i.nodeType&&(r+=i.data,r.length>=t))break;return r.length>t?r.slice(0,t):r}let n=i?e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,$f):e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.length<t;){let e=n.nextNode();if(!e)break;r+=e.data}return r.length>t?r.slice(0,t):r}function Wf(e,t,i=!1){let r="",n=e=>{for(let s=e.lastChild;s;s=s.previousSibling)if(3===s.nodeType){if(r=s.data+r,r.length>=t)return!0}else if(1===s.nodeType&&(!i||!Of(s))&&n(s))return!0;return!1};return n(e),r.length>t?r.slice(-t):r}function Hf(e){return e.id&&e.id.length<=T?e.id:void 0}function Vf(e){return e.includes("'")?`concat('${e.replace(/'/g,"',\"'\",'")}')`:`'${e}'`}$();var jf="data-feedback-anchor",Uf=" >>> ",qf={className:e=>!/^(css|sc|emotion|styled)-/.test(e)&&!/^[a-z]{1,3}[A-Za-z0-9]{4,8}$/.test(e),attr:e=>["data-testid","data-id","role","aria-label"].includes(e),idName:e=>!e.startsWith("radix-")&&!/^:r[0-9]+:$/.test(e),seedMinLength:3,optimizedMinLength:2};function Gf(e,t){let i=e;for(;i;){let e=i.closest(t);if(e)return e;let r=i.getRootNode();i=r instanceof ShadowRoot?r.host:null}return null}function Yf(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode();return t instanceof ShadowRoot?t.host:null}function Kf(e){let t=[],i=e;for(;i;){let e=i.getRootNode();e instanceof ShadowRoot?(t.unshift(xf(i,{...qf,root:e})),i=e.host):(t.unshift(xf(i,qf)),i=null)}let r=t.join(Uf),n=function(e){if(e.getRootNode()instanceof ShadowRoot)return function(e){let t="";for(let i=e;i;i=i.parentElement){let e=i.localName,r=Hf(i);if(r){t=`/${e}[@id=${Vf(r)}]${t}`;continue}let n=1;for(let t=i.previousElementSibling;t;t=t.previousElementSibling)t.localName===e&&n++;t=`/${e}[${n}]${t}`}return`.${t}`}(e);let t=Hf(e);if(t)return`//${e.localName}[@id=${Vf(t)}]`;let i=[],r=e;for(;r&&r!==document.body&&i.length<6;){let e=r.localName,t=r.parentElement,n=Hf(r);if(n)return i.unshift(`/${e}[@id=${Vf(n)}]`),"/"+i.join("");let s=1;if(t)for(let i of t.children){if(i===r)break;i.localName===e&&s++}i.unshift(`/${e}[${s}]`),r=t}return r!==document.body?"/"+i.join(""):"/html/body"+i.join("")}(e),s=null!==Gf(e,'[data-siteping-ignore="true"]'),o=s?"":_f(e,256,!0).trim().slice(0,120),a=s?"":Ff(e,"before"),l=s?"":Ff(e,"after"),d=Pf(e),c=s?"":zf(e),p=Gf(e,`[${jf}]`)?.getAttribute(jf)??null;return{cssSelector:r,xpath:n,textSnippet:o,textPrefix:a,textSuffix:l,fingerprint:d,neighborText:c,elementTag:e.tagName.slice(0,A),elementId:e.id&&e.id.length<=T?e.id:void 0,anchorKey:p}}function Xf(e,t){let i=e.getBoundingClientRect();return i.left<=t.x&&i.top<=t.y&&i.right>=t.x+t.width&&i.bottom>=t.y+t.height}function Jf(e,t){let i=document.elementFromPoint(e,t),r=i?.shadowRoot;for(;r&&"function"==typeof r.elementFromPoint;){let n=r.elementFromPoint(e,t);if(!n||n.getRootNode()!==r)break;i=n,r=n.shadowRoot}return i}te(),H(),ze(),F(),te(),ze(),_e();var Qf={width:334,height:280},Zf={top:0,bottom:0};it(),dt();var eg,tg={question:"type.question",change:"type.change",bug:"type.bug",other:"type.other"},ig=`opacity 200ms ease,transform 200ms ${D}`,rg=`background-color 0.15s ease,border-color 0.15s ease,color 0.15s ease,box-shadow 0.15s ease,opacity 0.15s ease,scale 0.16s ${D}`,ng="blur(30px) saturate(180%)",sg=class{constructor(e,t){this.colors=e,this.t=t,this.root=j("div",{style:`position:fixed;z-index:2147483647;pointer-events:auto;width:300px;padding:16px;border:none;border-radius:18px;color:${this.colors.text};font-family:${tt};opacity:0;transform:scale(0.96);transition:${ig};display:none;-webkit-font-smoothing:antialiased;`}),this.root.setAttribute("role","dialog"),this.root.setAttribute("aria-modal","true"),this.root.setAttribute("data-siteping-ignore","true");let i=[{type:"question",icon:Ae},{type:"change",icon:Te},{type:"bug",icon:Le},{type:"other",icon:Re}];this.typeRow=j("div",{style:"display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;"});for(let e of i){let t=document.createElement("button");t.style.cssText=`height:50px;padding:0 12px;border:none;border-radius:12px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-family:${tt};font-size:13px;font-weight:500;letter-spacing:-0.005em;transition:${rg};`;let i=V(e.icon);i.style.cssText=`width:17px;height:17px;flex-shrink:0;color:${qe(e.type,this.colors)};`,t.appendChild(i),t.appendChild(document.createElement("span")),t.dataset.type=e.type,t.setAttribute("aria-pressed","false"),this.paintType(t),t.addEventListener("click",()=>{this.submittingState||this.selectType(e.type,this.typeRow)}),t.addEventListener("mouseenter",()=>{this.submittingState||!ot()||this.paintType(t,!0)}),t.addEventListener("mouseleave",()=>{this.submittingState||this.paintType(t)}),Z(t),ee(t,this.colors.accent),this.typeRow.appendChild(t)}this.textarea=document.createElement("textarea"),this.textarea.style.cssText=`width:100%;min-height:80px;max-height:152px;padding:9px 12px;border:none;border-radius:12px;color:${this.colors.text};font-family:${tt};font-size:15px;line-height:1.35;letter-spacing:-0.01em;resize:vertical;outline:none;box-shadow:none;transition:${rg};box-sizing:border-box;`,this.textarea.maxLength=5e3,this.paintField(!1),this.hint=j("div",{style:`font-size:11px;color:${this.colors.textSecondary};text-align:right;margin-top:6px;font-family:${tt};letter-spacing:0.01em;`}),this.textarea.addEventListener("focus",()=>{this.submittingState||this.paintField(!0)}),this.textarea.addEventListener("blur",()=>{this.submittingState||this.paintField(!1)}),this.textarea.addEventListener("input",()=>{this.updateSubmitState()}),this.textarea.addEventListener("keydown",e=>{this.submittingState||"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.submit())});let r=j("div",{style:"display:flex;justify-content:flex-end;gap:8px;margin-top:12px;"});this.cancelBtn=document.createElement("button"),this.cancelBtn.style.cssText=`height:34px;padding:0 18px;border:none;border-radius:9999px;color:${this.colors.text};font-family:${tt};font-size:15px;font-weight:500;letter-spacing:-0.01em;cursor:pointer;transition:${rg};`,this.paintCancel(!1),this.cancelBtn.addEventListener("click",()=>this.dismiss()),this.cancelBtn.addEventListener("mouseenter",()=>{this.submittingState||!ot()||this.paintCancel(!0)}),this.cancelBtn.addEventListener("mouseleave",()=>{this.submittingState||this.paintCancel(!1)}),this.submitBtn=document.createElement("button"),this.submitBtn.style.cssText=`position:relative;height:34px;padding:0 20px;border:none;border-radius:9999px;background:${this.colors.accent};color:#fff;font-family:${tt};font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;opacity:0.35;pointer-events:none;transition:${rg};display:inline-flex;align-items:center;justify-content:center;min-width:64px;`,this.submitLabel=document.createElement("span"),this.submitBtn.appendChild(this.submitLabel),this.submitBtn.addEventListener("click",()=>this.submit()),this.submitBtn.addEventListener("mouseenter",()=>{this.submittingState||!ot()||(this.submitBtn.style.background=this.colors.accentDark)}),this.submitBtn.addEventListener("mouseleave",()=>{this.submitBtn.style.background=this.colors.accent}),Z(this.cancelBtn),Z(this.submitBtn),ee(this.cancelBtn,this.colors.accent),ee(this.submitBtn,this.colors.accent),r.appendChild(this.cancelBtn),r.appendChild(this.submitBtn),this.root.appendChild(this.typeRow),this.root.appendChild(this.textarea),this.root.appendChild(this.hint),this.root.appendChild(r),re(this.root),document.body.appendChild(this.root),this.applyLabels()}colors;t;root;selectedType=null;textarea;submitBtn;cancelBtn;typeRow;submitLabel;hint;resolve=null;previouslyFocused=null;removeKeydownTrap=null;onSubmit=null;submittingState=!1;showFrame=null;hideTimeoutId=null;spinnerAnimation=null;sheet=!1;stopKeyboardTracking=null;get isOpen(){return null!==this.resolve}get sheetTop(){return this.sheet&&this.isOpen?window.innerHeight-this.root.offsetHeight:null}refreshLabels(){this.applyLabels()}applyLabels(){this.root.setAttribute("aria-label",this.t("popup.ariaLabel"));let e=this.root.querySelectorAll("button[data-type]");for(let t of e){let e=t.dataset.type;if(!e)continue;let i=tg[e];if(!i)continue;let r=t.querySelector("span");r&&U(r,this.t(i))}this.textarea.placeholder=this.t("popup.placeholder"),this.textarea.setAttribute("aria-label",this.t("popup.textareaAria")),U(this.hint,J()?this.t("popup.submitHintMac"):this.t("popup.submitHintOther")),U(this.cancelBtn,this.t("popup.cancel")),U(this.submitLabel,this.t("popup.submit"))}show(e,t,i=Zf){return new Promise(r=>{this.cancelPendingTransition(),this.resolve=r,this.onSubmit=t??null,this.selectedType=null,this.textarea.value="",this.submittingState=!1;let n=st();this.sheet=nt(),this.updateSubmitState(),this.resetTypeButtons(),this.previouslyFocused=document.activeElement;let s=this.sheet?"48px":n?"44px":"34px";this.cancelBtn.style.height=s,this.submitBtn.style.height=s,this.cancelBtn.style.flex=this.sheet?"1":"",this.submitBtn.style.flex=this.sheet?"2":"",this.textarea.style.fontSize=n?"16px":"15px",this.textarea.style.minHeight=this.sheet?"104px":"80px",this.paintField(!1),this.paintCancel(!1),this.submitBtn.style.background=this.colors.accent,this.hint.style.display=n?"none":"",this.root.style.transform=this.hiddenTransform(),ne(this.root,!1),this.root.style.display="block",this.layout(e,i),this.removeKeydownTrap?.(),this.removeKeydownTrap=oe(this.root,e=>{if("Escape"===e.key&&this.dismiss(),"Tab"===e.key){let t=Array.from(this.root.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===t.length)return;let i=t[0],r=t[t.length-1];if(!i||!r)return;e.shiftKey?(document.activeElement===i||!this.root.contains(document.activeElement))&&(e.preventDefault(),r.focus()):(document.activeElement===r||!this.root.contains(document.activeElement))&&(e.preventDefault(),i.focus())}}),this.root.style.transition=at()?"none":this.sheet?"opacity 300ms ease,transform 300ms cubic-bezier(0.32, 0.72, 0, 1)":ig,this.showFrame=requestAnimationFrame(()=>{this.showFrame=null,this.root.style.opacity="1",this.root.style.transform="none",(n?this.typeRow.querySelector("button"):this.textarea)?.focus()})})}layout(e,t){let i=this.root.style,{surface:r}=this.colors;if(i.width=this.sheet?"auto":"300px",i.borderRadius=this.sheet?"16px 16px 0 0":"18px",i.background=this.sheet?r.grouped:r.material,i.backdropFilter=this.sheet?"none":ng,i.setProperty("-webkit-backdrop-filter",this.sheet?"none":ng),i.boxShadow=this.sheet?`0 -0.5px 0 ${r.hairline}, 0 -10px 40px rgba(0, 0, 0, 0.16)`:`inset 0 0.5px 0 ${r.edge}, ${r.shadowCard}`,i.overscrollBehavior=this.sheet?"contain":"",this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,this.sheet){i.top="auto",i.left="0",i.right="0",i.overflowY="auto";let e=(e,t=window.innerHeight)=>{i.bottom=`${e}px`,i.maxHeight=t-8+"px",i.padding="16px 16px "+(e>0?"16px":"calc(16px + env(safe-area-inset-bottom, 0px))")};return e(0),void(this.stopKeyboardTracking=lt(e))}i.right="",i.bottom="",i.padding="16px",i.maxHeight="",i.overflowY="";let{top:n,left:s,maxHeight:o}=function(e,t,i,r=Zf){let n,s=r.top+8,o=i.height-r.bottom-8,a=Math.max(0,o-s),l=e.bottom+8,d=e.top-8-t.height,c=e=>e>=s&&e+t.height<=o,p=null;c(l)?n=l:c(d)?n=d:t.height<=a?n=Math.min(Math.max(l,s),o-t.height):(n=s,p=a);let h=e.left;return h+t.width>i.width-8&&(h=e.right-t.width),h=Math.max(8,Math.min(h,i.width-8-t.width)),{top:n,left:h,maxHeight:p}}(e,this.measure(),{width:window.innerWidth,height:window.innerHeight},t);i.top=`${n}px`,i.left=`${s}px`;let{width:a,height:l}=this.measure(),d=Math.min(Math.max(e.left+e.width/2-s,0),a);i.transformOrigin=`${Math.round(d)}px ${n>=e.top+e.height/2?0:l}px`,null!==o&&(i.maxHeight=`${Math.max(0,o-this.verticalChromeHeight())}px`,i.overflowY="auto",this.root.scrollTop=0)}hiddenTransform(){return this.sheet?"translateY(100%)":"scale(0.96)"}measure(){let e=this.root.offsetWidth,t=this.root.offsetHeight;return e>0&&t>0?{width:e,height:t}:Qf}verticalChromeHeight(){let e=window.getComputedStyle(this.root);return"border-box"===e.boxSizing?0:[e.paddingTop,e.paddingBottom,e.borderTopWidth,e.borderBottomWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0)}selectType(e,t){this.selectedType=e;let i=t.querySelectorAll("button");for(let t of i)t.setAttribute("aria-pressed",String(t.dataset.type===e)),this.paintType(t);this.updateSubmitState()}resetTypeButtons(){let e=this.root.querySelectorAll("button[data-type]");for(let t of e)t.setAttribute("aria-pressed","false"),t.disabled=!1,t.style.cursor="pointer",this.paintType(t)}paintType(e,t=!1){let{surface:i}=this.colors,r=e.style;if("true"===e.getAttribute("aria-pressed")){let t=qe(e.dataset.type??"",this.colors);return r.background=`color-mix(in srgb, ${t} 15%, ${i.row})`,r.color=`color-mix(in srgb, ${t} 78%, ${i.inkMix})`,r.fontWeight="600",void(r.boxShadow=`inset 0 0 0 1.5px ${t}`)}r.background=t?i.fillStrong:this.sheet?i.row:i.fill,r.color=this.colors.text,r.fontWeight="500",r.boxShadow="none"}paintField(e){let{surface:t}=this.colors;this.textarea.style.background=e||this.sheet?t.row:t.fill,this.textarea.style.boxShadow=e?`0 0 0 3px color-mix(in srgb, ${this.colors.accent} 30%, transparent)`:"none"}paintCancel(e){let{surface:t}=this.colors;this.cancelBtn.style.background=e||this.sheet?t.fillStrong:t.fill}updateSubmitState(){if(this.submittingState)return;let e=this.textarea.value.trim().length>0;this.submitBtn.disabled=!e,this.submitBtn.style.opacity=e?"1":"0.35",this.submitBtn.style.pointerEvents=e?"auto":"none"}submit(){if(this.submittingState||!this.textarea.value.trim())return;let e={type:this.selectedType??"other",message:this.textarea.value.trim()};if(!this.onSubmit)return this.resolve?.(e),this.resolve=null,void this.hideElement();this.enterSubmittingState(),(0,this.onSubmit)(e).then(()=>{this.resolve?.(e),this.resolve=null,this.hideElement()}).catch(()=>{this.exitSubmittingState()})}dismiss(){this.submittingState||!this.isOpen||(this.resolve?.(null),this.resolve=null,this.hideElement())}enterSubmittingState(){this.submittingState=!0,this.submitLabel.style.opacity="0",this.submitBtn.disabled=!0,this.submitBtn.style.cursor="wait",this.submitBtn.style.opacity="0.85",this.submitBtn.setAttribute("aria-busy","true"),this.submitBtn.appendChild(this.buildSpinner()),this.cancelBtn.disabled=!0,this.cancelBtn.style.opacity="0.5",this.cancelBtn.style.cursor="not-allowed",this.cancelBtn.style.pointerEvents="none",this.textarea.disabled=!0,this.textarea.style.opacity="0.6";let e=this.typeRow.querySelectorAll("button");for(let t of e)t.disabled=!0,t.style.cursor="not-allowed",t.style.opacity="0.6"}exitSubmittingState(){this.submittingState=!1,this.spinnerAnimation?.cancel(),this.spinnerAnimation=null,this.submitBtn.querySelector('[data-role="sp-popup-spinner"]')?.remove(),this.submitLabel.style.opacity="",this.submitBtn.removeAttribute("aria-busy"),this.submitBtn.style.cursor="pointer",this.cancelBtn.disabled=!1,this.cancelBtn.style.opacity="1",this.cancelBtn.style.cursor="pointer",this.cancelBtn.style.pointerEvents="auto",this.textarea.disabled=!1,this.textarea.style.opacity="1";let e=this.typeRow.querySelectorAll("button");for(let t of e)t.disabled=!1,t.style.cursor="pointer",t.style.opacity="1";this.updateSubmitState()}buildSpinner(){let e=document.createElement("div");return e.dataset.role="sp-popup-spinner",e.style.cssText="position:absolute;inset:0;margin:auto;width:14px;height:14px;border:2px solid rgba(255,255,255,0.35);border-top-color:#fff;border-radius:50%;box-sizing:border-box;",!at()&&"function"==typeof e.animate&&(this.spinnerAnimation=e.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,iterations:1/0,easing:"linear"})),e}hideElement(){this.cancelPendingTransition(),this.removeKeydownTrap?.(),this.removeKeydownTrap=null,this.submittingState&&this.exitSubmittingState(),this.onSubmit=null,this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,at()||(this.root.style.transition=ig),this.root.style.opacity="0",this.root.style.transform=this.hiddenTransform(),this.previouslyFocused?.focus(),this.previouslyFocused=null,ne(this.root,!0),at()?this.root.style.display="none":this.hideTimeoutId=setTimeout(()=>{this.hideTimeoutId=null,this.root.style.display="none"},200)}cancelPendingTransition(){null!==this.showFrame&&cancelAnimationFrame(this.showFrame),null!==this.hideTimeoutId&&clearTimeout(this.hideTimeoutId),this.showFrame=null,this.hideTimeoutId=null}destroy(){this.submittingState&&this.exitSubmittingState(),this.cancelPendingTransition(),this.resolve?.(null),this.resolve=null,this.onSubmit=null,this.removeKeydownTrap?.(),this.removeKeydownTrap=null,this.stopKeyboardTracking?.(),this.stopKeyboardTracking=null,this.root.remove()}},og=!1;function ag(e,t,i){return Math.min(i,Math.max(e,t))}function lg(e){return ag(0,Math.round(1e4*e)/1e4,1)}it(),dt();function dg(e){let t=Math.max(0,e.left),i=Math.max(0,e.top);return new DOMRect(t,i,Math.max(0,Math.min(e.right,window.innerWidth)-t),Math.max(0,Math.min(e.bottom,window.innerHeight)-i))}var cg=class{constructor(e,t,i,r=!1,n){this.colors=e,this.bus=t,this.t=i,this.enableScreenshot=r,this.getFallbackTarget=n,this.popup=new sg(e,i),this.bus.on("annotation:start",()=>this.activate())}colors;bus;t;enableScreenshot;getFallbackTarget;overlay=null;toolbar=null;toolbarCancel=null;cancelFrozen=!1;drawingRect=null;startX=0;startY=0;isDrawing=!1;isActive=!1;instantMode=!1;popup;stalePopup=!1;savedOverflow="";preActiveFocusElement=null;keyboardTarget=null;rafId=null;pendingMoveEvent=null;rejectPendingSubmission=null;unregisterEscapeLayer=se(document,()=>this.isActive);get isBusy(){return this.isActive}refreshLabels(){this.popup.refreshLabels()}restyle(){this.stalePopup=this.isActive||this.popup.isOpen,!this.stalePopup&&(this.popup.destroy(),this.popup=new sg(this.colors,this.t))}async maybeCapture(e){return this.enableScreenshot?async function(e){let t=await async function(){if(void 0!==eg)return eg;try{let e=await Promise.resolve().then(()=>($h(),ct));return eg=e.default??e}catch(e){return eg=null,og||(og=!0,console.warn("[siteping] html2canvas-pro import failed unexpectedly. Capture is disabled for this session \u2014 feedbacks are still submitted, just without screenshots. Underlying error:",e)),null}}();if(!t)return null;let i=1200,r=ag(48,.6*e.width,280),n=ag(48,.6*e.height,220),s=window.scrollX+e.x,o=window.scrollY+e.y,a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),l=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),d=Math.max(0,s-r),c=Math.max(0,o-n),p=Math.min(a,s+e.width+r)-d,h=Math.min(l,o+e.height+n)-c;if(p<=0||h<=0)return null;let u={xPct:lg((s-d)/p),yPct:lg((o-c)/h),wPct:lg(e.width/p),hPct:lg(e.height/h)};try{let e=await t(document.body,{x:d,y:c,width:p,height:h,scale:window.devicePixelRatio,useCORS:!0,allowTaint:!0,logging:!1,ignoreElements:e=>"SITEPING-WIDGET"===e.tagName||null!==e.closest?.("siteping-widget")||"true"===e.getAttribute?.("data-siteping-ignore")});if(e.width<=i)return{dataUrl:e.toDataURL("image/jpeg",.85),region:u};let r=i/e.width,n=i,s=Math.round(e.height*r),o=document.createElement("canvas");o.width=n,o.height=s;let a=o.getContext("2d");return a?(a.drawImage(e,0,0,n,s),{dataUrl:o.toDataURL("image/jpeg",.85),region:u}):null}catch(e){return console.warn("[siteping] Screenshot capture failed:",e),null}}(e):null}activate(){if(this.isActive)return;this.isActive=!0;let e=!this.instantMode,t=st(),i=this.t("annotator.instruction");this.preActiveFocusElement=document.activeElement;let r=document.activeElement;if(this.keyboardTarget=r instanceof HTMLElement&&r!==document.body&&r!==document.documentElement&&!z(r)?_(r):this.getFallbackTarget?.()??null,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.overlay=j("div",{style:`position:fixed;inset:0;z-index:2147483646;pointer-events:auto;background:${this.colors.surface.overlayTint};cursor:${e?"crosshair":"default"};touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;`}),this.overlay.setAttribute("role","application"),this.overlay.setAttribute("aria-label",e?i:this.t("annotator.instantInstruction")),this.overlay.setAttribute("data-siteping-ignore","true"),e){let e="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-transparency: reduce), (prefers-contrast: more)").matches?"background:#000000;":"background:rgba(0, 0, 0, 0.86);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);";this.toolbar=j("div",{style:`position:fixed;top:calc(env(safe-area-inset-top,0px) + 10px);left:0;right:0;width:max-content;max-width:calc(100vw - 24px);margin:0 auto;z-index:2147483647;pointer-events:auto;min-height:44px;box-sizing:border-box;padding:5px 5px 5px 16px;border:none;border-radius:22px;${e} box-shadow:inset 0 0 0 0.5px rgba(255,255,255,0.14),0 12px 32px rgba(0,0,0,0.28);display:flex;align-items:center;justify-content:center;gap:12px;font-family:${tt};font-size:13px;line-height:1.35;color:#f5f5f7;-webkit-font-smoothing:antialiased;`}),this.toolbar.setAttribute("data-siteping-ignore","true");let r=`color-mix(in srgb, ${this.colors.accent} 50%, #ffffff)`,n=j("span",{style:`width:8px;height:8px;border-radius:50%;flex-shrink:0;background:${r};box-shadow:0 0 10px color-mix(in srgb,${this.colors.accent} 60%,#ffffff);`});!at()&&"function"==typeof n.animate&&n.animate([{opacity:1},{opacity:.4},{opacity:1}],{duration:1500,easing:"ease-in-out",iterations:1/0});let s=j("span",{style:"font-weight:500;letter-spacing:-0.005em;min-width:0;color:rgba(255, 255, 255, 0.94);"});U(s,t?this.t("annotator.touchInstruction"):i);let o=document.createElement("button");o.style.cssText=`height:${t?40:34}px;padding:0 14px;border:none;border-radius:9999px;flex-shrink:0;color:#ffffff;font-family:${tt};font-size:13px;font-weight:600;cursor:pointer;touch-action:manipulation;transition:background-color 0.15s ease,color 0.15s ease,opacity 0.15s ease,scale 0.16s ${D};`,U(o,this.t("annotator.cancel")),o.addEventListener("click",()=>this.cancelSession()),Z(o),ee(o,r),o.addEventListener("mouseenter",()=>{!this.cancelFrozen&&ot()&&this.paintCancel(!0)}),o.addEventListener("mouseleave",()=>this.paintCancel(!1)),this.toolbarCancel=o,this.paintCancel(!1),this.toolbar.appendChild(n),this.toolbar.appendChild(s),this.toolbar.appendChild(o)}e&&(this.overlay.addEventListener("mousedown",this.onMouseDown),this.overlay.addEventListener("mousemove",this.onMouseMove),this.overlay.addEventListener("mouseup",this.onMouseUp),this.overlay.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.overlay.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.overlay.addEventListener("touchend",this.onTouchEnd),this.overlay.addEventListener("keydown",this.onOverlayKeyDown)),this.overlay.setAttribute("tabindex","0"),document.addEventListener("keydown",this.onKeyDown),re(this.overlay),this.toolbar&&re(this.toolbar),document.body.appendChild(this.overlay),this.toolbar&&(document.body.appendChild(this.toolbar),!at()&&"function"==typeof this.toolbar.animate&&this.toolbar.animate([{transform:"translateY(-100%)"},{transform:"none"}],{duration:250,easing:D})),this.overlay.focus({preventScroll:!0})}toolbarInsets(){if(!this.toolbar)return Zf;if("function"==typeof this.toolbar.getAnimations)for(let e of this.toolbar.getAnimations())e.finish();let e=this.toolbar.getBoundingClientRect();if(0===e.height)return Zf;let t=window.innerHeight;return e.top+e.height/2<t/2?{top:Math.max(0,e.bottom),bottom:0}:{top:0,bottom:Math.max(0,t-e.top)}}cancelSession(){this.isActive&&(this.popup.dismiss(),!this.popup.isOpen&&this.deactivate())}paintCancel(e){let t=this.toolbarCancel;t&&(t.style.color=e?"#ff8a80":"#ffffff",t.style.background=e?"rgba(255, 69, 58, 0.26)":"rgba(255, 255, 255, 0.16)")}freezeCancel(e){this.cancelFrozen=e;let t=this.toolbarCancel;t&&(e&&this.paintCancel(!1),t.style.opacity=e?"0.5":"1",t.style.cursor=e?"not-allowed":"pointer",e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled"))}deactivate(){if(!this.isActive)return;this.isActive=!1,this.isDrawing=!1,this.instantMode=!1;let e=this.preActiveFocusElement;this.preActiveFocusElement=null,this.keyboardTarget=null,null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingMoveEvent=null,document.body.style.overflow=this.savedOverflow,document.removeEventListener("keydown",this.onKeyDown),this.overlay?.remove(),this.toolbar?.remove(),this.drawingRect?.remove(),this.overlay=null,this.toolbar=null,this.toolbarCancel=null,this.cancelFrozen=!1,this.drawingRect=null,e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0}),this.bus.emit("annotation:end"),this.stalePopup&&this.restyle()}onKeyDown=e=>{"Escape"===e.key&&this.cancelSession()};onOverlayKeyDown=async e=>{if("Enter"!==e.key||(e.preventDefault(),this.popup.isOpen)||this.isDrawing)return;let t=this.keyboardTarget;!t||!(t instanceof HTMLElement)||await this.annotateElement(t)};async annotateElement(e,t=!1){let i=e.getBoundingClientRect();if(i.width<=0||i.height<=0)return;let r=new DOMRect(i.x,i.y,i.width,i.height);this.drawingRect?.remove();let n=this.createDrawingRect();n.style.left=`${i.x}px`,n.style.top=`${i.y}px`,n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,this.drawingRect=n,this.overlay?.appendChild(n);let s={anchor:Kf(e),rect:{xPct:0,yPct:0,wPct:1,hPct:1},scrollX:window.scrollX,scrollY:window.scrollY,viewportW:window.innerWidth,viewportH:window.innerHeight,devicePixelRatio:window.devicePixelRatio},o=await this.openForm(s,r,t?dg(r):r);this.drawingRect?.remove(),this.drawingRect=null,o&&this.deactivate()}onMouseDown=e=>{this.startDrawing(e.clientX,e.clientY)};onTouchStart=e=>{e.preventDefault();let t=e.touches[0];t&&this.startDrawing(t.clientX,t.clientY)};startDrawing(e,t){this.popup.isOpen||(this.isDrawing=!0,this.startX=e,this.startY=t,this.drawingRect?.remove(),this.drawingRect=this.createDrawingRect(),this.overlay?.appendChild(this.drawingRect))}createDrawingRect(){let{accent:e}=this.colors,t=j("div",{style:`position:fixed;border:2px solid ${e};background:color-mix(in srgb,${e} 10%,transparent);pointer-events:none;border-radius:12px;box-shadow:0 0 0 4px color-mix(in srgb,${e} 16%,transparent),0 8px 24px rgba(0,0,0,0.08);transition:box-shadow 0.15s ease;`});return t.setAttribute("data-siteping-ignore","true"),t}onMouseMove=e=>{this.scheduleRectUpdate(e)};onTouchMove=e=>{e.preventDefault(),e.touches[0]&&this.scheduleRectUpdate(e.touches[0])};scheduleRectUpdate(e){!this.isDrawing||!this.drawingRect||(this.pendingMoveEvent=e,null===this.rafId&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;let e=this.pendingMoveEvent;if(!e||!this.drawingRect)return;let t=Math.min(e.clientX,this.startX),i=Math.min(e.clientY,this.startY),r=Math.abs(e.clientX-this.startX),n=Math.abs(e.clientY-this.startY);this.drawingRect.style.left=`${t}px`,this.drawingRect.style.top=`${i}px`,this.drawingRect.style.width=`${r}px`,this.drawingRect.style.height=`${n}px`})))}onTouchEnd=async e=>{let t=e.changedTouches[0];t&&await this.finishDrawing(t.clientX,t.clientY)};elementAt(e,t){this.overlay&&(this.overlay.style.pointerEvents="none");let i=Jf(e,t);this.overlay&&(this.overlay.style.pointerEvents="auto");let r=i instanceof SVGElement?(i.ownerSVGElement??i).parentElement:i;return r instanceof HTMLElement&&r!==document.body&&r!==document.documentElement&&!z(r)?r:null}onMouseUp=async e=>{await this.finishDrawing(e.clientX,e.clientY)};finishDrawing=async(e,t)=>{if(!this.isDrawing||!this.drawingRect)return;this.isDrawing=!1;let i=Math.min(e,this.startX),r=Math.min(t,this.startY),n=Math.abs(e-this.startX),s=Math.abs(t-this.startY);if(n<10||s<10){this.drawingRect.remove(),this.drawingRect=null;let i=this.elementAt(e,t);return void(i&&await this.annotateElement(i,!0))}let o=new DOMRect(i,r,n,s),{annotation:a}=this.buildAnnotation(o),l=await this.openForm(a,o);this.drawingRect?.remove(),this.drawingRect=null,l&&this.deactivate()};async startInstantAnnotation(e,t){if(this.isActive)return;this.instantMode=!0,this.bus.emit("annotation:start");let i=Math.max(0,Math.min(e-10,window.innerWidth-20)),r=Math.max(0,Math.min(t-10,window.innerHeight-20)),n=new DOMRect(i,r,20,20),{annotation:s,anchorBounds:o}=this.buildAnnotation(n),a=dg(o);this.drawingRect?.remove(),this.drawingRect=this.createDrawingRect(),Object.assign(this.drawingRect.style,{left:`${i}px`,top:`${r}px`,width:"20px",height:"20px"}),this.overlay?.appendChild(this.drawingRect),await this.openForm(s,n,a),this.drawingRect?.remove(),this.drawingRect=null,this.deactivate()}openForm(e,t,i=t){let r={clientId:R()},n=this.popup.show(t,t=>(this.freezeCancel(!0),this.runSubmission(e,t,i,r).finally(()=>this.freezeCancel(!1))),this.toolbarInsets());return this.revealSelection(t),n}revealSelection(e){let t=this.popup.sheetTop;if(null===t||!this.drawingRect)return;let i=Math.min(e.bottom+16-t,e.top-72);if(i<=0)return;let r=window.scrollY;window.scrollBy({top:i,behavior:"instant"}),this.drawingRect.style.top=e.top-(window.scrollY-r)+"px"}async runSubmission(e,t,i,r){void 0===r.screenshot&&(r.screenshot=await this.maybeCapture(new DOMRect(i.x+e.scrollX-window.scrollX,i.y+e.scrollY-window.scrollY,i.width,i.height)));let n=r.screenshot;await new Promise((i,s)=>{let o=()=>{a(),l(),d(),c(),this.rejectPendingSubmission=null},a=this.bus.on("feedback:sent",()=>{o(),i()}),l=this.bus.on("feedback:queued",()=>{o(),i()}),d=this.bus.on("feedback:error",e=>{o(),s(e)}),c=this.bus.on("submission:cancelled",()=>{o(),s(new Error("Feedback submission cancelled"))});this.rejectPendingSubmission=e=>{o(),s(e)},this.bus.emit("annotation:complete",{annotation:e,type:t.type,message:t.message,clientId:r.clientId,screenshotDataUrl:n?.dataUrl??null,screenshotRegion:n?.region??null})})}buildAnnotation(e){this.overlay&&(this.overlay.style.pointerEvents="none");let t=function(e,t=document.documentElement){let i=Jf(e.x+e.width/2,e.y+e.height/2);if(!i||i===t)return document.body;let r=i;for(;r&&r!==document.body;){if(r.hasAttribute(jf)&&Xf(r,e))return r;r=Yf(r)}for(r=i;r&&r!==document.body;){if(Xf(r,e))return r;r=Yf(r)}return document.body}(e);this.overlay&&(this.overlay.style.pointerEvents="auto");let i=Kf(t),r=t.getBoundingClientRect(),n=function(e,t){return t.width<=0||t.height<=0?{xPct:0,yPct:0,wPct:1,hPct:1}:{xPct:(e.x-t.x)/t.width,yPct:(e.y-t.y)/t.height,wPct:e.width/t.width,hPct:e.height/t.height}}(e,r);return{annotation:{anchor:i,rect:n,scrollX:window.scrollX,scrollY:window.scrollY,viewportW:window.innerWidth,viewportH:window.innerHeight,devicePixelRatio:window.devicePixelRatio},anchorBounds:r}}destroy(){this.deactivate(),this.unregisterEscapeLayer(),this.rejectPendingSubmission?.(new Error("Annotator destroyed during submission")),this.popup.destroy()}};function pg(e,t){let i=`siteping_own_feedback:${JSON.stringify([e,t??null])}`,r=()=>{try{let e=JSON.parse(localStorage.getItem(i)??"[]");return new Set(Array.isArray(e)?e.filter(e=>"string"==typeof e):[])}catch{return new Set}},n=e=>{try{e.size>0?localStorage.setItem(i,JSON.stringify([...e].slice(-500))):localStorage.removeItem(i)}catch{}};return{ids:r,add(e){let t=r();t.delete(e),n(t.add(e))},remove(...e){let t=r(),i=t.size;for(let i of e)t.delete(i);t.size<i&&n(t)},clear:()=>n(new Set)}}$();var hg=1e4,ug="siteping_retry_queue";function fg(e,t,i){let r,n=new Promise((e,n)=>{r=setTimeout(()=>n(i()),t)});return Promise.race([e,n]).finally(()=>clearTimeout(r))}async function gg(e,t){let i={};return t&&(i["Content-Type"]="application/json"),e.apiKey&&(i.Authorization=`Bearer ${e.apiKey}`),function(e,t){let i={...e};for(let[e,r]of Object.entries(t??{})){for(let t of Object.keys(i))t.toLowerCase()===e.toLowerCase()&&delete i[t];i[e]=r}return i}(i,"function"==typeof e.headers?await fg(Promise.resolve(e.headers()),hg,()=>new Error("headers factory did not settle within 10 s")):e.headers)}async function mg(e,t,i,r,{boundBody:n=!1,timeoutMs:s=hg,resendOnTimeout:o=!0}={}){for(let a=0;;a++){let l,d=new AbortController,c=setTimeout(()=>d.abort(),s);try{let s=await fetch(e,{...t,signal:d.signal}).catch(e=>{if(3===a||!o&&d.signal.aborted)throw P(e,i);return null});if(l=bg(s,a),s&&(!xg(s.status)||3===a||l>1e4)){if(clearTimeout(c),n&&(c=setTimeout(()=>d.abort(),hg)),!s.ok)throw await B(s,i);return await r(s).catch(e=>{throw P(e,i)})}}finally{clearTimeout(c)}await new Promise(e=>setTimeout(e,l))}}function bg(e,t){let i=e?.headers.get("Retry-After"),r=i?/^\d+$/.test(i)?1e3*Number(i):Date.parse(i)-Date.now():Number.NaN;return Number.isNaN(r)?1e3*2**t+1e3*Math.random()-500:Math.max(0,r)}function xg(e){return e>=500||408===e||429===e}async function yg(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request("siteping_retry_queue",()=>e()):e()}function vg(e){if(!l(e,"endpoint")||"string"!=typeof e.endpoint||!l(e,"payload"))return!1;let{payload:t}=e;return l(t,"authorName")&&"string"==typeof t.authorName&&l(t,"authorEmail")&&"string"==typeof t.authorEmail}function wg(){let e,t=localStorage.getItem(ug);if(!t)return[];try{e=JSON.parse(t)}catch{return localStorage.removeItem(ug),console.warn(`[siteping] discarded an unreadable retry queue from localStorage (${t.length} chars)`),[]}return Array.isArray(e)?e.filter(vg):[]}var kg=new WeakMap;function Cg(e){try{return localStorage.setItem(ug,JSON.stringify(e)),!0}catch{return!1}}function Sg(e){return null!=e.payload.screenshotDataUrl}function Eg(e){let{screenshotDataUrl:t,screenshotRegion:i,...r}=e.payload;return{endpoint:e.endpoint,payload:r}}function Mg(e){return e.trim()}function Ag(e){return e.trim().toLowerCase()}function Tg(e,t){let i=Math.min(1,Math.max(0,e)),r=t-(i-e);return[i,Math.max(0,i+r<=1?r:1-i)]}function Lg(e){let[t,i]=Tg(e.rect.xPct,e.rect.wPct),[r,n]=Tg(e.rect.yPct,e.rect.hPct);return{...e,rect:{xPct:t,yPct:r,wPct:i,hPct:n}}}async function Rg(e){return await e.json()}async function Bg(){}var Pg=class{constructor(e,t,i={}){this.endpoint=e,this.projectName=t,this.auth=i}endpoint;projectName;auth;listRefusalExplained=!1;async headers(e,t){try{return await gg(this.auth,e)}catch(e){throw P(e,t)}}async sendFeedback(e){let t="Failed to send feedback",{screenshotRegion:i,...r}=e,n={...r,annotations:r.annotations.map(Lg)},s=i?{...n,screenshotRegion:i}:n;try{let e=await mg(this.endpoint,{method:"POST",headers:await this.headers(!0,t),body:JSON.stringify(s)},t,Rg,{boundBody:!0});return o=s.clientId,yg(()=>{try{let e=wg(),t=e.filter(e=>e.payload.clientId!==o);if(t.length===e.length)return;t.length>0?localStorage.setItem(ug,JSON.stringify(t)):localStorage.removeItem(ug)}catch{}}),e}catch(e){throw function(e){return e instanceof c||e instanceof d&&"SERVER"===e.code}(e)&&kg.set(e,await function(e,t){return yg(()=>{try{let i=wg().filter(e=>e.payload.clientId!==t.clientId);if(i.length>=20&&i.shift(),i.push({endpoint:e,payload:t}),Cg(i))return!0;let r=i.slice(),n=0;for(let[e,t]of r.entries())if(Sg(t)&&(r[e]=Eg(t),n+=1,Cg(r)))return console.warn(`[siteping] retry queue exceeded the localStorage quota \u2014 dropped the screenshot of ${n} of ${i.length} queued feedback(s)`),!0;for(;r.length>1;)if(r.shift(),Cg(r)){let e=i.length-r.length,t=i.slice(e).filter(Sg).length;return console.warn(`[siteping] retry queue exceeded the localStorage quota \u2014 dropped the ${e} oldest of ${i.length} queued feedback(s)${t>0?`, and the screenshot of ${t} of the rest`:""}`),!0}console.warn("[siteping] feedback could not be queued for retry \u2014 localStorage is full or unavailable")}catch{}return!1}).catch(()=>!1)}(this.endpoint,s)),e}var o}async getFeedbacks(e,t){let i="Failed to fetch feedbacks",r=function(e){let t=new URLSearchParams({projectName:e.projectName});return e.page&&t.set("page",String(e.page)),e.limit&&t.set("limit",String(e.limit)),e.type&&t.set("type",e.type),e.status&&t.set("status",e.status),e.statuses?.length&&t.set("statuses",e.statuses.join(",")),e.search&&t.set("search",e.search),e.url&&t.set("url",e.url),e.urlPattern&&t.set("urlPattern",e.urlPattern),t}({projectName:e,...t}),n=await this.headers(!1,i);return mg(function(e,t){let i=t.toString();if(!i)return e;let r=e.includes("#")?e.indexOf("#"):e.length,n=e.slice(0,r),s=/[?&]$/.test(n)?"":n.includes("?")?"&":"?";return n+s+i+e.slice(r)}(this.endpoint,r),{method:"GET",cache:"no-store",...Object.keys(n).length>0?{headers:n}:{}},i,Rg).catch(e=>{throw e instanceof h&&!this.listRefusalExplained&&(this.listRefusalExplained=!0,console.warn(`[siteping] Feedback list refused (${e.status}): with an apiKey, GET needs it unless publicEndpoints includes "GET"; pins and panel stay empty. https://siteping.dev/docs/server#the-security-model-honestly`)),e})}async addComment(e,t){let i="Failed to post comment";return mg(this.endpoint,{method:"POST",headers:await this.headers(!0,i),body:JSON.stringify({...t,projectName:this.projectName,feedbackId:e})},i,Rg,{boundBody:!0})}async resolveFeedback(e,t){let i="Failed to update feedback";return mg(this.endpoint,{method:"PATCH",headers:await this.headers(!0,i),body:JSON.stringify({id:e,projectName:this.projectName,status:t?"resolved":"open"})},i,Rg)}async deleteFeedback(e){let t="Failed to delete feedback";await mg(this.endpoint,{method:"DELETE",headers:await this.headers(!0,t),body:JSON.stringify({id:e,projectName:this.projectName})},t,Bg)}async deleteAllFeedbacks(e){let t="Failed to delete all feedbacks";await mg(this.endpoint,{method:"DELETE",headers:await this.headers(!0,t),body:JSON.stringify({projectName:e,deleteAll:!0})},t,Bg,{timeoutMs:6e4,resendOnTimeout:!1})}};function Ig(e,t){if(e.length<=t)return e;let i=t-1,r=e.charCodeAt(i-1);return r>=55296&&r<=56319&&(i-=1),`${e.slice(0,i)}\u2026`}var Ng=["log","info","warn","error"];function Dg(e){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return String(e);if(e instanceof Error)return`${e.name}: ${e.message}${e.stack?`\n${e.stack}`:""}`;try{let t=[],i=500;return JSON.stringify(e,function(e,r){if(!(--i<0)){if("function"==typeof r)return"[Function]";if("symbol"==typeof r)return r.toString();if("object"!=typeof r||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?"[Circular]":(t.push(r),r)}})}catch{try{return String(e)}catch{return"[Unserializable]"}}}function Og(e){let t="";for(let i=0;i<e.length&&(i>0&&(t+=" "),t+=Dg(e[i]),!(t.length>=500));i++);return Ig(t,500)}var $g=class{maxEntries;entries=[];originals=new Map;wrappers=new Map;disposed=!1;constructor(e=50){if(this.maxEntries=Number.isFinite(e)&&e>=0?Math.min(Math.floor(e),50):50,!(typeof console>"u"))for(let e of Ng){let t=console[e];if("function"!=typeof t)continue;this.originals.set(e,t);let i=this,r=function(...r){try{i.push(e,r)}catch{}t.apply(this??console,r)};try{Object.defineProperty(r,"name",{value:e})}catch{}this.wrappers.set(e,r),console[e]=r}}push(e,t){0!==this.maxEntries&&(this.entries.length>=this.maxEntries&&this.entries.shift(),this.entries.push({level:e,timestamp:(new Date).toISOString(),message:Og(t)}))}getEntries(){return this.entries.slice()}dispose(){if(this.disposed||(this.disposed=!0,typeof console>"u"))return;let e=console;for(let[t,i]of this.originals)if(e[t]===this.wrappers.get(t))try{e[t]=i}catch{}this.originals.clear(),this.wrappers.clear()}};function Fg(e){let t=function(e){try{let t=new URL(e,typeof location>"u"?void 0:location.href);return t.username||t.password?(t.username="",t.password="",t.href):e}catch{return e}}(function(e){if("string"==typeof e)return e;if(e instanceof URL)return e.href;if("object"==typeof e&&null!==e&&"url"in e){let t=e.url;if("string"==typeof t)return t}try{return String(e)}catch{return"(unknown)"}}(e)),i=t.search(/[?#]/);return Ig(-1===i?t:t.slice(0,i),2e3)}var zg=class{maxEntries;entries=[];originalFetch=null;originalXhrOpen=null;originalXhrSend=null;wrappedFetch=null;wrappedXhrOpen=null;wrappedXhrSend=null;disposed=!1;constructor(e=20){this.maxEntries=Number.isFinite(e)&&e>=0?Math.min(Math.floor(e),20):20,this.installFetch(),this.installXhr()}push(e){0!==this.maxEntries&&(this.entries.length>=this.maxEntries&&this.entries.shift(),this.entries.push({...e,method:e.method.slice(0,20),status:e.status<=599?e.status:0,durationMs:Math.min(Math.max(e.durationMs,0),6e5)}))}installFetch(){if("function"!=typeof globalThis.fetch)return;let e=globalThis.fetch;this.originalFetch=e;let t=async(t,i)=>{let r=new Date,n=typeof performance<"u"?performance.now():Date.now(),s=Fg(t),o=(i?.method??(t instanceof Request?t.method:"GET")).toUpperCase();try{let a=await e(t,i);if(!a.ok){let e=typeof performance<"u"?performance.now():Date.now();this.push({url:s,method:o,status:a.status,durationMs:Math.round(e-n),timestamp:r.toISOString()})}return a}catch(e){let t=typeof performance<"u"?performance.now():Date.now();throw this.push({url:s,method:o,status:0,durationMs:Math.round(t-n),timestamp:r.toISOString()}),e}};this.wrappedFetch=t,globalThis.fetch=t}installXhr(){if(typeof XMLHttpRequest>"u")return;let e=XMLHttpRequest.prototype,t=e.open,i=e.send;this.originalXhrOpen=t,this.originalXhrSend=i;let r=this,n=new WeakMap,s=function(e,i,...r){try{n.set(this,{method:e.toUpperCase(),url:Fg(i),startedAt:new Date,t0:typeof performance<"u"?performance.now():Date.now()})}catch{}return t.call(this,e,i,...r)},o=function(e){let t=n.get(this);if(t){let e=()=>{try{let e=typeof performance<"u"?performance.now():Date.now(),i=this.status;(0===i||i>=400)&&r.push({url:t.url,method:t.method,status:i,durationMs:Math.round(e-t.t0),timestamp:t.startedAt.toISOString()})}catch{}};try{this.addEventListener("loadend",e,{once:!0})}catch{try{this.addEventListener("loadend",e)}catch{}}}return i.call(this,e??null)};this.wrappedXhrOpen=s,this.wrappedXhrSend=o,e.open=s,e.send=o}getEntries(){return this.entries.slice()}dispose(){if(!this.disposed){if(this.disposed=!0,this.originalFetch&&globalThis.fetch===this.wrappedFetch)try{globalThis.fetch=this.originalFetch}catch{}if(typeof XMLHttpRequest<"u")try{let e=XMLHttpRequest.prototype;this.originalXhrOpen&&e.open===this.wrappedXhrOpen&&(e.open=this.originalXhrOpen),this.originalXhrSend&&e.send===this.wrappedXhrSend&&(e.send=this.originalXhrSend)}catch{}}}},_g=class{listeners=new Map;on(e,t){let i=this.listeners.get(e);return i||(i=new Set,this.listeners.set(e,i)),i.add(t),()=>{i?.delete(t)}}off(e,t){this.listeners.get(e)?.delete(t)}emit(e,...t){let i=this.listeners.get(e);if(i)for(let r of i)try{r(...t)}catch(t){console.error(`[siteping] Error in event listener for "${String(e)}":`,t)}}removeAll(){this.listeners.clear()}};te(),ze(),fu(),_e(),dt();var Wg={chat:"fab.messages",annotate:"fab.annotate","toggle-annotations":"fab.annotations"},Hg=class{constructor(e,t,i,r){this.bus=i,this.t=r;let n=t.position??"bottom-right";this.items=[{id:"chat",icon:$e},{id:"annotate",icon:Fe}],!1!==t.showAnnotationsToggle&&this.items.push({id:"toggle-annotations",icon:we,iconAlt:ke}),this.fab=document.createElement("button"),this.fab.className=`sp-fab sp-fab--${n} sp-anim-fab-in`,this.fab.style.position="fixed",this.fab.appendChild(V(ve)),this.fab.setAttribute("aria-expanded","false"),this.fab.addEventListener("click",()=>this.toggle()),this.radialContainer=document.createElement("div"),this.radialContainer.className=`sp-radial sp-radial--${n}`,this.radialContainer.setAttribute("role","menu"),Y(this.radialContainer,!0);for(let e=0;e<this.items.length;e++){let t=this.items[e];if(!t)continue;let i=document.createElement("button");i.className="sp-radial-item",i.style.setProperty("--sp-i",String(e)),i.appendChild(V(t.icon)),i.setAttribute("role","menuitem"),i.dataset.itemId=t.id,i.addEventListener("click",e=>{e.stopPropagation(),this.handleItemClick(t.id)});let r=document.createElement("span");r.className="sp-radial-label",i.appendChild(r),this.radialContainer.appendChild(i)}this.scrim=document.createElement("div"),this.scrim.className="sp-scrim",this.scrim.addEventListener("click",()=>this.close()),this.root=document.createElement("div"),this.root.appendChild(this.scrim),this.root.appendChild(this.radialContainer),this.root.appendChild(this.fab),e.appendChild(this.root),this.applyLabels();let s=e.host;this.onDocumentClick=e=>{this.isOpen&&!e.composedPath().includes(s)&&this.close()},document.addEventListener("click",this.onDocumentClick,!0);let o=e=>{"Escape"===e.key&&this.isOpen&&(e.stopPropagation(),this.close())};this.fab.addEventListener("keydown",o),this.radialContainer.addEventListener("keydown",o),se(this.root,()=>this.isOpen),this.radialContainer.addEventListener("keydown",t=>{let i=Array.from(this.radialContainer.querySelectorAll(".sp-radial-item"));if(0===i.length||!this.isOpen)return;let r=e.activeElement??document.activeElement,n=i.indexOf(r);switch(t.key){case"ArrowUp":{t.preventDefault();let e=n<=0?i.length-1:n-1;i[e]?.focus();break}case"ArrowDown":{t.preventDefault();let e=n>=i.length-1?0:n+1;i[e]?.focus();break}case"Home":t.preventDefault(),i[0]?.focus();break;case"End":t.preventDefault(),i[i.length-1]?.focus()}})}bus;t;root;scrim;fab;radialContainer;badgeEl=null;isOpen=!1;annotationsVisible=!0;items;onDocumentClick;refreshLabels(){this.applyLabels()}applyLabels(){this.applyFabLabel();let e=this.radialContainer.querySelectorAll(".sp-radial-item");for(let t of e){let e=t.dataset.itemId;if(!e)continue;let i=Wg[e];if(!i)continue;let r=this.t(i);t.setAttribute("aria-label",r);let n=t.querySelector(".sp-radial-label");n&&U(n,r)}}applyFabLabel(){let e=this.t("fab.aria"),t=this.badgeEl?.textContent;this.fab.setAttribute("aria-label",t?`${e}, ${uu(this.t,"fab.badge",{count:t})}`:e)}updateBadge(e){if(e<=0)return this.badgeEl?.remove(),this.badgeEl=null,void this.applyFabLabel();this.badgeEl||(this.badgeEl=document.createElement("span"),this.badgeEl.className="sp-fab-badge",this.badgeEl.setAttribute("role","status"),this.badgeEl.setAttribute("aria-live","polite"),this.fab.appendChild(this.badgeEl));let t=e>99?"99+":String(e);U(this.badgeEl,t),this.badgeEl.setAttribute("aria-label",uu(this.t,"fab.badge",{count:e})),this.applyFabLabel()}toggle(){this.isOpen?this.close():this.open()}open(){this.isOpen=!0,this.setFabIcon(Ce),this.fab.setAttribute("aria-expanded","true"),this.scrim.classList.add("sp-scrim--open"),Y(this.radialContainer,!1);let e=st()?60:54;this.radialContainer.querySelectorAll(".sp-radial-item").forEach((t,i)=>{let r=-(16+e*(i+1));t.style.transform=`translate(0px, ${r}px) scale(1)`,t.classList.add("sp-radial-item--open")}),requestAnimationFrame(()=>{this.radialContainer.querySelector(".sp-radial-item")?.focus()})}close(){this.isOpen=!1,this.setFabIcon(ve),this.fab.setAttribute("aria-expanded","false"),this.scrim.classList.remove("sp-scrim--open"),Y(this.radialContainer,!0),this.radialContainer.querySelectorAll(".sp-radial-item").forEach(e=>{e.style.transform="translate(0, 0) scale(0.8)",e.classList.remove("sp-radial-item--open")}),this.fab.focus()}setFabIcon(e){this.fab.querySelector("svg")?.replaceWith(V(e))}handleItemClick(e){switch(this.close(),e){case"chat":this.bus.emit("panel:toggle",!0);break;case"annotate":{let e=this.bus.on("annotation:end",()=>{e(),this.fab.focus()});this.bus.emit("annotation:start");break}case"toggle-annotations":{this.annotationsVisible=!this.annotationsVisible,this.bus.emit("annotations:toggle",this.annotationsVisible);let e=this.radialContainer.querySelector('[data-item-id="toggle-annotations"]')?.querySelector("svg");if(e){let t=V(this.annotationsVisible?we:ke);e.replaceWith(t)}break}}}destroy(){document.removeEventListener("click",this.onDocumentClick,!0),this.root.remove()}};H(),ze(),fu(),$();var Vg="siteping_identity";function jg(){try{let e=localStorage.getItem(Vg);if(!e)return null;let t=JSON.parse(e);return function(e){if(!l(e,"name")||!l(e,"email"))return!1;let{name:t,email:i}=e;return"string"==typeof t&&"string"==typeof i&&t.length>0&&t.length<=k&&i.length<=k&&s(i)}(t)?t:null}catch{return null}}function Ug(e){return e.normalize("NFC").replace(/\s+/g," ").trim()}function qg(e){return e.replace(/\s+/g," ").trim()}function Gg(e,t){if(e===t)return 1;let i=Math.max(e.length,t.length);return 0===i?1:1-function(e,t){if(e===t)return 0;if(0===e.length)return t.length;if(0===t.length)return e.length;if(e.length>t.length){let i=e;e=t,t=i}let i=e.length,r=t.length,n=new Array(i+1);for(let e=0;e<=i;e++)n[e]=e;let s=new Array(i+1);for(let o=1;o<=r;o++){s[0]=o;for(let r=1;r<=i;r++){let i=n[r-1];s[r]=e[r-1]===t[o-1]?i:1+Math.min(i,n[r],s[r-1])}let r=n;n=s,s=r}return n[i]}(e,t)/i}function Yg(e,t,i=.6){if(!t||!e)return 0;if(e.includes(t))return 1;let r=e.length>500?e.slice(0,500):e;if(t.length>r.length){let e=Gg(r,t);return e>=i?e:0}if(t.length<8&&r.length>64)return 0;let n=1-function(e,t){let i=t.length,r=new Int32Array(i+1),n=new Int32Array(i+1);for(let e=0;e<=i;e++)r[e]=e;let s=i;for(let o=1;o<=e.length;o++){n[0]=0;let a=e.charCodeAt(o-1);for(let e=1;e<=i;e++){let i=r[e-1]+(t.charCodeAt(e-1)===a?0:1),s=r[e]+1,o=n[e-1]+1;n[e]=Math.min(i,s,o)}let l=n[i];l<s&&(s=l);let d=r;r=n,n=d}return s}(r,t)/t.length;return n>=i?n:0}function Kg(e){let t=new Map;for(let i=0;i<e.length-1;i++){let r=e.charCodeAt(i)<<16|e.charCodeAt(i+1);t.set(r,(t.get(r)??0)+1)}return t}function Xg(e,t,i){let r=i.length-1;if(t<=0||r<=0)return 0;let n=0,s=new Map;for(let t=0;t<i.length-1;t++){let r=i.charCodeAt(t)<<16|i.charCodeAt(t+1),o=e.get(r);if(void 0===o)continue;let a=s.get(r)??0;a<o&&(s.set(r,a+1),n++)}return 2*n/(t+r)}function Jg(e,t,i){if(t<=0)return 0;let r=i.split(" "),n=r.length-1;if(n<=0)return 0;let s=0,o=new Map;for(let t=0;t<r.length-1;t++){let i=`${r[t]} ${r[t+1]}`,n=e.get(i);if(void 0===n)continue;let a=o.get(i)??0;a<n&&(o.set(i,a+1),s++)}return 2*s/(t+n)}$(),F();var Qg={checkOpacity:!0,opacityProperty:!0,checkVisibilityCSS:!0,visibilityProperty:!0};function Zg(e){if(!e.isConnected)return"hidden";if("function"==typeof e.checkVisibility)return e.checkVisibility(Qg)?"visible":e.checkVisibility()?"soft-hidden":"hidden";if(e.getClientRects().length>0)try{return"visible"===getComputedStyle(e).visibility?"visible":"soft-hidden"}catch{return"visible"}let t=e.firstElementChild;return t&&t.getClientRects().length>0?"visible":0===e.ownerDocument.documentElement.getClientRects().length?"unknown":"hidden"}var em={anchorKey:1,id:1,css:.95,xpath:.9,scan:.85},tm=500;function im(e,t){return Ug((e??"").slice(0,2e3)).slice(0,t)}function rm(e,t){let i=function(e){let t=im(e.textSnippet,tm),i=function(e){let t=new Map,i=e.split(" ");for(let e=0;e<i.length-1;e++){let r=`${i[e]} ${i[e+1]}`;t.set(r,(t.get(r)??0)+1)}return t}(t),r=0;for(let e of i.values())r+=e;return{snippet:t,snippetBigrams:Kg(t),snippetBigramTotal:Math.max(0,t.length-1),snippetWordPairs:i,snippetWordPairTotal:r,prefix:im(e.textPrefix,128),suffix:im(e.textSuffix,128),neighbor:im(e.neighborText,128),fingerprint:(e.fingerprint??"").slice(0,64),tag:"string"==typeof e.elementTag?e.elementTag:""}}(e),{pool:r,treeRoots:n}=function(e){let t=new Map,i=(i,r,n)=>{!i||t.has(i)||n&&i.tagName!==e.elementTag||t.set(i,r)},r="string"==typeof e.cssSelector?e.cssSelector.split(Uf):[],n=r[r.length-1]??e.cssSelector,s=r.length>1?function(e){let t=[],i=[document];for(let r of e){let e;try{e=nm(i,r)}catch{return[]}let n=[];for(let t of e)t.shadowRoot&&n.push(t.shadowRoot);if(0===n.length)return[];t.push(n),i=n}return t}(r.slice(0,-1)):null,o=s?s[s.length-1]??[]:[document],a=s?[document,...s.flat()]:o;if(e.anchorKey){let t=e.anchorKey.replace(/\\/g,"\\\\").replace(/"/g,'\\"');try{for(let e of nm(a,`[${jf}="${t}"]`))i(e,"anchorKey",!1)}catch{}}if(e.elementId){let t=e.elementId.replace(/\\/g,"\\\\").replace(/"/g,'\\"');try{for(let e of nm(o,`[id="${t}"]`))i(e,"id",!0)}catch{for(let t of o)i(t.getElementById(e.elementId),"id",!0)}}try{for(let e of nm(o,n))i(e,"css",!0)}catch{}if(s)return{pool:t,treeRoots:o};try{let t=document.evaluate(e.xpath,document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),r=Math.min(t.snapshotLength,16);for(let e=0;e<r;e++){let r=t.snapshotItem(e);r instanceof Element&&i(r,"xpath",!0)}}catch{}return{pool:t,treeRoots:o}}(e),s=[];for(let[e,t]of r){let r=sm(e,t,i);r&&s.push(r)}let o=0,a=!1;for(let e of s)e.final>o&&(o=e.final),("id"===e.strategy||"anchorKey"===e.strategy)&&1===e.visibility&&(e.signals?.text??0)>=.8&&(void 0===e.signals?.fingerprint||e.signals.fingerprint>=.8)&&(a=!0);let l=!!(i.snippet||i.fingerprint||i.prefix||i.suffix||i.neighbor),d=t?.scanBudget;if(l&&n.length>0&&o<em.scan&&!a)if(d&&d.remaining<=0)d.starved=!0;else{d&&d.remaining--;for(let e of function(e,t,i){let r=e.tag.toLowerCase();if(!r)return[];let n=[];try{for(let e of i){let t=e.querySelectorAll(r);for(let e=0;e<t.length&&n.length<1e4;e++){let i=t[e];i&&n.push(i)}if(1e4===n.length)break}}catch{return[]}let s=e.fingerprint.split(":"),o=3===s.length?Number(s[0]):Number.NaN,a=3===s.length?s[2]??"":"",l=[];for(let i of n){if(t.has(i))continue;let r=0;if(e.snippetBigramTotal>0){let t=qg(_f(i,tm)),n=Xg(e.snippetBigrams,e.snippetBigramTotal,t);e.snippetWordPairTotal>0?r+=.6*(.5*n+.5*(n>0?Jg(e.snippetWordPairs,e.snippetWordPairTotal,t):0)):r+=.6*n}if(a&&If(i)===a&&(r+=.25),!Number.isNaN(o)){let e=Math.abs(i.children.length-o);0===e?r+=.15:e<=2&&(r+=.07)}l.push({element:i,cheap:r})}return l.sort((e,t)=>t.cheap-e.cheap),l.slice(0,24).map(e=>e.element)}(i,r,n)){let t=sm(e,"scan",i);t&&s.push(t)}}let c=s.filter(om);if(0===c.length)return null;c.sort((e,t)=>t.final-e.final);let p=function(e){let t=e[0],i=e.filter(e=>t.final-e.final<=.05&&(e===t||t.element.contains(e.element))),r=t;for(let e of i)e!==r&&r.element.contains(e.element)&&(r=e);return r}(c);return{element:p.element,confidence:am(p),strategy:p.strategy}}function nm(e,t){let i=[];for(let r of e){let e=r.querySelectorAll(t);for(let t=0;t<e.length&&i.length<16;t++){let r=e[t];r&&i.push(r)}if(16===i.length)break}return i}function sm(e,t,i){let r=function(e,t){let i=0,r=0,n={blend:0,strongest:0};if(t.snippet){r+=40;let s=_f(e,tm,!0);if(n.text=Yg(Ug(s),t.snippet,.5),n.text<1){let i=_f(e,tm);i!==s&&(n.text=Math.max(n.text,Yg(Ug(i),t.snippet,.5)))}i+=40*n.text}if(t.fingerprint&&(r+=20,n.fingerprint=function(e,t){let i=t.split(":");if(3!==i.length)return 0;let[r,n,s]=i,o=Number(r),a=Number(n);if(Number.isNaN(o)||Number.isNaN(a))return 0;let l=Pf(e),[d,c,p]=l.split(":"),h=0,u=Math.abs(Number(d)-o);0===u?h+=.2:u<=2?h+=.1:u<=5&&(h+=.03);let f=Math.abs(Number(c)-a);return 0===f?h+=.4:1===f?h+=.2:f<=3&&(h+=.08),p===s&&(h+=.4),h}(e,t.fingerprint),i+=20*n.fingerprint),t.prefix||t.suffix){r+=20;let s=0,o=0;if(t.prefix){let i=Ug(Ff(e,"before"));s+=i?Gg(i,t.prefix):0,o++}if(t.suffix){let i=Ug(Ff(e,"after"));s+=i?Gg(i,t.suffix):0,o++}o>0&&(n.context=s/o,i+=20*n.context)}if(t.neighbor){r+=20;let s=Ug(zf(e));n.neighbor=s?Gg(s,t.neighbor):0,i+=20*n.neighbor}return 0===r?null:(n.blend=i/r,n.strongest=Math.max(n.text??0,n.fingerprint??0,n.context??0,n.neighbor??0),n)}(e,i),n=function(e){switch(e){case"hidden":return.3;case"soft-hidden":return.6;default:return 1}}(Zg(e));return null===r?"scan"===t?null:{element:e,strategy:t,verification:.6,strongest:.6,visibility:n,final:.6*em[t]*n,unverified:!0}:{element:e,strategy:t,verification:r.blend,strongest:r.strongest,signals:r,visibility:n,final:em[t]*r.blend*n}}function om(e){if("scan"===e.strategy)return e.verification>=.4;if(e.unverified||!e.signals)return!0;let t=e.signals;return void 0===t.text||t.text>=.5||(t.fingerprint??0)>=.6||(t.context??0)>=.6||(t.neighbor??0)>=.6}function am(e){return"scan"===e.strategy?Math.min(e.verification,em.scan):e.unverified?em[e.strategy]:em[e.strategy]*Math.min(1,e.strongest/.8)}function lm(e,t,i){let r=rm(e,i);if(!r)return null;let n=r.element.getBoundingClientRect(),s=new DOMRect(n.x+t.xPct*n.width,n.y+t.yPct*n.height,t.wPct*n.width,t.hPct*n.height);return{element:r.element,rect:s,confidence:r.confidence,strategy:r.strategy}}function dm(e){return{cssSelector:e.cssSelector,xpath:e.xpath,textSnippet:e.textSnippet,elementTag:e.elementTag,elementId:e.elementId??void 0,textPrefix:e.textPrefix,textSuffix:e.textSuffix,fingerprint:e.fingerprint,neighborText:e.neighborText,anchorKey:e.anchorKey??null}}function cm(e){return{xPct:e.xPct,yPct:e.yPct,wPct:e.wPct,hPct:e.hPct}}te(),ze(),fu(),it(),dt();var pm="0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.22)",hm="0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.28)",um={question:"#2563eb",change:"#b45309",bug:"#d01f1f",other:"#5b6778"},fm={light:{bg:"rgba(255, 255, 255, 0.94)",ring:"#ffffff",check:"#636366",slash:"#8e8e93"},dark:{bg:"rgba(44, 44, 46, 0.94)",ring:"#48484a",check:"#c7c7cc",slash:"#aeaeb2"}};function gm(e){let t=document.documentElement.clientWidth,i=26+(st()?9:0),r=e.right-13;return e.right<=t&&(r=Math.min(r,t-i)),{top:Math.max(0,e.top+window.scrollY-13),left:Math.max(0,r)+window.scrollX}}var mm=e=>e.width>0||e.height>0;function bm(e,t){let i=e.entries[t],r=e.elementIndices[t];if(i&&void 0!==r)return i.elements[r]}function xm(e){let t=e.elementIndices[0];return void 0===t?void 0:e.entries[0]?.positions[t]}var ym=e=>"none"!==e.style.display;function vm(e,t,i){!at()&&"function"==typeof e.animate&&e.animate(t,i)}var wm=class{constructor(e,t,i,r,n=null){this.colors=e,this.tooltip=t,this.bus=i,this.t=r,this.liveRegion=n,this.container=j("div",{style:"position:absolute;top:0;left:0;pointer-events:none;z-index:2147483646;"}),this.container.id="siteping-markers",re(this.container),document.body.appendChild(this.container),this.bus.on("annotations:toggle",e=>{this.container.style.display=e?"block":"none"}),this.resizeHandler=()=>this.scheduleReposition("resize"),window.addEventListener("resize",this.resizeHandler,{passive:!0}),this.scrollHandler=()=>this.scheduleReposition("scroll"),window.addEventListener("scroll",this.scrollHandler,{passive:!0,capture:!0}),this.mutationObserver=new MutationObserver(e=>{let t=!1;for(let i of e)if(!this.container.contains(i.target)&&!this.tooltip.contains(i.target)){t=!0;break}t&&this.scheduleReposition("mutation")}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),this.onDocumentClickForClusters=e=>{this.container.contains(e.target)||this.collapseAllClusters()},document.addEventListener("click",this.onDocumentClickForClusters,!0)}colors;tooltip;bus;t;liveRegion;container;entries=[];highlightElements=[];pinnedFeedback=null;onDocumentClick=null;repositionTimer=null;mutationObserver=null;scrollHandler=null;resizeHandler=null;anchorCache=new Map;pendingLayoutChange=!1;pendingResize=!1;hiddenRecheckAt=new Map;clusters=[];onDocumentClickForClusters=null;lastOpenCount=-1;get count(){return this.entries.length}get openCount(){let e=0;for(let t of this.entries)y(t.feedback.status)||e++;return e}scheduleReposition(e="mutation"){"scroll"!==e&&(this.pendingLayoutChange=!0),"resize"===e&&(this.pendingResize=!0),!this.repositionTimer&&("requestIdleCallback"in window?this.repositionTimer=window.requestIdleCallback(()=>{this.repositionTimer=null,this.repositionAll()},{timeout:300}):this.repositionTimer=+setTimeout(()=>{this.repositionTimer=null,this.repositionAll()},200))}repositionAll(){let e=this.pendingLayoutChange,t=this.pendingResize;this.pendingLayoutChange=!1,this.pendingResize=!1,t&&this.hiddenRecheckAt.clear();let i=Date.now(),r={remaining:2,starved:!1},n=new Set,s=!1;for(let t of this.entries)for(let o=0;o<t.feedback.annotations.length;o++){let a=t.elements[o];if(!a)continue;let l=t.feedback.annotations[o];if(!l)continue;let d=`${t.feedback.id}:${o}`;n.add(d);let c,p=this.anchorCache.get(d),h=p?.ref.deref(),u=(this.hiddenRecheckAt.get(d)??0)>i,f=h?.isConnected&&(u||!(e&&"hidden"===Zg(h)));if(p&&h&&f){let e=h.getBoundingClientRect(),t=cm(l);c={element:h,rect:new DOMRect(e.left+t.xPct*e.width,e.top+t.yPct*e.height,t.wPct*e.width,t.hPct*e.height),confidence:p.confidence,strategy:p.strategy}}else if(u)c=null;else if(r.starved=!1,c=lm(dm(l),cm(l),{scanBudget:r}),!r.starved){if(c?.element){let{confidence:e,strategy:t}=c;this.anchorCache.set(d,{ref:new WeakRef(c.element),confidence:e,strategy:t})}c&&"hidden"!==Zg(c.element)?this.hiddenRecheckAt.delete(d):this.hiddenRecheckAt.set(d,i+3e3)}let g="none"!==a.style.display;c&&mm(c.rect)?(g||(s=!0),t.positions[o]=gm(c.rect),a.style.display="flex",this.applyConfidenceStyle(a,c.confidence,t.feedback)):(g&&(s=!0),a.style.display="none")}for(let e of this.anchorCache.keys())n.has(e)||this.anchorCache.delete(e);for(let e of this.hiddenRecheckAt.keys())n.has(e)||this.hiddenRecheckAt.delete(e);s&&(this.buildClusters(),this.bus.emit("markers:placed")),this.applyClusterPositions(),this.pinnedFeedback&&this.showHighlight(this.pinnedFeedback,!1)}applyClusterPositions(){for(let e of this.clusters)e.expanded?this.applyFanPositions(e):this.applyStackPositions(e)}emitMarkersChanged(){let e=this.openCount;e!==this.lastOpenCount&&(this.lastOpenCount=e,this.bus.emit("markers:changed",e))}render(e){this.clear(),e.forEach((e,t)=>{let i=this.buildEntry(e,t+1);this.entries.push(i)}),this.buildClusters();let t=this.entries.filter(e=>e.elements.some(ym)).length;this.liveRegion&&t>0&&(this.liveRegion.textContent=uu(this.t,"marker.count",{count:t})),this.emitMarkersChanged(),this.bus.emit("markers:placed")}addFeedback(e,t){let i=this.buildEntry(e,t);for(let e of i.elements)vm(e,[{scale:.9,opacity:0},{scale:1,opacity:1}],{duration:250,easing:D});this.entries.push(i),this.buildClusters(),this.emitMarkersChanged(),this.bus.emit("markers:placed")}buildEntry(e,t){let i={feedback:e,elements:[],positions:[]};for(let r of e.annotations){let n=lm(dm(r),cm(r)),s=n&&mm(n.rect)?n:null,o=s?gm(s.rect):{top:0,left:0},a=this.createMarker(t,e,o);s?this.applyConfidenceStyle(a,s.confidence,e):a.style.display="none",this.container.appendChild(a),i.elements.push(a),i.positions.push(o)}return i}buildClusters(){for(let e of this.container.querySelectorAll(".sp-cluster-badge"))e.remove();let e=[];for(let t of this.entries)for(let i=0;i<t.elements.length;i++){let r=t.positions[i];!r||"none"===t.elements[i]?.style.display||e.push({entry:t,elIdx:i,pos:r})}let t=new Set;this.clusters=[];for(let i=0;i<e.length;i++){if(t.has(i))continue;let r=e[i];if(!r)continue;let n={entries:[r.entry],elementIndices:[r.elIdx],expanded:!1};t.add(i);for(let s=i+1;s<e.length;s++){if(t.has(s))continue;let i=r.pos,o=e[s];if(!o)continue;let a=o.pos;Math.sqrt((i.left-a.left)**2+(i.top-a.top)**2)<28&&(n.entries.push(o.entry),n.elementIndices.push(o.elIdx),t.add(s))}this.clusters.push(n)}for(let e of this.clusters)e.entries.length<=1||(this.applyStackPositions(e),this.addClusterBadge(e))}applyStackPositions(e){let t=xm(e);if(!t)return;let{top:i,left:r}=t,n=e.entries.length<=1;for(let t=0;t<e.entries.length;t++){let s=bm(e,t);s&&(s.style.top=`${i+(n?0:3*t)}px`,s.style.left=`${r+(n?0:3*t)}px`,s.style.zIndex=String(t+1))}}applyFanPositions(e){let t=xm(e);if(!t)return;let{top:i,left:r}=t,n=e.entries.length,s=r-32*(n-1)/2;for(let t=0;t<n;t++){let r=bm(e,t);r&&(r.style.top=`${i}px`,r.style.left=`${s+32*t}px`,r.style.zIndex=String(10+t))}}addClusterBadge(e){let t=bm(e,e.entries.length-1);if(!t)return;let i=j("div",{class:"sp-cluster-badge",style:`position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;padding:0 4px;border-radius:9999px;background:#1d1d1f;color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;border:1.5px solid #fff;pointer-events:none;font-family:${tt};line-height:1;`});U(i,String(e.entries.length)),t.appendChild(i)}setBadgesVisible(e,t){for(let i=0;i<e.entries.length;i++){let r=bm(e,i)?.querySelector(".sp-cluster-badge");r&&(r.style.display=t?"flex":"none")}}findCluster(e){for(let t of this.clusters)if(!(t.entries.length<=1))for(let i=0;i<t.entries.length;i++)if(bm(t,i)===e)return t;return null}handleClusterClick(e,t){let i=this.findCluster(e);return!!i&&!i.expanded&&(t.stopPropagation(),this.collapseAllClusters(),i.expanded=!0,this.glide(i,()=>this.applyFanPositions(i)),this.setBadgesVisible(i,!1),!0)}collapseCluster(e){e.expanded&&(e.expanded=!1,this.glide(e,()=>this.applyStackPositions(e)),this.setBadgesVisible(e,!0))}glide(e,t){let i=e.entries.map((t,i)=>bm(e,i)),r=i.map(e=>e&&{top:parseFloat(e.style.top),left:parseFloat(e.style.left)});t(),i.forEach((e,t)=>{let i=r[t];if(!e||!i)return;let n=i.left-parseFloat(e.style.left),s=i.top-parseFloat(e.style.top);(n||s)&&vm(e,[{translate:`${n}px ${s}px`},{translate:"0 0"}],{duration:200,easing:D})})}collapseAllClusters(){for(let e of this.clusters)this.collapseCluster(e)}applyConfidenceStyle(e,t,i){let r=y(i.status);t<.7&&!r?(e.style.borderStyle="dashed",e.style.opacity="0.7",e.title=uu(this.t,"marker.approximate",{confidence:Math.round(100*t)})):(e.style.borderStyle="solid",e.style.opacity="1",e.title="")}createMarker(e,t,i){let{status:r}=t,n=function(e,t,i){let r="dark"===i.scheme;if(y(e)){let t=fm[i.scheme];return{bg:t.bg,ring:t.ring,color:"wont_fix"===e?t.slash:t.check,shadow:"0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.14)",hoverShadow:"0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.18)"}}let n=qe(t,i);if("in_progress"===e){let{row:e}=i.surface,t=`color-mix(in srgb, ${n} 35%, ${e})`;return{bg:`color-mix(in srgb, ${n} ${r?18:14}%, ${e})`,ring:`${n} ${n} ${t} ${t}`,color:r?n:`color-mix(in srgb, ${n} 80%, #000000)`,shadow:pm,hoverShadow:hm}}return{bg:r?um[t]??um.other??n:n,ring:"#ffffff",color:"#ffffff",shadow:pm,hoverShadow:hm}}(r,t.type,this.colors),s=j("div",{style:`position:absolute;top:${i.top}px;left:${i.left}px;width:26px;height:26px;border-radius:50%;background:${n.bg};border:2px solid;border-color:${n.ring};display:flex;align-items:center;justify-content:center;font-family:${tt};font-size:12px;font-weight:700;letter-spacing:-0.01em;color:${n.color};cursor:pointer;pointer-events:auto;box-shadow:${n.shadow};transition:${at()?"box-shadow 0.15s ease":`transform 0.15s ${D}, box-shadow 0.15s ease`};touch-action:manipulation;user-select:none;-webkit-font-smoothing:antialiased;`});s.dataset.feedbackId=t.id,s.setAttribute("tabindex","0"),s.setAttribute("role","button");let o=t.message.length>60?`${t.message.slice(0,60)}...`:t.message,a=uu(this.t,"marker.aria",{number:e,type:cu(t.type,this.t),status:pu(r,this.t),message:o});s.setAttribute("aria-label",a),s.setAttribute("aria-describedby",this.tooltip.tooltipId),ee(s,this.colors.accent),"wont_fix"===r?s.appendChild(j("span",{style:"width:2px;height:16px;border-radius:1px;background:currentColor;transform:rotate(45deg);"})):U(s,"resolved"===r?"\u2713":String(e)),st()&&s.appendChild(j("span",{style:"position:absolute;inset:-9px;border-radius:50%;"})),s.addEventListener("mouseenter",()=>{ot()&&(s.style.transform="scale(1.2)",s.style.boxShadow=n.hoverShadow),this.tooltip.show(t,s.getBoundingClientRect()),this.pinnedFeedback||this.showHighlight(t)}),s.addEventListener("mouseleave",()=>{s.style.transform="scale(1)",s.style.boxShadow=n.shadow,this.tooltip.scheduleHide(),this.pinnedFeedback||this.clearHighlight()}),s.addEventListener("focus",()=>{this.tooltip.show(t,s.getBoundingClientRect()),this.pinnedFeedback||this.showHighlight(t)}),s.addEventListener("blur",()=>{this.tooltip.scheduleHide(),this.pinnedFeedback||this.clearHighlight()});let l=e=>{e instanceof MouseEvent&&this.handleClusterClick(s,e)||(nt()&&this.tooltip.hide(),this.pinHighlight(t),this.bus.emit("panel:toggle",!0),s.dispatchEvent(new CustomEvent("sp-marker-click",{detail:{feedbackId:t.id},bubbles:!0})))};return s.addEventListener("click",e=>l(e)),s.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l(e))}),s}focusFeedback(e){let t=this.entries.find(t=>t.feedback.id===e),i=t?.elements.find(ym);return!(!t||!i||(i.scrollIntoView({behavior:at()?"auto":"smooth",block:"center"}),this.pinHighlight(t.feedback),this.highlight(e),0))}revealPin(e){return"none"!==this.container.style.display&&this.focusFeedback(e)}isLost(e){let t=this.entries.filter(t=>t.feedback.id===e);return t.length>0&&t.every(e=>e.elements.every(e=>"none"===e.style.display))}highlight(e){for(let t of this.entries)if(t.feedback.id===e)for(let e of t.elements)vm(e,[{boxShadow:`0 0 0 0 ${this.colors.accentGlow}`},{boxShadow:"0 0 0 8px transparent",offset:.7},{boxShadow:"0 0 0 0 transparent"}],{duration:700,easing:"ease-out"})}showHighlight(e,t=!0){this.removeHighlightElements();for(let i of e.annotations){let r=lm(dm(i),cm(i));if(!r||!mm(r.rect))continue;let n=qe(e.type,this.colors),s=r.rect,o=j("div",{style:`position:absolute;top:${s.top+window.scrollY}px;left:${s.left+window.scrollX}px;width:${s.width}px;height:${s.height}px;border:2px solid ${n};background:${n}0c;border-radius:12px;pointer-events:none;z-index:-1;opacity:${t?0:1};box-shadow:0 0 16px ${n}20;transition:opacity 200ms ease;`});this.container.appendChild(o),this.highlightElements.push(o),t&&(o.offsetHeight,o.style.opacity="1")}}pinHighlight(e){this.unpinHighlight(),this.showHighlight(e),this.pinnedFeedback=e,this.onDocumentClick=e=>{this.container.contains(e.target)||this.unpinHighlight()},document.addEventListener("click",this.onDocumentClick,{capture:!0})}unpinHighlight(){this.onDocumentClick&&(document.removeEventListener("click",this.onDocumentClick,{capture:!0}),this.onDocumentClick=null),this.pinnedFeedback=null,this.clearHighlight()}clearHighlight(){for(let e of this.highlightElements)e.style.opacity="0",setTimeout(()=>e.remove(),200);this.highlightElements=[]}removeHighlightElements(){for(let e of this.highlightElements)e.remove();this.highlightElements=[]}clear(){this.unpinHighlight(),this.container.replaceChildren(),this.entries=[],this.clusters=[],this.anchorCache.clear()}destroy(){this.unpinHighlight(),this.repositionTimer&&("cancelIdleCallback"in window&&window.cancelIdleCallback(this.repositionTimer),clearTimeout(this.repositionTimer)),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.scrollHandler&&window.removeEventListener("scroll",this.scrollHandler,{capture:!0}),this.onDocumentClickForClusters&&document.removeEventListener("click",this.onDocumentClickForClusters,!0),this.mutationObserver?.disconnect(),this.container.remove()}};$();var km=class{constructor(e,t){this.store=e,this.projectName=t}store;projectName;async sendFeedback(e){return Sm(await Cm(this.write(e),"Failed to send feedback"))}async write(e){try{return await this.store.createFeedback({projectName:e.projectName,type:e.type,message:e.message,status:"open",url:e.url,urlPattern:e.urlPattern??null,viewport:e.viewport,userAgent:e.userAgent,authorName:e.authorName,authorEmail:e.authorEmail,clientId:e.clientId,annotations:e.annotations.map(w),screenshotDataUrl:e.screenshotDataUrl??null,screenshotRegion:e.screenshotRegion??null,diagnostics:e.diagnostics??null})}catch(i){if(!((t=i)instanceof M||v(t,"STORE_DUPLICATE")||v(t,"P2002")))throw i;let r=await this.store.findByClientId(e.clientId);if(!r||r.projectName!==e.projectName)throw i;return r}var t}async getFeedbacks(e,t){let{feedbacks:i,total:r}=await this.store.getFeedbacks({projectName:e,page:t?.page,limit:t?.limit,type:t?.type,status:t?.status,statuses:t?.statuses,search:t?.search,url:t?.url,urlPattern:t?.urlPattern});return{feedbacks:i.map(Sm),total:r,capabilities:{comments:!!this.store.addComment}}}async resolveFeedback(e,t){let i=await this.store.updateFeedback(e,function(e,t=new Date){return y(e)?{status:e,resolvedAt:t}:{status:e,resolvedAt:null}}(t?"resolved":"open"));return Sm(i)}async deleteFeedback(e){await this.store.deleteFeedback(e)}async deleteAllFeedbacks(e){await this.store.deleteAllFeedbacks(e)}async addComment(e,t){let i="Failed to post comment";if(!this.store.addComment)throw new d(`${i}: this store keeps no comments`,"SERVER",!1);return Em(await Cm(this.store.addComment(e,t),i))}};function Cm(e,t){return fg(e,3e4,()=>new d(`${t}: the store did not answer within 30 s`,"TIMEOUT",!0))}function Sm(e){return{id:e.id,projectName:e.projectName,type:e.type,message:e.message,status:e.status,url:e.url,urlPattern:e.urlPattern??null,viewport:e.viewport,userAgent:e.userAgent,authorName:e.authorName,authorEmail:e.authorEmail,resolvedAt:e.resolvedAt?.toISOString()??null,createdAt:e.createdAt.toISOString(),updatedAt:e.updatedAt.toISOString(),annotations:e.annotations.map(Mm),comments:e.comments?.map(Em),screenshotUrl:e.screenshotUrl??null,screenshotRegion:e.screenshotRegion??null,diagnostics:e.diagnostics??null}}function Em({clientId:e,createdAt:t,...i}){return{...i,createdAt:t.toISOString()}}function Mm(e){return{id:e.id,feedbackId:e.feedbackId,cssSelector:e.cssSelector,xpath:e.xpath,textSnippet:e.textSnippet,elementTag:e.elementTag,elementId:e.elementId,textPrefix:e.textPrefix,textSuffix:e.textSuffix,fingerprint:e.fingerprint,neighborText:e.neighborText,anchorKey:e.anchorKey??null,xPct:e.xPct,yPct:e.yPct,wPct:e.wPct,hPct:e.hPct,scrollX:e.scrollX,scrollY:e.scrollY,viewportW:e.viewportW,viewportH:e.viewportH,devicePixelRatio:e.devicePixelRatio,createdAt:e.createdAt.toISOString()}}wu(),ku(),_u(),Xu(),Ju(),rf(),F();var Am=`:host{-webkit-tap-highlight-color:transparent;}.sp-list,.sp-detail-content{overscroll-behavior:contain;}.sp-scrim{display:none;}@media not all and (hover: hover) and (pointer: fine){.sp-radial-item--open .sp-radial-label{opacity:1;transform:translate(0,-50%);}.sp-bulk-checkbox{opacity:1;}.sp-bulk-checkbox::after{content:"";position:absolute;inset:-12px;}.sp-bulk-select-all{display:none;}.sp-list--has-selection .sp-bulk-select-all{display:flex;}.sp-shortcuts-hint{display:none;}}@media (pointer: coarse){.sp-radial-item{width:48px;height:48px;left:3px;bottom:3px;}.sp-radial-item svg{width:20px;height:20px;}.sp-radial-label{font-size:14px;padding:8px 14px;}.sp-search,.sp-input{font-size:16px;}.sp-search,.sp-filter-dropdown-btn,.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle,.sp-segmented__btn,.sp-btn-resolve,.sp-btn-delete,.sp-bulk-btn-resolve,.sp-bulk-btn-delete,.sp-thread-foot .sp-btn-primary{height:40px;min-height:40px;}.sp-bulk-btn-deselect{width:40px;height:40px;}.sp-detail-back{width:44px;height:44px;}.sp-detail-actions button,.sp-detail-actions a,.sp-btn-primary,.sp-btn-ghost,.sp-btn-danger{height:44px;}.sp-export-option,.sp-filter-dropdown-option,.sp-sort-option,.sp-group-header{min-height:44px;}.sp-export-btn,.sp-btn-delete-all,.sp-bulk-select-all{min-height:40px;}.sp-panel-close::before{inset:5px;}.sp-card-expand{position:relative;}.sp-card-expand::after{content:"";position:absolute;inset:-8px -10px;}}@media (max-height: 600px){.sp-stats-bar{display:none;}}@media ${N}{.sp-fab--bottom-right,.sp-radial--bottom-right{right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));}.sp-fab--bottom-left,.sp-radial--bottom-left{left:calc(16px + env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));}.sp-scrim{display:block;position:fixed;inset:0;background:var(--sp-scrim);opacity:0;pointer-events:none;touch-action:none;transition:opacity 0.2s ease;}.sp-scrim--open{opacity:1;pointer-events:auto;}.sp-panel{top:auto;left:0;right:0;bottom:0;width:auto;max-width:none;height:calc(100vh - 48px);height:calc(100dvh - 40px - env(safe-area-inset-top,0px));border-radius:16px 16px 0 0;background:var(--sp-grouped);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:var(--sp-shadow-sheet-up);transform:translateY(105%);}.sp-panel.sp-panel--open{transform:translateY(0);}.sp-panel-header,.sp-detail-header{position:relative;touch-action:none;}.sp-panel-header{padding:24px 8px 6px 20px;}.sp-detail-header{padding:22px 12px 4px 6px;}.sp-panel-header::before,.sp-detail-header::before{content:"";position:absolute;top:6px;left:50%;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:var(--sp-grabber);}.sp-export-btn,.sp-btn-delete-all{width:40px;height:40px;padding:0;justify-content:center;border-radius:50%;background:transparent;}.sp-export-btn svg,.sp-btn-delete-all svg{width:19px;height:19px;}.sp-stats-bar{padding:2px 20px 10px;}.sp-filters{padding:2px 16px 8px;}.sp-stats-bar,.sp-filters{touch-action:pan-x;}.sp-search{height:40px;}.sp-filter-bar{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 8px;padding:0 16px 2px;scrollbar-width:none;}.sp-filter-bar::-webkit-scrollbar{display:none;}.sp-filter-dropdown{flex:0 0 auto;}.sp-filter-dropdown-btn{width:auto;}.sp-filter-dropdown-menu,.sp-sort-menu{position:fixed;top:auto;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));min-width:0;padding:6px;border-radius:16px;background:var(--sp-row);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:var(--sp-shadow-popover);z-index:30;transform-origin:bottom center;}.sp-filter-dropdown-option,.sp-sort-option{min-height:44px;font-size:16px;}.sp-list{padding:8px 16px calc(16px + env(safe-area-inset-bottom,0px));}.sp-bulk-bar{bottom:calc(12px + env(safe-area-inset-bottom,0px));}.sp-detail-section{padding:0 16px;}.sp-detail-content{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));}.sp-identity-backdrop{align-items:flex-end;}.sp-identity-modal{width:100%;max-width:none;margin-bottom:var(--sp-kb, 0px);padding:22px 20px calc(20px + env(safe-area-inset-bottom,0px));border-radius:16px 16px 0 0;background:var(--sp-grouped);-webkit-backdrop-filter:none;backdrop-filter:none;transform:translateY(100%);}.sp-identity-modal .sp-input{background:var(--sp-row);}.sp-identity-actions button{height:50px;}.sp-identity-actions .sp-btn-primary{flex:2;}}@media (prefers-reduced-transparency: reduce){*{-webkit-backdrop-filter:none !important;backdrop-filter:none !important;}}@media (prefers-contrast: more){.sp-card,.sp-detail-message,.sp-detail-meta,.sp-detail-annotation-info,.sp-detail-diag-toggle{box-shadow:inset 0 0 0 1px var(--sp-separator);}}`;function Tm(e){let t="dark"===e.scheme;return`:host{all:initial;position:fixed;z-index:2147483647;font-family:var(--sp-font);font-size:14px;line-height:1.5;color:var(--sp-text);color-scheme:${e.scheme};-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;${function(e){let{surface:t}=e,i="dark"===e.scheme;return`--sp-accent: ${e.accent};--sp-accent-light: ${e.accentLight};--sp-accent-dark: ${e.accentDark};--sp-accent-glow: ${e.accentGlow};--sp-accent-gradient: ${e.accentGradient};--sp-accent-text: ${e.accentText};--sp-bg: ${e.bg};--sp-bg-hover: ${e.bgHover};--sp-text: ${e.text};--sp-text-secondary: ${e.textSecondary};--sp-text-tertiary: ${e.textTertiary};--sp-border: ${e.border};--sp-shadow: ${e.shadow};--sp-glass-bg: ${e.glassBg};--sp-glass-bg-heavy: ${e.glassBgHeavy};--sp-glass-border: ${e.glassBorder};--sp-glass-border-subtle: ${e.glassBorderSubtle};--sp-type-question: ${e.typeQuestion};--sp-type-change: ${e.typeChange};--sp-type-bug: ${e.typeBug};--sp-type-other: ${e.typeOther};--sp-type-question-bg: ${e.typeQuestionBg};--sp-type-change-bg: ${e.typeChangeBg};--sp-type-bug-bg: ${e.typeBugBg};--sp-type-other-bg: ${e.typeOtherBg};--sp-status-open: ${e.statusOpen};--sp-status-open-bg: ${e.statusOpenBg};--sp-status-resolved: ${e.statusResolved};--sp-status-resolved-bg: ${e.statusResolvedBg};--sp-status-in-progress: ${e.statusInProgress};--sp-status-in-progress-bg: ${e.statusInProgressBg};--sp-status-wont-fix: ${e.statusWontFix};--sp-status-wont-fix-bg: ${e.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: ${t.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: ${tt};--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: ${t.material};--sp-material-thick: ${t.materialThick};--sp-material-blur: blur(30px) saturate(180%);--sp-grouped: ${t.grouped};--sp-row: ${t.row};--sp-row-hover: ${t.rowHover};--sp-fill: ${t.fill};--sp-fill-strong: ${t.fillStrong};--sp-fill-contrast: ${t.fillContrast};--sp-separator: ${t.separator};--sp-edge: ${t.edge};--sp-sheen: ${t.sheen};--sp-sheen-soft: ${t.sheenSoft};--sp-hairline: ${t.hairline};--sp-thumb: ${t.thumb};--sp-grabber: ${t.grabber};--sp-gray3: ${t.gray3};--sp-danger: ${t.danger};--sp-danger-press: ${t.dangerPress};--sp-shadow-row: ${t.shadowRow};--sp-shadow-row-hover: ${t.shadowRowHover};--sp-shadow-float: ${Ye(t.shadowFloat,Ke[e.scheme].hairline)};--sp-shadow-sheet: ${Ye(t.shadowSheet,Ke[e.scheme].hairline)};--sp-shadow-sheet-up: ${Ye(t.shadowSheetUp,Ke[e.scheme].hairline)};--sp-shadow-popover: ${Ye(t.shadowPopover,Ke[e.scheme].hairline)};--sp-shadow-thumb: ${t.shadowThumb};--sp-shadow-edge-drop: ${t.shadowEdgeDrop};--sp-ring: 0 0 0 3px color-mix(in srgb, var(--sp-accent) 30%, transparent);--sp-ink-mix: ${t.inkMix};--sp-ink-pct: ${t.inkPct};--sp-ink-pct-badge: ${t.inkPctBadge};--sp-ink-green: ${i?"color-mix(in srgb, var(--sp-status-open) 80%, #fff)":"color-mix(in srgb, var(--sp-status-open) 82%, #000)"};--sp-ink-red: ${i?"color-mix(in srgb, var(--sp-type-bug) 66%, #fff)":"color-mix(in srgb, var(--sp-type-bug) 86%, #000)"};--sp-ink-amber: ${i?"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: ${i?"color-mix(in srgb, var(--sp-accent-text) 70%, #fff)":"var(--sp-accent-text)"};`}(e)} --sp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);--sp-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);--sp-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);--sp-tr: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.16s var(--sp-ease-out);--sp-backdrop: ${t?"rgba(0, 0, 0, 0.45)":"rgba(0, 0, 0, 0.2)"};--sp-identity-overlay: ${t?"rgba(0, 0, 0, 0.5)":"rgba(0, 0, 0, 0.2)"};--sp-scrim: ${t?"rgba(0, 0, 0, 0.55)":"rgba(0, 0, 0, 0.24)"};}*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}:focus-visible{outline:2px solid var(--sp-accent);outline-offset:2px;box-shadow:0 0 0 4px var(--sp-bg);}button,[role="button"],[role="tab"],[role="menuitem"],[role="option"]{touch-action:manipulation;-webkit-user-select:none;user-select:none;}:where(.sp-panel-close,.sp-filter-dropdown-btn,.sp-segmented__btn,.sp-btn-resolve,.sp-btn-delete,.sp-btn-delete-all,.sp-btn-danger,.sp-btn-primary,.sp-btn-ghost,.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle,.sp-export-btn,.sp-bulk-btn-resolve,.sp-bulk-btn-delete,.sp-bulk-btn-deselect,.sp-detail-back,.sp-detail-btn-resolve,.sp-detail-btn-reopen,.sp-detail-btn-delete,.sp-detail-btn-custom,.sp-detail-btn-goto,.sp-shortcuts-close):not(:disabled):active{transform:scale(0.97);}.sp-fab{position:fixed;width:54px;height:54px;border-radius:var(--sp-radius-full);background:var(--sp-accent);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 1px 0 rgba(255,255,255,0.22),0 8px 24px color-mix(in srgb,var(--sp-accent) 36%,transparent),0 2px 6px rgba(0,0,0,0.12);transition:transform 0.16s var(--sp-ease-out),opacity 0.2s ease,box-shadow 0.2s ease;outline:none;touch-action:manipulation;-webkit-user-select:none;user-select:none;}.sp-fab:focus-visible{outline:2px solid var(--sp-accent);outline-offset:3px;}@media (hover: hover) and (pointer: fine){.sp-fab:hover{box-shadow:inset 0 1px 0 rgba(255,255,255,0.22),0 12px 32px color-mix(in srgb,var(--sp-accent) 46%,transparent),0 3px 8px rgba(0,0,0,0.14);}}.sp-fab:active{transform:scale(0.97);}div:has(> .sp-fab):has(~ .sp-panel.sp-panel--open) > .sp-fab{opacity:0;transform:scale(0.9);pointer-events:none;}.sp-fab--bottom-right{bottom:24px;right:24px;}.sp-fab--bottom-left{bottom:24px;left:24px;}.sp-fab svg{width:23px;height:23px;fill:currentColor;}.sp-fab-badge{position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;padding:0 6px;border-radius:var(--sp-radius-full);background:var(--sp-danger);color:#fff;font:600 11px/1 var(--sp-font);display:flex;align-items:center;justify-content:center;border:2px solid var(--sp-bg);pointer-events:none;}.sp-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);max-width:min(360px,calc(100vw - 32px));padding:11px 18px;border-radius:20px;background:var(--sp-material-thick);-webkit-backdrop-filter:var(--sp-material-blur);backdrop-filter:var(--sp-material-blur);color:var(--sp-text);font:500 14px/1.35 var(--sp-font);letter-spacing:-0.01em;box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);cursor:pointer;animation:sp-toast-in 0.2s var(--sp-ease-out);transition:opacity 0.15s ease;}.sp-toast--leaving{opacity:0;}.sp-toast[hidden]{display:none;}.sp-toast--error::before{content:"";display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;background:var(--sp-type-bug);vertical-align:1px;}@keyframes sp-toast-in{from{opacity:0;transform:translate(-50%,8px);}}.sp-radial{position:fixed;pointer-events:none;width:54px;height:54px;}.sp-radial--bottom-right{bottom:24px;right:24px;}.sp-radial--bottom-left{bottom:24px;left:24px;}.sp-radial-item{position:absolute;left:5px;bottom:5px;width:44px;height:44px;border-radius:var(--sp-radius-full);background:var(--sp-material-thick);-webkit-backdrop-filter:var(--sp-material-blur);backdrop-filter:var(--sp-material-blur);color:var(--sp-text);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);font-size:12px;font-weight:600;}.sp-radial-item:focus-visible{background:var(--sp-row);color:var(--sp-accent-ink);box-shadow:var(--sp-shadow-float),var(--sp-ring);outline:none;}@media (hover: hover) and (pointer: fine){.sp-radial-item:hover{background:var(--sp-row);color:var(--sp-accent-ink);}}.sp-radial-item svg{width:19px;height:19px;flex-shrink:0;stroke:currentColor;fill:none;}.sp-radial-label{position:absolute;top:50%;white-space:nowrap;font-size:13px;font-weight:500;letter-spacing:-0.01em;color:var(--sp-text);pointer-events:none;opacity:0;padding:6px 12px;border-radius:var(--sp-radius-full);background:var(--sp-material-thick);-webkit-backdrop-filter:var(--sp-material-blur);backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);transform:translate(4px,-50%);transition:opacity 0.18s ease,transform 0.2s var(--sp-ease-out);}.sp-radial--bottom-right .sp-radial-label{right:calc(100% + 12px);}.sp-radial--bottom-left .sp-radial-label{left:calc(100% + 12px);transform:translate(-4px,-50%);}.sp-radial-item:focus-visible .sp-radial-label{opacity:1;transform:translate(0,-50%);}@media (hover: hover) and (pointer: fine){.sp-radial-item:hover .sp-radial-label{opacity:1;transform:translate(0,-50%);}}.sp-panel{position:fixed;top:12px;right:12px;bottom:12px;width:380px;max-width:calc(100vw - 24px);border-radius:var(--sp-radius-xl);background:var(--sp-material);-webkit-backdrop-filter:var(--sp-material-blur);backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),inset 0 0 0 0.5px var(--sp-sheen-soft),var(--sp-shadow-sheet);display:flex;flex-direction:column;overflow:clip;}.sp-panel-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 12px 8px 20px;position:relative;z-index:2;}.sp-panel-title{font-family:var(--sp-font-display);font-size:28px;font-weight:700;line-height:1.15;color:var(--sp-text);letter-spacing:-0.022em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-panel-close{position:relative;width:44px;height:44px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--sp-text-secondary);transition:var(--sp-tr);}.sp-panel-close::before{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--sp-fill);transition:background-color 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-panel-close:hover{color:var(--sp-text);}.sp-panel-close:hover::before{background:var(--sp-fill-strong);}}.sp-panel-close svg{position:relative;width:13px;height:13px;stroke-width:2.6;}.sp-filters{padding:2px 16px 10px;position:sticky;top:0;z-index:1;}.sp-search-wrap{position:relative;margin-bottom:10px;}.sp-search{width:100%;height:36px;padding:0 12px 0 34px;border-radius:var(--sp-radius);border:none;background:var(--sp-fill);color:var(--sp-text);font-family:var(--sp-font);font-size:15px;letter-spacing:-0.01em;outline:none;transition:var(--sp-tr);}.sp-search::placeholder{color:var(--sp-text-secondary);}.sp-search:focus{box-shadow:var(--sp-ring);}.sp-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--sp-text-secondary);width:16px;height:16px;}.sp-filter-bar{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap;}.sp-filter-dropdown{position:relative;flex:1 1 auto;min-width:0;}.sp-filter-dropdown-btn{--sp-chip-color: var(--sp-text-secondary);display:inline-flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 10px;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);}@media (hover: hover) and (pointer: fine){.sp-filter-dropdown-btn:hover{background:var(--sp-fill-strong);}}.sp-filter-dropdown-btn[aria-expanded="true"]{background:var(--sp-fill-strong);}.sp-filter-dropdown-btn--filtered,.sp-filter-dropdown-btn--filtered[aria-expanded="true"]{background:color-mix(in srgb,var(--sp-chip-color) 14%,transparent);}.sp-filter-dropdown-btn__icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;color:var(--sp-chip-color);}.sp-filter-dropdown-btn__icon svg{width:14px;height:14px;}.sp-filter-dropdown-btn__label{display:inline-flex;align-items:baseline;gap:6px;flex:1;min-width:0;overflow:hidden;}.sp-filter-dropdown-btn__prefix{color:var(--sp-text-secondary);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:0.04em;}.sp-filter-dropdown-btn__value{color:var(--sp-text);font-weight:600;overflow:hidden;text-overflow:ellipsis;}.sp-filter-dropdown-btn--filtered .sp-filter-dropdown-btn__value{color:color-mix(in srgb,var(--sp-chip-color) var(--sp-ink-pct),var(--sp-ink-mix));}.sp-filter-dropdown-btn__chevron{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--sp-text-secondary);transition:transform 0.2s var(--sp-ease-out);}.sp-filter-dropdown-btn__chevron svg{width:12px;height:12px;}.sp-filter-dropdown-btn[aria-expanded="true"] .sp-filter-dropdown-btn__chevron{transform:rotate(180deg);}.sp-filter-dropdown-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;min-width:180px;padding:6px;border-radius:var(--sp-radius-lg);background:var(--sp-material-thick);-webkit-backdrop-filter:var(--sp-material-blur);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;}@keyframes sp-menu-in{from{opacity:0;transform:scale(0.96);}}.sp-filter-dropdown-option{--sp-chip-color: var(--sp-text-secondary);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;text-align:left;transition:background-color 0.12s ease,color 0.12s ease;}.sp-filter-dropdown-option__icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;background:color-mix(in srgb,var(--sp-chip-color) 14%,transparent);color:var(--sp-chip-color);}.sp-filter-dropdown-option__icon svg{width:13px;height:13px;}.sp-filter-dropdown-option__label{flex:1;min-width:0;}.sp-filter-dropdown-option__check{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--sp-accent-ink);}.sp-filter-dropdown-option__check svg{width:13px;height:13px;}@media (hover: hover) and (pointer: fine){.sp-filter-dropdown-option:hover{background:var(--sp-fill);}}.sp-filter-dropdown-option--active{font-weight:600;}.sp-segmented{display:inline-flex;align-items:stretch;padding:2px;border-radius:9px;background:var(--sp-fill);flex-shrink:0;}.sp-segmented__btn{--sp-chip-color: var(--sp-text-tertiary);display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:none;border-radius:7px;background:transparent;color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:500;letter-spacing:-0.01em;cursor:pointer;white-space:nowrap;transition:var(--sp-tr);}.sp-segmented__icon{display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;flex-shrink:0;color:var(--sp-chip-color);}.sp-segmented__icon svg{width:13px;height:13px;}@media (hover: hover) and (pointer: fine){.sp-segmented__btn:not(.sp-segmented__btn--active):hover{background:var(--sp-sheen);}}.sp-segmented__btn--active{background:var(--sp-thumb);font-weight:600;box-shadow:var(--sp-shadow-thumb);}.sp-list{flex:1;overflow-y:auto;padding:8px 16px 16px;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 8px);mask-image:linear-gradient(to bottom,transparent,#000 8px);}.sp-list::-webkit-scrollbar{width:6px;}.sp-list::-webkit-scrollbar-track{background:transparent;}.sp-list::-webkit-scrollbar-thumb{background:var(--sp-fill-strong);border-radius:var(--sp-radius-full);}@media (hover: hover) and (pointer: fine){.sp-list::-webkit-scrollbar-thumb:hover{background:var(--sp-text-tertiary);}}.sp-card{position:relative;display:flex;padding:12px 14px 12px 12px;margin-bottom:8px;cursor:pointer;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);transition:var(--sp-tr);}@media (hover: hover) and (pointer: fine){.sp-card:hover{background:var(--sp-row-hover);box-shadow:var(--sp-shadow-row-hover);}}.sp-card:active{transform:scale(0.985);}.sp-card-bar{align-self:flex-start;width:8px;height:8px;margin:6px 10px 0 2px;border-radius:50%;flex-shrink:0;transition:opacity 0.15s ease;}.sp-card-body{flex:1;min-width:0;}.sp-card-header{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-bottom:4px;}.sp-card-number{font-size:13px;font-weight:600;letter-spacing:-0.01em;color:var(--sp-text);font-variant-numeric:tabular-nums;}.sp-badge{white-space:nowrap;padding:2px 8px;border-radius:var(--sp-radius-full);font-size:11px;font-weight:600;line-height:16px;letter-spacing:0.01em;background:color-mix(in srgb,currentColor 13%,transparent) !important;-webkit-text-fill-color:color-mix(in srgb,currentColor var(--sp-ink-pct-badge),var(--sp-ink-mix));}.sp-card-date{font-size:12px;color:var(--sp-text-tertiary);margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums;}.sp-lost{font-size:12px;color:var(--sp-text-tertiary);margin-top:4px;}.sp-card-message{font-size:14px;line-height:1.43;letter-spacing:-0.006em;color:var(--sp-text);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}.sp-card-message--expanded{-webkit-line-clamp:unset;}.sp-card-expand{font-size:13px;font-weight:500;color:var(--sp-accent-ink);cursor:pointer;background:none;border:none;padding:4px 0;font-family:var(--sp-font);transition:opacity 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-card-expand:hover{opacity:0.8;}}.sp-card-footer{display:flex;align-items:center;justify-content:flex-end;gap:2px;margin-top:6px;margin-right:-6px;}.sp-btn-resolve,.sp-btn-delete{height:30px;padding:0 10px;border-radius:8px;border:none;background:transparent;font-family:var(--sp-font);font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:5px;transition:var(--sp-tr);}.sp-btn-resolve svg,.sp-btn-delete svg{width:14px;height:14px;}.sp-btn-resolve{color:var(--sp-ink-green);}.sp-card--resolved .sp-btn-resolve{color:var(--sp-accent-ink);}.sp-btn-delete{color:var(--sp-ink-red);}@media (hover: hover) and (pointer: fine){.sp-btn-resolve:hover{background:color-mix(in srgb,var(--sp-status-open) 10%,transparent);}.sp-card--resolved .sp-btn-resolve:hover{background:color-mix(in srgb,var(--sp-accent) 10%,transparent);}.sp-btn-delete:hover{background:color-mix(in srgb,var(--sp-type-bug) 10%,transparent);}}.sp-btn-resolve:disabled,.sp-btn-delete:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-spinner--sm{width:14px;height:14px;}.sp-panel-header-right{display:flex;flex-shrink:0;align-items:center;gap:2px;}.sp-btn-delete-all{width:32px;height:32px;padding:0;justify-content:center;border-radius:50%;border:none;background:transparent;color:var(--sp-ink-red);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);}.sp-btn-delete-all svg{width:17px;height:17px;}.sp-btn-delete-all span,.sp-export-btn span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}@media (hover: hover) and (pointer: fine){.sp-btn-delete-all:hover{background:color-mix(in srgb,var(--sp-type-bug) 10%,transparent);}}.sp-btn-delete-all:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-confirm-backdrop{position:fixed;inset:0;background:var(--sp-backdrop);display:flex;align-items:center;justify-content:center;z-index:2147483647;opacity:0;transition:opacity 0.2s ease;}.sp-confirm-dialog,.sp-identity-modal{border-radius:var(--sp-radius-xl);background:var(--sp-material-thick);-webkit-backdrop-filter:var(--sp-material-blur);backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-sheet);}.sp-confirm-dialog{width:min(300px,calc(100vw - 32px));padding:22px 16px 16px;text-align:center;transform:translateY(8px) scale(0.97);transition:transform 0.2s var(--sp-ease-out);}.sp-confirm-title{font-size:17px;font-weight:600;color:var(--sp-text);letter-spacing:-0.022em;margin-bottom:4px;}.sp-confirm-message{font-size:13px;color:var(--sp-text-secondary);line-height:1.4;margin-bottom:18px;}.sp-confirm-actions{display:flex;gap:8px;justify-content:flex-end;}.sp-confirm-actions > button,.sp-identity-actions > button{flex:1 1 0;height:44px;}.sp-card--resolved .sp-card-number,.sp-card--resolved .sp-card-message{color:var(--sp-text-secondary);}.sp-card--resolved .sp-card-message{text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--sp-text-secondary) 60%,transparent);}.sp-loading{display:flex;align-items:center;justify-content:center;padding:56px 24px;}.sp-identity-backdrop{position:fixed;inset:0;background:var(--sp-identity-overlay);display:flex;align-items:center;justify-content:center;z-index:2147483647;opacity:0;transition:opacity 0.2s ease;}.sp-identity-modal{width:340px;max-width:calc(100vw - 32px);padding:24px 20px 18px;color:var(--sp-text);transform:translateY(12px) scale(0.97);transition:transform 0.2s var(--sp-ease-out);}.sp-identity--open{opacity:1;}.sp-identity--open .sp-identity-modal{transform:none;}.sp-identity-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px;}.sp-identity-title{font-family:var(--sp-font-display);font-size:20px;font-weight:700;color:var(--sp-text);letter-spacing:-0.022em;}.sp-input{width:100%;height:40px;padding:0 12px;border-radius:var(--sp-radius);border:none;background:var(--sp-fill);color:var(--sp-text);font-family:var(--sp-font);font-size:15px;letter-spacing:-0.01em;outline:none;transition:var(--sp-tr);}.sp-input::placeholder{color:var(--sp-text-secondary);}.sp-input:focus{background:var(--sp-row);box-shadow:var(--sp-ring);}.sp-input-label{font-size:12px;font-weight:500;letter-spacing:0.02em;color:var(--sp-text-secondary);margin:0 0 6px 4px;display:block;}.sp-btn-primary,.sp-btn-ghost,.sp-btn-danger{height:40px;padding:0 18px;border-radius:12px;border:none;color:#fff;font-family:var(--sp-font);font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;transition:var(--sp-tr);}.sp-btn-primary{background:var(--sp-accent);}.sp-btn-ghost{background:var(--sp-fill);color:var(--sp-text);font-weight:500;}.sp-btn-danger{background:var(--sp-danger);}@media (hover: hover) and (pointer: fine){.sp-btn-primary:hover{background:var(--sp-accent-dark);}.sp-btn-ghost:hover{background:var(--sp-fill-strong);}.sp-btn-danger:hover{background:var(--sp-danger-press);}}.sp-btn-primary:disabled{opacity:0.4;cursor:not-allowed;transform:none;}.sp-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 24px;color:var(--sp-text-secondary);text-align:center;gap:8px;}.sp-empty-text{font-size:15px;font-weight:500;letter-spacing:-0.01em;}.sp-load-more-wrap{display:flex;justify-content:center;padding:4px 0 0;}.sp-btn-ghost.sp-btn-load-more{width:100%;height:44px;border-radius:var(--sp-radius-lg);background:var(--sp-row);color:var(--sp-accent-ink);box-shadow:var(--sp-shadow-row);}@media (hover: hover) and (pointer: fine){.sp-btn-ghost.sp-btn-load-more:hover{background:var(--sp-row-hover);}}@media (forced-colors: active){.sp-fab,.sp-radial-item,.sp-filter-dropdown-btn,.sp-segmented,.sp-segmented__btn,.sp-card,.sp-panel-close,.sp-search,.sp-btn-resolve,.sp-btn-delete,.sp-btn-delete-all,.sp-btn-primary,.sp-btn-ghost,.sp-btn-danger,.sp-card-expand,.sp-input,.sp-confirm-dialog{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-segmented__btn--active{background:Highlight !important;color:HighlightText !important;}.sp-filter-dropdown-menu{border:2px solid ButtonText !important;background:Canvas !important;}.sp-filter-dropdown-option--active{background:Highlight !important;color:HighlightText !important;}.sp-fab:focus-visible,.sp-radial-item:focus-visible,.sp-filter-dropdown-btn:focus-visible,.sp-segmented__btn:focus-visible,.sp-filter-dropdown-option:focus-visible,.sp-panel-close:focus-visible,.sp-btn-resolve:focus-visible,.sp-btn-delete:focus-visible,.sp-btn-delete-all:focus-visible,.sp-btn-primary:focus-visible,.sp-btn-ghost:focus-visible,.sp-btn-danger:focus-visible,.sp-card-expand:focus-visible,.sp-input:focus-visible,.sp-search:focus-visible{outline:3px solid Highlight !important;}.sp-panel{border:2px solid ButtonText !important;}.sp-fab-badge{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-card-bar{background:ButtonText !important;}}@keyframes sp-fab-in{from{opacity:0;transform:scale(0.9);}}.sp-anim-fab-in{animation:sp-fab-in 0.2s var(--sp-ease-out) backwards;}@keyframes sp-flash-bg{from{background-color:var(--sp-accent-light);}}.sp-anim-flash{animation:sp-flash-bg 0.6s var(--sp-ease-out);}.sp-panel{transform:translateX(110%);transition:transform 0.2s var(--sp-ease-out);}.sp-panel.sp-panel--open{transform:translateX(0);transition:transform 0.3s var(--sp-ease-drawer);}.sp-radial-item{opacity:0;pointer-events:none;transform:translate(0,0) scale(0.9);transition:transform 0.2s var(--sp-ease-out),opacity 0.15s ease,background-color 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease,color 0.15s ease,scale 0.16s var(--sp-ease-out);}.sp-radial-item:active{scale:0.97;}.sp-radial-item.sp-radial-item--open{opacity:1;pointer-events:auto;transition-delay:calc(var(--sp-i, 0) * 30ms),calc(var(--sp-i, 0) * 30ms),0s,0s,0s,0s,0s;}@keyframes sp-spin{to{transform:rotate(360deg);}}.sp-spinner{width:20px;height:20px;border:2px solid var(--sp-fill-strong);border-top-color:var(--sp-text-secondary);border-radius:50%;animation:sp-spin 0.6s linear infinite;}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;animation-delay:0s !important;animation-iteration-count:1 !important;transition-property:opacity,color,background-color,border-color,box-shadow,outline-color !important;transition-delay:0s !important;}.sp-spinner{animation-duration:1.2s !important;animation-iteration-count:infinite !important;}} ${Yu} ${Gu} .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;}} .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;}} .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;} .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;}} ${Am}`}it(),it(),F(),te(),ze(),fu(),it();var Lm=`opacity 150ms ease, transform 150ms ${D}`,Rm="scale(0.97)",Bm="blur(30px) saturate(180%)",Pm=class{constructor(e,t="en"){this.colors=e,this.locale=t,this.root=j("div",{style:`position:fixed;z-index:2147483647;max-width:280px;padding:10px 14px 12px;border:none;border-radius:14px;backdrop-filter:${Bm};-webkit-backdrop-filter:${Bm};font-family:${tt};pointer-events:auto;opacity:0;transform:${Rm};transition:${Lm};visibility:hidden;-webkit-font-smoothing:antialiased;`}),this.root.setAttribute("role","tooltip"),this.root.id=this.tooltipId,this.restyle(),this.root.addEventListener("mouseenter",()=>this.cancelHide()),this.root.addEventListener("mouseleave",()=>this.scheduleHide()),re(this.root),document.body.appendChild(this.root)}colors;locale;root;showTimer=null;hideTimer=null;currentFeedbackId=null;closedAt=0;tooltipId="sp-tooltip";restyle(){let{surface:e}=this.colors,{style:t}=this.root;t.background=e.material,t.boxShadow=`inset 0 0.5px 0 ${e.edge}, ${e.shadowCard}`}show(e,t){if(this.cancelHide(),this.currentFeedbackId===e.id)return;this.cancelShow();let i="visible"===this.root.style.visibility||Date.now()-this.closedAt<300;this.showTimer=setTimeout(()=>{this.currentFeedbackId=e.id,this.render(e),this.position(t);let r=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;this.root.style.transition=r||i?"none":Lm,this.root.style.visibility="visible",this.root.style.opacity="1",this.root.style.transform="none"},i?0:120)}scheduleHide(){this.cancelHide(),this.hideTimer=setTimeout(()=>this.hide(),80)}hide(){this.cancelShow(),this.currentFeedbackId&&(this.closedAt=Date.now()),this.currentFeedbackId=null,this.root.style.opacity="0",this.root.style.transform=Rm,setTimeout(()=>{this.currentFeedbackId||(this.root.style.visibility="hidden")},150)}cancelShow(){this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=null)}cancelHide(){this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}render(e){let t=hu(this.locale),{inkMix:i}=this.colors.surface,r=j("div",{style:"display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-bottom:8px;"}),n=(e,t)=>{let r=j("span",{style:`padding:2px 8px;border-radius:9999px;font-size:11px;font-weight:600;white-space:nowrap;color:color-mix(in srgb,${t} 74%,${i});background:color-mix(in srgb,${t} 13%,transparent);letter-spacing:0.01em;`});return U(r,e),r},s=j("span",{style:`font-size:12px;color:${this.colors.textSecondary};margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums;`});U(s,Q(e.createdAt,this.locale)),r.appendChild(n(cu(e.type,t),qe(e.type,this.colors))),r.appendChild(n(pu(e.status,t),Ge(e.status,this.colors))),r.appendChild(s);let o=j("div",{style:`font-size:14px;line-height:1.43;letter-spacing:-0.006em;color:${this.colors.text};display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;`});U(o,e.message),this.root.replaceChildren(r,o)}position(e){let t=this.root.getBoundingClientRect(),i=e.top-t.height-10,r=e.left+e.width/2-t.width/2,n=!0;i<8&&(i=e.bottom+10,n=!1),r=Math.max(8,Math.min(r,window.innerWidth-t.width-8)),this.root.style.top=`${i}px`,this.root.style.left=`${r}px`;let s=Math.max(22,Math.min(e.left+e.width/2-r,t.width-16));this.root.style.transformOrigin=`${s}px ${n?"100%":"0"}`}contains(e){return this.root.contains(e)}destroy(){this.cancelShow(),this.cancelHide(),this.root.remove()}};dt();var Im=null;function Nm(){let e=()=>{};return{destroy:e,open:e,close:e,refresh:()=>Promise.resolve(),focusFeedback:()=>!1,on:()=>e,off:e}}function Dm(){try{return process.env.NODE_ENV}catch{return}}function Om(t){if(typeof window>"u"||typeof document>"u")return t.onSkip?.("ssr"),Nm();let i=t.debug?(...e)=>console.debug("[siteping]",...e):()=>{};if(Im)return i("initSiteping() called more than once \u2014 returning existing instance"),Im();let r=Dm();if(!t.forceShow&&("production"===r||void 0===r&&!function(){let e=location.hostname;return""===e||"localhost"===e||e.endsWith(".localhost")||"127.0.0.1"===e||"[::1]"===e}()))return t.onSkip?.("production"),Nm();let n="number"==typeof t.minViewportWidth&&Number.isFinite(t.minViewportWidth)?t.minViewportWidth:0;if(!t.forceShow&&window.innerWidth<n){let e="mobile";return t.onSkip?.(e),Nm()}if(!(t.store||t.endpoint&&"string"==typeof t.endpoint))return console.error("[siteping] Missing 'endpoint' or 'store' in config. Provide an endpoint like '/api/siteping' or a SitepingStore instance."),Nm();if(!t.projectName||"string"!=typeof t.projectName)return console.error("[siteping] Missing or invalid 'projectName' in config. Expected a non-empty string."),Nm();let o=function(e){let t=function(e){try{return Intl.getCanonicalLocales(e.replace(/_/g,"-"))[0]}catch{return}}(e);return t||(console.warn(`[siteping] Invalid locale "${e}", falling back to "en"`),"en")}(t.locale??"en"),a="en"===o?Promise.resolve():e.loadLocale(o).catch(()=>{}),d=hu(o),c=t.scopeAnnotationsByUrl??!0,p=()=>{try{let e=t.getPageScope?.();if(e)return e}catch(e){i("getPageScope() threw, falling back to pathname:",e)}return{url:window.location.pathname,urlPattern:null}};i("Initializing widget",{projectName:t.projectName,theme:t.theme??"light",locale:o,scopeAnnotationsByUrl:c});let h=function(e){return void 0===e||!1===e?{console:!1,network:!1,maxConsoleEntries:50,maxNetworkEntries:20}:!0===e?{console:!0,network:!0,maxConsoleEntries:50,maxNetworkEntries:20}:{console:!1!==e.console,network:!1!==e.network,maxConsoleEntries:"number"==typeof e.maxConsoleEntries?e.maxConsoleEntries:50,maxNetworkEntries:"number"==typeof e.maxNetworkEntries?e.maxNetworkEntries:20}}(t.captureDiagnostics),u=h.console?new $g(h.maxConsoleEntries):null,f=h.network?new zg(h.maxNetworkEntries):null,g=Ue(t.accentColor,t.theme),m=new _g,b=new Set,x=(e,...t)=>{for(let i of b)i.emit(e,...t)},y=(()=>{if(t.store)return new km(t.store,t.projectName);let e=t.endpoint;if("string"!=typeof e||0===e.length)throw new Error("[siteping] internal invariant: endpoint must be a non-empty string in HTTP mode");return new Pg(e,t.projectName,{apiKey:t.apiKey,headers:t.headers})})();t.onOpen&&m.on("open",t.onOpen),t.onClose&&m.on("close",t.onClose),t.onFeedbackSent&&m.on("feedback:sent",t.onFeedbackSent),t.onCommentAdded&&m.on("comment:added",t.onCommentAdded),t.onError&&m.on("feedback:error",t.onError),t.onError&&m.on("panel:action-error",t.onError),m.on("panel:action-error",e=>console.error("[siteping] Panel action failed:",e)),t.onAnnotationStart&&m.on("annotation:start",t.onAnnotationStart),t.onAnnotationEnd&&m.on("annotation:end",t.onAnnotationEnd);let v=pg(t.projectName,t.endpoint);m.on("feedback:sent",e=>v.add(e.id)),m.on("feedback:deleted",e=>v.remove(e)),m.on("feedback:all-deleted",()=>v.clear());let w={"feedback:sent":()=>m.on("feedback:sent",e=>x("feedback:sent",e)),"feedback:deleted":()=>m.on("feedback:deleted",e=>x("feedback:deleted",e)),"comment:added":()=>m.on("comment:added",e=>x("comment:added",e)),"feedback:error":()=>m.on("feedback:error",e=>x("feedback:error",e)),"panel:open":()=>m.on("open",()=>x("panel:open")),"panel:close":()=>m.on("close",()=>x("panel:close")),"annotation:start":()=>m.on("annotation:start",()=>x("annotation:start")),"annotation:end":()=>m.on("annotation:end",()=>x("annotation:end"))};for(let e of Object.values(w))e();m.on("open",()=>i("Panel opened")),m.on("close",()=>i("Panel closed")),m.on("feedback:sent",e=>i("Feedback sent",e.id)),m.on("feedback:error",e=>i("Feedback failed",e.message)),m.on("annotation:start",()=>i("Annotation started")),m.on("annotation:end",()=>i("Annotation ended"));let C=document.createElement("siteping-widget");C.style.cssText="position:fixed;z-index:2147483647;pointer-events:auto;";let S,E="test"===Dm()?"open":"closed",M=C.attachShadow({mode:E});if("adoptedStyleSheets"in ShadowRoot.prototype){let e=new CSSStyleSheet;M.adoptedStyleSheets=[e],S=()=>e.replaceSync(Tm(g))}else{let e=document.createElement("style");M.appendChild(e),S=()=>{e.textContent=Tm(g)}}S(),re(C,M);let A=function(){let e=e=>{be(e.target)&&ae()&&e.stopImmediatePropagation()},t=[["pointerdown",e],["focusin",e],["focusout",e=>{(be(e.target)||be(e.relatedTarget))&&ae()&&e.stopImmediatePropagation()}],["keydown",e=>{if(("Tab"===e.key||"Escape"===e.key)&&be(e.target)&&ae()){if("Escape"===e.key)return void(function(e){for(let t=le(e);t;t=me(t))for(let e of fe.get(t)??[])if(e())return!0;return!1}(e)&&e.preventDefault());for(let t=le(e);t;t=me(t))for(let i of[...ge.get(t)??[]])i(e);e.stopImmediatePropagation()}}]];for(let[e,i]of t)window.addEventListener(e,i,!0);return()=>{for(let[e,i]of t)window.removeEventListener(e,i,!0)}}();document.body.appendChild(C);let T=function(e){let t=null,i=i=>{let r=i.target;r instanceof HTMLElement&&(r===document.body||r===document.documentElement||r===e||z(r)||(t=_(r)))};return document.addEventListener("focusin",i),{getLastPageFocus:()=>(t&&!t.isConnected&&(t=null),t),destroy(){document.removeEventListener("focusin",i),t=null}}}(C),L=document.createElement("div");L.setAttribute("role","status"),L.setAttribute("aria-live","polite"),L.setAttribute("aria-atomic","true"),L.setAttribute("data-siteping-ignore","true"),L.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;",re(L),document.body.appendChild(L);let R=document.createElement("div");R.className="sp-toast",R.setAttribute("aria-hidden","true"),R.hidden=!0;let B,P=()=>{clearTimeout(B),!R.hidden&&(R.classList.add("sp-toast--leaving"),B=setTimeout(()=>{R.hidden=!0,R.classList.remove("sp-toast--leaving")},150))};R.addEventListener("click",P),M.appendChild(R);let I=(e,t)=>{L.textContent=e,R.textContent=e,R.classList.toggle("sp-toast--error",t),R.classList.remove("sp-toast--leaving"),R.hidden=!1,clearTimeout(B),B=setTimeout(P,t?8e3:4e3)},N=new Pm(g,o),D=new wm(g,N,m,d,L),O=new Hg(M,t,m,d);m.on("markers:changed",e=>O.updateBadge(e));let $=null,F=null,W=!1,H=0;async function V(e=!1){let i=t.identity??jg();if(i)return i;let r=await function(e,t,i){return new Promise(r=>{let n=e.activeElement??document.activeElement,o=e.host;i&&o.parentNode&&o.parentNode.appendChild(o);let a=document.createElement("div");a.className="sp-identity-backdrop";let l=document.createElement("div");l.className="sp-identity-modal";let d=`sp-identity-title-${Date.now()}`;l.setAttribute("role","dialog"),l.setAttribute("aria-modal","true"),l.setAttribute("aria-labelledby",d);let c=document.createElement("div");c.className="sp-identity-title",c.id=d,c.textContent=t("identity.title"),c.style.marginBottom="20px";let p=`sp-identity-name-${Date.now()}`,h=`sp-identity-email-${Date.now()}`,u=document.createElement("label");u.className="sp-input-label",u.textContent=t("identity.nameLabel"),u.setAttribute("for",p);let f=document.createElement("input");f.className="sp-input",f.id=p,f.type="text",f.maxLength=k,f.placeholder=t("identity.namePlaceholder"),f.style.marginBottom="14px";let g=document.createElement("label");g.className="sp-input-label",g.textContent=t("identity.emailLabel"),g.setAttribute("for",h);let m=document.createElement("input");m.className="sp-input",m.id=h,m.type="email",m.maxLength=k,m.placeholder=t("identity.emailPlaceholder");let b=document.createElement("div");b.className="sp-identity-actions";let x=lt(e=>l.style.setProperty("--sp-kb",`${e}px`)),y=e=>{S(),E(),x(),a.classList.remove("sp-identity--open"),setTimeout(()=>{a.remove(),n?.focus(),r(e)},200)},v=document.createElement("button");v.className="sp-btn-ghost",v.textContent=t("identity.cancel"),v.addEventListener("click",()=>y(null));let w=document.createElement("button");w.className="sp-btn-primary",w.textContent=t("identity.submit");let C=(e,t)=>{e.style.borderColor=t?"var(--sp-type-bug, #ef4444)":"",t?e.setAttribute("aria-invalid","true"):e.removeAttribute("aria-invalid")};w.addEventListener("click",()=>{let e=f.value.trim(),t=m.value.trim();if(!e||!t)return;let i=e.length>k,r=t.length>k||!s(t);C(f,i),C(m,r),!i&&!r&&y({name:e,email:t})});let S=oe(a,t=>{if("Escape"===t.key)return t.stopPropagation(),void y(null);if("Tab"===t.key){let i=Array.from(l.querySelectorAll('input, button, [tabindex]:not([tabindex="-1"])'));if(0===i.length)return;let r=i[0],n=i[i.length-1];if(!r||!n)return;let s=e.activeElement;t.shiftKey?(s===r||!l.contains(s))&&(t.preventDefault(),n.focus()):(s===n||!l.contains(s))&&(t.preventDefault(),r.focus())}}),E=se(a,()=>!0);a.addEventListener("click",e=>{e.target===a&&y(null)}),b.appendChild(v),b.appendChild(w),l.appendChild(c),l.appendChild(u),l.appendChild(f),l.appendChild(g),l.appendChild(m),l.appendChild(b),a.appendChild(l),e.appendChild(a),a.offsetHeight,a.classList.add("sp-identity--open"),f.focus()})}(M,d,e);return r&&function(e){try{localStorage.setItem(Vg,JSON.stringify(e))}catch{}}(r),r}async function j(){return W?null:$||(F||(F=Promise.resolve().then(()=>(hf(),lf)).then(e=>W?null:($=new e.Panel(M,g,m,y,t.projectName,D,d,o,{getScope:p,scopeAnnotationsByUrl:c,panelActions:t.panelActions,ownFeedback:v,resolveIdentity:V,readOnly:t.readOnly}),$))),F)}if(typeof window<"u"){let e=()=>{W||j()},t=window.requestIdleCallback;"function"==typeof t?t(e):setTimeout(e,200)}let U=!1,q=m.on("panel:toggle",e=>{$||(e?(U=!0,j().then(e=>{e&&U&&e.open(),U=!1}).catch(e=>i("Failed to lazy-load panel:",e))):U=!1)}),G=new cg(g,m,d,t.enableScreenshot??!1,()=>T.getLastPageFocus()),Y=null;t.enableRightClickComment&&(Y=e=>{if(e.defaultPrevented)return;let t=e.pointerType;""===t||void 0===t&&2!==e.button||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||e.composedPath().some(e=>e===C||e instanceof Element&&(e.hasAttribute("data-siteping-ignore")||"siteping-markers"===e.id))||G.isBusy||(e.preventDefault(),G.startInstantAnnotation(e.clientX,e.clientY).catch(e=>i("right-click annotation failed",e)))},document.addEventListener("contextmenu",Y)),"en"!==o&&a.then(()=>{W||(O.refreshLabels(),G.refreshLabels())});let K=!1,X=m.on("annotation:complete",async e=>{if(K)m.emit("submission:cancelled");else{K=!0;try{let{annotation:i,type:r,message:n,clientId:s,screenshotDataUrl:o,screenshotRegion:a}=e,l=await V(!0);if(!l)return void m.emit("submission:cancelled");let h=p(),g=null;(u||f)&&(g={console:u?.getEntries()??[],network:f?.getEntries()??[]});let b={projectName:t.projectName,type:r,message:n,url:h.url,urlPattern:h.urlPattern,viewport:`${window.innerWidth}x${window.innerHeight}`,userAgent:navigator.userAgent,authorName:l.name,authorEmail:l.email,annotations:[i],clientId:s,screenshotDataUrl:o??null,screenshotRegion:a??null,diagnostics:g};try{let e=await y.sendFeedback(b);m.emit("feedback:sent",e),(!c||e.url===h.url)&&D.addFeedback(e,D.count+1),I(d("feedback.sent.confirmation"),!1),$&&await $.refresh()}catch(e){let t=function(e){return"object"==typeof e&&null!==e?kg.get(e):void 0}(e);t&&m.emit("feedback:queued"),m.emit("feedback:error",e instanceof Error?e:new Error(String(e))),I(d(t?"feedback.queued":"feedback.error.message"),!t)}}finally{K=!1}}}),J=p(),Q=c?{limit:20,url:J.url}:{limit:20},Z=function(e){return void 0===e||!1===e?{enabled:!1,param:"siteping"}:!0===e?{enabled:!0,param:"siteping"}:{enabled:!0,param:e.param??"siteping"}}(t.deepLink),ee=++H;Promise.all([y.getFeedbacks(t.projectName,Q),a]).then(([{feedbacks:e}])=>{if(W||H!==ee)return;let t=c?e.filter(e=>e.url===J.url):e;if(D.render(t),Z.enabled)try{let e=new URLSearchParams(window.location.search).get(Z.param);if(e){let t=D.focusFeedback(e);i(`deepLink ?${Z.param}=${e} ${t?"focused":"did not match a visible feedback"}`),t&&j().then(async t=>{!t||W||(await t.open(),t.showFeedback(e))}).catch(e=>i("deepLink could not open the feedback:",e))}}catch(e){i("deepLink parsing failed:",e)}}).catch(e=>{i("Failed to load initial markers:",e)}),t.endpoint&&async function(e,t,i={}){await yg(async()=>{try{let r=wg();if(0===r.length)return;let n=[],s=[],o=0;for(let i of r)i.endpoint===e?!t||Mg(i.payload.authorName)===Mg(t.name)&&Ag(i.payload.authorEmail)===Ag(t.email)?n.push(i):o+=1:s.push(i);if(0===n.length&&0===o)return;let a=[],d=0;if(n.length>0){let t=await gg(i,!0);for(let i of n){let r=new AbortController,n=setTimeout(()=>r.abort(),hg);try{let n=await fetch(e,{method:"POST",headers:t,body:JSON.stringify(i.payload),signal:r.signal});if(n.ok){let t=await n.json().catch(()=>null);l(t,"id")&&"string"==typeof t.id&&pg(i.payload.projectName,e).add(t.id);continue}xg(n.status)?a.push(i):d+=1}catch{a.push(i)}finally{clearTimeout(n)}}}d>0&&console.warn(`[siteping] flushRetryQueue: dropped ${d} queued feedback(s) the server rejected (4xx) \u2014 they would fail identically on every replay`);let c=s.concat(a);c.length>0?localStorage.setItem(ug,JSON.stringify(c)):localStorage.removeItem(ug)}catch{}})}(t.endpoint,t.identity??jg(),{apiKey:t.apiKey,headers:t.headers}).then(()=>i("Retry queue flushed")).catch(()=>{});let te=()=>{let e=++H;if($?.isCurrentlyOpen)return $.refresh();let i=p(),r=c?{limit:20,url:i.url}:{limit:20};return y.getFeedbacks(t.projectName,r).then(({feedbacks:t})=>{if(W||e!==H||$?.isCurrentlyOpen)return;let r=c?t.filter(e=>e.url===i.url):t;D.render(r)})},ie="auto"===t.theme?function(e){if(typeof window>"u"||"function"!=typeof window.matchMedia)return()=>{};let t=window.matchMedia(et);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}(()=>{Object.assign(g,Ue(t.accentColor,"auto")),S(),N.restyle(),G.restyle(),te().catch(()=>{})}):void 0,ne=null;if(!1!==t.watchNavigation&&typeof window<"u"&&typeof history<"u"){let e=e=>`${e.url}\n${e.urlPattern??""}`,t=e(J),r=()=>{if(W)return;let r=e(p());if(r===t)return;let n=t;t=r,i("SPA navigation detected \u2014 refreshing feedbacks for new scope"),te().catch(()=>{t===r&&(t=n)})},n=history.pushState,s=history.replaceState,o=function(...e){n.apply(this,e),r()},a=function(...e){s.apply(this,e),r()};history.pushState=o,history.replaceState=a,window.addEventListener("popstate",r),window.addEventListener("hashchange",r),ne=()=>{window.removeEventListener("popstate",r),window.removeEventListener("hashchange",r),history.pushState===o&&(history.pushState=n),history.replaceState===a&&(history.replaceState=s)}}let de=0,ce=()=>{let e=new _g,t=!0;return de++,b.add(e),{destroy:()=>{t&&(t=!1,b.delete(e),0===--de&&(i("Destroying widget"),Y&&document.removeEventListener("contextmenu",Y),W=!0,U=!1,ne?.(),ie?.(),T.destroy(),X(),q(),O.destroy(),$?.destroy(),G.destroy(),D.destroy(),N.destroy(),u?.dispose(),f?.dispose(),m.removeAll(),clearTimeout(B),L.remove(),C.remove(),A(),Im=null))},open:()=>{t&&m.emit("panel:toggle",!0)},close:()=>{t&&($?$.close():U=!1)},refresh:()=>t?te().catch(()=>{}):Promise.resolve(),focusFeedback:e=>t&&(e=>D.focusFeedback(e))(e),on:(t,i)=>e.on(t,i),off:(t,i)=>{e.off(t,i)}}};return Im=ce,ce()}return $(),fu(),
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
html2canvas-pro/dist/html2canvas-pro.esm.js:
|
|
@@ -8,5 +8,5 @@ html2canvas-pro/dist/html2canvas-pro.esm.js:
|
|
|
8
8
|
* Released under MIT License
|
|
9
9
|
*)
|
|
10
10
|
*/
|
|
11
|
-
e.initSiteping=function(e){return
|
|
11
|
+
e.initSiteping=function(e){return Om(e)},e.isSitepingError=function(e){return l(e,"code")&&l(e,"retryable")&&"boolean"==typeof e.retryable&&"string"==typeof e.code&&u.includes(e.code)},e}({});
|
|
12
12
|
//# sourceMappingURL=index.global.js.map
|