@zumer/snapdom 3.1.1 → 3.1.2-dev.0

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/dist/snapdom.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  /*
2
2
  * SnapDOM
3
- * v3.1.1
3
+ * v3.1.2-dev.0
4
4
  * License: MIT
5
5
  */
6
- var ja=Object.defineProperty;var ct=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var je=(t,e)=>{for(var n in e)ja(t,n,{get:e[n],enumerable:!0})};function qo(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function Go(t="soft"){t==="disabled"&&(N.computedStyle=new WeakMap,N.measureHints=new WeakMap,N.baseStyle=new ot(50),N.defaultStyle=new ot(64),N.image=new ot(100),N.background=new ot(100),N.resource=new ot(150),N.compress=new ot(50))}var ot,N,dt=ct(()=>{"use strict";ot=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let r=this.keys().next().value;r!==void 0&&this.delete(r)}return super.set(e,n)}},N={image:new ot(100),background:new ot(100),resource:new ot(150),defaultStyle:new ot(64),baseStyle:new ot(50),compress:new ot(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function te(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function qa(t){let e=[],n=0,r=0,i="";for(let o=0;o<t.length;o++){let s=t[o];if(s==="\\"){o++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?r++:s===")"?r--:s===","&&r===0&&(e.push(t.slice(n,o)),n=o+1)}return e.push(t.slice(n)),e}function Ve(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of qa(n[1])){let s=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!Va.test(a[1].trim()))continue;let c=o.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),f=1;if(c){let l=parseFloat(c[1]);f=/dpi/i.test(c[2])?l/96:l}r.push({url:s[2].trim(),dppx:f})}return r.length?(r.sort((o,s)=>o.dppx-s.dppx),(r.find(o=>o.dppx>=e)||r[r.length-1]).url):null}function yr(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==6?`matrix(${r})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==16?`matrix3d(${r})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function zt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function br(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function qe(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function wr(t){return"\u2022".repeat(String(t??"").length)}function rt(t,e){return t?.nodeType===1&&t.localName===e}function kt(t){return t?.nodeType===1&&t.namespaceURI===Ga}function Nt(t){return t?.nodeType===1&&t.namespaceURI===Xa}function Lt(t){return t?.nodeType===11&&!!t.host}function Sr(t){return t?.nodeType===9}var gr,Va,Ga,Xa,bt=ct(()=>{"use strict";gr=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,Va=gr;Ga="http://www.w3.org/1999/xhtml",Xa="http://www.w3.org/2000/svg"});function Ya(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,i=0;function o(s,a,c){if(i>=n)return;let f=Date.now();(r.get(a)||0)>f||(r.set(a,f+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${c}`):console&&console.error&&console.error(`${t} ${c}`))}return{warnOnce(s,a){o("warn",s,a)},errorOnce(s,a){o("error",s,a)},reset(){r.clear(),i=0}}}function Ko(t,e,n){if(It.size>=Yo){let r=Date.now();for(let[i,o]of It)o.until<=r&&It.delete(i);for(;It.size>=Yo;)It.delete(It.keys().next().value)}It.set(t,{until:Date.now()+n,result:e})}function Ka(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Qa(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(r||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Ja(t,e){if(!e||Ka(t)||Qa(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!e}}function Za(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>zt(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${zt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Qo(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function tc(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function Jo(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function vr(t,e){try{t.onError?.(e)}catch{}}async function it(t,e={}){let n=e.as??"blob",r=e.timeout??3e3,i=e.useProxy||"",o=e.errorTTL??8e3,s=e.headers||{},a=!!e.silent;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],S=/;base64/i.test(g)?atob(y):decodeURIComponent(y),k=new Uint8Array([...S].map(w=>w.charCodeAt(0))),v=new Blob([k],{type:(g||"").split(";")[0]||""});return{ok:!0,data:v,status:200,url:t,fromCache:!1,mime:v.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Qo(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let c;try{c=tc(t,{as:n,timeout:r,useProxy:i,errorTTL:o,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return vr(e,g),g}let f=It.get(c);if(f&&f.until>Date.now())return{...f.result,fromCache:!0};f&&It.delete(c);let l=xr.get(c);if(l)return l;let u=Ja(t,i)?Za(t,i):t,p=e.credentials;if(!p)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),r),d=(async()=>{try{let g=await fetch(u,{signal:h.signal,credentials:p,headers:s});if(!g.ok){let S={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(c!==null&&o>0&&Ko(c,S,o),!a){let k=`${g.status} ${g.statusText||""}`.trim();Xo.warnOnce(`http:${g.status}:${n}:${Jo(t)}`,`HTTP error ${k} while fetching ${n} ${t}`)}return vr(e,S),S}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Qo(y),blob:y,status:g.status,url:u,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:u,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:y};if(c!==null&&!/^blob:/i.test(t)&&o>0&&Ko(c,b,o),!a){let S=`${y}:${n}:${Jo(t)}`,k=y==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${t}`:y==="abort"?`Request aborted while fetching ${n} ${t}`:`Network/CORS issue while fetching ${n} ${t}. A proxy may be required`;Xo.errorOnce(S,k)}return vr(e,b),b}finally{clearTimeout(m),xr.delete(c)}})();return c!==null&&xr.set(c,d),d}var Xo,xr,Yo,It,de=ct(()=>{"use strict";bt();Xo=Ya("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),xr=new Map,Yo=50,It=new Map});async function pe(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let r=Ve(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??te(t);if(!r)return t;let i=br(r),o=zt(i),s=(e.useProxy||"")+"|"+o;if(N.background.has(s)){let a=N.background.get(s);return a?`url("${a}")`:"none"}try{let a=await it(o,{as:"dataURL",useProxy:e.useProxy});return a.ok?(N.background.set(s,a.data),`url("${a.data}")`):(N.background.set(s,null),"none")}catch{return N.background.set(s,null),"none"}}var Zo=ct(()=>{"use strict";dt();bt();de()});function sc(t){let e=t.replace(ic,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function ni(t,e,n,r){for(let i=0;i<t.length;i++){if(--r.budget<0)return!1;let o=t[i],s=o.style;if(s){let c=!!o.selectorText&&rc.test(o.selectorText);for(let f=0;f<s.length;f++){let l=s[f];if(e.add(l),c&&r.pseudoProps.add(l),s.getPropertyPriority(l)&&r.importantProps.add(l),l.length>5&&(l[0]==="m"||l[0]==="p")){let u=l.startsWith("margin")?"marginUnstable":l.startsWith("padding")?"paddingUnstable":null;u&&!r[u]&&oc.test(s.getPropertyValue(l))&&(r[u]=!0)}}}let a=o.selectorText;if(a&&a.includes(":has(")&&(r.usesHas=!0),a&&a.includes("&"))for(let c=o.parentRule;c&&a.includes("&");c=c.parentRule)c.selectorText&&(a=a.replace(/&/g,`:is(${c.selectorText})`));if(a&&(r.inContainer||ei.test(a)||a.includes("+")||a.includes("~")))for(let c of Ar(a,",")){let f=c.trim();f&&(r.inContainer||ei.test(f)||f.includes("+")||f.includes("~"))&&r.shareUnsafeSels.add(f)}if(a&&a.includes(":"))for(let c in ti)ti[c].test(a)&&n[c].push(sc(a));if(o.styleSheet){if(!gn(o.styleSheet,e,n,r))return!1}else if(o.cssRules&&o.cssRules.length){let c=o.constructor?.name==="CSSContainerRule";c&&r.inContainer++;let f=ni(o.cssRules,e,n,r);if(c&&r.inContainer--,!f)return!1}}return!0}function gn(t,e,n,r){let i;try{i=t.cssRules}catch{return!1}return i?ni(i,e,n,r):!1}function Cr(t,e){for(let n of t){let r=n.effect?.getKeyframes?.()||[];for(let i of r)for(let o of Object.keys(i))o==="offset"||o==="easing"||o==="composite"||o==="computedOffset"||e.add(o.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function ri(t){let e=new Set;return gn(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Ar(t,e){if(!t.includes(e))return[t];let n=[],r=0,i=null,o=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:r===0&&a===e&&(n.push(t.slice(o,s)),o=s+1)}return n.push(t.slice(o)),n}function ac(t){let e=0,n=null,r=0;for(let l=0;l<t.length;l++){let u=t[l];if(n){u===n&&t[l-1]!=="\\"&&(n=null);continue}u==='"'||u==="'"?n=u:u==="("||u==="["?e++:u===")"||u==="]"?e--:e===0&&(u===" "||u===">"||u==="+"||u==="~")&&(r=l+1)}let i="",o=0;for(let l of t.slice(r))l==="("||l==="["?o++:l===")"||l==="]"?o--:o===0&&(i+=l);let s=l=>!l||/\\[0-9a-fA-F]/.test(l)?null:l.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let c=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(c)return"i"+c;let f=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function oi(t,e){if(!e.length)return"";if(e.some(r=>r.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function cc(t,e){let n=t.createElement("div"),r={};for(let i in e){let o=e[i];(i==="before"||i==="after")&&o.push("q"),r[i]=oi(n,o)}return r}function ii(t){let e={universe:null,pseudoUniverse:null,usesHas:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let n=new Set(kr),r={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},i={budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set};for(let f of t.styleSheets)if(!gn(f,n,r,i))return e;let o=t.adoptedStyleSheets;if(Array.isArray(o)){for(let f of o)if(!gn(f,n,r,i))return e}typeof t.getAnimations=="function"&&Cr(t.getAnimations(),n);let s=Array.from(i.shareUnsafeSels),a=oi(t.createElement("div"),s)===null?null:s.map(f=>({sel:f,key:ac(f)})),c=new Set(nc);for(let f of ec)n.has(f)&&c.add(f);for(let f of i.pseudoProps)c.add(f);return{universe:n,pseudoUniverse:c,pseudoGates:cc(t,r),usesHas:i.usesHas,shareGate:a,marginUnstable:i.marginUnstable,paddingUnstable:i.paddingUnstable,importantProps:i.importantProps}}catch{return e}}var kr,ec,nc,rc,oc,ti,ic,ei,yn=ct(()=>{"use strict";kr=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","vertical-align","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],ec=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],nc=["display","width","height","min-width","min-height"],rc=/::?(?:before|after|first-letter|first-line|marker)/,oc=/%|\bauto\b|calc\(|var\(/i,ti={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},ic=/::?(?:before|after|first-letter|first-line|marker)\b/g;ei=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function J(t){return si.add(t),t.setAttribute("data-snapdom-internal",""),t}function jt(t){return si.has(t)}var si,wt=ct(()=>{"use strict";si=new WeakSet});function _r(t){if(t=String(t).toLowerCase(),Ge.has(t)){let o={};return N.defaultStyle.set(t,o),o}if(N.defaultStyle.has(t))return N.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(jt);e||(e=document.createElement("div"),J(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),i={};for(let o of r){if(he(o))continue;let s=r.getPropertyValue(o);i[o]=s}for(let o of kr)!(o in i)&&!he(o)&&(i[o]=r.getPropertyValue(o));return e.removeChild(n),N.defaultStyle.set(t,i),i}function he(t){let e=ai.get(t);if(e===void 0){let n=String(t).toLowerCase();e=uc.has(n)||fc.test(n)||lc.test(n),ai.set(t,e)}return e}function li(t,e){let n=gc.get(t);if(n===void 0||e[n]!==e[t])return!1;let r=e["writing-mode"];if(r&&r!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function bn(t,e){return!pc.has(t)&&(e==="inline"||dc.has(t)||ci.has(t))}function Er(t,e,n){let r=(e.display||"").toLowerCase();if(r==="inline"||ci.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let o=(e.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!bc.has(r)}function me(t,e,n=!0,r=!1){if(e=String(e||"").toLowerCase(),Ge.has(e))return"";let i=[],o=_r(e),s=(t.display||"").toLowerCase(),a=s==="inline",c=bn(e,s),f=t["text-wrap-mode"]||t["white-space"]||"",l=f==="nowrap"||f==="pre",p=c&&n&&!(c&&n&&!a&&l),h=!1;for(let m in t){if(he(m)||li(m,t))continue;let d=t[m];if(p){if(hc.has(m))continue;if(mc.has(m)){d&&d!==o[m]&&(i.push(`${m}:${d}`),d!=="auto"&&(h=!0));continue}}if(d&&d!==o[m]){if(!l&&(m==="width"||m==="inline-size")&&d.endsWith("px")&&d.includes(".")){let g=parseFloat(d);if(Number.isFinite(g)){i.push(`${m}:${(g+yc).toFixed(3)}px`);continue}}i.push(`${m}:${d}`)}}if(p&&!a&&!r&&!h){let m=t.width;m&&m!=="auto"&&m!==o.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function Rr(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function Fr(t,e=null){let n=new Map;for(let s of t){let a=_r(s);if(!a)continue;let l=(e?Object.entries(a).filter(([p])=>e.has(p)):Object.entries(a)).filter(([p])=>!li(p,a)).map(([p,h])=>`${p}:${h};`).sort(),u=l.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:l}),n.get(u).tagList.push(s))}let r=[...n.values()],i=null;for(let{declarations:s}of r){let a=new Set(s);if(!i){i=a;continue}for(let c of i)a.has(c)||i.delete(c)}i??=new Set;let o="";if(i.size&&r.length>1){let s=r.flatMap(a=>a.tagList);o+=`${s.join(",")} { ${[...i].join("")} }
6
+ var Ka=Object.defineProperty;var ct=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var je=(t,e)=>{for(var n in e)Ka(t,n,{get:e[n],enumerable:!0})};function Go(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function Xo(t="soft"){t==="disabled"&&(N.computedStyle=new WeakMap,N.measureHints=new WeakMap,N.baseStyle=new ot(50),N.defaultStyle=new ot(64),N.image=new ot(100),N.background=new ot(100),N.resource=new ot(150),N.compress=new ot(50))}var ot,N,dt=ct(()=>{"use strict";ot=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let r=this.keys().next().value;r!==void 0&&this.delete(r)}return super.set(e,n)}},N={image:new ot(100),background:new ot(100),resource:new ot(150),defaultStyle:new ot(64),baseStyle:new ot(50),compress:new ot(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function te(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Ja(t){let e=[],n=0,r=0,i="";for(let o=0;o<t.length;o++){let s=t[o];if(s==="\\"){o++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?r++:s===")"?r--:s===","&&r===0&&(e.push(t.slice(n,o)),n=o+1)}return e.push(t.slice(n)),e}function Ve(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of Ja(n[1])){let s=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!Qa.test(a[1].trim()))continue;let c=o.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),f=1;if(c){let l=parseFloat(c[1]);f=/dpi/i.test(c[2])?l/96:l}r.push({url:s[2].trim(),dppx:f})}return r.length?(r.sort((o,s)=>o.dppx-s.dppx),(r.find(o=>o.dppx>=e)||r[r.length-1]).url):null}function yr(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==6?`matrix(${r})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==16?`matrix3d(${r})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Ht(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function br(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function qe(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function wr(t){return"\u2022".repeat(String(t??"").length)}function rt(t,e){return t?.nodeType===1&&t.localName===e}function At(t){return t?.nodeType===1&&t.namespaceURI===Za}function Lt(t){return t?.nodeType===1&&t.namespaceURI===tc}function It(t){return t?.nodeType===11&&!!t.host}function Sr(t){return t?.nodeType===9}var gr,Qa,Za,tc,St=ct(()=>{"use strict";gr=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,Qa=gr;Za="http://www.w3.org/1999/xhtml",tc="http://www.w3.org/2000/svg"});function ec(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,i=0;function o(s,a,c){if(i>=n)return;let f=Date.now();(r.get(a)||0)>f||(r.set(a,f+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${c}`):console&&console.error&&console.error(`${t} ${c}`))}return{warnOnce(s,a){o("warn",s,a)},errorOnce(s,a){o("error",s,a)},reset(){r.clear(),i=0}}}function Qo(t,e,n){if(Wt.size>=Ko){let r=Date.now();for(let[i,o]of Wt)o.until<=r&&Wt.delete(i);for(;Wt.size>=Ko;)Wt.delete(Wt.keys().next().value)}Wt.set(t,{until:Date.now()+n,result:e})}function nc(t){return/^data:|^blob:|^about:blank$/i.test(t)}function rc(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(r||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function oc(t,e){if(!e||nc(t)||rc(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!e}}function ic(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>Ht(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${Ht(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Jo(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function sc(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function Zo(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function vr(t,e){try{t.onError?.(e)}catch{}}async function it(t,e={}){let n=e.as??"blob",r=e.timeout??3e3,i=e.useProxy||"",o=e.errorTTL??8e3,s=e.headers||{},a=!!e.silent;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],S=/;base64/i.test(g)?atob(y):decodeURIComponent(y),k=new Uint8Array([...S].map(w=>w.charCodeAt(0))),v=new Blob([k],{type:(g||"").split(";")[0]||""});return{ok:!0,data:v,status:200,url:t,fromCache:!1,mime:v.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Jo(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let c;try{c=sc(t,{as:n,timeout:r,useProxy:i,errorTTL:o,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return vr(e,g),g}let f=Wt.get(c);if(f&&f.until>Date.now())return{...f.result,fromCache:!0};f&&Wt.delete(c);let l=xr.get(c);if(l)return l;let u=oc(t,i)?ic(t,i):t,p=e.credentials;if(!p)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),r),d=(async()=>{try{let g=await fetch(u,{signal:h.signal,credentials:p,headers:s});if(!g.ok){let S={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(c!==null&&o>0&&Qo(c,S,o),!a){let k=`${g.status} ${g.statusText||""}`.trim();Yo.warnOnce(`http:${g.status}:${n}:${Zo(t)}`,`HTTP error ${k} while fetching ${n} ${t}`)}return vr(e,S),S}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Jo(y),blob:y,status:g.status,url:u,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:u,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:y};if(c!==null&&!/^blob:/i.test(t)&&o>0&&Qo(c,b,o),!a){let S=`${y}:${n}:${Zo(t)}`,k=y==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${t}`:y==="abort"?`Request aborted while fetching ${n} ${t}`:`Network/CORS issue while fetching ${n} ${t}. A proxy may be required`;Yo.errorOnce(S,k)}return vr(e,b),b}finally{clearTimeout(m),xr.delete(c)}})();return c!==null&&xr.set(c,d),d}var Yo,xr,Ko,Wt,he=ct(()=>{"use strict";St();Yo=ec("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),xr=new Map,Ko=50,Wt=new Map});async function me(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let r=Ve(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??te(t);if(!r)return t;let i=br(r),o=Ht(i),s=(e.useProxy||"")+"|"+o;if(N.background.has(s)){let a=N.background.get(s);return a?`url("${a}")`:"none"}try{let a=await it(o,{as:"dataURL",useProxy:e.useProxy});return a.ok?(N.background.set(s,a.data),`url("${a.data}")`):(N.background.set(s,null),"none")}catch{return N.background.set(s,null),"none"}}var ti=ct(()=>{"use strict";dt();St();he()});function dc(t){let e=t.replace(uc,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function ri(t,e,n,r){for(let i=0;i<t.length;i++){if(--r.budget<0)return!1;let o=t[i],s=o.style;if(s){let c=!!o.selectorText&&lc.test(o.selectorText);for(let f=0;f<s.length;f++){let l=s[f];if(e.add(l),c&&r.pseudoProps.add(l),s.getPropertyPriority(l)&&r.importantProps.add(l),l.length>5&&(l[0]==="m"||l[0]==="p")){let u=l.startsWith("margin")?"marginUnstable":l.startsWith("padding")?"paddingUnstable":null;u&&!r[u]&&fc.test(s.getPropertyValue(l))&&(r[u]=!0)}}}let a=o.selectorText;if(a&&a.includes(":has(")&&(r.usesHas=!0),a&&a.includes("&"))for(let c=o.parentRule;c&&a.includes("&");c=c.parentRule)c.selectorText&&(a=a.replace(/&/g,`:is(${c.selectorText})`));if(a&&(r.inContainer||ni.test(a)||a.includes("+")||a.includes("~")))for(let c of Ar(a,",")){let f=c.trim();f&&(r.inContainer||ni.test(f)||f.includes("+")||f.includes("~"))&&r.shareUnsafeSels.add(f)}if(a&&a.includes(":"))for(let c in ei)ei[c].test(a)&&n[c].push(dc(a));if(o.styleSheet){if(!yn(o.styleSheet,e,n,r))return!1}else if(o.cssRules&&o.cssRules.length){let c=o.constructor?.name==="CSSContainerRule";c&&r.inContainer++;let f=ri(o.cssRules,e,n,r);if(c&&r.inContainer--,!f)return!1}}return!0}function yn(t,e,n,r){let i;try{i=t.cssRules}catch{return!1}return i?ri(i,e,n,r):!1}function Cr(t,e){for(let n of t){let r=n.effect?.getKeyframes?.()||[];for(let i of r)for(let o of Object.keys(i))o==="offset"||o==="easing"||o==="composite"||o==="computedOffset"||e.add(o.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function oi(t){let e=new Set;return yn(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Ar(t,e){if(!t.includes(e))return[t];let n=[],r=0,i=null,o=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:r===0&&a===e&&(n.push(t.slice(o,s)),o=s+1)}return n.push(t.slice(o)),n}function pc(t){let e=0,n=null,r=0;for(let l=0;l<t.length;l++){let u=t[l];if(n){u===n&&t[l-1]!=="\\"&&(n=null);continue}u==='"'||u==="'"?n=u:u==="("||u==="["?e++:u===")"||u==="]"?e--:e===0&&(u===" "||u===">"||u==="+"||u==="~")&&(r=l+1)}let i="",o=0;for(let l of t.slice(r))l==="("||l==="["?o++:l===")"||l==="]"?o--:o===0&&(i+=l);let s=l=>!l||/\\[0-9a-fA-F]/.test(l)?null:l.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let c=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(c)return"i"+c;let f=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function ii(t,e){if(!e.length)return"";if(e.some(r=>r.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function hc(t,e){let n=t.createElement("div"),r={};for(let i in e){let o=e[i];(i==="before"||i==="after")&&o.push("q"),r[i]=ii(n,o)}return r}function si(t){let e={universe:null,pseudoUniverse:null,usesHas:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let n=new Set(kr),r={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},i={budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set};for(let f of t.styleSheets)if(!yn(f,n,r,i))return e;let o=t.adoptedStyleSheets;if(Array.isArray(o)){for(let f of o)if(!yn(f,n,r,i))return e}typeof t.getAnimations=="function"&&Cr(t.getAnimations(),n);let s=Array.from(i.shareUnsafeSels),a=ii(t.createElement("div"),s)===null?null:s.map(f=>({sel:f,key:pc(f)})),c=new Set(cc);for(let f of ac)n.has(f)&&c.add(f);for(let f of i.pseudoProps)c.add(f);return{universe:n,pseudoUniverse:c,pseudoGates:hc(t,r),usesHas:i.usesHas,shareGate:a,marginUnstable:i.marginUnstable,paddingUnstable:i.paddingUnstable,importantProps:i.importantProps}}catch{return e}}var kr,ac,cc,lc,fc,ei,uc,ni,bn=ct(()=>{"use strict";kr=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","vertical-align","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],ac=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],cc=["display","width","height","min-width","min-height"],lc=/::?(?:before|after|first-letter|first-line|marker)/,fc=/%|\bauto\b|calc\(|var\(/i,ei={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},uc=/::?(?:before|after|first-letter|first-line|marker)\b/g;ni=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function J(t){return ai.add(t),t.setAttribute("data-snapdom-internal",""),t}function jt(t){return ai.has(t)}var ai,xt=ct(()=>{"use strict";ai=new WeakSet});function _r(t){if(t=String(t).toLowerCase(),Ge.has(t)){let o={};return N.defaultStyle.set(t,o),o}if(N.defaultStyle.has(t))return N.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(jt);e||(e=document.createElement("div"),J(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),i={};for(let o of r){if(ge(o))continue;let s=r.getPropertyValue(o);i[o]=s}for(let o of kr)!(o in i)&&!ge(o)&&(i[o]=r.getPropertyValue(o));return e.removeChild(n),N.defaultStyle.set(t,i),i}function ge(t){let e=ci.get(t);if(e===void 0){let n=String(t).toLowerCase();e=yc.has(n)||gc.test(n)||mc.test(n),ci.set(t,e)}return e}function fi(t,e){let n=vc.get(t);if(n===void 0||e[n]!==e[t])return!1;let r=e["writing-mode"];if(r&&r!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function wn(t,e){return!wc.has(t)&&(e==="inline"||bc.has(t)||li.has(t))}function Er(t,e,n){let r=(e.display||"").toLowerCase();if(r==="inline"||li.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let o=(e.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Cc.has(r)}function ye(t,e,n=!0,r=!1){if(e=String(e||"").toLowerCase(),Ge.has(e))return"";let i=[],o=_r(e),s=(t.display||"").toLowerCase(),a=s==="inline",c=wn(e,s),f=t["text-wrap-mode"]||t["white-space"]||"",l=f==="nowrap"||f==="pre",p=c&&n&&!(c&&n&&!a&&l),h=!1;for(let m in t){if(ge(m)||fi(m,t))continue;let d=t[m];if(p){if(Sc.has(m))continue;if(xc.has(m)){d&&d!==o[m]&&(i.push(`${m}:${d}`),d!=="auto"&&(h=!0));continue}}if(d&&d!==o[m]){if(!l&&(m==="width"||m==="inline-size")&&d.endsWith("px")&&d.includes(".")){let g=parseFloat(d);if(Number.isFinite(g)){i.push(`${m}:${(g+kc).toFixed(3)}px`);continue}}i.push(`${m}:${d}`)}}if(p&&!a&&!r&&!h){let m=t.width;m&&m!=="auto"&&m!==o.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function Rr(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function Fr(t,e=null){let n=new Map;for(let s of t){let a=_r(s);if(!a)continue;let l=(e?Object.entries(a).filter(([p])=>e.has(p)):Object.entries(a)).filter(([p])=>!fi(p,a)).map(([p,h])=>`${p}:${h};`).sort(),u=l.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:l}),n.get(u).tagList.push(s))}let r=[...n.values()],i=null;for(let{declarations:s}of r){let a=new Set(s);if(!i){i=a;continue}for(let c of i)a.has(c)||i.delete(c)}i??=new Set;let o="";if(i.size&&r.length>1){let s=r.flatMap(a=>a.tagList);o+=`${s.join(",")} { ${[...i].join("")} }
7
7
  `}for(let{tagList:s,declarations:a}of r){let c=r.length>1?a.filter(l=>!i.has(l)):a;if(!c.length)continue;let f=c.join("");o+=`${s.join(",")} { ${f} }
8
- `}return o}function Xe(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let i of e)n.set(i,`c${r++}`);return n}function wc(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===e)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function W(t,e=null){let n=()=>{let o={length:0,getPropertyValue:()=>"",item:()=>""};return o[Symbol.iterator]=function*(){},o};if(t?.nodeType!==1){let o=typeof window<"u"?window:null;if(o&&typeof o.getComputedStyle=="function")try{return o.getComputedStyle(t,e)||n()}catch{return n()}return n()}let r=N.computedStyle.get(t);r||(r=new Map,N.computedStyle.set(t,r));let i=r.get(e);if(!i){let o=wc(t),s=null;try{s=o&&typeof o.getComputedStyle=="function"?o.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),r.set(e,i)}return i}function ge(t,e=null){let n={};for(let r of e||t){let i=t.getPropertyValue(r);i&&(n[r]=i)}for(let r of Sc){let i=n[`border-${r}-style`],o=n[`border-${r}-width`];(i==="none"||i==="hidden"||o==="0px")&&(delete n[`border-${r}-style`],delete n[`border-${r}-width`],delete n[`border-${r}-color`])}return n}function Vt(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,i).trim()),r=i+1)}return e.push(t.slice(r).trim()),e}var Mr,Ge,lc,fc,uc,ai,dc,ci,pc,hc,mc,gc,yc,bc,Sc,ye=ct(()=>{"use strict";dt();yn();wt();Mr=new Set(["meta","script","noscript","title","link","template"]),Ge=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);lc=/(?:^|-)(animation|transition)(?:-|$)/i,fc=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,uc=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),ai=new Map;dc=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),ci=new Set(["table","thead","tbody","tfoot","tr","td","th"]),pc=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),hc=new Set(["width","max-width","inline-size","max-inline-size"]),mc=new Set(["min-width","min-inline-size"]),gc=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));yc=.001;bc=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Sc=["top","right","bottom","left"]});function pt(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,r=()=>{n||(n=!0,e())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,t)})}function ui(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?xc:fi),n=null,r={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let o=()=>{n=null,r.yielded=!0,e=performance.now()+fi,i()},s=new MessageChannel;s.port1.onmessage=o,s.port2.postMessage(0)}))};return r}function Ye(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function X(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),i=/mobile/i.test(t),o=!/safari/i.test(t),s=r&&i&&o,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&r;return n||s||a||c||f}function Rt(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var fi,xc,St=ct(()=>{"use strict";fi=16,xc=40});function D(t,e,n){let r=t&&typeof t=="object"&&(t.options||t);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",e,n):console.warn("[snapdom]",e))}function xt(t,e,n,r){let i=t&&t.warnings;i&&i.length<vc&&i.push(r===void 0?{code:e,message:n}:{code:e,message:n,detail:r})}var vc,ee=ct(()=>{"use strict";vc=50});var ht=ct(()=>{"use strict";Zo();ye();St();bt();ee()});var Wa={};je(Wa,{decodeSvgFromDataURL:()=>un,encodeSvgToDataURL:()=>dn,fixSafariShadows:()=>ur,toCanvas:()=>fe});function zu(t,e){try{let n=t.match(/<svg\b[^>]*>/i);if(!n)return t;let r=n[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(o)||i<=0||o<=0)return t;let s=Math.min(1,Qt/i,Qt/o,Math.sqrt(Oo/(i*o)));if(s>=1)return t;let a=Math.max(1,Math.floor(i*s)),c=Math.max(1,Math.floor(o*s));return xt(e,"raster-clamp",`capture ${Math.round(i)}x${Math.round(o)}px exceeds decode limits; downscaled to ${a}x${c}px`),console.warn(`[snapDOM] Capture ${Math.round(i)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${Qt}px/side); downscaling to ${a}\xD7${c}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${c}`))}catch{return t}}function ju(t,e){let n=["x","y","width","height"].map(w=>Number(e?.[w]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=t.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],s=String(o||"").trim().split(/[\s,]+/).map(Number);if(s.length!==4||!s.every(Number.isFinite)||s[2]<=0||s[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[a,c,f,l]=s,u=Math.max(a,n[0]),p=Math.max(c,n[1]),h=Math.min(a+f,n[0]+n[2]),m=Math.min(c+l,n[1]+n[3]);if(!(h>u)||!(m>p))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let d=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(d)&&d>0?d/f:1,b=Number.isFinite(g)&&g>0?g/l:1,S=Math.max(1,(h-u)*y),k=Math.max(1,(m-p)*b),v=i.replace(/(\bwidth=")[^"]*/i,`$1${S}`).replace(/(\bheight=")[^"]*/i,`$1${k}`).replace(/(\bviewBox=")[^"]*/i,`$1${u} ${p} ${h-u} ${m-p}`);return t.replace(i,v)}function Lo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function un(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function Vu(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function dn(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function La(t){let e=[],n="",r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function qu(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("&&r++,s===")"&&(r=Math.max(0,r-1)),s===","&&r===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let o of e){if(/\binset\b/i.test(o))continue;let s=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",c="0px",f="0px"]=s;f=`${parseFloat(f)/2}px`;let l=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!l&&l!==",";i.push(`drop-shadow(${a} ${c} ${f}${u?` ${l}`:""})`)}return i.join(" ")}function Ia(t){let e=La(t),n=null,r=null,i=null,o=[];for(let a of e){let c=a.indexOf(":");if(c<0)continue;let f=a.slice(0,c).trim().toLowerCase(),l=a.slice(c+1).trim();f==="box-shadow"?i=l:f==="filter"?n=l:f==="-webkit-filter"?r=l:o.push([f,l])}if(i){let a=qu(i);a&&(n=n?`${n} ${a}`:a,r=r?`${r} ${a}`:a)}let s=[...o];return n&&s.push(["filter",n]),r&&s.push(["-webkit-filter",r]),s.map(([a,c])=>`${a}:${c}`).join(";")}function Gu(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${Ia(r)}}`)}function Xu(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,Gu(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${Ia(r)}${n}`),t}function Yu(){return cr||(cr=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(e,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),cr)}function Ku(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("?n++:o===")"?n=Math.max(0,n-1):o===","&&n===0&&(e.push(t.slice(r,i)),r=i+1)}return e.push(t.slice(r)),e.map(i=>{let o=0,s=0,a="",c=0;for(;c<i.length;){let f=i[c];if(f==="("?o++:f===")"&&(o=Math.max(0,o-1)),o===0&&(c===0||i[c-1]===" ")){let l=/^-?\d*\.?\d+px/.exec(i.slice(c));if(l){s++,a+=s===2?`${-parseFloat(l[0])}px`:l[0],c+=l[0].length;continue}}a+=f,c++}return a}).join(",")}function Qu(t,e){let n=r=>La(r).map(i=>{let o=i.indexOf(":");if(o<0)return i;let s=i.slice(0,o).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${Ku(i.slice(o+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,i)=>r.replace(i,i.replace(/([^{}]+)\{([^}]*)\}/g,(o,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(r,i,o)=>`style=${i}${n(o)}${i}`),t}async function ur(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:r}=await Yu();try{let i=t;return n||(i=Xu(i)),r&&(i=Qu(i,n)),{svg:i,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}function Ju(){let t=document.createElement("canvas");t.width=16,t.height=16;let e=t.getContext("2d",{willReadFrequently:!0});return e?n=>{e.clearRect(0,0,16,16),e.drawImage(n,0,0,16,16);let r=e.getImageData(0,0,16,16).data;for(let i=3;i<r.length;i+=4)if(r[i]>0)return!0;return!1}:null}async function Zu(t,e,n){J(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await lr(),await lr(),!1;let r=performance.now()+(e?600:150);for(;;){let i;try{i=n(t)}catch{return!1}if(i)return!0;if(performance.now()>r)return!1;await lr()}}finally{try{t.remove()}catch{}}}function $a(t){if(typeof document>"u"||!document.body)return new Image;if($t&&!$t.contentDocument){try{$t.remove()}catch{}$t=null}if($t&&Io>td&&fr===0){try{$t.remove()}catch{}$t=null}if(!$t){let n=document.createElement("iframe");J(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)$t=n,Io=0;else{try{n.remove()}catch{}return new Image}}Io+=t.length,fr+=1;let e=$t.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function Wo(t){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,fr=Math.max(0,fr-1))}function Pa(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function id(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),r=0,i=0;for(let o=e;o+48<=t.length;o+=n){let s=t.slice(o,o+48);r++,od.some(a=>s.includes(a))||i++}return i*2>r}function Na(t,e,n,r,i){if(!e.naturalWidth){t.drawImage(e,0,0,n,r);return}let o=n*r,s=o>ed&&!id(i)?Math.min(rd,Math.ceil(o/nd)):1;if(s===1){t.drawImage(e,0,0,n,r);return}let a=e.naturalWidth,c=e.naturalHeight/r;for(let f=0;f<s;f++){let l=Math.round(f*r/s),u=f===s-1?r:Math.round((f+1)*r/s);t.drawImage(e,0,l*c,a,(u-l)*c,0,l,n,u-l)}}async function fe(t,e){let{width:n,height:r,scale:i=1,dpr:o=1,meta:s={},backgroundColor:a,crop:c=null}=e,f=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,l=t,u=!1,p=!1;if(c&&!Lo(t))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(Lo(t)){let m=(Vu(t).match(/<svg\b[^>]*>/i)||[])[0]||"",d=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(d)&&Number.isFinite(g)&&d>0&&g>0&&Math.min(1,Qt/d,Qt/g,Math.sqrt(Oo/(d*g)))<1;if(c||y||X())try{let b=un(t);if(c&&(b=ju(b,c)),X()){let S=await ur(b);b=S.svg,u=S.naturalOnly,p=/@font-face|data:image\//i.test(b)}(y||c)&&(b=zu(b,e.__session)),l=dn(b)}catch(b){if(c)throw b;l=t}}let h=f||$a(l);try{f||await Pa(h,l)}catch(m){if(!h.__snapdomDecodeFrame)throw m;Wo(h),h=$a(l);try{await Pa(h,l)}catch(d){throw Wo(h),d}}try{!f&&!X()&&!Rt()&&Lo(l)&&/(?:%40|@)font-face/i.test(l)&&await new Promise($=>{let O=new MessageChannel;O.port1.onmessage=()=>{O.port1.close(),O.port2.close(),$()},O.port2.postMessage(0)});let m=X()&&!f?Ju():null,d=!1;m&&(d=await Zu(h,p,m));let g=f?f.width:h.naturalWidth,y=f?f.height:h.naturalHeight,b=c?g:Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:g,S=c?y:Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:y,k,v,w=Number.isFinite(n),C=Number.isFinite(r);if(w&&C)k=Math.max(1,n),v=Math.max(1,r);else if(w){let $=n/Math.max(1,b);k=n,v=S*$}else if(C){let $=r/Math.max(1,S);v=r,k=b*$}else{let $=f&&Number.isFinite(s.vbW)&&Number.isFinite(s.vbH);k=$?s.vbW:g,v=$?s.vbH:y}!w&&!C&&(k=k*i,v=v*i);let A=k*o,M=v*o,x=Math.max(A/Qt,M/Qt,Math.sqrt(A*M/Oo));x>1&&(xt(e.__session,"canvas-clamp",`output ${Math.round(A)}x${Math.round(M)}px exceeds canvas limits; downscaled`),console.warn(`[snapDOM] Output ${Math.round(A)}\xD7${Math.round(M)}px exceeds the browser canvas limit (${Qt}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),k/=x,v/=x);let _=kt(e.canvas)&&rt(e.canvas,"canvas")?e.canvas:document.createElement("canvas");_.width=Math.max(1,k*o),_.height=Math.max(1,v*o),_.style.width=`${k}px`,_.style.height=`${v}px`;let R=_.getContext("2d");if(!R)throw new Error("[snapdom] toCanvas: the target canvas has no 2d context");let T=()=>{if(o!==1&&R.scale(o,o),a&&(R.save(),R.fillStyle=a,R.fillRect(0,0,k,v),R.restore()),u&&(Math.round(k*o)!==g||Math.round(v*o)!==y)){let $=document.createElement("canvas");$.width=g,$.height=y,Na($.getContext("2d"),h,g,y,l),R.drawImage($,0,0,k,v)}else R.save(),R.setTransform(1,0,0,1,0,0),Na(R,h,k*o,v*o,l),R.restore()};if(T(),m&&d&&p){let $=!0;try{$=m(h)}catch{}if(!$){let O=performance.now()+600;do{await lr();try{$=m(h)}catch{break}}while(!$&&performance.now()<O);_.width=_.width,T()}}return _}finally{Wo(h)}}var Qt,Oo,cr,lr,td,$t,Io,fr,ed,nd,rd,od,De=ct(()=>{"use strict";St();ee();bt();wt();Qt=X()?16384:32767,Oo=16384*16384;cr=null;lr=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});td=24*1024*1024,$t=null,Io=0,fr=0;ed=4e6,nd=2e6,rd=8,od=["%3C","%3E","%20","%7B","%7D","%3B"]});var pn={};je(pn,{rasterize:()=>Do});async function Do(t,e){let n=await fe(t,e),o=n.width*n.height<=2e6?n.toDataURL(`image/${e.format}`,e.quality):await new Promise(a=>{let c=()=>a(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(f=>{if(!f)return c();let l=new FileReader;l.onload=()=>a(String(l.result||"")),l.onerror=c,l.readAsDataURL(f)},`image/${e.format}`,e.quality)}catch{c()}}),s=new Image;return s.src=o,X()?await s.decode():await new Promise((a,c)=>{if(s.complete&&s.naturalWidth)return a();s.onload=a,s.onerror=c}),s.style.width=`${n.width/e.dpr}px`,s.style.height=`${n.height/e.dpr}px`,s}var Be=ct(()=>{"use strict";De();St()});var Bo={};je(Bo,{toImg:()=>sd,toSvg:()=>sd});async function sd(t,e){let{scale:n=1,width:r,height:i,meta:o={}}=e,s=Number.isFinite(r),a=Number.isFinite(i),c=Number.isFinite(n)&&n!==1||s||a;if(X()&&c)try{let{svg:p}=await ur(un(t)),h=(p.match(/<svg\b[^>]*>/i)||[])[0]||"",m=parseFloat((h.match(/\bwidth="([\d.]+)/i)||[])[1]),d=parseFloat((h.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(m)||!Number.isFinite(d))throw new Error("svg without dimensions");let g=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:m,y=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:d,b,S;s&&a?(b=r,S=i):s?(b=r,S=Math.max(1,Math.round(y*(r/Math.max(1,g))))):a?(S=i,b=Math.max(1,Math.round(g*(i/Math.max(1,y))))):(b=Math.max(1,Math.round(m*n)),S=Math.max(1,Math.round(d*n)));let k=p.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${S}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=dn(k),await v.decode(),v.style.width=`${b}px`,v.style.height=`${S}px`,v}catch(p){return xt(e.__session,"safari-png-fallback","safari vector toImg failed, falling back to PNG raster",p),D(e,"safari vector toImg failed, falling back to PNG",p),Do(t,{...e,format:"png",quality:1,meta:o})}let f=t,l=!1;if(!s&&!a&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=un(t),h=(p.match(/<svg\b[^>]*>/i)||[])[0]||"",m=Number((h.match(/\bwidth="([\d.]+)"/i)||[])[1]),d=Number((h.match(/\bheight="([\d.]+)"/i)||[])[1]);if(m>0&&d>0){let g=h.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(m*n))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(d*n))}"`);f=dn(p.replace(h,g)),l=!0}}catch{}let u=new Image;u.decoding="sync",u.loading="eager",u.src=f;try{await u.decode()}catch(p){if(!l)throw p;u.src=t,l=!1,await u.decode()}if(s&&a)u.style.width=`${r}px`,u.style.height=`${i}px`;else if(s){let p=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=r/Math.max(1,p);u.style.width=`${r}px`,u.style.height=`${Math.max(1,Math.round(h*m))}px`}else if(a){let p=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=i/Math.max(1,h);u.style.height=`${i}px`,u.style.width=`${Math.max(1,Math.round(p*m))}px`}else{let p=Math.max(1,Math.round(u.naturalWidth*(l?1:n))),h=Math.max(1,Math.round(u.naturalHeight*(l?1:n)));if(u.style.width=`${p}px`,u.style.height=`${h}px`,!l&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let d=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${p}"`).replace(/height="[^"]*"/,`height="${h}"`);u.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,await u.decode()}catch(m){D(e,"SVG width/height patch in toImg failed",m),u.src!==t&&(u.src=t,await u.decode().catch(()=>{}))}}return u}var Uo=ct(()=>{"use strict";ht();ee();Be();De()});var Oa={};je(Oa,{toBlob:()=>Ho});async function Ho(t,e){let n=e.format||e.type||"svg";if(n==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[snapdom] toBlob: engine:'html-in-canvas' produces a raster capture; ask for png/jpeg/webp");let i=decodeURIComponent(t.split(",")[1]);return new Blob([i],{type:"image/svg+xml"})}let r=await fe(t,e);return new Promise(i=>r.toBlob(o=>i(o),`image/${n==="jpg"?"jpeg":n}`,e.quality))}var zo=ct(()=>{"use strict";De()});var Ba={};je(Ba,{download:()=>ad});async function Da(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function ad(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(e?.format||i||"").toLowerCase(),s=o==="jpg"?"jpeg":o||"png",a=e?.filename||"snapdom",c=/\.(png|jpe?g|webp|svg)$/i.test(a)?a:`${a}.${s}`,f={...e||{},format:s,type:s};f.dpr=1;let l=Ye();if(s==="svg"){let h=await Ho(t,{...f,type:"svg"});if(l&&await Da(h,c))return;let m=URL.createObjectURL(h),d=document.createElement("a");d.href=m,d.download=c,document.body.appendChild(d),d.click(),URL.revokeObjectURL(m),d.remove();return}let u=await fe(t,f);if(l){let h=`image/${s}`,m=await new Promise(d=>u.toBlob(d,h,e?.quality));if(m&&await Da(m,c))return}let p=document.createElement("a");p.href=u.toDataURL(`image/${s}`,e?.quality),p.download=c,document.body.appendChild(p),p.click(),p.remove()}var Ua=ct(()=>{"use strict";zo();De();St()});ht();ht();St();dt();yn();wt();var ne=new WeakMap,di=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"],Tr=new Map,kc=2e3,we=0;function Ft(){we++}function wn(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(jt(e))return!0;if(e.parentElement)e=e.parentElement;else{let n=e.getRootNode?.();e=n&&n.host?n.host:null}}return!1}function xn(t){for(let e of t)if(oe(e))return!0;return!1}function oe(t){if(wn(t.target))return!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!wn(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!wn(n)){e=!1;break}}if(e)return!1}return!0}var be=new WeakMap;function bi(t){for(let e of t){if(!oe(e))continue;let n=e.target.ownerDocument||document;be.set(n,(be.get(n)||0)+1);let r=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;r;r=r.parentElement||r.getRootNode?.()?.host)be.set(r,(be.get(r)||0)+1)}}function Ze(t){let e=t.ownerDocument||document;return ve(e),(be.get(e)||0)-(be.get(t)||0)}var Ct=0;function Se(t=document){return ve(t),Ct}function Wt(){return ve(),we}function tn(t){return t?(ve(t.ownerDocument||document),vn(t,Or(t))):0}function xe(){Ft(),Ct++}var re=new WeakMap,qt=0,Gt=0;function Cc(t){re.set(t,++qt)}function Ir(t){if(!t||t.nodeType!==1)return;qt++,re.set(t,qt);let e=t.querySelectorAll("*");for(let n=0;n<e.length;n++)re.set(e[n],qt)}function Wr(t){Ir(t.parentElement||t);for(let e=t.parentElement;e;e=e.parentElement)Cc(e)}function vn(t,e=null){let n=re.get(t)||0;if(e)for(let r of e)n=Math.max(n,re.get(r)||0);return Gt*1e9+n}function Or(t){let e=t.getRootNode?.();if(!e?.host)return null;let n=[];for(;e?.host;)e.mode==="open"&&Br(e),n.push(e.host),e=e.host.getRootNode?.();return n}var $r=new WeakMap;function Dr(t){t=t||document;let e=$r.get(t);if(!e||e.env!==Ct){let n=!0;try{n=Xt(t).usesHas}catch{}e={env:Ct,usesHas:n},$r.set(t,e)}return!e.usesHas}function Ac(t){let e=n=>n?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let r=n.target,i=r&&(r.nodeType===1?r:r.parentElement);if(i&&(i.tagName==="STYLE"||i.tagName==="LINK"))return i.ownerDocument||document;for(let o of n.addedNodes)if(e(o))return o.ownerDocument||document;for(let o of n.removedNodes)if(e(o))return o.ownerDocument||r&&r.ownerDocument||document}return null}var Pr=new WeakSet,Ke=[];function wi(t){if(!xn(t))return;bi(t),Ft();let e=new Set;for(let n of t){if(!oe(n))continue;let r=n.target.getRootNode&&n.target.getRootNode();if(!r||r.nodeType!==11||e.has(r))continue;e.add(r),r.host?Ir(r.host):qt++;let i=r.querySelectorAll("*");for(let o=0;o<i.length;o++)re.set(i[o],qt)}}function Br(t){if(!(!t||Pr.has(t))){Pr.add(t);try{let e=new MutationObserver(wi);e.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Ke.push({o:e,root:t})}catch{}}}function Si(t){if(!xn(t))return;bi(t),Ft();let e=Ac(t);if(e){$r.delete(e),Ct++,Gt++;return}let n=new Set;for(let r of t){if(!oe(r))continue;let i=r.target.nodeType===1?r.target:r.target.parentElement;if(!i)continue;let o=i.ownerDocument||document;if(!Dr(o)){Gt++;return}if(i===o.documentElement||i===o.body){Gt++;return}let s=i.parentElement||i;n.has(s)||(n.add(s),Wr(i))}}var Nr=new WeakSet,Qe=null,Je=[];function ve(t=document){if(t===Qe||!t||t.nodeType!==9)return;if(Nr.has(t)){Qe=t;return}Nr.add(t),Qe=t;let e=t.defaultView,n=i=>{xn(i)&&(Ft(),Ct++)},r=()=>{Ft(),Ct++};try{let i=new MutationObserver(Si);i.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Je.push({o:i,env:!1,doc:t})}catch{}try{let i=new MutationObserver(n);i.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Je.push({o:i,env:!0,doc:t})}catch{}try{e?.addEventListener("resize",r,{passive:!0})}catch{}try{let i=o=>{Ft();let s=o.composedPath?.()[0]||o.target;s&&s.nodeType===1&&!wn(s)&&Dr(s.ownerDocument||t)?Wr(s):Gt++};t.addEventListener("focusin",i,{capture:!0,passive:!0}),t.addEventListener("focusout",i,{capture:!0,passive:!0}),t.addEventListener("change",i,{capture:!0,passive:!0}),t.addEventListener("pointerdown",i,{capture:!0,passive:!0}),t.addEventListener("pointerup",i,{capture:!0,passive:!0}),t.addEventListener("pointercancel",i,{capture:!0,passive:!0}),t.addEventListener("keydown",i,{capture:!0,passive:!0}),t.addEventListener("keyup",i,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",i,{capture:!0,passive:!0}),t.addEventListener("toggle",i,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{Ft(),Gt++},{passive:!0})}catch{}try{let i=t.fonts;i&&(i.addEventListener?.("loadingdone",r),i.status==="loading"&&i.ready?.then(r).catch(()=>{}))}catch{}}var pi=new WeakMap;function hi(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let r=pi.get(t)||[];if(r.length===n.length&&r.every((o,s)=>o===n[s]))return;if(pi.set(t,n),Ft(),t.nodeType===11){t.host?Ir(t.host):qt++;for(let o of t.querySelectorAll("*"))re.set(o,qt);return}let i=r.filter(o=>!n.includes(o)).concat(n.filter(o=>!r.includes(o)));for(let o of i)if(o.isConnected)if(Dr(e))Wr(o);else{Gt++;return}}function kn(t,e=null){if(!t)return;hi(t,t);let n=e||Ke.filter(({root:r})=>r.host?.isConnected).map(({root:r})=>r);for(let r of n)hi(r,t)}function At(){ve();try{for(let t=Je.length-1;t>=0;t--){let{o:e,env:n,doc:r}=Je[t];if(r!==document&&!r.defaultView){try{e.disconnect()}catch{}Nr.delete(r),Qe===r&&(Qe=null),Je.splice(t,1);continue}let i=e.takeRecords();i.length&&(n?xn(i)&&(Ft(),Ct++):Si(i))}for(let t=Ke.length-1;t>=0;t--){let{o:e,root:n}=Ke[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}Pr.delete(n),Ke.splice(t,1);continue}let r=e.takeRecords();r.length&&wi(r)}}catch{}}function ie(t){if(!(!t||t.nodeType!==1)){ne.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)ne.delete(e.currentNode)}catch{}}}var Mc=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function Ur(t){let e=ne.get(t);if(e&&Hr(e,t)){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function xi(t){let e=ne.get(t);if(!e||!Hr(e,t))return null;let n=e.snapshot;return!n||n.__bgClipTextFix?null:n}var mi=new WeakMap;function Xt(t){let e=mi.get(t);if(!e||e.epoch!==we){let n=e&&e.universe;e={epoch:we,...ii(t)};let r=e.universe;if(n&&r&&n.size===r.size){let i=!0;for(let o of r)if(!n.has(o)){i=!1;break}i&&(e.universe=n)}mi.set(t,e)}return e}function vi(t){try{let e=Xt(t.ownerDocument||document).shareGate;if(e===null)return!1;if(!e.length)return!0;let n=new Set,r=s=>{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let c=0;c<a.length;c++)n.add("c"+a[c])};r(t);for(let s of t.querySelectorAll("*"))r(s);let i=[];for(let{sel:s,key:a}of e)(a===null||n.has(a))&&i.push(s);if(!i.length)return!0;let o=i.join(",");return!t.matches(o)&&t.querySelector(o)===null}catch{return!1}}function _c(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Xt(e).importantProps}function en(t,e){let n=t.ownerDocument||document,r=t.getRootNode?t.getRootNode():n;return r===n?Xt(n).universe:e&&Lt(r)?Ec(t,r,n,e):null}var gi=new WeakMap;function Ec(t,e,n,r){let i=r.__shadowUniverse;if(i===null)return null;if(!i){let a=Xt(n).universe;if(!a)return r.__shadowUniverse=null;i=r.__shadowUniverse={universe:new Set(a),roots:new Set}}let o=a=>{for(;Lt(a)&&!i.roots.has(a);a=a.host.getRootNode()){i.roots.add(a);for(let c of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=gi.get(c);if((!f||f.epoch!==we)&&gi.set(c,f={epoch:we,props:ri(c)}),!f.props)return!1;for(let l of f.props)i.universe.add(l)}Cr(a.getAnimations(),i.universe)}return!0},s=o(e)&&(!t.shadowRoot||o(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=o(a.getRootNode());return s?i.universe:r.__shadowUniverse=null}function Sn(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Xt(e).pseudoUniverse}var Rc={before:null,after:null,firstLetter:null,marker:null,firstLine:null};function ke(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?Rc:Xt(e).pseudoGates}function Fc(t,e={},n=null,r=null){let i={},o=e.excludeStyleProps,s=h=>{if(i[h]!==void 0||he(h)||o&&(o instanceof RegExp&&o.test(h)||typeof o=="function"&&o(h)))return;let m=t.getPropertyValue(h);m&&((h==="background-image"||h==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),i[h]=m)};if(r){for(let m of r)s(m);let h=n&&n.style;if(h&&h.length)for(let m=0;m<h.length;m++)s(h[m])}else for(let h=0;h<t.length;h++)s(t[h]);let a=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let h of a)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}let c=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let h of c)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}if(e.embedFonts){let h=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let m of h)if(!i[m])try{let d=t.getPropertyValue(m);d&&(i[m]=d)}catch{}}try{(i["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(i["content-visibility"]="hidden")}catch{}Object.defineProperty(i,"__needsBgInline",{value:ki(t),enumerable:!1});let f=parseFloat(t.getPropertyValue("border-top-width")||0)||0,l=parseFloat(t.getPropertyValue("border-right-width")||0)||0,u=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,p=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(f===0&&l===0&&u===0&&p===0){let h=(t.getPropertyValue("border-image-source")||"").trim(),m=h&&h!=="none",d=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color","border-block-start","border-block-start-width","border-block-start-style","border-block-start-color","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-inline-start","border-inline-start-width","border-inline-start-style","border-inline-start-color","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color"];for(let g of d)delete i[g];m||(i.border="none")}return Tc(i),i}function Tc(t){if(!Rt())return;let e=t["background-clip"]||t["-webkit-background-clip"];if(!e||!e.includes("text"))return;let n=o=>o==="transparent"||o==="rgba(0, 0, 0, 0)",r=t["-webkit-text-fill-color"];if(!n(r!==void 0?r:t.color))return;let i=$c(t["background-image"],t["background-color"]);i&&(n(t.color)&&(t.color=i),r!==void 0&&(t["-webkit-text-fill-color"]=i),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:i,enumerable:!1}))}function $c(t,e){let n=o=>{let s=[],a=/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)(?:[,\s/]+([\d.]+%?))?\s*\)/g,c;for(;c=a.exec(o||"");){let f=c[4];(f===void 0?1:parseFloat(f)/(f.endsWith("%")?100:1))>.05&&s.push([+c[1],+c[2],+c[3]])}return s},r=n(t);if(r.length||(r=n(e)),!r.length)return null;let i=[0,0,0];for(let[o,s,a]of r)i[0]+=o,i[1]+=s,i[2]+=a;return`rgb(${i.map(o=>Math.round(o/r.length)).join(", ")})`}function ki(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let i of Mc){let o=t.getPropertyValue(i);if(o&&o!=="none")return!0}let r=t.getPropertyValue("background");return!!(r&&/url\s*\(/i.test(r))}function Pc(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=W(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function Nc(t,e,n){try{if(typeof t.computedStyleMap=="function"){let i=t.computedStyleMap().get("width");if(i!=null)return!yi(String(i).trim().toLowerCase())}}catch{}let r=t.style&&(t.style.width||t.style.inlineSize);return r&&!yi(String(r).trim().toLowerCase())?!0:Ic(t,e)?n||Wc(t,e):!1}var Lc=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function yi(t){return Lc.has(t)||t.startsWith("fit-content")}function Ic(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(o=o||document.createRange(),o.selectNode(s),a=o.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let c=W(s);if(c.display==="none"||c.position==="absolute"||c.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.left<r&&(r=a.left),a.right>i&&(i=a.right)}return i===-1/0?!1:i-r<n-.5}function Wc(t,e){let n=t.parentElement;if(!n)return!1;let r=W(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(e.marginLeft)||0)-(parseFloat(e.marginRight)||0);return i>0?Math.abs(t.getBoundingClientRect().width-i)>.5:!1}var Lr=new WeakMap;function Oc(t,e){let n=Lr.get(t);if(n)return n;let r=[e];for(let i in t)r.push(i,t[i]);return n=r.join(""),Lr.set(t,n),n}function Hr(t,e){return t.env===Ct&&t.stamp===vn(e,t.hosts)}var Dc=/^(width|height|inline-size|block-size|top|right|bottom|left|transform-origin|perspective-origin)$|^inset-/,Bc=/(margin|padding)[a-z-]*\s*:[^;]*(%|\bauto\b|calc\(|var\()/i,Uc=new Set(["INPUT","TEXTAREA","SELECT","OPTION","OPTGROUP","PROGRESS","METER","BUTTON","DATALIST"]);function Hc(t){let e=t.__styleShare;return e||(e=t.__styleShare={ids:new WeakMap,intern:new Map,snaps:new Map,rootSeen:!1}),e}function zc(t,e){let n=e.ids.get(t);if(n!==void 0)return n;let r=t.parentElement,i;if(!r)i="R";else if(i=e.ids.get(r),i===void 0){if(e.rootSeen)return e.ids.set(t,-1),-1;i="R"}if(e.rootSeen=!0,i===-1)return e.ids.set(t,-1),-1;let o="",s=t.attributes;if(s&&s.length)if(s.length===1)o=s[0].name+"="+s[0].value;else{let c=[];for(let f=0;f<s.length;f++)c.push(s[f].name+"="+s[f].value);c.sort(),o=c.join("")}let a=i+"|"+t.tagName+"|"+o;return n=e.intern.get(a),n===void 0&&(n=e.intern.size,e.intern.set(a,n)),e.ids.set(t,n),n}function Ci(t,e){let n=t.snap,r=t.snap={...n};Object.defineProperty(r,"__needsBgInline",{value:n.__needsBgInline,enumerable:!1}),n.__bgClipTextFix!==void 0&&Object.defineProperty(r,"__bgClipTextFix",{value:n.__bgClipTextFix,enumerable:!1});let i=Xt(e.ownerDocument||document),o=e.getAttribute&&e.getAttribute("style")||"",s=o&&Bc.test(o),a=!!i.marginUnstable||s&&/margin/i.test(o),c=!!i.paddingUnstable||s&&/padding/i.test(o),f=r.display!==void 0&&r.display.includes("grid"),l=r.transform!==void 0&&r.transform!=="none",u=[];for(let m in r)(Dc.test(m)||f&&(m==="grid-template-columns"||m==="grid-template-rows")||l&&m==="transform"||a&&m.charCodeAt(0)===109&&m.startsWith("margin-")||c&&m.charCodeAt(0)===112&&m.startsWith("padding-"))&&u.push(m);t.h&&!("height"in r)&&u.push("height"),t.b&&!("block-size"in r)&&u.push("block-size");let p=new Set(u),h=[e.tagName.toLowerCase()];for(let m in r)p.has(m)||h.push(m,r[m]);return t.rr=u,t.sig=h.join("")+""+u.join(""),u}function Ai(t,e,n,r,i){let o=i&&i.__styleShare?r&&r.__styleShare:null,s=o?o.ids.get(t):void 0;if(s===void 0||s===-1||t.shadowRoot||t.assignedSlot)return ge(n,Sn(t));let a=s+e,c=o.pseudo||(o.pseudo=new Map),f=c.get(a);if(f){let u={...f.snap},p=f.rr||Ci(f,t);for(let h=0;h<p.length;h++){let m=n.getPropertyValue(p[h]);m?u[p[h]]=m:delete u[p[h]]}return u}let l=ge(n,Sn(t));return c.set(a,{snap:l,rr:null,sig:null,h:"height"in l,b:"block-size"in l}),l}function jc(t,e=null,n={},r=null,i=null){let o=ne.get(t),s=!!(n&&n.embedFonts),a=n&&n.excludeStyleProps||null;if(typeof a!="function"&&o&&Hr(o,t)&&o.embedFonts===s&&o.excludeStyleProps===a)return o.snapshot;let c=e||getComputedStyle(t),f,l=null,u=r&&r.st.snaps.get(r.id);if(u){f={...u.snap};let m=u.rr||Ci(u,t);l=[];for(let d=0;d<m.length;d++){let g=m[d],y=c.getPropertyValue(g);y?f[g]=y:delete f[g],l.push(y)}Object.defineProperty(f,"__needsBgInline",{value:u.snap.__needsBgInline,enumerable:!1}),u.snap.__bgClipTextFix!==void 0&&Object.defineProperty(f,"__bgClipTextFix",{value:u.snap.__bgClipTextFix,enumerable:!1})}else f=Fc(c,n,t,en(t,i)),r&&r.st.snaps.set(r.id,{snap:f,rr:null,sig:null,h:"height"in f,b:"block-size"in f});let p=!1;if(typeof t.computedStyleMap=="function"){let m;for(let d of di)if(f[d]==="0px")try{m||=t.computedStyleMap(),m.get(d)?.toString()==="auto"&&(f[d]="auto",p=!0)}catch{}}Zc(t,c,f),l!==null&&(p&&l.push("",...di.map(m=>f[m])),Lr.set(f,u.sig+""+l.join("")+("height"in f?"":"")+("block-size"in f?"":"")));let h=Or(t);return ne.set(t,{env:Ct,stamp:vn(t,h),hosts:h,snapshot:f,embedFonts:s,excludeStyleProps:a}),f}function Vc(t,e){if(t&&t.session&&t.persist)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.__ctx;return(!n||t.__ctxOpts!==e)&&(n={session:t,persist:{snapshotKeyCache:Tr,defaultStyle:N.defaultStyle,baseStyle:N.baseStyle,image:N.image,resource:N.resource,background:N.background},options:e||{}},t.__ctx=n,t.__ctxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},persist:{snapshotKeyCache:Tr,defaultStyle:N.defaultStyle,baseStyle:N.baseStyle,image:N.image,resource:N.resource,background:N.background},options:t||e||{}}}var qc=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Gc=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA";function Xc(t,e,n){if(!t.style||t.style.length===0)return;let r=_c(t),i=r!=null&&!qc.test(t.getAttribute("style")||"");for(let o=0;o<t.style.length;o++){let s=t.style[o];if(i&&!r.has(s)&&!(s.startsWith("background")&&Gc(t)))continue;let a=n.getPropertyValue(s);a&&e.style.setProperty(s,a,t.style.getPropertyPriority(s))}}function lt(t,e,n,r){if(t.tagName==="STYLE")return;let i=Vc(n,r),o=i.options&&i.options.cache||"soft";o!=="disabled"&&ve(t.ownerDocument),o==="disabled"&&!i.session.__bumpedForDisabled&&(Ft(),Tr.clear(),i.session.__bumpedForDisabled=!0);let{session:s,persist:a}=i;if(!s.styleCache.has(t)){let y=null;try{y=getComputedStyle(t)}catch{}s.styleCache.set(t,y||getComputedStyle((t.ownerDocument||document).documentElement))}let c=s.styleCache.get(t);t.getAttribute?.("style")&&Xc(t,e,c);let f=c.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let l=t.tagName?.toLowerCase()||"div";if(Ge.has(l)){let y={};Object.defineProperty(y,"__needsBgInline",{value:ki(c),enumerable:!1});let b=Or(t);ne.set(t,{env:Ct,stamp:vn(t,b),hosts:b,snapshot:y,embedFonts:!!(i.options&&i.options.embedFonts),excludeStyleProps:i.options&&i.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(i.options&&i.options.__styleShare&&s.styleMap){let y=Hc(s),b=zc(t,y),S=t.ownerDocument||document,k=S.activeElement;b!==-1&&!Uc.has(t.tagName)&&!(k&&k!==S.body&&k!==S.documentElement&&k===t)&&(!t.getRootNode||t.getRootNode()===S)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:y,id:b})}let p=jc(t,c,i.options,u,s);if(t.getAttribute?.("style"))for(let y of["top","right","bottom","left"]){let b=`margin-${y}`;p[b]==="auto"&&e.style.setProperty(b,"auto","important")}p.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",p.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",p.__bgClipTextFix,"important")),Yc(t,c,p);let h=Mi(t);if(h){let y=c.getPropertyValue("min-width");(!y||y==="auto"||y==="0px")&&(p["min-width"]="0px")}let m=Oc(p,l),d=!0;if(bn(l,(p.display||"").toLowerCase())){d=Pc(t),d&&Er(l,p,h)&&Nc(t,c,h)&&(d=!1),m=`${m}${d?"|c":""}${h?"|f":""}`;let y=p["text-wrap-mode"]||p["white-space"]||"";d&&y!=="nowrap"&&y!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let g=a.snapshotKeyCache.get(m);g===void 0&&(g=me(p,l,d,h),a.snapshotKeyCache.size>=kc&&a.snapshotKeyCache.delete(a.snapshotKeyCache.keys().next().value),a.snapshotKeyCache.set(m,g)),s.styleMap.set(e,g)}function Yc(t,e,n){let r=e.getPropertyValue("overflow-x"),i=e.getPropertyValue("overflow-y");if((r==="visible"||!r)&&(i==="visible"||!i)||e.getPropertyValue("box-sizing")==="border-box"||typeof t.clientWidth!="number"||!t.offsetWidth)return;let o=f=>parseFloat(f)||0,s=t.offsetWidth-t.clientWidth-o(e.getPropertyValue("border-left-width"))-o(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-o(e.getPropertyValue("border-top-width"))-o(e.getPropertyValue("border-bottom-width")),c=(f,l)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let p=parseFloat(u);Number.isFinite(p)&&(n[f]=`${Math.round((p+l)*1e3)/1e3}px`)};s>.5&&(c("width",s),c("inline-size",s)),a>.5&&(c("height",a),c("block-size",a))}function Kc(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}function Mi(t){let e=t.parentElement;if(!e)return!1;let n=W(e).display||"";return n.includes("flex")||n.includes("grid")}function Qc(t){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let e=t.firstElementChild,n=t.lastElementChild;if(e&&e.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=t.firstElementChild;r;r=r.nextElementSibling){let i=W(r);if(i.display==="none")continue;let o=i.position;if(o!=="absolute"&&o!=="fixed")return!0}return!1}function Jc(t){let e=t.getBoundingClientRect().top,n=-1/0,r=null;for(let i=t.firstChild;i;i=i.nextSibling){if(i.nodeType===3){if(!/\S/.test(i.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(i);let a=r.getBoundingClientRect();(a.width||a.height)&&(n=Math.max(n,a.bottom));continue}if(i.nodeType!==1)continue;let o=W(i);if(o.display==="none")continue;let s=o.position;s==="absolute"||s==="fixed"||o.float&&o.float!=="none"||(n=Math.max(n,i.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-e}function Zc(t,e,n){if(kt(t)&&t.style&&t.style.height)return;let r=t.tagName&&t.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let s=e.position;if(s==="absolute"||s==="fixed"||s==="sticky"||e.transform!=="none"||Kc(e)||Mi(t))return;let a=e.overflowX||e.overflow||"visible",c=e.overflowY||e.overflow||"visible";if(a!=="visible"||c!=="visible")return;let f=e.clip;if(f&&f!=="auto"&&f!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!Qc(t))return;let l=parseFloat(e.height),u=Jc(t);Number.isFinite(l)&&Number.isFinite(u)&&Math.abs(l-u)>2||(delete n.height,delete n["block-size"])}ye();var tl=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]),zr=new WeakMap,_i=-1;function Cn(t){let e=Wt();return e!==_i&&(zr=new WeakMap,_i=e),Ei(t)}function Ei(t){let e=zr.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(t.localName==="mask"||t.localName==="clipPath"?n=!1:tl.has(t.localName)&&(n=!0)),n===void 0){let r=t.parentNode;n=!!(r&&r.nodeType===1)&&Ei(r)}return zr.set(t,n),n}function Ri(t,e){if(t?.nodeType!==1||e?.nodeType!==1||Cn(t))return;let n=t.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(a&&typeof a.value=="string"&&!a.value.startsWith("data:")&&a.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(t)}catch{}if(r){let o=t.style;if(o&&o.length){let s=new Set;for(let a=0;a<o.length;a++){let c=o[a];if(s.has(c))continue;s.add(c);let f=o.getPropertyValue(c);if(!f||!f.includes("var("))continue;let l=i&&i.getPropertyValue(c);if(l)try{e.style.setProperty(c,l.trim(),o.getPropertyPriority(c))}catch{}}}}if(r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(!a||typeof a.value!="string"||a.value.startsWith("data:")||!a.value.includes("var("))continue;let c=a.name,f=i&&i.getPropertyValue(c);if(f)try{e.style.setProperty(c,f.trim())}catch{}}}}ht();ht();dt();de();yn();bt();function Ce(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:"))}function Ae(t,e){if(!t)return null;let n=0;try{n=e?e.getBoundingClientRect().width||e.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let o of t.split(",")){let s=o.trim().split(/\s+/);if(!s[0])continue;let a=s[1]||"",c=1;/^\d*\.?\d+x$/i.test(a)?c=parseFloat(a):/^\d+w$/i.test(a)&&(c=parseInt(a,10)/n),r.push({url:s[0],d:c})}if(!r.length)return null;r.sort((o,s)=>o.d-s.d);let i=window.devicePixelRatio||1;return(r.find(o=>o.d>=i)||r[r.length-1]).url}function Fi(t,e){let n=t.currentSrc||"";if(n&&!Ce(n))return n;let r=e.querySelectorAll("source[srcset]"),i=null;for(let o of r){let s=o.getAttribute("srcset");if(!s||Ce(s))continue;let a=o.getAttribute("type");if(a&&!gr.test(a.trim()))continue;let c=o.getAttribute("media");if(c)try{if(window.matchMedia(c).matches)return Ae(s,t)}catch{}i||(i=Ae(s,t))}return i}function Ti(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let r of e)if(r&&!Ce(r))return r;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!Ce(r))return r}return null}wt();function el(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var nl=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,rl=/^::?(?:before|after|first-letter)$/;function ol(t,e,n=!0,r){return Ar(t,",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")&&i.includes("data-sd")||i.startsWith("@"))return i;let o=i.match(nl);if(o&&rl.test(o[0]))return":not(*)";let s=o?i.slice(0,o.index).trim():i,a=n?el(s,r):s;return`:where(${e} ${a})${o?o[0]:""}`}).join(", ")}function Pi(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(r,i)=>`:where(:where(${i.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(r,i)=>`:where(${e}:is(${i.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(r,i)=>`:where(${e} ${i.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(r,i,o,s)=>{let a=ol(s,e,!0,n);return`${i}${o}${a}{`}),t):""}function Ni(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function se(t){let e="";for(let n of t)if(n.media&&n.cssRules){let r=!1;try{r=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}r&&(e+=se(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${se(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let r=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=r+(n.style?n.style.cssText:"")+se(n.cssRules)+"}"}else e+=n.cssText+`
9
- `;return e}function Li(t){let e="";try{t.querySelectorAll("style").forEach(r=>{let i=null;try{i=r.sheet&&r.sheet.cssRules}catch{}e+=(i?se(i):r.textContent||"")+`
10
- `});let n=t.adoptedStyleSheets||[];for(let r of n)try{r&&r.cssRules&&(e+=se(r.cssRules))}catch{}}catch{}return e}function Ii(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function Wi(t,e,n={}){try{let r=null,i=W(t).content;if(i&&i.includes("url(")){let f=i.match(/url\(["']?([^"')]+)["']?\)/);f&&(r=f[1])}let o=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",c=r||(o?Fi(t,o):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||Ae(a,t)||t.src||"";if((!c||Ce(c))&&n.resolvePicturePlaceholders!==!1){let f=Ti(t);f&&(c=f)}if(!c)return;e.getAttribute("src")!==c&&e.setAttribute("src",c),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Oi(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function il(t,e){try{let r=getComputedStyle(t).getPropertyValue(e).trim();if(r)return r}catch{}try{let r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(r)return r}catch{}return""}function Di(t,e,n){let r=[];for(let i of e){let o=il(t,i);o&&r.push(`${i}: ${o};`)}return r.length?`${n}{${r.join("")}}
11
- `:""}function Bi(t,e){if(!t)return;let n=r=>{let i=r.getAttribute("data-sd-slotted")||"";e?` ${i} `.includes(` ${e} `)||r.setAttribute("data-sd-slotted",i?`${i} ${e}`:e):r.setAttribute("data-sd-slotted",i)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}async function sl(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<e&&(!r||!r.body&&!r.documentElement);)await new Promise(o=>setTimeout(o,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}function al(t){let e=t.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let c=getComputedStyle(t);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,i=parseFloat(c.borderTopWidth)||0,o=parseFloat(c.borderBottomWidth)||0}catch{}let s=Math.max(0,Math.round(e.width-(n+r))),a=Math.max(0,Math.round(e.height-(i+o)));return{contentWidth:s,contentHeight:a,rect:e}}function mt(t){let e=0,n=0;if(t.offsetWidth>0&&(e=t.offsetWidth),t.offsetHeight>0&&(n=t.offsetHeight),e===0||n===0)try{let r=getComputedStyle(t);if(e===0){let i=parseFloat(r.width);!isNaN(i)&&i>0&&(e=i)}if(n===0){let i=parseFloat(r.height);!isNaN(i)&&i>0&&(n=i)}}catch{}if(e===0||n===0)try{if(e===0){let r=parseFloat(t.getAttribute("width"));!isNaN(r)&&r>0&&(e=r)}if(n===0){let r=parseFloat(t.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((e===0||n===0)&&(t.naturalWidth||t.naturalHeight))try{e===0&&t.naturalWidth>0&&(e=t.naturalWidth),n===0&&t.naturalHeight>0&&(n=t.naturalHeight)}catch{}return{width:e,height:n}}function cl(t,e,n){let r=t.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,c=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,l=0,u=0,p=0,h=0;try{let d=r&&t.body?r.getComputedStyle(t.body):null;d&&(l=(parseFloat(d.marginTop)||0)+(parseFloat(d.paddingTop)||0),u=(parseFloat(d.marginRight)||0)+(parseFloat(d.paddingRight)||0),p=(parseFloat(d.marginBottom)||0)+(parseFloat(d.paddingBottom)||0),h=(parseFloat(d.marginLeft)||0)+(parseFloat(d.paddingLeft)||0))}catch{}let m=t.createElement("style");if(m.setAttribute("data-sd-iframe-pin",""),J(m),m.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${l}px ${u}px ${p}px ${h}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(t.head||t.documentElement).appendChild(m),ie(t.documentElement),i||o)try{t.body&&(t.body.scrollLeft=i,t.body.scrollTop=o),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=i),t.documentElement.scrollTop||(t.documentElement.scrollTop=o))}catch{}return()=>{try{m.remove()}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(i,o),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=c,t.documentElement.scrollTop=f)}catch{}ie(t.documentElement)}}async function jr(t,e,n){let r=await sl(t,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:i,contentHeight:o,rect:s}=al(t),a=n?.snap;if(!a||typeof a.toPng!="function")throw new Error("[snapdom] iframe capture requires the snapdom entrypoints on options.snap \u2014 capture through snapdom(el) (set automatically) or pass options.snap.");let c={...n,scale:1,clip:null,__pinned:!0},f=cl(r,i,o),l;try{l=await a.toPng(r.documentElement,c)}finally{f()}l.style.display="block",l.style.width=`${i}px`,l.style.height=`${o}px`;let u=document.createElement("div");return e.nodeMap.set(u,t),lt(t,u,e,n),u.style.overflow="hidden",u.style.display="block",u.style.width||(u.style.width=`${Math.round(s.width)}px`),u.style.height||(u.style.height=`${Math.round(s.height)}px`),u.appendChild(l),u}function Ui(t){try{let e=t&&t.accentColor;if(e&&e!=="auto"&&e!=="none")return e;let n=t&&t.color;if(n)return n}catch{}return"#0a6ed1"}function Hi(t){let{width:e,height:n}=mt(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Number.isFinite(o)&&o>0?o:e||r.width||128,c=Number.isFinite(s)&&s>0?s:n||r.height||16,f=Number.parseFloat(t.min)||0,l=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),p=l-f,h=p>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/p)):.5,m="middle";try{i&&i.verticalAlign&&(m=i.verticalAlign)}catch{}let d=document.createElement("div");d.setAttribute("data-snapdom-input-replacement","range"),d.style.cssText=`display:inline-block;width:${a}px;height:${c}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(a)),g.setAttribute("height",String(c)),g.setAttribute("viewBox",`0 0 ${a} ${c}`),g.style.overflow="visible",d.appendChild(g);function y(){let b=Ui(i),S=!!t.disabled,k=Math.max(2,Math.min(4,c)),v=(c-k)/2,w=Math.max(10,Math.min(14,Math.max(c,10))),C=w/2,A=C+h*Math.max(0,a-w);g.innerHTML="";let M=(_,R,T,$)=>{let O=document.createElementNS("http://www.w3.org/2000/svg","rect");O.setAttribute("x",String(_)),O.setAttribute("y",String(v)),O.setAttribute("width",String(Math.max(0,R))),O.setAttribute("height",String(k)),O.setAttribute("rx",String(k/2)),O.setAttribute("fill",T),$&&O.setAttribute("fill-opacity",$),g.appendChild(O)};M(0,a,"#808080","0.4"),M(0,A,b);let x=document.createElementNS("http://www.w3.org/2000/svg","circle");x.setAttribute("cx",String(A)),x.setAttribute("cy",String(c/2)),x.setAttribute("r",String(C)),x.setAttribute("fill",b),g.appendChild(x),S&&g.setAttribute("opacity","0.5"),d.style.setProperty("width",`${a}px`,"important"),d.style.setProperty("height",`${c}px`,"important"),d.style.setProperty("min-width",`${a}px`,"important"),d.style.setProperty("min-height",`${c}px`,"important")}return y(),{el:d,applyVisual:y}}function zi(t){let{width:e,height:n}=mt(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Math.round(e||r.width||0),c=Math.round(n||r.height||0),f=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,a||16),l=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,c||16),u=(t.type||"text").toLowerCase()==="checkbox",p=!!t.checked,h=!!t.indeterminate,d=Math.max(Math.min(f,l),12),g="middle";try{i&&i.verticalAlign&&(g=i.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),y.style.cssText=`display:inline-block;width:${d}px;height:${d}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("width",String(d)),b.setAttribute("height",String(d)),b.setAttribute("viewBox",`0 0 ${d} ${d}`),y.appendChild(b);function S(){let k=Ui(i),v=2,w=v/2,C=d-v;if(b.innerHTML="",u){let A=document.createElementNS("http://www.w3.org/2000/svg","rect");if(A.setAttribute("x",String(w)),A.setAttribute("y",String(w)),A.setAttribute("width",String(C)),A.setAttribute("height",String(C)),A.setAttribute("rx","2"),A.setAttribute("ry","2"),A.setAttribute("fill",p?k:"none"),A.setAttribute("stroke",k),A.setAttribute("stroke-width",String(v)),b.appendChild(A),p){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${w+2} ${d/2} L ${d/2-1} ${d-w-2} L ${d-w-2} ${w+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,v))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),b.appendChild(M)}else if(h){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),x=Math.max(6,C-4);M.setAttribute("x",String((d-x)/2)),M.setAttribute("y",String((d-v)/2)),M.setAttribute("width",String(x)),M.setAttribute("height",String(v)),M.setAttribute("fill",k),M.setAttribute("rx","1"),b.appendChild(M)}}else{let A=document.createElementNS("http://www.w3.org/2000/svg","circle");if(A.setAttribute("cx",String(d/2)),A.setAttribute("cy",String(d/2)),A.setAttribute("r",String((d-v)/2)),A.setAttribute("fill",p?k:"none"),A.setAttribute("stroke",k),A.setAttribute("stroke-width",String(v)),b.appendChild(A),p){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),x=Math.max(2,(d-v*2)*.35);M.setAttribute("cx",String(d/2)),M.setAttribute("cy",String(d/2)),M.setAttribute("r",String(x)),M.setAttribute("fill","white"),b.appendChild(M)}}y.style.setProperty("width",`${d}px`,"important"),y.style.setProperty("height",`${d}px`,"important"),y.style.setProperty("min-width",`${d}px`,"important"),y.style.setProperty("min-height",`${d}px`,"important")}return S(),{el:y,applyVisual:S}}var nn=new ot(80);async function ll(t){if(N.resource?.has(t))return N.resource.get(t);if(nn.has(t))return nn.get(t);let e=(async()=>{let n=await it(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return N.resource?.set(t,n.data),n.data})();nn.set(t,e);try{let n=await e;return nn.set(t,n),n}catch(n){throw nn.delete(t),n}}var $i=/\bblob:[^)"'\s]+/g;function An(t){return typeof t=="string"&&t.startsWith("blob:")}function fl(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function ul(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function rn(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function Mn(t,e=null){if(!t)return;let n=e,r=new Set,i=[],o=new Map,s=(d,g,y,b)=>{r.add(y),i.push(()=>{o.has(y)&&(d.setAttribute(g,o.get(y)),b?.())})},a=(d,g)=>{if(!d||!d.includes("blob:"))return;let y=d.match($i)||[];if(y.length){for(let b of y)r.add(b);i.push(()=>{let b=d.replace($i,S=>o.get(S)||S);b!==d&&g(b)})}},c=rn(t,"img");for(let d of c)try{let y=d.getAttribute("src")||d.currentSrc||"";An(y)&&s(d,"src",y);let b=d.getAttribute("srcset");if(b&&b.includes("blob:")){let S=fl(b);for(let k of S)An(k.url)&&r.add(k.url);i.push(()=>{let k=!1;for(let v of S)o.has(v.url)&&(v.url=o.get(v.url),k=!0);k&&d.setAttribute("srcset",ul(S))})}}catch(g){D(n,"resolveBlobUrls for img failed",g)}let f=rn(t,"image");for(let d of f)try{let g="http://www.w3.org/1999/xlink",y=d.getAttribute("href")||d.getAttributeNS?.(g,"href");An(y)&&s(d,"href",y,()=>d.removeAttributeNS?.(g,"href"))}catch(g){D(n,"resolveBlobUrls for SVG image href failed",g)}let l=rn(t,"[style*='blob:']");for(let d of l)try{let g=d.getAttribute("style");a(g,y=>d.setAttribute("style",y))}catch(g){D(n,"replaceBlobUrls in inline style failed",g)}let u=rn(t,"style");for(let d of u)try{let g=d.textContent||"";a(g,y=>{d.textContent=y})}catch(g){D(n,"replaceBlobUrls in style tag failed",g)}let p=["poster"];for(let d of p){let g=rn(t,`[${d}^='blob:']`);for(let y of g)try{let b=y.getAttribute(d);An(b)&&s(y,d,b)}catch(b){D(n,`resolveBlobUrls for ${d} failed`,b)}}if(!r.size)return;let h=[...r],m=0;await Promise.all(Array.from({length:Math.min(4,h.length)},async()=>{for(;m<h.length;){let d=h[m++];try{o.set(d,await ll(d))}catch(g){D(n,"blobUrlToDataUrl failed; keeping original URL",g)}}}));for(let d of i)try{d()}catch(g){D(n,"resolved blob URL write failed",g)}}St();var ji=new Set(["rgba(0, 0, 0, 0)","transparent"]),Vr="Highlight";function Vi(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let r=[];for(let i=0;i<n.rangeCount;i+=1){let o=n.getRangeAt(i);if(!o.collapsed)try{o.intersectsNode(t)&&r.push(o)}catch{}}return r.length?{ranges:r,styles:new Map}:null}function dl(t,e){if(e.styles.has(t))return e.styles.get(t);let n;try{let r=getComputedStyle(t);if(r.userSelect==="none"||r.webkitUserSelect==="none"||r.getPropertyValue("-webkit-user-select")==="none")return e.styles.set(t,null),null;let i=getComputedStyle(t,"::selection"),o=[],s=i.backgroundColor,a=s&&!ji.has(s)&&s!==r.backgroundColor;o.push(`background-color:${a?s:Vr}`),i.color&&i.color!==r.color&&o.push(`color:${i.color}`,`-webkit-text-fill-color:${i.color}`),i.textShadow&&i.textShadow!==r.textShadow&&o.push(`text-shadow:${i.textShadow}`),i.textDecorationLine&&i.textDecorationLine!=="none"&&i.textDecorationLine!==r.textDecorationLine&&o.push(`text-decoration:${i.textDecorationLine} ${i.textDecorationStyle||"solid"} ${i.textDecorationColor||"currentcolor"}`),n=o.join(";")}catch{n=`background-color:${Vr}`}return e.styles.set(t,n),n}function qi(t,e){let n=t.data;if(!n)return null;let r=t.parentElement;if(!r)return null;let i=[];for(let f of e.ranges){let l=!1;try{l=f.intersectsNode(t)}catch{}if(!l)continue;let u=f.startContainer===t?f.startOffset:0,p=f.endContainer===t?f.endOffset:n.length;p>u&&i.push([u,p])}if(i.length===0)return null;let o=dl(r,e);if(!o)return null;i.sort((f,l)=>f[0]-l[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),c=0;for(let[f,l]of i){f>c&&a.append(s.createTextNode(n.slice(c,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${o}`),u.textContent=n.slice(f,l),a.append(u),c=l}return c<n.length&&a.append(s.createTextNode(n.slice(c))),a}var _n=t=>Number.parseFloat(t)||0,pl=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function hl(t,e){try{let r=getComputedStyle(t,"::selection").backgroundColor;if(r&&!ji.has(r)&&r!==e.backgroundColor)return r}catch{}return Vr}function Gi(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let r=null,i=null;try{r=t.selectionStart,i=t.selectionEnd}catch{return}if(r==null||i==null||r===i)return;let o=t.value||"";if(t.localName==="input"&&t.type==="password"&&(o="\u2022".repeat(o.length)),!o)return;let s=getComputedStyle(t),a=t.localName==="textarea",c=_n(s.paddingLeft),f=_n(s.paddingTop),l=t.clientWidth-c-_n(s.paddingRight),u=t.clientHeight-f-_n(s.paddingBottom),p=n.createElement("div");p.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let g of pl)p.style.setProperty(g,s.getPropertyValue(g));a?(p.style.whiteSpace="pre-wrap",p.style.overflowWrap="break-word",p.style.width=`${Math.max(0,l)}px`):p.style.whiteSpace="pre";let h=n.createElement("span");h.textContent=o.slice(r,i),p.append(n.createTextNode(o.slice(0,r)),h,n.createTextNode(o.slice(i))),n.body.appendChild(p);let m=[];try{let g=p.getBoundingClientRect(),y=-t.scrollLeft,b=-t.scrollTop;if(!a){b+=Math.max(0,(u-g.height)/2);let S=s.direction==="rtl",k=s.textAlign;k==="start"?k=S?"right":"left":k==="end"&&(k=S?"left":"right");let v=l-g.width;v>0&&(k==="right"?y+=v:k==="center"&&(y+=v/2))}for(let S of h.getClientRects())S.width<=0||S.height<=0||m.push({x:c+(S.left-g.left)+y,y:f+(S.top-g.top)+b,width:S.width,height:S.height})}finally{p.remove()}if(m.length===0)return;let d=hl(t,s);e.__snapdomFieldSelection={images:m.map(()=>`linear-gradient(${d},${d})`),positions:m.map(g=>`${g.x}px ${g.y}px`),sizes:m.map(g=>`${g.width}px ${g.height}px`),repeats:m.map(()=>"no-repeat"),origins:m.map(()=>"padding-box"),clips:m.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function Xi(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:r,positions:i,sizes:o,repeats:s,origins:a,clips:c,base:f}=n,l=e.style.backgroundImage||f.image;l&&l!=="none"?(r.push(l),i.push(e.style.backgroundPosition||f.position),o.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),c.push(e.style.backgroundClip||f.clip)):(r.push("linear-gradient(transparent,transparent)"),i.push("0% 0%"),o.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),c.push(f.clip||"border-box")),e.style.backgroundImage=r.join(","),e.style.backgroundPosition=i.join(","),e.style.backgroundSize=o.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=c.join(",")}}wt();var qr=new Map,Yi=new Set(["IFRAME"]);function Me(t,e){qr.set(String(t).toUpperCase(),e)}function En(t){let e=W(t),n=e.display;if(n==="none")return null;let r=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),i=h=>parseFloat(h)||0,o=(h,m,d,g,y)=>{if(!r||!h?.endsWith("px"))return null;let b=parseFloat(h);if(!Number.isFinite(b)||b<0)return null;if(e.boxSizing==="border-box")return b;let S=g-y-d;return b+m+d+(S>0&&b+m<y+S/2?S:0)},[s,a,c,f]=/scroll|auto/.test(e.overflow)?[t.offsetWidth,t.clientWidth,t.offsetHeight,t.clientHeight]:[0,0,0,0],l=o(e.width,i(e.paddingLeft)+i(e.paddingRight),i(e.borderLeftWidth)+i(e.borderRightWidth),s,a),u=o(e.height,i(e.paddingTop)+i(e.paddingBottom),i(e.borderTopWidth)+i(e.borderBottomWidth),c,f);if(l===null||u===null){let{width:h,height:m}=mt(t),d=h,g=m;if(l===null&&!d||u===null&&!g){let y=t.getBoundingClientRect();d||=y.width||0,g||=y.height||0}l??=d,u??=g}let p=document.createElement("div");return p.style.cssText=`display:${n==="inline"?"inline-block":n};box-sizing:border-box;width:${l}px;height:${u}px;visibility:hidden;`,p}var ml=new Set(["style","option","optgroup"]),Rn=200,gl=new Set(["img","canvas","video","iframe","object","embed"]);function Ki(t,e){return t.right>=e.left-Rn&&t.left<=e.right+Rn&&t.bottom>=e.top-Rn&&t.top<=e.bottom+Rn}function yl(t,e){if(t===e.root)return!1;let n;try{n=t.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=W(t);if(r.display==="inline"&&!gl.has((t.localName||"").toLowerCase()))return!1;let i=e.rect,o=t.scrollWidth||0,s=t.scrollHeight||0,a={left:r.direction==="rtl"?Math.min(n.left,n.right-o):n.left,top:n.top,right:Math.max(n.right,n.left+o),bottom:Math.max(n.bottom,n.top+s)},c=r.writingMode||"";if((c.startsWith("vertical")||c.startsWith("sideways"))&&(a.top=Math.min(n.top,n.bottom-s),a.left=Math.min(a.left,n.right-o)),Ki(a,i))return!1;let f=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;f.nextNode();){let l=f.currentNode.getBoundingClientRect();if((l.width>0||l.height>0)&&Ki(l,i))return!1}return!0}function bl(t,e,n){let r=t.cloneNode(!1);t.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),lt(t,r,e,n);let{width:i,height:o}=mt(t);i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden";let s=t.parentElement?W(t.parentElement).display:"",a=W(t).position;if(!/flex|grid|table/.test(s)&&(a==="static"||a==="relative")){let c=p=>{let h=W(p);return h.display!=="none"&&h.position!=="absolute"&&h.position!=="fixed"},f=t.getBoundingClientRect(),l=t.previousElementSibling;for(;l&&!c(l);)l=l.previousElementSibling;if(l){let p=f.top-l.getBoundingClientRect().bottom;p>=0&&(r.style.marginTop=`${p}px`)}let u=t.nextElementSibling;for(;u&&!c(u);)u=u.nextElementSibling;if(u){let p=u.getBoundingClientRect().top-f.bottom;p>=0&&(r.style.marginBottom=`${p}px`)}}return r.style.boxSizing="border-box",r}async function Yt(t,e,n){if(!t)throw new Error("Invalid node");e.slicer?.due()&&await e.slicer.pause();let r=new Set,i=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let l=(t.localName||t.tagName||"").toLowerCase(),u=jt(t);if(u&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&u||Mr.has(l))return null;if(l==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return D(e,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(l==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let l=qi(t,e.selection);if(l)return l}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return En(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let l of n.exclude)try{if(t.matches?.(l)){if(n.excludeMode==="hide")return En(t);if(n.excludeMode==="remove")return null}}catch(u){console.warn(`Invalid selector in exclude option: ${l}`,u)}if(n.excludePredicates)for(let l of n.excludePredicates)try{if(l(t))return n.excludeMode==="remove"?null:En(t)}catch(u){console.warn("Error in exclude predicate:",u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return En(t);if(n.filterMode==="remove")return null}}catch(l){console.warn("Error in filter function:",l)}if(t!==n.element&&!ml.has(t.localName)&&!Nt(t)&&W(t).display==="none"){let l=t.cloneNode(!1);t.tagName==="IMG"&&(l.removeAttribute("src"),l.removeAttribute("srcset")),l.style.setProperty("display","none","important");for(let u of t.querySelectorAll("style")){let p=await Yt(u,e,n);p&&l.appendChild(p)}return l}if(e.clip&&yl(t,e.clip))return bl(t,e,n);if(n.__resolveNodeHooks)for(let l of n.__resolveNodeHooks){let u;try{u=await l(t,n)}catch(p){D(e,"resolveNode plugin hook failed",p)}if(u===null)return null;if(u?.nodeType)return u.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(u,t),lt(t,u,e,n)),u}{let l=Yi.has(t.tagName)&&qr.get(t.tagName);if(l){let u=await l(t,e,n);if(u!==void 0)return u}}if(t.getAttribute("data-capture")==="placeholder"){let l=t.cloneNode(!1);e.nodeMap.set(l,t),lt(t,l,e,n);let u=document.createElement("div");return u.textContent=t.getAttribute("data-placeholder-text")||"",u.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",l.appendChild(u),l}{let l=!Yi.has(t.tagName)&&qr.get(t.tagName);if(l){let u=await l(t,e,n);if(u!==void 0)return u}}let s;try{if(s=t.cloneNode(!1),Ri(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){Wi(t,s,n);try{let l=window.getComputedStyle(t),u=parseFloat(l.width),p=parseFloat(l.height);if(!(u>0)||!(p>0)){let d=mt(t),g=b=>parseFloat(l.getPropertyValue(b))||0,y=l.getPropertyValue("box-sizing")==="border-box";u>0||(u=d.width-(y?0:g("padding-left")+g("padding-right")+g("border-left-width")+g("border-right-width"))),p>0||(p=d.height-(y?0:g("padding-top")+g("padding-bottom")+g("border-top-width")+g("border-bottom-width")))}let h=Math.round((u||0)*1e3)/1e3,m=Math.round((p||0)*1e3)/1e3;h&&(s.dataset.snapdomWidth=String(h)),m&&(s.dataset.snapdomHeight=String(m))}catch(l){D(e,"getUnscaledDimensions for IMG failed",l)}try{let l=t.getAttribute("style")||"",u=window.getComputedStyle(t),p=S=>{let k=l.match(new RegExp(`${S}\\s*:\\s*([^;]+)`,"i")),v=k?k[1].trim():u.getPropertyValue(S);return/%|auto/i.test(String(v||""))},h=parseFloat(s.dataset.snapdomWidth||"0")||0,m=parseFloat(s.dataset.snapdomHeight||"0")||0,d=p("width")||!(h>0),g=p("height")||!(m>0);d&&h>0&&(s.style.width=`${h}px`),g&&m>0&&(s.style.height=`${m}px`);let y=u.getPropertyValue("object-fit"),b=u.getPropertyValue("object-position");y&&y!=="fill"?(s.style.objectFit=y,b&&(s.style.objectPosition=b)):(h>0&&(s.style.minWidth=`${h}px`),m>0&&(s.style.minHeight=`${m}px`))}catch(l){D(e,"IMG dimension freeze failed",l)}}}catch(l){throw console.error("[Snapdom] Failed to clone node:",t,l),l}let a=null;if(rt(t,"textarea")){let{width:l,height:u}=mt(t),p=l||t.getBoundingClientRect().width||0,h=u||t.getBoundingClientRect().height||0;p&&(s.style.width=`${p}px`),h&&(s.style.height=`${h}px`)}if(rt(t,"input")){let l=(t.type||"text").toLowerCase();if((l==="checkbox"||l==="radio")&&(Rt()||t.indeterminate)){let{el:p,applyVisual:h}=zi(t);e.nodeMap.set(p,t),a=h,s=p}else if(l==="range"&&(Rt()||X())){let{el:p,applyVisual:h}=Hi(t);e.nodeMap.set(p,t),a=h,s=p}else if(l==="color"&&X()){let p=s,h=t.value||"#000000";a=()=>{p.style.setProperty("background-color",h,"important"),p.style.setProperty("color","transparent","important"),p.style.setProperty("-webkit-text-fill-color","transparent","important"),p.style.setProperty("appearance","none","important"),p.style.setProperty("-webkit-appearance","none","important")},p.removeAttribute("value")}else if((l==="date"||l==="time"||l==="datetime-local")&&(Rt()||X())){s.setAttribute("type","text");let p=t.value;l==="date"&&t.valueAsDate&&(p=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=p,s.setAttribute("value",p)}else{let p=qe(t)?wr(t.value):t.value;s.value=p,s.setAttribute("value",p),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((rt(t,"input")||rt(t,"textarea"))&&!t.value&&t.placeholder)try{let l=window.getComputedStyle(t,"::placeholder"),u=l&&l.color;if(u&&u!=="rgba(0, 0, 0, 0)"){let p="snapdom-ph-"+(Math.random()*1e6|0);s.classList.add(p);let h=document.createElement("style");h.textContent=`.${p}::placeholder{color:${u}!important;opacity:${l.opacity||"1"}!important;-webkit-text-fill-color:${u}!important;}`,s.prepend(h)}}catch{}if(rt(t,"select")&&(i=new Set(Array.from(t.options).filter(l=>l.selected))),rt(t,"textarea")&&(o=t.value),rt(t,"input")||rt(t,"textarea")||rt(t,"select")){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let l=t;l.min!==void 0&&l.min!==""&&s.setAttribute("min",l.min),l.max!==void 0&&l.max!==""&&s.setAttribute("max",l.max),l.pattern!==void 0&&l.pattern!==""&&s.setAttribute("pattern",l.pattern);let u=t.getAttribute("aria-invalid");u!==null&&s.setAttribute("aria-invalid",u)}if(Cn(t)||lt(t,s,e,n),a&&a(),n.captureSelection&&(rt(t,"input")||rt(t,"textarea")))try{Gi(t,s)}catch(l){D(e,"inlineTextFieldSelection failed",l)}if(Nt(t)&&!Cn(t)){let l=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let u=window.getComputedStyle(t);for(let p of l){let h=u.getPropertyValue(p);h&&s.style.setProperty(p,h)}}catch{}}if(t.shadowRoot){Br(t.shadowRoot);try{let b=t.shadowRoot.querySelectorAll("slot");for(let S of b){let k=S.assignedNodes?.()||[];for(let v of k)r.add(v)}}catch{}let l=Ni(e),u=`[data-sd="${l}"]`;e.shadowScopes||=new WeakMap,e.shadowScopes.set(t.shadowRoot,l);try{s.setAttribute("data-sd",l)}catch{}let p=Li(t.shadowRoot);!e.__shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(p)&&(e.__shadowPseudo=!0);let h=Pi(p,u,l),m=Oi(p),d=Di(t,m,u);Ii(s,d+h,l);let g=document.createDocumentFragment(),y=await Promise.all(Array.from(t.shadowRoot.childNodes).map(b=>b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE"?null:Yt(b,e,n).catch(()=>null)));g.append(...y.filter(b=>!!b)),s.appendChild(g)}if(t.tagName==="SLOT"){let l=e.shadowScopes?.get(t.getRootNode()),u=t.assignedNodes?.()||[],p=u.length?t.assignedNodes?.({flatten:!0})||u:[],h=p.length?p:Array.from(t.childNodes),m=document.createDocumentFragment(),d=await Promise.all(h.map(g=>Yt(g,e,n).then(y=>(y&&u.length&&Bi(y,l),y||null)).catch(()=>null)));return m.append(...d.filter(g=>!!g)),m}let c=l=>r.has(l)||t.shadowRoot&&!l.assignedSlot,f=await Promise.all(Array.from(t.childNodes).map(l=>c(l)?null:Yt(l,e,n).catch(()=>null)));if(s.append(...f.filter(l=>!!l)),i&&rt(s,"select")){let l=!1;for(let u of s.options){let p=i.has(e.nodeMap.get(u));u.selected=p,p?u.setAttribute("selected",""):u.removeAttribute("selected"),l||=p}if(!l&&!s.multiple){let u=s.ownerDocument.createElement("option");u.hidden=!0,u.style.setProperty("display","none","important"),u.setAttribute("selected",""),u.value="",s.appendChild(u)}}return o!==null&&rt(s,"textarea")&&(s.textContent=o),s}async function wl(t,e,n){let r=!1;try{r=!!(t.contentDocument||t.contentWindow?.document)}catch(i){D(e,"iframe same-origin probe failed",i)}if(r)try{return await jr(t,e,n)}catch(i){console.warn("[SnapDOM] iframe rasterization failed, fallback:",i)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",t),n.placeholders){let{width:i,height:o}=mt(t),s=document.createElement("div");return s.style.cssText=`width:${i}px;height:${o}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,lt(t,s,e,n),s}else{let{width:i,height:o}=mt(t),s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${i}px;height:${o}px;visibility:hidden;`,lt(t,s,e,n),s}}function on(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),r=document.createElement("canvas");r.width=e,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(t,0,0,e,n);let o=i.getImageData(0,0,e,n).data;for(let s=3;s<o.length;s+=4)if(o[s]!==0)return!1;return!0}catch{return!1}}var Sl=.95;function xl(t,e,n){try{let r=t.getImageData(0,0,e,n).data;for(let i=3;i<r.length;i+=4)if(r[i]!==255)return!1;return!0}catch{return!1}}async function vl(t,e,n){let r="";try{let a=on(t);a&&(await pt(),a=on(t));let c=null;if(!a){c=t.getContext("2d",{willReadFrequently:!0});try{c&&c.getImageData(0,0,1,1)}catch{}X()&&await pt()}if(r=t.toDataURL("image/png"),!r||r==="data:,"){try{c&&c.getImageData(0,0,1,1)}catch{}if(await pt(),r=t.toDataURL("image/png"),!r||r==="data:,"){let f=document.createElement("canvas");f.width=t.width,f.height=t.height;let l=f.getContext("2d");l&&(l.drawImage(t,0,0),r=f.toDataURL("image/png"))}}}catch(a){D(e,"Canvas toDataURL failed, using empty/fallback",a)}n&&n.debug&&r&&on(t)&&D(e,"canvas is empty at capture time \u2014 capture it after its first frame is drawn",t);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(a){D(e,"img decoding/loading hints failed",a)}r&&(i.src=r),i.width=t.width,i.height=t.height;let{width:o,height:s}=mt(t);return o>0&&(i.style.width=`${o}px`),s>0&&(i.style.height=`${s}px`),e.nodeMap.set(i,t),lt(t,i,e,n),i}async function kl(t,e,n){let r="",i=t.poster&&t.paused&&!t.currentTime&&!t.played.length,o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}if(!i)try{let c=document.createElement("canvas");c.width=t.videoWidth||t.offsetWidth||320,c.height=t.videoHeight||t.offsetHeight||240;let f=c.getContext("2d");f&&(f.drawImage(t,0,0,c.width,c.height),r=c.toDataURL(xl(f,c.width,c.height)?"image/jpeg":"image/png",Sl),(!r||r==="data:,")&&(r=""))}catch(c){D(e,"Video frame capture failed, using poster fallback",c)}r?o.src=r:t.poster&&(o.src=t.poster),o.width=t.videoWidth||t.offsetWidth||0,o.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=mt(t);return s>0&&(o.style.width=`${s}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",e.nodeMap.set(o,t),lt(t,o,e,n),o}async function Cl(t,e,n){if(!t.controls)return;let{width:r,height:i}=mt(t),o=Math.round(r||t.offsetWidth||300),s=Math.round(i||t.offsetHeight||54),a=s/2,c=Math.max(4,s*.16),f=s*.34,l=o-s*.34,u=f+c+s*.55,p=Math.max(0,l-s*.7-u),h=Math.max(9,Math.round(s*.24)),m=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${s}" viewBox="0 0 ${o} ${s}"><rect width="${o}" height="${s}" rx="${Math.min(s/2,10)}" fill="#f1f3f4"/><path d="M ${f} ${a-c} L ${f+c} ${a} L ${f} ${a+c} Z" fill="#5f6368"/><rect x="${u}" y="${a-1.5}" width="${p}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${u}" cy="${a}" r="${Math.max(3,s*.09)}" fill="#5f6368"/><text x="${l}" y="${a}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,d=document.createElement("img");try{d.decoding="sync",d.loading="eager"}catch{}return d.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,d.width=o,d.height=s,d.style.width=`${o}px`,d.style.height=`${s}px`,e.nodeMap.set(d,t),lt(t,d,e,n),d}async function Qi(t,e,n){let r=t.getAttribute("data")||t.getAttribute("src")||"",i=(t.getAttribute("type")||"").toLowerCase(),o=/^image\//.test(i)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(r);if(r&&o){let a=document.createElement("img");try{a.decoding="sync",a.loading="eager"}catch{}a.src=r;let{width:c,height:f}=mt(t);return c>0&&(a.style.width=`${c}px`),f>0&&(a.style.height=`${f}px`),e.nodeMap.set(a,t),lt(t,a,e,n),a}let s=null;try{s=t.contentDocument}catch{}if(s)try{let a=await jr(t,e,n);if(a)return a}catch{}r&&console.warn(`[snapdom] <${t.localName}> content could not be captured (${i||"unknown type"}): rendering its fallback children`)}Me("IFRAME",wl);Me("CANVAS",vl);Me("VIDEO",kl);Me("AUDIO",Cl);Me("OBJECT",Qi);Me("EMBED",Qi);ht();bt();ye();dt();wt();var Al=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],_e=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function Ml(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ji(t){let e=Array.isArray(t)?t:t?[t]:[],n=[];for(let r of e)r instanceof RegExp?n.push(r):typeof r=="string"?n.push(new RegExp(Ml(r),"i")):console.warn("[snapdom] Ignored invalid iconFont value:",r);return n}function Mt(t,e){let n=typeof t=="string"?t:"";for(let r of Al)if(r.test(n))return!0;if(e){for(let r of e)if(r instanceof RegExp&&r.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function Gr(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return Mt(t,e)}let r=n.searchParams.getAll("family").flatMap(i=>i.split("|")).map(i=>i.split(":")[0].trim()).filter(Boolean);return r.length?r.every(i=>Mt(i,e)):Mt(t,e)}function _l(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Fn=new Map;function El(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,i;for(;i=r.exec(n);)e[i[1].toUpperCase()]=Number(i[2]);return e}async function Rl(t,e,n){let r=String(t||""),i=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),c="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?c="rounded":/\bsharp\b/.test(o)?c="sharp":/\boutlined\b/.test(o)&&(c="outlined");let f=a===1,l=null;if(f&&(c==="outlined"&&_e.materialIconsFilled?l={url:_e.materialIconsFilled,alias:"snapdom-mi-filled"}:c==="rounded"&&_e.materialIconsRound?l={url:_e.materialIconsRound,alias:"snapdom-mi-round"}:c==="sharp"&&_e.materialIconsSharp&&(l={url:_e.materialIconsSharp,alias:"snapdom-mi-sharp"})),!l)return{familyForMeasure:r,familyForCanvas:r};if(!Fn.has(l.alias))try{let p=new FontFace(l.alias,`url(${l.url})`,{style:"normal",weight:"400"});await p.load(),document.fonts.add(p),Fn.set(l.alias,!0)}catch{return Fn.set(l.alias,!1),{familyForMeasure:r,familyForCanvas:r}}if(Fn.get(l.alias)===!1)return{familyForMeasure:r,familyForCanvas:r};let u=`"${l.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Fl(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Tl(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let r=t.color?.trim();return r&&r!=="inherit"?r:"#000"}async function $l(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),c=window.devicePixelRatio||1,f=El(o),{familyForMeasure:l,familyForCanvas:u}=await Rl(a,s,f);await Fl(u.replace(/^["']+|["']+$/g,""),r);let p=document.createElement("span");J(p),p.textContent=t,p.style.position="absolute",p.style.visibility="hidden",p.style.left="-99999px",p.style.whiteSpace="nowrap",p.style.fontFamily=l,p.style.fontWeight=String(n||"normal"),p.style.fontSize=`${r}px`,p.style.lineHeight="1",p.style.margin="0",p.style.padding="0",p.style.fontFeatureSettings="'liga' 1",p.style.fontVariantLigatures="normal",p.style.color=i,document.body.appendChild(p);let h=p.getBoundingClientRect(),m=Math.max(1,Math.ceil(h.width)),d=Math.max(1,Math.ceil(h.height));document.body.removeChild(p);let g=document.createElement("canvas");g.width=m*c,g.height=d*c;let y=g.getContext("2d");y.scale(c,c),y.font=`${n?`${n} `:""}${r}px ${u}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(t,0,0),{dataUrl:g.toDataURL(),width:m,height:d}}async function Tn(t,e,n=new Map){if(t?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(t.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t),i.length===0)return 0;let o=e?.nodeType===1?Array.from(e.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e);let s=0;for(let a=0;a<i.length;a++){let c=i[a],f=n&&n.get(c)||o[a]||null;try{let l=getComputedStyle(f||c),u=l.fontFamily||"Material Icons";if(!_l(u))continue;let p=(f||c).textContent.trim();if(!p)continue;let h=parseInt(l.fontSize,10)||24,m=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",d=Tl(l),g=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",y=(f||c).className||"",{dataUrl:b,width:S,height:k}=await $l(p,{family:u,weight:m,fontSize:h,color:d,variation:g,className:y});c.textContent="";let v=c.ownerDocument.createElement("img");v.src=b,v.alt=p,v.style.height=`${h}px`,v.style.width=`${Math.max(1,Math.round(S/k*h))}px`,v.style.objectFit="contain",v.style.verticalAlign=getComputedStyle(c).verticalAlign||"baseline",c.appendChild(v),s++}catch{}}return s}de();St();wt();async function ns(t,e,n,r=32,i="#000",o="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");J(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=o||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let c=a.getBoundingClientRect(),f=Math.ceil(c.width),l=Math.ceil(c.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,l*s);let p=u.getContext("2d");return p.scale(s,s),p.font=`${o||"normal"} ${n||"normal"} ${r}px "${e}"`,p.textAlign="left",p.textBaseline="top",p.fillStyle=i,p.fillText(t,0,0),{dataUrl:u.toDataURL(),width:f,height:l}}var rs=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Pl=["katex","mathjax","mathml"];function Kr(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!rs.has(n.toLowerCase()))return n}return""}function Nl(t){if(!t)return[];let e=[];for(let n of t.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(rs.has(r.toLowerCase())||e.push(r))}return e}function $n(t){let e=String(t??"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Pn(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Ll(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function Il(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let i=$n(n[1]),o=$n(n[2]);return{min:Math.min(i,o),max:Math.max(i,o)}}let r=$n(e);return{min:r,max:r}}function Wl(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Ol(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),s=parseFloat(n[2]);return{min:Math.min(o,s),max:Math.max(o,s)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}function Dl(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Bl(t,e,n=[]){if(!t)return!1;try{let r=new URL(t,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(c=>o.endsWith(c))||n.some(c=>o===c.toLowerCase()||o.endsWith("."+c.toLowerCase())))return!0;let a=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||Pl.some(c=>a.includes(c)))return!0;for(let c of e){let f=c.toLowerCase().replace(/\s+/g,"+"),l=c.toLowerCase().replace(/\s+/g,"-"),u=Dl(c);if(a.includes(f)||a.includes(l)||u&&a.includes(u))return!0}return!1}catch{return!1}}function Ul(t){let e=new Set;for(let n of t||[]){let r=String(n).split("__")[0]?.trim();r&&e.add(r)}return e}function Zi(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,i)=>{let o=(i||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let s=o;try{s=new URL(o,e||location.href).href}catch{}return`url("${s}")`})}var os=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Nn=4;async function Hl(t,e,n){if(!t)return t;let r=new Set;function i(a,c){try{return new URL(a,c||location.href).href}catch{return a}}async function o(a,c,f=0){if(f>Nn)return console.warn(`[snapDOM] @import depth exceeded (${Nn}) at ${c}`),a;let l="",u=0,p,h=new RegExp(os.source,"g");for(;p=h.exec(a);){l+=a.slice(u,p.index),u=h.lastIndex;let m=(p[2]||p[4]||"").trim(),d=i(m,c);if(r.has(d)){console.warn(`[snapDOM] Skipping circular @import: ${d}`);continue}r.add(d);let g="";try{let y=await it(d,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(g=y.data)}catch{}g?(g=Zi(g,d),g=await o(g,d,f+1),l+=`
8
+ `}return o}function Xe(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let i of e)n.set(i,`c${r++}`);return n}function Ac(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===e)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function W(t,e=null){let n=()=>{let o={length:0,getPropertyValue:()=>"",item:()=>""};return o[Symbol.iterator]=function*(){},o};if(t?.nodeType!==1){let o=typeof window<"u"?window:null;if(o&&typeof o.getComputedStyle=="function")try{return o.getComputedStyle(t,e)||n()}catch{return n()}return n()}let r=N.computedStyle.get(t);r||(r=new Map,N.computedStyle.set(t,r));let i=r.get(e);if(!i){let o=Ac(t),s=null;try{s=o&&typeof o.getComputedStyle=="function"?o.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),r.set(e,i)}return i}function be(t,e=null){let n={};for(let r of e||t){let i=t.getPropertyValue(r);i&&(n[r]=i)}for(let r of Mc){let i=n[`border-${r}-style`],o=n[`border-${r}-width`];(i==="none"||i==="hidden"||o==="0px")&&(delete n[`border-${r}-style`],delete n[`border-${r}-width`],delete n[`border-${r}-color`])}return n}function Vt(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,i).trim()),r=i+1)}return e.push(t.slice(r).trim()),e}var Mr,Ge,mc,gc,yc,ci,bc,li,wc,Sc,xc,vc,kc,Cc,Mc,we=ct(()=>{"use strict";dt();bn();xt();Mr=new Set(["meta","script","noscript","title","link","template"]),Ge=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);mc=/(?:^|-)(animation|transition)(?:-|$)/i,gc=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,yc=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),ci=new Map;bc=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),li=new Set(["table","thead","tbody","tfoot","tr","td","th"]),wc=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Sc=new Set(["width","max-width","inline-size","max-inline-size"]),xc=new Set(["min-width","min-inline-size"]),vc=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));kc=.001;Cc=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Mc=["top","right","bottom","left"]});function pt(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,r=()=>{n||(n=!0,e())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,t)})}function di(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?_c:ui),n=null,r={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let o=()=>{n=null,r.yielded=!0,e=performance.now()+ui,i()},s=new MessageChannel;s.port1.onmessage=o,s.port2.postMessage(0)}))};return r}function Ye(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function X(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),i=/mobile/i.test(t),o=!/safari/i.test(t),s=r&&i&&o,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&r;return n||s||a||c||f}function ht(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var ui,_c,vt=ct(()=>{"use strict";ui=16,_c=40});function D(t,e,n){let r=t&&typeof t=="object"&&(t.options||t);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",e,n):console.warn("[snapdom]",e))}function kt(t,e,n,r){let i=t&&t.warnings;i&&i.length<Ec&&i.push(r===void 0?{code:e,message:n}:{code:e,message:n,detail:r})}var Ec,ee=ct(()=>{"use strict";Ec=50});var mt=ct(()=>{"use strict";ti();we();vt();St();ee()});var Da={};je(Da,{decodeSvgFromDataURL:()=>un,encodeSvgToDataURL:()=>dn,fixSafariShadows:()=>dr,toCanvas:()=>fe});function td(t,e){try{let n=t.match(/<svg\b[^>]*>/i);if(!n)return t;let r=n[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(o)||i<=0||o<=0)return t;let s=Math.min(1,Qt/i,Qt/o,Math.sqrt(Oo/(i*o)));if(s>=1)return t;let a=Math.max(1,Math.floor(i*s)),c=Math.max(1,Math.floor(o*s));return kt(e,"raster-clamp",`capture ${Math.round(i)}x${Math.round(o)}px exceeds decode limits; downscaled to ${a}x${c}px`),console.warn(`[snapDOM] Capture ${Math.round(i)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${Qt}px/side); downscaling to ${a}\xD7${c}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${c}`))}catch{return t}}function ed(t,e){let n=["x","y","width","height"].map(w=>Number(e?.[w]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=t.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],s=String(o||"").trim().split(/[\s,]+/).map(Number);if(s.length!==4||!s.every(Number.isFinite)||s[2]<=0||s[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[a,c,f,l]=s,u=Math.max(a,n[0]),p=Math.max(c,n[1]),h=Math.min(a+f,n[0]+n[2]),m=Math.min(c+l,n[1]+n[3]);if(!(h>u)||!(m>p))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let d=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(d)&&d>0?d/f:1,b=Number.isFinite(g)&&g>0?g/l:1,S=Math.max(1,(h-u)*y),k=Math.max(1,(m-p)*b),v=i.replace(/(\bwidth=")[^"]*/i,`$1${S}`).replace(/(\bheight=")[^"]*/i,`$1${k}`).replace(/(\bviewBox=")[^"]*/i,`$1${u} ${p} ${h-u} ${m-p}`);return t.replace(i,v)}function Lo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function un(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function nd(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function dn(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function Wa(t){let e=[],n="",r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function rd(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("&&r++,s===")"&&(r=Math.max(0,r-1)),s===","&&r===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let o of e){if(/\binset\b/i.test(o))continue;let s=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",c="0px",f="0px"]=s;f=`${parseFloat(f)/2}px`;let l=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!l&&l!==",";i.push(`drop-shadow(${a} ${c} ${f}${u?` ${l}`:""})`)}return i.join(" ")}function Oa(t){let e=Wa(t),n=null,r=null,i=null,o=[];for(let a of e){let c=a.indexOf(":");if(c<0)continue;let f=a.slice(0,c).trim().toLowerCase(),l=a.slice(c+1).trim();f==="box-shadow"?i=l:f==="filter"?n=l:f==="-webkit-filter"?r=l:o.push([f,l])}if(i){let a=rd(i);a&&(n=n?`${n} ${a}`:a,r=r?`${r} ${a}`:a)}let s=[...o];return n&&s.push(["filter",n]),r&&s.push(["-webkit-filter",r]),s.map(([a,c])=>`${a}:${c}`).join(";")}function od(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${Oa(r)}}`)}function id(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,od(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${Oa(r)}${n}`),t}function sd(){return lr||(lr=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(e,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),lr)}function ad(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("?n++:o===")"?n=Math.max(0,n-1):o===","&&n===0&&(e.push(t.slice(r,i)),r=i+1)}return e.push(t.slice(r)),e.map(i=>{let o=0,s=0,a="",c=0;for(;c<i.length;){let f=i[c];if(f==="("?o++:f===")"&&(o=Math.max(0,o-1)),o===0&&(c===0||i[c-1]===" ")){let l=/^-?\d*\.?\d+px/.exec(i.slice(c));if(l){s++,a+=s===2?`${-parseFloat(l[0])}px`:l[0],c+=l[0].length;continue}}a+=f,c++}return a}).join(",")}function cd(t,e){let n=r=>Wa(r).map(i=>{let o=i.indexOf(":");if(o<0)return i;let s=i.slice(0,o).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${ad(i.slice(o+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,i)=>r.replace(i,i.replace(/([^{}]+)\{([^}]*)\}/g,(o,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(r,i,o)=>`style=${i}${n(o)}${i}`),t}async function dr(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:r}=await sd();try{let i=t;return n||(i=id(i)),r&&(i=cd(i,n)),{svg:i,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}function ld(){let t=document.createElement("canvas");t.width=16,t.height=16;let e=t.getContext("2d",{willReadFrequently:!0});return e?n=>{e.clearRect(0,0,16,16),e.drawImage(n,0,0,16,16);let r=e.getImageData(0,0,16,16).data;for(let i=3;i<r.length;i+=4)if(r[i]>0)return!0;return!1}:null}async function fd(t,e,n){J(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await fr(),await fr(),!1;let r=performance.now()+(e?600:150);for(;;){let i;try{i=n(t)}catch{return!1}if(i)return!0;if(performance.now()>r)return!1;await fr()}}finally{try{t.remove()}catch{}}}function Na(t){if(typeof document>"u"||!document.body)return new Image;if(Pt&&!Pt.contentDocument){try{Pt.remove()}catch{}Pt=null}if(Pt&&Io>ud&&ur===0){try{Pt.remove()}catch{}Pt=null}if(!Pt){let n=document.createElement("iframe");J(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)Pt=n,Io=0;else{try{n.remove()}catch{}return new Image}}Io+=t.length,ur+=1;let e=Pt.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function Wo(t){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,ur=Math.max(0,ur-1))}function La(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function gd(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),r=0,i=0;for(let o=e;o+48<=t.length;o+=n){let s=t.slice(o,o+48);r++,md.some(a=>s.includes(a))||i++}return i*2>r}function Ia(t,e,n,r,i){if(!e.naturalWidth){t.drawImage(e,0,0,n,r);return}let o=n*r,s=o>dd&&!gd(i)?Math.min(hd,Math.ceil(o/pd)):1;if(s===1){t.drawImage(e,0,0,n,r);return}let a=e.naturalWidth,c=e.naturalHeight/r;for(let f=0;f<s;f++){let l=Math.round(f*r/s),u=f===s-1?r:Math.round((f+1)*r/s);t.drawImage(e,0,l*c,a,(u-l)*c,0,l,n,u-l)}}async function fe(t,e){let{width:n,height:r,scale:i=1,dpr:o=1,meta:s={},backgroundColor:a,crop:c=null}=e,f=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,l=t,u=!1,p=!1;if(c&&!Lo(t))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(Lo(t)){let m=(nd(t).match(/<svg\b[^>]*>/i)||[])[0]||"",d=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(d)&&Number.isFinite(g)&&d>0&&g>0&&Math.min(1,Qt/d,Qt/g,Math.sqrt(Oo/(d*g)))<1;if(c||y||X())try{let b=un(t);if(c&&(b=ed(b,c)),X()){let S=await dr(b);b=S.svg,u=S.naturalOnly,p=/@font-face|data:image\//i.test(b)}(y||c)&&(b=td(b,e.__session)),l=dn(b)}catch(b){if(c)throw b;l=t}}let h=f||Na(l);try{f||await La(h,l)}catch(m){if(!h.__snapdomDecodeFrame)throw m;Wo(h),h=Na(l);try{await La(h,l)}catch(d){throw Wo(h),d}}try{!f&&!X()&&!ht()&&Lo(l)&&/(?:%40|@)font-face/i.test(l)&&await new Promise($=>{let O=new MessageChannel;O.port1.onmessage=()=>{O.port1.close(),O.port2.close(),$()},O.port2.postMessage(0)});let m=X()&&!f?ld():null,d=!1;m&&(d=await fd(h,p,m));let g=f?f.width:h.naturalWidth,y=f?f.height:h.naturalHeight,b=c?g:Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:g,S=c?y:Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:y,k,v,w=Number.isFinite(n),C=Number.isFinite(r);if(w&&C)k=Math.max(1,n),v=Math.max(1,r);else if(w){let $=n/Math.max(1,b);k=n,v=S*$}else if(C){let $=r/Math.max(1,S);v=r,k=b*$}else{let $=f&&Number.isFinite(s.vbW)&&Number.isFinite(s.vbH);k=$?s.vbW:g,v=$?s.vbH:y}!w&&!C&&(k=k*i,v=v*i);let A=k*o,M=v*o,x=Math.max(A/Qt,M/Qt,Math.sqrt(A*M/Oo));x>1&&(kt(e.__session,"canvas-clamp",`output ${Math.round(A)}x${Math.round(M)}px exceeds canvas limits; downscaled`),console.warn(`[snapDOM] Output ${Math.round(A)}\xD7${Math.round(M)}px exceeds the browser canvas limit (${Qt}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),k/=x,v/=x);let _=At(e.canvas)&&rt(e.canvas,"canvas")?e.canvas:document.createElement("canvas");_.width=Math.max(1,k*o),_.height=Math.max(1,v*o),_.style.width=`${k}px`,_.style.height=`${v}px`;let R=_.getContext("2d");if(!R)throw new Error("[snapdom] toCanvas: the target canvas has no 2d context");let T=()=>{if(o!==1&&R.scale(o,o),a&&(R.save(),R.fillStyle=a,R.fillRect(0,0,k,v),R.restore()),u&&(Math.round(k*o)!==g||Math.round(v*o)!==y)){let $=document.createElement("canvas");$.width=g,$.height=y,Ia($.getContext("2d"),h,g,y,l),R.drawImage($,0,0,k,v)}else R.save(),R.setTransform(1,0,0,1,0,0),Ia(R,h,k*o,v*o,l),R.restore()};if(T(),m&&d&&p){let $=!0;try{$=m(h)}catch{}if(!$){let O=performance.now()+600;do{await fr();try{$=m(h)}catch{break}}while(!$&&performance.now()<O);_.width=_.width,T()}}return _}finally{Wo(h)}}var Qt,Oo,lr,fr,ud,Pt,Io,ur,dd,pd,hd,md,Ue=ct(()=>{"use strict";vt();ee();St();xt();Qt=X()?16384:32767,Oo=16384*16384;lr=null;fr=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});ud=24*1024*1024,Pt=null,Io=0,ur=0;dd=4e6,pd=2e6,hd=8,md=["%3C","%3E","%20","%7B","%7D","%3B"]});var pn={};je(pn,{rasterize:()=>Do});async function Do(t,e){let n=await fe(t,e),o=n.width*n.height<=2e6?n.toDataURL(`image/${e.format}`,e.quality):await new Promise(a=>{let c=()=>a(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(f=>{if(!f)return c();let l=new FileReader;l.onload=()=>a(String(l.result||"")),l.onerror=c,l.readAsDataURL(f)},`image/${e.format}`,e.quality)}catch{c()}}),s=new Image;return s.src=o,X()?await s.decode():await new Promise((a,c)=>{if(s.complete&&s.naturalWidth)return a();s.onload=a,s.onerror=c}),s.style.width=`${n.width/e.dpr}px`,s.style.height=`${n.height/e.dpr}px`,s}var ze=ct(()=>{"use strict";Ue();vt()});var Bo={};je(Bo,{toImg:()=>yd,toSvg:()=>yd});async function yd(t,e){let{scale:n=1,width:r,height:i,meta:o={}}=e,s=Number.isFinite(r),a=Number.isFinite(i),c=Number.isFinite(n)&&n!==1||s||a;if(X()&&c)try{let{svg:p}=await dr(un(t)),h=(p.match(/<svg\b[^>]*>/i)||[])[0]||"",m=parseFloat((h.match(/\bwidth="([\d.]+)/i)||[])[1]),d=parseFloat((h.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(m)||!Number.isFinite(d))throw new Error("svg without dimensions");let g=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:m,y=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:d,b,S;s&&a?(b=r,S=i):s?(b=r,S=Math.max(1,Math.round(y*(r/Math.max(1,g))))):a?(S=i,b=Math.max(1,Math.round(g*(i/Math.max(1,y))))):(b=Math.max(1,Math.round(m*n)),S=Math.max(1,Math.round(d*n)));let k=p.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${S}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=dn(k),await v.decode(),v.style.width=`${b}px`,v.style.height=`${S}px`,v}catch(p){return kt(e.__session,"safari-png-fallback","safari vector toImg failed, falling back to PNG raster",p),D(e,"safari vector toImg failed, falling back to PNG",p),Do(t,{...e,format:"png",quality:1,meta:o})}let f=t,l=!1;if(!s&&!a&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=un(t),h=(p.match(/<svg\b[^>]*>/i)||[])[0]||"",m=Number((h.match(/\bwidth="([\d.]+)"/i)||[])[1]),d=Number((h.match(/\bheight="([\d.]+)"/i)||[])[1]);if(m>0&&d>0){let g=h.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(m*n))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(d*n))}"`);f=dn(p.replace(h,g)),l=!0}}catch{}let u=new Image;u.decoding="sync",u.loading="eager",u.src=f;try{await u.decode()}catch(p){if(!l)throw p;u.src=t,l=!1,await u.decode()}if(s&&a)u.style.width=`${r}px`,u.style.height=`${i}px`;else if(s){let p=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=r/Math.max(1,p);u.style.width=`${r}px`,u.style.height=`${Math.max(1,Math.round(h*m))}px`}else if(a){let p=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=i/Math.max(1,h);u.style.height=`${i}px`,u.style.width=`${Math.max(1,Math.round(p*m))}px`}else{let p=Math.max(1,Math.round(u.naturalWidth*(l?1:n))),h=Math.max(1,Math.round(u.naturalHeight*(l?1:n)));if(u.style.width=`${p}px`,u.style.height=`${h}px`,!l&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let d=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${p}"`).replace(/height="[^"]*"/,`height="${h}"`);u.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,await u.decode()}catch(m){D(e,"SVG width/height patch in toImg failed",m),u.src!==t&&(u.src=t,await u.decode().catch(()=>{}))}}return u}var Uo=ct(()=>{"use strict";mt();ee();ze();Ue()});var Ba={};je(Ba,{toBlob:()=>zo});async function zo(t,e){let n=e.format||e.type||"svg";if(n==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[snapdom] toBlob: engine:'html-in-canvas' produces a raster capture; ask for png/jpeg/webp");let i=decodeURIComponent(t.split(",")[1]);return new Blob([i],{type:"image/svg+xml"})}let r=await fe(t,e);return new Promise(i=>r.toBlob(o=>i(o),`image/${n==="jpg"?"jpeg":n}`,e.quality))}var Ho=ct(()=>{"use strict";Ue()});var za={};je(za,{download:()=>bd});async function Ua(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function bd(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(e?.format||i||"").toLowerCase(),s=o==="jpg"?"jpeg":o||"png",a=e?.filename||"snapdom",c=/\.(png|jpe?g|webp|svg)$/i.test(a)?a:`${a}.${s}`,f={...e||{},format:s,type:s};f.dpr=1;let l=Ye();if(s==="svg"){let h=await zo(t,{...f,type:"svg"});if(l&&await Ua(h,c))return;let m=URL.createObjectURL(h),d=document.createElement("a");d.href=m,d.download=c,document.body.appendChild(d),d.click(),URL.revokeObjectURL(m),d.remove();return}let u=await fe(t,f);if(l){let h=`image/${s}`,m=await new Promise(d=>u.toBlob(d,h,e?.quality));if(m&&await Ua(m,c))return}let p=document.createElement("a");p.href=u.toDataURL(`image/${s}`,e?.quality),p.download=c,document.body.appendChild(p),p.click(),p.remove()}var Ha=ct(()=>{"use strict";Ho();Ue();vt()});mt();mt();vt();dt();bn();xt();var ne=new WeakMap,pi=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"],Tr=new Map,Rc=2e3,xe=0;function Ft(){xe++}function Sn(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(jt(e))return!0;if(e.parentElement)e=e.parentElement;else{let n=e.getRootNode?.();e=n&&n.host?n.host:null}}return!1}function vn(t){for(let e of t)if(oe(e))return!0;return!1}function oe(t){if(Sn(t.target))return!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!Sn(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!Sn(n)){e=!1;break}}if(e)return!1}return!0}var Se=new WeakMap;function wi(t){for(let e of t){if(!oe(e))continue;let n=e.target.ownerDocument||document;Se.set(n,(Se.get(n)||0)+1);let r=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;r;r=r.parentElement||r.getRootNode?.()?.host)Se.set(r,(Se.get(r)||0)+1)}}function Ze(t){let e=t.ownerDocument||document;return Ce(e),(Se.get(e)||0)-(Se.get(t)||0)}var Mt=0;function ve(t=document){return Ce(t),Mt}function Ot(){return Ce(),xe}function tn(t){return t?(Ce(t.ownerDocument||document),kn(t,Or(t))):0}function ke(){Ft(),Mt++}var re=new WeakMap,qt=0,Gt=0;function Fc(t){re.set(t,++qt)}function Ir(t){if(!t||t.nodeType!==1)return;qt++,re.set(t,qt);let e=t.querySelectorAll("*");for(let n=0;n<e.length;n++)re.set(e[n],qt)}function Wr(t){Ir(t.parentElement||t);for(let e=t.parentElement;e;e=e.parentElement)Fc(e)}function kn(t,e=null){let n=re.get(t)||0;if(e)for(let r of e)n=Math.max(n,re.get(r)||0);return Gt*1e9+n}function Or(t){let e=t.getRootNode?.();if(!e?.host)return null;let n=[];for(;e?.host;)e.mode==="open"&&Br(e),n.push(e.host),e=e.host.getRootNode?.();return n}var $r=new WeakMap;function Dr(t){t=t||document;let e=$r.get(t);if(!e||e.env!==Mt){let n=!0;try{n=Xt(t).usesHas}catch{}e={env:Mt,usesHas:n},$r.set(t,e)}return!e.usesHas}function Tc(t){let e=n=>n?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let r=n.target,i=r&&(r.nodeType===1?r:r.parentElement);if(i&&(i.tagName==="STYLE"||i.tagName==="LINK"))return i.ownerDocument||document;for(let o of n.addedNodes)if(e(o))return o.ownerDocument||document;for(let o of n.removedNodes)if(e(o))return o.ownerDocument||r&&r.ownerDocument||document}return null}var Pr=new WeakSet,Ke=[];function Si(t){if(!vn(t))return;wi(t),Ft();let e=new Set;for(let n of t){if(!oe(n))continue;let r=n.target.getRootNode&&n.target.getRootNode();if(!r||r.nodeType!==11||e.has(r))continue;e.add(r),r.host?Ir(r.host):qt++;let i=r.querySelectorAll("*");for(let o=0;o<i.length;o++)re.set(i[o],qt)}}function Br(t){if(!(!t||Pr.has(t))){Pr.add(t);try{let e=new MutationObserver(Si);e.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Ke.push({o:e,root:t})}catch{}}}function xi(t){if(!vn(t))return;wi(t),Ft();let e=Tc(t);if(e){$r.delete(e),Mt++,Gt++;return}let n=new Set;for(let r of t){if(!oe(r))continue;let i=r.target.nodeType===1?r.target:r.target.parentElement;if(!i)continue;let o=i.ownerDocument||document;if(!Dr(o)){Gt++;return}if(i===o.documentElement||i===o.body){Gt++;return}let s=i.parentElement||i;n.has(s)||(n.add(s),Wr(i))}}var Nr=new WeakSet,Qe=null,Je=[];function Ce(t=document){if(t===Qe||!t||t.nodeType!==9)return;if(Nr.has(t)){Qe=t;return}Nr.add(t),Qe=t;let e=t.defaultView,n=i=>{vn(i)&&(Ft(),Mt++)},r=()=>{Ft(),Mt++};try{let i=new MutationObserver(xi);i.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Je.push({o:i,env:!1,doc:t})}catch{}try{let i=new MutationObserver(n);i.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Je.push({o:i,env:!0,doc:t})}catch{}try{e?.addEventListener("resize",r,{passive:!0})}catch{}try{let i=o=>{Ft();let s=o.composedPath?.()[0]||o.target;s&&s.nodeType===1&&!Sn(s)&&Dr(s.ownerDocument||t)?Wr(s):Gt++};t.addEventListener("focusin",i,{capture:!0,passive:!0}),t.addEventListener("focusout",i,{capture:!0,passive:!0}),t.addEventListener("change",i,{capture:!0,passive:!0}),t.addEventListener("pointerdown",i,{capture:!0,passive:!0}),t.addEventListener("pointerup",i,{capture:!0,passive:!0}),t.addEventListener("pointercancel",i,{capture:!0,passive:!0}),t.addEventListener("keydown",i,{capture:!0,passive:!0}),t.addEventListener("keyup",i,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",i,{capture:!0,passive:!0}),t.addEventListener("toggle",i,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{Ft(),Gt++},{passive:!0})}catch{}try{let i=t.fonts;i&&(i.addEventListener?.("loadingdone",r),i.status==="loading"&&i.ready?.then(r).catch(()=>{}))}catch{}}var hi=new WeakMap;function mi(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let r=hi.get(t)||[];if(r.length===n.length&&r.every((o,s)=>o===n[s]))return;if(hi.set(t,n),Ft(),t.nodeType===11){t.host?Ir(t.host):qt++;for(let o of t.querySelectorAll("*"))re.set(o,qt);return}let i=r.filter(o=>!n.includes(o)).concat(n.filter(o=>!r.includes(o)));for(let o of i)if(o.isConnected)if(Dr(e))Wr(o);else{Gt++;return}}function Cn(t,e=null){if(!t)return;mi(t,t);let n=e||Ke.filter(({root:r})=>r.host?.isConnected).map(({root:r})=>r);for(let r of n)mi(r,t)}function _t(){Ce();try{for(let t=Je.length-1;t>=0;t--){let{o:e,env:n,doc:r}=Je[t];if(r!==document&&!r.defaultView){try{e.disconnect()}catch{}Nr.delete(r),Qe===r&&(Qe=null),Je.splice(t,1);continue}let i=e.takeRecords();i.length&&(n?vn(i)&&(Ft(),Mt++):xi(i))}for(let t=Ke.length-1;t>=0;t--){let{o:e,root:n}=Ke[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}Pr.delete(n),Ke.splice(t,1);continue}let r=e.takeRecords();r.length&&Si(r)}}catch{}}function ie(t){if(!(!t||t.nodeType!==1)){ne.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)ne.delete(e.currentNode)}catch{}}}var $c=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function Ur(t){let e=ne.get(t);if(e&&zr(e,t)){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function vi(t){let e=ne.get(t);if(!e||!zr(e,t))return null;let n=e.snapshot;return!n||n.__bgClipTextFix?null:n}var gi=new WeakMap;function Xt(t){let e=gi.get(t);if(!e||e.epoch!==xe){let n=e&&e.universe;e={epoch:xe,...si(t)};let r=e.universe;if(n&&r&&n.size===r.size){let i=!0;for(let o of r)if(!n.has(o)){i=!1;break}i&&(e.universe=n)}gi.set(t,e)}return e}function ki(t){try{let e=Xt(t.ownerDocument||document).shareGate;if(e===null)return!1;if(!e.length)return!0;let n=new Set,r=s=>{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let c=0;c<a.length;c++)n.add("c"+a[c])};r(t);for(let s of t.querySelectorAll("*"))r(s);let i=[];for(let{sel:s,key:a}of e)(a===null||n.has(a))&&i.push(s);if(!i.length)return!0;let o=i.join(",");return!t.matches(o)&&t.querySelector(o)===null}catch{return!1}}function Pc(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Xt(e).importantProps}function en(t,e){let n=t.ownerDocument||document,r=t.getRootNode?t.getRootNode():n;return r===n?Xt(n).universe:e&&It(r)?Nc(t,r,n,e):null}var yi=new WeakMap;function Nc(t,e,n,r){let i=r.__shadowUniverse;if(i===null)return null;if(!i){let a=Xt(n).universe;if(!a)return r.__shadowUniverse=null;i=r.__shadowUniverse={universe:new Set(a),roots:new Set}}let o=a=>{for(;It(a)&&!i.roots.has(a);a=a.host.getRootNode()){i.roots.add(a);for(let c of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=yi.get(c);if((!f||f.epoch!==xe)&&yi.set(c,f={epoch:xe,props:oi(c)}),!f.props)return!1;for(let l of f.props)i.universe.add(l)}Cr(a.getAnimations(),i.universe)}return!0},s=o(e)&&(!t.shadowRoot||o(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=o(a.getRootNode());return s?i.universe:r.__shadowUniverse=null}function xn(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Xt(e).pseudoUniverse}var Lc={before:null,after:null,firstLetter:null,marker:null,firstLine:null};function Ae(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?Lc:Xt(e).pseudoGates}function Ic(t,e={},n=null,r=null){let i={},o=e.excludeStyleProps,s=h=>{if(i[h]!==void 0||ge(h)||o&&(o instanceof RegExp&&o.test(h)||typeof o=="function"&&o(h)))return;let m=t.getPropertyValue(h);m&&((h==="background-image"||h==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),i[h]=m)};if(r){for(let m of r)s(m);let h=n&&n.style;if(h&&h.length)for(let m=0;m<h.length;m++)s(h[m])}else for(let h=0;h<t.length;h++)s(t[h]);let a=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let h of a)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}let c=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let h of c)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}if(e.embedFonts){let h=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let m of h)if(!i[m])try{let d=t.getPropertyValue(m);d&&(i[m]=d)}catch{}}try{(i["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(i["content-visibility"]="hidden")}catch{}Object.defineProperty(i,"__needsBgInline",{value:Ci(t),enumerable:!1});let f=parseFloat(t.getPropertyValue("border-top-width")||0)||0,l=parseFloat(t.getPropertyValue("border-right-width")||0)||0,u=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,p=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(f===0&&l===0&&u===0&&p===0){let h=(t.getPropertyValue("border-image-source")||"").trim(),m=h&&h!=="none",d=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color","border-block-start","border-block-start-width","border-block-start-style","border-block-start-color","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-inline-start","border-inline-start-width","border-inline-start-style","border-inline-start-color","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color"];for(let g of d)delete i[g];m||(i.border="none")}return Wc(i),i}function Wc(t){if(!ht())return;let e=t["background-clip"]||t["-webkit-background-clip"];if(!e||!e.includes("text"))return;let n=o=>o==="transparent"||o==="rgba(0, 0, 0, 0)",r=t["-webkit-text-fill-color"];if(!n(r!==void 0?r:t.color))return;let i=Oc(t["background-image"],t["background-color"]);i&&(n(t.color)&&(t.color=i),r!==void 0&&(t["-webkit-text-fill-color"]=i),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:i,enumerable:!1}))}function Oc(t,e){let n=o=>{let s=[],a=/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)(?:[,\s/]+([\d.]+%?))?\s*\)/g,c;for(;c=a.exec(o||"");){let f=c[4];(f===void 0?1:parseFloat(f)/(f.endsWith("%")?100:1))>.05&&s.push([+c[1],+c[2],+c[3]])}return s},r=n(t);if(r.length||(r=n(e)),!r.length)return null;let i=[0,0,0];for(let[o,s,a]of r)i[0]+=o,i[1]+=s,i[2]+=a;return`rgb(${i.map(o=>Math.round(o/r.length)).join(", ")})`}function Ci(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let i of $c){let o=t.getPropertyValue(i);if(o&&o!=="none")return!0}let r=t.getPropertyValue("background");return!!(r&&/url\s*\(/i.test(r))}function Dc(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=W(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function Bc(t,e,n){try{if(typeof t.computedStyleMap=="function"){let i=t.computedStyleMap().get("width");if(i!=null)return!bi(String(i).trim().toLowerCase())}}catch{}let r=t.style&&(t.style.width||t.style.inlineSize);return r&&!bi(String(r).trim().toLowerCase())?!0:zc(t,e)?n||Hc(t,e):!1}var Uc=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function bi(t){return Uc.has(t)||t.startsWith("fit-content")}function zc(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(o=o||document.createRange(),o.selectNode(s),a=o.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let c=W(s);if(c.display==="none"||c.position==="absolute"||c.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.left<r&&(r=a.left),a.right>i&&(i=a.right)}return i===-1/0?!1:i-r<n-.5}function Hc(t,e){let n=t.parentElement;if(!n)return!1;let r=W(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(e.marginLeft)||0)-(parseFloat(e.marginRight)||0);return i>0?Math.abs(t.getBoundingClientRect().width-i)>.5:!1}var Lr=new WeakMap;function jc(t,e){let n=Lr.get(t);if(n)return n;let r=[e];for(let i in t)r.push(i,t[i]);return n=r.join(""),Lr.set(t,n),n}function zr(t,e){return t.env===Mt&&t.stamp===kn(e,t.hosts)}var Vc=/^(width|height|inline-size|block-size|top|right|bottom|left|transform-origin|perspective-origin)$|^inset-/,qc=/(margin|padding)[a-z-]*\s*:[^;]*(%|\bauto\b|calc\(|var\()/i,Gc=new Set(["INPUT","TEXTAREA","SELECT","OPTION","OPTGROUP","PROGRESS","METER","BUTTON","DATALIST"]);function Xc(t){let e=t.__styleShare;return e||(e=t.__styleShare={ids:new WeakMap,intern:new Map,snaps:new Map,rootSeen:!1}),e}function Yc(t,e){let n=e.ids.get(t);if(n!==void 0)return n;let r=t.parentElement,i;if(!r)i="R";else if(i=e.ids.get(r),i===void 0){if(e.rootSeen)return e.ids.set(t,-1),-1;i="R"}if(e.rootSeen=!0,i===-1)return e.ids.set(t,-1),-1;let o="",s=t.attributes;if(s&&s.length)if(s.length===1)o=s[0].name+"="+s[0].value;else{let c=[];for(let f=0;f<s.length;f++)c.push(s[f].name+"="+s[f].value);c.sort(),o=c.join("")}let a=i+"|"+t.tagName+"|"+o;return n=e.intern.get(a),n===void 0&&(n=e.intern.size,e.intern.set(a,n)),e.ids.set(t,n),n}function Ai(t,e){let n=t.snap,r=t.snap={...n};Object.defineProperty(r,"__needsBgInline",{value:n.__needsBgInline,enumerable:!1}),n.__bgClipTextFix!==void 0&&Object.defineProperty(r,"__bgClipTextFix",{value:n.__bgClipTextFix,enumerable:!1});let i=Xt(e.ownerDocument||document),o=e.getAttribute&&e.getAttribute("style")||"",s=o&&qc.test(o),a=!!i.marginUnstable||s&&/margin/i.test(o),c=!!i.paddingUnstable||s&&/padding/i.test(o),f=r.display!==void 0&&r.display.includes("grid"),l=r.transform!==void 0&&r.transform!=="none",u=[];for(let m in r)(Vc.test(m)||f&&(m==="grid-template-columns"||m==="grid-template-rows")||l&&m==="transform"||a&&m.charCodeAt(0)===109&&m.startsWith("margin-")||c&&m.charCodeAt(0)===112&&m.startsWith("padding-"))&&u.push(m);t.h&&!("height"in r)&&u.push("height"),t.b&&!("block-size"in r)&&u.push("block-size");let p=new Set(u),h=[e.tagName.toLowerCase()];for(let m in r)p.has(m)||h.push(m,r[m]);return t.rr=u,t.sig=h.join("")+""+u.join(""),u}function Mi(t,e,n,r,i){let o=i&&i.__styleShare?r&&r.__styleShare:null,s=o?o.ids.get(t):void 0;if(s===void 0||s===-1||t.shadowRoot||t.assignedSlot)return be(n,xn(t));let a=s+e,c=o.pseudo||(o.pseudo=new Map),f=c.get(a);if(f){let u={...f.snap},p=f.rr||Ai(f,t);for(let h=0;h<p.length;h++){let m=n.getPropertyValue(p[h]);m?u[p[h]]=m:delete u[p[h]]}return u}let l=be(n,xn(t));return c.set(a,{snap:l,rr:null,sig:null,h:"height"in l,b:"block-size"in l}),l}function Kc(t,e=null,n={},r=null,i=null){let o=ne.get(t),s=!!(n&&n.embedFonts),a=n&&n.excludeStyleProps||null;if(typeof a!="function"&&o&&zr(o,t)&&o.embedFonts===s&&o.excludeStyleProps===a)return o.snapshot;let c=e||getComputedStyle(t),f,l=null,u=r&&r.st.snaps.get(r.id);if(u){f={...u.snap};let d=u.rr||Ai(u,t);l=[];for(let g=0;g<d.length;g++){let y=d[g],b=c.getPropertyValue(y);b?f[y]=b:delete f[y],l.push(b)}Object.defineProperty(f,"__needsBgInline",{value:u.snap.__needsBgInline,enumerable:!1}),u.snap.__bgClipTextFix!==void 0&&Object.defineProperty(f,"__bgClipTextFix",{value:u.snap.__bgClipTextFix,enumerable:!1})}else f=Ic(c,n,t,en(t,i)),r&&r.st.snaps.set(r.id,{snap:f,rr:null,sig:null,h:"height"in f,b:"block-size"in f});let p=!1;if(typeof t.computedStyleMap=="function"){let d;for(let g of pi)if(f[g]==="0px")try{d||=t.computedStyleMap(),d.get(g)?.toString()==="auto"&&(f[g]="auto",p=!0)}catch{}}fl(t,c,f);let h=rl(t,c,f);l!==null&&(p&&l.push("",...pi.map(d=>f[d])),h&&l.push(""+h),Lr.set(f,u.sig+""+l.join("")+("height"in f?"":"")+("block-size"in f?"":"")));let m=Or(t);return ne.set(t,{env:Mt,stamp:kn(t,m),hosts:m,snapshot:f,embedFonts:s,excludeStyleProps:a}),f}function Qc(t,e){if(t&&t.session&&t.persist)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.__ctx;return(!n||t.__ctxOpts!==e)&&(n={session:t,persist:{snapshotKeyCache:Tr,defaultStyle:N.defaultStyle,baseStyle:N.baseStyle,image:N.image,resource:N.resource,background:N.background},options:e||{}},t.__ctx=n,t.__ctxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},persist:{snapshotKeyCache:Tr,defaultStyle:N.defaultStyle,baseStyle:N.baseStyle,image:N.image,resource:N.resource,background:N.background},options:t||e||{}}}var Jc=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Zc=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA";function tl(t,e,n){if(!t.style||t.style.length===0)return;let r=Pc(t),i=r!=null&&!Jc.test(t.getAttribute("style")||"");for(let o=0;o<t.style.length;o++){let s=t.style[o];if(i&&!r.has(s)&&!(s.startsWith("background")&&Zc(t)))continue;let a=n.getPropertyValue(s);a&&e.style.setProperty(s,a,t.style.getPropertyPriority(s))}}function lt(t,e,n,r){if(t.tagName==="STYLE")return;let i=Qc(n,r),o=i.options&&i.options.cache||"soft";o!=="disabled"&&Ce(t.ownerDocument),o==="disabled"&&!i.session.__bumpedForDisabled&&(Ft(),Tr.clear(),i.session.__bumpedForDisabled=!0);let{session:s,persist:a}=i;if(!s.styleCache.has(t)){let y=null;try{y=getComputedStyle(t)}catch{}s.styleCache.set(t,y||getComputedStyle((t.ownerDocument||document).documentElement))}let c=s.styleCache.get(t);t.getAttribute?.("style")&&tl(t,e,c);let f=c.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let l=t.tagName?.toLowerCase()||"div";if(Ge.has(l)){let y={};Object.defineProperty(y,"__needsBgInline",{value:Ci(c),enumerable:!1});let b=Or(t);ne.set(t,{env:Mt,stamp:kn(t,b),hosts:b,snapshot:y,embedFonts:!!(i.options&&i.options.embedFonts),excludeStyleProps:i.options&&i.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(i.options&&i.options.__styleShare&&s.styleMap){let y=Xc(s),b=Yc(t,y),S=t.ownerDocument||document,k=S.activeElement;b!==-1&&!Gc.has(t.tagName)&&!(k&&k!==S.body&&k!==S.documentElement&&k===t)&&(!t.getRootNode||t.getRootNode()===S)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:y,id:b})}let p=Kc(t,c,i.options,u,s);if(t.getAttribute?.("style"))for(let y of["top","right","bottom","left"]){let b=`margin-${y}`;p[b]==="auto"&&e.style.setProperty(b,"auto","important")}p.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",p.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",p.__bgClipTextFix,"important")),el(t,c,p),e.style?.length&&p["box-sizing"]==="border-box"&&c.getPropertyValue("box-sizing")!=="border-box"&&sl(t,e,p);let h=Ei(t);if(h){let y=c.getPropertyValue("min-width");(!y||y==="auto"||y==="0px")&&(p["min-width"]="0px")}let m=jc(p,l),d=!0;if(wn(l,(p.display||"").toLowerCase())){d=Dc(t),d&&Er(l,p,h)&&Bc(t,c,h)&&(d=!1),m=`${m}${d?"|c":""}${h?"|f":""}`;let y=p["text-wrap-mode"]||p["white-space"]||"";d&&y!=="nowrap"&&y!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let g=a.snapshotKeyCache.get(m);g===void 0&&(g=ye(p,l,d,h),a.snapshotKeyCache.size>=Rc&&a.snapshotKeyCache.delete(a.snapshotKeyCache.keys().next().value),a.snapshotKeyCache.set(m,g)),s.styleMap.set(e,g)}function el(t,e,n){let r=e.getPropertyValue("overflow-x"),i=e.getPropertyValue("overflow-y");if((r==="visible"||!r)&&(i==="visible"||!i)||e.getPropertyValue("box-sizing")==="border-box"||typeof t.clientWidth!="number"||!t.offsetWidth)return;let o=f=>parseFloat(f)||0,s=t.offsetWidth-t.clientWidth-o(e.getPropertyValue("border-left-width"))-o(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-o(e.getPropertyValue("border-top-width"))-o(e.getPropertyValue("border-bottom-width")),c=(f,l)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let p=parseFloat(u);Number.isFinite(p)&&(n[f]=`${Math.round((p+l)*1e3)/1e3}px`)};s>.5&&(c("width",s),c("inline-size",s)),a>.5&&(c("height",a),c("block-size",a))}var nl=["border-top-width","border-right-width","border-bottom-width","border-left-width"],_i=["width","inline-size","height","block-size"];function rl(t,e,n){if(!nl.some(c=>n[c]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let c of["width","height"]){let f=n[`min-${c}`],l=n[`max-${c}`];if(f&&f!=="0px"&&f!=="auto"||l&&l!=="none")return""}let r=c=>parseFloat(n[c])||0,i=r("padding-left")+r("padding-right")+r("border-left-width")+r("border-right-width"),o=r("padding-top")+r("padding-bottom")+r("border-top-width")+r("border-bottom-width"),s=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let c of _i){let f=n[c];if(!f||!f.endsWith("px"))continue;let u=c==="width"||c==="inline-size"&&!s||c==="block-size"&&s?i:o;n[c]=`${Math.round((parseFloat(f)+u)*1e3)/1e3}px`}n["box-sizing"]="border-box";let a="";if(e.getPropertyValue("overflow-x")==="auto"){let c=t.scrollWidth<=t.clientWidth;n["overflow-x"]=c?"hidden":"auto",c&&(a+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let c=t.scrollHeight<=t.clientHeight;n["overflow-y"]=c?"hidden":"auto",c&&(a+="y")}return a}var ol=["box-sizing",..._i,"overflow-x","overflow-y"],il=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function sl(t,e,n){if(il.test(t.getAttribute("style")))for(let r of ol)e.style.getPropertyValue(r)&&n[r]&&e.style.setProperty(r,n[r],e.style.getPropertyPriority(r))}function al(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}function Ei(t){let e=t.parentElement;if(!e)return!1;let n=W(e).display||"";return n.includes("flex")||n.includes("grid")}function cl(t){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let e=t.firstElementChild,n=t.lastElementChild;if(e&&e.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=t.firstElementChild;r;r=r.nextElementSibling){let i=W(r);if(i.display==="none")continue;let o=i.position;if(o!=="absolute"&&o!=="fixed")return!0}return!1}function ll(t){let e=t.getBoundingClientRect().top,n=-1/0,r=null;for(let i=t.firstChild;i;i=i.nextSibling){if(i.nodeType===3){if(!/\S/.test(i.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(i);let a=r.getBoundingClientRect();(a.width||a.height)&&(n=Math.max(n,a.bottom));continue}if(i.nodeType!==1)continue;let o=W(i);if(o.display==="none")continue;let s=o.position;s==="absolute"||s==="fixed"||o.float&&o.float!=="none"||(n=Math.max(n,i.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-e}function fl(t,e,n){if(At(t)&&t.style&&t.style.height)return;let r=t.tagName&&t.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let s=e.position;if(s==="absolute"||s==="fixed"||s==="sticky"||e.transform!=="none"||al(e)||Ei(t))return;let a=e.overflowX||e.overflow||"visible",c=e.overflowY||e.overflow||"visible";if(a!=="visible"||c!=="visible")return;let f=e.clip;if(f&&f!=="auto"&&f!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!cl(t))return;let l=parseFloat(e.height),u=ll(t);Number.isFinite(l)&&Number.isFinite(u)&&Math.abs(l-u)>2||(delete n.height,delete n["block-size"])}we();var ul=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]),Hr=new WeakMap,Ri=-1;function An(t){let e=Ot();return e!==Ri&&(Hr=new WeakMap,Ri=e),Fi(t)}function Fi(t){let e=Hr.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(t.localName==="mask"||t.localName==="clipPath"?n=!1:ul.has(t.localName)&&(n=!0)),n===void 0){let r=t.parentNode;n=!!(r&&r.nodeType===1)&&Fi(r)}return Hr.set(t,n),n}function Ti(t,e){if(t?.nodeType!==1||e?.nodeType!==1||An(t))return;let n=t.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(a&&typeof a.value=="string"&&!a.value.startsWith("data:")&&a.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(t)}catch{}if(r){let o=t.style;if(o&&o.length){let s=new Set;for(let a=0;a<o.length;a++){let c=o[a];if(s.has(c))continue;s.add(c);let f=o.getPropertyValue(c);if(!f||!f.includes("var("))continue;let l=i&&i.getPropertyValue(c);if(l)try{e.style.setProperty(c,l.trim(),o.getPropertyPriority(c))}catch{}}}}if(r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(!a||typeof a.value!="string"||a.value.startsWith("data:")||!a.value.includes("var("))continue;let c=a.name,f=i&&i.getPropertyValue(c);if(f)try{e.style.setProperty(c,f.trim())}catch{}}}}mt();mt();dt();he();bn();St();function Me(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:"))}function _e(t,e){if(!t)return null;let n=0;try{n=e?e.getBoundingClientRect().width||e.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let o of t.split(",")){let s=o.trim().split(/\s+/);if(!s[0])continue;let a=s[1]||"",c=1;/^\d*\.?\d+x$/i.test(a)?c=parseFloat(a):/^\d+w$/i.test(a)&&(c=parseInt(a,10)/n),r.push({url:s[0],d:c})}if(!r.length)return null;r.sort((o,s)=>o.d-s.d);let i=window.devicePixelRatio||1;return(r.find(o=>o.d>=i)||r[r.length-1]).url}function $i(t,e){let n=t.currentSrc||"";if(n&&!Me(n))return n;let r=e.querySelectorAll("source[srcset]"),i=null;for(let o of r){let s=o.getAttribute("srcset");if(!s||Me(s))continue;let a=o.getAttribute("type");if(a&&!gr.test(a.trim()))continue;let c=o.getAttribute("media");if(c)try{if(window.matchMedia(c).matches)return _e(s,t)}catch{}i||(i=_e(s,t))}return i}function Pi(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let r of e)if(r&&!Me(r))return r;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!Me(r))return r}return null}xt();function dl(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var pl=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,hl=/^::?(?:before|after|first-letter)$/;function ml(t,e,n=!0,r){return Ar(t,",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")&&i.includes("data-sd")||i.startsWith("@"))return i;let o=i.match(pl);if(o&&hl.test(o[0]))return":not(*)";let s=o?i.slice(0,o.index).trim():i,a=n?dl(s,r):s;return`:where(${e} ${a})${o?o[0]:""}`}).join(", ")}function Li(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(r,i)=>`:where(:where(${i.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(r,i)=>`:where(${e}:is(${i.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(r,i)=>`:where(${e} ${i.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(r,i,o,s)=>{let a=ml(s,e,!0,n);return`${i}${o}${a}{`}),t):""}function Ii(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function se(t){let e="";for(let n of t)if(n.media&&n.cssRules){let r=!1;try{r=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}r&&(e+=se(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${se(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let r=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=r+(n.style?n.style.cssText:"")+se(n.cssRules)+"}"}else e+=n.cssText+`
9
+ `;return e}function Wi(t){let e="";try{t.querySelectorAll("style").forEach(r=>{let i=null;try{i=r.sheet&&r.sheet.cssRules}catch{}e+=(i?se(i):r.textContent||"")+`
10
+ `});let n=t.adoptedStyleSheets||[];for(let r of n)try{r&&r.cssRules&&(e+=se(r.cssRules))}catch{}}catch{}return e}function Oi(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function Di(t,e,n={}){try{let r=null,i=W(t).content;if(i&&i.includes("url(")){let f=i.match(/url\(["']?([^"')]+)["']?\)/);f&&(r=f[1])}let o=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",c=r||(o?$i(t,o):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||_e(a,t)||t.src||"";if((!c||Me(c))&&n.resolvePicturePlaceholders!==!1){let f=Pi(t);f&&(c=f)}if(!c)return;e.getAttribute("src")!==c&&e.setAttribute("src",c),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Bi(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function gl(t,e){try{let r=getComputedStyle(t).getPropertyValue(e).trim();if(r)return r}catch{}try{let r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(r)return r}catch{}return""}function Ui(t,e,n){let r=[];for(let i of e){let o=gl(t,i);o&&r.push(`${i}: ${o};`)}return r.length?`${n}{${r.join("")}}
11
+ `:""}function zi(t,e){if(!t)return;let n=r=>{let i=r.getAttribute("data-sd-slotted")||"";e?` ${i} `.includes(` ${e} `)||r.setAttribute("data-sd-slotted",i?`${i} ${e}`:e):r.setAttribute("data-sd-slotted",i)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}async function yl(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<e&&(!r||!r.body&&!r.documentElement);)await new Promise(o=>setTimeout(o,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}function bl(t){let e=t.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let c=getComputedStyle(t);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,i=parseFloat(c.borderTopWidth)||0,o=parseFloat(c.borderBottomWidth)||0}catch{}let s=Math.max(0,Math.round(e.width-(n+r))),a=Math.max(0,Math.round(e.height-(i+o)));return{contentWidth:s,contentHeight:a,rect:e}}function gt(t){let e=0,n=0;if(t.offsetWidth>0&&(e=t.offsetWidth),t.offsetHeight>0&&(n=t.offsetHeight),e===0||n===0)try{let r=getComputedStyle(t);if(e===0){let i=parseFloat(r.width);!isNaN(i)&&i>0&&(e=i)}if(n===0){let i=parseFloat(r.height);!isNaN(i)&&i>0&&(n=i)}}catch{}if(e===0||n===0)try{if(e===0){let r=parseFloat(t.getAttribute("width"));!isNaN(r)&&r>0&&(e=r)}if(n===0){let r=parseFloat(t.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((e===0||n===0)&&(t.naturalWidth||t.naturalHeight))try{e===0&&t.naturalWidth>0&&(e=t.naturalWidth),n===0&&t.naturalHeight>0&&(n=t.naturalHeight)}catch{}return{width:e,height:n}}function wl(t,e,n){let r=t.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,c=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,l=0,u=0,p=0,h=0;try{let d=r&&t.body?r.getComputedStyle(t.body):null;d&&(l=(parseFloat(d.marginTop)||0)+(parseFloat(d.paddingTop)||0),u=(parseFloat(d.marginRight)||0)+(parseFloat(d.paddingRight)||0),p=(parseFloat(d.marginBottom)||0)+(parseFloat(d.paddingBottom)||0),h=(parseFloat(d.marginLeft)||0)+(parseFloat(d.paddingLeft)||0))}catch{}let m=t.createElement("style");if(m.setAttribute("data-sd-iframe-pin",""),J(m),m.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${l}px ${u}px ${p}px ${h}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(t.head||t.documentElement).appendChild(m),ie(t.documentElement),i||o)try{t.body&&(t.body.scrollLeft=i,t.body.scrollTop=o),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=i),t.documentElement.scrollTop||(t.documentElement.scrollTop=o))}catch{}return()=>{try{m.remove()}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(i,o),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=c,t.documentElement.scrollTop=f)}catch{}ie(t.documentElement)}}async function jr(t,e,n){let r=await yl(t,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:i,contentHeight:o,rect:s}=bl(t),a=n?.snap;if(!a||typeof a.toPng!="function")throw new Error("[snapdom] iframe capture requires the snapdom entrypoints on options.snap \u2014 capture through snapdom(el) (set automatically) or pass options.snap.");let c={...n,scale:1,clip:null,__pinned:!0},f=wl(r,i,o),l;try{l=await a.toPng(r.documentElement,c)}finally{f()}l.style.display="block",l.style.width=`${i}px`,l.style.height=`${o}px`;let u=document.createElement("div");return e.nodeMap.set(u,t),lt(t,u,e,n),u.style.overflow="hidden",u.style.display="block",u.style.width||(u.style.width=`${Math.round(s.width)}px`),u.style.height||(u.style.height=`${Math.round(s.height)}px`),u.appendChild(l),u}function Hi(t){try{let e=t&&t.accentColor;if(e&&e!=="auto"&&e!=="none")return e;let n=t&&t.color;if(n)return n}catch{}return"#0a6ed1"}function ji(t){let{width:e,height:n}=gt(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Number.isFinite(o)&&o>0?o:e||r.width||128,c=Number.isFinite(s)&&s>0?s:n||r.height||16,f=Number.parseFloat(t.min)||0,l=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),p=l-f,h=p>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/p)):.5,m="middle";try{i&&i.verticalAlign&&(m=i.verticalAlign)}catch{}let d=document.createElement("div");d.setAttribute("data-snapdom-input-replacement","range"),d.style.cssText=`display:inline-block;width:${a}px;height:${c}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(a)),g.setAttribute("height",String(c)),g.setAttribute("viewBox",`0 0 ${a} ${c}`),g.style.overflow="visible",d.appendChild(g);function y(){let b=Hi(i),S=!!t.disabled,k=Math.max(2,Math.min(4,c)),v=(c-k)/2,w=Math.max(10,Math.min(14,Math.max(c,10))),C=w/2,A=C+h*Math.max(0,a-w);g.innerHTML="";let M=(_,R,T,$)=>{let O=document.createElementNS("http://www.w3.org/2000/svg","rect");O.setAttribute("x",String(_)),O.setAttribute("y",String(v)),O.setAttribute("width",String(Math.max(0,R))),O.setAttribute("height",String(k)),O.setAttribute("rx",String(k/2)),O.setAttribute("fill",T),$&&O.setAttribute("fill-opacity",$),g.appendChild(O)};M(0,a,"#808080","0.4"),M(0,A,b);let x=document.createElementNS("http://www.w3.org/2000/svg","circle");x.setAttribute("cx",String(A)),x.setAttribute("cy",String(c/2)),x.setAttribute("r",String(C)),x.setAttribute("fill",b),g.appendChild(x),S&&g.setAttribute("opacity","0.5"),d.style.setProperty("width",`${a}px`,"important"),d.style.setProperty("height",`${c}px`,"important"),d.style.setProperty("min-width",`${a}px`,"important"),d.style.setProperty("min-height",`${c}px`,"important")}return y(),{el:d,applyVisual:y}}function Vi(t){let{width:e,height:n}=gt(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Math.round(e||r.width||0),c=Math.round(n||r.height||0),f=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,a||16),l=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,c||16),u=(t.type||"text").toLowerCase()==="checkbox",p=!!t.checked,h=!!t.indeterminate,d=Math.max(Math.min(f,l),12),g="middle";try{i&&i.verticalAlign&&(g=i.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),y.style.cssText=`display:inline-block;width:${d}px;height:${d}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("width",String(d)),b.setAttribute("height",String(d)),b.setAttribute("viewBox",`0 0 ${d} ${d}`),y.appendChild(b);function S(){let k=Hi(i),v=2,w=v/2,C=d-v;if(b.innerHTML="",u){let A=document.createElementNS("http://www.w3.org/2000/svg","rect");if(A.setAttribute("x",String(w)),A.setAttribute("y",String(w)),A.setAttribute("width",String(C)),A.setAttribute("height",String(C)),A.setAttribute("rx","2"),A.setAttribute("ry","2"),A.setAttribute("fill",p?k:"none"),A.setAttribute("stroke",k),A.setAttribute("stroke-width",String(v)),b.appendChild(A),p){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${w+2} ${d/2} L ${d/2-1} ${d-w-2} L ${d-w-2} ${w+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,v))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),b.appendChild(M)}else if(h){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),x=Math.max(6,C-4);M.setAttribute("x",String((d-x)/2)),M.setAttribute("y",String((d-v)/2)),M.setAttribute("width",String(x)),M.setAttribute("height",String(v)),M.setAttribute("fill",k),M.setAttribute("rx","1"),b.appendChild(M)}}else{let A=document.createElementNS("http://www.w3.org/2000/svg","circle");if(A.setAttribute("cx",String(d/2)),A.setAttribute("cy",String(d/2)),A.setAttribute("r",String((d-v)/2)),A.setAttribute("fill",p?k:"none"),A.setAttribute("stroke",k),A.setAttribute("stroke-width",String(v)),b.appendChild(A),p){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),x=Math.max(2,(d-v*2)*.35);M.setAttribute("cx",String(d/2)),M.setAttribute("cy",String(d/2)),M.setAttribute("r",String(x)),M.setAttribute("fill","white"),b.appendChild(M)}}y.style.setProperty("width",`${d}px`,"important"),y.style.setProperty("height",`${d}px`,"important"),y.style.setProperty("min-width",`${d}px`,"important"),y.style.setProperty("min-height",`${d}px`,"important")}return S(),{el:y,applyVisual:S}}var nn=new ot(80);async function Sl(t){if(N.resource?.has(t))return N.resource.get(t);if(nn.has(t))return nn.get(t);let e=(async()=>{let n=await it(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return N.resource?.set(t,n.data),n.data})();nn.set(t,e);try{let n=await e;return nn.set(t,n),n}catch(n){throw nn.delete(t),n}}var Ni=/\bblob:[^)"'\s]+/g;function Mn(t){return typeof t=="string"&&t.startsWith("blob:")}function xl(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function vl(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function rn(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function _n(t,e=null){if(!t)return;let n=e,r=new Set,i=[],o=new Map,s=(d,g,y,b)=>{r.add(y),i.push(()=>{o.has(y)&&(d.setAttribute(g,o.get(y)),b?.())})},a=(d,g)=>{if(!d||!d.includes("blob:"))return;let y=d.match(Ni)||[];if(y.length){for(let b of y)r.add(b);i.push(()=>{let b=d.replace(Ni,S=>o.get(S)||S);b!==d&&g(b)})}},c=rn(t,"img");for(let d of c)try{let y=d.getAttribute("src")||d.currentSrc||"";Mn(y)&&s(d,"src",y);let b=d.getAttribute("srcset");if(b&&b.includes("blob:")){let S=xl(b);for(let k of S)Mn(k.url)&&r.add(k.url);i.push(()=>{let k=!1;for(let v of S)o.has(v.url)&&(v.url=o.get(v.url),k=!0);k&&d.setAttribute("srcset",vl(S))})}}catch(g){D(n,"resolveBlobUrls for img failed",g)}let f=rn(t,"image");for(let d of f)try{let g="http://www.w3.org/1999/xlink",y=d.getAttribute("href")||d.getAttributeNS?.(g,"href");Mn(y)&&s(d,"href",y,()=>d.removeAttributeNS?.(g,"href"))}catch(g){D(n,"resolveBlobUrls for SVG image href failed",g)}let l=rn(t,"[style*='blob:']");for(let d of l)try{let g=d.getAttribute("style");a(g,y=>d.setAttribute("style",y))}catch(g){D(n,"replaceBlobUrls in inline style failed",g)}let u=rn(t,"style");for(let d of u)try{let g=d.textContent||"";a(g,y=>{d.textContent=y})}catch(g){D(n,"replaceBlobUrls in style tag failed",g)}let p=["poster"];for(let d of p){let g=rn(t,`[${d}^='blob:']`);for(let y of g)try{let b=y.getAttribute(d);Mn(b)&&s(y,d,b)}catch(b){D(n,`resolveBlobUrls for ${d} failed`,b)}}if(!r.size)return;let h=[...r],m=0;await Promise.all(Array.from({length:Math.min(4,h.length)},async()=>{for(;m<h.length;){let d=h[m++];try{o.set(d,await Sl(d))}catch(g){D(n,"blobUrlToDataUrl failed; keeping original URL",g)}}}));for(let d of i)try{d()}catch(g){D(n,"resolved blob URL write failed",g)}}vt();var qi=new Set(["rgba(0, 0, 0, 0)","transparent"]),Vr="Highlight";function Gi(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let r=[];for(let i=0;i<n.rangeCount;i+=1){let o=n.getRangeAt(i);if(!o.collapsed)try{o.intersectsNode(t)&&r.push(o)}catch{}}return r.length?{ranges:r,styles:new Map}:null}function kl(t,e){if(e.styles.has(t))return e.styles.get(t);let n;try{let r=getComputedStyle(t);if(r.userSelect==="none"||r.webkitUserSelect==="none"||r.getPropertyValue("-webkit-user-select")==="none")return e.styles.set(t,null),null;let i=getComputedStyle(t,"::selection"),o=[],s=i.backgroundColor,a=s&&!qi.has(s)&&s!==r.backgroundColor;o.push(`background-color:${a?s:Vr}`),i.color&&i.color!==r.color&&o.push(`color:${i.color}`,`-webkit-text-fill-color:${i.color}`),i.textShadow&&i.textShadow!==r.textShadow&&o.push(`text-shadow:${i.textShadow}`),i.textDecorationLine&&i.textDecorationLine!=="none"&&i.textDecorationLine!==r.textDecorationLine&&o.push(`text-decoration:${i.textDecorationLine} ${i.textDecorationStyle||"solid"} ${i.textDecorationColor||"currentcolor"}`),n=o.join(";")}catch{n=`background-color:${Vr}`}return e.styles.set(t,n),n}function Xi(t,e){let n=t.data;if(!n)return null;let r=t.parentElement;if(!r)return null;let i=[];for(let f of e.ranges){let l=!1;try{l=f.intersectsNode(t)}catch{}if(!l)continue;let u=f.startContainer===t?f.startOffset:0,p=f.endContainer===t?f.endOffset:n.length;p>u&&i.push([u,p])}if(i.length===0)return null;let o=kl(r,e);if(!o)return null;i.sort((f,l)=>f[0]-l[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),c=0;for(let[f,l]of i){f>c&&a.append(s.createTextNode(n.slice(c,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${o}`),u.textContent=n.slice(f,l),a.append(u),c=l}return c<n.length&&a.append(s.createTextNode(n.slice(c))),a}var En=t=>Number.parseFloat(t)||0,Cl=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function Al(t,e){try{let r=getComputedStyle(t,"::selection").backgroundColor;if(r&&!qi.has(r)&&r!==e.backgroundColor)return r}catch{}return Vr}function Yi(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let r=null,i=null;try{r=t.selectionStart,i=t.selectionEnd}catch{return}if(r==null||i==null||r===i)return;let o=t.value||"";if(t.localName==="input"&&t.type==="password"&&(o="\u2022".repeat(o.length)),!o)return;let s=getComputedStyle(t),a=t.localName==="textarea",c=En(s.paddingLeft),f=En(s.paddingTop),l=t.clientWidth-c-En(s.paddingRight),u=t.clientHeight-f-En(s.paddingBottom),p=n.createElement("div");p.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let g of Cl)p.style.setProperty(g,s.getPropertyValue(g));a?(p.style.whiteSpace="pre-wrap",p.style.overflowWrap="break-word",p.style.width=`${Math.max(0,l)}px`):p.style.whiteSpace="pre";let h=n.createElement("span");h.textContent=o.slice(r,i),p.append(n.createTextNode(o.slice(0,r)),h,n.createTextNode(o.slice(i))),n.body.appendChild(p);let m=[];try{let g=p.getBoundingClientRect(),y=-t.scrollLeft,b=-t.scrollTop;if(!a){b+=Math.max(0,(u-g.height)/2);let S=s.direction==="rtl",k=s.textAlign;k==="start"?k=S?"right":"left":k==="end"&&(k=S?"left":"right");let v=l-g.width;v>0&&(k==="right"?y+=v:k==="center"&&(y+=v/2))}for(let S of h.getClientRects())S.width<=0||S.height<=0||m.push({x:c+(S.left-g.left)+y,y:f+(S.top-g.top)+b,width:S.width,height:S.height})}finally{p.remove()}if(m.length===0)return;let d=Al(t,s);e.__snapdomFieldSelection={images:m.map(()=>`linear-gradient(${d},${d})`),positions:m.map(g=>`${g.x}px ${g.y}px`),sizes:m.map(g=>`${g.width}px ${g.height}px`),repeats:m.map(()=>"no-repeat"),origins:m.map(()=>"padding-box"),clips:m.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function Ki(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:r,positions:i,sizes:o,repeats:s,origins:a,clips:c,base:f}=n,l=e.style.backgroundImage||f.image;l&&l!=="none"?(r.push(l),i.push(e.style.backgroundPosition||f.position),o.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),c.push(e.style.backgroundClip||f.clip)):(r.push("linear-gradient(transparent,transparent)"),i.push("0% 0%"),o.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),c.push(f.clip||"border-box")),e.style.backgroundImage=r.join(","),e.style.backgroundPosition=i.join(","),e.style.backgroundSize=o.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=c.join(",")}}xt();var qr=new Map,Qi=new Set(["IFRAME"]);function Ee(t,e){qr.set(String(t).toUpperCase(),e)}function Rn(t){let e=W(t),n=e.display;if(n==="none")return null;let r=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),i=h=>parseFloat(h)||0,o=(h,m,d,g,y)=>{if(!r||!h?.endsWith("px"))return null;let b=parseFloat(h);if(!Number.isFinite(b)||b<0)return null;if(e.boxSizing==="border-box")return b;let S=g-y-d;return b+m+d+(S>0&&b+m<y+S/2?S:0)},[s,a,c,f]=/scroll|auto/.test(e.overflow)?[t.offsetWidth,t.clientWidth,t.offsetHeight,t.clientHeight]:[0,0,0,0],l=o(e.width,i(e.paddingLeft)+i(e.paddingRight),i(e.borderLeftWidth)+i(e.borderRightWidth),s,a),u=o(e.height,i(e.paddingTop)+i(e.paddingBottom),i(e.borderTopWidth)+i(e.borderBottomWidth),c,f);if(l===null||u===null){let{width:h,height:m}=gt(t),d=h,g=m;if(l===null&&!d||u===null&&!g){let y=t.getBoundingClientRect();d||=y.width||0,g||=y.height||0}l??=d,u??=g}let p=document.createElement("div");return p.style.cssText=`display:${n==="inline"?"inline-block":n};box-sizing:border-box;width:${l}px;height:${u}px;visibility:hidden;`,p}var Ml=new Set(["style","option","optgroup"]),Fn=200,_l=new Set(["img","canvas","video","iframe","object","embed"]);function Ji(t,e){return t.right>=e.left-Fn&&t.left<=e.right+Fn&&t.bottom>=e.top-Fn&&t.top<=e.bottom+Fn}function El(t,e){if(t===e.root)return!1;let n;try{n=t.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=W(t);if(r.display==="inline"&&!_l.has((t.localName||"").toLowerCase()))return!1;let i=e.rect,o=t.scrollWidth||0,s=t.scrollHeight||0,a={left:r.direction==="rtl"?Math.min(n.left,n.right-o):n.left,top:n.top,right:Math.max(n.right,n.left+o),bottom:Math.max(n.bottom,n.top+s)},c=r.writingMode||"";if((c.startsWith("vertical")||c.startsWith("sideways"))&&(a.top=Math.min(n.top,n.bottom-s),a.left=Math.min(a.left,n.right-o)),Ji(a,i))return!1;let f=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;f.nextNode();){let l=f.currentNode.getBoundingClientRect();if((l.width>0||l.height>0)&&Ji(l,i))return!1}return!0}function Rl(t,e,n){let r=t.cloneNode(!1);t.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),lt(t,r,e,n);let{width:i,height:o}=gt(t);i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden";let s=t.parentElement?W(t.parentElement).display:"",a=W(t).position;if(!/flex|grid|table/.test(s)&&(a==="static"||a==="relative")){let c=p=>{let h=W(p);return h.display!=="none"&&h.position!=="absolute"&&h.position!=="fixed"},f=t.getBoundingClientRect(),l=t.previousElementSibling;for(;l&&!c(l);)l=l.previousElementSibling;if(l){let p=f.top-l.getBoundingClientRect().bottom;p>=0&&(r.style.marginTop=`${p}px`)}let u=t.nextElementSibling;for(;u&&!c(u);)u=u.nextElementSibling;if(u){let p=u.getBoundingClientRect().top-f.bottom;p>=0&&(r.style.marginBottom=`${p}px`)}}return r.style.boxSizing="border-box",r}async function Yt(t,e,n){if(!t)throw new Error("Invalid node");e.slicer?.due()&&await e.slicer.pause();let r=new Set,i=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let l=(t.localName||t.tagName||"").toLowerCase(),u=jt(t);if(u&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&u||Mr.has(l))return null;if(l==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return D(e,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(l==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let l=Xi(t,e.selection);if(l)return l}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return Rn(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let l of n.exclude)try{if(t.matches?.(l)){if(n.excludeMode==="hide")return Rn(t);if(n.excludeMode==="remove")return null}}catch(u){console.warn(`Invalid selector in exclude option: ${l}`,u)}if(n.excludePredicates)for(let l of n.excludePredicates)try{if(l(t))return n.excludeMode==="remove"?null:Rn(t)}catch(u){console.warn("Error in exclude predicate:",u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return Rn(t);if(n.filterMode==="remove")return null}}catch(l){console.warn("Error in filter function:",l)}if(t!==n.element&&!Ml.has(t.localName)&&!Lt(t)&&W(t).display==="none"){let l=t.cloneNode(!1);t.tagName==="IMG"&&(l.removeAttribute("src"),l.removeAttribute("srcset")),l.style.setProperty("display","none","important");for(let u of t.querySelectorAll("style")){let p=await Yt(u,e,n);p&&l.appendChild(p)}return l}if(e.clip&&El(t,e.clip))return Rl(t,e,n);if(n.__resolveNodeHooks)for(let l of n.__resolveNodeHooks){let u;try{u=await l(t,n)}catch(p){D(e,"resolveNode plugin hook failed",p)}if(u===null)return null;if(u?.nodeType)return u.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(u,t),lt(t,u,e,n)),u}{let l=Qi.has(t.tagName)&&qr.get(t.tagName);if(l){let u=await l(t,e,n);if(u!==void 0)return u}}if(t.getAttribute("data-capture")==="placeholder"){let l=t.cloneNode(!1);e.nodeMap.set(l,t),lt(t,l,e,n);let u=document.createElement("div");return u.textContent=t.getAttribute("data-placeholder-text")||"",u.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",l.appendChild(u),l}{let l=!Qi.has(t.tagName)&&qr.get(t.tagName);if(l){let u=await l(t,e,n);if(u!==void 0)return u}}let s;try{if(s=t.cloneNode(!1),Ti(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){Di(t,s,n);try{let l=window.getComputedStyle(t),u=parseFloat(l.width),p=parseFloat(l.height);if(!(u>0)||!(p>0)){let d=gt(t),g=b=>parseFloat(l.getPropertyValue(b))||0,y=l.getPropertyValue("box-sizing")==="border-box";u>0||(u=d.width-(y?0:g("padding-left")+g("padding-right")+g("border-left-width")+g("border-right-width"))),p>0||(p=d.height-(y?0:g("padding-top")+g("padding-bottom")+g("border-top-width")+g("border-bottom-width")))}let h=Math.round((u||0)*1e3)/1e3,m=Math.round((p||0)*1e3)/1e3;h&&(s.dataset.snapdomWidth=String(h)),m&&(s.dataset.snapdomHeight=String(m))}catch(l){D(e,"getUnscaledDimensions for IMG failed",l)}try{let l=t.getAttribute("style")||"",u=window.getComputedStyle(t),p=S=>{let k=l.match(new RegExp(`${S}\\s*:\\s*([^;]+)`,"i")),v=k?k[1].trim():u.getPropertyValue(S);return/%|auto/i.test(String(v||""))},h=parseFloat(s.dataset.snapdomWidth||"0")||0,m=parseFloat(s.dataset.snapdomHeight||"0")||0,d=p("width")||!(h>0),g=p("height")||!(m>0);d&&h>0&&(s.style.width=`${h}px`),g&&m>0&&(s.style.height=`${m}px`);let y=u.getPropertyValue("object-fit"),b=u.getPropertyValue("object-position");y&&y!=="fill"?(s.style.objectFit=y,b&&(s.style.objectPosition=b)):(h>0&&(s.style.minWidth=`${h}px`),m>0&&(s.style.minHeight=`${m}px`))}catch(l){D(e,"IMG dimension freeze failed",l)}}}catch(l){throw console.error("[Snapdom] Failed to clone node:",t,l),l}let a=null;if(rt(t,"textarea")){let{width:l,height:u}=gt(t),p=l||t.getBoundingClientRect().width||0,h=u||t.getBoundingClientRect().height||0;p&&(s.style.width=`${p}px`),h&&(s.style.height=`${h}px`)}if(rt(t,"input")){let l=(t.type||"text").toLowerCase();if((l==="checkbox"||l==="radio")&&(ht()||t.indeterminate)){let{el:p,applyVisual:h}=Vi(t);e.nodeMap.set(p,t),a=h,s=p}else if(l==="range"&&(ht()||X())){let{el:p,applyVisual:h}=ji(t);e.nodeMap.set(p,t),a=h,s=p}else if(l==="color"&&X()){let p=s,h=t.value||"#000000";a=()=>{p.style.setProperty("background-color",h,"important"),p.style.setProperty("color","transparent","important"),p.style.setProperty("-webkit-text-fill-color","transparent","important"),p.style.setProperty("appearance","none","important"),p.style.setProperty("-webkit-appearance","none","important")},p.removeAttribute("value")}else if((l==="date"||l==="time"||l==="datetime-local")&&(ht()||X())){s.setAttribute("type","text");let p=t.value;l==="date"&&t.valueAsDate&&(p=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=p,s.setAttribute("value",p)}else{let p=qe(t)?wr(t.value):t.value;s.value=p,s.setAttribute("value",p),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((rt(t,"input")||rt(t,"textarea"))&&!t.value&&t.placeholder)try{let l=window.getComputedStyle(t,"::placeholder"),u=l&&l.color;if(u&&u!=="rgba(0, 0, 0, 0)"){let p="snapdom-ph-"+(Math.random()*1e6|0);s.classList.add(p);let h=document.createElement("style");h.textContent=`.${p}::placeholder{color:${u}!important;opacity:${l.opacity||"1"}!important;-webkit-text-fill-color:${u}!important;}`,s.prepend(h)}}catch{}if(rt(t,"select")&&(i=new Set(Array.from(t.options).filter(l=>l.selected))),rt(t,"textarea")&&(o=t.value),rt(t,"input")||rt(t,"textarea")||rt(t,"select")){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let l=t;l.min!==void 0&&l.min!==""&&s.setAttribute("min",l.min),l.max!==void 0&&l.max!==""&&s.setAttribute("max",l.max),l.pattern!==void 0&&l.pattern!==""&&s.setAttribute("pattern",l.pattern);let u=t.getAttribute("aria-invalid");u!==null&&s.setAttribute("aria-invalid",u)}if(An(t)||lt(t,s,e,n),a&&a(),n.captureSelection&&(rt(t,"input")||rt(t,"textarea")))try{Yi(t,s)}catch(l){D(e,"inlineTextFieldSelection failed",l)}if(Lt(t)&&!An(t)){let l=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let u=window.getComputedStyle(t);for(let p of l){let h=u.getPropertyValue(p);h&&s.style.setProperty(p,h)}}catch{}}if(t.shadowRoot){Br(t.shadowRoot);try{let b=t.shadowRoot.querySelectorAll("slot");for(let S of b){let k=S.assignedNodes?.()||[];for(let v of k)r.add(v)}}catch{}let l=Ii(e),u=`[data-sd="${l}"]`;e.shadowScopes||=new WeakMap,e.shadowScopes.set(t.shadowRoot,l);try{s.setAttribute("data-sd",l)}catch{}let p=Wi(t.shadowRoot);!e.__shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(p)&&(e.__shadowPseudo=!0);let h=Li(p,u,l),m=Bi(p),d=Ui(t,m,u);Oi(s,d+h,l);let g=document.createDocumentFragment(),y=await Promise.all(Array.from(t.shadowRoot.childNodes).map(b=>b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE"?null:Yt(b,e,n).catch(()=>null)));g.append(...y.filter(b=>!!b)),s.appendChild(g)}if(t.tagName==="SLOT"){let l=e.shadowScopes?.get(t.getRootNode()),u=t.assignedNodes?.()||[],p=u.length?t.assignedNodes?.({flatten:!0})||u:[],h=p.length?p:Array.from(t.childNodes),m=document.createDocumentFragment(),d=await Promise.all(h.map(g=>Yt(g,e,n).then(y=>(y&&u.length&&zi(y,l),y||null)).catch(()=>null)));return m.append(...d.filter(g=>!!g)),m}let c=l=>r.has(l)||t.shadowRoot&&!l.assignedSlot,f=await Promise.all(Array.from(t.childNodes).map(l=>c(l)?null:Yt(l,e,n).catch(()=>null)));if(s.append(...f.filter(l=>!!l)),i&&rt(s,"select")){let l=!1;for(let u of s.options){let p=i.has(e.nodeMap.get(u));u.selected=p,p?u.setAttribute("selected",""):u.removeAttribute("selected"),l||=p}if(!l&&!s.multiple){let u=s.ownerDocument.createElement("option");u.hidden=!0,u.style.setProperty("display","none","important"),u.setAttribute("selected",""),u.value="",s.appendChild(u)}}return o!==null&&rt(s,"textarea")&&(s.textContent=o),s}async function Fl(t,e,n){let r=!1;try{r=!!(t.contentDocument||t.contentWindow?.document)}catch(i){D(e,"iframe same-origin probe failed",i)}if(r)try{return await jr(t,e,n)}catch(i){console.warn("[SnapDOM] iframe rasterization failed, fallback:",i)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",t),n.placeholders){let{width:i,height:o}=gt(t),s=document.createElement("div");return s.style.cssText=`width:${i}px;height:${o}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,lt(t,s,e,n),s}else{let{width:i,height:o}=gt(t),s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${i}px;height:${o}px;visibility:hidden;`,lt(t,s,e,n),s}}function on(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),r=document.createElement("canvas");r.width=e,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(t,0,0,e,n);let o=i.getImageData(0,0,e,n).data;for(let s=3;s<o.length;s+=4)if(o[s]!==0)return!1;return!0}catch{return!1}}var Tl=.95;function $l(t,e,n){try{let r=t.getImageData(0,0,e,n).data;for(let i=3;i<r.length;i+=4)if(r[i]!==255)return!1;return!0}catch{return!1}}async function Pl(t,e,n){let r="";try{let a=on(t);a&&(await pt(),a=on(t));let c=null;if(!a){c=t.getContext("2d",{willReadFrequently:!0});try{c&&c.getImageData(0,0,1,1)}catch{}X()&&await pt()}if(r=t.toDataURL("image/png"),!r||r==="data:,"){try{c&&c.getImageData(0,0,1,1)}catch{}if(await pt(),r=t.toDataURL("image/png"),!r||r==="data:,"){let f=document.createElement("canvas");f.width=t.width,f.height=t.height;let l=f.getContext("2d");l&&(l.drawImage(t,0,0),r=f.toDataURL("image/png"))}}}catch(a){D(e,"Canvas toDataURL failed, using empty/fallback",a)}n&&n.debug&&r&&on(t)&&D(e,"canvas is empty at capture time \u2014 capture it after its first frame is drawn",t);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(a){D(e,"img decoding/loading hints failed",a)}r&&(i.src=r),i.width=t.width,i.height=t.height;let{width:o,height:s}=gt(t);return o>0&&(i.style.width=`${o}px`),s>0&&(i.style.height=`${s}px`),e.nodeMap.set(i,t),lt(t,i,e,n),i}async function Nl(t,e,n){let r="",i=t.poster&&t.paused&&!t.currentTime&&!t.played.length,o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}if(!i)try{let c=document.createElement("canvas");c.width=t.videoWidth||t.offsetWidth||320,c.height=t.videoHeight||t.offsetHeight||240;let f=c.getContext("2d");f&&(f.drawImage(t,0,0,c.width,c.height),r=c.toDataURL($l(f,c.width,c.height)?"image/jpeg":"image/png",Tl),(!r||r==="data:,")&&(r=""))}catch(c){D(e,"Video frame capture failed, using poster fallback",c)}r?o.src=r:t.poster&&(o.src=t.poster),o.width=t.videoWidth||t.offsetWidth||0,o.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=gt(t);return s>0&&(o.style.width=`${s}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",e.nodeMap.set(o,t),lt(t,o,e,n),o}async function Ll(t,e,n){if(!t.controls)return;let{width:r,height:i}=gt(t),o=Math.round(r||t.offsetWidth||300),s=Math.round(i||t.offsetHeight||54),a=s/2,c=Math.max(4,s*.16),f=s*.34,l=o-s*.34,u=f+c+s*.55,p=Math.max(0,l-s*.7-u),h=Math.max(9,Math.round(s*.24)),m=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${s}" viewBox="0 0 ${o} ${s}"><rect width="${o}" height="${s}" rx="${Math.min(s/2,10)}" fill="#f1f3f4"/><path d="M ${f} ${a-c} L ${f+c} ${a} L ${f} ${a+c} Z" fill="#5f6368"/><rect x="${u}" y="${a-1.5}" width="${p}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${u}" cy="${a}" r="${Math.max(3,s*.09)}" fill="#5f6368"/><text x="${l}" y="${a}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,d=document.createElement("img");try{d.decoding="sync",d.loading="eager"}catch{}return d.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,d.width=o,d.height=s,d.style.width=`${o}px`,d.style.height=`${s}px`,e.nodeMap.set(d,t),lt(t,d,e,n),d}async function Zi(t,e,n){let r=t.getAttribute("data")||t.getAttribute("src")||"",i=(t.getAttribute("type")||"").toLowerCase(),o=/^image\//.test(i)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(r);if(r&&o){let a=document.createElement("img");try{a.decoding="sync",a.loading="eager"}catch{}a.src=r;let{width:c,height:f}=gt(t);return c>0&&(a.style.width=`${c}px`),f>0&&(a.style.height=`${f}px`),e.nodeMap.set(a,t),lt(t,a,e,n),a}let s=null;try{s=t.contentDocument}catch{}if(s)try{let a=await jr(t,e,n);if(a)return a}catch{}r&&console.warn(`[snapdom] <${t.localName}> content could not be captured (${i||"unknown type"}): rendering its fallback children`)}Ee("IFRAME",Fl);Ee("CANVAS",Pl);Ee("VIDEO",Nl);Ee("AUDIO",Ll);Ee("OBJECT",Zi);Ee("EMBED",Zi);mt();St();we();dt();xt();var Il=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Re=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function Wl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ts(t){let e=Array.isArray(t)?t:t?[t]:[],n=[];for(let r of e)r instanceof RegExp?n.push(r):typeof r=="string"?n.push(new RegExp(Wl(r),"i")):console.warn("[snapdom] Ignored invalid iconFont value:",r);return n}function Tt(t,e){let n=typeof t=="string"?t:"";for(let r of Il)if(r.test(n))return!0;if(e){for(let r of e)if(r instanceof RegExp&&r.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function Gr(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return Tt(t,e)}let r=n.searchParams.getAll("family").flatMap(i=>i.split("|")).map(i=>i.split(":")[0].trim()).filter(Boolean);return r.length?r.every(i=>Tt(i,e)):Tt(t,e)}function Ol(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Tn=new Map;function Dl(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,i;for(;i=r.exec(n);)e[i[1].toUpperCase()]=Number(i[2]);return e}async function Bl(t,e,n){let r=String(t||""),i=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),c="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?c="rounded":/\bsharp\b/.test(o)?c="sharp":/\boutlined\b/.test(o)&&(c="outlined");let f=a===1,l=null;if(f&&(c==="outlined"&&Re.materialIconsFilled?l={url:Re.materialIconsFilled,alias:"snapdom-mi-filled"}:c==="rounded"&&Re.materialIconsRound?l={url:Re.materialIconsRound,alias:"snapdom-mi-round"}:c==="sharp"&&Re.materialIconsSharp&&(l={url:Re.materialIconsSharp,alias:"snapdom-mi-sharp"})),!l)return{familyForMeasure:r,familyForCanvas:r};if(!Tn.has(l.alias))try{let p=new FontFace(l.alias,`url(${l.url})`,{style:"normal",weight:"400"});await p.load(),document.fonts.add(p),Tn.set(l.alias,!0)}catch{return Tn.set(l.alias,!1),{familyForMeasure:r,familyForCanvas:r}}if(Tn.get(l.alias)===!1)return{familyForMeasure:r,familyForCanvas:r};let u=`"${l.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Ul(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function zl(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let r=t.color?.trim();return r&&r!=="inherit"?r:"#000"}async function Hl(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),c=window.devicePixelRatio||1,f=Dl(o),{familyForMeasure:l,familyForCanvas:u}=await Bl(a,s,f);await Ul(u.replace(/^["']+|["']+$/g,""),r);let p=document.createElement("span");J(p),p.textContent=t,p.style.position="absolute",p.style.visibility="hidden",p.style.left="-99999px",p.style.whiteSpace="nowrap",p.style.fontFamily=l,p.style.fontWeight=String(n||"normal"),p.style.fontSize=`${r}px`,p.style.lineHeight="1",p.style.margin="0",p.style.padding="0",p.style.fontFeatureSettings="'liga' 1",p.style.fontVariantLigatures="normal",p.style.color=i,document.body.appendChild(p);let h=p.getBoundingClientRect(),m=Math.max(1,Math.ceil(h.width)),d=Math.max(1,Math.ceil(h.height));document.body.removeChild(p);let g=document.createElement("canvas");g.width=m*c,g.height=d*c;let y=g.getContext("2d");y.scale(c,c),y.font=`${n?`${n} `:""}${r}px ${u}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(t,0,0),{dataUrl:g.toDataURL(),width:m,height:d}}async function $n(t,e,n=new Map){if(t?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(t.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t),i.length===0)return 0;let o=e?.nodeType===1?Array.from(e.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e);let s=0;for(let a=0;a<i.length;a++){let c=i[a],f=n&&n.get(c)||o[a]||null;try{let l=getComputedStyle(f||c),u=l.fontFamily||"Material Icons";if(!Ol(u))continue;let p=(f||c).textContent.trim();if(!p)continue;let h=parseInt(l.fontSize,10)||24,m=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",d=zl(l),g=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",y=(f||c).className||"",{dataUrl:b,width:S,height:k}=await Hl(p,{family:u,weight:m,fontSize:h,color:d,variation:g,className:y});c.textContent="";let v=c.ownerDocument.createElement("img");v.src=b,v.alt=p,v.style.height=`${h}px`,v.style.width=`${Math.max(1,Math.round(S/k*h))}px`,v.style.objectFit="contain",v.style.verticalAlign=getComputedStyle(c).verticalAlign||"baseline",c.appendChild(v),s++}catch{}}return s}he();vt();xt();async function os(t,e,n,r=32,i="#000",o="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");J(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=o||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let c=a.getBoundingClientRect(),f=Math.ceil(c.width),l=Math.ceil(c.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,l*s);let p=u.getContext("2d");return p.scale(s,s),p.font=`${o||"normal"} ${n||"normal"} ${r}px "${e}"`,p.textAlign="left",p.textBaseline="top",p.fillStyle=i,p.fillText(t,0,0),{dataUrl:u.toDataURL(),width:f,height:l}}var is=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),jl=["katex","mathjax","mathml"];function Kr(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!is.has(n.toLowerCase()))return n}return""}function Vl(t){if(!t)return[];let e=[];for(let n of t.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(is.has(r.toLowerCase())||e.push(r))}return e}function Pn(t){let e=String(t??"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Nn(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function ql(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function Gl(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let i=Pn(n[1]),o=Pn(n[2]);return{min:Math.min(i,o),max:Math.max(i,o)}}let r=Pn(e);return{min:r,max:r}}function Xl(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Yl(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),s=parseFloat(n[2]);return{min:Math.min(o,s),max:Math.max(o,s)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}function Kl(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Ql(t,e,n=[]){if(!t)return!1;try{let r=new URL(t,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(c=>o.endsWith(c))||n.some(c=>o===c.toLowerCase()||o.endsWith("."+c.toLowerCase())))return!0;let a=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||jl.some(c=>a.includes(c)))return!0;for(let c of e){let f=c.toLowerCase().replace(/\s+/g,"+"),l=c.toLowerCase().replace(/\s+/g,"-"),u=Kl(c);if(a.includes(f)||a.includes(l)||u&&a.includes(u))return!0}return!1}catch{return!1}}function Jl(t){let e=new Set;for(let n of t||[]){let r=String(n).split("__")[0]?.trim();r&&e.add(r)}return e}function es(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,i)=>{let o=(i||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let s=o;try{s=new URL(o,e||location.href).href}catch{}return`url("${s}")`})}var ss=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Ln=4;async function Zl(t,e,n){if(!t)return t;let r=new Set;function i(a,c){try{return new URL(a,c||location.href).href}catch{return a}}async function o(a,c,f=0){if(f>Ln)return console.warn(`[snapDOM] @import depth exceeded (${Ln}) at ${c}`),a;let l="",u=0,p,h=new RegExp(ss.source,"g");for(;p=h.exec(a);){l+=a.slice(u,p.index),u=h.lastIndex;let m=(p[2]||p[4]||"").trim(),d=i(m,c);if(r.has(d)){console.warn(`[snapDOM] Skipping circular @import: ${d}`);continue}r.add(d);let g="";try{let y=await it(d,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(g=y.data)}catch{}g?(g=es(g,d),g=await o(g,d,f+1),l+=`
12
12
  /* inlined: ${d} */
13
13
  ${g}
14
- `):l+=p[0]}return l+=a.slice(u),l}let s=Zi(t,e||location.href);return s=await o(s,e||location.href,0),s}var is=/url\((["']?)([^"')]+)\1\)/g,zl=/@font-face[^{}]*\{[^}]*\}/g;function vt(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function ss(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let i=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!i)continue;let o=i[1],s=i[2],a=c=>{if(!c.includes("?"))return parseInt(c,16);let f=parseInt(c.replace(/\?/g,"0"),16),l=parseInt(c.replace(/\?/g,"F"),16);return[f,l]};if(s){let c=a(o),f=a(s),l=Array.isArray(c)?c[0]:c,u=Array.isArray(f)?f[1]:f;e.push([Math.min(l,u),Math.max(l,u)])}else{let c=a(o);Array.isArray(c)?e.push([c[0],c[1]]):e.push([c,c])}}return e}function as(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,i]of e)if(n>=r&&n<=i)return!0;return!1}function Qr(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(is)){let i=(r[2]||"").trim();if(!(!i||i.startsWith("data:"))){if(!/^https?:/i.test(i))try{i=new URL(i,e||location.href).href}catch{}n.push(i)}}return n}async function Xr(t,e,n="",r){let i=t;for(let o of t.matchAll(is)){let s=te(o[0]);if(!s)continue;let a=s;if(!a.startsWith("http")&&!a.startsWith("data:"))try{a=new URL(a,e||location.href).href}catch{}if(!Mt(a,r)){if(N.resource?.has(a)){i=i.replace(o[0],`url(${N.resource.get(a)})`);continue}try{let c=await it(a,{as:"dataURL",useProxy:n,silent:!0});if(c.ok&&typeof c.data=="string"){let f=c.data;N.resource?.set(a,f),i=i.replace(o[0],`url(${f})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",a)}}}return i}function jl(t){if(!t.length)return null;let e=(a,c)=>t.some(([f,l])=>!(l<a||f>c)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),i=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}function ts(t={}){let e=new Set((t.families||[]).map(i=>String(i).toLowerCase())),n=new Set((t.domains||[]).map(i=>String(i).toLowerCase())),r=new Set((t.subsets||[]).map(i=>String(i).toLowerCase()));return(i,o)=>{if(e.size&&e.has(i.family.toLowerCase()))return!0;if(n.size)for(let s of i.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(r.size){let s=jl(o);if(s&&r.has(s))return!0}return!1}}function Vl(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let o of t.match(e)||[]){let s=vt(o,"font-family"),a=Kr(s),c=vt(o,"font-weight","400"),f=vt(o,"font-style","normal"),l=vt(o,"font-stretch","100%"),u=vt(o,"unicode-range"),p=vt(o,"src"),h=Qr(p,location.href),m=h.length?h.map(g=>String(g).toLowerCase()).sort().join("|"):p.toLowerCase(),d=[String(a||"").toLowerCase(),c,f,l,u.toLowerCase(),m].join("|");n.has(d)||(n.add(d),r.push(o))}if(r.length===0)return t;let i=0;return t.replace(e,()=>r[i++]||"")}var es=new WeakMap,ql=0;function Gl(t){let e=es.get(t);return e===void 0&&(e=ql++,es.set(t,e)),e}function Xl(t,e,n,r,i,o,s,a,c){let f=Array.from(t||[]).sort().join("|"),l=0,u=0;for(let b of s||[]){let S=Math.imul(b,2654435761);S^=S>>>15,S=Math.imul(S,2246822507),S^=S>>>13,l=l+S|0,u++}let p=e?JSON.stringify({families:(e.families||[]).map(b=>String(b).toLowerCase()).sort(),domains:(e.domains||[]).map(b=>String(b).toLowerCase()).sort(),subsets:(e.subsets||[]).map(b=>String(b).toLowerCase()).sort()}):"",h=(n||[]).map(b=>`${(b.family||"").toLowerCase()}::${b.weight||"normal"}::${b.style||"normal"}::${b.stretchPct??100}::${b.src||""}`).sort().join("|"),m=r||"",d=(i||[]).map(b=>String(b).toLowerCase()).sort().join("|"),g=Gl(o||document),y=(a||[]).map(b=>String(b)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${p}::lf=${h}::px=${m}::fd=${d}::doc=${g}::cp=${l}::n=${u}::ic=${y}::env=${c}`}async function Yr(t,e,n,r){let i=r.doc?.defaultView||window;if(t.disabled||t.media?.mediaText&&!i.matchMedia(t.media.mediaText).matches)return;let o;try{o=t.cssRules||[]}catch{return}let s=(a,c)=>{try{return new URL(a,c||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let c=a.href?s(a.href,e):e;if(r.depth>=Nn){console.warn(`[snapDOM] CSSOM import depth exceeded (${Nn}) at ${c}`);continue}if(c&&r.visitedSheets.has(c)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${c}`);continue}c&&r.visitedSheets.add(c);let f={...r,depth:(r.depth||0)+1};await Yr(a.styleSheet,c,n,f);continue}if(a.cssRules?.length){if(a.type===CSSRule.MEDIA_RULE&&!i.matchMedia(a.conditionText).matches||a.type===CSSRule.SUPPORTS_RULE&&!i.CSS.supports(a.conditionText))continue;await Yr(a,e,n,r);continue}if(a.type===CSSRule.FONT_FACE_RULE){let c=(a.style.getPropertyValue("font-family")||"").trim(),f=Kr(c);if(!f||Mt(f,r.iconMatchers))continue;let l=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),p=(a.style.getPropertyValue("font-stretch")||"").trim(),h=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),d=(a.style.getPropertyValue("unicode-range")||"").trim(),g=l||"400",y=u||"normal",b=p||"100%",S=(u?`font-style:${u};`:"")+(l?`font-weight:${l};`:"")+(p?`font-stretch:${p};`:"")+(h?`font-variation-settings:${h};`:"")+(d?`unicode-range:${d};`:""),k=r.faceMatchesRequired(f,y,g,b);if(!k&&!r.requiredIndex.has(f.toLowerCase()))continue;let v=ss(d);if(!as(r.usedCodepoints,v))continue;let w={family:f,weightSpec:g,styleSpec:y,stretchSpec:b,unicodeRange:d,srcRaw:m,srcUrls:Qr(m,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(w,v))continue;if(!k){r.provisionalFaces.push({family:f.toLowerCase(),block:`@font-face{font-family:${f};src:${m};${S}}`,srcRaw:m,baseHref:e||location.href});continue}r.coveredFamilies.add(f.toLowerCase());let C=`"${String(f).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(/url\(/i.test(m)){let A=await Xr(m,e||location.href,r.useProxy,r.iconMatchers);await n(`@font-face{font-family:${C};src:${A};${S}}`)}else await n(`@font-face{font-family:${C};src:${m};${S}}`)}}}async function cs({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],iconMatchers:s=[],doc:a=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let c=new Map;for(let w of t){let[C,A,M,x]=String(w).split("__");if(!C)continue;let _=C.toLowerCase(),R=c.get(_)||[];R.push({w:parseInt(A,10),s:M,st:parseInt(x,10)}),c.set(_,R)}function f(w,C,A,M){let x=String(w).toLowerCase();if(!c.has(x))return!1;let _=c.get(x),R=Il(A),T=Wl(C),$=Ol(M),O=R.min!==R.max,H=R.min,E=P=>T.kind==="normal"&&P==="normal"||T.kind!=="normal"&&(P==="italic"||P==="oblique"),L=!1;for(let P of _){let F=O?P.w>=R.min&&P.w<=R.max:P.w===H,V=E(Pn(P.s)),z=P.st>=$.min&&P.st<=$.max;if(F&&V&&z){L=!0;break}}if(L)return!0;if(!O)for(let P of _){let F=E(Pn(P.s)),V=P.st>=$.min&&P.st<=$.max;if(Math.abs(H-P.w)<=300&&F&&V)return!0}if(!O&&T.kind==="normal"&&_.some(F=>Pn(F.s)!=="normal"))for(let F of _){let V=Math.abs(H-F.w)<=300,z=F.st>=$.min&&F.st<=$.max;if(V&&z)return!0}return!1}let l=ts(n);Se(a),At();let u=Xl(t,n,r,i,o,a,e,s,Se(a));if(N.resource?.has(u))return N.resource.get(u);let p=Ul(t),h=[],m=os;for(let w of a.querySelectorAll("style")){let C=w.textContent||"";for(let A of C.matchAll(m)){let M=(A[2]||A[4]||"").trim();if(!M||Gr(M,s))continue;a.querySelector(`link[rel="stylesheet"][href="${M}"]`)||h.push(M)}}let d=[];h.length&&await Promise.all(h.map(w=>new Promise(C=>{if(a.querySelector(`link[rel="stylesheet"][href="${w}"]`))return C(null);let A=a.createElement("link");A.rel="stylesheet",A.href=w,J(A),A.setAttribute("data-snapdom","injected-import");let M=setTimeout(()=>C(null),3e3),x=_=>{clearTimeout(M),C(_)};A.onload=()=>x(A),A.onerror=()=>x(null),a.head.appendChild(A),d.push(A)})));let g="",y=new Set,b=[],S=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(w=>!!w.href);for(let w of d)try{w.remove()}catch{}for(let w of S)try{if(Gr(w.href,s))continue;let C="",A=!1;try{A=new URL(w.href,location.href).origin===location.origin}catch{}if(!A){let x=Array.isArray(o)?o:[];if(!Bl(w.href,p,x))continue}if(A){let x=Array.from(a.styleSheets).find(_=>_.href===w.href);if(x)try{let _=x.cssRules||[];C=Array.from(_).map(R=>R.cssText).join("")}catch{}}if(!C){let x=await it(w.href,{as:"text",useProxy:i});x?.ok&&typeof x.data=="string"&&(C=x.data)}C=await Hl(C,w.href,i);let M="";for(let x of C.match(zl)||[]){let _=vt(x,"font-family"),R=Kr(_);if(!R||Mt(R,s))continue;let T=vt(x,"font-weight","400"),$=vt(x,"font-style","normal"),O=vt(x,"font-stretch","100%"),H=vt(x,"unicode-range"),E=vt(x,"src"),L=Qr(E,w.href),P=f(R,$,T,O);if(!P&&!c.has(R.toLowerCase()))continue;let F=ss(H);if(!as(e,F))continue;let V={family:R,weightSpec:T,styleSpec:$,stretchSpec:O,unicodeRange:H,srcRaw:E,srcUrls:L,href:w.href};if(n&&l(V,F))continue;if(!P){b.push({family:R.toLowerCase(),block:x,srcRaw:E,baseHref:w.href});continue}y.add(R.toLowerCase());let z=/url\(/i.test(E)?await Xr(x,w.href,i,s):x;M+=z}M.trim()&&(g+=M)}catch{console.warn("[snapDOM] Failed to process stylesheet:",w.href)}let k={doc:a,requiredIndex:c,usedCodepoints:e,faceMatchesRequired:f,coveredFamilies:y,provisionalFaces:b,simpleExcluder:n?ts(n):null,useProxy:i,iconMatchers:s,visitedSheets:new Set,depth:0},v=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let w of v)if(!(w.href&&S.some(C=>C.href===w.href)))try{let C=w.href||a.baseURI||location.origin+"/";C&&k.visitedSheets.add(C),await Yr(w,C,async A=>{g+=A},k)}catch{}for(let w of b)y.has(w.family)||(g+=/url\(/i.test(w.srcRaw)?await Xr(w.block,w.baseHref,i,s):w.block);try{for(let w of a.fonts||[]){if(!w||!w.family||w.status!=="loaded"||!w._snapdomSrc)continue;let C=String(w.family).replace(/^['"]+|['"]+$/g,"");if(Mt(C,s)||!c.has(C.toLowerCase())||n?.families&&n.families.some(M=>String(M).toLowerCase()===C.toLowerCase()))continue;let A=w._snapdomSrc;if(!String(A).startsWith("data:"))if(N.resource?.has(w._snapdomSrc))A=N.resource.get(w._snapdomSrc);else try{let M=await it(w._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(M.ok&&typeof M.data=="string")A=M.data,N.resource?.set(w._snapdomSrc,A);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",w._snapdomSrc);continue}g+=`@font-face{font-family:'${C}';src:url(${A});font-style:${w.style||"normal"};font-weight:${w.weight||"normal"};}`}}catch{}for(let w of r){if(!w||typeof w!="object")continue;let C=String(w.family||"").replace(/^['"]+|['"]+$/g,"");if(!C||Mt(C,s)||!c.has(C.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===C.toLowerCase()))continue;let A=w.weight!=null?String(w.weight):"normal",M=w.style!=null?String(w.style):"normal",x=w.stretchPct!=null?`${w.stretchPct}%`:"100%",_=String(w.src||""),R=_;if(!R.startsWith("data:"))if(N.resource?.has(_))R=N.resource.get(_);else try{let T=await it(_,{as:"dataURL",useProxy:i,silent:!0});if(T.ok&&typeof T.data=="string")R=T.data,N.resource?.set(_,R);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",_);continue}g+=`@font-face{font-family:'${C}';src:url(${R});font-style:${M};font-weight:${A};font-stretch:${x};}`}return g&&(g=Vl(g),N.resource?.set(u,g)),g}function Ln(t,e){let n=new Set,r=new Set;if(!t)return{required:n,usedCodepoints:r};let i=l=>{if(l)for(let u of l)r.add(u.codePointAt(0))},o=l=>{let u=Nl(l.fontFamily);if(u.length)for(let p of u)n.add(`${p}__${$n(l.fontWeight)}__${Pn(l.fontStyle)}__${Ll(l.fontStretch)}`)},s=ke(t),a=t.getRootNode(),c=l=>{o(W(l));let u=l.getRootNode()===a?s:ke(l);for(let p of["::before","::after"]){let h=p==="::before"?u.before:u.after;if(h!==null){if(h==="")continue;try{if(!l.matches(h))continue}catch{}}let m=W(l,p),d=m&&m.content;if(!(!d||d==="none"||d==="normal"))if(o(m),/^["']/.test(d))i(d.slice(1,-1));else{let g=d.match(/\\[0-9A-Fa-f]{1,6}/g);if(g)for(let y of g)try{r.add(parseInt(y.slice(1),16))}catch{}}}},f=[t];for(let l=0;l<f.length;l++){let u=f[l];u.nodeType===Node.ELEMENT_NODE&&c(u),u.shadowRoot&&f.push(u.shadowRoot);let p=(t.ownerDocument||document).createTreeWalker(u,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;p.nextNode();){let h=p.currentNode;if(h.nodeType===Node.TEXT_NODE){if(e&&h.parentElement&&!e(h.parentElement))continue;i(h.nodeValue||"")}else{if(e&&!e(h))continue;c(h),h.shadowRoot&&f.push(h.shadowRoot)}}}return{required:n,usedCodepoints:r}}async function In(t,e=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(t||[]).filter(Boolean);if(r.length===0)return;let i=()=>{let o=n.createElement("div");J(o),o.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let s of r){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${s}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",o.appendChild(a)}n.body.appendChild(o),o.offsetWidth,n.body.removeChild(o)};for(let o=0;o<Math.max(1,e);o++)i(),await pt(),await pt()}bt();function ds(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function ls(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function fs(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,t)),i="";for(let[o,s]of n)for(;r>=o;)i+=s,r-=o;return e?i:i.toLowerCase()}function us(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return ls(t,!1);case"upper-alpha":case"upper-latin":return ls(t,!0);case"lower-roman":return fs(t,!1);case"upper-roman":return fs(t,!0);default:return String(t)}}function sn(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),r=[];for(let i=0;i<n.length;i++){let o=n[i];if(o==="none")continue;let s=n[i+1],a=s!==void 0&&Number.isFinite(Number(s));r.push([o,a?Number(s):e]),a&&i++}return r}function ps(t){let e=new WeakMap,n=Sr(t)?t.documentElement:t,r=f=>f&&f.tagName==="LI",i=new WeakMap,o=f=>{let l=new Map;for(let[u,p]of f)l.set(u,p.slice());return l},s=(f,l,u)=>{let p=o(f),h;try{h=getComputedStyle(u)}catch{h=u.style}let m;try{m=h?.counterReset}catch{}if(m&&m!=="none")for(let[y,b]of sn(m,0)){let S=l.get(y);if(S&&S.length){let k=S.slice();k.push(b),p.set(y,k)}else p.set(y,[b])}let d;try{d=h?.counterSet}catch{}if(d&&d!=="none")for(let[y,b]of sn(d,0)){let S=p.get(y)||[];S.length===0&&S.push(0),S[S.length-1]=b,p.set(y,S)}let g;try{g=h?.counterIncrement}catch{}if(g&&g!=="none")for(let[y,b]of sn(g,1)){let S=p.get(y)||[];S.length===0&&S.push(0),S[S.length-1]+=b,p.set(y,S)}try{if(h?.display==="list-item"&&r(u)){let y=u.parentElement,b=y&&i.get(y),S=y?.tagName==="OL"?parseInt(y.getAttribute("start"),10):NaN,k=b===void 0?Number.isFinite(S)?S:1:b+1,v=y?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(v)&&(k=v),y&&i.set(y,k);let w=p.get("list-item")||[];w.length===0&&w.push(0),w[w.length-1]=k,p.set("list-item",w)}}catch{}return p},a=(f,l,u)=>{let p=s(u,l,f);e.set(f,p);let h=p;for(let d of f.children)h=a(d,p,h);let m=new Map;for(let[d,g]of u){let y=g.length,b=h.get(d);m.set(d,b&&b.length?b.slice(0,y):g.slice())}for(let[d,g]of h)!m.has(d)&&g.length&&!l.has(d)&&m.set(d,g.slice(0,1));return m},c=new Map;return a(n,c,c),{get(f,l){let u=e.get(f)?.get(l);return u&&u.length?u[u.length-1]:0},getStack(f,l){let u=e.get(f)?.get(l);return u?u.slice():[]}}}function hs(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(r,(i,o,s)=>{let a=String(s).split(",").map(c=>c.trim());if(o==="counter"){let c=a[0]?.replace(/^["']|["']$/g,""),f=(a[1]||"decimal").toLowerCase(),l=n.get(e,c);return us(l,f)}else{let c=a[0]?.replace(/^["']|["']$/g,""),f=a[1]?.replace(/^["']|["']$/g,"")??"",l=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,c);return u.length?u.map(h=>us(h,l)).join(f):""}})}catch{return"- "}}de();var Ee=new WeakMap,ms=1e3;function Yl(t,e){let n=ws(t);return e?(e.__pseudoPreflightFp!==n&&(At(),e.__pseudoPreflight=gs(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):(At(),gs(t,n))}function Wn(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function ws(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let s=0;s<e.length;s++){let a=e[s];if(a.tagName==="STYLE"){let c=a.textContent?a.textContent.length:0;n+=`S${c}|`;let f=a.sheet,l=f?Wn(f):null;l&&(r+=l.length)}else{let c=a.getAttribute("href")||"",f=a.getAttribute("media")||"all";n+=`L${c}|m:${f}|`;let l=a.sheet,u=l?Wn(l):null;u&&(r+=u.length)}}let i=t.adoptedStyleSheets,o=0;if(Array.isArray(i))for(let s of i){let a=Wn(s);a&&(o+=a.length)}return n+=`ass:${Array.isArray(i)?i.length:0}/${o}|tr:${r}`,n}function Jr(t,e,n){let r=Wn(t);if(!r)return!1;for(let i=0;i<r.length;i++){if(n.budget<=0)return!1;let o=r[i],s=o&&o.cssText?o.cssText:"";n.budget--;for(let a of e)if(s.includes(a))return!0;if(o&&o.styleSheet&&Jr(o.styleSheet,e,n))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let a=0;a<o.cssRules.length&&n.budget>0;a++){let c=o.cssRules[a],f=c&&c.cssText?c.cssText:"";n.budget--;for(let l of e)if(f.includes(l))return!0}if(n.budget<=0)return!1}return!1}function gs(t=document,e=ws(t)){let n=Ee.get(t);if(n&&n.fingerprint===e)return n.result;let r=a=>(a.match(/\|ass:[^|]*/)||[""])[0];n&&r(e)!==r(n.fingerprint)&&xe();let i=["::before","::after","::first-letter","::marker","::first-line",":before",":after",":first-letter",":first-line","counter(","counters(","counter-increment","counter-reset"],o=t.querySelectorAll("style");for(let a=0;a<o.length;a++){let c=o[a].textContent||"";for(let f of i)if(c.includes(f))return Ee.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let a={budget:ms};try{for(let c of s)if(Jr(c,i,a))return Ee.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let a=t.querySelectorAll('style,link[rel~="stylesheet"]'),c={budget:ms};for(let f=0;f<a.length&&c.budget>0;f++){let l=a[f],u=null;if(l.tagName,u=l.sheet||null,u&&Jr(u,i,c))return Ee.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Ee.set(t,{fingerprint:e,result:!0}),!0):(Ee.set(t,{fingerprint:e,result:!1}),!1)}function ys(t){for(let e of["Top","Right","Bottom","Left"]){let n=parseFloat(t[`border${e}Width`])||0,r=t[`border${e}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function Kl(t,e){let n=null,r=()=>{if(!n)try{n=ps(t)}catch(i){D(e,"buildCounterContext failed",i),n={get:()=>0,getStack:()=>[]}}return n};return{get(i,o){return r().get(i,o)},getStack(i,o){return r().getStack(i,o)}}}function Ql(t){let e=!1;for(let n=0;n<t.length;n++){let r=t[n];if(r==='"')e=!e;else if(r==="/"&&!e)return t.slice(0,n).trim()}return t}function Jl(t){return t.replace(/\\(?:([0-9a-fA-F]{1,6})[ \t\n]?|([\s\S]))/g,(e,n,r)=>{if(n){let i=parseInt(n,16);return i===0||i>1114111?"\uFFFD":String.fromCodePoint(i)}return r===`
15
- `?"":r})}function Zl(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,r=0,i;for(;i=n.exec(t);){let s=t.slice(r,i.index).trim();s&&e.push(s),e.push(Jl(i[1]!==void 0?i[1]:i[2])),r=n.lastIndex}let o=t.slice(r).trim();return o&&e.push(o),e.join("")}function Zr(t,e,n){let r=t.parentElement,i=r&&n?n.get(r):null;return i?{get(o,s){let a=e.get(o,s),c=i.get(s);return typeof c=="number"?Math.max(a,c):a},getStack(o,s){let a=e.getStack(o,s);if(!a.length)return a;let c=i.get(s);if(typeof c=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],c),f}return a}}:e}function to(t,e,n){let r=new Map,i=(f,l)=>sn(f,l).map(([u,p])=>({name:u,num:p})),o=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function c(f){if(r.has(f))return r.get(f).slice();let l=n.getStack(t,f);l=l.length?l.slice():[];let u=o.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;l=l.length?[...l,m]:[m]}let p=s.find(m=>m.name===f);if(p){let m=Number.isFinite(p.num)?p.num:0;l.length===0&&(l=[0]),l[l.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;l.length===0&&(l=[0]),l[l.length-1]+=m}return r.set(f,l.slice()),l}return{get(f,l){let u=c(l);return u.length?u[u.length-1]:0},getStack(f,l){return c(l)},__incs:a}}var tf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],ef=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function bs(t,e,n,r,i,o){try{if(r===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=W(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(r))return;if(i==="::marker"&&!(W(t).display||"").includes("list-item"))return;let s=W(t,i),a=W(t);if(!s)return;let c="";for(let u of o){let p=s.getPropertyValue(u);p&&p!==a.getPropertyValue(u)&&!(u==="background-color"&&p==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&p==="baseline")&&(c+=`${u}:${p};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(c+=`content:${u};`)}if(!c)return;let l=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(l,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${l}]${i}{${c}}`}catch{}}function nf(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",r="\u201D";try{let i=W(e).quotes;if(i==="none")n="",r="";else if(i&&i!=="auto"){let o=i.match(/"[^"]*"|'[^']*'/g);o&&o.length>=2&&(n=o[0].slice(1,-1),r=o[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),r=r.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,o)=>o?o==="open-quote"?`"${n}"`:o==="close-quote"?`"${r}"`:'""':i)}function rf(t,e,n,r){let i;try{i=W(t,e)}catch{}let o=i?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};o=Ql(o),o=nf(o,t);let s=Zr(t,n,r),a=to(t,i,s),c=ds(o)?hs(o,t,a):o;return{text:Zl(c),incs:a.__incs||[]}}function of(t,e){if(e.__shadowPseudo)return!1;let n=ke(t),r=[];for(let o of["before","after","firstLetter","marker","firstLine"]){let s=n[o];if(s===null)return!1;s&&r.push(s)}if(!r.length)return!0;let i=r.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function Re(t,e,n,r,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let o=t.ownerDocument||document;if(!i&&!Yl(o,n)&&!n.__shadowPseudo||!i&&of(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=Kl(t.ownerDocument||document,n));let s=n.__counterCtx,a=ke(t);a.marker!==""&&bs(t,e,n,a.marker,"::marker",tf),a.firstLine!==""&&bs(t,e,n,a.firstLine,"::first-line",ef);for(let f of["::before","::after","::first-letter"]){let l=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}try{let u=W(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!ys(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let U=W(t),G=(U?.display||"").toLowerCase();if(G.includes("flex")||G.includes("grid"))continue;let j=Ut=>u[Ut]!==U[Ut]&&(parseFloat(u[Ut])||0)!==0;if(!(u.color!==U.color||u.fontSize!==U.fontSize||u.fontWeight!==U.fontWeight||u.fontFamily!==U.fontFamily||u.fontStyle!==U.fontStyle||u.textTransform!==U.textTransform||u.float!==U.float&&u.float!=="none"||j("paddingTop")||j("paddingRight")||j("paddingBottom")||j("paddingLeft")||j("marginTop")||j("marginRight")||j("marginBottom")||j("marginLeft")))continue;let Et=Array.from(e.childNodes).find(Ut=>Ut.nodeType===Node.TEXT_NODE&&Ut.textContent?.trim().length>0);if(!Et)continue;let yt=Et.textContent,ue=/^\s*/.exec(yt)[0],hn=yt.slice(ue.length),He=hn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],dr=hn.slice(He?.length||0);if(!He||/[\uD800-\uDFFF]/.test(He))continue;let Bt=document.createElement("span");Bt.textContent=He,Bt.dataset.snapdomPseudo="::first-letter";let pr=ge(u,Sn(t)),hr=me(pr,"span");n.styleMap.set(Bt,hr);let mn=document.createTextNode(dr);e.replaceChild(mn,Et),e.insertBefore(Bt,mn),ue&&e.insertBefore(document.createTextNode(ue),Bt);continue}let m=u.content??"",d=m===""||m==="none"||m==="normal",{text:g,incs:y}=rf(t,f,s,n.__siblingCounters),b=u.backgroundImage,S=u.backgroundColor,k=u.fontFamily,v=parseInt(u.fontSize)||32,w=parseInt(u.fontWeight)||!1,C=u.fontStyle||"normal",A=u.color||"#000",M=u.transform,x=Mt(k,r?.__iconMatchers),_=!d&&g!=="",R=b&&b!=="none",T=S&&S!=="transparent"&&S!=="rgba(0, 0, 0, 0)",$=ys(u),O=M&&M!=="none",H=m!=="none"&&m!=="normal",E=/^inline-/.test(u.display||""),L=H&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||E),P=H&&u.boxShadow&&u.boxShadow!=="none",F=H&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(_||R||T||$||O||L||P||F)){if(y&&y.length&&t.parentElement){let U=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:G}of y){if(!G)continue;let j=Zr(t,s,n.__siblingCounters),Et=to(t,W(t,f),j).get(t,G);U.set(G,Et)}n.__siblingCounters.set(t.parentElement,U)}continue}let z=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),q=!1;if(_&&!x&&g.length>1&&!z){let U=W(t),G=parseFloat(U.fontSize)||16,j=parseFloat(U.lineHeight);Number.isFinite(j)||(j=G*1.5),t.getBoundingClientRect().height<j*1.6&&(e.style.whiteSpace="nowrap",q=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",q&&(B.style.whiteSpace="nowrap");let Z=Ai(t,f,u,n,r),_t=(W(t).display||"").toLowerCase(),Dt=_t.includes("flex")||_t.includes("grid");if(Dt){let U=Z["min-width"];(!U||U==="auto"||U==="0px")&&(Z["min-width"]="0px")}let gt=me(Z,"span",_,Dt);if(n.styleMap.set(B,gt),x&&g&&g.length===1){let{dataUrl:U,width:G,height:j}=await ns(g,k,w,v,A,C),ut=document.createElement("img");ut.src=U,ut.style=`height:${v}px;width:${G/j*v}px;object-fit:contain;`,B.appendChild(ut),e.dataset.snapdomHasIcon="true"}else if(g&&z){let U=Ve(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??te(g);if(U?.trim())try{let G=await it(zt(U),{as:"dataURL",useProxy:r.useProxy});if(G?.ok&&typeof G.data=="string"){let j=document.createElement("img");j.src=G.data,j.style=`width:${v}px;height:auto;object-fit:contain;`,B.appendChild(j)}}catch(G){console.error(`[snapdom] Error in pseudo ${f} for`,t,G)}}else!x&&_&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(R)try{let U=Vt(b),G=await Promise.all(U.map(j=>pe(j,r)));B.style.backgroundImage=G.join(", ")}catch(U){console.warn(`[snapdom] Failed to inline background-image for ${f}`,U)}T&&(B.style.backgroundColor=S);let st=u.maskImage||u.webkitMaskImage;if(st&&st!=="none")try{let G=(await Promise.all(Vt(st).map(j=>pe(j,r)))).join(", ");B.style.maskImage=G,B.style.webkitMaskImage=G;for(let j of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[j]&&(B.style[j]=u[j])}catch(U){console.warn(`[snapdom] Failed to inline mask-image for ${f}`,U)}let Pt=B.childNodes.length>0||B.textContent?.trim()!==""||R||T||$||O||L||P||F;if(y&&y.length&&t.parentElement){let U=n.__siblingCounters.get(t.parentElement)||new Map,G=Zr(t,s,n.__siblingCounters),j=to(t,W(t,f),G);for(let{name:ut}of y){if(!ut)continue;let Et=j.get(t,ut);U.set(ut,Et)}n.__siblingCounters.set(t.parentElement,U)}if(!Pt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[snapdom] Failed to capture ${f} for`,t,u)}}let c=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of c){let l=n.nodeMap.get(f);l?.nodeType===1&&await Re(l,f,n,r,!0)}else{let f=Array.from(t.children);for(let l=0;l<Math.min(f.length,c.length);l++)await Re(f[l],c[l],n,r,!0)}}bt();function Ss(t,e,n){if(!t||t?.nodeType!==1)return;let r=t.ownerDocument||document,i=e||r,o=Nt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],c=w=>window.CSS&&CSS.escape?CSS.escape(w):w.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",l=w=>{if(!w||!w.getAttribute)return null;let C=w.getAttribute("href")||w.getAttribute("xlink:href")||(typeof w.getAttributeNS=="function"?w.getAttributeNS(f,"href"):null);if(C)return C;let A=w.attributes;if(!A)return null;for(let M=0;M<A.length;M++){let x=A[M];if(!x||!x.name)continue;if(x.name==="href")return x.value;let _=x.name.indexOf(":");if(_!==-1&&x.name.slice(_+1)==="href")return x.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(w=>w.id)),p=new Set,h=!1,m=(w,C=null)=>{if(!w)return;s.lastIndex=0;let A;for(;A=s.exec(w);){h=!0;let M=(A[1]||"").trim();M&&(u.has(M)||(p.add(M),C&&!C.has(M)&&C.add(M)))}},d=w=>{let C=w.querySelectorAll("use");for(let x of C){let _=l(x);if(!_||!_.startsWith("#"))continue;h=!0;let R=_.slice(1).trim();R&&!u.has(R)&&p.add(R)}let A='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(w.getAttribute("style")||"");for(let x of a)m(w.getAttribute(x));let M=w.querySelectorAll(A);for(let x of M){m(x.getAttribute("style")||"");for(let _ of a)m(x.getAttribute(_))}},g=w=>{if(!w||w.nodeType!==1||!w.querySelectorAll)return;let C="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",A=!1;try{A=!!(i.querySelector&&i.querySelector(C))}catch{return}if(!A)return;let M=["filter","clipPath","mask","maskImage","webkitMaskImage"],x=_=>{if(Nt(_))return;let R;try{R=getComputedStyle(_)}catch{return}for(let T of M){let $=R[T];$&&$.includes("url(")&&m($)}};x(w);for(let _ of w.querySelectorAll("*"))x(_)};for(let w of o)d(w);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=r.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,S=w=>{if(!w||u.has(w))return null;let C=c(w),A=M=>{let x=i.querySelector(M);return x&&!t.contains(x)?x:null};return A(`svg defs > *#${C}`)||A(`svg > symbol#${C}`)||A(`*#${C}`)};if(!p.size)return;let k=new Set(p),v=new Set;for(;k.size;){let w=k.values().next().value;if(k.delete(w),!w||u.has(w)||v.has(w))continue;let C=S(w);if(!C){v.add(w);continue}b||(b=r.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let A=C.cloneNode(!0);A.id||A.setAttribute("id",w),b.appendChild(A),v.add(w),u.add(w);let M=[A,...A.querySelectorAll("*")];for(let x of M){let _=l(x);if(_&&_.startsWith("#")){let T=_.slice(1).trim();T&&!u.has(T)&&!v.has(T)&&k.add(T)}let R=x.getAttribute?.("style")||"";R&&m(R,k);for(let T of a){let $=x.getAttribute?.(T);$&&m($,k)}}}}bt();var eo=new WeakMap,no=new WeakMap;function On(t,e,n){let r=n.get(t),i=t.style;if(!r){let s=i.cssText,a=t.hasAttribute("style");r={users:0,saved:e.map(([f,l])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,l,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,r)}r.users++;let o=!1;return()=>{if(!o&&(o=!0,!--r.users)){if(n.delete(t),i.cssText===r.forcedCSS)i.cssText=r.originalCSS;else for(let s of r.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!r.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function xs(t){if(eo.has(t))return On(t,[],eo);let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,i=n!=="none"&&parseFloat(r)>0,o=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&o){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,r],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return On(t,s,eo)}return()=>{}}function Dn(t,e=null){let n=[],r=i=>{if(!kt(i))return;if(no.has(i)){n.push(On(i,[],no));return}let o=getComputedStyle(i);(o.contentVisibility||o.getPropertyValue("content-visibility")||"")==="auto"&&n.push(On(i,[["content-visibility","visible"]],no))};try{if(e){let o=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){r(s);for(let c=s.firstElementChild;c;c=c.nextElementSibling)o(c)}};o(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}ht();dt();wt();ye();wt();function oo(t){return ks(t.boxShadow)}function io(t){return ks(t.textShadow)}function ks(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",r=0;for(let c=0;c<t.length;c++){let f=t[c];f==="("?r++:f===")"&&(r=Math.max(0,r-1)),f===","&&r===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,o=0,s=0,a=0;for(let c of e){if(/\binset\b/i.test(c))continue;let f=c.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[l,u,p=0,h=0]=f,m=Math.abs(l)+p+h,d=Math.abs(u)+p+h;o=Math.max(o,m+Math.max(l,0)),a=Math.max(a,m+Math.max(-l,0)),s=Math.max(s,d+Math.max(u,0)),i=Math.max(i,d+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(s),left:Math.ceil(a)}}function so(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,i;for(;i=n.exec(e);)r+=parseFloat(i[1])||0;let o=Math.ceil(r*2);return{top:o,right:o,bottom:o,left:o}}function ao(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,r=e+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function co(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,s=0,a=!1;for(let c of n){a=!0;let f=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(d=>parseFloat(d))||[],[l=0,u=0,p=0]=f,h=Math.abs(l)+p,m=Math.abs(u)+p;i=Math.max(i,h+Math.max(l,0)),s=Math.max(s,h+Math.max(-l,0)),o=Math.max(o,m+Math.max(u,0)),r=Math.max(r,m+Math.max(-u,0))}return{bleed:{top:I(r),right:I(i),bottom:I(o),left:I(s)},has:a}}function sf(t){let e=oo(t),n=io(t),r=so(t),i=ao(t),o=co(t);return{top:Math.max(e.top,n.top)+r.top+i.top+o.bleed.top,right:Math.max(e.right,n.right)+r.right+i.right+o.bleed.right,bottom:Math.max(e.bottom,n.bottom)+r.bottom+i.bottom+o.bleed.bottom,left:Math.max(e.left,n.left)+r.left+i.left+o.bleed.left}}function af(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function vs(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",r=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:r||e!=="visible",y:r||n!=="visible"}}function Cs(t,e,n,r=1,i=1){let o=0,s=0,a=0,c=0,f=vs(n.get(t)||W(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let l=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let p=n.get(u);if(!p||!af(p))continue;let h=sf(p);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),d={left:m.left-h.left/r,top:m.top-h.top/i,right:m.right+h.right/r,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=vs(n.get(g)||W(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(d.left=Math.max(d.left,b.left),d.right=Math.min(d.right,b.right)),y.y&&(d.top=Math.max(d.top,b.top),d.bottom=Math.min(d.bottom,b.bottom))}if(g===t)break}f.x||(c=Math.max(c,(l.left-d.left)*r),s=Math.max(s,(d.right-l.right)*r)),f.y||(o=Math.max(o,(l.top-d.top)*i),a=Math.max(a,(d.bottom-l.bottom)*i))}return{top:Math.max(0,Math.ceil(o)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(c))}}function As(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let c=null;try{c=ae(t).scale}catch{}try{e.style.transform="none"}catch{}if(!c)return{a:1,b:0,c:0,d:1};let f=Kt({scale:c});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(c,f,l,u){let p=Math.sqrt(c*c+f*f)||0,h=0,m=0;if(p>0){let d=c/p,g=f/p;h=d*l+g*u;let y=l-d*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:p,b:0,c:h*m,d:m}}let o=c=>{let f=ae(t).scale;if(!f)return c;let l=Kt({scale:f,baseTransform:`matrix(${c.a},${c.b},${c.c},${c.d},0,0)`});return{a:l.a,b:l.b,c:l.c,d:l.d}},s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let c=s[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===6&&c.every(Number.isFinite)){let[f,l,u,p]=c,h=i(f,l,u,p);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let c=a[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===16&&c.every(Number.isFinite)){let f=c[0],l=c[1],u=c[4],p=c[5],h=i(f,l,u,p);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}try{let c=new DOMMatrix(r),f=i(c.a,c.b,c.c,c.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return o(f)}catch{return null}}function Fe(t,e,n,r,i){let o=n.a,s=n.b,a=n.c,c=n.d,f=n.e||0,l=n.f||0;function u(y,b){let S=y-r,k=b-i,v=o*S+a*k,w=s*S+c*k;return v+=r+f,w+=i+l,[v,w]}let p=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,d=-1/0,g=-1/0;for(let[y,b]of p)y<h&&(h=y),b<m&&(m=b),y>d&&(d=y),b>g&&(g=b);return{minX:h,minY:m,maxX:d,maxY:g,width:d-h,height:g-m}}function an(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],s=(a,c)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?c/2:f==="right"||f==="bottom"?c:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*c/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(o,n)}}function ae(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},o=i("rotate");if(o)if(o.angle){let c=o.angle;e.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit,o.is2D===!1&&o.x&&o.y&&o.z&&(e.rotate=`${o.x.value} ${o.y.value} ${o.z.value} ${e.rotate}`)}else o.unit?e.rotate=o.unit==="rad"?o.value*180/Math.PI+"deg":o.value+o.unit:e.rotate=String(o);else{let c=getComputedStyle(t);e.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let s=i("scale");if(s){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[c(s.x),c(s.y)??c(s.x),...s.is2D===!1?[c(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(c).join(" "):e.scale=String(s)}else{let c=getComputedStyle(t);e.scale=c.scale&&c.scale!=="none"?c.scale:null}let a=i("translate");if(a){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[c(a.x),c(a.y)??"0px",...a.is2D===!1?[c(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(c).join(" "):e.translate=String(a)}else{let c=getComputedStyle(t);e.translate=c.translate&&c.translate!=="none"?c.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var ro=null;function cf(){if(ro?.isConnected)return ro;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),ro=t,t}function Kt(t){let e=o=>{let s=[],a=0,c=0,f=String(o).trim();for(let l=0;l<f.length;l++)f[l]==="("?a++:f[l]===")"?a--:/\s/.test(f[l])&&!a&&(l>c&&s.push(f.slice(c,l)),c=l+1);return c<f.length&&s.push(f.slice(c)),s},n=o=>o&&o!=="none",r=[];if(n(t.translate)){let o=e(t.translate);for(let s=0;s<2&&s<o.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(o[s])&&Number.isFinite(a)&&(o[s]=`${parseFloat(o[s])*a/100}px`)}r.push(o.length>2?`translate3d(${o.join(",")})`:`translate(${o.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let o=e(t.rotate);o.length===4?r.push(`rotate3d(${o.join(",")})`):o.length===2&&/^[xyz]$/i.test(o[0])?r.push(`rotate${o[0].toUpperCase()}(${o[1]})`):r.push(`rotate(${o.join(" ")})`)}if(n(t.scale)){let o=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);r.push(o.length>2?`scale3d(${o.join(",")})`:`scale(${o.join(",")})`)}if(n(t.baseTransform)&&r.push(t.baseTransform),!r.length)return new DOMMatrix;let i=r.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let o=cf(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("Invalid transform composition");o.appendChild(s);try{return lf(s)}finally{s.remove()}}}function Ms(t){let e=W(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||o||s)}function lf(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var Fs=new WeakSet;function Bn(t,e){if(!e)return null;let n=t.ownerDocument||document,r=n.defaultView||window,i,o,s,a;if(e==="viewport")i=0,o=0,s=n.documentElement?.clientWidth||r.innerWidth,a=n.documentElement?.clientHeight||r.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(r.scrollX||0),o=(Number(e.y)||0)-(r.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:o,width:s,height:a,right:i+s,bottom:o+a}:null}function lo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Lt(e)?e.host:null}function ff(t,e){for(let n=e;n;n=lo(n))if(n===t)return!0;return!1}function uf(t,e){for(let n=lo(t);n&&n!==e&&n?.nodeType===1;n=lo(n)){let r=W(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function uo(t,e){try{return Kt({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function Ts(t,e,n,r,i){let o=t.getBoundingClientRect();kt(e)&&W(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,c]of n){if(!kt(a)||c?.nodeType!==1||c===t||!ff(t,c))continue;let f=r.get(c)||W(c),l=f.position;if(l!=="fixed"&&l!=="sticky"&&l!=="-webkit-sticky"||a.style.position==="absolute")continue;let u=c.getBoundingClientRect();if(!(u.width>0&&u.height>0))continue;Fs.add(a);let p=f.transform&&f.transform!=="none"?f.transform:"",h=ae(c),m=!!(p||h.rotate!=="0deg"||h.scale||h.translate),d=m?uo(p,h):null,g=!d||!d.is2D||d.a===1&&d.b===0&&d.c===0&&d.d===1,y=u.width,b=u.height;g||(y=c.offsetWidth||u.width,b=c.offsetHeight||u.height);let S=c.getRootNode&&Lt(c.getRootNode()),k=o,v=t.clientLeft||0,w=t.clientTop||0;if(S){let _=uf(c,t);_&&(k=_.getBoundingClientRect(),v=_.clientLeft||0,w=_.clientTop||0)}let C=u.left-k.left-v,A=u.top-k.top-w;if(m)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",g)a.style.transform="none";else{a.style.transform=`matrix(${d.a},${d.b},${d.c},${d.d},0,0)`;let{ox:_,oy:R}=an(f,y,b),T=Fe(y,b,{a:d.a,b:d.b,c:d.c,d:d.d,e:0,f:0},_,R);C-=T.minX,A-=T.minY}if(l!=="fixed"){let _=a.cloneNode(!1);_.setAttribute("data-snap-ph","1"),_.style.position="static",_.style.visibility="hidden",_.style.width=`${y}px`,_.style.height=`${b}px`,_.style.boxSizing="border-box",a.parentElement?.insertBefore(_,a)}let M=y+2,x=b;i&&(Math.abs(A-i.y)<.5&&(A-=1,x+=1),Math.abs(C-i.x)<.5&&(C-=1,M+=1)),a.style.position="absolute",a.style.left=`${C}px`,a.style.top=`${A}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${M}px`,a.style.height=`${x}px`,a.style.boxSizing="border-box",S||s.push(a)}for(let a of s)e.appendChild(a)}function $s(t,e,n={}){if(!t||!e||!e.style)return;let r=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){D(n,"stripRootShadows boxShadow",s)}try{e.style.textShadow="none"}catch(s){D(n,"stripRootShadows textShadow",s)}try{e.style.outline="none"}catch(s){D(n,"stripRootShadows outline",s)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=o.length?o:"none"}catch(s){D(n,"stripRootShadows filter",s)}}function Ps(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function _s(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",r=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||r!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function df(t,e){let n=Array.from(t.childNodes),r=e==="top"?n:n.reverse();for(let i of r){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let o=getComputedStyle(i),s=String(o.display||"");if(!(s==="none"||s==="contents")&&!(o.position==="absolute"||o.position==="fixed"))return o.float&&o.float!=="none"||s.startsWith("inline")?null:i}return null}function Ns(t,e,n){if(!t||!e||!e.style)return;let r=getComputedStyle(t);if(!_s(r))for(let i of["top","bottom"]){let o=i==="top"?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let c=df(s,i);if(!c)break;let f=n?Array.from(a.children).find(p=>n.get(p)===c)||null:a.children[Array.from(s.children).indexOf(c)]||null,l=getComputedStyle(c),u=parseFloat(l[`margin${o}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${o}`]="0px"),_s(l)||(parseFloat(l[`border${o}Width`])||0)>0||(parseFloat(l[`padding${o}`])||0)>0)break;s=c,a=f}}}var pf=new Set(["xml","xlink"]);function hf(t,e){if(t.startsWith("*")||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!pf.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var mf=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,Es=t=>t.replace(mf,e=>e.length===2?e:""),gf=/^data:[^,]{0,120};base64,/;function Un(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,r=a=>{for(let c of Array.from(a.attributes)){if(hf(c.name,n)){a.removeAttribute(c.name);continue}if(gf.test(c.value))continue;let f=Es(c.value);if(f!==c.value)try{a.setAttribute(c.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=o.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)r(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=Es(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function yf(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var bf=new Set(["img","canvas","video","iframe","object","embed"]);function wf(t){return Nt(t)||bf.has(t?.localName)}function Sf(t,e){if(t?.nodeType!==1||yf(t)||wf(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function Ls(t,e,n=new Map,r=null){function i(o,s){if(o?.nodeType!==1||s?.nodeType!==1)return;let a=o.childElementCount>s.childElementCount,c=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,c),a&&Sf(o,c)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let l=c.overflowY||c.overflowBlock||"visible",u=c.overflowX||c.overflowInline||"visible";(l!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(r)for(let l of f){let u=r.get(l);u&&u.nodeType===1&&i(u,l)}else{let l=Array.from(o.children);for(let u=0;u<Math.min(l.length,f.length);u++)i(l[u],f[u])}}i(t,e)}function xf(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function vf(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){D(e,"exclude selector match failed",r)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(r){D(e,"exclude predicate failed",r)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){D(e,"filter function failed",n)}return!1}function po(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),i=1/0,o=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(vf(h,e)||!xf(h))continue;let m=h.getBoundingClientRect(),d=m.top-r.top,g=m.bottom-r.top;g<=d||(d<i&&(i=d),g>o&&(o=g),s=!0)}let c=s?Math.max(0,o-i):0,f=parseFloat(n.borderTopWidth)||0,l=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,p=parseFloat(n.paddingBottom)||0;return f+l+u+p+c}var I=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t,Te=.75;function Is(t,e,n,r,i,o){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),c=i>0&&a.width>0?a.width/i:1,f=o>0&&a.height>0?a.height/o:1;if(Math.abs(c-f)>.02)return 0;let l=s.createElement("div");J(l),l.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=l.attachShadow({mode:"open"}),p=s.createElement("style");p.textContent=n,u.appendChild(p);let h=e.cloneNode(!0);u.appendChild(h),s.body.appendChild(l);let m=0,d=(g,y,b)=>{let S=W(g),k=S.boxSizing==="border-box",v=(w,C,...A)=>{let M=parseFloat(w);if(!Number.isFinite(M))return C;let x=M+(k?0:A.reduce((_,R)=>_+(parseFloat(R)||0),0));return Math.abs(x-C)<=.51?x:C};return{width:v(S.width,y,S.paddingLeft,S.paddingRight,S.borderLeftWidth,S.borderRightWidth),height:v(S.height,b,S.paddingTop,S.paddingBottom,S.borderTopWidth,S.borderBottomWidth)}};try{let g=h.getBoundingClientRect(),y=h.offsetWidth||i,b=h.offsetHeight||o,S=y>0&&g.width>0?g.width/y:1,k=b>0&&g.height>0?g.height/b:1,v=(w,C,A=!1)=>{let M=w.children,x=C.children,_=Math.min(M.length,x.length);for(let R=0;R<_;R++){let T=M[R],$=x[R],O=r.get(T),H=A||Fs.has(T);if(O?.nodeType===1&&kt(T)&&T.style&&O.isConnected){let E=O.getBoundingClientRect();if(E.width>0&&E.height>0){let L=$.getBoundingClientRect(),P=E.width/c,F=E.height/f,V=L.width,z=L.height,q=O.offsetWidth||P,B=O.offsetHeight||F,Z=$.offsetWidth||V,_t=$.offsetHeight||z,Dt=Math.abs(P-q)>Te||Math.abs(F-B)>Te||Math.abs(V-Z)>Te||Math.abs(z-_t)>Te;if(H){let at=d($,Z,_t);P=V>0?P*S*at.width/V:P,F=z>0?F*k*at.height/z:F,V=at.width,z=at.height}else if(Dt){let at=d(O,q,B),Pt=d($,Z,_t);P=at.width,F=at.height,V=Pt.width,z=Pt.height}let gt=V-P,st=z-F;(Math.abs(gt)>Te||Math.abs(st)>Te)&&(T.style.boxSizing="border-box",T.style.width=`${I(P)}px`,T.style.height=`${I(F)}px`,m++)}}v(T,$,H)}};v(e,h)}finally{l.remove()}return m}var kf=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function fo(t,e=new Set){let n="";if(!t)return n;for(let r=0;r<t.length;r++){let i=t[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=fo(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let o=fo(i.cssRules,e);o&&(n+=`@media ${i.conditionText}{${o}}`);continue}if(i.type===CSSRule.STYLE_RULE){let o=i.selectorText||"";if(kf.test(o)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var Rs=new WeakMap;function Cf(t){let e="";for(let n of t.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+r+"|"}return e}function Af(t){if(!t||!t.styleSheets)return"";let e=Cf(t),n=Rs.get(t);if(n&&n.fp===e)return n.css;let r=new Set,i="";for(let o of Array.from(t.styleSheets))try{let s=o.cssRules;s&&(i+=fo(s,r))}catch{}return Rs.set(t,{fp:e,css:i}),i}function Ws(t,e){let n=Rr(t.clone).sort(),r=n.join(","),i=en(t.element),o=N.baseStyle.get(r),s;o&&o.universe===i?s=o.css:(s=Fr(n,i),N.baseStyle.set(r,{universe:i,css:s}));let a=Af(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}St();var Hn=new Set;async function Os(t,e={}){At(),kn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,o=null;if(e.clip&&(o=Bn(t,e.clip),o&&(r.clip={rect:o,root:t})),e.captureSelection)try{r.selection=Vi(t)}catch(d){D(r,"prepareSelectionContext failed",d)}let s,a="",c="";if(Hn.size){let d=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||b.getRootNode()?.host)if(b===g)return!0;return!1};for(;;){let g=[...Hn].filter(({root:y})=>d(y,t)||d(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!r.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let d=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=d.right<=0||d.bottom<=0||d.left>=g.innerWidth||d.top>=g.innerHeight,b=[];if(y&&(()=>{let k=[];t.shadowRoot&&k.push(t.shadowRoot);for(let v of t.querySelectorAll("*"))v.shadowRoot&&k.push(v.shadowRoot);for(;k.length;){let v=k.pop(),w=v.host?.localName==="calcite-icon";for(let C of v.querySelectorAll("*")){if(C.shadowRoot&&k.push(C.shadowRoot),!w||C.localName!=="svg")continue;let A=C.querySelectorAll("path");if(!A.length||[...A].some(x=>x.getAttribute("d")?.trim()))continue;let M=C.getBoundingClientRect();M.width&&M.height&&b.push(C)}}})(),b.length){let k=(async()=>{let w=t.style,C=t.hasAttribute("style"),A=new Map,M=(x,_)=>{A.has(x)||A.set(x,{value:w.getPropertyValue(x),priority:w.getPropertyPriority(x)}),w.setProperty(x,_,"important");let R=A.get(x);R.forcedValue=w.getPropertyValue(x),R.forcedPriority=w.getPropertyPriority(x)};try{M("left","0"),M("top","0"),M("right","auto"),M("bottom","auto"),M("margin-top","0"),M("margin-right","0"),M("margin-bottom","0"),M("margin-left","0"),M("transform","none"),M("translate","none"),M("opacity","0"),M("pointer-events","none");let x=t.getBoundingClientRect();if(x.right<=0||x.bottom<=0||x.left>=g.innerWidth||x.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),$=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,O=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;M("position","fixed"),M("left",`${$}px`),M("top",`${O}px`)}await pt(100);let _=Date.now()+1500,R=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(O=>O.getAttribute("d")?.trim()))return!1;let $=T.getBoundingClientRect();return $.width&&$.height&&$.right>0&&$.bottom>0&&$.left<g.innerWidth&&$.top<g.innerHeight});for(;Date.now()<_&&R();)await new Promise(T=>setTimeout(T,25));await pt(100)}finally{for(let[x,_]of A)w.getPropertyValue(x)!==_.forcedValue||w.getPropertyPriority(x)!==_.forcedPriority||(_.value?w.setProperty(x,_.value,_.priority):w.removeProperty(x));!C&&!w.length&&t.removeAttribute("style"),await pt(100)}})(),v={root:t,promise:k};Hn.add(v);try{await k}finally{Hn.delete(v)}}}catch{}let f=xs(t),l=Dn(t,o);if(o){let d=t.getBoundingClientRect(),g=t.offsetWidth||d.width,y=t.offsetHeight||d.height,b=d.width&&Math.abs(g-d.width)>=1?g/d.width:1,S=d.height&&Math.abs(y-d.height)>=1?y/d.height:1;i={x:(o.left-d.left)*b,y:(o.top-d.top)*S,width:o.width*b,height:o.height*S}}try{s=await Yt(t,r,e)}catch(d){throw console.warn("deepClone failed:",d),d}finally{l(),f()}r.slicer?.due()&&await r.slicer.pause();try{Ss(s,void 0,t)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{await Re(t,s,r,e)}catch(d){console.warn("inlinePseudoElements failed:",d)}await Mn(s,r);for(let[d,g]of r.nodeMap.entries())if(g?.tagName==="STYLE"&&d?.tagName==="STYLE"&&!d.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(d.textContent||"")&&(d.textContent=se(y))}catch{}try{let d=s.querySelectorAll("style[data-sd]");for(let g of d)c+=g.textContent||"",g.remove()}catch(d){D(r,"Failed to extract shadow CSS from style[data-sd]",d)}r.slicer?.due()&&await r.slicer.pause();let u=Xe(r.styleMap);a=Array.from(u.entries()).map(([d,g])=>`.${g}{${d}}`).join("");let h=c+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(r.__pseudoCSS||"");a=h+a;for(let[d,g]of r.styleMap.entries())ho(d,g,u);try{Mf(t,s,r.nodeMap)}catch(d){D(r,"top-layer lift failed",d)}if((r.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let d=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};Ts(t,s,r.nodeMap,r.styleCache,d)}catch(d){D(r,"freezeViewportPositioned failed",d)}for(let[d,g]of r.nodeMap.entries())r.clip&&g===t||mo(d,g);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let d=r.styleCache.get(m.documentElement)||W(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&d.overflowX==="visible"&&d.overflowY==="visible"&&d.contain==="none"&&!d.containerType?.includes("size")&&d.contentVisibility!=="auto"&&d.contentVisibility!=="hidden"){let y=r.styleCache.get(m.body)||W(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===r.nodeMap.get(s)){let d=r.styleCache.get(t)||W(t);r.styleCache.set(t,d);let g=yr(d.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none"}for(let[d,g]of r.nodeMap.entries())g.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}function Mf(t,e,n){let r=[];for(let s of[":modal",":popover-open"])try{r.push(...t.querySelectorAll(s))}catch{}if(!r.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let o=214748e4;for(let s of r){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let c=getComputedStyle(s,"::backdrop"),f=c.backgroundColor,l=c.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||l&&l!=="none"){let p=document.createElement("div");p.setAttribute("data-sd-backdrop",""),p.style.cssText=`position:fixed;inset:0;z-index:${o};background-color:${f};`+(l&&l!=="none"&&l.includes("data:")?`background-image:${l};`:""),e.appendChild(p)}}catch{}o+=1,a.style.zIndex=String(o),e.appendChild(a),o+=1}}}function ho(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Lt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let r=n.get(e);r&&t.classList.add(r);let i=t.style?.backgroundImage,o=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),o&&(t.style.verticalAlign="middle",t.style.display="inline")}function mo(t,e){let n=e.scrollLeft,r=e.scrollTop;if(!(n||r)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let s=t.querySelectorAll("*");for(let a of s){if(a.nodeType!==1||a.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let c=a.style.position;if(c==="fixed"||c==="absolute"){let f=parseFloat(a.style.top)||0,l=parseFloat(a.style.left)||0;a.style.top=`${f+r}px`,a.style.left=`${l+n}px`,c==="fixed"&&(a.style.position="absolute")}}}catch{}let o=document.createElement("div");for(o.style.all="unset",o.style.transform=`translate(${-n}px, ${-r}px)`,o.style.willChange="transform",o.style.display="inline-block",o.style.width="100%";t.firstChild;)o.appendChild(t.firstChild);t.appendChild(o)}de();ee();dt();var Ds="http://www.w3.org/1999/xlink";function _f(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Ds,"href"):null)}function Ef(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,r=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||o||r||t.width||t.naturalWidth||100,c=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:c}}async function zn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let r=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||Ae(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=a.src||"";if(!c)return;let f=N.image?.get(c);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=await it(c,{as:"dataURL",useProxy:e.useProxy});if(l.ok&&typeof l.data=="string"&&l.data.startsWith("data:")){N.image?.set(c,l.data),a.src=l.data,l.blob&&(a.__snapdomBlob=l.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:p}=Ef(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:p,src:c,element:a}):h;if(m){let d=await it(m,{as:"dataURL",useProxy:e.useProxy});if(d?.ok&&typeof d.data=="string"){a.src=d.data,a.width||(a.width=u),a.height||(a.height=p);return}}}catch{}if(e.placeholders!==!1){xt(e.__session,"image-fallback",`image failed to inline, using placeholder: ${c}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${p}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${p}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${p}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let c=n.slice(a,a+i).map(r);await Promise.allSettled(c)}let o=Array.from(t.querySelectorAll("image"));t.localName==="image"&&o.unshift(t);let s=async a=>{let c=_f(a);if(!c||c.startsWith("data:")||c.startsWith("blob:"))return;let f=await it(c,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(Ds,"href"))};for(let a=0;a<o.length;a+=i){let c=o.slice(a,a+i).map(s);await Promise.allSettled(c)}}St();ht();var Rf=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Ff=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Tf=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],$f=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function Pf(t,e,n,r){let i=n.get(t)||W(t);n.has(t)||n.set(t,i);let o=xi(t),s=o?m=>m in o?o[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),c=s("border-image-source"),f=a&&a!=="none"||c&&c!=="none",l=i.getPropertyValue("background-image"),u=s("background-color"),p=l&&l!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=Rt()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(p&&!h)for(let m of Tf){let d=s(m);d&&e.style.setProperty(m,d)}for(let m of Rf){if(h&&m==="background-image")continue;let d=i.getPropertyValue(m);if(m==="background-image"&&(!d||d==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(d=Vt(b).filter(S=>/url\s*\(/.test(S)).join(", ")||d)}if(!d||d==="none")continue;let g=Vt(d),y=await Promise.all(g.map(b=>pe(b,r)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Ff){let d=s(m);!d||d==="initial"||e.style.setProperty(m,d)}if(f)for(let m of $f){let d=s(m);!d||d==="initial"||e.style.setProperty(m,d)}if(p&&/fixed/.test(s("background-attachment")||""))try{await Lf(t,e,i)}catch{}}function Nf(t,e,n,r,i){let o=(t||"auto").trim();if(o==="cover"||o==="contain"){if(!e||!n)return{w:r,h:i};let p=o==="cover"?Math.max(r/e,i/n):Math.min(r/e,i/n);return{w:e*p,h:n*p}}let s=o.split(/\s+/),a=(p,h)=>{if(p==="auto"||p===void 0)return null;if(p.endsWith("px"))return parseFloat(p);if(p.endsWith("%"))return h*parseFloat(p)/100},c=a(s[0],r),f=a(s[1],i);if(c===void 0||f===void 0)return null;let l=c,u=f;return l==null&&u==null?(l=e||r,u=n||i):l==null?l=e&&n?u*(e/n):r:u==null&&(u=e&&n?l*(n/e):i),!l||!u?null:{w:l,h:u}}async function Lf(t,e,n){let r=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=Ye();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let d=W(m);(d.transform&&d.transform!=="none"||d.filter&&d.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "));return}let o=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,c=s.innerHeight,f=Vt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),l=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),p=[],h=[];for(let m=0;m<f.length;m++){let d=r[m%r.length]||"scroll",g=l[m%l.length],y=u[m%u.length];if(d!=="fixed"){p.push(g),h.push(y);continue}let b=0,S=0,k=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(k)try{let x=new Image;x.src=k[1],await x.decode(),b=x.naturalWidth,S=x.naturalHeight}catch{p.push(g),h.push(y);continue}let v=Nf(g,b,S,a,c);if(!v){p.push(g),h.push(y);continue}let w=y.split(/\s+/),C=(x,_,R)=>{if(!x)return 0;if(x.endsWith("px"))return parseFloat(x);if(x.endsWith("%"))return(_-R)*parseFloat(x)/100},A=C(w[0]||"0%",a,v.w),M=C(w[1]||w[0]||"0%",c,v.h);if(A===void 0||M===void 0){p.push(g),h.push(y);continue}p.push(`${jn(v.w)}px ${jn(v.h)}px`),h.push(`${jn(A-o.left)}px ${jn(M-o.top)}px`)}e.style.setProperty("background-size",p.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "))}var jn=t=>Math.round(t*100)/100;async function Vn(t,e,n,r={},i=new Map){if(!e)return;let o=[];t&&Ur(t)&&o.push([t,e]);let s=[e];for(;s.length;){let c=s.pop();if(c.children)for(let f of c.children){if(f.tagName==="STYLE")continue;let l=i.get(f);l&&Ur(l)&&o.push([l,f]),s.push(f)}}let a=6;for(let c=0;c<o.length;c+=a)await Promise.allSettled(o.slice(c,c+a).map(([f,l])=>Pf(f,l,n,r)))}ht();function Us(t,e,n=new Map){let r=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let c=n.get(a);if(c?.nodeType!==1)continue;let f=W(c),l=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");l&&l!=="none"&&a!==e&&r.push({cloneEl:a,orig:c,bf:l,path:Df(e,a)})}if(!r.length)return;let o=t.getBoundingClientRect(),s=r.map((a,c)=>{let f=e.cloneNode(!0);Of(f,e,a.orig.getBoundingClientRect(),n),Bf(Bs(f,a.path));for(let l=0;l<c;l++){let u=Bs(f,r[l].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:c,bf:f,copy:l}of s)If.has(a.tagName)||Wf(a,c,f,l,o)}var If=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function Wf(t,e,n,r,i){let o=e.getBoundingClientRect();if(!o.width||!o.height)return;let s=W(e),a=e.offsetWidth?o.width/e.offsetWidth:1,c=Math.abs(a-1)>.001?1/a:1;r.style.position="absolute",r.style.left=`${(i.left-o.left)*c}px`,r.style.top=`${(i.top-o.top)*c}px`,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,c!==1&&(r.style.transform=`scale(${c})`,r.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(r);let l=document.createElement("div");l.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",l.style.backgroundColor=s.backgroundColor,l.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])l.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(l),t.prepend(f)}var qn=128;function Of(t,e,n,r){let i=[[t,e]];for(;i.length;){let[o,s]=i.pop(),a=r.get(s);if(a?.nodeType===1){let l=a.getBoundingClientRect();(l.left>n.right+qn||l.right<n.left-qn||l.top>n.bottom+qn||l.bottom<n.top-qn)&&(o.tagName==="IMG"&&o.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),o.style&&(o.style.backgroundImage="none"))}let c=o.children,f=s.children;for(let l=0;l<c.length;l++)i.push([c[l],f[l]])}}function Df(t,e){let n=[];for(let r=e;r!==t;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function Bs(t,e){if(!e)return null;let n=t;for(let r of e)if(n=n.children[r],!n)return null;return n}function Bf(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}ht();St();dt();dt();function go(t){return Go(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ee();function Xn(t,e){if(!t)return()=>{};let n=[],r=200;function i(o){if(e){let f=o.getBoundingClientRect();if(f.width>0||f.height>0){let l=Math.max(f.right,f.left+(o.scrollWidth||0)),u=Math.max(f.bottom,f.top+(o.scrollHeight||0));if(l<e.left-r||f.left>e.right+r||u<e.top-r||f.top>e.bottom+r)return}}let s=getComputedStyle(o),a=Uf(o,s);a&&n.push(a);let c=Hf(o,s);c&&n.push(c);for(let f of o.children||[])i(f)}return i(t),()=>n.forEach(o=>o())}function Uf(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=zf(e);if(n<=0)return()=>{};if(!js(t))return()=>{};let r=zs(t),i=r.text,o=Vf(e);r.write("X");let s=t.scrollHeight-o;r.restore();let a=s>0?s:jf(e),c=Math.round(a*n+o);if(t.scrollHeight<=c+.5)return()=>{};let f=0,l=i.length,u=-1;for(;f<=l;){let h=f+l>>1;r.write(i.slice(0,Gn(i,h))+"\u2026"),t.scrollHeight<=c+.5?(u=h,f=h+1):l=h-1}let p=(u>=0?i.slice(0,Gn(i,u)):"")+"\u2026";return r.write(p),Hs(t,p,r)}function Hf(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!js(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=zs(t),r=n.text,i=0,o=r.length,s=-1;for(;i<=o;){let c=i+o>>1;n.write(r.slice(0,Gn(r,c))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=c,i=c+1):o=c-1}let a=(s>=0?r.slice(0,Gn(r,s)):"")+"\u2026";return n.write(a),Hs(t,a,n)}function Hs(t,e,n){return()=>{t.textContent===e&&n.restore()}}function zs(t){let e=[];for(let r=t.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&e.push(r);let n=e.map(r=>r.data);return{text:n.join(""),write(r){e[0].data=r;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let r=0;r<e.length;r++)e[r].data=n[r]}}}function Gn(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function zf(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function jf(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function Vf(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function js(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var $e=["clone","render"],cn={clone:0,render:1},ft="render";function Vs(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:ft,loweredBy:[]};let n=-1,r=[];for(let o of e){if(!o||typeof o!="object")continue;let s=o.needs===void 0?ft:o.needs;if(!Object.prototype.hasOwnProperty.call(cn,s))throw new Error(`[snapdom] plugin '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${$e.join(", ")}`);r.push({name:o.name||"(unnamed)",needs:s}),n=Math.max(n,cn[s])}if(n<0)return{stage:ft,loweredBy:[]};let i=$e[n];return{loweredBy:i===ft?[]:r.filter(o=>o.needs===i).map(o=>o.name),stage:i}}function Pe(t,e){return cn[t]>=cn[e]}function qs(t,e,n=$e){let r=n[n.length-1];if(e==null)return r;if(!Object.prototype.hasOwnProperty.call(cn,e))throw new Error(`[snapdom] ${t}: needs must be one of ${$e.join(", ")}, got ${JSON.stringify(e)}`);if(!n.includes(e))throw new Error(`[snapdom] ${t} cannot run at stage '${e}': it supports ${n.join(", ")}`);return e}function Gs(t,e,n){let r=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[snapdom] no ${n}: this capture stopped at '${t}' because ${r} declared needs: '${t}' (result.needs says so too). It is not re-captured on demand \u2014 that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var Ne=[];function Le(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function yo(...t){let e=t.flat();for(let n of e){let r=Le(n);if(r){if(r.needs!==void 0&&r.needs!==ft)throw new Error(`[snapdom] global plugin '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(r.needs)}. A global plugin must run to '${ft}': lowering it here would stop EVERY capture in the app short of pixels. Pass it per capture instead: snapdom(el, { plugins: [<plugin>] }).`);Ne.some(i=>i&&i.name&&r.name&&i.name===r.name)||Ne.push(r)}}}function Xs(t){return t&&Array.isArray(t.plugins)?t.plugins:Ne}async function Ot(t,e,n){let r=n,i=Xs(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,r);typeof a<"u"&&(r=a)}return r}async function Yn(t,e,n){let r=[],i=Xs(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&r.push(a)}return r}function qf(){Ne.length=0}var Gf=0;function Xf(t){let e=[];if(Array.isArray(t))for(let n of t){let r=Le(n);if(!r)continue;r.name||(r.name=`anonymous-${++Gf}`);let i=e.findIndex(o=>o&&o.name===r.name);i>=0&&e.splice(i,1),e.push(r)}for(let n of Ne)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function Ys(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=Xf(e)),t}function bo(){return Ne.slice()}var Yf=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function Kn(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let r=Le(n);if(!(!r||r.pure===!0)){for(let i of Yf)if(typeof r[i]=="function")return!0}}return!1}dt();ye();var le="data-snapdom-asset",Zs="http://www.w3.org/1999/xlink",Kf=0;function Jn(t,e,n,r,i,o){let s=o.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++Kf),properties:[]},s.set(t,a),t.setAttribute(le,a.token));let c=a.properties.find(f=>f.kind===e&&f.name===n);c?(c.compressed!==r&&(c.original=r),c.compressed=i):a.properties.push({kind:e,name:n,original:r,compressed:i})}var ta=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function Zn(t,e){let n=new Map;if(!t||!e)return n;let r=[t,...t.querySelectorAll(`[${le}]`)];for(let i of r){let o=e.get(i);if(!o||i.getAttribute(le)!==o.token)continue;let s=o.properties.filter(a=>ta(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(o.token,Object.freeze(s))}return n}function tr(t,e){if(!t||!e)return;let n=0;for(let r of[t,...t.querySelectorAll(`[${le}]`)]){let i=e.get(r);i&&(i.token=String(++n),r.setAttribute(le,i.token))}}function ea(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),r=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(r.querySelector("parsererror"))return t;let i=!1;for(let o of r.querySelectorAll(`[${le}]`))for(let s of e.get(o.getAttribute(le))||[])ta(o,s)===s.compressed&&(s.kind==="style"?o.style.setProperty(s.name,s.original,o.style.getPropertyPriority(s.name)):s.name==="xlink:href"?o.setAttributeNS(Zs,s.name,s.original):o.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(r))}`:t}function Ks(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function wo(t,e){let n=e.element||t,r=n.isConnected?W(n):n.style,i=e.__compressionClip,o=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(r?.width)||o(n,"width"),a=i?.height||n.offsetHeight||parseFloat(r?.height)||o(n,"height"),c=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(c||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:Kt({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,d=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,d)}}catch{s=0,a=0}let l=(c||f?Math.max(c?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=l;let u=new WeakMap,p=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?W(h):h.style,d=1;try{m?.perspective&&m.perspective!=="none"&&(d=1/0);let g=m?.transform;if(g&&g!=="none")d*=Ks(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let S=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([S.a,S.b,S.c,S.d,S.e,S.f]))}d*=Ks(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));d*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(d*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=v=>/^\d+(?:\.\d+)?px$/.test(m?.[v]||"")?parseFloat(m[v]):o(h,v),S=b("width"),k=b("height");d*=S>0&&k>0?Math.max(S/y.width,k/y.height):1/0}}catch{d=1/0}return Number.isFinite(d)||(d=1/0),h!==n&&(d*=p(h.parentElement||h.getRootNode?.().host)),u.set(h,d),d};return{density:l,stretch:p}}var na=.92,ra=1;async function Qf(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=r}),e)}function Jf(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var Zf=64*1024,Qs=32*1024*1024,Qn=new Map;function tu(t,e,n,r){if(n.length+(r?.length||0)>Qs)return;t.set(e,{source:n,result:r});let i=0;for(let o of t.values())i+=o.source.length+(o.result?.length||0);for(;i>Qs;){let o=t.keys().next().value,s=t.get(o);i-=s.source.length+(s.result?.length||0),t.delete(o)}}function eu(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let r=Math.ceil(e/3)*4,i=t.length-n-1,o=Math.min(i,r);try{let s=atob(t.slice(n+1,n+1+o-o%4)),a=new Uint8Array(s.length);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}catch{return null}}function nu(t){let e=eu(t,4096);if(!e||e.length<16)return null;let n=r=>e[r]<<8|e[r+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let r=e[15];if(r===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(r===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(r===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let r=2;for(;r+9<e.length;){if(e[r]!==255){r++;continue}let i=e[r+1];if(i===216||i===1||i>=208&&i<=215){r+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(r+5),w:n(r+7)};let o=n(r+2);if(o<2)break;r+=2+o}}return null}function Js(t,e,n,r){let i=Math.min(1,Math.max(n/t,r/e));return!(i>0)||i>=.95?0:i}var ru=`self.onmessage = async (e) => {
14
+ `):l+=p[0]}return l+=a.slice(u),l}let s=es(t,e||location.href);return s=await o(s,e||location.href,0),s}var as=/url\((["']?)([^"')]+)\1\)/g,tf=/@font-face[^{}]*\{[^}]*\}/g;function Ct(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function cs(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let i=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!i)continue;let o=i[1],s=i[2],a=c=>{if(!c.includes("?"))return parseInt(c,16);let f=parseInt(c.replace(/\?/g,"0"),16),l=parseInt(c.replace(/\?/g,"F"),16);return[f,l]};if(s){let c=a(o),f=a(s),l=Array.isArray(c)?c[0]:c,u=Array.isArray(f)?f[1]:f;e.push([Math.min(l,u),Math.max(l,u)])}else{let c=a(o);Array.isArray(c)?e.push([c[0],c[1]]):e.push([c,c])}}return e}function ls(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,i]of e)if(n>=r&&n<=i)return!0;return!1}function Qr(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(as)){let i=(r[2]||"").trim();if(!(!i||i.startsWith("data:"))){if(!/^https?:/i.test(i))try{i=new URL(i,e||location.href).href}catch{}n.push(i)}}return n}async function Xr(t,e,n=""){let r=t;for(let i of t.matchAll(as)){let o=te(i[0]);if(!o)continue;let s=o;if(!s.startsWith("http")&&!s.startsWith("data:"))try{s=new URL(s,e||location.href).href}catch{}if(N.resource?.has(s)){r=r.replace(i[0],`url(${N.resource.get(s)})`);continue}try{let a=await it(s,{as:"dataURL",useProxy:n,silent:!0});if(a.ok&&typeof a.data=="string"){let c=a.data;N.resource?.set(s,c),r=r.replace(i[0],`url(${c})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",s)}}return r}function ef(t){if(!t.length)return null;let e=(a,c)=>t.some(([f,l])=>!(l<a||f>c)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),i=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}function ns(t={}){let e=new Set((t.families||[]).map(i=>String(i).toLowerCase())),n=new Set((t.domains||[]).map(i=>String(i).toLowerCase())),r=new Set((t.subsets||[]).map(i=>String(i).toLowerCase()));return(i,o)=>{if(e.size&&e.has(i.family.toLowerCase()))return!0;if(n.size)for(let s of i.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(r.size){let s=ef(o);if(s&&r.has(s))return!0}return!1}}function nf(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let o of t.match(e)||[]){let s=Ct(o,"font-family"),a=Kr(s),c=Ct(o,"font-weight","400"),f=Ct(o,"font-style","normal"),l=Ct(o,"font-stretch","100%"),u=Ct(o,"unicode-range"),p=Ct(o,"src"),h=Qr(p,location.href),m=h.length?h.map(g=>String(g).toLowerCase()).sort().join("|"):p.toLowerCase(),d=[String(a||"").toLowerCase(),c,f,l,u.toLowerCase(),m].join("|");n.has(d)||(n.add(d),r.push(o))}if(r.length===0)return t;let i=0;return t.replace(e,()=>r[i++]||"")}var rs=new WeakMap,rf=0;function of(t){let e=rs.get(t);return e===void 0&&(e=rf++,rs.set(t,e)),e}function sf(t,e,n,r,i,o,s,a,c){let f=Array.from(t||[]).sort().join("|"),l=0,u=0;for(let b of s||[]){let S=Math.imul(b,2654435761);S^=S>>>15,S=Math.imul(S,2246822507),S^=S>>>13,l=l+S|0,u++}let p=e?JSON.stringify({families:(e.families||[]).map(b=>String(b).toLowerCase()).sort(),domains:(e.domains||[]).map(b=>String(b).toLowerCase()).sort(),subsets:(e.subsets||[]).map(b=>String(b).toLowerCase()).sort()}):"",h=(n||[]).map(b=>`${(b.family||"").toLowerCase()}::${b.weight||"normal"}::${b.style||"normal"}::${b.stretchPct??100}::${b.src||""}`).sort().join("|"),m=r||"",d=(i||[]).map(b=>String(b).toLowerCase()).sort().join("|"),g=of(o||document),y=(a||[]).map(b=>String(b)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${p}::lf=${h}::px=${m}::fd=${d}::doc=${g}::cp=${l}::n=${u}::ic=${y}::env=${c}`}async function Yr(t,e,n,r){let i=r.doc?.defaultView||window;if(t.disabled||t.media?.mediaText&&!i.matchMedia(t.media.mediaText).matches)return;let o;try{o=t.cssRules||[]}catch{return}let s=(a,c)=>{try{return new URL(a,c||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let c=a.href?s(a.href,e):e;if(r.depth>=Ln){console.warn(`[snapDOM] CSSOM import depth exceeded (${Ln}) at ${c}`);continue}if(c&&r.visitedSheets.has(c)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${c}`);continue}c&&r.visitedSheets.add(c);let f={...r,depth:(r.depth||0)+1};await Yr(a.styleSheet,c,n,f);continue}if(a.cssRules?.length){if(a.type===CSSRule.MEDIA_RULE&&!i.matchMedia(a.conditionText).matches||a.type===CSSRule.SUPPORTS_RULE&&!i.CSS.supports(a.conditionText))continue;await Yr(a,e,n,r);continue}if(a.type===CSSRule.FONT_FACE_RULE){let c=(a.style.getPropertyValue("font-family")||"").trim(),f=Kr(c);if(!f||Tt(f,r.iconMatchers))continue;let l=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),p=(a.style.getPropertyValue("font-stretch")||"").trim(),h=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),d=(a.style.getPropertyValue("unicode-range")||"").trim(),g=l||"400",y=u||"normal",b=p||"100%",S=(u?`font-style:${u};`:"")+(l?`font-weight:${l};`:"")+(p?`font-stretch:${p};`:"")+(h?`font-variation-settings:${h};`:"")+(d?`unicode-range:${d};`:""),k=r.faceMatchesRequired(f,y,g,b);if(!k&&!r.requiredIndex.has(f.toLowerCase()))continue;let v=cs(d);if(!ls(r.usedCodepoints,v))continue;let w={family:f,weightSpec:g,styleSpec:y,stretchSpec:b,unicodeRange:d,srcRaw:m,srcUrls:Qr(m,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(w,v))continue;if(!k){r.provisionalFaces.push({family:f.toLowerCase(),block:`@font-face{font-family:${f};src:${m};${S}}`,srcRaw:m,baseHref:e||location.href});continue}r.coveredFamilies.add(f.toLowerCase());let C=`"${String(f).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(/url\(/i.test(m)){let A=await Xr(m,e||location.href,r.useProxy);await n(`@font-face{font-family:${C};src:${A};${S}}`)}else await n(`@font-face{font-family:${C};src:${m};${S}}`)}}}async function fs({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],iconMatchers:s=[],doc:a=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let c=new Map;for(let w of t){let[C,A,M,x]=String(w).split("__");if(!C)continue;let _=C.toLowerCase(),R=c.get(_)||[];R.push({w:parseInt(A,10),s:M,st:parseInt(x,10)}),c.set(_,R)}function f(w,C,A,M){let x=String(w).toLowerCase();if(!c.has(x))return!1;let _=c.get(x),R=Gl(A),T=Xl(C),$=Yl(M),O=R.min!==R.max,z=R.min,E=P=>T.kind==="normal"&&P==="normal"||T.kind!=="normal"&&(P==="italic"||P==="oblique"),L=!1;for(let P of _){let F=O?P.w>=R.min&&P.w<=R.max:P.w===z,V=E(Nn(P.s)),H=P.st>=$.min&&P.st<=$.max;if(F&&V&&H){L=!0;break}}if(L)return!0;if(!O)for(let P of _){let F=E(Nn(P.s)),V=P.st>=$.min&&P.st<=$.max;if(Math.abs(z-P.w)<=300&&F&&V)return!0}if(!O&&T.kind==="normal"&&_.some(F=>Nn(F.s)!=="normal"))for(let F of _){let V=Math.abs(z-F.w)<=300,H=F.st>=$.min&&F.st<=$.max;if(V&&H)return!0}return!1}let l=ns(n);ve(a),_t();let u=sf(t,n,r,i,o,a,e,s,ve(a));if(N.resource?.has(u))return N.resource.get(u);let p=Jl(t),h=[],m=ss;for(let w of a.querySelectorAll("style")){let C=w.textContent||"";for(let A of C.matchAll(m)){let M=(A[2]||A[4]||"").trim();if(!M||Gr(M,s))continue;a.querySelector(`link[rel="stylesheet"][href="${M}"]`)||h.push(M)}}let d=[];h.length&&await Promise.all(h.map(w=>new Promise(C=>{if(a.querySelector(`link[rel="stylesheet"][href="${w}"]`))return C(null);let A=a.createElement("link");A.rel="stylesheet",A.href=w,J(A),A.setAttribute("data-snapdom","injected-import");let M=setTimeout(()=>C(null),3e3),x=_=>{clearTimeout(M),C(_)};A.onload=()=>x(A),A.onerror=()=>x(null),a.head.appendChild(A),d.push(A)})));let g="",y=new Set,b=[],S=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(w=>!!w.href);for(let w of d)try{w.remove()}catch{}for(let w of S)try{if(Gr(w.href,s))continue;let C="",A=!1;try{A=new URL(w.href,location.href).origin===location.origin}catch{}if(!A){let x=Array.isArray(o)?o:[];if(!Ql(w.href,p,x))continue}if(A){let x=Array.from(a.styleSheets).find(_=>_.href===w.href);if(x)try{let _=x.cssRules||[];C=Array.from(_).map(R=>R.cssText).join("")}catch{}}if(!C){let x=await it(w.href,{as:"text",useProxy:i});x?.ok&&typeof x.data=="string"&&(C=x.data)}C=await Zl(C,w.href,i);let M="";for(let x of C.match(tf)||[]){let _=Ct(x,"font-family"),R=Kr(_);if(!R||Tt(R,s))continue;let T=Ct(x,"font-weight","400"),$=Ct(x,"font-style","normal"),O=Ct(x,"font-stretch","100%"),z=Ct(x,"unicode-range"),E=Ct(x,"src"),L=Qr(E,w.href),P=f(R,$,T,O);if(!P&&!c.has(R.toLowerCase()))continue;let F=cs(z);if(!ls(e,F))continue;let V={family:R,weightSpec:T,styleSpec:$,stretchSpec:O,unicodeRange:z,srcRaw:E,srcUrls:L,href:w.href};if(n&&l(V,F))continue;if(!P){b.push({family:R.toLowerCase(),block:x,srcRaw:E,baseHref:w.href});continue}y.add(R.toLowerCase());let H=/url\(/i.test(E)?await Xr(x,w.href,i):x;M+=H}M.trim()&&(g+=M)}catch{console.warn("[snapDOM] Failed to process stylesheet:",w.href)}let k={doc:a,requiredIndex:c,usedCodepoints:e,faceMatchesRequired:f,coveredFamilies:y,provisionalFaces:b,simpleExcluder:n?ns(n):null,useProxy:i,iconMatchers:s,visitedSheets:new Set,depth:0},v=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let w of v)if(!(w.href&&S.some(C=>C.href===w.href)))try{let C=w.href||a.baseURI||location.origin+"/";C&&k.visitedSheets.add(C),await Yr(w,C,async A=>{g+=A},k)}catch{}for(let w of b)y.has(w.family)||(g+=/url\(/i.test(w.srcRaw)?await Xr(w.block,w.baseHref,i):w.block);try{for(let w of a.fonts||[]){if(!w||!w.family||w.status!=="loaded"||!w._snapdomSrc)continue;let C=String(w.family).replace(/^['"]+|['"]+$/g,"");if(Tt(C,s)||!c.has(C.toLowerCase())||n?.families&&n.families.some(M=>String(M).toLowerCase()===C.toLowerCase()))continue;let A=w._snapdomSrc;if(!String(A).startsWith("data:"))if(N.resource?.has(w._snapdomSrc))A=N.resource.get(w._snapdomSrc);else try{let M=await it(w._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(M.ok&&typeof M.data=="string")A=M.data,N.resource?.set(w._snapdomSrc,A);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",w._snapdomSrc);continue}g+=`@font-face{font-family:'${C}';src:url(${A});font-style:${w.style||"normal"};font-weight:${w.weight||"normal"};}`}}catch{}for(let w of r){if(!w||typeof w!="object")continue;let C=String(w.family||"").replace(/^['"]+|['"]+$/g,"");if(!C||Tt(C,s)||!c.has(C.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===C.toLowerCase()))continue;let A=w.weight!=null?String(w.weight):"normal",M=w.style!=null?String(w.style):"normal",x=w.stretchPct!=null?`${w.stretchPct}%`:"100%",_=String(w.src||""),R=_;if(!R.startsWith("data:"))if(N.resource?.has(_))R=N.resource.get(_);else try{let T=await it(_,{as:"dataURL",useProxy:i,silent:!0});if(T.ok&&typeof T.data=="string")R=T.data,N.resource?.set(_,R);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",_);continue}g+=`@font-face{font-family:'${C}';src:url(${R});font-style:${M};font-weight:${A};font-stretch:${x};}`}return g&&(g=nf(g),N.resource?.set(u,g)),g}function In(t,e){let n=new Set,r=new Set;if(!t)return{required:n,usedCodepoints:r};let i=l=>{if(l)for(let u of l)r.add(u.codePointAt(0))},o=l=>{let u=Vl(l.fontFamily);if(u.length)for(let p of u)n.add(`${p}__${Pn(l.fontWeight)}__${Nn(l.fontStyle)}__${ql(l.fontStretch)}`)},s=Ae(t),a=t.getRootNode(),c=l=>{o(W(l));let u=l.getRootNode()===a?s:Ae(l);for(let p of["::before","::after"]){let h=p==="::before"?u.before:u.after;if(h!==null){if(h==="")continue;try{if(!l.matches(h))continue}catch{}}let m=W(l,p),d=m&&m.content;if(!(!d||d==="none"||d==="normal"))if(o(m),/^["']/.test(d))i(d.slice(1,-1));else{let g=d.match(/\\[0-9A-Fa-f]{1,6}/g);if(g)for(let y of g)try{r.add(parseInt(y.slice(1),16))}catch{}}}},f=[t];for(let l=0;l<f.length;l++){let u=f[l];u.nodeType===Node.ELEMENT_NODE&&c(u),u.shadowRoot&&f.push(u.shadowRoot);let p=(t.ownerDocument||document).createTreeWalker(u,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;p.nextNode();){let h=p.currentNode;if(h.nodeType===Node.TEXT_NODE){if(e&&h.parentElement&&!e(h.parentElement))continue;i(h.nodeValue||"")}else{if(e&&!e(h))continue;c(h),h.shadowRoot&&f.push(h.shadowRoot)}}}return{required:n,usedCodepoints:r}}async function Wn(t,e=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(t||[]).filter(Boolean);if(r.length===0)return;let i=()=>{let o=n.createElement("div");J(o),o.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let s of r){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${s}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",o.appendChild(a)}n.body.appendChild(o),o.offsetWidth,n.body.removeChild(o)};for(let o=0;o<Math.max(1,e);o++)i(),await pt(),await pt()}St();function hs(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function us(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function ds(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,t)),i="";for(let[o,s]of n)for(;r>=o;)i+=s,r-=o;return e?i:i.toLowerCase()}function ps(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return us(t,!1);case"upper-alpha":case"upper-latin":return us(t,!0);case"lower-roman":return ds(t,!1);case"upper-roman":return ds(t,!0);default:return String(t)}}function sn(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),r=[];for(let i=0;i<n.length;i++){let o=n[i];if(o==="none")continue;let s=n[i+1],a=s!==void 0&&Number.isFinite(Number(s));r.push([o,a?Number(s):e]),a&&i++}return r}function ms(t){let e=new WeakMap,n=Sr(t)?t.documentElement:t,r=f=>f&&f.tagName==="LI",i=new WeakMap,o=f=>{let l=new Map;for(let[u,p]of f)l.set(u,p.slice());return l},s=(f,l,u)=>{let p=o(f),h;try{h=getComputedStyle(u)}catch{h=u.style}let m;try{m=h?.counterReset}catch{}if(m&&m!=="none")for(let[y,b]of sn(m,0)){let S=l.get(y);if(S&&S.length){let k=S.slice();k.push(b),p.set(y,k)}else p.set(y,[b])}let d;try{d=h?.counterSet}catch{}if(d&&d!=="none")for(let[y,b]of sn(d,0)){let S=p.get(y)||[];S.length===0&&S.push(0),S[S.length-1]=b,p.set(y,S)}let g;try{g=h?.counterIncrement}catch{}if(g&&g!=="none")for(let[y,b]of sn(g,1)){let S=p.get(y)||[];S.length===0&&S.push(0),S[S.length-1]+=b,p.set(y,S)}try{if(h?.display==="list-item"&&r(u)){let y=u.parentElement,b=y&&i.get(y),S=y?.tagName==="OL"?parseInt(y.getAttribute("start"),10):NaN,k=b===void 0?Number.isFinite(S)?S:1:b+1,v=y?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(v)&&(k=v),y&&i.set(y,k);let w=p.get("list-item")||[];w.length===0&&w.push(0),w[w.length-1]=k,p.set("list-item",w)}}catch{}return p},a=(f,l,u)=>{let p=s(u,l,f);e.set(f,p);let h=p;for(let d of f.children)h=a(d,p,h);let m=new Map;for(let[d,g]of u){let y=g.length,b=h.get(d);m.set(d,b&&b.length?b.slice(0,y):g.slice())}for(let[d,g]of h)!m.has(d)&&g.length&&!l.has(d)&&m.set(d,g.slice(0,1));return m},c=new Map;return a(n,c,c),{get(f,l){let u=e.get(f)?.get(l);return u&&u.length?u[u.length-1]:0},getStack(f,l){let u=e.get(f)?.get(l);return u?u.slice():[]}}}function gs(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(r,(i,o,s)=>{let a=String(s).split(",").map(c=>c.trim());if(o==="counter"){let c=a[0]?.replace(/^["']|["']$/g,""),f=(a[1]||"decimal").toLowerCase(),l=n.get(e,c);return ps(l,f)}else{let c=a[0]?.replace(/^["']|["']$/g,""),f=a[1]?.replace(/^["']|["']$/g,"")??"",l=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,c);return u.length?u.map(h=>ps(h,l)).join(f):""}})}catch{return"- "}}he();var Fe=new WeakMap,ys=1e3;function af(t,e){let n=xs(t);return e?(e.__pseudoPreflightFp!==n&&(_t(),e.__pseudoPreflight=bs(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):(_t(),bs(t,n))}function On(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function xs(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let s=0;s<e.length;s++){let a=e[s];if(a.tagName==="STYLE"){let c=a.textContent?a.textContent.length:0;n+=`S${c}|`;let f=a.sheet,l=f?On(f):null;l&&(r+=l.length)}else{let c=a.getAttribute("href")||"",f=a.getAttribute("media")||"all";n+=`L${c}|m:${f}|`;let l=a.sheet,u=l?On(l):null;u&&(r+=u.length)}}let i=t.adoptedStyleSheets,o=0;if(Array.isArray(i))for(let s of i){let a=On(s);a&&(o+=a.length)}return n+=`ass:${Array.isArray(i)?i.length:0}/${o}|tr:${r}`,n}function Jr(t,e,n){let r=On(t);if(!r)return!1;for(let i=0;i<r.length;i++){if(n.budget<=0)return!1;let o=r[i],s=o&&o.cssText?o.cssText:"";n.budget--;for(let a of e)if(s.includes(a))return!0;if(o&&o.styleSheet&&Jr(o.styleSheet,e,n))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let a=0;a<o.cssRules.length&&n.budget>0;a++){let c=o.cssRules[a],f=c&&c.cssText?c.cssText:"";n.budget--;for(let l of e)if(f.includes(l))return!0}if(n.budget<=0)return!1}return!1}function bs(t=document,e=xs(t)){let n=Fe.get(t);if(n&&n.fingerprint===e)return n.result;let r=a=>(a.match(/\|ass:[^|]*/)||[""])[0];n&&r(e)!==r(n.fingerprint)&&ke();let i=["::before","::after","::first-letter","::marker","::first-line",":before",":after",":first-letter",":first-line","counter(","counters(","counter-increment","counter-reset"],o=t.querySelectorAll("style");for(let a=0;a<o.length;a++){let c=o[a].textContent||"";for(let f of i)if(c.includes(f))return Fe.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let a={budget:ys};try{for(let c of s)if(Jr(c,i,a))return Fe.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let a=t.querySelectorAll('style,link[rel~="stylesheet"]'),c={budget:ys};for(let f=0;f<a.length&&c.budget>0;f++){let l=a[f],u=null;if(l.tagName,u=l.sheet||null,u&&Jr(u,i,c))return Fe.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Fe.set(t,{fingerprint:e,result:!0}),!0):(Fe.set(t,{fingerprint:e,result:!1}),!1)}function ws(t){for(let e of["Top","Right","Bottom","Left"]){let n=parseFloat(t[`border${e}Width`])||0,r=t[`border${e}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function cf(t,e){let n=null,r=()=>{if(!n)try{n=ms(t)}catch(i){D(e,"buildCounterContext failed",i),n={get:()=>0,getStack:()=>[]}}return n};return{get(i,o){return r().get(i,o)},getStack(i,o){return r().getStack(i,o)}}}function lf(t){let e=!1;for(let n=0;n<t.length;n++){let r=t[n];if(r==='"')e=!e;else if(r==="/"&&!e)return t.slice(0,n).trim()}return t}function ff(t){return t.replace(/\\(?:([0-9a-fA-F]{1,6})[ \t\n]?|([\s\S]))/g,(e,n,r)=>{if(n){let i=parseInt(n,16);return i===0||i>1114111?"\uFFFD":String.fromCodePoint(i)}return r===`
15
+ `?"":r})}function uf(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,r=0,i;for(;i=n.exec(t);){let s=t.slice(r,i.index).trim();s&&e.push(s),e.push(ff(i[1]!==void 0?i[1]:i[2])),r=n.lastIndex}let o=t.slice(r).trim();return o&&e.push(o),e.join("")}function Zr(t,e,n){let r=t.parentElement,i=r&&n?n.get(r):null;return i?{get(o,s){let a=e.get(o,s),c=i.get(s);return typeof c=="number"?Math.max(a,c):a},getStack(o,s){let a=e.getStack(o,s);if(!a.length)return a;let c=i.get(s);if(typeof c=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],c),f}return a}}:e}function to(t,e,n){let r=new Map,i=(f,l)=>sn(f,l).map(([u,p])=>({name:u,num:p})),o=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function c(f){if(r.has(f))return r.get(f).slice();let l=n.getStack(t,f);l=l.length?l.slice():[];let u=o.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;l=l.length?[...l,m]:[m]}let p=s.find(m=>m.name===f);if(p){let m=Number.isFinite(p.num)?p.num:0;l.length===0&&(l=[0]),l[l.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;l.length===0&&(l=[0]),l[l.length-1]+=m}return r.set(f,l.slice()),l}return{get(f,l){let u=c(l);return u.length?u[u.length-1]:0},getStack(f,l){return c(l)},__incs:a}}var df=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],pf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function Ss(t,e,n,r,i,o){try{if(r===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=W(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(r))return;if(i==="::marker"&&!(W(t).display||"").includes("list-item"))return;let s=W(t,i),a=W(t);if(!s)return;let c="";for(let u of o){let p=s.getPropertyValue(u);p&&p!==a.getPropertyValue(u)&&!(u==="background-color"&&p==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&p==="baseline")&&(c+=`${u}:${p};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(c+=`content:${u};`)}if(!c)return;let l=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(l,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${l}]${i}{${c}}`}catch{}}function hf(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",r="\u201D";try{let i=W(e).quotes;if(i==="none")n="",r="";else if(i&&i!=="auto"){let o=i.match(/"[^"]*"|'[^']*'/g);o&&o.length>=2&&(n=o[0].slice(1,-1),r=o[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),r=r.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,o)=>o?o==="open-quote"?`"${n}"`:o==="close-quote"?`"${r}"`:'""':i)}function mf(t,e,n,r){let i;try{i=W(t,e)}catch{}let o=i?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};o=lf(o),o=hf(o,t);let s=Zr(t,n,r),a=to(t,i,s),c=hs(o)?gs(o,t,a):o;return{text:uf(c),incs:a.__incs||[]}}function gf(t,e){if(e.__shadowPseudo)return!1;let n=Ae(t),r=[];for(let o of["before","after","firstLetter","marker","firstLine"]){let s=n[o];if(s===null)return!1;s&&r.push(s)}if(!r.length)return!0;let i=r.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function Te(t,e,n,r,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let o=t.ownerDocument||document;if(!i&&!af(o,n)&&!n.__shadowPseudo||!i&&gf(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=cf(t.ownerDocument||document,n));let s=n.__counterCtx,a=Ae(t);a.marker!==""&&Ss(t,e,n,a.marker,"::marker",df),a.firstLine!==""&&Ss(t,e,n,a.firstLine,"::first-line",pf);for(let f of["::before","::after","::first-letter"]){let l=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}try{let u=W(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!ws(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let U=W(t),G=(U?.display||"").toLowerCase();if(G.includes("flex")||G.includes("grid"))continue;let j=Ut=>u[Ut]!==U[Ut]&&(parseFloat(u[Ut])||0)!==0;if(!(u.color!==U.color||u.fontSize!==U.fontSize||u.fontWeight!==U.fontWeight||u.fontFamily!==U.fontFamily||u.fontStyle!==U.fontStyle||u.textTransform!==U.textTransform||u.float!==U.float&&u.float!=="none"||j("paddingTop")||j("paddingRight")||j("paddingBottom")||j("paddingLeft")||j("marginTop")||j("marginRight")||j("marginBottom")||j("marginLeft")))continue;let Rt=Array.from(e.childNodes).find(Ut=>Ut.nodeType===Node.TEXT_NODE&&Ut.textContent?.trim().length>0);if(!Rt)continue;let hn=Rt.textContent,bt=/^\s*/.exec(hn)[0],wt=hn.slice(bt.length),ue=wt.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],de=wt.slice(ue?.length||0);if(!ue||/[\uD800-\uDFFF]/.test(ue))continue;let pe=document.createElement("span");pe.textContent=ue,pe.dataset.snapdomPseudo="::first-letter";let hr=be(u,xn(t)),mn=ye(hr,"span");n.styleMap.set(pe,mn);let gn=document.createTextNode(de);e.replaceChild(gn,Rt),e.insertBefore(pe,gn),bt&&e.insertBefore(document.createTextNode(bt),pe);continue}let m=u.content??"",d=m===""||m==="none"||m==="normal",{text:g,incs:y}=mf(t,f,s,n.__siblingCounters),b=u.backgroundImage,S=u.backgroundColor,k=u.fontFamily,v=parseInt(u.fontSize)||32,w=parseInt(u.fontWeight)||!1,C=u.fontStyle||"normal",A=u.color||"#000",M=u.transform,x=Tt(k,r?.__iconMatchers),_=!d&&g!=="",R=b&&b!=="none",T=S&&S!=="transparent"&&S!=="rgba(0, 0, 0, 0)",$=ws(u),O=M&&M!=="none",z=m!=="none"&&m!=="normal",E=/^inline-/.test(u.display||""),L=z&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||E),P=z&&u.boxShadow&&u.boxShadow!=="none",F=z&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(_||R||T||$||O||L||P||F)){if(y&&y.length&&t.parentElement){let U=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:G}of y){if(!G)continue;let j=Zr(t,s,n.__siblingCounters),Rt=to(t,W(t,f),j).get(t,G);U.set(G,Rt)}n.__siblingCounters.set(t.parentElement,U)}continue}let H=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),q=!1;if(_&&!x&&g.length>1&&!H){let U=W(t),G=parseFloat(U.fontSize)||16,j=parseFloat(U.lineHeight);Number.isFinite(j)||(j=G*1.5),t.getBoundingClientRect().height<j*1.6&&(e.style.whiteSpace="nowrap",q=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",q&&(B.style.whiteSpace="nowrap");let Z=Mi(t,f,u,n,r),Et=(W(t).display||"").toLowerCase(),Bt=Et.includes("flex")||Et.includes("grid");if(Bt){let U=Z["min-width"];(!U||U==="auto"||U==="0px")&&(Z["min-width"]="0px")}let yt=ye(Z,"span",_,Bt);if(n.styleMap.set(B,yt),x&&g&&g.length===1){let{dataUrl:U,width:G,height:j}=await os(g,k,w,v,A,C),ut=document.createElement("img");ut.src=U,ut.style=`height:${v}px;width:${G/j*v}px;object-fit:contain;`,B.appendChild(ut),e.dataset.snapdomHasIcon="true"}else if(g&&H){let U=Ve(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??te(g);if(U?.trim())try{let G=await it(Ht(U),{as:"dataURL",useProxy:r.useProxy});if(G?.ok&&typeof G.data=="string"){let j=document.createElement("img");j.src=G.data,j.style=`width:${v}px;height:auto;object-fit:contain;`,B.appendChild(j)}}catch(G){console.error(`[snapdom] Error in pseudo ${f} for`,t,G)}}else!x&&_&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(R)try{let U=Vt(b),G=await Promise.all(U.map(j=>me(j,r)));B.style.backgroundImage=G.join(", ")}catch(U){console.warn(`[snapdom] Failed to inline background-image for ${f}`,U)}T&&(B.style.backgroundColor=S);let st=u.maskImage||u.webkitMaskImage;if(st&&st!=="none")try{let G=(await Promise.all(Vt(st).map(j=>me(j,r)))).join(", ");B.style.maskImage=G,B.style.webkitMaskImage=G;for(let j of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[j]&&(B.style[j]=u[j])}catch(U){console.warn(`[snapdom] Failed to inline mask-image for ${f}`,U)}let Nt=B.childNodes.length>0||B.textContent?.trim()!==""||R||T||$||O||L||P||F;if(y&&y.length&&t.parentElement){let U=n.__siblingCounters.get(t.parentElement)||new Map,G=Zr(t,s,n.__siblingCounters),j=to(t,W(t,f),G);for(let{name:ut}of y){if(!ut)continue;let Rt=j.get(t,ut);U.set(ut,Rt)}n.__siblingCounters.set(t.parentElement,U)}if(!Nt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[snapdom] Failed to capture ${f} for`,t,u)}}let c=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of c){let l=n.nodeMap.get(f);l?.nodeType===1&&await Te(l,f,n,r,!0)}else{let f=Array.from(t.children);for(let l=0;l<Math.min(f.length,c.length);l++)await Te(f[l],c[l],n,r,!0)}}St();function vs(t,e,n){if(!t||t?.nodeType!==1)return;let r=t.ownerDocument||document,i=e||r,o=Lt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],c=w=>window.CSS&&CSS.escape?CSS.escape(w):w.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",l=w=>{if(!w||!w.getAttribute)return null;let C=w.getAttribute("href")||w.getAttribute("xlink:href")||(typeof w.getAttributeNS=="function"?w.getAttributeNS(f,"href"):null);if(C)return C;let A=w.attributes;if(!A)return null;for(let M=0;M<A.length;M++){let x=A[M];if(!x||!x.name)continue;if(x.name==="href")return x.value;let _=x.name.indexOf(":");if(_!==-1&&x.name.slice(_+1)==="href")return x.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(w=>w.id)),p=new Set,h=!1,m=(w,C=null)=>{if(!w)return;s.lastIndex=0;let A;for(;A=s.exec(w);){h=!0;let M=(A[1]||"").trim();M&&(u.has(M)||(p.add(M),C&&!C.has(M)&&C.add(M)))}},d=w=>{let C=w.querySelectorAll("use");for(let x of C){let _=l(x);if(!_||!_.startsWith("#"))continue;h=!0;let R=_.slice(1).trim();R&&!u.has(R)&&p.add(R)}let A='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(w.getAttribute("style")||"");for(let x of a)m(w.getAttribute(x));let M=w.querySelectorAll(A);for(let x of M){m(x.getAttribute("style")||"");for(let _ of a)m(x.getAttribute(_))}},g=w=>{if(!w||w.nodeType!==1||!w.querySelectorAll)return;let C="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",A=!1;try{A=!!(i.querySelector&&i.querySelector(C))}catch{return}if(!A)return;let M=["filter","clipPath","mask","maskImage","webkitMaskImage"],x=_=>{if(Lt(_))return;let R;try{R=getComputedStyle(_)}catch{return}for(let T of M){let $=R[T];$&&$.includes("url(")&&m($)}};x(w);for(let _ of w.querySelectorAll("*"))x(_)};for(let w of o)d(w);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=r.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,S=w=>{if(!w||u.has(w))return null;let C=c(w),A=M=>{let x=i.querySelector(M);return x&&!t.contains(x)?x:null};return A(`svg defs > *#${C}`)||A(`svg > symbol#${C}`)||A(`*#${C}`)};if(!p.size)return;let k=new Set(p),v=new Set;for(;k.size;){let w=k.values().next().value;if(k.delete(w),!w||u.has(w)||v.has(w))continue;let C=S(w);if(!C){v.add(w);continue}b||(b=r.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let A=C.cloneNode(!0);A.id||A.setAttribute("id",w),b.appendChild(A),v.add(w),u.add(w);let M=[A,...A.querySelectorAll("*")];for(let x of M){let _=l(x);if(_&&_.startsWith("#")){let T=_.slice(1).trim();T&&!u.has(T)&&!v.has(T)&&k.add(T)}let R=x.getAttribute?.("style")||"";R&&m(R,k);for(let T of a){let $=x.getAttribute?.(T);$&&m($,k)}}}}St();var eo=new WeakMap,no=new WeakMap;function Dn(t,e,n){let r=n.get(t),i=t.style;if(!r){let s=i.cssText,a=t.hasAttribute("style");r={users:0,saved:e.map(([f,l])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,l,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,r)}r.users++;let o=!1;return()=>{if(!o&&(o=!0,!--r.users)){if(n.delete(t),i.cssText===r.forcedCSS)i.cssText=r.originalCSS;else for(let s of r.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!r.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function ks(t){if(eo.has(t))return Dn(t,[],eo);let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,i=n!=="none"&&parseFloat(r)>0,o=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&o){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,r],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return Dn(t,s,eo)}return()=>{}}function Bn(t,e=null){let n=[],r=i=>{if(!At(i))return;if(no.has(i)){n.push(Dn(i,[],no));return}let o=getComputedStyle(i);(o.contentVisibility||o.getPropertyValue("content-visibility")||"")==="auto"&&n.push(Dn(i,[["content-visibility","visible"]],no))};try{if(e){let o=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){r(s);for(let c=s.firstElementChild;c;c=c.nextElementSibling)o(c)}};o(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}mt();dt();xt();we();xt();function oo(t){return As(t.boxShadow)}function io(t){return As(t.textShadow)}function As(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",r=0;for(let c=0;c<t.length;c++){let f=t[c];f==="("?r++:f===")"&&(r=Math.max(0,r-1)),f===","&&r===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,o=0,s=0,a=0;for(let c of e){if(/\binset\b/i.test(c))continue;let f=c.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[l,u,p=0,h=0]=f,m=Math.abs(l)+p+h,d=Math.abs(u)+p+h;o=Math.max(o,m+Math.max(l,0)),a=Math.max(a,m+Math.max(-l,0)),s=Math.max(s,d+Math.max(u,0)),i=Math.max(i,d+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(s),left:Math.ceil(a)}}function so(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,i;for(;i=n.exec(e);)r+=parseFloat(i[1])||0;let o=Math.ceil(r*2);return{top:o,right:o,bottom:o,left:o}}function ao(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,r=e+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function co(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,s=0,a=!1;for(let c of n){a=!0;let f=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(d=>parseFloat(d))||[],[l=0,u=0,p=0]=f,h=Math.abs(l)+p,m=Math.abs(u)+p;i=Math.max(i,h+Math.max(l,0)),s=Math.max(s,h+Math.max(-l,0)),o=Math.max(o,m+Math.max(u,0)),r=Math.max(r,m+Math.max(-u,0))}return{bleed:{top:I(r),right:I(i),bottom:I(o),left:I(s)},has:a}}function yf(t){let e=oo(t),n=io(t),r=so(t),i=ao(t),o=co(t);return{top:Math.max(e.top,n.top)+r.top+i.top+o.bleed.top,right:Math.max(e.right,n.right)+r.right+i.right+o.bleed.right,bottom:Math.max(e.bottom,n.bottom)+r.bottom+i.bottom+o.bleed.bottom,left:Math.max(e.left,n.left)+r.left+i.left+o.bleed.left}}function bf(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function Cs(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",r=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:r||e!=="visible",y:r||n!=="visible"}}function Ms(t,e,n,r=1,i=1){let o=0,s=0,a=0,c=0,f=Cs(n.get(t)||W(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let l=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let p=n.get(u);if(!p||!bf(p))continue;let h=yf(p);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),d={left:m.left-h.left/r,top:m.top-h.top/i,right:m.right+h.right/r,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=Cs(n.get(g)||W(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(d.left=Math.max(d.left,b.left),d.right=Math.min(d.right,b.right)),y.y&&(d.top=Math.max(d.top,b.top),d.bottom=Math.min(d.bottom,b.bottom))}if(g===t)break}f.x||(c=Math.max(c,(l.left-d.left)*r),s=Math.max(s,(d.right-l.right)*r)),f.y||(o=Math.max(o,(l.top-d.top)*i),a=Math.max(a,(d.bottom-l.bottom)*i))}return{top:Math.max(0,Math.ceil(o)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(c))}}function _s(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let c=null;try{c=ae(t).scale}catch{}try{e.style.transform="none"}catch{}if(!c)return{a:1,b:0,c:0,d:1};let f=Kt({scale:c});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(c,f,l,u){let p=Math.sqrt(c*c+f*f)||0,h=0,m=0;if(p>0){let d=c/p,g=f/p;h=d*l+g*u;let y=l-d*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:p,b:0,c:h*m,d:m}}let o=c=>{let f=ae(t).scale;if(!f)return c;let l=Kt({scale:f,baseTransform:`matrix(${c.a},${c.b},${c.c},${c.d},0,0)`});return{a:l.a,b:l.b,c:l.c,d:l.d}},s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let c=s[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===6&&c.every(Number.isFinite)){let[f,l,u,p]=c,h=i(f,l,u,p);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let c=a[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===16&&c.every(Number.isFinite)){let f=c[0],l=c[1],u=c[4],p=c[5],h=i(f,l,u,p);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}try{let c=new DOMMatrix(r),f=i(c.a,c.b,c.c,c.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return o(f)}catch{return null}}function $e(t,e,n,r,i){let o=n.a,s=n.b,a=n.c,c=n.d,f=n.e||0,l=n.f||0;function u(y,b){let S=y-r,k=b-i,v=o*S+a*k,w=s*S+c*k;return v+=r+f,w+=i+l,[v,w]}let p=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,d=-1/0,g=-1/0;for(let[y,b]of p)y<h&&(h=y),b<m&&(m=b),y>d&&(d=y),b>g&&(g=b);return{minX:h,minY:m,maxX:d,maxY:g,width:d-h,height:g-m}}function an(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],s=(a,c)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?c/2:f==="right"||f==="bottom"?c:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*c/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(o,n)}}function ae(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},o=i("rotate");if(o)if(o.angle){let c=o.angle;e.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit,o.is2D===!1&&o.x&&o.y&&o.z&&(e.rotate=`${o.x.value} ${o.y.value} ${o.z.value} ${e.rotate}`)}else o.unit?e.rotate=o.unit==="rad"?o.value*180/Math.PI+"deg":o.value+o.unit:e.rotate=String(o);else{let c=getComputedStyle(t);e.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let s=i("scale");if(s){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[c(s.x),c(s.y)??c(s.x),...s.is2D===!1?[c(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(c).join(" "):e.scale=String(s)}else{let c=getComputedStyle(t);e.scale=c.scale&&c.scale!=="none"?c.scale:null}let a=i("translate");if(a){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[c(a.x),c(a.y)??"0px",...a.is2D===!1?[c(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(c).join(" "):e.translate=String(a)}else{let c=getComputedStyle(t);e.translate=c.translate&&c.translate!=="none"?c.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var ro=null;function wf(){if(ro?.isConnected)return ro;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),ro=t,t}function Kt(t){let e=o=>{let s=[],a=0,c=0,f=String(o).trim();for(let l=0;l<f.length;l++)f[l]==="("?a++:f[l]===")"?a--:/\s/.test(f[l])&&!a&&(l>c&&s.push(f.slice(c,l)),c=l+1);return c<f.length&&s.push(f.slice(c)),s},n=o=>o&&o!=="none",r=[];if(n(t.translate)){let o=e(t.translate);for(let s=0;s<2&&s<o.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(o[s])&&Number.isFinite(a)&&(o[s]=`${parseFloat(o[s])*a/100}px`)}r.push(o.length>2?`translate3d(${o.join(",")})`:`translate(${o.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let o=e(t.rotate);o.length===4?r.push(`rotate3d(${o.join(",")})`):o.length===2&&/^[xyz]$/i.test(o[0])?r.push(`rotate${o[0].toUpperCase()}(${o[1]})`):r.push(`rotate(${o.join(" ")})`)}if(n(t.scale)){let o=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);r.push(o.length>2?`scale3d(${o.join(",")})`:`scale(${o.join(",")})`)}if(n(t.baseTransform)&&r.push(t.baseTransform),!r.length)return new DOMMatrix;let i=r.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let o=wf(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("Invalid transform composition");o.appendChild(s);try{return Sf(s)}finally{s.remove()}}}function Es(t){let e=W(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||o||s)}function Sf(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var $s=new WeakSet;function Un(t,e){if(!e)return null;let n=t.ownerDocument||document,r=n.defaultView||window,i,o,s,a;if(e==="viewport")i=0,o=0,s=n.documentElement?.clientWidth||r.innerWidth,a=n.documentElement?.clientHeight||r.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(r.scrollX||0),o=(Number(e.y)||0)-(r.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:o,width:s,height:a,right:i+s,bottom:o+a}:null}function lo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return It(e)?e.host:null}function xf(t,e){for(let n=e;n;n=lo(n))if(n===t)return!0;return!1}function vf(t,e){for(let n=lo(t);n&&n!==e&&n?.nodeType===1;n=lo(n)){let r=W(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function uo(t,e){try{return Kt({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function Ps(t,e,n,r,i){let o=t.getBoundingClientRect();At(e)&&W(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,c]of n){if(!At(a)||c?.nodeType!==1||c===t||!xf(t,c))continue;let f=r.get(c)||W(c),l=f.position;if(l!=="fixed"&&l!=="sticky"&&l!=="-webkit-sticky"||a.style.position==="absolute")continue;let u=c.getBoundingClientRect();if(!(u.width>0&&u.height>0))continue;$s.add(a);let p=f.transform&&f.transform!=="none"?f.transform:"",h=ae(c),m=!!(p||h.rotate!=="0deg"||h.scale||h.translate),d=m?uo(p,h):null,g=!d||!d.is2D||d.a===1&&d.b===0&&d.c===0&&d.d===1,y=u.width,b=u.height;g||(y=c.offsetWidth||u.width,b=c.offsetHeight||u.height);let S=c.getRootNode&&It(c.getRootNode()),k=o,v=t.clientLeft||0,w=t.clientTop||0;if(S){let _=vf(c,t);_&&(k=_.getBoundingClientRect(),v=_.clientLeft||0,w=_.clientTop||0)}let C=u.left-k.left-v,A=u.top-k.top-w;if(m)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",g)a.style.transform="none";else{a.style.transform=`matrix(${d.a},${d.b},${d.c},${d.d},0,0)`;let{ox:_,oy:R}=an(f,y,b),T=$e(y,b,{a:d.a,b:d.b,c:d.c,d:d.d,e:0,f:0},_,R);C-=T.minX,A-=T.minY}if(l!=="fixed"){let _=a.cloneNode(!1);_.setAttribute("data-snap-ph","1"),_.style.position="static",_.style.visibility="hidden",_.style.width=`${y}px`,_.style.height=`${b}px`,_.style.boxSizing="border-box",a.parentElement?.insertBefore(_,a)}let M=y+2,x=b;i&&(Math.abs(A-i.y)<.5&&(A-=1,x+=1),Math.abs(C-i.x)<.5&&(C-=1,M+=1)),a.style.position="absolute",a.style.left=`${C}px`,a.style.top=`${A}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${M}px`,a.style.height=`${x}px`,a.style.boxSizing="border-box",S||s.push(a)}for(let a of s)e.appendChild(a)}function Ns(t,e,n={}){if(!t||!e||!e.style)return;let r=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){D(n,"stripRootShadows boxShadow",s)}try{e.style.textShadow="none"}catch(s){D(n,"stripRootShadows textShadow",s)}try{e.style.outline="none"}catch(s){D(n,"stripRootShadows outline",s)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=o.length?o:"none"}catch(s){D(n,"stripRootShadows filter",s)}}function Ls(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function Rs(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",r=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||r!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function kf(t,e){let n=Array.from(t.childNodes),r=e==="top"?n:n.reverse();for(let i of r){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let o=getComputedStyle(i),s=String(o.display||"");if(!(s==="none"||s==="contents")&&!(o.position==="absolute"||o.position==="fixed"))return o.float&&o.float!=="none"||s.startsWith("inline")?null:i}return null}function Is(t,e,n){if(!t||!e||!e.style)return;let r=getComputedStyle(t);if(!Rs(r))for(let i of["top","bottom"]){let o=i==="top"?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let c=kf(s,i);if(!c)break;let f=n?Array.from(a.children).find(p=>n.get(p)===c)||null:a.children[Array.from(s.children).indexOf(c)]||null,l=getComputedStyle(c),u=parseFloat(l[`margin${o}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${o}`]="0px"),Rs(l)||(parseFloat(l[`border${o}Width`])||0)>0||(parseFloat(l[`padding${o}`])||0)>0)break;s=c,a=f}}}var Cf=new Set(["xml","xlink"]);function Af(t,e){if(t.startsWith("*")||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!Cf.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var Mf=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,Fs=t=>t.replace(Mf,e=>e.length===2?e:""),_f=/^data:[^,]{0,120};base64,/;function zn(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,r=a=>{for(let c of Array.from(a.attributes)){if(Af(c.name,n)){a.removeAttribute(c.name);continue}if(_f.test(c.value))continue;let f=Fs(c.value);if(f!==c.value)try{a.setAttribute(c.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=o.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)r(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=Fs(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function Ef(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var Rf=new Set(["img","canvas","video","iframe","object","embed"]);function Ff(t){return Lt(t)||Rf.has(t?.localName)}function Tf(t,e){if(t?.nodeType!==1||Ef(t)||Ff(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function Ws(t,e,n=new Map,r=null){function i(o,s){if(o?.nodeType!==1||s?.nodeType!==1)return;let a=o.childElementCount>s.childElementCount,c=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,c),a&&Tf(o,c)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let l=c.overflowY||c.overflowBlock||"visible",u=c.overflowX||c.overflowInline||"visible";(l!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(r)for(let l of f){let u=r.get(l);u&&u.nodeType===1&&i(u,l)}else{let l=Array.from(o.children);for(let u=0;u<Math.min(l.length,f.length);u++)i(l[u],f[u])}}i(t,e)}function $f(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function Pf(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){D(e,"exclude selector match failed",r)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(r){D(e,"exclude predicate failed",r)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){D(e,"filter function failed",n)}return!1}function po(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),i=1/0,o=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(Pf(h,e)||!$f(h))continue;let m=h.getBoundingClientRect(),d=m.top-r.top,g=m.bottom-r.top;g<=d||(d<i&&(i=d),g>o&&(o=g),s=!0)}let c=s?Math.max(0,o-i):0,f=parseFloat(n.borderTopWidth)||0,l=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,p=parseFloat(n.paddingBottom)||0;return f+l+u+p+c}var I=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t,Pe=.75;function Os(t,e,n,r,i,o){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),c=i>0&&a.width>0?a.width/i:1,f=o>0&&a.height>0?a.height/o:1;if(Math.abs(c-f)>.02)return 0;let l=s.createElement("div");J(l),l.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=l.attachShadow({mode:"open"}),p=s.createElement("style");p.textContent=n,u.appendChild(p);let h=e.cloneNode(!0);u.appendChild(h),s.body.appendChild(l);let m=0,d=(g,y,b)=>{let S=W(g),k=S.boxSizing==="border-box",v=(w,C,...A)=>{let M=parseFloat(w);if(!Number.isFinite(M))return C;let x=M+(k?0:A.reduce((_,R)=>_+(parseFloat(R)||0),0));return Math.abs(x-C)<=.51?x:C};return{width:v(S.width,y,S.paddingLeft,S.paddingRight,S.borderLeftWidth,S.borderRightWidth),height:v(S.height,b,S.paddingTop,S.paddingBottom,S.borderTopWidth,S.borderBottomWidth)}};try{let g=h.getBoundingClientRect(),y=h.offsetWidth||i,b=h.offsetHeight||o,S=y>0&&g.width>0?g.width/y:1,k=b>0&&g.height>0?g.height/b:1,v=(w,C,A=!1)=>{let M=w.children,x=C.children,_=Math.min(M.length,x.length);for(let R=0;R<_;R++){let T=M[R],$=x[R],O=r.get(T),z=A||$s.has(T);if(O?.nodeType===1&&At(T)&&T.style&&O.isConnected){let E=O.getBoundingClientRect();if(E.width>0&&E.height>0){let L=$.getBoundingClientRect(),P=E.width/c,F=E.height/f,V=L.width,H=L.height,q=O.offsetWidth||P,B=O.offsetHeight||F,Z=$.offsetWidth||V,Et=$.offsetHeight||H,Bt=Math.abs(P-q)>Pe||Math.abs(F-B)>Pe||Math.abs(V-Z)>Pe||Math.abs(H-Et)>Pe;if(z){let at=d($,Z,Et);P=V>0?P*S*at.width/V:P,F=H>0?F*k*at.height/H:F,V=at.width,H=at.height}else if(Bt){let at=d(O,q,B),Nt=d($,Z,Et);P=at.width,F=at.height,V=Nt.width,H=Nt.height}let yt=V-P,st=H-F;(Math.abs(yt)>Pe||Math.abs(st)>Pe)&&(T.style.boxSizing="border-box",T.style.width=`${I(P)}px`,T.style.height=`${I(F)}px`,m++)}}v(T,$,z)}};v(e,h)}finally{l.remove()}return m}var Nf=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function fo(t,e=new Set){let n="";if(!t)return n;for(let r=0;r<t.length;r++){let i=t[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=fo(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let o=fo(i.cssRules,e);o&&(n+=`@media ${i.conditionText}{${o}}`);continue}if(i.type===CSSRule.STYLE_RULE){let o=i.selectorText||"";if(Nf.test(o)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var Ts=new WeakMap;function Lf(t){let e="";for(let n of t.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+r+"|"}return e}function If(t){if(!t||!t.styleSheets)return"";let e=Lf(t),n=Ts.get(t);if(n&&n.fp===e)return n.css;let r=new Set,i="";for(let o of Array.from(t.styleSheets))try{let s=o.cssRules;s&&(i+=fo(s,r))}catch{}return Ts.set(t,{fp:e,css:i}),i}function Ds(t,e){let n=Rr(t.clone).sort(),r=n.join(","),i=en(t.element),o=N.baseStyle.get(r),s;o&&o.universe===i?s=o.css:(s=Fr(n,i),N.baseStyle.set(r,{universe:i,css:s}));let a=If(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}vt();var Hn=new Set;async function Bs(t,e={}){_t(),Cn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,o=null;if(e.clip&&(o=Un(t,e.clip),o&&(r.clip={rect:o,root:t})),e.captureSelection)try{r.selection=Gi(t)}catch(d){D(r,"prepareSelectionContext failed",d)}let s,a="",c="";if(Hn.size){let d=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||b.getRootNode()?.host)if(b===g)return!0;return!1};for(;;){let g=[...Hn].filter(({root:y})=>d(y,t)||d(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!r.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let d=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=d.right<=0||d.bottom<=0||d.left>=g.innerWidth||d.top>=g.innerHeight,b=[];if(y&&(()=>{let k=[];t.shadowRoot&&k.push(t.shadowRoot);for(let v of t.querySelectorAll("*"))v.shadowRoot&&k.push(v.shadowRoot);for(;k.length;){let v=k.pop(),w=v.host?.localName==="calcite-icon";for(let C of v.querySelectorAll("*")){if(C.shadowRoot&&k.push(C.shadowRoot),!w||C.localName!=="svg")continue;let A=C.querySelectorAll("path");if(!A.length||[...A].some(x=>x.getAttribute("d")?.trim()))continue;let M=C.getBoundingClientRect();M.width&&M.height&&b.push(C)}}})(),b.length){let k=(async()=>{let w=t.style,C=t.hasAttribute("style"),A=new Map,M=(x,_)=>{A.has(x)||A.set(x,{value:w.getPropertyValue(x),priority:w.getPropertyPriority(x)}),w.setProperty(x,_,"important");let R=A.get(x);R.forcedValue=w.getPropertyValue(x),R.forcedPriority=w.getPropertyPriority(x)};try{M("left","0"),M("top","0"),M("right","auto"),M("bottom","auto"),M("margin-top","0"),M("margin-right","0"),M("margin-bottom","0"),M("margin-left","0"),M("transform","none"),M("translate","none"),M("opacity","0"),M("pointer-events","none");let x=t.getBoundingClientRect();if(x.right<=0||x.bottom<=0||x.left>=g.innerWidth||x.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),$=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,O=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;M("position","fixed"),M("left",`${$}px`),M("top",`${O}px`)}await pt(100);let _=Date.now()+1500,R=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(O=>O.getAttribute("d")?.trim()))return!1;let $=T.getBoundingClientRect();return $.width&&$.height&&$.right>0&&$.bottom>0&&$.left<g.innerWidth&&$.top<g.innerHeight});for(;Date.now()<_&&R();)await new Promise(T=>setTimeout(T,25));await pt(100)}finally{for(let[x,_]of A)w.getPropertyValue(x)!==_.forcedValue||w.getPropertyPriority(x)!==_.forcedPriority||(_.value?w.setProperty(x,_.value,_.priority):w.removeProperty(x));!C&&!w.length&&t.removeAttribute("style"),await pt(100)}})(),v={root:t,promise:k};Hn.add(v);try{await k}finally{Hn.delete(v)}}}catch{}let f=ks(t),l=Bn(t,o);if(o){let d=t.getBoundingClientRect(),g=t.offsetWidth||d.width,y=t.offsetHeight||d.height,b=d.width&&Math.abs(g-d.width)>=1?g/d.width:1,S=d.height&&Math.abs(y-d.height)>=1?y/d.height:1;i={x:(o.left-d.left)*b,y:(o.top-d.top)*S,width:o.width*b,height:o.height*S}}try{s=await Yt(t,r,e)}catch(d){throw console.warn("deepClone failed:",d),d}finally{l(),f()}r.slicer?.due()&&await r.slicer.pause();try{vs(s,void 0,t)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{await Te(t,s,r,e)}catch(d){console.warn("inlinePseudoElements failed:",d)}await _n(s,r);for(let[d,g]of r.nodeMap.entries())if(g?.tagName==="STYLE"&&d?.tagName==="STYLE"&&!d.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(d.textContent||"")&&(d.textContent=se(y))}catch{}try{let d=s.querySelectorAll("style[data-sd]");for(let g of d)c+=g.textContent||"",g.remove()}catch(d){D(r,"Failed to extract shadow CSS from style[data-sd]",d)}r.slicer?.due()&&await r.slicer.pause();let u=Xe(r.styleMap);a=Array.from(u.entries()).map(([d,g])=>`.${g}{${d}}`).join("");let h=c+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(r.__pseudoCSS||"");a=h+a;for(let[d,g]of r.styleMap.entries())ho(d,g,u);try{Wf(t,s,r.nodeMap)}catch(d){D(r,"top-layer lift failed",d)}if((r.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let d=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};Ps(t,s,r.nodeMap,r.styleCache,d)}catch(d){D(r,"freezeViewportPositioned failed",d)}for(let[d,g]of r.nodeMap.entries())r.clip&&g===t||mo(d,g);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let d=r.styleCache.get(m.documentElement)||W(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&d.overflowX==="visible"&&d.overflowY==="visible"&&d.contain==="none"&&!d.containerType?.includes("size")&&d.contentVisibility!=="auto"&&d.contentVisibility!=="hidden"){let y=r.styleCache.get(m.body)||W(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===r.nodeMap.get(s)){let d=r.styleCache.get(t)||W(t);r.styleCache.set(t,d);let g=yr(d.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none"}for(let[d,g]of r.nodeMap.entries())g.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}function Wf(t,e,n){let r=[];for(let s of[":modal",":popover-open"])try{r.push(...t.querySelectorAll(s))}catch{}if(!r.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let o=214748e4;for(let s of r){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let c=getComputedStyle(s,"::backdrop"),f=c.backgroundColor,l=c.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||l&&l!=="none"){let p=document.createElement("div");p.setAttribute("data-sd-backdrop",""),p.style.cssText=`position:fixed;inset:0;z-index:${o};background-color:${f};`+(l&&l!=="none"&&l.includes("data:")?`background-image:${l};`:""),e.appendChild(p)}}catch{}o+=1,a.style.zIndex=String(o),e.appendChild(a),o+=1}}}function ho(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&It(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let r=n.get(e);r&&t.classList.add(r);let i=t.style?.backgroundImage,o=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),o&&(t.style.verticalAlign="middle",t.style.display="inline")}function mo(t,e){let n=e.scrollLeft,r=e.scrollTop;if(!(n||r)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let s=t.querySelectorAll("*");for(let a of s){if(a.nodeType!==1||a.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let c=a.style.position;if(c==="fixed"||c==="absolute"){let f=parseFloat(a.style.top)||0,l=parseFloat(a.style.left)||0;a.style.top=`${f+r}px`,a.style.left=`${l+n}px`,c==="fixed"&&(a.style.position="absolute")}}}catch{}let o=document.createElement("div");for(o.style.all="unset",o.style.transform=`translate(${-n}px, ${-r}px)`,o.style.willChange="transform",o.style.display="inline-block",o.style.width="100%";t.firstChild;)o.appendChild(t.firstChild);t.appendChild(o)}he();ee();dt();var Us="http://www.w3.org/1999/xlink";function Of(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Us,"href"):null)}function Df(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,r=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||o||r||t.width||t.naturalWidth||100,c=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:c}}async function jn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let r=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||_e(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=a.src||"";if(!c)return;let f=N.image?.get(c);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=await it(c,{as:"dataURL",useProxy:e.useProxy});if(l.ok&&typeof l.data=="string"&&l.data.startsWith("data:")){N.image?.set(c,l.data),a.src=l.data,l.blob&&(a.__snapdomBlob=l.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:p}=Df(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:p,src:c,element:a}):h;if(m){let d=await it(m,{as:"dataURL",useProxy:e.useProxy});if(d?.ok&&typeof d.data=="string"){a.src=d.data,a.width||(a.width=u),a.height||(a.height=p);return}}}catch{}if(e.placeholders!==!1){kt(e.__session,"image-fallback",`image failed to inline, using placeholder: ${c}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${p}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${p}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${p}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let c=n.slice(a,a+i).map(r);await Promise.allSettled(c)}let o=Array.from(t.querySelectorAll("image"));t.localName==="image"&&o.unshift(t);let s=async a=>{let c=Of(a);if(!c||c.startsWith("data:")||c.startsWith("blob:"))return;let f=await it(c,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(Us,"href"))};for(let a=0;a<o.length;a+=i){let c=o.slice(a,a+i).map(s);await Promise.allSettled(c)}}vt();mt();var Bf=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Uf=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],zf=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Hf=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function jf(t,e,n,r){let i=n.get(t)||W(t);n.has(t)||n.set(t,i);let o=vi(t),s=o?m=>m in o?o[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),c=s("border-image-source"),f=a&&a!=="none"||c&&c!=="none",l=i.getPropertyValue("background-image"),u=s("background-color"),p=l&&l!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=ht()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(p&&!h)for(let m of zf){let d=s(m);d&&e.style.setProperty(m,d)}for(let m of Bf){if(h&&m==="background-image")continue;let d=i.getPropertyValue(m);if(m==="background-image"&&(!d||d==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(d=Vt(b).filter(S=>/url\s*\(/.test(S)).join(", ")||d)}if(!d||d==="none")continue;let g=Vt(d),y=await Promise.all(g.map(b=>me(b,r)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Uf){let d=s(m);!d||d==="initial"||e.style.setProperty(m,d)}if(f)for(let m of Hf){let d=s(m);!d||d==="initial"||e.style.setProperty(m,d)}if(p&&/fixed/.test(s("background-attachment")||""))try{await qf(t,e,i)}catch{}}function Vf(t,e,n,r,i){let o=(t||"auto").trim();if(o==="cover"||o==="contain"){if(!e||!n)return{w:r,h:i};let p=o==="cover"?Math.max(r/e,i/n):Math.min(r/e,i/n);return{w:e*p,h:n*p}}let s=o.split(/\s+/),a=(p,h)=>{if(p==="auto"||p===void 0)return null;if(p.endsWith("px"))return parseFloat(p);if(p.endsWith("%"))return h*parseFloat(p)/100},c=a(s[0],r),f=a(s[1],i);if(c===void 0||f===void 0)return null;let l=c,u=f;return l==null&&u==null?(l=e||r,u=n||i):l==null?l=e&&n?u*(e/n):r:u==null&&(u=e&&n?l*(n/e):i),!l||!u?null:{w:l,h:u}}async function qf(t,e,n){let r=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=Ye();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let d=W(m);(d.transform&&d.transform!=="none"||d.filter&&d.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "));return}let o=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,c=s.innerHeight,f=Vt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),l=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),p=[],h=[];for(let m=0;m<f.length;m++){let d=r[m%r.length]||"scroll",g=l[m%l.length],y=u[m%u.length];if(d!=="fixed"){p.push(g),h.push(y);continue}let b=0,S=0,k=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(k)try{let x=new Image;x.src=k[1],await x.decode(),b=x.naturalWidth,S=x.naturalHeight}catch{p.push(g),h.push(y);continue}let v=Vf(g,b,S,a,c);if(!v){p.push(g),h.push(y);continue}let w=y.split(/\s+/),C=(x,_,R)=>{if(!x)return 0;if(x.endsWith("px"))return parseFloat(x);if(x.endsWith("%"))return(_-R)*parseFloat(x)/100},A=C(w[0]||"0%",a,v.w),M=C(w[1]||w[0]||"0%",c,v.h);if(A===void 0||M===void 0){p.push(g),h.push(y);continue}p.push(`${Vn(v.w)}px ${Vn(v.h)}px`),h.push(`${Vn(A-o.left)}px ${Vn(M-o.top)}px`)}e.style.setProperty("background-size",p.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "))}var Vn=t=>Math.round(t*100)/100;async function qn(t,e,n,r={},i=new Map){if(!e)return;let o=[];t&&Ur(t)&&o.push([t,e]);let s=[e];for(;s.length;){let c=s.pop();if(c.children)for(let f of c.children){if(f.tagName==="STYLE")continue;let l=i.get(f);l&&Ur(l)&&o.push([l,f]),s.push(f)}}let a=6;for(let c=0;c<o.length;c+=a)await Promise.allSettled(o.slice(c,c+a).map(([f,l])=>jf(f,l,n,r)))}mt();function Hs(t,e,n=new Map){let r=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let c=n.get(a);if(c?.nodeType!==1)continue;let f=W(c),l=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");l&&l!=="none"&&a!==e&&r.push({cloneEl:a,orig:c,bf:l,path:Kf(e,a)})}if(!r.length)return;let o=t.getBoundingClientRect(),s=r.map((a,c)=>{let f=e.cloneNode(!0);Yf(f,e,a.orig.getBoundingClientRect(),n),Qf(zs(f,a.path));for(let l=0;l<c;l++){let u=zs(f,r[l].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:c,bf:f,copy:l}of s)Gf.has(a.tagName)||Xf(a,c,f,l,o)}var Gf=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function Xf(t,e,n,r,i){let o=e.getBoundingClientRect();if(!o.width||!o.height)return;let s=W(e),a=e.offsetWidth?o.width/e.offsetWidth:1,c=Math.abs(a-1)>.001?1/a:1;r.style.position="absolute",r.style.left=`${(i.left-o.left)*c}px`,r.style.top=`${(i.top-o.top)*c}px`,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,c!==1&&(r.style.transform=`scale(${c})`,r.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(r);let l=document.createElement("div");l.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",l.style.backgroundColor=s.backgroundColor,l.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])l.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(l),t.prepend(f)}var Gn=128;function Yf(t,e,n,r){let i=[[t,e]];for(;i.length;){let[o,s]=i.pop(),a=r.get(s);if(a?.nodeType===1){let l=a.getBoundingClientRect();(l.left>n.right+Gn||l.right<n.left-Gn||l.top>n.bottom+Gn||l.bottom<n.top-Gn)&&(o.tagName==="IMG"&&o.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),o.style&&(o.style.backgroundImage="none"))}let c=o.children,f=s.children;for(let l=0;l<c.length;l++)i.push([c[l],f[l]])}}function Kf(t,e){let n=[];for(let r=e;r!==t;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function zs(t,e){if(!e)return null;let n=t;for(let r of e)if(n=n.children[r],!n)return null;return n}function Qf(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}mt();vt();dt();dt();function go(t){return Xo(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ee();function Yn(t,e){if(!t)return()=>{};let n=[],r=200;function i(o){if(e){let f=o.getBoundingClientRect();if(f.width>0||f.height>0){let l=Math.max(f.right,f.left+(o.scrollWidth||0)),u=Math.max(f.bottom,f.top+(o.scrollHeight||0));if(l<e.left-r||f.left>e.right+r||u<e.top-r||f.top>e.bottom+r)return}}let s=getComputedStyle(o),a=Jf(o,s);a&&n.push(a);let c=Zf(o,s);c&&n.push(c);for(let f of o.children||[])i(f)}return i(t),()=>n.forEach(o=>o())}function Jf(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=tu(e);if(n<=0)return()=>{};if(!qs(t))return()=>{};let r=Vs(t),i=r.text,o=nu(e);r.write("X");let s=t.scrollHeight-o;r.restore();let a=s>0?s:eu(e),c=Math.round(a*n+o);if(t.scrollHeight<=c+.5)return()=>{};let f=0,l=i.length,u=-1;for(;f<=l;){let h=f+l>>1;r.write(i.slice(0,Xn(i,h))+"\u2026"),t.scrollHeight<=c+.5?(u=h,f=h+1):l=h-1}let p=(u>=0?i.slice(0,Xn(i,u)):"")+"\u2026";return r.write(p),js(t,p,r)}function Zf(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!qs(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=Vs(t),r=n.text,i=0,o=r.length,s=-1;for(;i<=o;){let c=i+o>>1;n.write(r.slice(0,Xn(r,c))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=c,i=c+1):o=c-1}let a=(s>=0?r.slice(0,Xn(r,s)):"")+"\u2026";return n.write(a),js(t,a,n)}function js(t,e,n){return()=>{t.textContent===e&&n.restore()}}function Vs(t){let e=[];for(let r=t.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&e.push(r);let n=e.map(r=>r.data);return{text:n.join(""),write(r){e[0].data=r;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let r=0;r<e.length;r++)e[r].data=n[r]}}}function Xn(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function tu(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function eu(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function nu(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function qs(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Ne=["clone","render"],cn={clone:0,render:1},ft="render";function Gs(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:ft,loweredBy:[]};let n=-1,r=[];for(let o of e){if(!o||typeof o!="object")continue;let s=o.needs===void 0?ft:o.needs;if(!Object.prototype.hasOwnProperty.call(cn,s))throw new Error(`[snapdom] plugin '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Ne.join(", ")}`);r.push({name:o.name||"(unnamed)",needs:s}),n=Math.max(n,cn[s])}if(n<0)return{stage:ft,loweredBy:[]};let i=Ne[n];return{loweredBy:i===ft?[]:r.filter(o=>o.needs===i).map(o=>o.name),stage:i}}function Le(t,e){return cn[t]>=cn[e]}function Xs(t,e,n=Ne){let r=n[n.length-1];if(e==null)return r;if(!Object.prototype.hasOwnProperty.call(cn,e))throw new Error(`[snapdom] ${t}: needs must be one of ${Ne.join(", ")}, got ${JSON.stringify(e)}`);if(!n.includes(e))throw new Error(`[snapdom] ${t} cannot run at stage '${e}': it supports ${n.join(", ")}`);return e}function Ys(t,e,n){let r=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[snapdom] no ${n}: this capture stopped at '${t}' because ${r} declared needs: '${t}' (result.needs says so too). It is not re-captured on demand \u2014 that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var Ie=[];function We(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function yo(...t){let e=t.flat();for(let n of e){let r=We(n);if(r){if(r.needs!==void 0&&r.needs!==ft)throw new Error(`[snapdom] global plugin '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(r.needs)}. A global plugin must run to '${ft}': lowering it here would stop EVERY capture in the app short of pixels. Pass it per capture instead: snapdom(el, { plugins: [<plugin>] }).`);Ie.some(i=>i&&i.name&&r.name&&i.name===r.name)||Ie.push(r)}}}function Ks(t){return t&&Array.isArray(t.plugins)?t.plugins:Ie}async function Dt(t,e,n){let r=n,i=Ks(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,r);typeof a<"u"&&(r=a)}return r}async function Kn(t,e,n){let r=[],i=Ks(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&r.push(a)}return r}function ru(){Ie.length=0}var ou=0;function iu(t){let e=[];if(Array.isArray(t))for(let n of t){let r=We(n);if(!r)continue;r.name||(r.name=`anonymous-${++ou}`);let i=e.findIndex(o=>o&&o.name===r.name);i>=0&&e.splice(i,1),e.push(r)}for(let n of Ie)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function Qs(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=iu(e)),t}function bo(){return Ie.slice()}var su=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function Qn(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let r=We(n);if(!(!r||r.pure===!0)){for(let i of su)if(typeof r[i]=="function")return!0}}return!1}dt();we();var le="data-snapdom-asset",ea="http://www.w3.org/1999/xlink",au=0;function Zn(t,e,n,r,i,o){let s=o.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++au),properties:[]},s.set(t,a),t.setAttribute(le,a.token));let c=a.properties.find(f=>f.kind===e&&f.name===n);c?(c.compressed!==r&&(c.original=r),c.compressed=i):a.properties.push({kind:e,name:n,original:r,compressed:i})}var na=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function tr(t,e){let n=new Map;if(!t||!e)return n;let r=[t,...t.querySelectorAll(`[${le}]`)];for(let i of r){let o=e.get(i);if(!o||i.getAttribute(le)!==o.token)continue;let s=o.properties.filter(a=>na(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(o.token,Object.freeze(s))}return n}function er(t,e){if(!t||!e)return;let n=0;for(let r of[t,...t.querySelectorAll(`[${le}]`)]){let i=e.get(r);i&&(i.token=String(++n),r.setAttribute(le,i.token))}}function ra(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),r=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(r.querySelector("parsererror"))return t;let i=!1;for(let o of r.querySelectorAll(`[${le}]`))for(let s of e.get(o.getAttribute(le))||[])na(o,s)===s.compressed&&(s.kind==="style"?o.style.setProperty(s.name,s.original,o.style.getPropertyPriority(s.name)):s.name==="xlink:href"?o.setAttributeNS(ea,s.name,s.original):o.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(r))}`:t}function Js(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function wo(t,e){let n=e.element||t,r=n.isConnected?W(n):n.style,i=e.__compressionClip,o=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(r?.width)||o(n,"width"),a=i?.height||n.offsetHeight||parseFloat(r?.height)||o(n,"height"),c=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(c||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:Kt({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,d=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,d)}}catch{s=0,a=0}let l=(c||f?Math.max(c?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=l;let u=new WeakMap,p=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?W(h):h.style,d=1;try{m?.perspective&&m.perspective!=="none"&&(d=1/0);let g=m?.transform;if(g&&g!=="none")d*=Js(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let S=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([S.a,S.b,S.c,S.d,S.e,S.f]))}d*=Js(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));d*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(d*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=v=>/^\d+(?:\.\d+)?px$/.test(m?.[v]||"")?parseFloat(m[v]):o(h,v),S=b("width"),k=b("height");d*=S>0&&k>0?Math.max(S/y.width,k/y.height):1/0}}catch{d=1/0}return Number.isFinite(d)||(d=1/0),h!==n&&(d*=p(h.parentElement||h.getRootNode?.().host)),u.set(h,d),d};return{density:l,stretch:p}}var oa=.92,ia=1;async function cu(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=r}),e)}function lu(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var fu=64*1024,Zs=32*1024*1024,Jn=new Map;function uu(t,e,n,r){if(n.length+(r?.length||0)>Zs)return;t.set(e,{source:n,result:r});let i=0;for(let o of t.values())i+=o.source.length+(o.result?.length||0);for(;i>Zs;){let o=t.keys().next().value,s=t.get(o);i-=s.source.length+(s.result?.length||0),t.delete(o)}}function du(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let r=Math.ceil(e/3)*4,i=t.length-n-1,o=Math.min(i,r);try{let s=atob(t.slice(n+1,n+1+o-o%4)),a=new Uint8Array(s.length);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}catch{return null}}function pu(t){let e=du(t,4096);if(!e||e.length<16)return null;let n=r=>e[r]<<8|e[r+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let r=e[15];if(r===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(r===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(r===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let r=2;for(;r+9<e.length;){if(e[r]!==255){r++;continue}let i=e[r+1];if(i===216||i===1||i>=208&&i<=215){r+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(r+5),w:n(r+7)};let o=n(r+2);if(o<2)break;r+=2+o}}return null}function ta(t,e,n,r){let i=Math.min(1,Math.max(n/t,r/e));return!(i>0)||i>=.95?0:i}var hu=`self.onmessage = async (e) => {
16
16
  const { id, dataURL, blob: given, srcLength, targetW, targetH, resFactor, quality, mime } = e.data
17
17
  try {
18
18
  const blob = given || await (await fetch(dataURL)).blob()
@@ -36,4 +36,4 @@ ${g}
36
36
  } catch (err) {
37
37
  self.postMessage({ id, error: String(err) })
38
38
  }
39
- }`,ou=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),Tt=null,iu=0,su=0,ce=new Map;function oa(){for(let t of ce.values())t(void 0);if(ce.clear(),Array.isArray(Tt))for(let t of Tt)try{t?.terminate()}catch{}Tt=!1}function au(){let t,e=null;try{t=URL.createObjectURL(new Blob([ru],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let r=ce.get(n.data.id);r&&(ce.delete(n.data.id),r(n.data.error?void 0:n.data.url??null))},e.onerror=oa}catch{e=null}return t&&URL.revokeObjectURL(t),e}function cu(){if(Tt===!1)return!1;if(Tt===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return Tt=!1;Tt=[]}let t=iu++%ou;if(!Tt[t]){let e=au();if(!e)return oa(),!1;Tt[t]=e}return Tt[t]}var lu=5e3;function fu(t,e,n,r,i){let o=cu();return o?new Promise(s=>{let a=++su,c=setTimeout(()=>{ce.delete(a),s(void 0)},lu);ce.set(a,f=>{clearTimeout(c),s(f)});try{o.postMessage({id:a,dataURL:i?"":t,blob:i,srcLength:t.length,targetW:e,targetH:n,resFactor:ra,quality:na,mime:r})}catch{clearTimeout(c),ce.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function So(t,e,n,r){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let i=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,o=N.compress,s=o.get(i);if(s?.source===t)return s.result;let a=Qn.get(i);if(a?.source===t&&a.cache===o)return a.promise;let c=(async()=>{let l=Jf(t),u=l==="image/jpeg"?"image/jpeg":l==="image/webp"?"image/webp":"image/png",p=nu(t);if(p&&p.w>0&&p.h>0&&!Js(p.w,p.h,e,n))return null;if(t.length>=Zf){let w=await fu(t,e,n,u,r);if(w!==void 0)return w}let h;try{h=await Qf(t)}catch{return null}let m=h.naturalWidth||h.width,d=h.naturalHeight||h.height;if(!m||!d)return null;let g=Js(m,d,e,n);if(!g)return null;let y=g*ra,b=Math.max(1,Math.round(m*y)),S=Math.max(1,Math.round(d*y)),k=document.createElement("canvas");k.width=b,k.height=S;let v=k.getContext("2d");if(!v)return null;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(h,0,0,b,S);try{let w=k.toDataURL(u,na);if(typeof w=="string"&&w.startsWith("data:image")&&w.length<t.length)return w}catch{}return null})(),f={source:t,promise:c,cache:o};Qn.set(i,f);try{let l=await c;return tu(o,i,t,l),l}finally{Qn.get(i)===f&&Qn.delete(i)}}async function uu(t,e,n=new Map,r={}){if(!e.compress)return{count:0,before:0,after:0};let i=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&i.unshift(t);let o=0,s=0,a=0,c=async l=>{let u=l.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let p=parseFloat(l.dataset.snapdomWidth)||parseFloat(l.style.width)||l.width||0,h=parseFloat(l.dataset.snapdomHeight)||parseFloat(l.style.height)||l.height||0;if(!p||!h)return;let m=r.value||=wo(t,e),d=m.density*m.stretch(n.get(l)||l),g=await So(u,p*d,h*d,l.__snapdomBlob);g&&(o++,s+=u.length,a+=g.length,l.setAttribute("src",g),Jn(l,"attribute","src",u,g,e))},f=6;for(let l=0;l<i.length;l+=f)await Promise.allSettled(i.slice(l,l+f).map(c));return{count:o,before:s,after:a}}var du=/^(cover|contain|(\d+(\.\d+)?%(\s+\d+(\.\d+)?%)?))$/;function pu(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function hu(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=[],o=[t,...t.querySelectorAll("*")];for(let f of o){let l=f.style&&f.style.backgroundImage;l&&l.includes("data:image")&&i.push(f)}let s=0,a=async f=>{let l=n.get(f);if(!l||!l.isConnected)return;let u;try{u=getComputedStyle(l)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(A=>A.trim()!=="no-repeat"))return;let h=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(h.split(",").some(A=>!du.test(A.trim())))return;let{w:m,h:d}=pu(l);if(!m||!d)return;let g=Math.max(1,...(h.match(/\d+(?:\.\d+)?%/g)||[]).map(A=>parseFloat(A)/100)),y=r.value||=wo(t,e),b=y.density*y.stretch(l)*g,S=m*b,k=d*b,v=f.style.backgroundImage,w=[...v.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],C=v;for(let A of w){let M=A[2];if(M.startsWith("data:image/svg"))continue;let x=await So(M,S,k);x&&(C=C.split(M).join(x),s++)}C!==v&&(f.style.setProperty("background-image",C,f.style.getPropertyPriority("background-image")),Jn(f,"style","background-image",v,f.style.backgroundImage,e))},c=6;for(let f=0;f<i.length;f+=c)await Promise.allSettled(i.slice(f,f+c).map(a));return{count:s}}async function mu(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=Array.from(t.querySelectorAll("image"));t.localName==="image"&&i.unshift(t);let o=0,s=async c=>{let f=c.getAttribute("href")||(typeof c.getAttributeNS=="function"?c.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let l=c.getAttribute("width")||"",u=c.getAttribute("height")||"";if(l.includes("%")||u.includes("%"))return;let p=n.get(c),h=p?W(p):c.style,m=(k,v)=>{if(/^\d+(?:\.\d+)?px$/.test(h?.[k]||""))return parseFloat(h[k]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(v.trim()))return parseFloat(v);try{return p?.[k]?.baseVal?.value||0}catch{return 0}},d=m("width",l),g=m("height",u);if(!d||!g)return;let y=r.value||=wo(t,e),b=y.density*y.stretch(p||c),S=await So(f,d*b,g*b);S&&(c.setAttribute("href",S),Jn(c,"attribute","href",f,S,e),c.hasAttribute("xlink:href")&&(c.setAttributeNS(Zs,"xlink:href",S),Jn(c,"attribute","xlink:href",f,S,e)),o++)},a=6;for(let c=0;c<i.length;c+=a)await Promise.allSettled(i.slice(c,c+a).map(s));return{count:o}}async function er(t,e,n){if(!e.compress)return;let r={};await uu(t,e,n,r),await hu(t,e,n,r),await mu(t,e,n,r)}ht();dt();wt();function gu(t,e){if(X())return t;let n=t.indexOf("</style>");if(n===-1)return t;let r=/<style\b[^>]*>[\s\S]*?<\/style>/g,i=[],o=n,s;for(r.lastIndex=n;s=r.exec(t);)i.push({text:t.slice(o,s.index),intern:!0}),i.push({text:s[0],intern:!1}),o=r.lastIndex;i.push({text:t.slice(o),intern:!0});let a=new Map,c=/ style="([^"]*)"/g,f;for(let y of i)if(y.intern)for(c.lastIndex=0;f=c.exec(y.text);)a.set(f[1],(a.get(f[1])||0)+1);let l=0;for(let[y,b]of a)b>1&&(l+=(b-1)*y.length);if(l<2048||t.includes(" data-sdi="))return t;let u=yu(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(u===null)return t;let p=new Map,h=0,m=[],d=(y,b)=>{if((a.get(b)||0)<2||u.has(b))return y;let S=p.get(b);return S===void 0&&(S="i"+(h++).toString(36),p.set(b,S),m.push(`[data-sdi="${S}"]{${b}}`)),` data-sdi="${S}"`},g="";for(let y of i)g+=y.intern?y.text.replace(c,d):y.text;return t.slice(0,n)+m.join("")+g}function yu(t,e,n){let r=new Set;if(!e&&!n)return r;if(!t||t.querySelector("[data-sdi]"))return null;let i=c=>{let f=c.getAttribute("style");f&&r.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let c=f=>{for(let l of f){if(l.type===CSSRule.IMPORT_RULE||l.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(l.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(l.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(l.selectorText).forEach(i)}l.cssRules&&c(l.cssRules)}};for(let f of[...t.querySelectorAll("style")].slice(1)){let l=f.textContent||"";if(/@import\b/i.test(l))return null;let u=new CSSStyleSheet;u.replaceSync(l),c(u.cssRules)}}catch{return null}let o=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let c of r){s.setAttribute("style",c);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&o.add(f[1])}return o}async function nr(t,e){let{clipWindow:n,outerTransforms:r,outerShadows:i,rootTransform2D:o,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:K,...tt}=t;t=Object.assign(a,tt),Object.defineProperty(t,"options",{value:t,configurable:!0})}let c,f;Ws(t,s),await Ot("beforeRender",t);let l=W(t.element),u=t.element.getBoundingClientRect(),p=Math.max(1,I(t.element.offsetWidth||parseFloat(l.width)||u.width||1)),h=Math.max(1,I(t.element.offsetHeight||parseFloat(l.height)||u.height||1)),m=t.element.ownerDocument||document;if(!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned){let K=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),tt=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0);K>0&&(h=Math.max(h,I(K))),tt>0&&(p=Math.max(p,I(tt)));try{let Q=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,et=N.measureHints.get(t.element);if(et&&et.cssLen===Q&&et.w0===p&&et.docH===K&&et.docW===tt)et.csh>0&&(h=Math.max(h,I(et.csh))),et.csw>0&&(p=Math.max(p,I(et.csw)));else{let nt=m.createElement("div");J(nt),nt.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+p+"px!important;overflow:visible!important;visibility:hidden!important;";let Jt=nt.attachShadow({mode:"open"}),Zt=m.createElement("style");Zt.textContent=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS,Jt.appendChild(Zt),Jt.appendChild(t.clone.cloneNode(!0)),m.body.appendChild(nt);let ze=nt.scrollHeight,Ht=nt.scrollWidth;m.body.removeChild(nt),N.measureHints.set(t.element,{cssLen:Q,w0:p,docH:K,docW:tt,csh:ze,csw:Ht}),ze>0&&(h=Math.max(h,I(ze))),Ht>0&&(p=Math.max(p,I(Ht)))}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let K=po(t.element,t.options),tt=1,Q=po(t.element,{}),et=Math.max(2,h*.15);Number.isFinite(Q)&&Q>=h-et&&Number.isFinite(K)&&K>0&&(h=Math.max(1,Math.min(h,I(K+tt))))}if(t.options?.reconcile)try{let K=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;Is(t.element,t.clone,K,t.nodeMap,p,h)}catch(K){console.warn("[snapdom] reconcile pass failed:",K)}let g=(K,tt=NaN)=>{let Q=typeof K=="string"?parseFloat(K):K;return Number.isFinite(Q)?Q:tt},y=g(t.options.width),b=g(t.options.height),S=n?I(n.width):p,k=n?I(n.height):h,v=S,w=k,C=Number.isFinite(y),A=Number.isFinite(b),M=k>0?S/k:1;C&&A?(v=Math.max(1,I(y)),w=Math.max(1,I(b))):C?(v=Math.max(1,I(y)),w=Math.max(1,I(v/(M||1)))):A&&(w=Math.max(1,I(b)),v=Math.max(1,I(w*(M||1))));let x=0,_=0,R=p,T=h;if(n){let K=0,tt=0;if(xo(t.element)){let Q=null;if(!r&&o&&Number.isFinite(o.a))Q={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0};else{let et=ae(t.element),nt=uo(l.transform&&l.transform!=="none"?l.transform:"",et);nt&&nt.is2D&&(Q={a:nt.a,b:nt.b,c:nt.c,d:nt.d,e:0,f:0})}if(Q&&!(Q.a===1&&Q.b===0&&Q.c===0&&Q.d===1)){let{ox:et,oy:nt}=an(l,p,h),Jt=Fe(p,h,Q,et,nt);K=Jt.minX,tt=Jt.minY}}x=I(n.x+K),_=I(n.y+tt),R=I(x+n.width),T=I(_+n.height)}else if(!r&&o&&Number.isFinite(o.a)){let K={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0},tt=Fe(p,h,K,0,0);x=I(tt.minX),_=I(tt.minY),R=I(tt.maxX),T=I(tt.maxY)}else if(r&&xo(t.element)){let tt=l.transform&&l.transform!=="none"?l.transform:"",Q=ae(t.element),et=Kt({baseTransform:tt,rotate:Q.rotate||"0deg",scale:Q.scale,translate:Q.translate,width:p,height:h}),{ox:nt,oy:Jt}=an(l,p,h),Zt=et.is2D?et:new DOMMatrix(et.toString()),ze={a:Zt.a,b:Zt.b,c:Zt.c,d:Zt.d,e:0,f:0},Ht=Fe(p,h,ze,nt,Jt);x=I(Ht.minX),_=I(Ht.minY),R=I(Ht.maxX),T=I(Ht.maxY)}let $=oo(l),O=io(l),H=so(l),E=ao(l),L=co(l),P=u.width>0?(R-x)/u.width:1,F=u.height>0?(T-_)/u.height:1,V=i==="subtree"&&!n?Cs(t.element,t.nodeMap,t.styleCache,P,F):{top:0,right:0,bottom:0,left:0},z=n?{top:0,right:0,bottom:0,left:0}:i?{top:I(Math.max($.top,O.top,V.top)+H.top+E.top+L.bleed.top),right:I(Math.max($.right,O.right,V.right)+H.right+E.right+L.bleed.right),bottom:I(Math.max($.bottom,O.bottom,V.bottom)+H.bottom+E.bottom+L.bleed.bottom),left:I(Math.max($.left,O.left,V.left)+H.left+E.left+L.bleed.left)}:{top:H.top,right:H.right,bottom:H.bottom,left:H.left};x=I(x-z.left),_=I(_-z.top),R=I(R+z.right),T=I(T+z.bottom);let q=Math.max(1,I(R-x)),B=Math.max(1,I(T-_)),Z="http://www.w3.org/2000/svg",_t=xo(t.element)?2:0,gt=I(_t+(r?0:1)),st=Math.ceil(q+gt*2),at=Math.ceil(B+gt*2),Pt=I(-(I(x)-gt)),U=I(-(I(_)-gt)),G=Math.max(0,Pt),j=Math.max(0,U),ut=I(st-Math.min(0,Pt)),Et=I(at-Math.min(0,U)),yt=document.createElementNS(Z,"foreignObject");yt.setAttribute("x",String(Math.min(0,Pt))),yt.setAttribute("y",String(Math.min(0,U))),yt.setAttribute("width",String(ut)),yt.setAttribute("height",String(Et)),yt.style.overflow="visible";let ue=document.createElement("style"),hn="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";ue.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+hn+t.classCSS,yt.appendChild(ue);let Ue=document.createElement("div");Ue.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Ue.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${ut}px;height:${Et}px`+(G!==0||j!==0?`;padding:${j}px 0 0 ${G}px !important`:""),Ue.appendChild(t.clone),yt.appendChild(Ue);let dr=new XMLSerializer().serializeToString(yt),Bt=C||A,pr=Object.freeze({w0:S,h0:k,vbW:st,vbH:at,targetW:v,targetH:w,contentX:I(Pt+(n?x:0)),contentY:I(U+(n?_:0)),clip:n?Object.freeze({x:I(x),y:I(_),width:S,height:k}):null});Object.defineProperty(a,"meta",{value:pr,enumerable:!0,writable:!1,configurable:!0});let hr=!Bt||X()?st:C?v:I(st*(w/at)),mn=!Bt||X()?at:A?w:I(at*(v/st)),Ut=parseFloat(W(m.documentElement)?.fontSize)||16;f=`<svg xmlns="${Z}" width="${hr}" height="${mn}" viewBox="0 0 ${st} ${at}" font-size="${Ut}px">`+gu(dr,yt)+"</svg>",c=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,t.svgString=f,t.dataURL=c,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await Ot("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let mr=[...document.querySelectorAll("#snapdom-sandbox")].find(jt);return mr&&mr.style.position==="absolute"&&mr.remove(),t.dataURL}function xo(t){return Ms(t)}function bu(t){let e=Array.isArray(t.plugins)?t.plugins:bo(),n=[];for(let r of e){let i=Le(r);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function ia(t,e){if(!t)throw new Error("Element cannot be null or undefined");e.__session=go(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=bu(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let r,i,o,s,a,c,f,l="",u=null,p=e.needs||ft,h=n.format,m=n.type;await Ot("beforeSnap",n);let d=n.format!==h&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),g=n.type!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(d||g){let R=String(d?n.format:n.type).toLowerCase();n.format=R==="jpg"?"jpeg":R,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await Ot("beforeClone",n);let y=n.outerTransforms!==!1,b=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,S=n.clip?Bn(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=vi(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let k=ui(e.fast);for(;;){e.__slicer=k;let R=Xn(n.element,S);try{({clone:r,classCSS:i,classPrefixCSS:o,styleCache:s,nodeMap:a,reconcileRisk:c,clipWindow:f}=await Os(n.element,n.options)),c>0&&!e.reconcile&&(xt(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),N.warnedReconcile||(N.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time)."))),!y&&r&&(u=As(n.element,r)),!b&&r&&$s(n.element,r,n.options),r&&(Ns(n.element,r,a),Ps(n.element,r))}finally{R()}if(!k?.yielded||!e.__tornSinceStart?.())break;k=null,e.__session=go(e.cache)}if(e.__slicer=null,n.clone=r,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await Ot("afterClone",n),!Pe(p,"render"))return null;if(k?.due()&&await k.pause(),Un(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{Ls(n.element,n.clone,n.styleCache,n.nodeMap)}catch(R){xt(e.__session,"shrink-failed","shrink pass failed",R),console.warn("[snapdom] shrink pass failed:",R)}try{await Tn(n.clone,n.element,n.nodeMap)}catch{}let v=R=>Promise.resolve().then(R),w=(async()=>{await Promise.all([v(()=>zn(n.clone,n.options)),v(()=>Vn(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{Us(n.element,n.clone,n.nodeMap)}catch(R){xt(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",R),console.warn("[snapdom] backdrop-filter emulation failed:",R)}if(e.compress&&(e.__compressionClip=f,e.__compressionRootTransform=u,await v(()=>er(n.clone,n.options,n.nodeMap))),e.captureSelection)try{Xi(n.nodeMap)}catch(R){xt(e.__session,"selection-compose-failed","field selection compose failed",R)}})(),C=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(C=v(async()=>{let R=n.element.ownerDocument||document,T=S?H=>{try{let E=H.getBoundingClientRect();return E.right>=S.left-200&&E.left<=S.right+200&&E.bottom>=S.top-200&&E.top<=S.bottom+200}catch{return!0}}:null,{required:$,usedCodepoints:O}=!S&&e.__fontUsage||Ln(n.element,T);if(e.embedFonts==="auto"){let H=new Set;try{for(let L of R.fonts)H.add(String(L.family).replace(/["']/g,"").toLowerCase())}catch{}if(!(H.size>0&&Array.from($).some(L=>H.has(String(L).split("__")[0].toLowerCase()))))return}if(X()){let H=new Set(Array.from($).map(E=>String(E).split("__")[0]).filter(Boolean));await In(H,1,R)}l=await cs({required:$,usedCodepoints:O,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:R})})),await Promise.all([w,C]);let M=(n.options.plugins||[]).some(R=>R&&(typeof R.beforeRender=="function"||typeof R.afterRender=="function"));n.options.engine,k?.due()&&await k.pause();let x=n.clone;tr(x,e.__compressedAssets);let _=await nr(n,{clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,fontsCSS:l});if(e.__compressedSnapshot=Zn(x,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:r,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:o,fontsCSS:l,clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return _}dt();bt();var wu=new Set(["png","jpeg","jpg","webp","svg"]);function sa(t={}){let e=typeof t.type=="string"&&wu.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let r=t.format!=null?n:e==="jpg"?"jpeg":e,i=qo(t.cache),o=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of o)typeof u=="string"?s.push(u):typeof u=="function"?a.push(u):u!=null&&console.warn("[snapdom] Ignored invalid exclude entry (expected selector string or predicate):",u);let c=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let p of Array.isArray(l.exclude)?l.exclude:[])try{if(u.matches(p))return!0}catch{}for(let p of Array.isArray(l.excludePredicates)?l.excludePredicates:[])try{if(p(u))return!0}catch{}if(typeof l.filter=="function")try{if(!l.filter(u))return!0}catch{}return!1},l={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:c,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:rt(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:Ji(t.iconFonts),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:r,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return l}St();ee();ht();var aa="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function Su(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var xu=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function vu(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(xu.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function ku(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(o=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(o.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let r=[t];t.querySelectorAll&&r.push(...t.querySelectorAll("*"));for(let i of r){let o=getComputedStyle(i),s=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var ca=new WeakMap;function Cu(t){let e=Wt(),n=ca.get(t);if(n&&n.epoch===e)return n.leaky;let r=!1,i={budget:2e4},o=s=>{for(let a=0;a<s.length&&!r;a++){if(--i.budget<0){r=!0;return}let c=s[a],f=c.selectorText;if(f&&/[+~]|:has\(/.test(f)){r=!0;return}let l=c.style;if(l&&(l.counterReset||l.counterIncrement||l.counterSet||l.content&&l.content.includes("counter"))){r=!0;return}c.cssRules&&c.cssRules.length&&o(c.cssRules)}};try{for(let s of t.styleSheets){let a=null;try{a=s.cssRules}catch{r=!0}if(r)break;a&&o(a)}if(!r){let s=t.adoptedStyleSheets;if(Array.isArray(s))for(let a of s){if(r)break;try{o(a.cssRules)}catch{r=!0}}}}catch{r=!0}return ca.set(t,{epoch:e,leaky:r}),r}var Au=1/16;function Mu(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),r=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(r)&&Math.abs(n-r)<=Au}var rr=new Map,_u=["width","height","min-width","min-height"];function Eu(t){let e=rr.get(t);if(e===void 0){e=null;for(let n of _u){let r=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));r&&r[1].endsWith("px")&&((e||={})[n]=r[1])}rr.size>5e3&&rr.clear(),rr.set(t,e)}return e}function Ru(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function Fu(t,e){let n=[t];for(;n.length;){let r=n.pop();if(r.nodeType===1){let i=e.nodeMap.get(r);i!==void 0&&(e.nodeMap.delete(r),e.srcToClone.get(i)===r&&e.srcToClone.delete(i)),e.styleMap.delete(r)}for(let i=r.firstChild;i;i=i.nextSibling)n.push(i)}}var vo={attempts:0,served:0,reconciled:0};async function la(t,e,n){vo.attempts++;try{let r=await Tu(t,e,n);return r&&vo.served++,r}catch{return null}}async function Tu(t,e,n){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||Su(t)||vu(r)||r.fontsCSS||Kn(n))return null;for(let u of n.plugins||[])if(u&&(typeof u.beforeSnap=="function"||typeof u.beforeClone=="function"||typeof u.resolveNode=="function"||typeof u.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,o=en(t);if(!o||Cu(i))return null;let s=[];t:for(let u of e.dirtyRoots){if(!u.isConnected||u===t||!t.contains(u))return null;for(let p of e.dirtyRoots)if(p!==u&&p!==t&&p.contains(u))continue t;s.push(u)}if(!s.length)return null;n.__compressedAssets=r.__compressedAssets,n.__compressionDensity=r.__compressionDensity,n.__compressionRootTransform=r.rootTransform2D;for(let u of s){if(u.parentElement===t||u.matches?.(aa)||u.querySelector?.(aa)||ku(u,o))return null;let p=r.srcToClone.get(u);if(!p||!p.parentNode)return null;let h=new Map,m={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:h,options:n},d=Xn(u,null),g=Dn(u),y;try{y=await Yt(u,m,n)}finally{g(),d()}if(!y||y.nodeType!==1||y.querySelector?.("style[data-sd]")||(await Re(u,y,m,n),m.__pseudoCSS))return null;await Mn(y,m),Un(y);try{await Tn(y,u,h)}catch{}if(await Promise.all([zn(y,n),Vn(u,y,r.styleCache,n,h)]),n.compress)try{await er(y,n,h)}catch{}for(let[b,S]of h.entries())mo(b,S);p.replaceWith(y),Fu(p,r);for(let[b,S]of h.entries())r.nodeMap.set(b,S),r.srcToClone.set(S,b)}let a={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:r.nodeMap,options:n};for(let[u,p]of r.nodeMap.entries()){if(!p||p.nodeType!==1||!p.isConnected)continue;let h=r.styleMap.get(u);if(!h)continue;let m=Eu(h);if(!m)continue;let d=null,g=!1;for(let y in m)if(d||=getComputedStyle(p),!Mu(d.getPropertyValue(y),m[y])){g=!0;break}if(g){if(n.__compressedAssets?.has(u))return null;vo.reconciled++,await lt(p,u,a,n)}}let c=Xe(r.styleMap);for(let[u,p]of r.styleMap.entries())Ru(u),ho(u,p,c);let f=(r.classPrefixCSS||"")+Array.from(c.entries()).map(([u,p])=>`.${p}{${u}}`).join("");tr(r.clone,n.__compressedAssets);let l=await nr({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:f,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||""});return n.__compressedSnapshot=Zn(r.clone,n.__compressedAssets),r.__compressedAssets=n.__compressedAssets,r.__compressionDensity=n.__compressionDensity,l}bt();var Co=new WeakMap,ir=new WeakMap,Sa=new WeakSet,ko=new WeakMap,$u=64,ln=new Map,xa=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],Pu=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function Nu(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":Pu.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function fa(t){let e=[];for(let n=t;n;){try{let r=n.getBoundingClientRect();e.push(r.x,r.y,r.width,r.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=n.getRootNode?.()?.host||null}return e.join("|")}function ua(t,e){if(e.disposed||(ln.delete(t),ln.set(t,e),ln.size<=$u))return;let[n,r]=ln.entries().next().value;va(n,r)}function va(t,e){e.disposed=!0,ln.delete(t),Co.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of xa)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let r of Mo)n.removeEventListener(r,e.onMediaDirty,!0);for(let[n,r]of e.trackedImages)n.removeEventListener("load",r),n.removeEventListener("error",r);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function ka(t){if(Sa.has(t))return!1;ir.delete(t);let e=[t],n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i],s=[];o?.nodeType===1&&s.push(o);try{s.push(...o.querySelectorAll("*"))}catch{return!1}for(let a of s){a.shadowRoot&&e.push(a.shadowRoot);let c=String(a.localName||a.tagName||"").toLowerCase();if(/^(?:iframe|canvas|video|audio|object|embed|marquee|blink)$/.test(c)||c==="progress"&&!a.hasAttribute("value")||/^(?:animate|animatetransform|animatemotion|set)$/.test(c))return!1;let f="";if(c==="img"){r.push(a);try{f=a.currentSrc||a.src||""}catch{}}/^(?:input|textarea|select|option)$/.test(c)&&n.push(a);let l=a.getAttribute?.("style")||"",u=ko.get(a);if(f||l){if((!u||u.src!==f||u.style!==l)&&(u={src:f,style:l,animated:Oe(f)||Oe(l)},ko.set(a,u)),u.animated)return!1}else u&&ko.delete(a)}}return ir.set(t,{roots:e.slice(1),controls:n,images:r}),!0}function Ao(t,e){if(!t.querySelectorAll)return!1;let n=ir.get(t);ir.delete(t);let r=new Set(n?.roots||[]);if(n&&(e.controls=n.controls,e.scannedImages=n.images),!n){let i=[t];for(let o=0;o<i.length;o++){let s=i[o];s.shadowRoot&&!r.has(s.shadowRoot)&&(r.add(s.shadowRoot),i.push(s.shadowRoot));for(let a of s.querySelectorAll("*"))a.shadowRoot&&!r.has(a.shadowRoot)&&(r.add(a.shadowRoot),i.push(a.shadowRoot))}}for(let[i,o]of e.trackedShadowRoots)if(!r.has(i)){try{o.disconnect()}catch{}for(let a of Mo)i.removeEventListener(a,e.onMediaDirty,!0);e.trackedShadowRoots.delete(i);let s=e.observers.indexOf(o);s>=0&&e.observers.splice(s,1)}for(let i of r)if(!e.trackedShadowRoots.has(i))try{let o=new MutationObserver(e.markDirty);o.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),o.__flush=e.markDirty,e.observers.push(o),e.trackedShadowRoots.set(i,o);for(let s of Mo)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Mo=["scroll","change","beforetoggle","toggle"];function sr(t,e){return[t,...e.trackedShadowRoots.keys()]}function _o(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let r of sr(t,e))r.querySelectorAll&&n.push(...r.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let r=new Set(n);for(let[i,o]of e.trackedImages)r.has(i)||(i.removeEventListener("load",o),i.removeEventListener("error",o),e.trackedImages.delete(i))}for(let r of n){if(r.complete||e.trackedImages.has(r))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r)};e.trackedImages.set(r,i),r.addEventListener("load",i),r.addEventListener("error",i)}}function da(t){let e=new Map,n=new Map,r=new Map;for(let i of t)if(oe(i))if(i.type==="attributes"){let o=e.get(i.target);o||e.set(i.target,o=new Map),o.has(i.attributeName)||o.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let o=r.get(i.target);o||r.set(i.target,o=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)-1)}}else return!0;for(let[i,o]of e)for(let[s,a]of o)if(i.getAttribute(s)!==a)return!0;for(let[i,o]of n)if(i.data!==o)return!0;for(let i of r.values())for(let o of i.values())if(o!==0)return!0;return!1}var Lu=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,We=t=>t&&(typeof t=="object"||typeof t=="function")?or(t):"-";function Iu(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let r=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(r)){let o=Math.ceil(e/3)*4;return atob(i.slice(0,o-o%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(o,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Wu(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Iu(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function pa(t){let e=String(t||"").trim();return e?Lu.test(e)?!0:/^data:/i.test(e)?Wu(e):!1:!1}function Oe(t){let e=String(t||"");if(pa(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(pa(n[1]??n[2]??n[3]))return!0;return!1}function ha(t,e=null){let n=t&&t.clone;if(!n)return!1;let r=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of r)for(let o of Ca(i))if(Oe(o.getAttribute?.("src"))||Oe(o.getAttribute?.("href"))||Oe(o.getAttribute?.("style"))||Oe(t.styleMap?.get(o)))return!0;return!1}function Ca(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function Eo(t,e){let n=[],r=new Set,i=o=>{o&&!r.has(o)&&(r.add(o),n.push(o))};t.matches?.("input,textarea,select,option")&&i(t);for(let o of sr(t,e))try{for(let s of o.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function Ro(t,e){let n=[],r=new Set,i=(o,s=!1)=>{if(!(!o||r.has(o))){r.add(o);try{(s||o.scrollLeft||o.scrollTop||o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight)&&n.push(o)}catch{}}};for(let o=t;o;o=o.parentElement)i(o,!0);for(let o of sr(t,e))for(let s of Ca(o))i(s);e.scrollNodes=n}function ma(t,e){let n=t.ownerDocument||document,r=n.defaultView,i=[r?.location?.hash||"",Nu(n),r?.innerWidth||0,r?.innerHeight||0,r?.devicePixelRatio||1,r?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(We))}catch{}for(let l of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...l.adoptedStyleSheets||[]].map(We))}catch{}let o=n.activeElement,s=n.fullscreenElement;(o?.contains(t)||t.contains(o))&&i.push(We(o)),(s?.contains(t)||t.contains(s))&&i.push(We(s));let a=[r?.scrollX||0,r?.scrollY||0];for(let l of e.scrollNodes)a.push(l.scrollLeft||0,l.scrollTop||0);let c=[];for(let l of e.controls){let u=String(l.localName||"").toLowerCase();u==="input"?c.push(l.type,qe(l)?l.value.length:l.value,l.checked?1:0,l.indeterminate?1:0):u==="textarea"?c.push(l.value):u==="select"?c.push(l.selectedIndex,l.value):c.push(l.selected?1:0)}let f=[];for(let l of e.images){let u="";try{u=l.currentSrc||l.src||""}catch{}f.push(u,l.complete?1:0,l.naturalWidth||0,l.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:c,images:f,frameDriven:e.retainedFrameDriven}}function Ie(t,e,n){if(!t)return!1;let r=t[n],i=e[n];if(r===i)return!0;if(!Array.isArray(r)||r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!==i[o])return!1;return!0}function ga(t,e){let n=new Set;for(let r of sr(t,e))try{let i=r.getAnimations?.(r.nodeType===1?{subtree:!0}:void 0)||[];for(let o of i)n.add(o)}catch{}return[...n]}function ya(t){return t.map(e=>[We(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Ou(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let r of e.trackedShadowRoots.keys())if(r.contains(n))return r;return null}function Du(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:Se(),styleEpoch:Wt(),styleStamp:tn(t),outsideMutations:Ze(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},r=a=>{if(!e.dirtyRoots)return;let c=a&&(a.nodeType===1?a:a.parentElement);if(!c||c===t||!t.contains(c)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(c)},i=a=>{if(e.capturing){for(let c of a)e.pending.push(c);return}for(let c of a)oe(c)&&(e.dirty=!0,r(c.target))},o=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=o;try{for(let a of xa)t.addEventListener(a,o,{capture:!0,passive:!0})}catch{}return Ao(t,e)||Eo(t,e),Ro(t,e),_o(t,e),e}var Bu=0,ba=new WeakMap;function or(t){let e=ba.get(t);return e||(e="@"+ ++Bu,ba.set(t,e)),e}function Fo(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(or(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(or(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let s of t){let a=Fo(s,e);if(a===null)return null;o.push(a)}return"["+o.join(",")+"]"}let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)return JSON.stringify(or(t));let i=[];for(let o of Object.keys(t).sort()){let s=t[o];if(s===void 0)continue;let a=Fo(s,e);if(a===null)return null;i.push(JSON.stringify(o)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function wa(t,e){let{burst:n,invalidate:r,...i}=t||{};try{let o=Fo(i,new Set);return o===null?null:`${(e||[]).map(We).join(",")}:${o}`}catch{return null}}function Aa(t,e,n,r,i=null){let o=Co.get(t);o||(o=Du(t),o.baselineSignature=wa(e,n.plugins),Co.set(t,o));let s=wa(e,n.plugins),a=async()=>{if(o.disposed)return r();let f=s===null||s!==o.baselineSignature;f&&s!==null?o.pendingSig===s?(o.baselineSignature=s,o.last=null,o.dirty=!0,o.dirtyRoots=null,o.pendingSig=null,f=!1):o.pendingSig=s:o.pendingSig=null,Ao(t,o),_o(t,o);for(let C of o.observers)C.__flush(C.takeRecords());At();let l=Ze(t);o.dirty&&o.outsideMutations!==l&&o.dirtyAll(),o.outsideMutations=l;let u=t.getRootNode?.(),p=[...o.trackedShadowRoots.keys()];u?.nodeType===11&&!p.includes(u)&&p.push(u),kn(t.ownerDocument||document,p);let h=tn(t);o.styleStamp!==h&&(o.styleStamp=h,o.dirty||o.dirtyAll());let m=ma(t,o),d=ga(t,o);m.animation=ya(d),o.renderState&&(!Ie(o.renderState,m,"style")&&(xe(),o.dirtyAll()),Ie(o.renderState,m,"scroll")||o.dirtyAll(),Ie(o.renderState,m,"controls")||(ie(t),o.dirtyAll()),!Ie(o.renderState,m,"images")&&!o.dirty&&o.dirtyAll());let g=Se();o.envEpoch!==g&&(o.dirtyAll(),o.envEpoch=g);let y=Wt();if(o.styleEpoch!==y&&(o.styleEpoch=y,!o.dirty)){let C=fa(t);o.geometry!==null&&C!==o.geometry&&(ie(t),o.dirtyAll()),o.geometry=C}n.invalidate&&o.dirtyAll();let b=!1,S=!!o.renderState&&!Ie(o.renderState,m,"animation");try{let C=new Set;S&&d.length===0&&(C=null);for(let A of d){let M=A.playState==="running";if(!M&&!S)continue;M&&(b=!0),S=!0;let x=A.effect?.target;if(Ou(t,o,x)===t)C.add(x);else{C=null;break}}if(S&&C&&C.size&&o.retained){o.dirty=!0;for(let A of C)o.dirtyRoots&&o.dirtyRoots.add(A),ie(A)}else S&&!C&&o.dirtyAll()}catch{}let k=m.frameDriven,v=b||k;if(v&&(o.last=null),k&&o.dirtyAll(),!f&&!v&&!o.dirty&&o.last)return ua(t,o),o.last;o.capturing=!0;let w=null;try{let C=null,A=!1,M=null;if(!f&&o.dirty&&o.retained&&o.dirtyRoots&&o.dirtyRoots.size&&i){M=[...o.dirtyRoots];let x=await la(t,o,n);x&&(C=await i(x),A=!0)}if(C||(f||(n.__retain=x=>{let _=new Map;for(let[R,T]of x.nodeMap.entries())_.set(T,R);w={...x,srcToClone:_}}),n.__tornSinceStart=()=>{for(let x of o.observers)for(let _ of x.takeRecords())o.pending.push(_);return At(),o.torn||da(o.pending)||Ze(t)!==l},C=await r()),!f&&!o.disposed){o.dirty=!1,o.dirtyRoots=new Set,w?(o.retained=w,o.retainedFrameDriven=ha(w),Eo(t,o),Ro(t,o)):A&&(o.retainedFrameDriven||=ha(o.retained,M),Eo(t,o),Ro(t,o));let x=ma(t,o);x.animation=ya(ga(t,o));let _=["style","scroll","controls","images"];b||_.push("animation");let R=_.every(T=>Ie(m,x,T));o.renderState=x,o.styleEpoch=Wt(),o.styleStamp=tn(t),o.geometry=fa(t),o.renderState.frameDriven?(Sa.add(t),va(t,o)):R?!v&&!o.renderState.frameDriven&&(o.last=C,ua(t,o)):(o.dirtyAll(),o.last=null)}return C}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let A of o.observers)for(let M of A.takeRecords())o.pending.push(M);At();let C=Ze(t);(o.torn||da(o.pending)||C!==l)&&(o.dirtyAll(),o.last=null),o.outsideMutations=C,o.styleEpoch=Wt(),o.styleStamp=tn(t),o.pending.length=0,o.torn=!1,o.capturing=!1,o.disposed||(Ao(t,o),_o(t,o))}},c=o.inflight.then(a,a);return o.inflight=c.catch(()=>{}),c}var ar=null;function Ea(t){ar=t}var Uu='button, a[href], [role="button"], input, select, summary, label, [tabindex]',To=!1,fn=null,$o=new WeakMap,Ma=!1;function Ra(t,e){!To||!fn||e&&e.burst===!1||$o.set(fn.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function Fa(t){let e={control:t};fn=e,setTimeout(()=>{fn===e&&(fn=null)},0)}function No(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Uu):null}function _a(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=No(t);e&&(Fa(e),Po(t,!1))}function Hu(t){let e=No(t);e&&Fa(e)}function Po(t,e=!0){if(!ar||document.visibilityState==="hidden")return;let n=No(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let r=$o.get(n);if(r){if(!r.element.isConnected){$o.delete(n);return}ar(r.element,r.options).catch(()=>{});return}e&&!Ma&&(Ma=!0,ar(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function Ta(){if(To||typeof document>"u"||typeof document.addEventListener!="function")return;To=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",_a,t),document.addEventListener("keydown",_a,t),document.addEventListener("click",Hu,t),document.addEventListener("pointerenter",Po,t),document.addEventListener("focusin",Po,t)}wt();function cd(...t){return yo(...t),Y}async function ld(t,e){if(typeof t!="string"||!t.trim())throw new Error("[snapdom.fromString] html string required");let n=document.createElement("div");J(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await pt();let r=Array.from(n.childNodes).some(o=>o.nodeType===3&&o.textContent.trim()),i=n.children.length===1&&!r?n.firstElementChild:n;return await Vo(i,{...e||{},burst:!1})}finally{n.remove()}}var fd="3.1.1",Y=Object.assign(Vo,{plugins:cd,fromString:ld,version:fd,preCapture:Ta});Ea(Vo);var jo=Symbol("snapdom.internal"),ud=Symbol("snapdom.internal.silent"),Ha=new Set(["png","jpeg","jpg","webp","svg"]);async function Vo(t,e){if(!t)throw new Error("Element cannot be null or undefined");let n=sa(e);n.element=t,n.invalidate&&xe(),Ys(n,e&&e.plugins);let{stage:r,loweredBy:i}=Vs(n);n.needs=r,n.__needsLoweredBy=i;let o=Pe(r,"render"),s=n.burst===!0||!Kn(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=o&&!n.captureSelection&&n.burst!==!1&&s&&!a&&ka(t);return f&&Ra(t,e),n.snap||(n.snap={toPng:(l,u)=>Y.toPng(l,u),toSvg:(l,u)=>Y.toSvg(l,u)}),f?Aa(t,e,n,()=>Y.capture(t,n,jo),l=>za(l,n)):Y.capture(t,n,jo)}Y.capture=async(t,e,n)=>{if(n!==jo)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");if(Pe(e.needs||ft,"render")&&X()){if(e.embedFonts)try{let o=t.ownerDocument||document,s=new Set;if(e.embedFonts==="auto"){try{for(let l of o.fonts)s.add(String(l.family).replace(/["']/g,"").toLowerCase())}catch{}if(s.size===0)throw null}let a=Ln(t);e.clip||(e.__fontUsage=a);let c=a.required,f=new Set([...c].map(l=>String(l).split("__")[0]).filter(Boolean));if(e.embedFonts==="auto"&&(f=new Set([...f].filter(l=>s.has(l.toLowerCase()))),f.size===0))throw null;await In(f,1,o)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let o of i)try{if(on(o))continue;let s=o.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){D(e,"safari canvas poke failed",s)}}let r=await ia(t,e);return za(r,e)};async function za(t,e){let n=e.needs||ft,r=Pe(n,"render"),i=E=>Gs(n,e.__needsLoweredBy||[],E),o=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=o?null:t,a=()=>s??=o.toDataURL(),c=o||t;o&&(t="");let f=e.__compressedSnapshot,l=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let u,p=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!X(),d=m?Number.isFinite(e.width)?p.targetW/p.vbW:p.targetH/p.vbH:1,g=m?Number.isFinite(e.height)?p.targetH/p.vbH:p.targetW/p.vbW:1,y=E=>{if(o||!f?.size)return c;let L=p.vbW,P=p.vbH,F=E.crop;F&&(L=Math.max(1,Math.min(L,F.x+F.width)-Math.max(0,F.x)),P=Math.max(1,Math.min(P,F.y+F.height)-Math.max(0,F.y)));let V=Number.isFinite(E.width),z=Number.isFinite(E.height);return(V&&z?Math.max(E.width/L,E.height/P):V?E.width/L*(F?Math.max(1,g/d):1):z?E.height/P*(F?Math.max(1,d/g):1):(E.scale||1)*Math.max(d,g))*(E.dpr||1)<=l?c:u??=ea(a(),f)},b=async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(Be(),pn));return P(c,{...E,...L||{},format:"png"})},S=()=>{if(!r)throw i("svgString");if(o)throw new Error("[snapdom] svgString: engine:'html-in-canvas' produces a raster capture; there is no serialized SVG");let E=t.indexOf(",");return E>=0?decodeURIComponent(t.slice(E+1)):""},k=E=>Object.defineProperty({...E||{},svgString:S},"url",r?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),v={img:async(E,L)=>{if(o)return b(E,L);let{toImg:P}=await Promise.resolve().then(()=>(Uo(),Bo)),F={...E,...L||{}};return P(y(F),F)},svg:async(E,L)=>{if(o)return b(E,L);let{toSvg:P}=await Promise.resolve().then(()=>(Uo(),Bo)),F={...E,...L||{}};return P(y(F),F)},canvas:async(E,L)=>{let{toCanvas:P}=await Promise.resolve().then(()=>(De(),Wa)),F={...E,...L||{}};return P(y(F),F)},blob:async(E,L)=>{let{toBlob:P}=await Promise.resolve().then(()=>(zo(),Oa)),F={...E,...L||{}};return P(y(F),F)},png:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(Be(),pn)),F={...E,...L||{},format:"png"};return P(y(F),F)},jpeg:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(Be(),pn)),F={...E,...L||{},format:"jpeg"};return P(y(F),F)},webp:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(Be(),pn)),F={...E,...L||{},format:"webp"};return P(y(F),F)},download:async(E,L)=>{let{download:P}=await Promise.resolve().then(()=>(Ua(),Ba)),F={...E,...L||{}};return P(y(F),F)}};if(!r)for(let E of Object.keys(v)){let L=E==="download"?"download()":`to${E.charAt(0).toUpperCase()}${E.slice(1)}()`;v[E]=async()=>{throw i(L)}}let w={};for(let E of["img","svg","canvas","blob","png","jpeg","webp"])w[E]=async L=>v[E](e,{...R(E,L||{}),[ud]:!0});w.jpg=w.jpeg;let C=E=>Object.defineProperty({...e,...E},"options",{value:e,configurable:!0}),A=C({artifacts:e.__artifacts||null,export:k(),exports:w}),M=await Yn("defineExports",A),x=Object.assign({},...M.filter(E=>E&&typeof E=="object").reverse()),_={...v,...x};_.jpeg&&!_.jpg&&(_.jpg=(E,L)=>_.jpeg(E,L));function R(E,L){let P=L||{},F={...e,...P},V=typeof P.type=="string"?P.type.toLowerCase():"",z=typeof P.format=="string"?P.format.toLowerCase():Ha.has(V)?V:"";z&&(F.format=z==="jpg"?"jpeg":z),F.__explicitFormat=z?F.format:e.__explicitFormat??null,E==="blob"&&!F.__explicitFormat&&(F.format=o?"png":"svg"),F.type=F.format;let q=Z=>Z==="jpeg"||Z==="jpg"||Z==="webp";return[E,F.format,V].map(Z=>typeof Z=="string"?Z.toLowerCase():"").find(q)&&(F.backgroundColor==null||F.backgroundColor==="transparent")&&(F.backgroundColor="#ffffff"),F.scale!==1&&(Number.isFinite(F.width)||Number.isFinite(F.height))&&D(F,"width/height define the output size \u2014 scale is ignored when either is set"),F}let T=!1,$=Promise.resolve();async function O(E,L){let P=Object.freeze(L&&typeof L=="object"?{...L}:{}),F=async()=>{let z=_[E];if(!z)throw new Error(`[snapdom] Unknown export type: ${E}`);let q=R(E,P),B=C({artifacts:e.__artifacts||null,export:k({type:E,options:q,requestedOptions:P})}),Z=q.format,_t=q.type;await Yn("beforeExport",B,{format:E,options:q});let Dt=q.format!==Z?q.format:q.type!==_t?q.type:"",gt=typeof Dt=="string"?Dt.toLowerCase():"";Ha.has(gt)&&(q.format=gt==="jpg"?"jpeg":gt,q.type=q.format,q.__explicitFormat=q.format,/^(?:jpeg|webp)$/.test(q.format)&&(q.backgroundColor==null||q.backgroundColor==="transparent")&&(q.backgroundColor="#ffffff"));let st=await z(B,q);return await Yn("afterExport",B,{format:E,options:q,result:st}),T||(T=!0,await Ot("afterSnap",e)),st},V=$.then(F);return $=V.catch(()=>{}),V}let H={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return a()},to:(E,L)=>O(E,L),toImg:E=>O("img",E),toSvg:E=>O("svg",E),toCanvas:E=>O("canvas",E),toBlob:E=>O("blob",E),toPng:E=>O("png",E),toJpg:E=>O("jpg",E),toWebp:E=>O("webp",E),download:E=>O("download",E)};r?o&&Object.defineProperty(H,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(H,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(H,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let E of Object.keys(_)){let L="to"+E.charAt(0).toUpperCase()+E.slice(1);H[L]||(H[L]=P=>O(E,P))}return H}Y.toRaw=(t,e)=>Y(t,e).then(n=>n.toRaw());Y.toImg=(t,e)=>Y(t,e).then(n=>n.toImg());Y.toSvg=(t,e)=>Y(t,e).then(n=>n.toSvg());Y.toCanvas=(t,e)=>Y(t,e).then(n=>n.toCanvas());Y.toBlob=(t,e)=>Y(t,e).then(n=>n.toBlob());Y.toPng=(t,e)=>Y(t,{...e,format:"png"}).then(n=>n.toPng());Y.toJpg=(t,e)=>Y(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Y.toWebp=(t,e)=>Y(t,{...e,format:"webp"}).then(n=>n.toWebp());Y.download=(t,e)=>Y(t,e).then(n=>n.download());export{ft as DEFAULT_STAGE,$e as STAGES,qs as assertNeeds,qf as clearPlugins,bo as getGlobalPlugins,Le as normalizePlugin,yo as registerPlugins,Y as snapdom};
39
+ }`,mu=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),$t=null,gu=0,yu=0,ce=new Map;function sa(){for(let t of ce.values())t(void 0);if(ce.clear(),Array.isArray($t))for(let t of $t)try{t?.terminate()}catch{}$t=!1}function bu(){let t,e=null;try{t=URL.createObjectURL(new Blob([hu],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let r=ce.get(n.data.id);r&&(ce.delete(n.data.id),r(n.data.error?void 0:n.data.url??null))},e.onerror=sa}catch{e=null}return t&&URL.revokeObjectURL(t),e}function wu(){if($t===!1)return!1;if($t===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return $t=!1;$t=[]}let t=gu++%mu;if(!$t[t]){let e=bu();if(!e)return sa(),!1;$t[t]=e}return $t[t]}var Su=5e3;function xu(t,e,n,r,i){let o=wu();return o?new Promise(s=>{let a=++yu,c=setTimeout(()=>{ce.delete(a),s(void 0)},Su);ce.set(a,f=>{clearTimeout(c),s(f)});try{o.postMessage({id:a,dataURL:i?"":t,blob:i,srcLength:t.length,targetW:e,targetH:n,resFactor:ia,quality:oa,mime:r})}catch{clearTimeout(c),ce.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function So(t,e,n,r){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let i=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,o=N.compress,s=o.get(i);if(s?.source===t)return s.result;let a=Jn.get(i);if(a?.source===t&&a.cache===o)return a.promise;let c=(async()=>{let l=lu(t),u=l==="image/jpeg"?"image/jpeg":l==="image/webp"?"image/webp":"image/png",p=pu(t);if(p&&p.w>0&&p.h>0&&!ta(p.w,p.h,e,n))return null;if(t.length>=fu){let w=await xu(t,e,n,u,r);if(w!==void 0)return w}let h;try{h=await cu(t)}catch{return null}let m=h.naturalWidth||h.width,d=h.naturalHeight||h.height;if(!m||!d)return null;let g=ta(m,d,e,n);if(!g)return null;let y=g*ia,b=Math.max(1,Math.round(m*y)),S=Math.max(1,Math.round(d*y)),k=document.createElement("canvas");k.width=b,k.height=S;let v=k.getContext("2d");if(!v)return null;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(h,0,0,b,S);try{let w=k.toDataURL(u,oa);if(typeof w=="string"&&w.startsWith("data:image")&&w.length<t.length)return w}catch{}return null})(),f={source:t,promise:c,cache:o};Jn.set(i,f);try{let l=await c;return uu(o,i,t,l),l}finally{Jn.get(i)===f&&Jn.delete(i)}}async function vu(t,e,n=new Map,r={}){if(!e.compress)return{count:0,before:0,after:0};let i=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&i.unshift(t);let o=0,s=0,a=0,c=async l=>{let u=l.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let p=parseFloat(l.dataset.snapdomWidth)||parseFloat(l.style.width)||l.width||0,h=parseFloat(l.dataset.snapdomHeight)||parseFloat(l.style.height)||l.height||0;if(!p||!h)return;let m=r.value||=wo(t,e),d=m.density*m.stretch(n.get(l)||l),g=await So(u,p*d,h*d,l.__snapdomBlob);g&&(o++,s+=u.length,a+=g.length,l.setAttribute("src",g),Zn(l,"attribute","src",u,g,e))},f=6;for(let l=0;l<i.length;l+=f)await Promise.allSettled(i.slice(l,l+f).map(c));return{count:o,before:s,after:a}}var ku=/^(cover|contain|(\d+(\.\d+)?%(\s+\d+(\.\d+)?%)?))$/;function Cu(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function Au(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=[],o=[t,...t.querySelectorAll("*")];for(let f of o){let l=f.style&&f.style.backgroundImage;l&&l.includes("data:image")&&i.push(f)}let s=0,a=async f=>{let l=n.get(f);if(!l||!l.isConnected)return;let u;try{u=getComputedStyle(l)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(A=>A.trim()!=="no-repeat"))return;let h=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(h.split(",").some(A=>!ku.test(A.trim())))return;let{w:m,h:d}=Cu(l);if(!m||!d)return;let g=Math.max(1,...(h.match(/\d+(?:\.\d+)?%/g)||[]).map(A=>parseFloat(A)/100)),y=r.value||=wo(t,e),b=y.density*y.stretch(l)*g,S=m*b,k=d*b,v=f.style.backgroundImage,w=[...v.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],C=v;for(let A of w){let M=A[2];if(M.startsWith("data:image/svg"))continue;let x=await So(M,S,k);x&&(C=C.split(M).join(x),s++)}C!==v&&(f.style.setProperty("background-image",C,f.style.getPropertyPriority("background-image")),Zn(f,"style","background-image",v,f.style.backgroundImage,e))},c=6;for(let f=0;f<i.length;f+=c)await Promise.allSettled(i.slice(f,f+c).map(a));return{count:s}}async function Mu(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=Array.from(t.querySelectorAll("image"));t.localName==="image"&&i.unshift(t);let o=0,s=async c=>{let f=c.getAttribute("href")||(typeof c.getAttributeNS=="function"?c.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let l=c.getAttribute("width")||"",u=c.getAttribute("height")||"";if(l.includes("%")||u.includes("%"))return;let p=n.get(c),h=p?W(p):c.style,m=(k,v)=>{if(/^\d+(?:\.\d+)?px$/.test(h?.[k]||""))return parseFloat(h[k]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(v.trim()))return parseFloat(v);try{return p?.[k]?.baseVal?.value||0}catch{return 0}},d=m("width",l),g=m("height",u);if(!d||!g)return;let y=r.value||=wo(t,e),b=y.density*y.stretch(p||c),S=await So(f,d*b,g*b);S&&(c.setAttribute("href",S),Zn(c,"attribute","href",f,S,e),c.hasAttribute("xlink:href")&&(c.setAttributeNS(ea,"xlink:href",S),Zn(c,"attribute","xlink:href",f,S,e)),o++)},a=6;for(let c=0;c<i.length;c+=a)await Promise.allSettled(i.slice(c,c+a).map(s));return{count:o}}async function nr(t,e,n){if(!e.compress)return;let r={};await vu(t,e,n,r),await Au(t,e,n,r),await Mu(t,e,n,r)}mt();dt();xt();function _u(t,e){if(X())return t;let n=t.indexOf("</style>");if(n===-1)return t;let r=/<style\b[^>]*>[\s\S]*?<\/style>/g,i=[],o=n,s;for(r.lastIndex=n;s=r.exec(t);)i.push({text:t.slice(o,s.index),intern:!0}),i.push({text:s[0],intern:!1}),o=r.lastIndex;i.push({text:t.slice(o),intern:!0});let a=new Map,c=/ style="([^"]*)"/g,f;for(let y of i)if(y.intern)for(c.lastIndex=0;f=c.exec(y.text);)a.set(f[1],(a.get(f[1])||0)+1);let l=0;for(let[y,b]of a)b>1&&(l+=(b-1)*y.length);if(l<2048||t.includes(" data-sdi="))return t;let u=Eu(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(u===null)return t;let p=new Map,h=0,m=[],d=(y,b)=>{if((a.get(b)||0)<2||u.has(b))return y;let S=p.get(b);return S===void 0&&(S="i"+(h++).toString(36),p.set(b,S),m.push(`[data-sdi="${S}"]{${b}}`)),` data-sdi="${S}"`},g="";for(let y of i)g+=y.intern?y.text.replace(c,d):y.text;return t.slice(0,n)+m.join("")+g}function Eu(t,e,n){let r=new Set;if(!e&&!n)return r;if(!t||t.querySelector("[data-sdi]"))return null;let i=c=>{let f=c.getAttribute("style");f&&r.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let c=f=>{for(let l of f){if(l.type===CSSRule.IMPORT_RULE||l.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(l.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(l.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(l.selectorText).forEach(i)}l.cssRules&&c(l.cssRules)}};for(let f of[...t.querySelectorAll("style")].slice(1)){let l=f.textContent||"";if(/@import\b/i.test(l))return null;let u=new CSSStyleSheet;u.replaceSync(l),c(u.cssRules)}}catch{return null}let o=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let c of r){s.setAttribute("style",c);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&o.add(f[1])}return o}async function rr(t,e){let{clipWindow:n,outerTransforms:r,outerShadows:i,rootTransform2D:o,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:K,...tt}=t;t=Object.assign(a,tt),Object.defineProperty(t,"options",{value:t,configurable:!0})}let c,f;Ds(t,s),await Dt("beforeRender",t);let l=W(t.element),u=t.element.getBoundingClientRect(),p=Math.max(1,I(t.element.offsetWidth||parseFloat(l.width)||u.width||1)),h=Math.max(1,I(t.element.offsetHeight||parseFloat(l.height)||u.height||1)),m=t.element.ownerDocument||document;if(!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned){let K=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),tt=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0);K>0&&(h=Math.max(h,I(K))),tt>0&&(p=Math.max(p,I(tt)));try{let Q=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,et=N.measureHints.get(t.element);if(et&&et.cssLen===Q&&et.w0===p&&et.docH===K&&et.docW===tt)et.csh>0&&(h=Math.max(h,I(et.csh))),et.csw>0&&(p=Math.max(p,I(et.csw)));else{let nt=m.createElement("div");J(nt),nt.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+p+"px!important;overflow:visible!important;visibility:hidden!important;";let Jt=nt.attachShadow({mode:"open"}),Zt=m.createElement("style");Zt.textContent=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS,Jt.appendChild(Zt),Jt.appendChild(t.clone.cloneNode(!0)),m.body.appendChild(nt);let He=nt.scrollHeight,zt=nt.scrollWidth;m.body.removeChild(nt),N.measureHints.set(t.element,{cssLen:Q,w0:p,docH:K,docW:tt,csh:He,csw:zt}),He>0&&(h=Math.max(h,I(He))),zt>0&&(p=Math.max(p,I(zt)))}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let K=po(t.element,t.options),tt=1,Q=po(t.element,{}),et=Math.max(2,h*.15);Number.isFinite(Q)&&Q>=h-et&&Number.isFinite(K)&&K>0&&(h=Math.max(1,Math.min(h,I(K+tt))))}if(t.options?.reconcile)try{let K=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;Os(t.element,t.clone,K,t.nodeMap,p,h)}catch(K){console.warn("[snapdom] reconcile pass failed:",K)}let g=(K,tt=NaN)=>{let Q=typeof K=="string"?parseFloat(K):K;return Number.isFinite(Q)?Q:tt},y=g(t.options.width),b=g(t.options.height),S=n?I(n.width):p,k=n?I(n.height):h,v=S,w=k,C=Number.isFinite(y),A=Number.isFinite(b),M=k>0?S/k:1;C&&A?(v=Math.max(1,I(y)),w=Math.max(1,I(b))):C?(v=Math.max(1,I(y)),w=Math.max(1,I(v/(M||1)))):A&&(w=Math.max(1,I(b)),v=Math.max(1,I(w*(M||1))));let x=0,_=0,R=p,T=h;if(n){let K=0,tt=0;if(xo(t.element)){let Q=null;if(!r&&o&&Number.isFinite(o.a))Q={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0};else{let et=ae(t.element),nt=uo(l.transform&&l.transform!=="none"?l.transform:"",et);nt&&nt.is2D&&(Q={a:nt.a,b:nt.b,c:nt.c,d:nt.d,e:0,f:0})}if(Q&&!(Q.a===1&&Q.b===0&&Q.c===0&&Q.d===1)){let{ox:et,oy:nt}=an(l,p,h),Jt=$e(p,h,Q,et,nt);K=Jt.minX,tt=Jt.minY}}x=I(n.x+K),_=I(n.y+tt),R=I(x+n.width),T=I(_+n.height)}else if(!r&&o&&Number.isFinite(o.a)){let K={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0},tt=$e(p,h,K,0,0);x=I(tt.minX),_=I(tt.minY),R=I(tt.maxX),T=I(tt.maxY)}else if(r&&xo(t.element)){let tt=l.transform&&l.transform!=="none"?l.transform:"",Q=ae(t.element),et=Kt({baseTransform:tt,rotate:Q.rotate||"0deg",scale:Q.scale,translate:Q.translate,width:p,height:h}),{ox:nt,oy:Jt}=an(l,p,h),Zt=et.is2D?et:new DOMMatrix(et.toString()),He={a:Zt.a,b:Zt.b,c:Zt.c,d:Zt.d,e:0,f:0},zt=$e(p,h,He,nt,Jt);x=I(zt.minX),_=I(zt.minY),R=I(zt.maxX),T=I(zt.maxY)}let $=oo(l),O=io(l),z=so(l),E=ao(l),L=co(l),P=u.width>0?(R-x)/u.width:1,F=u.height>0?(T-_)/u.height:1,V=i==="subtree"&&!n?Ms(t.element,t.nodeMap,t.styleCache,P,F):{top:0,right:0,bottom:0,left:0},H=n?{top:0,right:0,bottom:0,left:0}:i?{top:I(Math.max($.top,O.top,V.top)+z.top+E.top+L.bleed.top),right:I(Math.max($.right,O.right,V.right)+z.right+E.right+L.bleed.right),bottom:I(Math.max($.bottom,O.bottom,V.bottom)+z.bottom+E.bottom+L.bleed.bottom),left:I(Math.max($.left,O.left,V.left)+z.left+E.left+L.bleed.left)}:{top:z.top,right:z.right,bottom:z.bottom,left:z.left};x=I(x-H.left),_=I(_-H.top),R=I(R+H.right),T=I(T+H.bottom);let q=Math.max(1,I(R-x)),B=Math.max(1,I(T-_)),Z="http://www.w3.org/2000/svg",Et=xo(t.element)?2:0,yt=I(Et+(r?0:1)),st=Math.ceil(q+yt*2),at=Math.ceil(B+yt*2),Nt=I(-(I(x)-yt)),U=I(-(I(_)-yt)),G=Math.max(0,Nt),j=Math.max(0,U),ut=I(st-Math.min(0,Nt)),Rt=I(at-Math.min(0,U)),hn=m.defaultView||window,bt=!X()&&!ht()&&hn.devicePixelRatio||1,wt=document.createElementNS(Z,"foreignObject");wt.setAttribute("x",String(Math.min(0,Nt)*bt)),wt.setAttribute("y",String(Math.min(0,U)*bt)),wt.setAttribute("width",String(ut*bt)),wt.setAttribute("height",String(Rt*bt)),wt.style.overflow="visible";let pr=document.createElement("style"),ue="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";pr.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+ue+t.classCSS,wt.appendChild(pr);let de=document.createElement("div");de.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),de.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${ut}px;height:${Rt}px`+(G!==0||j!==0?`;padding:${j}px 0 0 ${G}px !important`:"")+(bt!==1?`;zoom:${bt} !important`:""),de.appendChild(t.clone),wt.appendChild(de);let hr=new XMLSerializer().serializeToString(wt),mn=C||A,gn=Object.freeze({w0:S,h0:k,vbW:st,vbH:at,targetW:v,targetH:w,contentX:I(Nt+(n?x:0)),contentY:I(U+(n?_:0)),clip:n?Object.freeze({x:I(x),y:I(_),width:S,height:k}):null});Object.defineProperty(a,"meta",{value:gn,enumerable:!0,writable:!1,configurable:!0});let Ut=!mn||X()?st:C?v:I(st*(w/at)),qa=!mn||X()?at:A?w:I(at*(v/st)),Ga=parseFloat(W(m.documentElement)?.fontSize)||16,qo=bt!==1,Xa=`<svg xmlns="${Z}" width="${Ut}" height="${qa}" viewBox="0 0 ${st} ${at}" font-size="${Ga}px">${qo?`<g transform="scale(${1/bt})">`:""}`,Ya=qo?"</g></svg>":"</svg>";f=Xa+_u(hr,wt)+Ya,c=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,t.svgString=f,t.dataURL=c,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await Dt("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let mr=[...document.querySelectorAll("#snapdom-sandbox")].find(jt);return mr&&mr.style.position==="absolute"&&mr.remove(),t.dataURL}function xo(t){return Es(t)}function Ru(t){let e=Array.isArray(t.plugins)?t.plugins:bo(),n=[];for(let r of e){let i=We(r);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function aa(t,e){if(!t)throw new Error("Element cannot be null or undefined");e.__session=go(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=Ru(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let r,i,o,s,a,c,f,l="",u=null,p=e.needs||ft,h=n.format,m=n.type;await Dt("beforeSnap",n);let d=n.format!==h&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),g=n.type!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(d||g){let R=String(d?n.format:n.type).toLowerCase();n.format=R==="jpg"?"jpeg":R,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await Dt("beforeClone",n);let y=n.outerTransforms!==!1,b=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,S=n.clip?Un(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=ki(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let k=di(e.fast);for(;;){e.__slicer=k;let R=Yn(n.element,S);try{({clone:r,classCSS:i,classPrefixCSS:o,styleCache:s,nodeMap:a,reconcileRisk:c,clipWindow:f}=await Bs(n.element,n.options)),c>0&&!e.reconcile&&(kt(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),N.warnedReconcile||(N.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time)."))),!y&&r&&(u=_s(n.element,r)),!b&&r&&Ns(n.element,r,n.options),r&&(Is(n.element,r,a),Ls(n.element,r))}finally{R()}if(!k?.yielded||!e.__tornSinceStart?.())break;k=null,e.__session=go(e.cache)}if(e.__slicer=null,n.clone=r,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await Dt("afterClone",n),!Le(p,"render"))return null;if(k?.due()&&await k.pause(),zn(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{Ws(n.element,n.clone,n.styleCache,n.nodeMap)}catch(R){kt(e.__session,"shrink-failed","shrink pass failed",R),console.warn("[snapdom] shrink pass failed:",R)}try{await $n(n.clone,n.element,n.nodeMap)}catch{}let v=R=>Promise.resolve().then(R),w=(async()=>{await Promise.all([v(()=>jn(n.clone,n.options)),v(()=>qn(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{Hs(n.element,n.clone,n.nodeMap)}catch(R){kt(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",R),console.warn("[snapdom] backdrop-filter emulation failed:",R)}if(e.compress&&(e.__compressionClip=f,e.__compressionRootTransform=u,await v(()=>nr(n.clone,n.options,n.nodeMap))),e.captureSelection)try{Ki(n.nodeMap)}catch(R){kt(e.__session,"selection-compose-failed","field selection compose failed",R)}})(),C=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(C=v(async()=>{let R=n.element.ownerDocument||document,T=S?z=>{try{let E=z.getBoundingClientRect();return E.right>=S.left-200&&E.left<=S.right+200&&E.bottom>=S.top-200&&E.top<=S.bottom+200}catch{return!0}}:null,{required:$,usedCodepoints:O}=!S&&e.__fontUsage||In(n.element,T);if(e.embedFonts==="auto"){let z=new Set;try{for(let L of R.fonts)z.add(String(L.family).replace(/["']/g,"").toLowerCase())}catch{}if(!(z.size>0&&Array.from($).some(L=>z.has(String(L).split("__")[0].toLowerCase()))))return}if(X()){let z=new Set(Array.from($).map(E=>String(E).split("__")[0]).filter(Boolean));await Wn(z,1,R)}l=await fs({required:$,usedCodepoints:O,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:R})})),await Promise.all([w,C]);let M=(n.options.plugins||[]).some(R=>R&&(typeof R.beforeRender=="function"||typeof R.afterRender=="function"));n.options.engine,k?.due()&&await k.pause();let x=n.clone;er(x,e.__compressedAssets);let _=await rr(n,{clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,fontsCSS:l});if(e.__compressedSnapshot=tr(x,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:r,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:o,fontsCSS:l,clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return _}dt();St();var Fu=new Set(["png","jpeg","jpg","webp","svg"]);function ca(t={}){let e=typeof t.type=="string"&&Fu.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let r=t.format!=null?n:e==="jpg"?"jpeg":e,i=Go(t.cache),o=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of o)typeof u=="string"?s.push(u):typeof u=="function"?a.push(u):u!=null&&console.warn("[snapdom] Ignored invalid exclude entry (expected selector string or predicate):",u);let c=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let p of Array.isArray(l.exclude)?l.exclude:[])try{if(u.matches(p))return!0}catch{}for(let p of Array.isArray(l.excludePredicates)?l.excludePredicates:[])try{if(p(u))return!0}catch{}if(typeof l.filter=="function")try{if(!l.filter(u))return!0}catch{}return!1},l={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:c,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:rt(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:ts(t.iconFonts),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:r,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return l}vt();ee();mt();var la="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function Tu(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var $u=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function Pu(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if($u.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function Nu(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(o=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(o.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let r=[t];t.querySelectorAll&&r.push(...t.querySelectorAll("*"));for(let i of r){let o=getComputedStyle(i),s=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var fa=new WeakMap;function Lu(t){let e=Ot(),n=fa.get(t);if(n&&n.epoch===e)return n.leaky;let r=!1,i={budget:2e4},o=s=>{for(let a=0;a<s.length&&!r;a++){if(--i.budget<0){r=!0;return}let c=s[a],f=c.selectorText;if(f&&/[+~]|:has\(/.test(f)){r=!0;return}let l=c.style;if(l&&(l.counterReset||l.counterIncrement||l.counterSet||l.content&&l.content.includes("counter"))){r=!0;return}c.cssRules&&c.cssRules.length&&o(c.cssRules)}};try{for(let s of t.styleSheets){let a=null;try{a=s.cssRules}catch{r=!0}if(r)break;a&&o(a)}if(!r){let s=t.adoptedStyleSheets;if(Array.isArray(s))for(let a of s){if(r)break;try{o(a.cssRules)}catch{r=!0}}}}catch{r=!0}return fa.set(t,{epoch:e,leaky:r}),r}var Iu=1/16;function Wu(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),r=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(r)&&Math.abs(n-r)<=Iu}var or=new Map,Ou=["width","height","min-width","min-height"];function Du(t){let e=or.get(t);if(e===void 0){e=null;for(let n of Ou){let r=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));r&&r[1].endsWith("px")&&((e||={})[n]=r[1])}or.size>5e3&&or.clear(),or.set(t,e)}return e}function Bu(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function Uu(t,e){let n=[t];for(;n.length;){let r=n.pop();if(r.nodeType===1){let i=e.nodeMap.get(r);i!==void 0&&(e.nodeMap.delete(r),e.srcToClone.get(i)===r&&e.srcToClone.delete(i)),e.styleMap.delete(r)}for(let i=r.firstChild;i;i=i.nextSibling)n.push(i)}}var vo={attempts:0,served:0,reconciled:0};async function ua(t,e,n){vo.attempts++;try{let r=await zu(t,e,n);return r&&vo.served++,r}catch{return null}}async function zu(t,e,n){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||Tu(t)||Pu(r)||r.fontsCSS||Qn(n))return null;for(let u of n.plugins||[])if(u&&(typeof u.beforeSnap=="function"||typeof u.beforeClone=="function"||typeof u.resolveNode=="function"||typeof u.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,o=en(t);if(!o||Lu(i))return null;let s=[];t:for(let u of e.dirtyRoots){if(!u.isConnected||u===t||!t.contains(u))return null;for(let p of e.dirtyRoots)if(p!==u&&p!==t&&p.contains(u))continue t;s.push(u)}if(!s.length)return null;n.__compressedAssets=r.__compressedAssets,n.__compressionDensity=r.__compressionDensity,n.__compressionRootTransform=r.rootTransform2D;for(let u of s){if(u.parentElement===t||u.matches?.(la)||u.querySelector?.(la)||Nu(u,o))return null;let p=r.srcToClone.get(u);if(!p||!p.parentNode)return null;let h=new Map,m={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:h,options:n},d=Yn(u,null),g=Bn(u),y;try{y=await Yt(u,m,n)}finally{g(),d()}if(!y||y.nodeType!==1||y.querySelector?.("style[data-sd]")||(await Te(u,y,m,n),m.__pseudoCSS))return null;await _n(y,m),zn(y);try{await $n(y,u,h)}catch{}if(await Promise.all([jn(y,n),qn(u,y,r.styleCache,n,h)]),n.compress)try{await nr(y,n,h)}catch{}for(let[b,S]of h.entries())mo(b,S);p.replaceWith(y),Uu(p,r);for(let[b,S]of h.entries())r.nodeMap.set(b,S),r.srcToClone.set(S,b)}let a={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:r.nodeMap,options:n};for(let[u,p]of r.nodeMap.entries()){if(!p||p.nodeType!==1||!p.isConnected)continue;let h=r.styleMap.get(u);if(!h)continue;let m=Du(h);if(!m)continue;let d=null,g=!1;for(let y in m)if(d||=getComputedStyle(p),!Wu(d.getPropertyValue(y),m[y])){g=!0;break}if(g){if(n.__compressedAssets?.has(u))return null;vo.reconciled++,await lt(p,u,a,n)}}let c=Xe(r.styleMap);for(let[u,p]of r.styleMap.entries())Bu(u),ho(u,p,c);let f=(r.classPrefixCSS||"")+Array.from(c.entries()).map(([u,p])=>`.${p}{${u}}`).join("");er(r.clone,n.__compressedAssets);let l=await rr({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:f,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||""});return n.__compressedSnapshot=tr(r.clone,n.__compressedAssets),r.__compressedAssets=n.__compressedAssets,r.__compressionDensity=n.__compressionDensity,l}St();var Co=new WeakMap,sr=new WeakMap,va=new WeakSet,ko=new WeakMap,Hu=64,ln=new Map,ka=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],ju=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function Vu(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":ju.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function da(t){let e=[];for(let n=t;n;){try{let r=n.getBoundingClientRect();e.push(r.x,r.y,r.width,r.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=n.getRootNode?.()?.host||null}return e.join("|")}function pa(t,e){if(e.disposed||(ln.delete(t),ln.set(t,e),ln.size<=Hu))return;let[n,r]=ln.entries().next().value;Ca(n,r)}function Ca(t,e){e.disposed=!0,ln.delete(t),Co.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of ka)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let r of Mo)n.removeEventListener(r,e.onMediaDirty,!0);for(let[n,r]of e.trackedImages)n.removeEventListener("load",r),n.removeEventListener("error",r);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function Aa(t){if(va.has(t))return!1;sr.delete(t);let e=[t],n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i],s=[];o?.nodeType===1&&s.push(o);try{s.push(...o.querySelectorAll("*"))}catch{return!1}for(let a of s){a.shadowRoot&&e.push(a.shadowRoot);let c=String(a.localName||a.tagName||"").toLowerCase();if(/^(?:iframe|canvas|video|audio|object|embed|marquee|blink)$/.test(c)||c==="progress"&&!a.hasAttribute("value")||/^(?:animate|animatetransform|animatemotion|set)$/.test(c))return!1;let f="";if(c==="img"){r.push(a);try{f=a.currentSrc||a.src||""}catch{}}/^(?:input|textarea|select|option)$/.test(c)&&n.push(a);let l=a.getAttribute?.("style")||"",u=ko.get(a);if(f||l){if((!u||u.src!==f||u.style!==l)&&(u={src:f,style:l,animated:Be(f)||Be(l)},ko.set(a,u)),u.animated)return!1}else u&&ko.delete(a)}}return sr.set(t,{roots:e.slice(1),controls:n,images:r}),!0}function Ao(t,e){if(!t.querySelectorAll)return!1;let n=sr.get(t);sr.delete(t);let r=new Set(n?.roots||[]);if(n&&(e.controls=n.controls,e.scannedImages=n.images),!n){let i=[t];for(let o=0;o<i.length;o++){let s=i[o];s.shadowRoot&&!r.has(s.shadowRoot)&&(r.add(s.shadowRoot),i.push(s.shadowRoot));for(let a of s.querySelectorAll("*"))a.shadowRoot&&!r.has(a.shadowRoot)&&(r.add(a.shadowRoot),i.push(a.shadowRoot))}}for(let[i,o]of e.trackedShadowRoots)if(!r.has(i)){try{o.disconnect()}catch{}for(let a of Mo)i.removeEventListener(a,e.onMediaDirty,!0);e.trackedShadowRoots.delete(i);let s=e.observers.indexOf(o);s>=0&&e.observers.splice(s,1)}for(let i of r)if(!e.trackedShadowRoots.has(i))try{let o=new MutationObserver(e.markDirty);o.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),o.__flush=e.markDirty,e.observers.push(o),e.trackedShadowRoots.set(i,o);for(let s of Mo)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Mo=["scroll","change","beforetoggle","toggle"];function ar(t,e){return[t,...e.trackedShadowRoots.keys()]}function _o(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let r of ar(t,e))r.querySelectorAll&&n.push(...r.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let r=new Set(n);for(let[i,o]of e.trackedImages)r.has(i)||(i.removeEventListener("load",o),i.removeEventListener("error",o),e.trackedImages.delete(i))}for(let r of n){if(r.complete||e.trackedImages.has(r))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r)};e.trackedImages.set(r,i),r.addEventListener("load",i),r.addEventListener("error",i)}}function ha(t){let e=new Map,n=new Map,r=new Map;for(let i of t)if(oe(i))if(i.type==="attributes"){let o=e.get(i.target);o||e.set(i.target,o=new Map),o.has(i.attributeName)||o.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let o=r.get(i.target);o||r.set(i.target,o=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)-1)}}else return!0;for(let[i,o]of e)for(let[s,a]of o)if(i.getAttribute(s)!==a)return!0;for(let[i,o]of n)if(i.data!==o)return!0;for(let i of r.values())for(let o of i.values())if(o!==0)return!0;return!1}var qu=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,De=t=>t&&(typeof t=="object"||typeof t=="function")?ir(t):"-";function Gu(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let r=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(r)){let o=Math.ceil(e/3)*4;return atob(i.slice(0,o-o%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(o,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Xu(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Gu(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function ma(t){let e=String(t||"").trim();return e?qu.test(e)?!0:/^data:/i.test(e)?Xu(e):!1:!1}function Be(t){let e=String(t||"");if(ma(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(ma(n[1]??n[2]??n[3]))return!0;return!1}function ga(t,e=null){let n=t&&t.clone;if(!n)return!1;let r=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of r)for(let o of Ma(i))if(Be(o.getAttribute?.("src"))||Be(o.getAttribute?.("href"))||Be(o.getAttribute?.("style"))||Be(t.styleMap?.get(o)))return!0;return!1}function Ma(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function Eo(t,e){let n=[],r=new Set,i=o=>{o&&!r.has(o)&&(r.add(o),n.push(o))};t.matches?.("input,textarea,select,option")&&i(t);for(let o of ar(t,e))try{for(let s of o.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function Ro(t,e){let n=[],r=new Set,i=(o,s=!1)=>{if(!(!o||r.has(o))){r.add(o);try{(s||o.scrollLeft||o.scrollTop||o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight)&&n.push(o)}catch{}}};for(let o=t;o;o=o.parentElement)i(o,!0);for(let o of ar(t,e))for(let s of Ma(o))i(s);e.scrollNodes=n}function ya(t,e){let n=t.ownerDocument||document,r=n.defaultView,i=[r?.location?.hash||"",Vu(n),r?.innerWidth||0,r?.innerHeight||0,r?.devicePixelRatio||1,r?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(De))}catch{}for(let l of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...l.adoptedStyleSheets||[]].map(De))}catch{}let o=n.activeElement,s=n.fullscreenElement;(o?.contains(t)||t.contains(o))&&i.push(De(o)),(s?.contains(t)||t.contains(s))&&i.push(De(s));let a=[r?.scrollX||0,r?.scrollY||0];for(let l of e.scrollNodes)a.push(l.scrollLeft||0,l.scrollTop||0);let c=[];for(let l of e.controls){let u=String(l.localName||"").toLowerCase();u==="input"?c.push(l.type,qe(l)?l.value.length:l.value,l.checked?1:0,l.indeterminate?1:0):u==="textarea"?c.push(l.value):u==="select"?c.push(l.selectedIndex,l.value):c.push(l.selected?1:0)}let f=[];for(let l of e.images){let u="";try{u=l.currentSrc||l.src||""}catch{}f.push(u,l.complete?1:0,l.naturalWidth||0,l.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:c,images:f,frameDriven:e.retainedFrameDriven}}function Oe(t,e,n){if(!t)return!1;let r=t[n],i=e[n];if(r===i)return!0;if(!Array.isArray(r)||r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!==i[o])return!1;return!0}function ba(t,e){let n=new Set;for(let r of ar(t,e))try{let i=r.getAnimations?.(r.nodeType===1?{subtree:!0}:void 0)||[];for(let o of i)n.add(o)}catch{}return[...n]}function wa(t){return t.map(e=>[De(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Yu(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let r of e.trackedShadowRoots.keys())if(r.contains(n))return r;return null}function Ku(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:ve(),styleEpoch:Ot(),styleStamp:tn(t),outsideMutations:Ze(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},r=a=>{if(!e.dirtyRoots)return;let c=a&&(a.nodeType===1?a:a.parentElement);if(!c||c===t||!t.contains(c)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(c)},i=a=>{if(e.capturing){for(let c of a)e.pending.push(c);return}for(let c of a)oe(c)&&(e.dirty=!0,r(c.target))},o=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=o;try{for(let a of ka)t.addEventListener(a,o,{capture:!0,passive:!0})}catch{}return Ao(t,e)||Eo(t,e),Ro(t,e),_o(t,e),e}var Qu=0,Sa=new WeakMap;function ir(t){let e=Sa.get(t);return e||(e="@"+ ++Qu,Sa.set(t,e)),e}function Fo(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(ir(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(ir(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let s of t){let a=Fo(s,e);if(a===null)return null;o.push(a)}return"["+o.join(",")+"]"}let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)return JSON.stringify(ir(t));let i=[];for(let o of Object.keys(t).sort()){let s=t[o];if(s===void 0)continue;let a=Fo(s,e);if(a===null)return null;i.push(JSON.stringify(o)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function xa(t,e){let{burst:n,invalidate:r,...i}=t||{};try{let o=Fo(i,new Set);return o===null?null:`${(e||[]).map(De).join(",")}:${o}`}catch{return null}}function _a(t,e,n,r,i=null){let o=Co.get(t);o||(o=Ku(t),o.baselineSignature=xa(e,n.plugins),Co.set(t,o));let s=xa(e,n.plugins),a=async()=>{if(o.disposed)return r();let f=s===null||s!==o.baselineSignature;f&&s!==null?o.pendingSig===s?(o.baselineSignature=s,o.last=null,o.dirty=!0,o.dirtyRoots=null,o.pendingSig=null,f=!1):o.pendingSig=s:o.pendingSig=null,Ao(t,o),_o(t,o);for(let C of o.observers)C.__flush(C.takeRecords());_t();let l=Ze(t);o.dirty&&o.outsideMutations!==l&&o.dirtyAll(),o.outsideMutations=l;let u=t.getRootNode?.(),p=[...o.trackedShadowRoots.keys()];u?.nodeType===11&&!p.includes(u)&&p.push(u),Cn(t.ownerDocument||document,p);let h=tn(t);o.styleStamp!==h&&(o.styleStamp=h,o.dirty||o.dirtyAll());let m=ya(t,o),d=ba(t,o);m.animation=wa(d),o.renderState&&(!Oe(o.renderState,m,"style")&&(ke(),o.dirtyAll()),Oe(o.renderState,m,"scroll")||o.dirtyAll(),Oe(o.renderState,m,"controls")||(ie(t),o.dirtyAll()),!Oe(o.renderState,m,"images")&&!o.dirty&&o.dirtyAll());let g=ve();o.envEpoch!==g&&(o.dirtyAll(),o.envEpoch=g);let y=Ot();if(o.styleEpoch!==y&&(o.styleEpoch=y,!o.dirty)){let C=da(t);o.geometry!==null&&C!==o.geometry&&(ie(t),o.dirtyAll()),o.geometry=C}n.invalidate&&o.dirtyAll();let b=!1,S=!!o.renderState&&!Oe(o.renderState,m,"animation");try{let C=new Set;S&&d.length===0&&(C=null);for(let A of d){let M=A.playState==="running";if(!M&&!S)continue;M&&(b=!0),S=!0;let x=A.effect?.target;if(Yu(t,o,x)===t)C.add(x);else{C=null;break}}if(S&&C&&C.size&&o.retained){o.dirty=!0;for(let A of C)o.dirtyRoots&&o.dirtyRoots.add(A),ie(A)}else S&&!C&&o.dirtyAll()}catch{}let k=m.frameDriven,v=b||k;if(v&&(o.last=null),k&&o.dirtyAll(),!f&&!v&&!o.dirty&&o.last)return pa(t,o),o.last;o.capturing=!0;let w=null;try{let C=null,A=!1,M=null;if(!f&&o.dirty&&o.retained&&o.dirtyRoots&&o.dirtyRoots.size&&i){M=[...o.dirtyRoots];let x=await ua(t,o,n);x&&(C=await i(x),A=!0)}if(C||(f||(n.__retain=x=>{let _=new Map;for(let[R,T]of x.nodeMap.entries())_.set(T,R);w={...x,srcToClone:_}}),n.__tornSinceStart=()=>{for(let x of o.observers)for(let _ of x.takeRecords())o.pending.push(_);return _t(),o.torn||ha(o.pending)||Ze(t)!==l},C=await r()),!f&&!o.disposed){o.dirty=!1,o.dirtyRoots=new Set,w?(o.retained=w,o.retainedFrameDriven=ga(w),Eo(t,o),Ro(t,o)):A&&(o.retainedFrameDriven||=ga(o.retained,M),Eo(t,o),Ro(t,o));let x=ya(t,o);x.animation=wa(ba(t,o));let _=["style","scroll","controls","images"];b||_.push("animation");let R=_.every(T=>Oe(m,x,T));o.renderState=x,o.styleEpoch=Ot(),o.styleStamp=tn(t),o.geometry=da(t),o.renderState.frameDriven?(va.add(t),Ca(t,o)):R?!v&&!o.renderState.frameDriven&&(o.last=C,pa(t,o)):(o.dirtyAll(),o.last=null)}return C}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let A of o.observers)for(let M of A.takeRecords())o.pending.push(M);_t();let C=Ze(t);(o.torn||ha(o.pending)||C!==l)&&(o.dirtyAll(),o.last=null),o.outsideMutations=C,o.styleEpoch=Ot(),o.styleStamp=tn(t),o.pending.length=0,o.torn=!1,o.capturing=!1,o.disposed||(Ao(t,o),_o(t,o))}},c=o.inflight.then(a,a);return o.inflight=c.catch(()=>{}),c}var cr=null;function Fa(t){cr=t}var Ju='button, a[href], [role="button"], input, select, summary, label, [tabindex]',To=!1,fn=null,$o=new WeakMap,Ea=!1;function Ta(t,e){!To||!fn||e&&e.burst===!1||$o.set(fn.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function $a(t){let e={control:t};fn=e,setTimeout(()=>{fn===e&&(fn=null)},0)}function No(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Ju):null}function Ra(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=No(t);e&&($a(e),Po(t,!1))}function Zu(t){let e=No(t);e&&$a(e)}function Po(t,e=!0){if(!cr||document.visibilityState==="hidden")return;let n=No(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let r=$o.get(n);if(r){if(!r.element.isConnected){$o.delete(n);return}cr(r.element,r.options).catch(()=>{});return}e&&!Ea&&(Ea=!0,cr(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function Pa(){if(To||typeof document>"u"||typeof document.addEventListener!="function")return;To=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",Ra,t),document.addEventListener("keydown",Ra,t),document.addEventListener("click",Zu,t),document.addEventListener("pointerenter",Po,t),document.addEventListener("focusin",Po,t)}xt();function wd(...t){return yo(...t),Y}async function Sd(t,e){if(typeof t!="string"||!t.trim())throw new Error("[snapdom.fromString] html string required");let n=document.createElement("div");J(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await pt();let r=Array.from(n.childNodes).some(o=>o.nodeType===3&&o.textContent.trim()),i=n.children.length===1&&!r?n.firstElementChild:n;return await Vo(i,{...e||{},burst:!1})}finally{n.remove()}}var xd="3.1.2-dev.0",Y=Object.assign(Vo,{plugins:wd,fromString:Sd,version:xd,preCapture:Pa});Fa(Vo);var jo=Symbol("snapdom.internal"),vd=Symbol("snapdom.internal.silent"),ja=new Set(["png","jpeg","jpg","webp","svg"]);async function Vo(t,e){if(!t)throw new Error("Element cannot be null or undefined");let n=ca(e);n.element=t,n.invalidate&&ke(),Qs(n,e&&e.plugins);let{stage:r,loweredBy:i}=Gs(n);n.needs=r,n.__needsLoweredBy=i;let o=Le(r,"render"),s=n.burst===!0||!Qn(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=o&&!n.captureSelection&&n.burst!==!1&&s&&!a&&Aa(t);return f&&Ta(t,e),n.snap||(n.snap={toPng:(l,u)=>Y.toPng(l,u),toSvg:(l,u)=>Y.toSvg(l,u)}),f?_a(t,e,n,()=>Y.capture(t,n,jo),l=>Va(l,n)):Y.capture(t,n,jo)}Y.capture=async(t,e,n)=>{if(n!==jo)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");if(Le(e.needs||ft,"render")&&X()){if(e.embedFonts)try{let o=t.ownerDocument||document,s=new Set;if(e.embedFonts==="auto"){try{for(let l of o.fonts)s.add(String(l.family).replace(/["']/g,"").toLowerCase())}catch{}if(s.size===0)throw null}let a=In(t);e.clip||(e.__fontUsage=a);let c=a.required,f=new Set([...c].map(l=>String(l).split("__")[0]).filter(Boolean));if(e.embedFonts==="auto"&&(f=new Set([...f].filter(l=>s.has(l.toLowerCase()))),f.size===0))throw null;await Wn(f,1,o)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let o of i)try{if(on(o))continue;let s=o.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){D(e,"safari canvas poke failed",s)}}let r=await aa(t,e);return Va(r,e)};async function Va(t,e){let n=e.needs||ft,r=Le(n,"render"),i=E=>Ys(n,e.__needsLoweredBy||[],E),o=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=o?null:t,a=()=>s??=o.toDataURL(),c=o||t;o&&(t="");let f=e.__compressedSnapshot,l=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let u,p=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!X(),d=m?Number.isFinite(e.width)?p.targetW/p.vbW:p.targetH/p.vbH:1,g=m?Number.isFinite(e.height)?p.targetH/p.vbH:p.targetW/p.vbW:1,y=E=>{if(o||!f?.size)return c;let L=p.vbW,P=p.vbH,F=E.crop;F&&(L=Math.max(1,Math.min(L,F.x+F.width)-Math.max(0,F.x)),P=Math.max(1,Math.min(P,F.y+F.height)-Math.max(0,F.y)));let V=Number.isFinite(E.width),H=Number.isFinite(E.height);return(V&&H?Math.max(E.width/L,E.height/P):V?E.width/L*(F?Math.max(1,g/d):1):H?E.height/P*(F?Math.max(1,d/g):1):(E.scale||1)*Math.max(d,g))*(E.dpr||1)<=l?c:u??=ra(a(),f)},b=async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(ze(),pn));return P(c,{...E,...L||{},format:"png"})},S=()=>{if(!r)throw i("svgString");if(o)throw new Error("[snapdom] svgString: engine:'html-in-canvas' produces a raster capture; there is no serialized SVG");let E=t.indexOf(",");return E>=0?decodeURIComponent(t.slice(E+1)):""},k=E=>Object.defineProperty({...E||{},svgString:S},"url",r?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),v={img:async(E,L)=>{if(o)return b(E,L);let{toImg:P}=await Promise.resolve().then(()=>(Uo(),Bo)),F={...E,...L||{}};return P(y(F),F)},svg:async(E,L)=>{if(o)return b(E,L);let{toSvg:P}=await Promise.resolve().then(()=>(Uo(),Bo)),F={...E,...L||{}};return P(y(F),F)},canvas:async(E,L)=>{let{toCanvas:P}=await Promise.resolve().then(()=>(Ue(),Da)),F={...E,...L||{}};return P(y(F),F)},blob:async(E,L)=>{let{toBlob:P}=await Promise.resolve().then(()=>(Ho(),Ba)),F={...E,...L||{}};return P(y(F),F)},png:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(ze(),pn)),F={...E,...L||{},format:"png"};return P(y(F),F)},jpeg:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(ze(),pn)),F={...E,...L||{},format:"jpeg"};return P(y(F),F)},webp:async(E,L)=>{let{rasterize:P}=await Promise.resolve().then(()=>(ze(),pn)),F={...E,...L||{},format:"webp"};return P(y(F),F)},download:async(E,L)=>{let{download:P}=await Promise.resolve().then(()=>(Ha(),za)),F={...E,...L||{}};return P(y(F),F)}};if(!r)for(let E of Object.keys(v)){let L=E==="download"?"download()":`to${E.charAt(0).toUpperCase()}${E.slice(1)}()`;v[E]=async()=>{throw i(L)}}let w={};for(let E of["img","svg","canvas","blob","png","jpeg","webp"])w[E]=async L=>v[E](e,{...R(E,L||{}),[vd]:!0});w.jpg=w.jpeg;let C=E=>Object.defineProperty({...e,...E},"options",{value:e,configurable:!0}),A=C({artifacts:e.__artifacts||null,export:k(),exports:w}),M=await Kn("defineExports",A),x=Object.assign({},...M.filter(E=>E&&typeof E=="object").reverse()),_={...v,...x};_.jpeg&&!_.jpg&&(_.jpg=(E,L)=>_.jpeg(E,L));function R(E,L){let P=L||{},F={...e,...P},V=typeof P.type=="string"?P.type.toLowerCase():"",H=typeof P.format=="string"?P.format.toLowerCase():ja.has(V)?V:"";H&&(F.format=H==="jpg"?"jpeg":H),F.__explicitFormat=H?F.format:e.__explicitFormat??null,E==="blob"&&!F.__explicitFormat&&(F.format=o?"png":"svg"),F.type=F.format;let q=Z=>Z==="jpeg"||Z==="jpg"||Z==="webp";return[E,F.format,V].map(Z=>typeof Z=="string"?Z.toLowerCase():"").find(q)&&(F.backgroundColor==null||F.backgroundColor==="transparent")&&(F.backgroundColor="#ffffff"),F.scale!==1&&(Number.isFinite(F.width)||Number.isFinite(F.height))&&D(F,"width/height define the output size \u2014 scale is ignored when either is set"),F}let T=!1,$=Promise.resolve();async function O(E,L){let P=Object.freeze(L&&typeof L=="object"?{...L}:{}),F=async()=>{let H=_[E];if(!H)throw new Error(`[snapdom] Unknown export type: ${E}`);let q=R(E,P),B=C({artifacts:e.__artifacts||null,export:k({type:E,options:q,requestedOptions:P})}),Z=q.format,Et=q.type;await Kn("beforeExport",B,{format:E,options:q});let Bt=q.format!==Z?q.format:q.type!==Et?q.type:"",yt=typeof Bt=="string"?Bt.toLowerCase():"";ja.has(yt)&&(q.format=yt==="jpg"?"jpeg":yt,q.type=q.format,q.__explicitFormat=q.format,/^(?:jpeg|webp)$/.test(q.format)&&(q.backgroundColor==null||q.backgroundColor==="transparent")&&(q.backgroundColor="#ffffff"));let st=await H(B,q);return await Kn("afterExport",B,{format:E,options:q,result:st}),T||(T=!0,await Dt("afterSnap",e)),st},V=$.then(F);return $=V.catch(()=>{}),V}let z={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return a()},to:(E,L)=>O(E,L),toImg:E=>O("img",E),toSvg:E=>O("svg",E),toCanvas:E=>O("canvas",E),toBlob:E=>O("blob",E),toPng:E=>O("png",E),toJpg:E=>O("jpg",E),toWebp:E=>O("webp",E),download:E=>O("download",E)};r?o&&Object.defineProperty(z,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(z,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(z,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let E of Object.keys(_)){let L="to"+E.charAt(0).toUpperCase()+E.slice(1);z[L]||(z[L]=P=>O(E,P))}return z}Y.toRaw=(t,e)=>Y(t,e).then(n=>n.toRaw());Y.toImg=(t,e)=>Y(t,e).then(n=>n.toImg());Y.toSvg=(t,e)=>Y(t,e).then(n=>n.toSvg());Y.toCanvas=(t,e)=>Y(t,e).then(n=>n.toCanvas());Y.toBlob=(t,e)=>Y(t,e).then(n=>n.toBlob());Y.toPng=(t,e)=>Y(t,{...e,format:"png"}).then(n=>n.toPng());Y.toJpg=(t,e)=>Y(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Y.toWebp=(t,e)=>Y(t,{...e,format:"webp"}).then(n=>n.toWebp());Y.download=(t,e)=>Y(t,e).then(n=>n.download());export{ft as DEFAULT_STAGE,Ne as STAGES,Xs as assertNeeds,ru as clearPlugins,bo as getGlobalPlugins,We as normalizePlugin,yo as registerPlugins,Y as snapdom};