@zumer/snapdom 2.18.0 → 2.22.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,14 +1,14 @@
1
1
  /*
2
2
  * SnapDOM
3
- * v2.18.0
3
+ * v2.22.0
4
4
  * Author: Juan Martin Muda
5
5
  * License: MIT
6
6
  */
7
- var hr=Object.defineProperty;var Z=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var Ot=(t,e)=>{for(var n in e)hr(t,n,{get:e[n],enumerable:!0})};function pn(t){if(t===!0)return"soft";if(t===!1)return"disabled";if(typeof t=="string"){let e=t.toLowerCase().trim();if(e==="auto")return"auto";if(e==="full")return"full";if(e==="soft"||e==="disabled")return e}return"soft"}function oe(t="soft"){switch(A.session.__counterEpoch=(A.session.__counterEpoch||0)+1,t){case"auto":{A.session.styleMap=new Map,A.session.nodeMap=new Map;return}case"soft":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap,A.computedStyle=new WeakMap,A.measureHints=new WeakMap,A.baseStyle=new V(50),A.defaultStyle=new V(30),A.image=new V(100),A.background=new V(100),A.resource=new V(150),A.font=new Set;return}default:{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}}}var V,A,j=Z(()=>{V=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let o=this.keys().next().value;o!==void 0&&this.delete(o)}return super.set(e,n)}},A={image:new V(100),background:new V(100),resource:new V(150),defaultStyle:new V(30),baseStyle:new V(50),computedStyle:new WeakMap,measureHints:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function ht(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function $e(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(s=>s.trim());return r.length!==6?`matrix(${o})`:(r[4]="0",r[5]="0",`matrix(${r.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(s=>s.trim());return r.length!==16?`matrix3d(${o})`:(r[12]="0",r[13]="0",`matrix3d(${r.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function dt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Fe(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}}var Bt=Z(()=>{});function gr(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,r=0;function s(i,a,l){if(r>=n)return;let c=Date.now();(o.get(a)||0)>c||(o.set(a,c+e),r++,i==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(i,a){s("warn",i,a)},errorOnce(i,a){s("error",i,a)},reset(){o.clear(),r=0}}}function yr(t){return/^data:|^blob:|^about:blank$/i.test(t)}function br(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.includes("{url}")?e.split("{url}")[0]:e,r=new URL(o||".",n),s=new URL(t,n);if(s.origin===r.origin)return!0;let i=s.searchParams;if(i&&(i.has("url")||i.has("target")))return!0}catch{}return!1}function wr(t,e){if(!e||yr(t)||br(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=new URL(t,n);return typeof location<"u"?o.origin!==location.origin:!0}catch{return!!e}}function xr(t,e){if(!e)return t;if(e.includes("{url}"))return e.replace("{urlRaw}",dt(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}${dt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function gn(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"")),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function Sr(t,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,t].join("|")}async function H(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,r=e.useProxy||"",s=e.errorTTL??8e3,i=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="",b=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],x=/;base64/i.test(g)?atob(b):decodeURIComponent(b),w=new Uint8Array([...x].map(S=>S.charCodeAt(0))),C=new Blob([w],{type:(g||"").split(";")[0]||""});return{ok:!0,data:C,status:200,url:t,fromCache:!1,mime:C.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 b=await g.blob(),y=b.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await gn(b),status:g.status,url:t,fromCache:!1,mime:y}:n==="text"?{ok:!0,data:await b.text(),status:g.status,url:t,fromCache:!1,mime:y}:{ok:!0,data:b,status:g.status,url:t,fromCache:!1,mime:y}}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 l=Sr(t,{as:n,timeout:o,useProxy:r,errorTTL:s}),c=re.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&re.delete(l);let f=Re.get(l);if(f)return f;let u=wr(t,r)?xr(t,r):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",b=new URL(t,g);d=typeof location<"u"&&b.origin===location.origin?"include":"omit"}catch{d="omit"}let p=new AbortController,h=setTimeout(()=>p.abort("timeout"),o),m=(async()=>{try{let g=await fetch(u,{signal:p.signal,credentials:d,headers:i});if(!g.ok){let x={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(s>0&&re.set(l,{until:Date.now()+s,result:x}),!a){let w=`${g.status} ${g.statusText||""}`.trim();hn.warnOnce(`http:${g.status}:${n}:${new URL(t,location?.href??"http://localhost/").origin}`,`HTTP error ${w} while fetching ${n} ${t}`)}return e.onError&&e.onError(x),x}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let b=await g.blob(),y=b.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await gn(b),status:g.status,url:u,fromCache:!1,mime:y}:{ok:!0,data:b,status:g.status,url:u,fromCache:!1,mime:y}}catch(g){let b=g&&typeof g=="object"&&"name"in g&&g.name==="AbortError"?String(g.message||"").includes("timeout")?"timeout":"abort":"network",y={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:b};if(!/^blob:/i.test(t)&&s>0&&re.set(l,{until:Date.now()+s,result:y}),!a){let x=`${b}:${n}:${new URL(t,location?.href??"http://localhost/").origin}`,w=b==="timeout"?`Timeout after ${o}ms. Consider increasing timeout or using a proxy for ${t}`:b==="abort"?`Request aborted while fetching ${n} ${t}`:`Network/CORS issue while fetching ${n} ${t}. A proxy may be required`;hn.errorOnce(x,w)}return e.onError&&e.onError(y),y}finally{clearTimeout(h),Re.delete(l)}})();return Re.set(l,m),m}var hn,Re,re,gt=Z(()=>{Bt();hn=gr("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),Re=new Map,re=new Map});async function yt(t,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let o=ht(t);if(!o)return t;let r=Fe(o),s=dt(r),i=(e.useProxy||"")+"|"+s;if(A.background.has(i)){let a=A.background.get(i);return a?`url("${a}")`:"none"}try{let a=await H(s,{as:"dataURL",useProxy:e.useProxy});return a.ok?(A.background.set(i,a.data),`url("${a.data}")`):(A.background.set(i,null),"none")}catch{return A.background.set(i,null),"none"}}var yn=Z(()=>{j();Bt();gt()});function Le(){for(let t of Cr){let e=String(t).toLowerCase();ie.has(e)||se.has(e)||Te(e)}}function Te(t){if(t=String(t).toLowerCase(),se.has(t)){let s={};return A.defaultStyle.set(t,s),s}if(A.defaultStyle.has(t))return A.defaultStyle.get(t);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),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);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),r={};for(let s of o){if(Ut(s))continue;let i=o.getPropertyValue(s);r[s]=i}return e.removeChild(n),A.defaultStyle.set(t,r),r}function Ut(t){let e=bn.get(t);if(e===void 0){let n=String(t).toLowerCase();e=kr.has(n)||vr.test(n)||Ar.test(n),bn.set(t,e)}return e}function ae(t,e){return!$r.has(t)&&(e==="inline"||Mr.has(t)||Er.has(t))}function vt(t,e,n=!0,o=!1){if(e=String(e||"").toLowerCase(),se.has(e))return"";let r=[],s=Te(e),i=(t.display||"").toLowerCase(),a=i==="inline",c=ae(e,i)&&n,f=!1;for(let u in t){if(Ut(u))continue;let d=t[u];if(c){if(Fr.has(u))continue;if(Rr.has(u)){d&&d!==s[u]&&(r.push(`${u}:${d}`),d!=="auto"&&(f=!0));continue}}if(d&&d!==s[u]){if((u==="width"||u==="inline-size")&&d.endsWith("px")&&d.includes(".")){let p=parseFloat(d);if(Number.isFinite(p)){r.push(`${u}:${Math.ceil(p*16)/16}px`);continue}}r.push(`${u}:${d}`)}}if(c&&!a&&!o&&!f){let u=t.width;u&&u!=="auto"&&u!==s.width&&r.push(`min-width:${u}`)}return r.sort(),r.join(";")}function Pe(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 Ne(t){let e=new Map;for(let o of t){let r=A.defaultStyle.get(o);if(!r)continue;let s=Object.entries(r).map(([i,a])=>`${i}:${a};`).sort().join("");s&&(e.has(s)||e.set(s,[]),e.get(s).push(o))}let n="";for(let[o,r]of e.entries())n+=`${r.join(",")} { ${o} }
8
- `;return n}function Ie(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let r of e)n.set(r,`c${o++}`);return n}function Lr(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 o=0;o<window.frames.length;o++)try{if(window.frames[o]?.document===e)return window.frames[o]}catch{}}catch{}return typeof window<"u"?window:null}function P(t,e=null){let n=()=>{let s={length:0,getPropertyValue:()=>"",item:()=>""};return s[Symbol.iterator]=function*(){},s};if(!(t instanceof Element)){let s=typeof window<"u"?window:null;if(s&&typeof s.getComputedStyle=="function")try{return s.getComputedStyle(t,e)||n()}catch{return n()}return n()}let o=A.computedStyle.get(t);o||(o=new Map,A.computedStyle.set(t,o));let r=o.get(e);if(!r){let s=Lr(t),i=null;try{i=s&&typeof s.getComputedStyle=="function"?s.getComputedStyle(t,e):null}catch{}if(!i&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(i=window.getComputedStyle(t,e))}catch{}r=i||n(),o.set(e,r)}return r}function ce(t){let e={};for(let n of t)e[n]=t.getPropertyValue(n);for(let n of Tr){let o=e[`border-${n}-style`],r=e[`border-${n}-width`];(o==="none"||o==="hidden"||r==="0px")&&(delete e[`border-${n}-style`],delete e[`border-${n}-width`],delete e[`border-${n}-color`])}return e}function kt(t){let e=[],n=0,o=0;for(let r=0;r<t.length;r++){let s=t[r];s==="("&&n++,s===")"&&n--,s===","&&n===0&&(e.push(t.slice(o,r).trim()),o=r+1)}return e.push(t.slice(o).trim()),e}var ie,se,Cr,Ar,vr,kr,bn,Mr,Er,$r,Fr,Rr,Tr,le=Z(()=>{j();ie=new Set(["meta","script","noscript","title","link","template"]),se=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Cr=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];Ar=/(?:^|-)(animation|transition)(?:-|$)/i,vr=/^(--.+|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,kr=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"]),bn=new Map;Mr=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Er=new Set(["table","thead","tbody","tfoot","tr","td","th"]),$r=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Fr=new Set(["width","max-width","inline-size","max-inline-size"]),Rr=new Set(["min-width","min-inline-size"]);Tr=["top","right","bottom","left"]});function it(t,{fast:e=!1}={}){if(e)return t();"requestIdleCallback"in window?requestIdleCallback(t,{timeout:50}):setTimeout(t,1)}function _e(){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"),o=/applewebkit/i.test(t),r=/mobile/i.test(t),s=!/safari/i.test(t),i=o&&r&&s,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),c=/ipad|iphone|ipod/.test(e)&&o;return n||i||a||l||c}function wn(){if(typeof navigator>"u")return!1;let t=(navigator.userAgent||"").toLowerCase();return t.includes("firefox")||t.includes("fxios")}var Mt=Z(()=>{});function T(t,e,n){let o=t&&typeof t=="object"&&(t.options||t);o&&o.debug&&(n!==void 0?console.warn("[snapdom]",e,n):console.warn("[snapdom]",e))}var We=Z(()=>{});var tt=Z(()=>{yn();le();Mt();Bt();We()});var tr={};Ot(tr,{toCanvas:()=>wt});function bs(t){if(!Yo(t))return t;try{let e=Ko(t),n=e.match(/<svg\b[^>]*>/i);if(!n)return t;let o=n[0],r=parseFloat((o.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((o.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(s)||r<=0||s<=0)return t;let i=Math.min(1,Nt/r,Nt/s,Math.sqrt(Go/(r*s)));if(i>=1)return t;let a=Math.max(1,Math.floor(r*i)),l=Math.max(1,Math.floor(s*i));console.warn(`[snapDOM] Capture ${Math.round(r)}\xD7${Math.round(s)}px exceeds the browser image-decode limit (${Nt}px/side); downscaling to ${a}\xD7${l}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`);let c=e.replace(o,o.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${l}`));return Qo(c)}catch{return t}}function Yo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Ko(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function Qo(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function Jo(t){let e=[],n="",o=0;for(let r=0;r<t.length;r++){let s=t[r];s==="("&&o++,s===")"&&(o=Math.max(0,o-1)),s===";"&&o===0?(e.push(n),n=""):n+=s}return n.trim()&&e.push(n),e.map(r=>r.trim()).filter(Boolean)}function ws(t){let e=[],n="",o=0;for(let s=0;s<t.length;s++){let i=t[s];i==="("&&o++,i===")"&&(o=Math.max(0,o-1)),i===","&&o===0?(e.push(n.trim()),n=""):n+=i}n.trim()&&e.push(n.trim());let r=[];for(let s of e){if(/\binset\b/i.test(s))continue;let i=s.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",l="0px",c="0px"]=i;c=`${parseFloat(c)/2}px`;let f=s.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!f&&f!==",";r.push(`drop-shadow(${a} ${l} ${c}${u?` ${f}`:""})`)}return r.join(" ")}function Zo(t){let e=Jo(t),n=null,o=null,r=null,s=[];for(let a of e){let l=a.indexOf(":");if(l<0)continue;let c=a.slice(0,l).trim().toLowerCase(),f=a.slice(l+1).trim();c==="box-shadow"?r=f:c==="filter"?n=f:c==="-webkit-filter"?o=f:s.push([c,f])}if(r){let a=ws(r);a&&(n=n?`${n} ${a}`:a,o=o?`${o} ${a}`:a)}let i=[...s];return n&&i.push(["filter",n]),o&&i.push(["-webkit-filter",o]),i.map(([a,l])=>`${a}:${l}`).join(";")}function xs(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Zo(o)}}`)}function Ss(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,xs(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Zo(o)}${n}`),t}function Cs(){return ve||(ve=(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 o=n.getContext("2d",{willReadFrequently:!0});o.drawImage(e,0,0);let r=o.getImageData(2,18,1,1).data[3]>128,s=o.getImageData(2,2,1,1).data[3]>128;return{native:r||s,flippedY:s&&!r}}catch{return{native:!1,flippedY:!1}}})(),ve)}function As(t){let e=[],n=0,o=0;for(let r=0;r<t.length;r++){let s=t[r];s==="("?n++:s===")"?n=Math.max(0,n-1):s===","&&n===0&&(e.push(t.slice(o,r)),o=r+1)}return e.push(t.slice(o)),e.map(r=>{let s=0,i=0,a="",l=0;for(;l<r.length;){let c=r[l];if(c==="("?s++:c===")"&&(s=Math.max(0,s-1)),s===0&&(l===0||r[l-1]===" ")){let f=/^-?\d*\.?\d+px/.exec(r.slice(l));if(f){i++,a+=i===2?`${-parseFloat(f[0])}px`:f[0],l+=f[0].length;continue}}a+=c,l++}return a}).join(",")}function vs(t,e){let n=o=>Jo(o).map(r=>{let s=r.indexOf(":");if(s<0)return r;let i=r.slice(0,s).trim().toLowerCase();return i==="text-shadow"||e&&i==="box-shadow"?`${i}:${As(r.slice(s+1))}`:r}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(o,r)=>o.replace(r,r.replace(/([^{}]+)\{([^}]*)\}/g,(s,i,a)=>`${i}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(o,r,s)=>`style=${r}${n(s)}${r}`),t}async function ks(t){if(!X()||!Yo(t))return{url:t,naturalOnly:!1};let e;try{e=Ko(t)}catch{return{url:t,naturalOnly:!1}}if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{url:t,naturalOnly:!1};let{native:o,flippedY:r}=await Cs();try{let s=e,i=!1;return o||(s=Ss(s),i=!0),r&&(s=vs(s,o),i=!0),{url:i?Qo(s):t,naturalOnly:!0}}catch{return{url:t,naturalOnly:!0}}}async function wt(t,e){let{width:n,height:o,scale:r=1,dpr:s=1,meta:i={},backgroundColor:a}=e,l=await ks(t);t=l.url,t=bs(t);let c=new Image;if(c.loading="eager",c.decoding="sync",c.crossOrigin="anonymous",c.src=t,await c.decode(),X()){c.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(c);try{await new Promise(v=>requestAnimationFrame(()=>requestAnimationFrame(v)))}finally{try{c.remove()}catch{}}}let f=c.naturalWidth,u=c.naturalHeight,d=Number.isFinite(i.w0)?i.w0:f,p=Number.isFinite(i.h0)?i.h0:u,h,m,g=Number.isFinite(n),b=Number.isFinite(o);if(g&&b)h=Math.max(1,n),m=Math.max(1,o);else if(g){let v=n/Math.max(1,d);h=n,m=p*v}else if(b){let v=o/Math.max(1,p);m=o,h=d*v}else h=f,m=u;h=h*r,m=m*r;let y=h*s,x=m*s,w=Math.max(y/Nt,x/Nt,Math.sqrt(y*x/Go));w>1&&(console.warn(`[snapDOM] Output ${Math.round(y)}\xD7${Math.round(x)}px exceeds the browser canvas limit (${Nt}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),h/=w,m/=w);let C=document.createElement("canvas");C.width=h*s,C.height=m*s,C.style.width=`${h}px`,C.style.height=`${m}px`;let S=C.getContext("2d");if(s!==1&&S.scale(s,s),a&&(S.save(),S.fillStyle=a,S.fillRect(0,0,h,m),S.restore()),l.naturalOnly&&(Math.round(h*s)!==f||Math.round(m*s)!==u)){let v=document.createElement("canvas");v.width=f,v.height=u,v.getContext("2d").drawImage(c,0,0),S.drawImage(v,0,0,h,m)}else S.drawImage(c,0,0,h,m);return C}var Nt,Go,ve,Gt=Z(()=>{Mt();Nt=16384,Go=16384*16384;ve=null});var ke={};Ot(ke,{rasterize:()=>tn});async function tn(t,e){let n=await wt(t,e),o=new Image;return o.src=n.toDataURL(`image/${e.format}`,e.quality),await o.decode(),o.style.width=`${n.width/e.dpr}px`,o.style.height=`${n.height/e.dpr}px`,o}var Yt=Z(()=>{Gt()});var en={};Ot(en,{toImg:()=>Ms,toSvg:()=>Ms});async function Ms(t,e){let{scale:n=1,width:o,height:r,meta:s={}}=e,i=Number.isFinite(o),a=Number.isFinite(r),l=Number.isFinite(n)&&n!==1||i||a;if(X()&&l)return await tn(t,{...e,format:"png",quality:1,meta:s});let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=t,await c.decode(),i&&a)c.style.width=`${o}px`,c.style.height=`${r}px`;else if(i){let f=Number.isFinite(s.w0)?s.w0:c.naturalWidth,u=Number.isFinite(s.h0)?s.h0:c.naturalHeight,d=o/Math.max(1,f);c.style.width=`${o}px`,c.style.height=`${Math.round(u*d)}px`}else if(a){let f=Number.isFinite(s.w0)?s.w0:c.naturalWidth,u=Number.isFinite(s.h0)?s.h0:c.naturalHeight,d=r/Math.max(1,u);c.style.height=`${r}px`,c.style.width=`${Math.round(f*d)}px`}else{let f=Math.round(c.naturalWidth*n),u=Math.round(c.naturalHeight*n);if(c.style.width=`${f}px`,c.style.height=`${u}px`,typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${f}"`).replace(/height="[^"]*"/,`height="${u}"`);t=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,c.src=t}catch(d){T(e,"SVG width/height patch in toImg failed",d)}}return c}var nn=Z(()=>{tt();Yt()});var er={};Ot(er,{toBlob:()=>on});async function on(t,e){let n=e.type;if(n==="svg"){let r=decodeURIComponent(t.split(",")[1]);return new Blob([r],{type:"image/svg+xml"})}let o=await wt(t,e);return new Promise(r=>o.toBlob(s=>r(s),`image/${n}`,e.quality))}var rn=Z(()=>{Gt()});var or={};Ot(or,{download:()=>Es});async function nr(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(o){if(o.name!=="AbortError")return!1}return!0}async function Es(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),o=(e?.type||"").toLowerCase(),r=n.has(o)?o:"",s=(e?.format||r||"").toLowerCase(),i=s==="jpg"?"jpeg":s||"png",a=e?.filename||`snapdom.${i}`,l={...e||{},format:i,type:i};l.dpr=1;let c=_e();if(i==="svg"){let d=await on(t,{...l,type:"svg"});if(c&&await nr(d,a))return;let p=URL.createObjectURL(d),h=document.createElement("a");h.href=p,h.download=a,document.body.appendChild(h),h.click(),URL.revokeObjectURL(p),h.remove();return}let f=await wt(t,l);if(c){let d=`image/${i}`,p=await new Promise(h=>f.toBlob(h,d,e?.quality));if(p&&await nr(p,a))return}let u=document.createElement("a");u.href=f.toDataURL(`image/${i}`,e?.quality),u.download=a,document.body.appendChild(u),u.click(),u.remove()}var rr=Z(()=>{rn();Gt();Mt()});tt();tt();j();var xn=new WeakMap,Ht=new Map,Pr=2e3,Oe=0;function Dt(){Oe++,Ht.size>Pr&&Ht.clear()}var Sn=!1;function Nr(t=document.documentElement){if(!Sn){Sn=!0;try{new MutationObserver(()=>Dt()).observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(()=>Dt()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let e=document.fonts;e&&(e.addEventListener?.("loadingdone",Dt),e.ready?.then(()=>Dt()).catch(()=>{}))}catch{}}}function Ir(t,e={}){let n={},o=t.getPropertyValue("visibility"),r=e.excludeStyleProps;for(let u=0;u<t.length;u++){let d=t[u];if(Ut(d)||r&&(r instanceof RegExp&&r.test(d)||typeof r=="function"&&r(d)))continue;let p=t.getPropertyValue(d);(d==="background-image"||d==="content")&&p.includes("url(")&&!p.includes("data:")&&(p="none"),n[d]=p}let s=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let u of s)if(!n[u])try{let d=t.getPropertyValue(u);d&&(n[u]=d)}catch{}let i=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let u of i)if(!n[u])try{let d=t.getPropertyValue(u);d&&(n[u]=d)}catch{}if(e.embedFonts){let u=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let d of u)if(!n[d])try{let p=t.getPropertyValue(d);p&&(n[d]=p)}catch{}}o==="hidden"&&(n.opacity="0");try{(n["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(n.visibility="hidden")}catch{}let a=parseFloat(t.getPropertyValue("border-top-width")||0)||0,l=parseFloat(t.getPropertyValue("border-right-width")||0)||0,c=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,f=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(a===0&&l===0&&c===0&&f===0){let u=(t.getPropertyValue("border-image-source")||"").trim(),d=u&&u!=="none",p=["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"];for(let h of p)delete n[h];d||(n.border="none")}return n}function _r(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=P(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}var Cn=new WeakMap;function Wr(t){let e=Cn.get(t);return e||(e=Object.entries(t).sort((o,r)=>o[0]<r[0]?-1:o[0]>r[0]?1:0).map(([o,r])=>`${o}:${r}`).join(";"),Cn.set(t,e),e)}function Or(t,e=null,n={}){let o=xn.get(t),r=!!(n&&n.embedFonts),s=n&&n.excludeStyleProps||null;if(o&&o.epoch===Oe&&o.embedFonts===r&&o.excludeStyleProps===s)return o.snapshot;let i=e||getComputedStyle(t),a=Ir(i,n);return Vr(t,i,a),xn.set(t,{epoch:Oe,snapshot:a,embedFonts:r,excludeStyleProps:s}),a}function Br(t,e){return t&&t.session&&t.persist?t:t&&(t.styleMap||t.styleCache||t.nodeMap)?{session:t,persist:{snapshotKeyCache:Ht,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:e||{}}:{session:A.session,persist:{snapshotKeyCache:Ht,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:t||e||{}}}function Ur(t,e,n){if(!(!t.style||t.style.length===0))for(let o=0;o<t.style.length;o++){let r=t.style[o],s=n.getPropertyValue(r);s&&e.style.setProperty(r,s)}}async function nt(t,e,n,o){if(t.tagName==="STYLE")return;let r=Br(n,o),s=r.options&&r.options.cache||"auto";s!=="disabled"&&Nr(document.documentElement),s==="disabled"&&!r.session.__bumpedForDisabled&&(Dt(),Ht.clear(),r.session.__bumpedForDisabled=!0);let{session:i,persist:a}=r;if(!i.styleCache.has(t)){let m=null;try{m=getComputedStyle(t)}catch{}i.styleCache.set(t,m||getComputedStyle(document.documentElement))}let l=i.styleCache.get(t);t.getAttribute?.("style")&&Ur(t,e,l);let c=Or(t,l,r.options),f=An(t);if(f){let m=l.getPropertyValue("min-width");(!m||m==="auto"||m==="0px")&&(c["min-width"]="0px")}let u=t.tagName?.toLowerCase()||"div",d=Wr(c),p=!0;ae(u,(c.display||"").toLowerCase())&&(p=_r(t),d=`${d}|${u}${p?"|c":""}${f?"|f":""}`);let h=a.snapshotKeyCache.get(d);h===void 0&&(h=vt(c,u,p,f),a.snapshotKeyCache.set(d,h)),i.styleMap.set(e,h)}function Dr(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function Hr(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 An(t){let e=t.parentElement;if(!e)return!1;let n=P(e).display||"";return n.includes("flex")||n.includes("grid")}function zr(t,e){if(t.textContent&&/\S/.test(t.textContent))return!0;let n=t.firstElementChild,o=t.lastElementChild;if(n&&n.tagName==="BR"||o&&o.tagName==="BR")return!0;let r=t.scrollHeight;if(r===0)return!1;let s=parseFloat(e.paddingTop)||0,i=parseFloat(e.paddingBottom)||0;return r>s+i}function Vr(t,e,n){if(t instanceof HTMLElement&&t.style&&t.style.height)return;let o=t.tagName&&t.tagName.toLowerCase();if(!o||!["div","section","article","main","aside","header","footer","nav"].includes(o))return;let s=parseFloat(e.height);if(Number.isFinite(s)&&t.scrollHeight>0&&Math.abs(s-t.scrollHeight)>2||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let a=e.display||"";if(a.includes("flex")||a.includes("grid")||Dr(t))return;let l=e.position;if(l==="absolute"||l==="fixed"||l==="sticky"||e.transform!=="none"||Hr(e)||An(t))return;let c=e.overflowX||e.overflow||"visible",f=e.overflowY||e.overflow||"visible";if(c!=="visible"||f!=="visible")return;let u=e.clip;u&&u!=="auto"&&u!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||zr(t,e)&&(delete n.height,delete n["block-size"])}le();var kn=["fill","stroke","color","background-color","stop-color"],jr=new Set(["symbol","defs","pattern","mask","clipPath","marker","linearGradient","radialGradient","filter"]);function fe(t){let e=t;for(;e&&e.nodeType===1;){if(e.namespaceURI==="http://www.w3.org/2000/svg"&&jr.has(e.localName))return!0;e=e.parentNode}return!1}var vn=new Map;function qr(t,e){let n=e+"::"+t.toLowerCase(),o=vn.get(n);if(o)return o;let r=document,s=e==="http://www.w3.org/2000/svg"?r.createElementNS(e,t):r.createElement(t),i=r.createElement("div");i.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",i.appendChild(s),r.documentElement.appendChild(i);let a=getComputedStyle(s),l={};for(let c of kn)l[c]=a.getPropertyValue(c)||"";return i.remove(),vn.set(n,l),l}function Mn(t,e){if(!(t instanceof Element)||!(e instanceof Element)||fe(t))return;let n=t.getAttribute?.("style"),o=!!(n&&n.includes("var("));if(!o&&t.attributes?.length){let s=t.attributes;for(let i=0;i<s.length;i++){let a=s[i];if(a&&typeof a.value=="string"&&a.value.includes("var(")){o=!0;break}}}let r=null;if(o)try{r=getComputedStyle(t)}catch{}if(o){let s=t.style;if(s&&s.length){let i=new Set;for(let a=0;a<s.length;a++){let l=s[a];if(i.has(l))continue;i.add(l);let c=s.getPropertyValue(l);if(!c||!c.includes("var("))continue;let f=r&&r.getPropertyValue(l);if(f)try{e.style.setProperty(l,f.trim(),s.getPropertyPriority(l))}catch{}}}}if(o&&t.attributes?.length){let s=t.attributes;for(let i=0;i<s.length;i++){let a=s[i];if(!a||typeof a.value!="string"||!a.value.includes("var("))continue;let l=a.name,c=r&&r.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim())}catch{}}}if(!o){if(!r)try{r=getComputedStyle(t)}catch{r=null}if(!r)return;let s=t.namespaceURI||"html",i=qr(t.tagName,s);for(let a of kn){let l=r.getPropertyValue(a)||"",c=i[a]||"";if(l&&l!==c)try{e.style.setProperty(a,l.trim())}catch{}}}}tt();tt();j();gt();function de(t,e,n){return Promise.all(t.map(o=>new Promise(r=>{function s(){it(i=>{(i&&typeof i.timeRemaining=="function"?i.timeRemaining()>0:!0)?e(o,r):s()},{fast:n})}s()})))}function Xr(t){return t=t.trim(),!t||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(t)?t:`${t}:not([data-sd-slotted])`}function Gr(t,e,n=!0){return t.split(",").map(o=>o.trim()).filter(Boolean).map(o=>{if(o.startsWith(":where(")||o.startsWith("@"))return o;let r=n?Xr(o):o;return`:where(${e} ${r})`}).join(", ")}function $n(t,e){return t?(t=t.replace(/:host\(([^)]+)\)/g,(n,o)=>`:where(${e}:is(${o.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/:host-context\(([^)]+)\)/g,(n,o)=>`:where(:where(${o.trim()}) ${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(n,o)=>`:where(${e} ${o.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(n,o,r,s)=>{let i=Gr(s,e,!0);return`${o}${r}${i}{`}),t):""}function Fn(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function Rn(t){let e="";try{t.querySelectorAll("style").forEach(o=>{e+=(o.textContent||"")+`
9
- `});let n=t.adoptedStyleSheets||[];for(let o of n)try{if(o&&o.cssRules)for(let r of o.cssRules)e+=r.cssText+`
10
- `}catch{}}catch{}return e}function Ln(t,e,n){if(!e)return;let o=document.createElement("style");o.setAttribute("data-sd",n),o.textContent=e,t.insertBefore(o,t.firstChild||null)}function Tn(t,e){try{let n=t.currentSrc||t.src||"";if(!n)return;e.setAttribute("src",n),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Pn(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,o;for(;o=n.exec(t);)e.add(o[1]);return e}function Yr(t,e){try{let o=getComputedStyle(t).getPropertyValue(e).trim();if(o)return o}catch{}try{let o=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(o)return o}catch{}return""}function Nn(t,e,n){let o=[];for(let r of e){let s=Yr(t,r);s&&o.push(`${r}: ${s};`)}return o.length?`${n}{${o.join("")}}
11
- `:""}function In(t){t&&(t.nodeType===Node.ELEMENT_NODE&&t.setAttribute("data-sd-slotted",""),t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>e.setAttribute("data-sd-slotted","")))}async function Kr(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},o=n(),r=0;for(;r<e&&(!o||!o.body&&!o.documentElement);)await new Promise(s=>setTimeout(s,0)),o=n(),r++;return o&&(o.body||o.documentElement)?o:null}function Qr(t){let e=t.getBoundingClientRect(),n=0,o=0,r=0,s=0;try{let l=getComputedStyle(t);n=parseFloat(l.borderLeftWidth)||0,o=parseFloat(l.borderRightWidth)||0,r=parseFloat(l.borderTopWidth)||0,s=parseFloat(l.borderBottomWidth)||0}catch{}let i=Math.max(0,Math.round(e.width-(n+o))),a=Math.max(0,Math.round(e.height-(r+s)));return{contentWidth:i,contentHeight:a,rect:e}}function ot(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 o=getComputedStyle(t);if(e===0){let r=parseFloat(o.width);!isNaN(r)&&r>0&&(e=r)}if(n===0){let r=parseFloat(o.height);!isNaN(r)&&r>0&&(n=r)}}catch{}if(e===0||n===0)try{if(e===0){let o=parseFloat(t.getAttribute("width"));!isNaN(o)&&o>0&&(e=o)}if(n===0){let o=parseFloat(t.getAttribute("height"));!isNaN(o)&&o>0&&(n=o)}}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 Jr(t,e,n){let o=t.defaultView,r=o?o.scrollX:0,s=o?o.scrollY:0,i=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,c=t.documentElement?t.documentElement.scrollTop:0,f=0,u=0,d=0,p=0;try{let m=o&&t.body?o.getComputedStyle(t.body):null;m&&(f=(parseFloat(m.marginTop)||0)+(parseFloat(m.paddingTop)||0),u=(parseFloat(m.marginRight)||0)+(parseFloat(m.paddingRight)||0),d=(parseFloat(m.marginBottom)||0)+(parseFloat(m.paddingBottom)||0),p=(parseFloat(m.marginLeft)||0)+(parseFloat(m.paddingLeft)||0))}catch{}try{t.documentElement.setAttribute("data-sd-pinned","")}catch{}let h=t.createElement("style");return h.setAttribute("data-sd-iframe-pin",""),h.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: ${f}px ${u}px ${d}px ${p}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(h),()=>{try{h.remove()}catch{}try{t.documentElement.removeAttribute("data-sd-pinned")}catch{}try{o&&typeof o.scrollTo=="function"&&o.scrollTo(r,s),t.body&&(t.body.scrollLeft=i,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=c)}catch{}}}async function _n(t,e,n){let o=await Kr(t,3);if(!o)throw new Error("iframe document not accessible/ready");let{contentWidth:r,contentHeight:s,rect:i}=Qr(t),a=n?.snap;if(!a&&typeof window<"u"&&window.snapdom&&(a=window.snapdom),!a||typeof a.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l={...n,scale:1,clip:null},c=Jr(o,r,s),f=A.session.nodeMap,u=A.session.styleMap,d=A.session.styleCache,p;try{p=await a.toPng(o.documentElement,l)}finally{c(),A.session.nodeMap=f,A.session.styleMap=u,A.session.styleCache=d}p.style.display="block",p.style.width=`${r}px`,p.style.height=`${s}px`;let h=document.createElement("div");return e.nodeMap.set(h,t),nt(t,h,e,n),h.style.overflow="hidden",h.style.display="block",h.style.width||(h.style.width=`${Math.round(i.width)}px`),h.style.height||(h.style.height=`${Math.round(i.height)}px`),h.appendChild(p),h}function Wn(t){let{width:e,height:n}=ot(t),o=t.getBoundingClientRect(),r;try{r=window.getComputedStyle(t)}catch{}let s=r?parseFloat(r.width):NaN,i=r?parseFloat(r.height):NaN,a=Math.round(e||o.width||0),l=Math.round(n||o.height||0),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,a||16),f=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,l||16),u=(t.type||"text").toLowerCase()==="checkbox",d=!!t.checked,p=!!t.indeterminate,m=Math.max(Math.min(c,f),12),g="middle";try{r&&r.verticalAlign&&(g=r.verticalAlign)}catch{}let b=document.createElement("div");b.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),b.style.cssText=`display:inline-block;width:${m}px;height:${m}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let y=document.createElementNS("http://www.w3.org/2000/svg","svg");y.setAttribute("width",String(m)),y.setAttribute("height",String(m)),y.setAttribute("viewBox",`0 0 ${m} ${m}`),b.appendChild(y);function x(){let w="#0a6ed1";try{r&&(w=r.accentColor||r.color||w)}catch{}let C=2,S=C/2,v=m-C;if(y.innerHTML="",u){let k=document.createElementNS("http://www.w3.org/2000/svg","rect");if(k.setAttribute("x",String(S)),k.setAttribute("y",String(S)),k.setAttribute("width",String(v)),k.setAttribute("height",String(v)),k.setAttribute("rx","2"),k.setAttribute("ry","2"),k.setAttribute("fill",d?w:"none"),k.setAttribute("stroke",w),k.setAttribute("stroke-width",String(C)),y.appendChild(k),d){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${S+2} ${m/2} L ${m/2-1} ${m-S-2} L ${m-S-2} ${S+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,C))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),y.appendChild(M)}else if(p){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),$=Math.max(6,v-4);M.setAttribute("x",String((m-$)/2)),M.setAttribute("y",String((m-C)/2)),M.setAttribute("width",String($)),M.setAttribute("height",String(C)),M.setAttribute("fill",w),M.setAttribute("rx","1"),y.appendChild(M)}}else{let k=document.createElementNS("http://www.w3.org/2000/svg","circle");if(k.setAttribute("cx",String(m/2)),k.setAttribute("cy",String(m/2)),k.setAttribute("r",String((m-C)/2)),k.setAttribute("fill",d?w:"none"),k.setAttribute("stroke",w),k.setAttribute("stroke-width",String(C)),y.appendChild(k),d){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),$=Math.max(2,(m-C*2)*.35);M.setAttribute("cx",String(m/2)),M.setAttribute("cy",String(m/2)),M.setAttribute("r",String($)),M.setAttribute("fill","white"),y.appendChild(M)}}b.style.setProperty("width",`${m}px`,"important"),b.style.setProperty("height",`${m}px`,"important"),b.style.setProperty("min-width",`${m}px`,"important"),b.style.setProperty("min-height",`${m}px`,"important")}return x(),{el:b,applyVisual:x}}var zt=new V(80);async function Vt(t){if(A.resource?.has(t))return A.resource.get(t);if(zt.has(t))return zt.get(t);let e=(async()=>{let n=await H(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return A.resource?.set(t,n.data),n.data})();zt.set(t,e);try{let n=await e;return zt.set(t,n),n}catch(n){throw zt.delete(t),n}}var Zr=/\bblob:[^)"'\s]+/g;async function En(t){if(!t||t.indexOf("blob:")===-1)return t;let e=Array.from(new Set(t.match(Zr)||[]));if(e.length===0)return t;let n=t;for(let o of e)try{let r=await Vt(o);n=n.split(o).join(r)}catch{}return n}function ue(t){return typeof t=="string"&&t.startsWith("blob:")}function ti(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 ei(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}async function On(t,e=null){if(!t)return;let n=e,o=t.querySelectorAll?t.querySelectorAll("img"):[];for(let l of o)try{let f=l.getAttribute("src")||l.currentSrc||"";if(ue(f)){let d=await Vt(f);l.setAttribute("src",d)}let u=l.getAttribute("srcset");if(u&&u.includes("blob:")){let d=ti(u),p=!1;for(let h of d)if(ue(h.url))try{h.url=await Vt(h.url),p=!0}catch(m){T(n,"blobUrlToDataUrl for srcset item failed",m)}p&&l.setAttribute("srcset",ei(d))}}catch(c){T(n,"resolveBlobUrls for img failed",c)}let r=t.querySelectorAll?t.querySelectorAll("image"):[];for(let l of r)try{let c="http://www.w3.org/1999/xlink",f=l.getAttribute("href")||l.getAttributeNS?.(c,"href");if(ue(f)){let u=await Vt(f);l.setAttribute("href",u),l.removeAttributeNS?.(c,"href")}}catch(c){T(n,"resolveBlobUrls for SVG image href failed",c)}let s=t.querySelectorAll?t.querySelectorAll("[style*='blob:']"):[];for(let l of s)try{let c=l.getAttribute("style");if(c&&c.includes("blob:")){let f=await En(c);l.setAttribute("style",f)}}catch(c){T(n,"replaceBlobUrls in inline style failed",c)}let i=t.querySelectorAll?t.querySelectorAll("style"):[];for(let l of i)try{let c=l.textContent||"";c.includes("blob:")&&(l.textContent=await En(c))}catch(c){T(n,"replaceBlobUrls in style tag failed",c)}let a=["poster"];for(let l of a){let c=t.querySelectorAll?t.querySelectorAll(`[${l}^='blob:']`):[];for(let f of c)try{let u=f.getAttribute(l);ue(u)&&f.setAttribute(l,await Vt(u))}catch(u){T(n,`resolveBlobUrls for ${l} failed`,u)}}}Mt();function Be(t){let{width:e,height:n}=ot(t),o=e,r=n;if(!o||!r){let i=t.getBoundingClientRect();o=o||i.width||0,r=r||i.height||0}let s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${o}px;height:${r}px;visibility:hidden;`,s}var me=200,ni=new Set(["img","canvas","video","iframe","object","embed"]);function Bn(t,e){return t.right>=e.left-me&&t.left<=e.right+me&&t.bottom>=e.top-me&&t.top<=e.bottom+me}function oi(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 o=P(t);if(o.display==="inline"&&!ni.has((t.localName||"").toLowerCase()))return!1;let r=e.rect,s=t.scrollWidth||0,i=t.scrollHeight||0,a={left:o.direction==="rtl"?Math.min(n.left,n.right-s):n.left,top:n.top,right:Math.max(n.right,n.left+s),bottom:Math.max(n.bottom,n.top+i)},l=o.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(a.top=Math.min(n.top,n.bottom-i),a.left=Math.min(a.left,n.right-s)),Bn(a,r))return!1;let c=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let f=c.currentNode.getBoundingClientRect();if((f.width>0||f.height>0)&&Bn(f,r))return!1}return!0}function ri(t,e,n){let o=t.cloneNode(!1);t.tagName==="IMG"&&(o.removeAttribute("src"),o.removeAttribute("srcset"),o.removeAttribute("sizes")),nt(t,o,e,n);let{width:r,height:s}=ot(t);return r>0&&(o.style.width=`${r}px`,o.style.minWidth=`${r}px`,o.style.maxWidth=`${r}px`),s>0&&(o.style.height=`${s}px`,o.style.minHeight=`${s}px`,o.style.maxHeight=`${s}px`),o.style.visibility="hidden",o.style.overflow="hidden",o.style.boxSizing="border-box",o}async function jt(t,e,n){if(!t)throw new Error("Invalid node");let o=new Set,r=null,s=null;if(t.nodeType===Node.ELEMENT_NODE){let f=(t.localName||t.tagName||"").toLowerCase();if(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox")||ie.has(f))return null;if(f==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return T(e,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null}if(t.nodeType===Node.TEXT_NODE||t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return Be(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let f of n.exclude)try{if(t.matches?.(f)){if(n.excludeMode==="hide")return Be(t);if(n.excludeMode==="remove")return null}}catch(u){console.warn(`Invalid selector in exclude option: ${f}`,u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return Be(t);if(n.filterMode==="remove")return null}}catch(f){console.warn("Error in filter function:",f)}if(e.clip&&oi(t,e.clip))return ri(t,e,n);if(t.tagName==="IFRAME"){let f=!1;try{f=!!(t.contentDocument||t.contentWindow?.document)}catch(u){T(e,"iframe same-origin probe failed",u)}if(f)try{return await _n(t,e,n)}catch(u){console.warn("[SnapDOM] iframe rasterization failed, fallback:",u)}if(f||console.warn("[snapdom] cross-origin <iframe> skipped (cannot access content). Use options.placeholders to show a placeholder instead.",t),n.placeholders){let{width:u,height:d}=ot(t),p=document.createElement("div");return p.style.cssText=`width:${u}px;height:${d}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;`,nt(t,p,e,n),p}else{let{width:u,height:d}=ot(t),p=document.createElement("div");return p.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,nt(t,p,e,n),p}}if(t.getAttribute("data-capture")==="placeholder"){let f=t.cloneNode(!1);e.nodeMap.set(f,t),nt(t,f,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;",f.appendChild(u),f}if(t.tagName==="CANVAS"){let f="";try{let h=t.getContext("2d",{willReadFrequently:!0});try{h&&h.getImageData(0,0,1,1)}catch{}if(await new Promise(m=>requestAnimationFrame(m)),f=t.toDataURL("image/png"),!f||f==="data:,"){try{h&&h.getImageData(0,0,1,1)}catch{}if(await new Promise(m=>requestAnimationFrame(m)),f=t.toDataURL("image/png"),!f||f==="data:,"){let m=document.createElement("canvas");m.width=t.width,m.height=t.height;let g=m.getContext("2d");g&&(g.drawImage(t,0,0),f=m.toDataURL("image/png"))}}}catch(h){T(e,"Canvas toDataURL failed, using empty/fallback",h)}let u=document.createElement("img");try{u.decoding="sync",u.loading="eager"}catch(h){T(e,"img decoding/loading hints failed",h)}f&&(u.src=f),u.width=t.width,u.height=t.height;let{width:d,height:p}=ot(t);return d>0&&(u.style.width=`${d}px`),p>0&&(u.style.height=`${p}px`),e.nodeMap.set(u,t),nt(t,u,e,n),u}if(t.tagName==="VIDEO"){let f="";try{let h=document.createElement("canvas");h.width=t.videoWidth||t.offsetWidth||320,h.height=t.videoHeight||t.offsetHeight||240;let m=h.getContext("2d");m&&(m.drawImage(t,0,0,h.width,h.height),f=h.toDataURL("image/png"),(!f||f==="data:,")&&(f=""))}catch(h){T(e,"Video frame capture failed, using poster fallback",h)}let u=document.createElement("img");try{u.decoding="sync",u.loading="eager"}catch{}f?u.src=f:t.poster&&(u.src=t.poster),u.width=t.videoWidth||t.offsetWidth||0,u.height=t.videoHeight||t.offsetHeight||0;let{width:d,height:p}=ot(t);return d>0&&(u.style.width=`${d}px`),p>0&&(u.style.height=`${p}px`),u.style.objectFit="contain",e.nodeMap.set(u,t),nt(t,u,e,n),u}if(t.tagName==="AUDIO"&&t.controls){let{width:f,height:u}=ot(t),d=Math.round(f||t.offsetWidth||300),p=Math.round(u||t.offsetHeight||54),h=p/2,m=Math.max(4,p*.16),g=p*.34,b=d-p*.34,y=g+m+p*.55,x=Math.max(0,b-p*.7-y),w=Math.max(9,Math.round(p*.24)),C=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${p}" viewBox="0 0 ${d} ${p}"><rect width="${d}" height="${p}" rx="${Math.min(p/2,10)}" fill="#f1f3f4"/><path d="M ${g} ${h-m} L ${g+m} ${h} L ${g} ${h+m} Z" fill="#5f6368"/><rect x="${y}" y="${h-1.5}" width="${x}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${y}" cy="${h}" r="${Math.max(3,p*.09)}" fill="#5f6368"/><text x="${b}" y="${h}" fill="#5f6368" font-family="sans-serif" font-size="${w}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,S=document.createElement("img");try{S.decoding="sync",S.loading="eager"}catch{}return S.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(C)}`,S.width=d,S.height=p,S.style.width=`${d}px`,S.style.height=`${p}px`,e.nodeMap.set(S,t),nt(t,S,e,n),S}let i;try{if(i=t.cloneNode(!1),i.attributes?.length)try{for(let f of i.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(f.value)&&i.setAttribute(f.name,f.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Mn(t,i),e.nodeMap.set(i,t),t.tagName==="IMG"){Tn(t,i);try{let{width:f,height:u}=ot(t),d=Math.round(f||0),p=Math.round(u||0);d&&(i.dataset.snapdomWidth=String(d)),p&&(i.dataset.snapdomHeight=String(p))}catch(f){T(e,"getUnscaledDimensions for IMG failed",f)}try{let f=t.getAttribute("style")||"",u=window.getComputedStyle(t),d=x=>{let w=f.match(new RegExp(`${x}\\s*:\\s*([^;]+)`,"i")),C=w?w[1].trim():u.getPropertyValue(x);return/%|auto/i.test(String(C||""))},p=parseInt(i.dataset.snapdomWidth||"0",10),h=parseInt(i.dataset.snapdomHeight||"0",10),m=d("width")||!p,g=d("height")||!h;m&&p&&(i.style.width=`${p}px`),g&&h&&(i.style.height=`${h}px`);let b=u.getPropertyValue("object-fit"),y=u.getPropertyValue("object-position");b&&b!=="fill"?(i.style.objectFit=b,y&&(i.style.objectPosition=y)):(p&&(i.style.minWidth=`${p}px`),h&&(i.style.minHeight=`${h}px`))}catch(f){T(e,"IMG dimension freeze failed",f)}}}catch(f){throw console.error("[Snapdom] Failed to clone node:",t,f),f}let a=null;if(t instanceof HTMLTextAreaElement){let{width:f,height:u}=ot(t),d=f||t.getBoundingClientRect().width||0,p=u||t.getBoundingClientRect().height||0;d&&(i.style.width=`${d}px`),p&&(i.style.height=`${p}px`)}if(t instanceof HTMLInputElement){let f=(t.type||"text").toLowerCase();if((f==="checkbox"||f==="radio")&&wn()){let{el:d,applyVisual:p}=Wn(t);e.nodeMap.set(d,t),a=p,i=d}else i.value=t.value,i.setAttribute("value",t.value),t.checked!==void 0&&(i.checked=t.checked,t.checked&&i.setAttribute("checked",""),t.indeterminate&&(i.indeterminate=t.indeterminate))}if((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&!t.value&&t.placeholder)try{let f=window.getComputedStyle(t,"::placeholder"),u=f&&f.color;if(u&&u!=="rgba(0, 0, 0, 0)"){let d="snapdom-ph-"+(Math.random()*1e6|0);i.classList.add(d);let p=document.createElement("style");p.textContent=`.${d}::placeholder{color:${u}!important;opacity:${f.opacity||"1"}!important;-webkit-text-fill-color:${u}!important;}`,i.prepend(p)}}catch{}if(t instanceof HTMLSelectElement&&(r=t.value),t instanceof HTMLTextAreaElement&&(s=t.value),t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement){t.disabled&&i.setAttribute("disabled",""),t.required&&i.setAttribute("required",""),t.readOnly&&i.setAttribute("readonly","");let f=t;f.min!==void 0&&f.min!==""&&i.setAttribute("min",f.min),f.max!==void 0&&f.max!==""&&i.setAttribute("max",f.max),f.pattern!==void 0&&f.pattern!==""&&i.setAttribute("pattern",f.pattern);let u=t.getAttribute("aria-invalid");u!==null&&i.setAttribute("aria-invalid",u)}if(fe(t)||nt(t,i,e,n),a&&a(),t instanceof SVGElement&&!fe(t)){let f=["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"];try{let u=window.getComputedStyle(t);for(let d of f){let p=u.getPropertyValue(d);p&&i.style.setProperty(d,p)}}catch{}}if(t.shadowRoot){let b=function(x,w){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="STYLE")return w(null);jt(x,e,n).then(C=>{w(C||null)}).catch(()=>{w(null)})};try{let x=t.shadowRoot.querySelectorAll("slot");for(let w of x){let C=[];try{C=w.assignedNodes?.({flatten:!0})||w.assignedNodes?.()||[]}catch{C=w.assignedNodes?.()||[]}for(let S of C)o.add(S)}}catch{}let f=Fn(e),u=`[data-sd="${f}"]`;try{i.setAttribute("data-sd",f)}catch{}let d=Rn(t.shadowRoot),p=$n(d,u),h=Pn(d),m=Nn(t,h,u);Ln(i,m+p,f);let g=document.createDocumentFragment(),y=await de(Array.from(t.shadowRoot.childNodes),b,n.fast);g.append(...y.filter(x=>!!x)),i.appendChild(g)}if(t.tagName==="SLOT"){let p=function(m,g){jt(m,e,n).then(b=>{b&&In(b),g(b||null)}).catch(()=>{g(null)})},f=t.assignedNodes?.({flatten:!0})||[],u=f.length>0?f:Array.from(t.childNodes),d=document.createDocumentFragment(),h=await de(Array.from(u),p,n.fast);return d.append(...h.filter(m=>!!m)),d}function l(f,u){if(o.has(f))return u(null);jt(f,e,n).then(d=>{u(d||null)}).catch(()=>{u(null)})}let c=await de(Array.from(t.childNodes),l,n.fast);if(i.append(...c.filter(f=>!!f)),r!==null&&i instanceof HTMLSelectElement){i.value=r;for(let f of i.options)f.value===r?f.setAttribute("selected",""):f.removeAttribute("selected")}return s!==null&&i instanceof HTMLTextAreaElement&&(i.textContent=s),i}tt();Bt();j();j();var ii=[/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],Et=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__||{}),Ue=[];function si(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dn(t){let e=Array.isArray(t)?t:[t];for(let n of e)n instanceof RegExp?Ue.push(n):typeof n=="string"?Ue.push(new RegExp(si(n),"i")):console.warn("[snapdom] Ignored invalid iconFont value:",n)}function rt(t){let e=typeof t=="string"?t:"",n=[...ii,...Ue];for(let o of n)if(o instanceof RegExp&&o.test(e))return!0;return!!(/icon/i.test(e)||/glyph/i.test(e)||/symbols/i.test(e)||/feather/i.test(e)||/fontawesome/i.test(e))}function ai(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Un=new Map;function ci(t=""){let e=Object.create(null),n=String(t||""),o=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,r;for(;r=o.exec(n);)e[r[1].toUpperCase()]=Number(r[2]);return e}async function li(t,e,n){let o=String(t||""),r=o.toLowerCase(),s=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(r)&&!/\bsymbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};if(!/\bmaterial\s*symbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};let a=n&&(n.FILL??n.fill),l="outlined";/\brounded\b/.test(s)||/\bround\b/.test(s)?l="rounded":/\bsharp\b/.test(s)?l="sharp":/\boutlined\b/.test(s)&&(l="outlined");let c=a===1,f=null;if(c&&(l==="outlined"&&Et.materialIconsFilled?f={url:Et.materialIconsFilled,alias:"snapdom-mi-filled"}:l==="rounded"&&Et.materialIconsRound?f={url:Et.materialIconsRound,alias:"snapdom-mi-round"}:l==="sharp"&&Et.materialIconsSharp&&(f={url:Et.materialIconsSharp,alias:"snapdom-mi-sharp"})),!f)return{familyForMeasure:o,familyForCanvas:o};if(!Un.has(f.alias))try{let d=new FontFace(f.alias,`url(${f.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),Un.set(f.alias,!0)}catch{return{familyForMeasure:o,familyForCanvas:o}}let u=`"${f.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function fi(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function ui(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 o=t.color?.trim();return o&&o!=="inherit"?o:"#000"}async function di(t,{family:e="Material Icons",weight:n="normal",fontSize:o=32,color:r="#000",variation:s="",className:i=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=ci(s),{familyForMeasure:f,familyForCanvas:u}=await li(a,i,c);await fi(u.replace(/^["']+|["']+$/g,""),o);let d=document.createElement("span");d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=f,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${o}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=r,document.body.appendChild(d);let p=d.getBoundingClientRect(),h=Math.max(1,Math.ceil(p.width)),m=Math.max(1,Math.ceil(p.height));document.body.removeChild(d);let g=document.createElement("canvas");g.width=h*l,g.height=m*l;let b=g.getContext("2d");b.scale(l,l),b.font=`${n?`${n} `:""}${o}px ${u}`,b.textAlign="left",b.textBaseline="top",b.fillStyle=r;try{b.fontKerning="normal"}catch{}return b.fillText(t,0,0),{dataUrl:g.toDataURL(),width:h,height:m}}async function Hn(t,e){if(!(t instanceof Element))return 0;let n='.material-icons, [class*="material-symbols"]',o=Array.from(t.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim());if(o.length===0)return 0;let r=A.session.nodeMap,s=e instanceof Element?Array.from(e.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim()):[],i=0;for(let a=0;a<o.length;a++){let l=o[a],c=r&&r.get(l)||s[a]||null;try{let f=getComputedStyle(c||l),u=f.fontFamily||"Material Icons";if(!ai(u))continue;let d=(c||l).textContent.trim();if(!d)continue;let p=parseInt(f.fontSize,10)||24,h=f.fontWeight&&f.fontWeight!=="normal"?f.fontWeight:"normal",m=ui(f),g=f.fontVariationSettings&&f.fontVariationSettings!=="normal"?f.fontVariationSettings:"",b=(c||l).className||"",{dataUrl:y,width:x,height:w}=await di(d,{family:u,weight:h,fontSize:p,color:m,variation:g,className:b});l.textContent="";let C=l.ownerDocument.createElement("img");C.src=y,C.alt=d,C.style.height=`${p}px`,C.style.width=`${Math.max(1,Math.round(x/w*p))}px`,C.style.objectFit="contain",C.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(C),i++}catch{}}return i}gt();async function qn(t,e,n,o=32,r="#000"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let i=document.createElement("span");i.textContent=t,i.style.position="absolute",i.style.visibility="hidden",i.style.fontFamily=`"${e}"`,i.style.fontWeight=n||"normal",i.style.fontSize=`${o}px`,i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.padding="0",i.style.margin="0",document.body.appendChild(i);let a=i.getBoundingClientRect(),l=Math.ceil(a.width),c=Math.ceil(a.height);document.body.removeChild(i);let f=document.createElement("canvas");f.width=Math.max(1,l*s),f.height=Math.max(1,c*s);let u=f.getContext("2d");return u.scale(s,s),u.font=n?`${n} ${o}px "${e}"`:`${o}px "${e}"`,u.textAlign="left",u.textBaseline="top",u.fillStyle=r,u.fillText(t,0,0),{dataUrl:f.toDataURL(),width:l,height:c}}var Xn=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),mi=["katex","mathjax","mathml"];function He(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Xn.has(n.toLowerCase()))return n}return""}function pi(t){if(!t)return[];let e=[];for(let n of t.split(",")){let o=n.trim().replace(/^['"]+|['"]+$/g,"");o&&(Xn.has(o.toLowerCase())||e.push(o))}return e}function pe(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 he(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function hi(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function gi(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let r=pe(n[1]),s=pe(n[2]);return{min:Math.min(r,s),max:Math.max(r,s)}}let o=pe(e);return{min:o,max:o}}function yi(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function bi(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let s=parseFloat(n[1]),i=parseFloat(n[2]);return{min:Math.min(s,i),max:Math.max(s,i)}}let o=e.match(/(\d+(?:\.\d+)?)\s*%/),r=o?parseFloat(o[1]):100;return{min:r,max:r}}function wi(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function xi(t,e,n=[]){if(!t)return!1;try{let o=new URL(t,location.href);if(o.origin===location.origin)return!0;let s=o.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(l=>s.endsWith(l))||n.some(l=>s===l.toLowerCase()||s.endsWith("."+l.toLowerCase())))return!0;let a=(o.pathname+o.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||mi.some(l=>a.includes(l)))return!0;for(let l of e){let c=l.toLowerCase().replace(/\s+/g,"+"),f=l.toLowerCase().replace(/\s+/g,"-"),u=wi(l);if(a.includes(c)||a.includes(f)||u&&a.includes(u))return!0}return!1}catch{return!1}}function Si(t){let e=new Set;for(let n of t||[]){let o=String(n).split("__")[0]?.trim();o&&e.add(o)}return e}function zn(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,o,r)=>{let s=(r||"").trim();if(!s||/^data:|^blob:|^https?:|^file:|^about:/i.test(s))return n;let i=s;try{i=new URL(s,e||location.href).href}catch{}return`url("${i}")`})}var De=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,ge=4;async function Ci(t,e,n){if(!t)return t;let o=new Set;function r(a,l){try{return new URL(a,l||location.href).href}catch{return a}}async function s(a,l,c=0){if(c>ge)return console.warn(`[snapDOM] @import depth exceeded (${ge}) at ${l}`),a;let f="",u=0,d;for(;d=De.exec(a);){f+=a.slice(u,d.index),u=De.lastIndex;let p=(d[2]||d[4]||"").trim(),h=r(p,l);if(o.has(h)){console.warn(`[snapDOM] Skipping circular @import: ${h}`);continue}o.add(h);let m="";try{let g=await H(h,{as:"text",useProxy:n,silent:!0});g.ok&&typeof g.data=="string"&&(m=g.data)}catch{}m?(m=zn(m,h),m=await s(m,h,c+1),f+=`
7
+ var Io=Object.defineProperty;var tt=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var zt=(t,e)=>{for(var n in e)Io(t,n,{get:e[n],enumerable:!0})};function $n(t){if(t===!0)return"soft";if(t===!1)return"disabled";if(typeof t=="string"){let e=t.toLowerCase().trim();if(e==="auto")return"auto";if(e==="full")return"full";if(e==="soft"||e==="disabled")return e}return"soft"}function ce(t="soft"){switch(x.session.__counterEpoch=(x.session.__counterEpoch||0)+1,t){case"auto":{x.session.styleMap=new Map,x.session.nodeMap=new Map;return}case"soft":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap,x.computedStyle=new WeakMap,x.measureHints=new WeakMap,x.baseStyle=new q(50),x.defaultStyle=new q(30),x.image=new q(100),x.background=new q(100),x.resource=new q(150),x.compress=new q(50),x.font=new Set;return}default:{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}}}var q,x,Y=tt(()=>{"use strict";q=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)}},x={image:new q(100),background:new q(100),resource:new q(150),defaultStyle:new q(30),baseStyle:new q(50),compress:new q(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function At(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Vt(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let s of n[1].split(",")){let i=s.match(/url\((['"]?)(.*?)(\1)\)/);if(!i)continue;let a=s.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),c=1;if(a){let l=parseFloat(a[1]);c=/dpi/i.test(a[2])?l/96:l}r.push({url:i[2].trim(),dppx:c})}return r.length?(r.sort((s,i)=>s.dppx-i.dppx),(r.find(s=>s.dppx>=e)||r[r.length-1]).url):null}function Ie(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(s=>s.trim());return o.length!==6?`matrix(${r})`:(o[4]="0",o[5]="0",`matrix(${o.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(s=>s.trim());return o.length!==16?`matrix3d(${r})`:(o[12]="0",o[13]="0",`matrix3d(${o.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function mt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function _e(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}}var jt=tt(()=>{"use strict"});function _o(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,o=0;function s(i,a,c){if(o>=n)return;let l=Date.now();(r.get(a)||0)>l||(r.set(a,l+e),o++,i==="warn"&&console&&console.warn?console.warn(`${t} ${c}`):console&&console.error&&console.error(`${t} ${c}`))}return{warnOnce(i,a){s("warn",i,a)},errorOnce(i,a){s("error",i,a)},reset(){r.clear(),o=0}}}function Wo(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Oo(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=e.includes("{url}")?e.split("{url}")[0]:e,o=new URL(r||".",n),s=new URL(t,n);if(s.origin===o.origin)return!0;let i=s.searchParams;if(i&&(i.has("url")||i.has("target")))return!0}catch{}return!1}function Bo(t,e){if(!e||Wo(t)||Oo(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 Uo(t,e){if(!e)return t;if(e.includes("{url}"))return e.replace("{urlRaw}",mt(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}${mt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Rn(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 Do(t,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,t].join("|")}async function V(t,e={}){let n=e.as??"blob",r=e.timeout??3e3,o=e.useProxy||"",s=e.errorTTL??8e3,i=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="",w=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],A=/;base64/i.test(g)?atob(w):decodeURIComponent(w),b=new Uint8Array([...A].map(C=>C.charCodeAt(0))),S=new Blob([b],{type:(g||"").split(";")[0]||""});return{ok:!0,data:S,status:200,url:t,fromCache:!1,mime:S.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 w=await g.blob(),y=w.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Rn(w),status:g.status,url:t,fromCache:!1,mime:y}:n==="text"?{ok:!0,data:await w.text(),status:g.status,url:t,fromCache:!1,mime:y}:{ok:!0,data:w,status:g.status,url:t,fromCache:!1,mime:y}}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=Do(t,{as:n,timeout:r,useProxy:o,errorTTL:s}),l=le.get(c);if(l&&l.until>Date.now())return{...l.result,fromCache:!0};l&&le.delete(c);let f=We.get(c);if(f)return f;let u=Bo(t,o)?Uo(t,o):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",w=new URL(t,g);d=typeof location<"u"&&w.origin===location.origin?"include":"omit"}catch{d="omit"}let m=new AbortController,h=setTimeout(()=>m.abort("timeout"),r),p=(async()=>{try{let g=await fetch(u,{signal:m.signal,credentials:d,headers:i});if(!g.ok){let A={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(s>0&&le.set(c,{until:Date.now()+s,result:A}),!a){let b=`${g.status} ${g.statusText||""}`.trim();Fn.warnOnce(`http:${g.status}:${n}:${new URL(t,location?.href??"http://localhost/").origin}`,`HTTP error ${b} while fetching ${n} ${t}`)}return e.onError&&e.onError(A),A}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let w=await g.blob(),y=w.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Rn(w),status:g.status,url:u,fromCache:!1,mime:y}:{ok:!0,data:w,status:g.status,url:u,fromCache:!1,mime:y}}catch(g){let w=g&&typeof g=="object"&&"name"in g&&g.name==="AbortError"?String(g.message||"").includes("timeout")?"timeout":"abort":"network",y={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:w};if(!/^blob:/i.test(t)&&s>0&&le.set(c,{until:Date.now()+s,result:y}),!a){let A=`${w}:${n}:${new URL(t,location?.href??"http://localhost/").origin}`,b=w==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${t}`:w==="abort"?`Request aborted while fetching ${n} ${t}`:`Network/CORS issue while fetching ${n} ${t}. A proxy may be required`;Fn.errorOnce(A,b)}return e.onError&&e.onError(y),y}finally{clearTimeout(h),We.delete(c)}})();return We.set(c,p),p}var Fn,We,le,pt=tt(()=>{"use strict";jt();Fn=_o("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),We=new Map,le=new Map});async function vt(t,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let r=Vt(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??At(t);if(!r)return t;let o=_e(r),s=mt(o),i=(e.useProxy||"")+"|"+s;if(x.background.has(i)){let a=x.background.get(i);return a?`url("${a}")`:"none"}try{let a=await V(s,{as:"dataURL",useProxy:e.useProxy});return a.ok?(x.background.set(i,a.data),`url("${a.data}")`):(x.background.set(i,null),"none")}catch{return x.background.set(i,null),"none"}}var Ln=tt(()=>{"use strict";Y();jt();pt()});function Oe(){for(let t of Ho){let e=String(t).toLowerCase();fe.has(e)||ue.has(e)||de(e)}}function de(t){if(t=String(t).toLowerCase(),ue.has(t)){let s={};return x.defaultStyle.set(t,s),s}if(x.defaultStyle.has(t))return x.defaultStyle.get(t);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),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);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),o={};for(let s of r){if(qt(s))continue;let i=r.getPropertyValue(s);o[s]=i}return e.removeChild(n),x.defaultStyle.set(t,o),o}function qt(t){let e=Tn.get(t);if(e===void 0){let n=String(t).toLowerCase();e=jo.has(n)||Vo.test(n)||zo.test(n),Tn.set(t,e)}return e}function me(t,e){return!Go.has(t)&&(e==="inline"||qo.has(t)||Xo.has(t))}function Tt(t,e,n=!0,r=!1){if(e=String(e||"").toLowerCase(),ue.has(e))return"";let o=[],s=de(e),i=(t.display||"").toLowerCase(),a=i==="inline",l=me(e,i)&&n,f=!1;for(let u in t){if(qt(u))continue;let d=t[u];if(l){if(Yo.has(u))continue;if(Ko.has(u)){d&&d!==s[u]&&(o.push(`${u}:${d}`),d!=="auto"&&(f=!0));continue}}if(d&&d!==s[u]){if((u==="width"||u==="inline-size")&&d.endsWith("px")&&d.includes(".")){let m=parseFloat(d);if(Number.isFinite(m)){o.push(`${u}:${Math.ceil(m*16)/16}px`);continue}}o.push(`${u}:${d}`)}}if(l&&!a&&!r&&!f){let u=t.width;u&&u!=="auto"&&u!==s.width&&o.push(`min-width:${u}`)}return o.sort(),o.join(";")}function Be(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 Ue(t){let e=new Map;for(let r of t){let o=de(r);if(!o)continue;let s=Object.entries(o).map(([i,a])=>`${i}:${a};`).sort().join("");s&&(e.has(s)||e.set(s,[]),e.get(s).push(r))}let n="";for(let[r,o]of e.entries())n+=`${o.join(",")} { ${r} }
8
+ `;return n}function De(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let o of e)n.set(o,`c${r++}`);return n}function Qo(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 N(t,e=null){let n=()=>{let s={length:0,getPropertyValue:()=>"",item:()=>""};return s[Symbol.iterator]=function*(){},s};if(!(t instanceof Element)){let s=typeof window<"u"?window:null;if(s&&typeof s.getComputedStyle=="function")try{return s.getComputedStyle(t,e)||n()}catch{return n()}return n()}let r=x.computedStyle.get(t);r||(r=new Map,x.computedStyle.set(t,r));let o=r.get(e);if(!o){let s=Qo(t),i=null;try{i=s&&typeof s.getComputedStyle=="function"?s.getComputedStyle(t,e):null}catch{}if(!i&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(i=window.getComputedStyle(t,e))}catch{}o=i||n(),r.set(e,o)}return o}function pe(t){let e={};for(let n of t)e[n]=t.getPropertyValue(n);for(let n of Jo){let r=e[`border-${n}-style`],o=e[`border-${n}-width`];(r==="none"||r==="hidden"||o==="0px")&&(delete e[`border-${n}-style`],delete e[`border-${n}-width`],delete e[`border-${n}-color`])}return e}function Pt(t){let e=[],n=0,r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("&&n++,s===")"&&n--,s===","&&n===0&&(e.push(t.slice(r,o).trim()),r=o+1)}return e.push(t.slice(r).trim()),e}var fe,ue,Ho,zo,Vo,jo,Tn,qo,Xo,Go,Yo,Ko,Jo,Xt=tt(()=>{"use strict";Y();fe=new Set(["meta","script","noscript","title","link","template"]),ue=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Ho=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];zo=/(?:^|-)(animation|transition)(?:-|$)/i,Vo=/^(--.+|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,jo=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"]),Tn=new Map;qo=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Xo=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Go=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Yo=new Set(["width","max-width","inline-size","max-inline-size"]),Ko=new Set(["min-width","min-inline-size"]);Jo=["top","right","bottom","left"]});function kt(t,{fast:e=!1}={}){if(e)return t();"requestIdleCallback"in window?requestIdleCallback(t,{timeout:50}):setTimeout(t,1)}function He(){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),o=/mobile/i.test(t),s=!/safari/i.test(t),i=r&&o&&s,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),l=/ipad|iphone|ipod/.test(e)&&r;return n||i||a||c||l}function Pn(){if(typeof navigator>"u")return!1;let t=(navigator.userAgent||"").toLowerCase();return t.includes("firefox")||t.includes("fxios")}var Nt=tt(()=>{"use strict"});function P(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))}var ze=tt(()=>{"use strict"});var et=tt(()=>{"use strict";Ln();Xt();Nt();jt();ze()});var xo={};zt(xo,{toCanvas:()=>Et});function na(t){try{let e=t.match(/<svg\b[^>]*>/i);if(!e)return t;let n=e[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0)return t;let s=Math.min(1,ht/r,ht/o,Math.sqrt(dn/(r*o)));if(s>=1)return t;let i=Math.max(1,Math.floor(r*s)),a=Math.max(1,Math.floor(o*s));return console.warn(`[snapDOM] Capture ${Math.round(r)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${ht}px/side); downscaling to ${i}\xD7${a}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),t.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${i}`).replace(/(\bheight=")[\d.]+/i,`$1${a}`))}catch{return t}}function ra(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function oa(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function ia(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 sa(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function bo(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),n=""):n+=s}return n.trim()&&e.push(n),e.map(o=>o.trim()).filter(Boolean)}function aa(t){let e=[],n="",r=0;for(let s=0;s<t.length;s++){let i=t[s];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===","&&r===0?(e.push(n.trim()),n=""):n+=i}n.trim()&&e.push(n.trim());let o=[];for(let s of e){if(/\binset\b/i.test(s))continue;let i=s.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",c="0px",l="0px"]=i;l=`${parseFloat(l)/2}px`;let f=s.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!f&&f!==",";o.push(`drop-shadow(${a} ${c} ${l}${u?` ${f}`:""})`)}return o.join(" ")}function wo(t){let e=bo(t),n=null,r=null,o=null,s=[];for(let a of e){let c=a.indexOf(":");if(c<0)continue;let l=a.slice(0,c).trim().toLowerCase(),f=a.slice(c+1).trim();l==="box-shadow"?o=f:l==="filter"?n=f:l==="-webkit-filter"?r=f:s.push([l,f])}if(o){let a=aa(o);a&&(n=n?`${n} ${a}`:a,r=r?`${r} ${a}`:a)}let i=[...s];return n&&i.push(["filter",n]),r&&i.push(["-webkit-filter",r]),i.map(([a,c])=>`${a}:${c}`).join(";")}function ca(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${wo(r)}}`)}function la(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,ca(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${wo(r)}${n}`),t}function fa(){return Le||(Le=(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 o=r.getImageData(2,18,1,1).data[3]>128,s=r.getImageData(2,2,1,1).data[3]>128;return{native:o||s,flippedY:s&&!o}}catch{return{native:!1,flippedY:!1}}})(),Le)}function ua(t){let e=[],n=0,r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("?n++:s===")"?n=Math.max(0,n-1):s===","&&n===0&&(e.push(t.slice(r,o)),r=o+1)}return e.push(t.slice(r)),e.map(o=>{let s=0,i=0,a="",c=0;for(;c<o.length;){let l=o[c];if(l==="("?s++:l===")"&&(s=Math.max(0,s-1)),s===0&&(c===0||o[c-1]===" ")){let f=/^-?\d*\.?\d+px/.exec(o.slice(c));if(f){i++,a+=i===2?`${-parseFloat(f[0])}px`:f[0],c+=f[0].length;continue}}a+=l,c++}return a}).join(",")}function da(t,e){let n=r=>bo(r).map(o=>{let s=o.indexOf(":");if(s<0)return o;let i=o.slice(0,s).trim().toLowerCase();return i==="text-shadow"||e&&i==="box-shadow"?`${i}:${ua(o.slice(s+1))}`:o}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,o)=>r.replace(o,o.replace(/([^{}]+)\{([^}]*)\}/g,(s,i,a)=>`${i}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(r,o,s)=>`style=${o}${n(s)}${o}`),t}async function ma(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:r}=await fa();try{let o=t;return n||(o=la(o)),r&&(o=da(o,n)),{svg:o,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}async function Et(t,e){let{width:n,height:r,scale:o=1,dpr:s=1,meta:i={},backgroundColor:a}=e,c=t,l=!1;if(ra(t)){let v=(ia(t).match(/<svg\b[^>]*>/i)||[])[0]||"",M=parseFloat((v.match(/\bwidth="([\d.]+)/i)||[])[1]),L=parseFloat((v.match(/\bheight="([\d.]+)/i)||[])[1]),$=Number.isFinite(M)&&Number.isFinite(L)&&M>0&&L>0&&Math.min(1,ht/M,ht/L,Math.sqrt(dn/(M*L)))<1;if($||X())try{let T=oa(t);if(X()){let B=await ma(T);T=B.svg,l=B.naturalOnly}$&&(T=na(T)),c=sa(T)}catch{c=t}}let f=new Image;if(f.loading="eager",f.decoding="sync",f.crossOrigin="anonymous",f.src=c,await f.decode(),X()){f.setAttribute("data-snapdom-internal",""),f.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(f);try{await new Promise(v=>requestAnimationFrame(()=>requestAnimationFrame(v)))}finally{try{f.remove()}catch{}}}let u=f.naturalWidth,d=f.naturalHeight,m=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:u,h=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:d,p,g,w=Number.isFinite(n),y=Number.isFinite(r);if(w&&y)p=Math.max(1,n),g=Math.max(1,r);else if(w){let v=n/Math.max(1,m);p=n,g=h*v}else if(y){let v=r/Math.max(1,h);g=r,p=m*v}else p=u,g=d;p=p*o,g=g*o;let A=p*s,b=g*s,S=Math.max(A/ht,b/ht,Math.sqrt(A*b/dn));S>1&&(console.warn(`[snapDOM] Output ${Math.round(A)}\xD7${Math.round(b)}px exceeds the browser canvas limit (${ht}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),p/=S,g/=S);let C=document.createElement("canvas");C.width=p*s,C.height=g*s,C.style.width=`${p}px`,C.style.height=`${g}px`;let k=C.getContext("2d");if(s!==1&&k.scale(s,s),a&&(k.save(),k.fillStyle=a,k.fillRect(0,0,p,g),k.restore()),l&&(Math.round(p*s)!==u||Math.round(g*s)!==d)){let v=document.createElement("canvas");v.width=u,v.height=d,v.getContext("2d").drawImage(f,0,0),k.drawImage(v,0,0,p,g)}else k.drawImage(f,0,0,p,g);return C}var ht,dn,Le,ne=tt(()=>{"use strict";Nt();ht=16384,dn=16384*16384;Le=null});var Te={};zt(Te,{rasterize:()=>mn});async function mn(t,e){let n=await Et(t,e),r=await new Promise(s=>{let i=()=>s(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(a=>{if(!a)return i();let c=new FileReader;c.onload=()=>s(String(c.result||"")),c.onerror=i,c.readAsDataURL(a)},`image/${e.format}`,e.quality)}catch{i()}}),o=new Image;return o.src=r,await o.decode(),o.style.width=`${n.width/e.dpr}px`,o.style.height=`${n.height/e.dpr}px`,o}var re=tt(()=>{"use strict";ne()});var pn={};zt(pn,{toImg:()=>pa,toSvg:()=>pa});async function pa(t,e){let{scale:n=1,width:r,height:o,meta:s={}}=e,i=Number.isFinite(r),a=Number.isFinite(o),c=Number.isFinite(n)&&n!==1||i||a;if(X()&&c)return await mn(t,{...e,format:"png",quality:1,meta:s});let l=new Image;if(l.decoding="sync",l.loading="eager",l.src=t,await l.decode(),i&&a)l.style.width=`${r}px`,l.style.height=`${o}px`;else if(i){let f=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:l.naturalWidth,u=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:l.naturalHeight,d=r/Math.max(1,f);l.style.width=`${r}px`,l.style.height=`${Math.round(u*d)}px`}else if(a){let f=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:l.naturalWidth,u=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:l.naturalHeight,d=o/Math.max(1,u);l.style.height=`${o}px`,l.style.width=`${Math.round(f*d)}px`}else{let f=Math.round(l.naturalWidth*n),u=Math.round(l.naturalHeight*n);if(l.style.width=`${f}px`,l.style.height=`${u}px`,typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let m=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${f}"`).replace(/height="[^"]*"/,`height="${u}"`);t=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,l.src=t}catch(d){P(e,"SVG width/height patch in toImg failed",d)}}return l}var hn=tt(()=>{"use strict";et();re()});var So={};zt(So,{toBlob:()=>gn});async function gn(t,e){let n=e.type;if(n==="svg"){let o=decodeURIComponent(t.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=await Et(t,e);return new Promise(o=>r.toBlob(s=>o(s),`image/${n}`,e.quality))}var yn=tt(()=>{"use strict";ne()});var Ao={};zt(Ao,{download:()=>ha});async function Co(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 ha(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),o=n.has(r)?r:"",s=(e?.format||o||"").toLowerCase(),i=s==="jpg"?"jpeg":s||"png",a=e?.filename||`snapdom.${i}`,c={...e||{},format:i,type:i};c.dpr=1;let l=He();if(i==="svg"){let d=await gn(t,{...c,type:"svg"});if(l&&await Co(d,a))return;let m=URL.createObjectURL(d),h=document.createElement("a");h.href=m,h.download=a,document.body.appendChild(h),h.click(),URL.revokeObjectURL(m),h.remove();return}let f=await Et(t,c);if(l){let d=`image/${i}`,m=await new Promise(h=>f.toBlob(h,d,e?.quality));if(m&&await Co(m,a))return}let u=document.createElement("a");u.href=f.toDataURL(`image/${i}`,e?.quality),u.download=a,document.body.appendChild(u),u.click(),u.remove()}var vo=tt(()=>{"use strict";yn();ne();Nt()});et();et();Y();var je=new WeakMap,Gt=new Map,Zo=2e3,ge=0;function he(){ge++,Gt.size>Zo&&Gt.clear()}var ti="[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]";function Ve(t){let e=t&&(t.nodeType===1?t:t.parentElement);return!!(e&&e.closest&&e.closest(ti))}function qe(t){for(let e of t)if(!Ve(e.target)){if(e.type==="childList"){let n=!0;for(let r of e.addedNodes)if(!Ve(r)){n=!1;break}if(n){for(let r of e.removedNodes)if(!Ve(r)){n=!1;break}}if(n)continue}return!0}return!1}var Nn=!1;function ei(t=document.documentElement){if(Nn)return;Nn=!0;let e=n=>{qe(n)&&he()};try{new MutationObserver(e).observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(e).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let n=document.fonts;n&&(n.addEventListener?.("loadingdone",he),n.ready?.then(()=>he()).catch(()=>{}))}catch{}}var ni=["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 Xe(t){let e=je.get(t);if(e&&e.epoch===ge){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function ri(t,e={}){let n={},r=t.getPropertyValue("visibility"),o=e.excludeStyleProps;for(let d=0;d<t.length;d++){let m=t[d];if(qt(m)||o&&(o instanceof RegExp&&o.test(m)||typeof o=="function"&&o(m)))continue;let h=t.getPropertyValue(m);(m==="background-image"||m==="content")&&h.includes("url(")&&!h.includes("data:")&&(h="none"),n[m]=h}let s=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of s)if(!n[d])try{let m=t.getPropertyValue(d);m&&(n[d]=m)}catch{}let i=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of i)if(!n[d])try{let m=t.getPropertyValue(d);m&&(n[d]=m)}catch{}if(e.embedFonts){let d=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let m of d)if(!n[m])try{let h=t.getPropertyValue(m);h&&(n[m]=h)}catch{}}r==="hidden"&&(n.opacity="0");try{(n["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(n.visibility="hidden")}catch{}let a=!1;{let d=t.getPropertyValue("background-image");if(d&&d!=="none"&&(a=!0),!a){let m=t.getPropertyValue("background-color");m&&m!=="rgba(0, 0, 0, 0)"&&m!=="transparent"&&(a=!0)}if(!a)for(let m of ni){let h=t.getPropertyValue(m);if(h&&h!=="none"){a=!0;break}}if(!a){let m=t.getPropertyValue("background");m&&/url\s*\(/i.test(m)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let c=parseFloat(t.getPropertyValue("border-top-width")||0)||0,l=parseFloat(t.getPropertyValue("border-right-width")||0)||0,f=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(c===0&&l===0&&f===0&&u===0){let d=(t.getPropertyValue("border-image-source")||"").trim(),m=d&&d!=="none",h=["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"];for(let p of h)delete n[p];m||(n.border="none")}return n}function oi(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=N(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}var In=new WeakMap;function ii(t){let e=In.get(t);return e||(e=Object.entries(t).sort((r,o)=>r[0]<o[0]?-1:r[0]>o[0]?1:0).map(([r,o])=>`${r}:${o}`).join(";"),In.set(t,e),e)}function si(t,e=null,n={}){let r=je.get(t),o=!!(n&&n.embedFonts),s=n&&n.excludeStyleProps||null;if(r&&r.epoch===ge&&r.embedFonts===o&&r.excludeStyleProps===s)return r.snapshot;let i=e||getComputedStyle(t),a=ri(i,n);return di(t,i,a),je.set(t,{epoch:ge,snapshot:a,embedFonts:o,excludeStyleProps:s}),a}function ai(t,e){return t&&t.session&&t.persist?t:t&&(t.styleMap||t.styleCache||t.nodeMap)?{session:t,persist:{snapshotKeyCache:Gt,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:e||{}}:{session:x.session,persist:{snapshotKeyCache:Gt,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:t||e||{}}}function ci(t,e,n){if(!(!t.style||t.style.length===0))for(let r=0;r<t.style.length;r++){let o=t.style[r],s=n.getPropertyValue(o);s&&e.style.setProperty(o,s)}}async function nt(t,e,n,r){if(t.tagName==="STYLE")return;let o=ai(n,r),s=o.options&&o.options.cache||"auto";s!=="disabled"&&ei(document.documentElement),s==="disabled"&&!o.session.__bumpedForDisabled&&(he(),Gt.clear(),o.session.__bumpedForDisabled=!0);let{session:i,persist:a}=o;if(!i.styleCache.has(t)){let p=null;try{p=getComputedStyle(t)}catch{}i.styleCache.set(t,p||getComputedStyle(document.documentElement))}let c=i.styleCache.get(t);t.getAttribute?.("style")&&ci(t,e,c);let l=si(t,c,o.options),f=_n(t);if(f){let p=c.getPropertyValue("min-width");(!p||p==="auto"||p==="0px")&&(l["min-width"]="0px")}let u=t.tagName?.toLowerCase()||"div",d=ii(l),m=!0;me(u,(l.display||"").toLowerCase())&&(m=oi(t),d=`${d}|${u}${m?"|c":""}${f?"|f":""}`,m&&(i.reconcileRisk=(i.reconcileRisk||0)+1));let h=a.snapshotKeyCache.get(d);h===void 0&&(h=Tt(l,u,m,f),a.snapshotKeyCache.set(d,h)),i.styleMap.set(e,h)}function li(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function fi(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 _n(t){let e=t.parentElement;if(!e)return!1;let n=N(e).display||"";return n.includes("flex")||n.includes("grid")}function ui(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 o=N(r);if(o.display==="none")continue;let s=o.position;if(s!=="absolute"&&s!=="fixed")return!0}return!1}function di(t,e,n){if(t instanceof HTMLElement&&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))return;let s=parseFloat(e.height);if(Number.isFinite(s)&&t.scrollHeight>0&&Math.abs(s-t.scrollHeight)>2||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let a=e.display||"";if(a.includes("flex")||a.includes("grid")||li(t))return;let c=e.position;if(c==="absolute"||c==="fixed"||c==="sticky"||e.transform!=="none"||fi(e)||_n(t))return;let l=e.overflowX||e.overflow||"visible",f=e.overflowY||e.overflow||"visible";if(l!=="visible"||f!=="visible")return;let u=e.clip;u&&u!=="auto"&&u!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||ui(t)&&(delete n.height,delete n["block-size"])}Xt();var On=["fill","stroke","color","background-color","stop-color"],mi=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function ye(t){let e=t;for(;e&&e.nodeType===1;){if(e.namespaceURI==="http://www.w3.org/2000/svg"){if(e.localName==="mask"||e.localName==="clipPath")return!1;if(mi.has(e.localName))return!0}e=e.parentNode}return!1}var Wn=new Map;function pi(t,e){let n=e+"::"+t.toLowerCase(),r=Wn.get(n);if(r)return r;let o=document,s=e==="http://www.w3.org/2000/svg"?o.createElementNS(e,t):o.createElement(t),i=o.createElement("div");i.setAttribute("data-snapdom-internal",""),i.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",i.appendChild(s),o.documentElement.appendChild(i);let a=getComputedStyle(s),c={};for(let l of On)c[l]=a.getPropertyValue(l)||"";return i.remove(),Wn.set(n,c),c}function Bn(t,e){if(!(t instanceof Element)||!(e instanceof Element)||ye(t))return;let n=t.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&t.attributes?.length){let s=t.attributes;for(let i=0;i<s.length;i++){let a=s[i];if(a&&typeof a.value=="string"&&a.value.includes("var(")){r=!0;break}}}let o=null;if(r)try{o=getComputedStyle(t)}catch{}if(r){let s=t.style;if(s&&s.length){let i=new Set;for(let a=0;a<s.length;a++){let c=s[a];if(i.has(c))continue;i.add(c);let l=s.getPropertyValue(c);if(!l||!l.includes("var("))continue;let f=o&&o.getPropertyValue(c);if(f)try{e.style.setProperty(c,f.trim(),s.getPropertyPriority(c))}catch{}}}}if(r&&t.attributes?.length){let s=t.attributes;for(let i=0;i<s.length;i++){let a=s[i];if(!a||typeof a.value!="string"||!a.value.includes("var("))continue;let c=a.name,l=o&&o.getPropertyValue(c);if(l)try{e.style.setProperty(c,l.trim())}catch{}}}if(!r){if(!o)try{o=getComputedStyle(t)}catch{o=null}if(!o)return;let s=t.namespaceURI||"html",i=pi(t.tagName,s);for(let a of On){let c=o.getPropertyValue(a)||"",l=i[a]||"";if(c&&c!==l)try{e.style.setProperty(a,c.trim())}catch{}}}}et();et();Y();pt();pt();function Mt(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(t)&&t.length<200)}var Un="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";function hi(t,e){return!t||!(t instanceof Element)?!1:t.matches?.("picture")||t.querySelector("picture")?!0:e?!!(t.matches?.(Un)||t.querySelector(Un)):!1}function Ge(t,e){let n=t.currentSrc||"";if(n&&!Mt(n))return n;let r=e.querySelectorAll("source[srcset]"),o=null;for(let s of r){let i=s.getAttribute("srcset");if(!i||Mt(i))continue;let a=s.getAttribute("media");if(a)try{if(window.matchMedia(a).matches)return i.split(",")[0].trim().split(/\s+/)[0]}catch{}o||(o=i.split(",")[0].trim().split(/\s+/)[0])}return o}function gi(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&&!Mt(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&&!Mt(r))return r}return null}function yi(t={}){let e=t.pictureResolver&&typeof t.pictureResolver=="object"?t.pictureResolver:{};return{timeout:e.timeout??5e3,concurrency:e.concurrency??4,resolveLazySrc:e.resolveLazySrc!==!1,silent:e.silent??!1,useProxy:typeof t.useProxy=="string"?t.useProxy:""}}async function Dn(t,e={}){if(!t||!(t instanceof Element)||e.resolvePicturePlaceholders===!1)return null;let{timeout:n,concurrency:r,resolveLazySrc:o,silent:s,useProxy:i}=yi(e);if(!hi(t,o))return null;let a=[],c=[];async function l(d){let m=await V(d,{as:"dataURL",timeout:n,useProxy:i,silent:!0});return m.ok?m.data:null}async function f(d){for(let m=0;m<d.length;m+=r){let h=d.slice(m,m+r);await Promise.allSettled(h.map(p=>p()))}}let u=Array.from(t.querySelectorAll("picture"));t.matches?.("picture")&&u.unshift(t);for(let d of u){let m=d.querySelector("img");if(!m)continue;let h=m.getAttribute("src")||"";if(!Mt(h))continue;let p=Ge(m,d);p&&c.push(async()=>{let g=await l(p);if(!g){s||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${p.slice(0,60)}`);return}let w=m.getAttribute("src"),y=m.getAttribute("srcset"),A=m.getAttribute("sizes"),b=[];m.src=g,m.setAttribute("src",g),m.removeAttribute("srcset"),m.removeAttribute("sizes");let S=d.querySelectorAll("source");for(let C of S)b.push({el:C,parent:C.parentElement,next:C.nextSibling}),C.remove();a.push(()=>{w!==null?m.setAttribute("src",w):m.removeAttribute("src"),y!==null&&m.setAttribute("srcset",y),A!==null&&m.setAttribute("sizes",A);for(let{el:C,parent:k,next:v}of b)k&&k.insertBefore(C,v)})})}if(o){let d=Array.from(t.querySelectorAll("img"));t.localName==="img"&&d.unshift(t);for(let m of d){if(m.closest("picture")&&Mt(m.getAttribute("src")||""))continue;let h=m.getAttribute("src")||"",p=gi(m);p&&Mt(h)&&c.push(async()=>{let g=await l(p);if(!g)return;let w=m.getAttribute("src");m.src=g,m.setAttribute("src",g),m.removeAttribute("srcset"),m.removeAttribute("sizes"),a.push(()=>{w!==null?m.setAttribute("src",w):m.removeAttribute("src")})})}}return c.length===0?null:(await f(c),async function(){for(let m of a)try{m()}catch{}})}function xe(t,e,n){return n?Promise.all(t.map(r=>new Promise(o=>e(r,o)))):Promise.all(t.map(r=>new Promise(o=>{function s(){kt(i=>{(i&&typeof i.timeRemaining=="function"?i.timeRemaining()>0:!0)?e(r,o):s()},{fast:n})}s()})))}function bi(t){return t=t.trim(),!t||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(t)?t:`${t}:not([data-sd-slotted])`}function wi(t,e,n=!0){return t.split(",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")||r.startsWith("@"))return r;let o=n?bi(r):r;return`:where(${e} ${o})`}).join(", ")}function zn(t,e){return t?(t=t.replace(/:host\(([^)]+)\)/g,(n,r)=>`:where(${e}:is(${r.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/:host-context\(([^)]+)\)/g,(n,r)=>`:where(:where(${r.trim()}) ${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(n,r)=>`:where(${e} ${r.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(n,r,o,s)=>{let i=wi(s,e,!0);return`${r}${o}${i}{`}),t):""}function Vn(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function jn(t){let e="";try{t.querySelectorAll("style").forEach(r=>{e+=(r.textContent||"")+`
9
+ `});let n=t.adoptedStyleSheets||[];for(let r of n)try{if(r&&r.cssRules)for(let o of r.cssRules)e+=o.cssText+`
10
+ `}catch{}}catch{}return e}function qn(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 Xn(t,e){try{let n=t.closest?.("picture"),r=(n?Ge(t,n):t.currentSrc)||t.src||"";if(!r)return;e.setAttribute("src",r),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Gn(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 xi(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 Yn(t,e,n){let r=[];for(let o of e){let s=xi(t,o);s&&r.push(`${o}: ${s};`)}return r.length?`${n}{${r.join("")}}
11
+ `:""}function Kn(t){t&&(t.nodeType===Node.ELEMENT_NODE&&t.setAttribute("data-sd-slotted",""),t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>e.setAttribute("data-sd-slotted","")))}async function Si(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},r=n(),o=0;for(;o<e&&(!r||!r.body&&!r.documentElement);)await new Promise(s=>setTimeout(s,0)),r=n(),o++;return r&&(r.body||r.documentElement)?r:null}function Ci(t){let e=t.getBoundingClientRect(),n=0,r=0,o=0,s=0;try{let c=getComputedStyle(t);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,o=parseFloat(c.borderTopWidth)||0,s=parseFloat(c.borderBottomWidth)||0}catch{}let i=Math.max(0,Math.round(e.width-(n+r))),a=Math.max(0,Math.round(e.height-(o+s)));return{contentWidth:i,contentHeight:a,rect:e}}function ot(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 o=parseFloat(r.width);!isNaN(o)&&o>0&&(e=o)}if(n===0){let o=parseFloat(r.height);!isNaN(o)&&o>0&&(n=o)}}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 Ai(t,e,n){let r=t.defaultView,o=r?r.scrollX:0,s=r?r.scrollY:0,i=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,c=t.documentElement?t.documentElement.scrollLeft:0,l=t.documentElement?t.documentElement.scrollTop:0,f=0,u=0,d=0,m=0;try{let p=r&&t.body?r.getComputedStyle(t.body):null;p&&(f=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),u=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),m=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}try{t.documentElement.setAttribute("data-sd-pinned","")}catch{}let h=t.createElement("style");return h.setAttribute("data-sd-iframe-pin",""),h.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: ${f}px ${u}px ${d}px ${m}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(h),()=>{try{h.remove()}catch{}try{t.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(o,s),t.body&&(t.body.scrollLeft=i,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=c,t.documentElement.scrollTop=l)}catch{}}}async function Qn(t,e,n){let r=await Si(t,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:o,contentHeight:s,rect:i}=Ci(t),a=n?.snap;if(!a&&typeof window<"u"&&window.snapdom&&(a=window.snapdom),!a||typeof a.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let c={...n,scale:1,clip:null},l=Ai(r,o,s),f=x.session.nodeMap,u=x.session.styleMap,d=x.session.styleCache,m;try{m=await a.toPng(r.documentElement,c)}finally{l(),x.session.nodeMap=f,x.session.styleMap=u,x.session.styleCache=d}m.style.display="block",m.style.width=`${o}px`,m.style.height=`${s}px`;let h=document.createElement("div");return e.nodeMap.set(h,t),nt(t,h,e,n),h.style.overflow="hidden",h.style.display="block",h.style.width||(h.style.width=`${Math.round(i.width)}px`),h.style.height||(h.style.height=`${Math.round(i.height)}px`),h.appendChild(m),h}function Jn(t){let{width:e,height:n}=ot(t),r=t.getBoundingClientRect(),o;try{o=window.getComputedStyle(t)}catch{}let s=o?parseFloat(o.width):NaN,i=o?parseFloat(o.height):NaN,a=Math.round(e||r.width||0),c=Math.round(n||r.height||0),l=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,a||16),f=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,c||16),u=(t.type||"text").toLowerCase()==="checkbox",d=!!t.checked,m=!!t.indeterminate,p=Math.max(Math.min(l,f),12),g="middle";try{o&&o.verticalAlign&&(g=o.verticalAlign)}catch{}let w=document.createElement("div");w.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),w.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let y=document.createElementNS("http://www.w3.org/2000/svg","svg");y.setAttribute("width",String(p)),y.setAttribute("height",String(p)),y.setAttribute("viewBox",`0 0 ${p} ${p}`),w.appendChild(y);function A(){let b="#0a6ed1";try{o&&(b=o.accentColor||o.color||b)}catch{}let S=2,C=S/2,k=p-S;if(y.innerHTML="",u){let v=document.createElementNS("http://www.w3.org/2000/svg","rect");if(v.setAttribute("x",String(C)),v.setAttribute("y",String(C)),v.setAttribute("width",String(k)),v.setAttribute("height",String(k)),v.setAttribute("rx","2"),v.setAttribute("ry","2"),v.setAttribute("fill",d?b:"none"),v.setAttribute("stroke",b),v.setAttribute("stroke-width",String(S)),y.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${C+2} ${p/2} L ${p/2-1} ${p-C-2} L ${p-C-2} ${C+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,S))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),y.appendChild(M)}else if(m){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),L=Math.max(6,k-4);M.setAttribute("x",String((p-L)/2)),M.setAttribute("y",String((p-S)/2)),M.setAttribute("width",String(L)),M.setAttribute("height",String(S)),M.setAttribute("fill",b),M.setAttribute("rx","1"),y.appendChild(M)}}else{let v=document.createElementNS("http://www.w3.org/2000/svg","circle");if(v.setAttribute("cx",String(p/2)),v.setAttribute("cy",String(p/2)),v.setAttribute("r",String((p-S)/2)),v.setAttribute("fill",d?b:"none"),v.setAttribute("stroke",b),v.setAttribute("stroke-width",String(S)),y.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),L=Math.max(2,(p-S*2)*.35);M.setAttribute("cx",String(p/2)),M.setAttribute("cy",String(p/2)),M.setAttribute("r",String(L)),M.setAttribute("fill","white"),y.appendChild(M)}}w.style.setProperty("width",`${p}px`,"important"),w.style.setProperty("height",`${p}px`,"important"),w.style.setProperty("min-width",`${p}px`,"important"),w.style.setProperty("min-height",`${p}px`,"important")}return A(),{el:w,applyVisual:A}}var Yt=new q(80);async function Kt(t){if(x.resource?.has(t))return x.resource.get(t);if(Yt.has(t))return Yt.get(t);let e=(async()=>{let n=await V(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return x.resource?.set(t,n.data),n.data})();Yt.set(t,e);try{let n=await e;return Yt.set(t,n),n}catch(n){throw Yt.delete(t),n}}var vi=/\bblob:[^)"'\s]+/g;async function Hn(t){if(!t||t.indexOf("blob:")===-1)return t;let e=Array.from(new Set(t.match(vi)||[]));if(e.length===0)return t;let n=t;for(let r of e)try{let o=await Kt(r);n=n.split(r).join(o)}catch{}return n}function be(t){return typeof t=="string"&&t.startsWith("blob:")}function ki(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 Mi(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function we(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function Zn(t,e=null){if(!t)return;let n=e,r=we(t,"img");for(let c of r)try{let f=c.getAttribute("src")||c.currentSrc||"";if(be(f)){let d=await Kt(f);c.setAttribute("src",d)}let u=c.getAttribute("srcset");if(u&&u.includes("blob:")){let d=ki(u),m=!1;for(let h of d)if(be(h.url))try{h.url=await Kt(h.url),m=!0}catch(p){P(n,"blobUrlToDataUrl for srcset item failed",p)}m&&c.setAttribute("srcset",Mi(d))}}catch(l){P(n,"resolveBlobUrls for img failed",l)}let o=we(t,"image");for(let c of o)try{let l="http://www.w3.org/1999/xlink",f=c.getAttribute("href")||c.getAttributeNS?.(l,"href");if(be(f)){let u=await Kt(f);c.setAttribute("href",u),c.removeAttributeNS?.(l,"href")}}catch(l){P(n,"resolveBlobUrls for SVG image href failed",l)}let s=we(t,"[style*='blob:']");for(let c of s)try{let l=c.getAttribute("style");if(l&&l.includes("blob:")){let f=await Hn(l);c.setAttribute("style",f)}}catch(l){P(n,"replaceBlobUrls in inline style failed",l)}let i=t.querySelectorAll?t.querySelectorAll("style"):[];for(let c of i)try{let l=c.textContent||"";l.includes("blob:")&&(c.textContent=await Hn(l))}catch(l){P(n,"replaceBlobUrls in style tag failed",l)}let a=["poster"];for(let c of a){let l=we(t,`[${c}^='blob:']`);for(let f of l)try{let u=f.getAttribute(c);be(u)&&f.setAttribute(c,await Kt(u))}catch(u){P(n,`resolveBlobUrls for ${c} failed`,u)}}}Nt();var Ke=new Map,tr=new Set(["IFRAME"]);function Ce(t,e){Ke.set(String(t).toUpperCase(),e)}function Ye(t){let{width:e,height:n}=ot(t),r=e,o=n;if(!r||!o){let i=t.getBoundingClientRect();r=r||i.width||0,o=o||i.height||0}let s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${r}px;height:${o}px;visibility:hidden;`,s}var Se=200,Ei=new Set(["img","canvas","video","iframe","object","embed"]);function er(t,e){return t.right>=e.left-Se&&t.left<=e.right+Se&&t.bottom>=e.top-Se&&t.top<=e.bottom+Se}function $i(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=N(t);if(r.display==="inline"&&!Ei.has((t.localName||"").toLowerCase()))return!1;let o=e.rect,s=t.scrollWidth||0,i=t.scrollHeight||0,a={left:r.direction==="rtl"?Math.min(n.left,n.right-s):n.left,top:n.top,right:Math.max(n.right,n.left+s),bottom:Math.max(n.bottom,n.top+i)},c=r.writingMode||"";if((c.startsWith("vertical")||c.startsWith("sideways"))&&(a.top=Math.min(n.top,n.bottom-i),a.left=Math.min(a.left,n.right-s)),er(a,o))return!1;let l=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;l.nextNode();){let f=l.currentNode.getBoundingClientRect();if((f.width>0||f.height>0)&&er(f,o))return!1}return!0}function Fi(t,e,n){let r=t.cloneNode(!1);t.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),nt(t,r,e,n);let{width:o,height:s}=ot(t);return o>0&&(r.style.width=`${o}px`,r.style.minWidth=`${o}px`,r.style.maxWidth=`${o}px`),s>0&&(r.style.height=`${s}px`,r.style.minHeight=`${s}px`,r.style.maxHeight=`${s}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}async function Qt(t,e,n){if(!t)throw new Error("Invalid node");let r=new Set,o=null,s=null;if(t.nodeType===Node.ELEMENT_NODE){let f=(t.localName||t.tagName||"").toLowerCase();if(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox")||fe.has(f))return null;if(f==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return P(e,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(f==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE||t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return Ye(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let f of n.exclude)try{if(t.matches?.(f)){if(n.excludeMode==="hide")return Ye(t);if(n.excludeMode==="remove")return null}}catch(u){console.warn(`Invalid selector in exclude option: ${f}`,u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return Ye(t);if(n.filterMode==="remove")return null}}catch(f){console.warn("Error in filter function:",f)}if(e.clip&&$i(t,e.clip))return Fi(t,e,n);if(n.__resolveNodeHooks)for(let f of n.__resolveNodeHooks){let u;try{u=await f(t,n)}catch(d){P(e,"resolveNode plugin hook failed",d)}if(u===null)return null;if(u instanceof Node)return u.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(u,t),nt(t,u,e,n)),u}{let f=tr.has(t.tagName)&&Ke.get(t.tagName);if(f){let u=await f(t,e,n);if(u!==void 0)return u}}if(t.getAttribute("data-capture")==="placeholder"){let f=t.cloneNode(!1);e.nodeMap.set(f,t),nt(t,f,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;",f.appendChild(u),f}{let f=!tr.has(t.tagName)&&Ke.get(t.tagName);if(f){let u=await f(t,e,n);if(u!==void 0)return u}}let i;try{if(i=t.cloneNode(!1),i.attributes?.length)try{for(let f of i.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(f.value)&&i.setAttribute(f.name,f.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Bn(t,i),e.nodeMap.set(i,t),t.tagName==="IMG"){Xn(t,i);try{let{width:f,height:u}=ot(t),d=Math.round(f||0),m=Math.round(u||0);d&&(i.dataset.snapdomWidth=String(d)),m&&(i.dataset.snapdomHeight=String(m))}catch(f){P(e,"getUnscaledDimensions for IMG failed",f)}try{let f=t.getAttribute("style")||"",u=window.getComputedStyle(t),d=A=>{let b=f.match(new RegExp(`${A}\\s*:\\s*([^;]+)`,"i")),S=b?b[1].trim():u.getPropertyValue(A);return/%|auto/i.test(String(S||""))},m=parseInt(i.dataset.snapdomWidth||"0",10),h=parseInt(i.dataset.snapdomHeight||"0",10),p=d("width")||!m,g=d("height")||!h;p&&m&&(i.style.width=`${m}px`),g&&h&&(i.style.height=`${h}px`);let w=u.getPropertyValue("object-fit"),y=u.getPropertyValue("object-position");w&&w!=="fill"?(i.style.objectFit=w,y&&(i.style.objectPosition=y)):(m&&(i.style.minWidth=`${m}px`),h&&(i.style.minHeight=`${h}px`))}catch(f){P(e,"IMG dimension freeze failed",f)}}}catch(f){throw console.error("[Snapdom] Failed to clone node:",t,f),f}let a=null;if(t instanceof HTMLTextAreaElement){let{width:f,height:u}=ot(t),d=f||t.getBoundingClientRect().width||0,m=u||t.getBoundingClientRect().height||0;d&&(i.style.width=`${d}px`),m&&(i.style.height=`${m}px`)}if(t instanceof HTMLInputElement){let f=(t.type||"text").toLowerCase();if((f==="checkbox"||f==="radio")&&Pn()){let{el:d,applyVisual:m}=Jn(t);e.nodeMap.set(d,t),a=m,i=d}else i.value=t.value,i.setAttribute("value",t.value),t.checked!==void 0&&(i.checked=t.checked,t.checked&&i.setAttribute("checked",""),t.indeterminate&&(i.indeterminate=t.indeterminate))}if((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&!t.value&&t.placeholder)try{let f=window.getComputedStyle(t,"::placeholder"),u=f&&f.color;if(u&&u!=="rgba(0, 0, 0, 0)"){let d="snapdom-ph-"+(Math.random()*1e6|0);i.classList.add(d);let m=document.createElement("style");m.textContent=`.${d}::placeholder{color:${u}!important;opacity:${f.opacity||"1"}!important;-webkit-text-fill-color:${u}!important;}`,i.prepend(m)}}catch{}if(t instanceof HTMLSelectElement&&(o=t.value),t instanceof HTMLTextAreaElement&&(s=t.value),t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement){t.disabled&&i.setAttribute("disabled",""),t.required&&i.setAttribute("required",""),t.readOnly&&i.setAttribute("readonly","");let f=t;f.min!==void 0&&f.min!==""&&i.setAttribute("min",f.min),f.max!==void 0&&f.max!==""&&i.setAttribute("max",f.max),f.pattern!==void 0&&f.pattern!==""&&i.setAttribute("pattern",f.pattern);let u=t.getAttribute("aria-invalid");u!==null&&i.setAttribute("aria-invalid",u)}if(ye(t)||nt(t,i,e,n),a&&a(),t instanceof SVGElement&&!ye(t)){let f=["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"];try{let u=window.getComputedStyle(t);for(let d of f){let m=u.getPropertyValue(d);m&&i.style.setProperty(d,m)}}catch{}}if(t.shadowRoot){let w=function(b,S){if(b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE")return S(null);Qt(b,e,n).then(C=>{S(C||null)}).catch(()=>{S(null)})};var c=w;try{let b=t.shadowRoot.querySelectorAll("slot");for(let S of b){let C=[];try{C=S.assignedNodes?.({flatten:!0})||S.assignedNodes?.()||[]}catch{C=S.assignedNodes?.()||[]}for(let k of C)r.add(k)}}catch{}let f=Vn(e),u=`[data-sd="${f}"]`;try{i.setAttribute("data-sd",f)}catch{}let d=jn(t.shadowRoot),m=zn(d,u),h=Gn(d),p=Yn(t,h,u);qn(i,p+m,f);let g=document.createDocumentFragment(),y=await xe(Array.from(t.shadowRoot.childNodes),w,n.fast);g.append(...y.filter(b=>!!b)),i.appendChild(g)}if(t.tagName==="SLOT"){let m=function(g,w){Qt(g,e,n).then(y=>{y&&Kn(y),w(y||null)}).catch(()=>{w(null)})};var c=m;let f=t.assignedNodes?.({flatten:!0})||[],u=f.length>0?f:Array.from(t.childNodes),d=document.createDocumentFragment(),h=await xe(Array.from(u),m,n.fast);return d.append(...h.filter(g=>!!g)),d}function c(f,u){if(r.has(f))return u(null);Qt(f,e,n).then(d=>{u(d||null)}).catch(()=>{u(null)})}let l=await xe(Array.from(t.childNodes),c,n.fast);if(i.append(...l.filter(f=>!!f)),o!==null&&i instanceof HTMLSelectElement){i.value=o;for(let f of i.options)f.value===o?f.setAttribute("selected",""):f.removeAttribute("selected")}return s!==null&&i instanceof HTMLTextAreaElement&&(i.textContent=s),i}async function Ri(t,e,n){let r=!1;try{r=!!(t.contentDocument||t.contentWindow?.document)}catch(o){P(e,"iframe same-origin probe failed",o)}if(r)try{return await Qn(t,e,n)}catch(o){console.warn("[SnapDOM] iframe rasterization failed, fallback:",o)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (cannot access content). Use options.placeholders to show a placeholder instead.",t),n.placeholders){let{width:o,height:s}=ot(t),i=document.createElement("div");return i.style.cssText=`width:${o}px;height:${s}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;`,nt(t,i,e,n),i}else{let{width:o,height:s}=ot(t),i=document.createElement("div");return i.style.cssText=`display:inline-block;width:${o}px;height:${s}px;visibility:hidden;`,nt(t,i,e,n),i}}async function Li(t,e,n){let r="";try{let a=t.getContext("2d",{willReadFrequently:!0});try{a&&a.getImageData(0,0,1,1)}catch{}if(X()&&await new Promise(c=>requestAnimationFrame(c)),r=t.toDataURL("image/png"),!r||r==="data:,"){try{a&&a.getImageData(0,0,1,1)}catch{}if(await new Promise(c=>requestAnimationFrame(c)),r=t.toDataURL("image/png"),!r||r==="data:,"){let c=document.createElement("canvas");c.width=t.width,c.height=t.height;let l=c.getContext("2d");l&&(l.drawImage(t,0,0),r=c.toDataURL("image/png"))}}}catch(a){P(e,"Canvas toDataURL failed, using empty/fallback",a)}let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch(a){P(e,"img decoding/loading hints failed",a)}r&&(o.src=r),o.width=t.width,o.height=t.height;let{width:s,height:i}=ot(t);return s>0&&(o.style.width=`${s}px`),i>0&&(o.style.height=`${i}px`),e.nodeMap.set(o,t),nt(t,o,e,n),o}async function Ti(t,e,n){let r="";try{let a=document.createElement("canvas");a.width=t.videoWidth||t.offsetWidth||320,a.height=t.videoHeight||t.offsetHeight||240;let c=a.getContext("2d");c&&(c.drawImage(t,0,0,a.width,a.height),r=a.toDataURL("image/png"),(!r||r==="data:,")&&(r=""))}catch(a){P(e,"Video frame capture failed, using poster fallback",a)}let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}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:i}=ot(t);return s>0&&(o.style.width=`${s}px`),i>0&&(o.style.height=`${i}px`),o.style.objectFit="contain",e.nodeMap.set(o,t),nt(t,o,e,n),o}async function Pi(t,e,n){if(!t.controls)return;let{width:r,height:o}=ot(t),s=Math.round(r||t.offsetWidth||300),i=Math.round(o||t.offsetHeight||54),a=i/2,c=Math.max(4,i*.16),l=i*.34,f=s-i*.34,u=l+c+i*.55,d=Math.max(0,f-i*.7-u),m=Math.max(9,Math.round(i*.24)),h=`<svg xmlns="http://www.w3.org/2000/svg" width="${s}" height="${i}" viewBox="0 0 ${s} ${i}"><rect width="${s}" height="${i}" rx="${Math.min(i/2,10)}" fill="#f1f3f4"/><path d="M ${l} ${a-c} L ${l+c} ${a} L ${l} ${a+c} Z" fill="#5f6368"/><rect x="${u}" y="${a-1.5}" width="${d}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${u}" cy="${a}" r="${Math.max(3,i*.09)}" fill="#5f6368"/><text x="${f}" y="${a}" fill="#5f6368" font-family="sans-serif" font-size="${m}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,p=document.createElement("img");try{p.decoding="sync",p.loading="eager"}catch{}return p.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`,p.width=s,p.height=i,p.style.width=`${s}px`,p.style.height=`${i}px`,e.nodeMap.set(p,t),nt(t,p,e,n),p}Ce("IFRAME",Ri);Ce("CANVAS",Li);Ce("VIDEO",Ti);Ce("AUDIO",Pi);et();jt();Xt();Y();Y();var Ni=[/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],It=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__||{}),or=[],nr=new Set;function Ii(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ir(t){let e=Array.isArray(t)?t:[t];for(let n of e){let r;if(n instanceof RegExp)r=n;else if(typeof n=="string")r=new RegExp(Ii(n),"i");else{console.warn("[snapdom] Ignored invalid iconFont value:",n);continue}let o=`${r.source}/${r.flags}`;nr.has(o)||(nr.add(o),or.push(r))}}function it(t){let e=typeof t=="string"?t:"",n=[...Ni,...or];for(let r of n)if(r instanceof RegExp&&r.test(e))return!0;return!!(/icon/i.test(e)||/glyph/i.test(e)||/symbols/i.test(e)||/feather/i.test(e)||/fontawesome/i.test(e))}function _i(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var rr=new Map;function Wi(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,o;for(;o=r.exec(n);)e[o[1].toUpperCase()]=Number(o[2]);return e}async function Oi(t,e,n){let r=String(t||""),o=r.toLowerCase(),s=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(o)&&!/\bsymbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),c="outlined";/\brounded\b/.test(s)||/\bround\b/.test(s)?c="rounded":/\bsharp\b/.test(s)?c="sharp":/\boutlined\b/.test(s)&&(c="outlined");let l=a===1,f=null;if(l&&(c==="outlined"&&It.materialIconsFilled?f={url:It.materialIconsFilled,alias:"snapdom-mi-filled"}:c==="rounded"&&It.materialIconsRound?f={url:It.materialIconsRound,alias:"snapdom-mi-round"}:c==="sharp"&&It.materialIconsSharp&&(f={url:It.materialIconsSharp,alias:"snapdom-mi-sharp"})),!f)return{familyForMeasure:r,familyForCanvas:r};if(!rr.has(f.alias))try{let d=new FontFace(f.alias,`url(${f.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),rr.set(f.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let u=`"${f.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Bi(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Ui(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 Di(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:o="#000",variation:s="",className:i=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),c=window.devicePixelRatio||1,l=Wi(s),{familyForMeasure:f,familyForCanvas:u}=await Oi(a,i,l);await Bi(u.replace(/^["']+|["']+$/g,""),r);let d=document.createElement("span");d.setAttribute("data-snapdom-internal",""),d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=f,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${r}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=o,document.body.appendChild(d);let m=d.getBoundingClientRect(),h=Math.max(1,Math.ceil(m.width)),p=Math.max(1,Math.ceil(m.height));document.body.removeChild(d);let g=document.createElement("canvas");g.width=h*c,g.height=p*c;let w=g.getContext("2d");w.scale(c,c),w.font=`${n?`${n} `:""}${r}px ${u}`,w.textAlign="left",w.textBaseline="top",w.fillStyle=o;try{w.fontKerning="normal"}catch{}return w.fillText(t,0,0),{dataUrl:g.toDataURL(),width:h,height:p}}async function sr(t,e,n=x.session.nodeMap){if(!(t instanceof Element))return 0;let r='.material-icons, [class*="material-symbols"]',o=Array.from(t.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(r)&&t.textContent&&t.textContent.trim()&&o.unshift(t),o.length===0)return 0;let s=e instanceof Element?Array.from(e.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e instanceof Element&&e.matches?.(r)&&e.textContent&&e.textContent.trim()&&s.unshift(e);let i=0;for(let a=0;a<o.length;a++){let c=o[a],l=n&&n.get(c)||s[a]||null;try{let f=getComputedStyle(l||c),u=f.fontFamily||"Material Icons";if(!_i(u))continue;let d=(l||c).textContent.trim();if(!d)continue;let m=parseInt(f.fontSize,10)||24,h=f.fontWeight&&f.fontWeight!=="normal"?f.fontWeight:"normal",p=Ui(f),g=f.fontVariationSettings&&f.fontVariationSettings!=="normal"?f.fontVariationSettings:"",w=(l||c).className||"",{dataUrl:y,width:A,height:b}=await Di(d,{family:u,weight:h,fontSize:m,color:p,variation:g,className:w});c.textContent="";let S=c.ownerDocument.createElement("img");S.src=y,S.alt=d,S.style.height=`${m}px`,S.style.width=`${Math.max(1,Math.round(A/b*m))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(c).verticalAlign||"baseline",c.appendChild(S),i++}catch{}}return i}pt();async function fr(t,e,n,r=32,o="#000"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let i=document.createElement("span");i.setAttribute("data-snapdom-internal",""),i.textContent=t,i.style.position="absolute",i.style.visibility="hidden",i.style.fontFamily=`"${e}"`,i.style.fontWeight=n||"normal",i.style.fontSize=`${r}px`,i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.padding="0",i.style.margin="0",document.body.appendChild(i);let a=i.getBoundingClientRect(),c=Math.ceil(a.width),l=Math.ceil(a.height);document.body.removeChild(i);let f=document.createElement("canvas");f.width=Math.max(1,c*s),f.height=Math.max(1,l*s);let u=f.getContext("2d");return u.scale(s,s),u.font=n?`${n} ${r}px "${e}"`:`${r}px "${e}"`,u.textAlign="left",u.textBaseline="top",u.fillStyle=o,u.fillText(t,0,0),{dataUrl:f.toDataURL(),width:c,height:l}}var ur=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Hi=["katex","mathjax","mathml"];function Je(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!ur.has(n.toLowerCase()))return n}return""}function zi(t){if(!t)return[];let e=[];for(let n of t.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(ur.has(r.toLowerCase())||e.push(r))}return e}function Ae(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 ve(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Vi(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function ji(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let o=Ae(n[1]),s=Ae(n[2]);return{min:Math.min(o,s),max:Math.max(o,s)}}let r=Ae(e);return{min:r,max:r}}function qi(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Xi(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let s=parseFloat(n[1]),i=parseFloat(n[2]);return{min:Math.min(s,i),max:Math.max(s,i)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),o=r?parseFloat(r[1]):100;return{min:o,max:o}}function Gi(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Yi(t,e,n=[]){if(!t)return!1;try{let r=new URL(t,location.href);if(r.origin===location.origin)return!0;let s=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=>s.endsWith(c))||n.some(c=>s===c.toLowerCase()||s.endsWith("."+c.toLowerCase())))return!0;let a=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||Hi.some(c=>a.includes(c)))return!0;for(let c of e){let l=c.toLowerCase().replace(/\s+/g,"+"),f=c.toLowerCase().replace(/\s+/g,"-"),u=Gi(c);if(a.includes(l)||a.includes(f)||u&&a.includes(u))return!0}return!1}catch{return!1}}function Ki(t){let e=new Set;for(let n of t||[]){let r=String(n).split("__")[0]?.trim();r&&e.add(r)}return e}function ar(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,o)=>{let s=(o||"").trim();if(!s||/^data:|^blob:|^https?:|^file:|^about:/i.test(s))return n;let i=s;try{i=new URL(s,e||location.href).href}catch{}return`url("${i}")`})}var Qe=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,ke=4;async function Qi(t,e,n){if(!t)return t;let r=new Set;function o(a,c){try{return new URL(a,c||location.href).href}catch{return a}}async function s(a,c,l=0){if(l>ke)return console.warn(`[snapDOM] @import depth exceeded (${ke}) at ${c}`),a;let f="",u=0,d;for(;d=Qe.exec(a);){f+=a.slice(u,d.index),u=Qe.lastIndex;let m=(d[2]||d[4]||"").trim(),h=o(m,c);if(r.has(h)){console.warn(`[snapDOM] Skipping circular @import: ${h}`);continue}r.add(h);let p="";try{let g=await V(h,{as:"text",useProxy:n,silent:!0});g.ok&&typeof g.data=="string"&&(p=g.data)}catch{}p?(p=ar(p,h),p=await s(p,h,l+1),f+=`
12
12
  /* inlined: ${h} */
13
- ${m}
14
- `):f+=d[0]}return f+=a.slice(u),f}let i=zn(t,e||location.href);return i=await s(i,e||location.href,0),i}var Gn=/url\((["']?)([^"')]+)\1\)/g,Ai=/@font-face[^{}]*\{[^}]*\}/g;function Yn(t){if(!t)return[];let e=[],n=t.split(",").map(o=>o.trim()).filter(Boolean);for(let o of n){let r=o.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!r)continue;let s=r[1],i=r[2],a=l=>{if(!l.includes("?"))return parseInt(l,16);let c=parseInt(l.replace(/\?/g,"0"),16),f=parseInt(l.replace(/\?/g,"F"),16);return[c,f]};if(i){let l=a(s),c=a(i),f=Array.isArray(l)?l[0]:l,u=Array.isArray(c)?c[1]:c;e.push([Math.min(f,u),Math.max(f,u)])}else{let l=a(s);Array.isArray(l)?e.push([l[0],l[1]]):e.push([l,l])}}return e}function Kn(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[o,r]of e)if(n>=o&&n<=r)return!0;return!1}function ze(t,e){let n=[];if(!t)return n;for(let o of t.matchAll(Gn)){let r=(o[2]||"").trim();if(!(!r||r.startsWith("data:"))){if(!/^https?:/i.test(r))try{r=new URL(r,e||location.href).href}catch{}n.push(r)}}return n}async function Qn(t,e,n=""){let o=t;for(let r of t.matchAll(Gn)){let s=ht(r[0]);if(!s)continue;let i=s;if(!i.startsWith("http")&&!i.startsWith("data:"))try{i=new URL(i,e||location.href).href}catch{}if(!rt(i)){if(A.resource?.has(i)){A.font?.add(i),o=o.replace(r[0],`url(${A.resource.get(i)})`);continue}try{let a=await H(i,{as:"dataURL",useProxy:n,silent:!0});if(a.ok&&typeof a.data=="string"){let l=a.data;A.resource?.set(i,l),A.font?.add(i),o=o.replace(r[0],`url(${l})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",i)}}}return o}function vi(t){if(!t.length)return null;let e=(a,l)=>t.some(([c,f])=>!(f<a||c>l)),n=e(0,255)||e(305,305),o=e(256,591)||e(7680,7935),r=e(880,1023),s=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":s?"cyrillic":r?"greek":o?"latin-ext":n?"latin":null}function Vn(t={}){let e=new Set((t.families||[]).map(r=>String(r).toLowerCase())),n=new Set((t.domains||[]).map(r=>String(r).toLowerCase())),o=new Set((t.subsets||[]).map(r=>String(r).toLowerCase()));return(r,s)=>{if(e.size&&e.has(r.family.toLowerCase()))return!0;if(n.size)for(let i of r.srcUrls)try{if(n.has(new URL(i).host.toLowerCase()))return!0}catch{}if(o.size){let i=vi(s);if(i&&o.has(i))return!0}return!1}}function ki(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,o=[];for(let s of t.match(e)||[]){let i=s.match(/font-family:\s*([^;]+);/i)?.[1]||"",a=He(i),l=(s.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),c=(s.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),f=(s.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),u=(s.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),d=(s.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),p=ze(d,location.href),h=p.length?p.map(g=>String(g).toLowerCase()).sort().join("|"):d.toLowerCase(),m=[String(a||"").toLowerCase(),l,c,f,u.toLowerCase(),h].join("|");n.has(m)||(n.add(m),o.push(s))}if(o.length===0)return t;let r=0;return t.replace(e,()=>o[r++]||"")}var jn=new WeakMap,Mi=0;function Ei(t){let e=jn.get(t);return e===void 0&&(e=Mi++,jn.set(t,e)),e}function $i(t,e,n,o,r,s){let i=Array.from(t||[]).sort().join("|"),a=e?JSON.stringify({families:(e.families||[]).map(d=>String(d).toLowerCase()).sort(),domains:(e.domains||[]).map(d=>String(d).toLowerCase()).sort(),subsets:(e.subsets||[]).map(d=>String(d).toLowerCase()).sort()}):"",l=(n||[]).map(d=>`${(d.family||"").toLowerCase()}::${d.weight||"normal"}::${d.style||"normal"}::${d.src||""}`).sort().join("|"),c=o||"",f=(r||[]).map(d=>String(d).toLowerCase()).sort().join("|"),u=Ei(s||document);return`fonts-embed-css::req=${i}::ex=${a}::lf=${l}::px=${c}::fd=${f}::doc=${u}`}async function Jn(t,e,n,o){let r;try{r=t.cssRules||[]}catch{return}let s=(i,a)=>{try{return new URL(i,a||location.href).href}catch{return i}};for(let i of r){if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){let a=i.href?s(i.href,e):e;if(o.depth>=ge){console.warn(`[snapDOM] CSSOM import depth exceeded (${ge}) at ${a}`);continue}if(a&&o.visitedSheets.has(a)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${a}`);continue}a&&o.visitedSheets.add(a);let l={...o,depth:(o.depth||0)+1};await Jn(i.styleSheet,a,n,l);continue}if(i.type===CSSRule.FONT_FACE_RULE){let a=(i.style.getPropertyValue("font-family")||"").trim(),l=He(a);if(!l||rt(l))continue;let c=(i.style.getPropertyValue("font-weight")||"400").trim(),f=(i.style.getPropertyValue("font-style")||"normal").trim(),u=(i.style.getPropertyValue("font-stretch")||"100%").trim(),d=(i.style.getPropertyValue("src")||"").trim(),p=(i.style.getPropertyValue("unicode-range")||"").trim();if(!o.faceMatchesRequired(l,f,c,u))continue;let h=Yn(p);if(!Kn(o.usedCodepoints,h))continue;let m={family:l,weightSpec:c,styleSpec:f,stretchSpec:u,unicodeRange:p,srcRaw:d,srcUrls:ze(d,e||location.href),href:e||location.href};if(o.simpleExcluder&&o.simpleExcluder(m,h))continue;if(/url\(/i.test(d)){let g=await Qn(d,e||location.href,o.useProxy);await n(`@font-face{font-family:${l};src:${g};font-style:${f};font-weight:${c};font-stretch:${u};${p?`unicode-range:${p};`:""}}`)}else await n(`@font-face{font-family:${l};src:${d};font-style:${f};font-weight:${c};font-stretch:${u};${p?`unicode-range:${p};`:""}}`)}}}async function ye({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:o=[],useProxy:r="",fontStylesheetDomains:s=[],doc:i=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let a=new Map;for(let y of t){let[x,w,C,S]=String(y).split("__");if(!x)continue;let v=x.toLowerCase(),k=a.get(v)||[];k.push({w:parseInt(w,10),s:C,st:parseInt(S,10)}),a.set(v,k)}function l(y,x,w,C){let S=String(y).toLowerCase();if(!a.has(S))return!1;let v=a.get(S),k=gi(w),M=yi(x),$=bi(C),F=k.min!==k.max,O=k.min,G=I=>M.kind==="normal"&&I==="normal"||M.kind!=="normal"&&(I==="italic"||I==="oblique"),at=!1;for(let I of v){let L=F?I.w>=k.min&&I.w<=k.max:I.w===O,z=G(he(I.s)),Q=I.st>=$.min&&I.st<=$.max;if(L&&z&&Q){at=!0;break}}if(at)return!0;if(!F)for(let I of v){let L=G(he(I.s)),z=I.st>=$.min&&I.st<=$.max;if(Math.abs(O-I.w)<=300&&L&&z)return!0}if(!F&&M.kind==="normal"&&v.some(L=>he(L.s)!=="normal"))for(let L of v){let z=Math.abs(O-L.w)<=300,Q=L.st>=$.min&&L.st<=$.max;if(z&&Q)return!0}return!1}let c=Vn(n),f=$i(t,n,o,r,s,i);if(A.resource?.has(f))return A.resource.get(f);let u=Si(t),d=[],p=De;for(let y of i.querySelectorAll("style")){let x=y.textContent||"";for(let w of x.matchAll(p)){let C=(w[2]||w[4]||"").trim();if(!C||rt(C))continue;i.querySelector(`link[rel="stylesheet"][href="${C}"]`)||d.push(C)}}let h=[];d.length&&await Promise.all(d.map(y=>new Promise(x=>{if(i.querySelector(`link[rel="stylesheet"][href="${y}"]`))return x(null);let w=i.createElement("link");w.rel="stylesheet",w.href=y,w.setAttribute("data-snapdom","injected-import"),w.onload=()=>x(w),w.onerror=()=>x(null),i.head.appendChild(w),h.push(w)})));let m="",g=Array.from(i.querySelectorAll('link[rel="stylesheet"]')).filter(y=>!!y.href);for(let y of h)try{y.remove()}catch{}for(let y of g)try{if(rt(y.href))continue;let x="",w=!1;try{w=new URL(y.href,location.href).origin===location.origin}catch{}if(!w){let S=Array.isArray(s)?s:[];if(!xi(y.href,u,S))continue}if(w){let S=Array.from(i.styleSheets).find(v=>v.href===y.href);if(S)try{let v=S.cssRules||[];x=Array.from(v).map(k=>k.cssText).join("")}catch{}}if(!x){let S=await H(y.href,{as:"text",useProxy:r});if(S?.ok&&typeof S.data=="string"&&(x=S.data),rt(y.href))continue}x=await Ci(x,y.href,r);let C="";for(let S of x.match(Ai)||[]){let v=(S.match(/font-family:\s*([^;]+);/i)?.[1]||"").trim(),k=He(v);if(!k||rt(k))continue;let M=(S.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),$=(S.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),F=(S.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),O=(S.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),G=(S.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),at=ze(G,y.href);if(!l(k,$,M,F))continue;let I=Yn(O);if(!Kn(e,I))continue;let L={family:k,weightSpec:M,styleSpec:$,stretchSpec:F,unicodeRange:O,srcRaw:G,srcUrls:at,href:y.href};if(n&&c(L,I))continue;let z=/url\(/i.test(G)?await Qn(S,y.href,r):S;C+=z}C.trim()&&(m+=C)}catch{console.warn("[snapDOM] Failed to process stylesheet:",y.href)}let b={requiredIndex:a,usedCodepoints:e,faceMatchesRequired:l,simpleExcluder:n?Vn(n):null,useProxy:r,visitedSheets:new Set,depth:0};for(let y of i.styleSheets)if(!(y.href&&g.some(x=>x.href===y.href)))try{let x=y.href||location.origin+"/";x&&b.visitedSheets.add(x),await Jn(y,x,async w=>{m+=w},b)}catch{}try{for(let y of i.fonts||[]){if(!y||!y.family||y.status!=="loaded"||!y._snapdomSrc)continue;let x=String(y.family).replace(/^['"]+|['"]+$/g,"");if(rt(x)||!a.has(x.toLowerCase())||n?.families&&n.families.some(C=>String(C).toLowerCase()===x.toLowerCase()))continue;let w=y._snapdomSrc;if(!String(w).startsWith("data:")){if(A.resource?.has(y._snapdomSrc))w=A.resource.get(y._snapdomSrc),A.font?.add(y._snapdomSrc);else if(!A.font?.has(y._snapdomSrc))try{let C=await H(y._snapdomSrc,{as:"dataURL",useProxy:r,silent:!0});if(C.ok&&typeof C.data=="string")w=C.data,A.resource?.set(y._snapdomSrc,w),A.font?.add(y._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",y._snapdomSrc);continue}}m+=`@font-face{font-family:'${x}';src:url(${w});font-style:${y.style||"normal"};font-weight:${y.weight||"normal"};}`}}catch{}for(let y of o){if(!y||typeof y!="object")continue;let x=String(y.family||"").replace(/^['"]+|['"]+$/g,"");if(!x||rt(x)||!a.has(x.toLowerCase())||n?.families&&n.families.some(M=>String(M).toLowerCase()===x.toLowerCase()))continue;let w=y.weight!=null?String(y.weight):"normal",C=y.style!=null?String(y.style):"normal",S=y.stretchPct!=null?`${y.stretchPct}%`:"100%",v=String(y.src||""),k=v;if(!k.startsWith("data:")){if(A.resource?.has(v))k=A.resource.get(v),A.font?.add(v);else if(!A.font?.has(v))try{let M=await H(v,{as:"dataURL",useProxy:r,silent:!0});if(M.ok&&typeof M.data=="string")k=M.data,A.resource?.set(v,k),A.font?.add(v);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",v);continue}}m+=`@font-face{font-family:'${x}';src:url(${k});font-style:${C};font-weight:${w};font-stretch:${S};}`}return m&&(m=ki(m),A.resource?.set(f,m)),m}function $t(t,e){let n=new Set;if(!t)return n;let o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null),r=a=>{let l=pi(a.fontFamily);if(l.length)for(let c of l){let f=(u,d,p)=>`${c}__${pe(u)}__${he(d)}__${hi(p)}`;n.add(f(a.fontWeight,a.fontStyle,a.fontStretch))}};r(getComputedStyle(t));let s=getComputedStyle(t,"::before");s&&s.content&&s.content!=="none"&&r(s);let i=getComputedStyle(t,"::after");for(i&&i.content&&i.content!=="none"&&r(i);o.nextNode();){let a=o.currentNode;if(e&&!e(a))continue;let l=getComputedStyle(a);r(l);let c=getComputedStyle(a,"::before");c&&c.content&&c.content!=="none"&&r(c);let f=getComputedStyle(a,"::after");f&&f.content&&f.content!=="none"&&r(f)}return n}function be(t,e){let n=new Set,o=s=>{if(s)for(let i of s)n.add(i.codePointAt(0))},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;r.nextNode();){let s=r.currentNode;if(s.nodeType===Node.TEXT_NODE){if(e&&s.parentElement&&!e(s.parentElement))continue;o(s.nodeValue||"")}else if(s.nodeType===Node.ELEMENT_NODE){let i=s;if(e&&!e(i))continue;for(let a of["::before","::after"]){let c=getComputedStyle(i,a)?.getPropertyValue("content");if(!(!c||c==="none"))if(/^"/.test(c)||/^'/.test(c))o(c.slice(1,-1));else{let f=c.match(/\\[0-9A-Fa-f]{1,6}/g);if(f)for(let u of f)try{n.add(parseInt(u.slice(1),16))}catch{}}}}}return n}async function Ft(t,e=2,n=document){try{await n.fonts.ready}catch{}let o=Array.from(t||[]).filter(Boolean);if(o.length===0)return;let r=()=>{let s=n.createElement("div");s.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let i of o){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${i}"`,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",s.appendChild(a)}n.body.appendChild(s),s.offsetWidth,n.body.removeChild(s)};for(let s=0;s<Math.max(1,e);s++)r(),await new Promise(i=>requestAnimationFrame(()=>requestAnimationFrame(i)))}j();function no(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Zn(t,e=!1){let n="",o=Math.max(1,t);for(;o>0;)o--,n=String.fromCharCode(97+o%26)+n,o=Math.floor(o/26);return e?n.toUpperCase():n}function to(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"]],o=Math.max(1,Math.min(3999,t)),r="";for(let[s,i]of n)for(;o>=s;)r+=i,o-=s;return e?r:r.toLowerCase()}function eo(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":return Zn(t,!1);case"upper-alpha":return Zn(t,!0);case"lower-roman":return to(t,!1);case"upper-roman":return to(t,!0);default:return String(t)}}function oo(t){let e=()=>A?.session?.__counterEpoch??0,n=e(),o=new WeakMap,r=t instanceof Document?t.documentElement:t,s=d=>d&&d.tagName==="LI",i=d=>{let p=0,h=d?.parentElement;if(!h)return 0;for(let m of h.children){if(m===d)break;m.tagName==="LI"&&p++}return p},a=d=>{let p=new Map;for(let[h,m]of d)p.set(h,m.slice());return p},l=(d,p,h)=>{let m=a(d),g;try{g=h.style?.counterReset||getComputedStyle(h).counterReset}catch{}if(g&&g!=="none")for(let x of g.split(",")){let w=x.trim().split(/\s+/),C=w[0],S=Number.isFinite(Number(w[1]))?Number(w[1]):0;if(!C)continue;let v=p.get(C);if(v&&v.length){let k=v.slice();k.push(S),m.set(C,k)}else m.set(C,[S])}let b;try{b=h.style?.counterSet||getComputedStyle(h).counterSet}catch{}if(b&&b!=="none")for(let x of b.split(",")){let w=x.trim().split(/\s+/),C=w[0],S=Number.isFinite(Number(w[1]))?Number(w[1]):0;if(!C)continue;let v=m.get(C)||[];v.length===0&&v.push(0),v[v.length-1]=S,m.set(C,v)}let y;try{y=h.style?.counterIncrement||getComputedStyle(h).counterIncrement}catch{}if(y&&y!=="none")for(let x of y.split(",")){let w=x.trim().split(/\s+/),C=w[0],S=Number.isFinite(Number(w[1]))?Number(w[1]):1;if(!C)continue;let v=m.get(C)||[];v.length===0&&v.push(0),v[v.length-1]+=S,m.set(C,v)}try{if(getComputedStyle(h).display==="list-item"&&s(h)){let w=h.parentElement,C=1;if(w&&w.tagName==="OL"){let v=w.getAttribute("start"),k=Number.isFinite(Number(v))?Number(v):1,M=i(h),$=h.getAttribute("value");C=Number.isFinite(Number($))?Number($):k+M}else C=1+i(h);let S=m.get("list-item")||[];S.length===0&&S.push(0),S[S.length-1]=C,m.set("list-item",S)}}catch{}return m},c=(d,p,h)=>{let m=l(h,p,d);o.set(d,m);let g=m;for(let y of d.children)g=c(y,m,g);let b=new Map;for(let[y,x]of h){let w=x.length,C=g.get(y);b.set(y,C&&C.length?C.slice(0,w):x.slice())}for(let[y,x]of g)!b.has(y)&&x.length&&!p.has(y)&&b.set(y,x.slice(0,1));return b},f=new Map;c(r,f,f);function u(){let d=e();if(d!==n){n=d;let p=new Map;c(r,p,p)}}return{get(d,p){u();let h=o.get(d)?.get(p);return h&&h.length?h[h.length-1]:0},getStack(d,p){u();let h=o.get(d)?.get(p);return h?h.slice():[]}}}function ro(t,e,n){if(!t||t==="none")return t;try{let o=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(o,(r,s,i)=>{let a=String(i).split(",").map(l=>l.trim());if(s==="counter"){let l=a[0]?.replace(/^["']|["']$/g,""),c=(a[1]||"decimal").toLowerCase(),f=n.get(e,l);return eo(f,c)}else{let l=a[0]?.replace(/^["']|["']$/g,""),c=a[1]?.replace(/^["']|["']$/g,"")??"",f=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,l);return u.length?u.map(p=>eo(p,f)).join(c):""}})}catch{return"- "}}gt();j();var Rt=new WeakMap,io=1e3;function Fi(t,e){let n=fo(t);return e?(e.__pseudoPreflightFp!==n&&(e.__pseudoPreflight=ao(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):ao(t,n)}function Ve(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function fo(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,o=0;for(let s=0;s<e.length;s++){let i=e[s];if(i.tagName==="STYLE"){let a=i.textContent?i.textContent.length:0;n+=`S${a}|`;let l=i.sheet,c=l?Ve(l):null;c&&(o+=c.length)}else{let a=i.getAttribute("href")||"",l=i.getAttribute("media")||"all";n+=`L${a}|m:${l}|`;let c=i.sheet,f=c?Ve(c):null;f&&(o+=f.length)}}let r=t.adoptedStyleSheets;return n+=`ass:${Array.isArray(r)?r.length:0}|tr:${o}`,n}function so(t,e,n){let o=Ve(t);if(!o)return!1;for(let r=0;r<o.length;r++){if(n.budget<=0)return!1;let s=o[r],i=s&&s.cssText?s.cssText:"";n.budget--;for(let a of e)if(i.includes(a))return!0;if(s&&s.cssRules&&s.cssRules.length)for(let a=0;a<s.cssRules.length&&n.budget>0;a++){let l=s.cssRules[a],c=l&&l.cssText?l.cssText:"";n.budget--;for(let f of e)if(c.includes(f))return!0}if(n.budget<=0)return!1}return!1}function ao(t=document,e=fo(t)){let n=Rt.get(t);if(n&&n.fingerprint===e)return n.result;let o=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],r=t.querySelectorAll("style");for(let i=0;i<r.length;i++){let a=r[i].textContent||"";for(let l of o)if(a.includes(l))return Rt.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let i={budget:io};try{for(let a of s)if(so(a,o,i))return Rt.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let i=t.querySelectorAll('style,link[rel~="stylesheet"]'),a={budget:io};for(let l=0;l<i.length&&a.budget>0;l++){let c=i[l],f=null;if(c.tagName,f=c.sheet||null,f&&so(f,o,a))return Rt.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Rt.set(t,{fingerprint:e,result:!0}),!0):(Rt.set(t,{fingerprint:e,result:!1}),!1)}var Lt=new WeakMap;function co(t){for(let e of["Top","Right","Bottom","Left"]){let n=parseFloat(t[`border${e}Width`])||0,o=t[`border${e}Style`];if(n>0&&o&&o!=="none"&&o!=="hidden")return!0}return!1}var lo=-1;function Ri(t){if(!t)return"";let e=[],n=/"([^"]*)"/g,o=0,r;for(;r=n.exec(t);){let i=t.slice(o,r.index).trim();i&&e.push(i),e.push(r[1]),o=n.lastIndex}let s=t.slice(o).trim();return s&&e.push(s),e.join("")}function je(t,e){let n=t.parentElement,o=n?Lt.get(n):null;return o?{get(r,s){let i=e.get(r,s),a=o.get(s);return typeof a=="number"?Math.max(i,a):i},getStack(r,s){let i=e.getStack(r,s);if(!i.length)return i;let a=o.get(s);if(typeof a=="number"){let l=i.slice();return l[l.length-1]=Math.max(l[l.length-1],a),l}return i}}:e}function qe(t,e,n){let o=new Map;function r(c){let f=[];if(!c||c==="none")return f;for(let u of String(c).split(",")){let d=u.trim().split(/\s+/),p=d[0],h=Number.isFinite(Number(d[1]))?Number(d[1]):void 0;p&&f.push({name:p,num:h})}return f}let s=r(e?.counterReset),i=r(e?.counterSet),a=r(e?.counterIncrement);function l(c){if(o.has(c))return o.get(c).slice();let f=n.getStack(t,c);f=f.length?f.slice():[];let u=s.find(h=>h.name===c);if(u){let h=Number.isFinite(u.num)?u.num:0;f=f.length?[...f,h]:[h]}let d=i.find(h=>h.name===c);if(d){let h=Number.isFinite(d.num)?d.num:0;f.length===0&&(f=[0]),f[f.length-1]=h}let p=a.find(h=>h.name===c);if(p){let h=Number.isFinite(p.num)?p.num:1;f.length===0&&(f=[0]),f[f.length-1]+=h}return o.set(c,f.slice()),f}return{get(c,f){let u=l(f);return u.length?u[u.length-1]:0},getStack(c,f){return l(f)},__incs:a}}function Li(t,e,n){let o;try{o=P(t,e)}catch{}let r=o?.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};let s=je(t,n),i=qe(t,o,s),a=no(r)?ro(r,t,i):r;return{text:Ri(a),incs:i.__incs||[]}}async function we(t,e,n,o){if(!(t instanceof Element)||!(e instanceof Element)||t instanceof HTMLTextAreaElement)return;let r=t.ownerDocument||document;if(!Fi(r,n))return;let s=A?.session?.__counterEpoch??0;if(lo!==s&&(Lt=new WeakMap,n&&(n.__counterCtx=null),lo=s),!n.__counterCtx)try{n.__counterCtx=oo(t.ownerDocument||document)}catch(l){T(n,"buildCounterContext failed",l)}let i=n.__counterCtx;for(let l of["::before","::after","::first-letter"])try{let c=P(t,l);if(!c||c.content==="none"&&c.backgroundImage==="none"&&c.backgroundColor==="transparent"&&!co(c)&&(!c.transform||c.transform==="none")&&c.display==="inline")continue;if(l==="::first-letter"){let R=P(t),N=(R?.display||"").toLowerCase();if(N.includes("flex")||N.includes("grid")||!(c.color!==R.color||c.fontSize!==R.fontSize||c.fontWeight!==R.fontWeight||c.fontFamily!==R.fontFamily||c.fontStyle!==R.fontStyle||c.textTransform!==R.textTransform||c.float!==R.float||c.paddingTop!==R.paddingTop||c.paddingRight!==R.paddingRight||c.paddingBottom!==R.paddingBottom||c.paddingLeft!==R.paddingLeft||c.marginTop!==R.marginTop||c.marginRight!==R.marginRight||c.marginBottom!==R.marginBottom||c.marginLeft!==R.marginLeft))continue;let B=Array.from(e.childNodes).find(Jt=>Jt.nodeType===Node.TEXT_NODE&&Jt.textContent?.trim().length>0);if(!B)continue;let et=B.textContent,J=et.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],St=et.slice(J?.length||0);if(!J||/[\uD800-\uDFFF]/.test(J))continue;let lt=document.createElement("span");lt.textContent=J,lt.dataset.snapdomPseudo="::first-letter";let Ct=ce(c),Qt=vt(Ct,"span");n.styleMap.set(lt,Qt);let _t=document.createTextNode(St);e.replaceChild(_t,B),e.insertBefore(lt,_t);continue}let u=c.content??"",d=u===""||u==="none"||u==="normal",{text:p,incs:h}=Li(t,l,i),m=c.backgroundImage,g=c.backgroundColor,b=c.fontFamily,y=parseInt(c.fontSize)||32,x=parseInt(c.fontWeight)||!1,w=c.color||"#000",C=c.transform,S=rt(b),v=!d&&p!=="",k=m&&m!=="none",M=g&&g!=="transparent"&&g!=="rgba(0, 0, 0, 0)",$=co(c),F=C&&C!=="none",G=u!=="none"&&u!=="normal"&&((parseFloat(c.width)||0)>0||(parseFloat(c.height)||0)>0);if(!(v||k||M||$||F||G)){if(h&&h.length&&t.parentElement){let R=Lt.get(t.parentElement)||new Map;for(let{name:N}of h){if(!N)continue;let W=je(t,i),et=qe(t,P(t,l),W).get(t,N);R.set(N,et)}Lt.set(t.parentElement,R)}continue}let I=!1;if(v&&!S&&p.length>1&&!p.startsWith("url(")){let R=P(t),N=parseFloat(R.fontSize)||16,W=parseFloat(R.lineHeight);Number.isFinite(W)||(W=N*1.5),t.getBoundingClientRect().height<W*1.6&&(e.style.whiteSpace="nowrap",I=!0)}let L=document.createElement("span");L.dataset.snapdomPseudo=l,L.style.pointerEvents="none",I&&(L.style.whiteSpace="nowrap");let z=ce(c),Q=(P(t).display||"").toLowerCase(),ct=Q.includes("flex")||Q.includes("grid");if(ct){let R=z["min-width"];(!R||R==="auto"||R==="0px")&&(z["min-width"]="0px")}let mt=vt(z,"span",v,ct);if(n.styleMap.set(L,mt),S&&p&&p.length===1){let{dataUrl:R,width:N,height:W}=await qn(p,b,x,y,w),B=document.createElement("img");B.src=R,B.style=`height:${y}px;width:${N/W*y}px;object-fit:contain;`,L.appendChild(B),e.dataset.snapdomHasIcon="true"}else if(p&&p.startsWith("url(")){let R=ht(p);if(R?.trim())try{let N=await H(dt(R),{as:"dataURL",useProxy:o.useProxy});if(N?.ok&&typeof N.data=="string"){let W=document.createElement("img");W.src=N.data,W.style=`width:${y}px;height:auto;object-fit:contain;`,L.appendChild(W)}}catch(N){console.error(`[snapdom] Error in pseudo ${l} for`,t,N)}}else!S&&v&&(L.textContent=p);L.style.backgroundImage="none","maskImage"in L.style&&(L.style.maskImage="none"),"webkitMaskImage"in L.style&&(L.style.webkitMaskImage="none");try{L.style.backgroundRepeat=c.backgroundRepeat,L.style.backgroundSize=c.backgroundSize,c.backgroundPositionX&&c.backgroundPositionY?(L.style.backgroundPositionX=c.backgroundPositionX,L.style.backgroundPositionY=c.backgroundPositionY):L.style.backgroundPosition=c.backgroundPosition,L.style.backgroundOrigin=c.backgroundOrigin,L.style.backgroundClip=c.backgroundClip,L.style.backgroundAttachment=c.backgroundAttachment,L.style.backgroundBlendMode=c.backgroundBlendMode}catch{}if(k)try{let R=kt(m),N=await Promise.all(R.map(yt));L.style.backgroundImage=N.join(", ")}catch(R){console.warn(`[snapdom] Failed to inline background-image for ${l}`,R)}M&&(L.style.backgroundColor=g);let Kt=L.childNodes.length>0||L.textContent?.trim()!==""||k||M||$||F||G;if(h&&h.length&&t.parentElement){let R=Lt.get(t.parentElement)||new Map,N=je(t,i),W=qe(t,P(t,l),N);for(let{name:B}of h){if(!B)continue;let et=W.get(t,B);R.set(B,et)}Lt.set(t.parentElement,R)}if(!Kt)continue;l==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(L,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(L))}catch(c){console.warn(`[snapdom] Failed to capture ${l} for`,t,c)}let a=Array.from(e.children).filter(l=>!l.dataset.snapdomPseudo);if(n.nodeMap)for(let l of a){let c=n.nodeMap.get(l);c instanceof Element&&await we(c,l,n,o)}else{let l=Array.from(t.children);for(let c=0;c<Math.min(l.length,a.length);c++)await we(l[c],a[c],n,o)}}function uo(t,e){if(!t||!(t instanceof Element))return;let n=t.ownerDocument||document,o=e||n,r=t instanceof SVGSVGElement?[t]:Array.from(t.querySelectorAll("svg"));if(r.length===0)return;let s=/url\(\s*#([^)]+)\)/g,i=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],a=w=>window.CSS&&CSS.escape?CSS.escape(w):w.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),l="http://www.w3.org/1999/xlink",c=w=>{if(!w||!w.getAttribute)return null;let C=w.getAttribute("href")||w.getAttribute("xlink:href")||(typeof w.getAttributeNS=="function"?w.getAttributeNS(l,"href"):null);if(C)return C;let S=w.attributes;if(!S)return null;for(let v=0;v<S.length;v++){let k=S[v];if(!k||!k.name)continue;if(k.name==="href")return k.value;let M=k.name.indexOf(":");if(M!==-1&&k.name.slice(M+1)==="href")return k.value}return null},f=new Set(Array.from(t.querySelectorAll("[id]")).map(w=>w.id)),u=new Set,d=!1,p=(w,C=null)=>{if(!w)return;s.lastIndex=0;let S;for(;S=s.exec(w);){d=!0;let v=(S[1]||"").trim();v&&(f.has(v)||(u.add(v),C&&!C.has(v)&&C.add(v)))}},h=w=>{let C=w.querySelectorAll("use");for(let k of C){let M=c(k);if(!M||!M.startsWith("#"))continue;d=!0;let $=M.slice(1).trim();$&&!f.has($)&&u.add($)}let v=w.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let k of v){p(k.getAttribute("style")||"");for(let M of i)p(k.getAttribute(M))}};for(let w of r)h(w);if(!d)return;let m=t.querySelector("svg.inline-defs-container");m||(m=n.createElementNS("http://www.w3.org/2000/svg","svg"),m.classList.add("inline-defs-container"),m.setAttribute("aria-hidden","true"),m.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(m,t.firstChild||null));let g=m.querySelector("defs")||null,b=w=>{if(!w||f.has(w))return null;let C=a(w),S=v=>{let k=o.querySelector(v);return k&&!t.contains(k)?k:null};return S(`svg defs > *#${C}`)||S(`svg > symbol#${C}`)||S(`*#${C}`)};if(!u.size)return;let y=new Set(u),x=new Set;for(;y.size;){let w=y.values().next().value;if(y.delete(w),!w||f.has(w)||x.has(w))continue;let C=b(w);if(!C){x.add(w);continue}g||(g=n.createElementNS("http://www.w3.org/2000/svg","defs"),m.appendChild(g));let S=C.cloneNode(!0);S.id||S.setAttribute("id",w),g.appendChild(S),x.add(w),f.add(w);let v=[S,...S.querySelectorAll("*")];for(let k of v){let M=c(k);if(M&&M.startsWith("#")){let F=M.slice(1).trim();F&&!f.has(F)&&!x.has(F)&&y.add(F)}let $=k.getAttribute?.("style")||"";$&&p($,y);for(let F of i){let O=k.getAttribute?.(F);O&&p(O,y)}}}}j();function mo(t){let e=getComputedStyle(t),n=e.outlineStyle,o=e.outlineWidth,r=e.borderStyle,s=e.borderWidth,i=n!=="none"&&parseFloat(o)>0,a=r==="none"||parseFloat(s)===0;if(i&&a){let l=t.style.border;return t.style.border=`${o} solid transparent`,()=>{t.style.border=l}}return()=>{}}function po(t){let e=[];try{let n=t.querySelectorAll("*");for(let o of n){if(!(o instanceof HTMLElement))continue;let r=o.style.contentVisibility||"",s=getComputedStyle(o),i=s.contentVisibility||s.getPropertyValue("content-visibility")||"";(i==="auto"||i==="hidden")&&(e.push({el:o,original:r}),o.style.contentVisibility="visible")}if(t instanceof HTMLElement){let o=getComputedStyle(t),r=o.contentVisibility||o.getPropertyValue("content-visibility")||"";(r==="auto"||r==="hidden")&&(e.push({el:t,original:t.style.contentVisibility||""}),t.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:o}of e)try{n.style.contentVisibility=o}catch{}}}tt();le();function ho(t){return yo(t.boxShadow)}function go(t){return yo(t.textShadow)}function yo(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let l=0;l<t.length;l++){let c=t[l];c==="("?o++:c===")"&&(o=Math.max(0,o-1)),c===","&&o===0?(e.push(n),n=""):n+=c}n.trim()&&e.push(n);let r=0,s=0,i=0,a=0;for(let l of e){if(/\binset\b/i.test(l))continue;let c=l.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(c.length<2)continue;let[f,u,d=0,p=0]=c,h=Math.abs(f)+d+p,m=Math.abs(u)+d+p;s=Math.max(s,h+Math.max(f,0)),a=Math.max(a,h+Math.max(-f,0)),i=Math.max(i,m+Math.max(u,0)),r=Math.max(r,m+Math.max(-u,0))}return{top:Math.ceil(r),right:Math.ceil(s),bottom:Math.ceil(i),left:Math.ceil(a)}}function bo(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,r;for(;r=n.exec(e);)o+=parseFloat(r[1])||0;let s=Math.ceil(o);return{top:s,right:s,bottom:s,left:s}}function wo(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,o=e+Math.max(0,Math.ceil(n));return{top:o,right:o,bottom:o,left:o}}function xo(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)||[],o=0,r=0,s=0,i=0,a=!1;for(let l of n){a=!0;let c=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(m=>parseFloat(m))||[],[f=0,u=0,d=0]=c,p=Math.abs(f)+d,h=Math.abs(u)+d;r=Math.max(r,p+Math.max(f,0)),i=Math.max(i,p+Math.max(-f,0)),s=Math.max(s,h+Math.max(u,0)),o=Math.max(o,h+Math.max(-u,0))}return{bleed:{top:E(o),right:E(r),bottom:E(s),left:E(i)},has:a}}function So(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 o=n.transform||"none";if(!o||o==="none"){let a=null;try{a=Pt(t).scale}catch{}try{e.style.transform="none"}catch{}if(!a)return{a:1,b:0,c:0,d:1};let l=a.trim().split(/\s+/).map(parseFloat),c=Number.isFinite(l[0])?l[0]:1,f=Number.isFinite(l[1])?l[1]:c;return{a:c,b:0,c:0,d:f}}function r(a,l,c,f){let u=Math.sqrt(a*a+l*l)||0,d=0,p=0;if(u>0){let h=a/u,m=l/u;d=h*c+m*f;let g=c-h*d,b=f-m*d;p=Math.sqrt(g*g+b*b)||0,p>0?d=d/p:d=0}return{a:u,b:0,c:d*p,d:p}}let s=o.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let a=s[1].split(",").map(l=>parseFloat(l.trim()));if(a.length===6&&a.every(Number.isFinite)){let[l,c,f,u]=a,d=r(l,c,f,u);try{e.style.transform=`matrix(${d.a}, ${d.b}, ${d.c}, ${d.d}, 0, 0)`}catch{}return d}}let i=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(i){let a=i[1].split(",").map(l=>parseFloat(l.trim()));if(a.length===16&&a.every(Number.isFinite)){let l=a[0],c=a[1],f=a[4],u=a[5],d=r(l,c,f,u);try{e.style.transform=`matrix(${d.a}, ${d.b}, ${d.c}, ${d.d}, 0, 0)`}catch{}return d}}try{let a=new DOMMatrix(o),l=r(a.a,a.b,a.c,a.d);try{e.style.transform=`matrix(${l.a}, ${l.b}, ${l.c}, ${l.d}, 0, 0)`}catch{}return l}catch{return null}}function Tt(t,e,n,o,r){let s=n.a,i=n.b,a=n.c,l=n.d,c=n.e||0,f=n.f||0;function u(b,y){let x=b-o,w=y-r,C=s*x+a*w,S=i*x+l*w;return C+=o+c,S+=r+f,[C,S]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],p=1/0,h=1/0,m=-1/0,g=-1/0;for(let[b,y]of d)b<p&&(p=b),y<h&&(h=y),b>m&&(m=b),y>g&&(g=y);return{minX:p,minY:h,maxX:m,maxY:g,width:m-p,height:g-h}}function qt(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[r,s]=[o[0]||"0",o[1]||"0"],i=(a,l)=>{let c=a.toLowerCase();return c==="left"||c==="top"?0:c==="center"?l/2:c==="right"||c==="bottom"?l:c.endsWith("px")?parseFloat(c)||0:c.endsWith("%")?(parseFloat(c)||0)*l/100:/^-?\d+(\.\d+)?$/.test(c)&&parseFloat(c)||0};return{ox:i(r,e),oy:i(s,n)}}function Pt(t){let e={rotate:"0deg",scale:null,translate:null},n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null;if(n){let r=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},s=r("rotate");if(s)if(s.angle){let l=s.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit}else s.unit?e.rotate=s.unit==="rad"?s.value*180/Math.PI+"deg":s.value+s.unit:e.rotate=String(s);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let i=r("scale");if(i){let l="x"in i&&i.x?.value!=null?i.x.value:Array.isArray(i)?i[0]?.value:Number(i)||1,c="y"in i&&i.y?.value!=null?i.y.value:Array.isArray(i)?i[1]?.value:l;e.scale=`${l} ${c}`}else{let l=getComputedStyle(t);e.scale=l.scale&&l.scale!=="none"?l.scale:null}let a=r("translate");if(a){let l="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?a[0]?.value:0,c="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?a[1]?.value:0,f="x"in a&&a.x?.unit?a.x.unit:"px",u="y"in a&&a.y?.unit?a.y.unit:"px";e.translate=`${l}${f} ${c}${u}`}else{let l=getComputedStyle(t);e.translate=l.translate&&l.translate!=="none"?l.translate:null}return e}let o=getComputedStyle(t);return e.rotate=o.rotate&&o.rotate!=="none"?o.rotate:"0deg",e.scale=o.scale&&o.scale!=="none"?o.scale:null,e.translate=o.translate&&o.translate!=="none"?o.translate:null,e}var Xe=null;function Ti(){if(Xe)return Xe;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),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),Xe=t,t}function Co(t){let e=Ti(),n=document.createElement("div");n.style.transformOrigin="0 0",t.baseTransform&&(n.style.transform=t.baseTransform),t.rotate&&(n.style.rotate=t.rotate),t.scale&&(n.style.scale=t.scale),t.translate&&(n.style.translate=t.translate),e.appendChild(n);let o=Pi(n);return e.removeChild(n),o}function Ao(t){let e=P(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 r=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",s=e.scale&&e.scale!=="none"&&e.scale!=="1",i=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(r||s||i)}function Pi(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}function xe(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,r,s,i,a;if(e==="viewport")r=0,s=0,i=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")r=(Number(e.x)||0)-(o.scrollX||0),s=(Number(e.y)||0)-(o.scrollY||0),i=Number(e.width),a=Number(e.height);else return null;return i>0&&a>0?{left:r,top:s,width:i,height:a,right:r+i,bottom:s+a}:null}function Ge(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return e instanceof ShadowRoot?e.host:null}function Ni(t,e){for(let n=e;n;n=Ge(n))if(n===t)return!0;return!1}function Ii(t,e){for(let n=Ge(t);n&&n!==e&&n instanceof Element;n=Ge(n)){let o=P(n);if(o.position!=="static"||o.transform&&o.transform!=="none"||o.filter&&o.filter!=="none"||o.backdropFilter&&o.backdropFilter!=="none"||o.perspective&&o.perspective!=="none"||/transform|perspective|filter/.test(o.willChange||"")||/layout|paint|strict|content/.test(o.contain||""))return n}return null}function Ke(t,e){try{let n=new DOMMatrix;if(e&&e.rotate&&e.rotate!=="0deg"&&(n=n.multiply(new DOMMatrix(`rotate(${e.rotate})`))),e&&e.scale){let o=String(e.scale).trim().split(/\s+/).filter(Boolean);o.length&&o.every(r=>Number.isFinite(Number(r)))&&(n=n.multiply(new DOMMatrix(`scale(${o.join(",")})`)))}return t&&(n=n.multiply(new DOMMatrix(t))),n}catch{return null}}function Mo(t,e,n,o,r){let s=t.getBoundingClientRect();e instanceof HTMLElement&&P(t).position==="static"&&(e.style.position="relative");let i=[];for(let[a,l]of n){if(!(a instanceof HTMLElement)||!(l instanceof Element)||l===t||!Ni(t,l))continue;let c=o.get(l)||P(l),f=c.position;if(f!=="fixed"&&f!=="sticky"&&f!=="-webkit-sticky"||a.style.position==="absolute")continue;let u=l.getBoundingClientRect();if(!(u.width>0&&u.height>0))continue;let d=c.transform&&c.transform!=="none"?c.transform:"",p=Pt(l),h=!!(d||p.rotate!=="0deg"||p.scale||p.translate),m=h?Ke(d,p):null,g=!m||!m.is2D||m.a===1&&m.b===0&&m.c===0&&m.d===1,b=u.width,y=u.height;g||(b=l.offsetWidth||u.width,y=l.offsetHeight||u.height);let x=l.getRootNode&&l.getRootNode()instanceof ShadowRoot,w=s,C=t.clientLeft||0,S=t.clientTop||0;if(x){let F=Ii(l,t);F&&(w=F.getBoundingClientRect(),C=F.clientLeft||0,S=F.clientTop||0)}let v=u.left-w.left-C,k=u.top-w.top-S;if(h)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",g)a.style.transform="none";else{a.style.transform=`matrix(${m.a},${m.b},${m.c},${m.d},0,0)`;let{ox:F,oy:O}=qt(c,b,y),G=Tt(b,y,{a:m.a,b:m.b,c:m.c,d:m.d,e:0,f:0},F,O);v-=G.minX,k-=G.minY}if(f!=="fixed"){let F=a.cloneNode(!1);F.setAttribute("data-snap-ph","1"),F.style.position="static",F.style.visibility="hidden",F.style.width=`${b}px`,F.style.height=`${y}px`,F.style.boxSizing="border-box",a.parentElement?.insertBefore(F,a)}let M=b+2,$=y;r&&(Math.abs(k-r.y)<.5&&(k-=1,$+=1),Math.abs(v-r.x)<.5&&(v-=1,M+=1)),a.style.position="absolute",a.style.left=`${v}px`,a.style.top=`${k}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${M}px`,a.style.height=`${$}px`,a.style.boxSizing="border-box",x||i.push(a)}for(let a of i)e.appendChild(a)}function Eo(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(i){T(n,"stripRootShadows boxShadow",i)}try{e.style.textShadow="none"}catch(i){T(n,"stripRootShadows textShadow",i)}try{e.style.outline="none"}catch(i){T(n,"stripRootShadows outline",i)}let s=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=s.length?s:"none"}catch(i){T(n,"stripRootShadows filter",i)}}function vo(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",o=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||o!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function _i(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let r of o){if(r.nodeType===Node.TEXT_NODE){if(/\S/.test(r.textContent||""))return null;continue}if(r.nodeType!==Node.ELEMENT_NODE)continue;let s=getComputedStyle(r),i=String(s.display||"");if(!(i==="none"||i==="contents")&&!(s.position==="absolute"||s.position==="fixed"))return s.float&&s.float!=="none"||i.startsWith("inline")?null:r}return null}function $o(t,e){if(!t||!e||!e.style)return;let n=getComputedStyle(t);if(!vo(n))for(let o of["top","bottom"]){let r=o==="top"?"Top":"Bottom";if((parseFloat(n[`border${r}Width`])||0)>0||(parseFloat(n[`padding${r}`])||0)>0)continue;let s=t,i=e;for(;s&&i;){let a=_i(s,o);if(!a)break;let l=Array.from(s.children).indexOf(a),c=l>=0?i.children[l]:null,f=getComputedStyle(a),u=parseFloat(f[`margin${r}`])||0;if(c&&c.style&&u>0&&(c.style[`margin${r}`]="0px"),vo(f)||(parseFloat(f[`border${r}Width`])||0)>0||(parseFloat(f[`padding${r}`])||0)>0)break;s=a,i=c}}}function Wi(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),n=[];for(;e.nextNode();)n.push(e.currentNode);for(let o of n)o.remove()}function Oi(t,e={}){let{stripFrameworkDirectives:n=!0}=e,o=new Set(["xml","xlink"]),r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;r.nextNode();){let s=r.currentNode;for(let i of Array.from(s.attributes)){let a=i.name;if(a.startsWith("*")){s.removeAttribute(a);continue}if(a.includes("@")){s.removeAttribute(a);continue}if(a.includes(":")){let l=a.split(":",1)[0];if(!o.has(l)){s.removeAttribute(a);continue}}if(n&&(a.startsWith("x-")||a.startsWith("v-")||a.startsWith(":")||a.startsWith("on:")||a.startsWith("bind:")||a.startsWith("let:")||a.startsWith("class:"))){s.removeAttribute(a);continue}}}}var ko=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function Bi(t){if(!t)return;let e=r=>{if(r.nodeType===Node.ELEMENT_NODE){if(r.attributes)for(let s of Array.from(r.attributes)){let i=s.value.replace(ko,"");if(i!==s.value)try{r.setAttribute(s.name,i)}catch{}}}else if(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.CDATA_SECTION_NODE){let s=r.data.replace(ko,"");s!==r.data&&(r.data=s)}};e(t);let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),o;for(;o=n.nextNode();)e(o)}function Fo(t,e={}){t&&(Oi(t,e),Wi(t),Bi(t))}function Ui(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}function Di(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function Hi(t,e){if(!(t instanceof Element)||Ui(t)||Di(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let o=e.display||"";return!(o.includes("flex")||o.includes("grid")||o.startsWith("table")||e.transform&&e.transform!=="none")}function Ro(t,e,n=new Map){function o(r,s){if(!(r instanceof Element)||!(s instanceof Element))return;let i=r.childElementCount>s.childElementCount,a=n.get(r)||getComputedStyle(r);if(n.has(r)||n.set(r,a),i&&Hi(r,a)){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 f=a.overflowY||a.overflowBlock||"visible",u=a.overflowX||a.overflowInline||"visible";(f!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let l=Array.from(r.children),c=Array.from(s.children);for(let f=0;f<Math.min(l.length,c.length);f++)o(l[f],c[f])}o(t,e)}function zi(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function Vi(t,e){if(!(t instanceof Element))return!1;if(t.getAttribute("data-capture")==="exclude"&&e?.excludeMode==="remove")return!0;if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(o){T(e,"exclude selector match failed",o)}return!1}function Lo(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),r=1/0,s=-1/0,i=!1,a=Array.from(t.children);for(let p of a){if(Vi(p,e)||!zi(p))continue;let h=p.getBoundingClientRect(),m=h.top-o.top,g=h.bottom-o.top;g<=m||(m<r&&(r=m),g>s&&(s=g),i=!0)}let l=i?Math.max(0,s-r):0,c=parseFloat(n.borderTopWidth)||0,f=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return c+f+u+d+l}var E=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t,ji=/::-webkit-scrollbar(-[a-z]+)?\b/i;function Ye(t,e=new Set){let n="";if(!t)return n;for(let o=0;o<t.length;o++){let r=t[o];try{if(r.type===CSSRule.IMPORT_RULE&&r.styleSheet){n+=Ye(r.styleSheet.cssRules,e);continue}if(r.type===CSSRule.MEDIA_RULE&&r.cssRules){let s=Ye(r.cssRules,e);s&&(n+=`@media ${r.conditionText}{${s}}`);continue}if(r.type===CSSRule.STYLE_RULE){let s=r.selectorText||"";if(ji.test(s)){let i=r.cssText;i&&!e.has(i)&&(e.add(i),n+=i)}}}catch{}}return n}function To(t){if(!t||!t.styleSheets)return"";let e=new Set,n="";for(let o of Array.from(t.styleSheets))try{let r=o.cssRules;r&&(n+=Ye(r,e))}catch{}return n}async function Po(t,e={}){let n={styleMap:A.session.styleMap,styleCache:A.session.styleCache,nodeMap:A.session.nodeMap,options:e},o=null;if(e.clip){let u=xe(t,e.clip);if(u){n.clip={rect:u,root:t};let d=t.getBoundingClientRect();o={x:u.left-d.left,y:u.top-d.top,width:u.width,height:u.height}}}let r,s="",i="",a=mo(t),l=n.clip?()=>{}:po(t);try{r=await jt(t,n,e)}catch(u){throw console.warn("deepClone failed:",u),u}finally{l(),a()}try{uo(r)}catch(u){console.warn("inlineExternal defs or symbol failed:",u)}try{await we(t,r,n,e)}catch(u){console.warn("inlinePseudoElements failed:",u)}await On(r,n);try{let u=r.querySelectorAll("style[data-sd]");for(let d of u)i+=d.textContent||"",d.remove()}catch(u){T(n,"Failed to extract shadow CSS from style[data-sd]",u)}let c=Ie(n.styleMap);s=Array.from(c.entries()).map(([u,d])=>`.${d}{${u}}`).join(""),s=i+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+s;for(let[u,d]of n.styleMap.entries()){if(u.tagName==="STYLE")continue;if(u.getRootNode&&u.getRootNode()instanceof ShadowRoot){u.setAttribute("style",d.replace(/;/g,"; "));continue}let p=c.get(d);p&&u.classList.add(p);let h=u.style?.backgroundImage,m=u.dataset?.snapdomHasIcon;h&&h!=="none"&&(u.style.backgroundImage=h),m&&(u.style.verticalAlign="middle",u.style.display="inline")}if((n.clip||t.scrollTop||t.scrollLeft)&&r instanceof Element)try{let u=n.clip&&o?{x:o.x,y:o.y}:{x:0,y:0};Mo(t,r,n.nodeMap,n.styleCache,u)}catch(u){T(n,"freezeViewportPositioned failed",u)}for(let[u,d]of n.nodeMap.entries()){if(n.clip&&d===t)continue;let p=d.scrollLeft,h=d.scrollTop;if((p||h)&&u instanceof HTMLElement){u.style.overflow="hidden",u.style.scrollbarWidth="none",u.style.msOverflowStyle="none";try{let b=u.querySelectorAll("*");for(let y of b){if(!(y instanceof HTMLElement))continue;let x=y.style.position;if(x==="fixed"||x==="absolute"){let w=parseFloat(y.style.top)||0,C=parseFloat(y.style.left)||0;y.style.top=`${w+h}px`,y.style.left=`${C+p}px`,x==="fixed"&&(y.style.position="absolute")}}}catch{}let g=document.createElement("div");for(g.style.all="unset",g.style.transform=`translate(${-p}px, ${-h}px)`,g.style.willChange="transform",g.style.display="inline-block",g.style.width="100%";u.firstChild;)g.appendChild(u.firstChild);u.appendChild(g)}}if(t===n.nodeMap.get(r)){let u=n.styleCache.get(t)||P(t);n.styleCache.set(t,u);let d=$e(u.transform);r.style.margin="0",r.style.top="auto",r.style.left="auto",r.style.right="auto",r.style.bottom="auto",r.style.animation="none",r.style.transition="none",r.style.willChange="auto",r.style.float="none",r.style.clear="none",r.style.transform=d||""}for(let[u,d]of n.nodeMap.entries())d.tagName==="PRE"&&(u.style.marginTop="0",u.style.marginBlockStart="0");return{clone:r,classCSS:s,styleCache:n.styleCache,clipWindow:o}}gt();j();var No="http://www.w3.org/1999/xlink";function qi(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(No,"href"):null)}function Xi(t){let e=parseInt(t.dataset?.snapdomWidth||"",10)||0,n=parseInt(t.dataset?.snapdomHeight||"",10)||0,o=parseInt(t.getAttribute("width")||"",10)||0,r=parseInt(t.getAttribute("height")||"",10)||0,s=parseFloat(t.style?.width||"")||0,i=parseFloat(t.style?.height||"")||0,a=e||s||o||t.width||t.naturalWidth||100,l=n||i||r||t.height||t.naturalHeight||100;return{width:a,height:l}}async function Io(t,e={}){let n=Array.from(t.querySelectorAll("img")),o=async a=>{if(!a.getAttribute("src")){let h=a.currentSrc||a.src||"";h&&a.setAttribute("src",h)}a.removeAttribute("srcset"),a.removeAttribute("sizes");let l=a.src||"";if(!l)return;let c=A.image?.get(l);if(c){a.src=c,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let f=await H(l,{as:"dataURL",useProxy:e.useProxy});if(f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")){A.image?.set(l,f.data),a.src=f.data,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=Xi(a),{fallbackURL:p}=e||{};if(p)try{let h=typeof p=="function"?await p({width:u,height:d,src:l,element:a}):p;if(h){let m=await H(h,{as:"dataURL",useProxy:e.useProxy});if(m?.ok&&typeof m.data=="string"){a.src=m.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){let h=document.createElement("div");h.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),h.textContent="img",a.replaceWith(h)}else{let h=document.createElement("div");h.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(h)}},r=6;for(let a=0;a<n.length;a+=r){let l=n.slice(a,a+r).map(o);await Promise.allSettled(l)}let s=Array.from(t.querySelectorAll("image")),i=async a=>{let l=qi(a);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let c=await H(l,{as:"dataURL",useProxy:e.useProxy});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(a.setAttribute("href",c.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(No,"href"))};for(let a=0;a<s.length;a+=r){let l=s.slice(a,a+r).map(i);await Promise.allSettled(l)}}tt();j();async function Se(t,e,n,o={}){let r=[[t,e]],s=["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"],i=["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"],a=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],l=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;r.length;){let[c,f]=r.shift();if(!f)continue;let u=n.get(c)||P(c);n.has(c)||n.set(c,u);let d=(()=>{let g=u.getPropertyValue("border-image"),b=u.getPropertyValue("border-image-source");return g&&g!=="none"||b&&b!=="none"})(),p=u.getPropertyValue("background-image"),h=u.getPropertyValue("background-color");if(p&&p!=="none"||h&&h!=="rgba(0, 0, 0, 0)"&&h!=="transparent"||/url\s*\(|gradient\s*\(/i.test(u.getPropertyValue("background")||""))for(let g of a){let b=u.getPropertyValue(g);b&&f.style.setProperty(g,b)}for(let g of s){let b=u.getPropertyValue(g);if(g==="background-image"&&(!b||b==="none")){let w=u.getPropertyValue("background");w&&/url\s*\(/.test(w)&&(b=kt(w).filter(C=>/url\s*\(/.test(C)).join(", ")||b)}if(!b||b==="none")continue;let y=kt(b),x=await Promise.all(y.map(w=>yt(w,o)));x.some(w=>w&&w!=="none"&&!/^url\(undefined/.test(w))&&f.style.setProperty(g,x.join(", "))}for(let g of i){let b=u.getPropertyValue(g);!b||b==="initial"||f.style.setProperty(g,b)}if(d)for(let g of l){let b=u.getPropertyValue(g);!b||b==="initial"||f.style.setProperty(g,b)}if(c.shadowRoot){let g=Array.from(c.shadowRoot.children).filter(y=>y.tagName!=="STYLE"),b=Array.from(f.children).filter(y=>!y.dataset?.snapdomPseudo&&!(y.tagName==="STYLE"&&y.dataset?.sd));for(let y=0;y<Math.min(g.length,b.length);y++)r.push([g[y],b[y]])}else{let g=A.session.nodeMap;for(let b of f.children){let y=g.get(b);y&&r.push([y,b])}}}}j();tt();function Wo(t,e){let n=A.session.nodeMap,o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=r.currentNode;a;a=r.nextNode()){let l=n.get(a);if(!(l instanceof Element))continue;let c=P(l),f=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");f&&f!=="none"&&a!==e&&o.push({cloneEl:a,orig:l,bf:f,path:Ki(e,a)})}if(!o.length)return;let s=t.getBoundingClientRect(),i=o.map((a,l)=>{let c=e.cloneNode(!0);Yi(c,e,a.orig.getBoundingClientRect(),n),Qi(_o(c,a.path));for(let f=0;f<l;f++){let u=_o(c,o[f].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:c}});for(let{cloneEl:a,orig:l,bf:c,copy:f}of i)Gi(a,l,c,f,s)}function Gi(t,e,n,o,r){let s=e.getBoundingClientRect();if(!s.width||!s.height)return;let i=P(e),a=e.offsetWidth?s.width/e.offsetWidth:1,l=Math.abs(a-1)>.001?1/a:1;o.style.position="absolute",o.style.left=`${(r.left-s.left)*l}px`,o.style.top=`${(r.top-s.top)*l}px`,o.style.width=`${r.width}px`,o.style.height=`${r.height}px`,o.style.margin="0",o.style.filter=n,l!==1&&(o.style.transform=`scale(${l})`,o.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(o);let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",f.style.backgroundColor=i.backgroundColor,f.style.backgroundImage=t.style.backgroundImage||i.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])f.style.setProperty(u,i.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"),i.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(f),t.prepend(c)}var Ce=128;function Yi(t,e,n,o){let r=[[t,e]];for(;r.length;){let[s,i]=r.pop(),a=o.get(i);if(a instanceof Element){let f=a.getBoundingClientRect();(f.left>n.right+Ce||f.right<n.left-Ce||f.top>n.bottom+Ce||f.bottom<n.top-Ce)&&(s.tagName==="IMG"&&s.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),s.style&&(s.style.backgroundImage="none"))}let l=s.children,c=i.children;for(let f=0;f<l.length;f++)r.push([l[f],c[f]])}}function Ki(t,e){let n=[];for(let o=e;o!==t;o=o.parentElement){if(!o?.parentElement)return null;n.push([...o.parentElement.children].indexOf(o))}return n.reverse()}function _o(t,e){if(!e)return null;let n=t;for(let o of e)if(n=n.children[o],!n)return null;return n}function Qi(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}}tt();j();function Oo(t,e){if(!t)return()=>{};let n=[],o=200;function r(s){if(e){let c=s.getBoundingClientRect();if(c.width>0||c.height>0){let f=Math.max(c.right,c.left+(s.scrollWidth||0)),u=Math.max(c.bottom,c.top+(s.scrollHeight||0));if(f<e.left-o||c.left>e.right+o||u<e.top-o||c.top>e.bottom+o)return}}let i=getComputedStyle(s),a=Ji(s,i);a&&n.push(a);let l=Zi(s,i);l&&n.push(l);for(let c of s.children||[])r(c)}return r(t),()=>n.forEach(s=>s())}function Ji(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=ts(e);if(n<=0)return()=>{};if(!Bo(t))return()=>{};let o=t.textContent??"",r=o,s=ns(e);t.textContent="X";let i=t.scrollHeight-s;t.textContent=o;let a=i>0?i:es(e),l=Math.round(a*n+s);if(t.scrollHeight<=l+.5)return()=>{};let c=0,f=o.length,u=-1;for(;c<=f;){let d=c+f>>1;t.textContent=o.slice(0,d)+"\u2026",t.scrollHeight<=l+.5?(u=d,c=d+1):f=d-1}return t.textContent=(u>=0?o.slice(0,u):"")+"\u2026",()=>{t.textContent=r}}function Zi(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(!Bo(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=t.textContent??"",o=n,r=0,s=n.length,i=-1;for(;r<=s;){let a=r+s>>1;t.textContent=n.slice(0,a)+"\u2026",t.scrollWidth<=t.clientWidth+.5?(i=a,r=a+1):s=a-1}return t.textContent=(i>=0?n.slice(0,i):"")+"\u2026",()=>{t.textContent=o}}function ts(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 es(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 ns(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function Bo(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Xt=[];function Ae(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 Uo(...t){let e=t.flat();for(let n of e){let o=Ae(n);o&&(Xt.some(r=>r&&r.name&&o.name&&r.name===o.name)||Xt.push(o))}}function Do(t){return t&&Array.isArray(t.plugins)?t.plugins:Xt}async function st(t,e,n){let o=n,r=Do(e);for(let s of r){let i=s&&typeof s[t]=="function"?s[t]:null;if(!i)continue;let a=await i(e,o);typeof a<"u"&&(o=a)}return o}async function Ho(t,e,n){let o=[],r=Do(e);for(let s of r){let i=s&&typeof s[t]=="function"?s[t]:null;if(!i)continue;let a=await i(e,n);typeof a<"u"&&o.push(a)}return o}function os(t){let e=[];if(Array.isArray(t))for(let n of t){let o=Ae(n);if(!o||!o.name)continue;let r=e.findIndex(s=>s&&s.name===o.name);r>=0&&e.splice(r,1),e.push(o)}for(let n of Xt)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function zo(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=os(e)),t}function Vo(){return Xt.slice()}function bt(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(t)&&t.length<200)}function rs(t,e){return!t||!(t instanceof Element)?!1:t.querySelector("picture")?!0:e?!!t.querySelector("img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]"):!1}function is(t,e){let n=t.currentSrc||"";if(n&&!bt(n))return n;let o=e.querySelectorAll("source[srcset]"),r=null;for(let s of o){let i=s.getAttribute("srcset");if(!i||bt(i))continue;let a=s.getAttribute("media");if(a)try{if(window.matchMedia(a).matches)return i.split(",")[0].trim().split(/\s+/)[0]}catch{}r||(r=i.split(",")[0].trim().split(/\s+/)[0])}return r}function ss(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let o of e)if(o&&!bt(o))return o;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let o=n.split(",")[0].trim().split(/\s+/)[0];if(o&&!bt(o))return o}return null}function as(t={}){let e=t.pictureResolver&&typeof t.pictureResolver=="object"?t.pictureResolver:{};return{timeout:e.timeout??5e3,concurrency:e.concurrency??4,resolveLazySrc:e.resolveLazySrc!==!1,silent:e.silent??!1,useProxy:typeof t.useProxy=="string"?t.useProxy:""}}async function jo(t,e={}){if(!t||!(t instanceof Element)||e.resolvePicturePlaceholders===!1)return null;let{timeout:n,concurrency:o,resolveLazySrc:r,silent:s,useProxy:i}=as(e);if(!rs(t,r))return null;let a=[],l=[];async function c(d){let p=new AbortController,h=setTimeout(()=>p.abort(),n);try{let m=await fetch(d,{credentials:"include",signal:p.signal});if(!m.ok&&i){let b=i.includes("{url}")?i.replace("{url}",encodeURIComponent(d)):i.endsWith("?")?`${i}${encodeURIComponent(d)}`:`${i}${i.includes("?")?"&":"?"}url=${encodeURIComponent(d)}`;m=await fetch(b,{signal:p.signal})}if(!m.ok)return null;let g=await m.blob();return await new Promise((b,y)=>{let x=new FileReader;x.onload=()=>b(x.result),x.onerror=y,x.readAsDataURL(g)})}catch{return null}finally{clearTimeout(h)}}async function f(d){for(let p=0;p<d.length;p+=o){let h=d.slice(p,p+o);await Promise.allSettled(h.map(m=>m()))}}let u=t.querySelectorAll("picture");for(let d of u){let p=d.querySelector("img");if(!p)continue;let h=p.getAttribute("src")||"";if(!bt(h))continue;let m=is(p,d);m&&l.push(async()=>{let g=await c(m);if(!g){s||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${m.slice(0,60)}`);return}let b=p.getAttribute("src"),y=p.getAttribute("srcset"),x=p.getAttribute("sizes"),w=[];p.src=g,p.setAttribute("src",g),p.removeAttribute("srcset"),p.removeAttribute("sizes");let C=d.querySelectorAll("source");for(let S of C)w.push({el:S,parent:S.parentElement,next:S.nextSibling}),S.remove();a.push(()=>{b!==null?p.setAttribute("src",b):p.removeAttribute("src"),y!==null&&p.setAttribute("srcset",y),x!==null&&p.setAttribute("sizes",x);for(let{el:S,parent:v,next:k}of w)v&&v.insertBefore(S,k)})})}if(r){let d=t.querySelectorAll("img");for(let p of d){if(p.closest("picture")&&bt(p.getAttribute("src")||""))continue;let h=p.getAttribute("src")||"",m=ss(p);m&&bt(h)&&l.push(async()=>{let g=await c(m);if(!g)return;let b=p.getAttribute("src");p.src=g,p.setAttribute("src",g),p.removeAttribute("srcset"),p.removeAttribute("sizes"),a.push(()=>{b!==null?p.setAttribute("src",b):p.removeAttribute("src")})})}}return l.length===0?null:(await f(l),async function(){for(let p of a)try{p()}catch{}})}j();var cs=.92,ls=.95;async function fs(t){let e=new Image;if(e.decoding="sync",e.src=t,typeof e.decode=="function")try{return await e.decode(),e}catch{}return await new Promise((n,o)=>{e.onload=()=>n(),e.onerror=o}),e}function us(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}async function Qe(t,e,n){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;let o;try{o=await fs(t)}catch{return null}let r=o.naturalWidth||o.width,s=o.naturalHeight||o.height;if(!r||!s)return null;let i=Math.min(1,Math.max(e/r,n/s));if(!(i>0)||i>=.95)return null;let a=i*ls,l=Math.max(1,Math.round(r*a)),c=Math.max(1,Math.round(s*a)),f=document.createElement("canvas");f.width=l,f.height=c;let u=f.getContext("2d");if(!u)return null;u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",u.drawImage(o,0,0,l,c);let d=us(t),p=d==="image/jpeg"?"image/jpeg":d==="image/webp"?"image/webp":"image/png";try{let h=f.toDataURL(p,cs);if(typeof h=="string"&&h.startsWith("data:image")&&h.length<t.length)return h}catch{}return null}async function ds(t,e){if(!e.compress)return{count:0,before:0,after:0};let n=(e.scale||1)*(e.dpr||1),o=Array.from(t.querySelectorAll("img")),r=0,s=0,i=0,a=async c=>{let f=c.getAttribute("src")||"";if(!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let u=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,d=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!u||!d)return;let p=await Qe(f,u*n,d*n);p&&(r++,s+=f.length,i+=p.length,c.setAttribute("src",p))},l=6;for(let c=0;c<o.length;c+=l)await Promise.allSettled(o.slice(c,c+l).map(a));return{count:r,before:s,after:i}}function ms(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function ps(t,e){if(!e.compress)return{count:0};let n=(e.scale||1)*(e.dpr||1),o=A.session.nodeMap,r=[],s=[t,...t.querySelectorAll("*")];for(let c of s){let f=c.style&&c.style.backgroundImage;f&&f.includes("data:image")&&r.push(c)}let i=0,a=async c=>{let f=o.get(c);if(!f||!f.isConnected)return;let u;try{u=getComputedStyle(f)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(w=>w.trim()!=="no-repeat"))return;let{w:p,h}=ms(f);if(!p||!h)return;let m=p*n,g=h*n,b=c.style.backgroundImage,y=[...b.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],x=b;for(let w of y){let C=w[2];if(C.startsWith("data:image/svg"))continue;let S=await Qe(C,m,g);S&&(x=x.split(C).join(S),i++)}x!==b&&(c.style.backgroundImage=x)},l=6;for(let c=0;c<r.length;c+=l)await Promise.allSettled(r.slice(c,c+l).map(a));return{count:i}}async function hs(t,e){if(!e.compress)return{count:0};let n=(e.scale||1)*(e.dpr||1),o=Array.from(t.querySelectorAll("image")),r=0,s=async a=>{let l=a.getAttribute("href")||(typeof a.getAttributeNS=="function"?a.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!l||!l.startsWith("data:image")||l.startsWith("data:image/svg"))return;let c=parseFloat(a.getAttribute("width"))||0,f=parseFloat(a.getAttribute("height"))||0;if(!c||!f)return;let u=await Qe(l,c*n,f*n);u&&(a.setAttribute("href",u),a.hasAttribute("xlink:href")&&a.setAttribute("xlink:href",u),r++)},i=6;for(let a=0;a<o.length;a+=i)await Promise.allSettled(o.slice(a,a+i).map(s));return{count:r}}async function qo(t,e){e.compress&&(await ds(t,e),await ps(t,e),await hs(t,e))}function gs(t){if(Array.isArray(t.plugins)){for(let e of t.plugins)if(Ae(e)?.name==="picture-resolver")return!0}return Vo().some(e=>e?.name==="picture-resolver")}async function Ze(t,e){if(!t)throw new Error("Element cannot be null or undefined");oe(e.cache);let n=e.fast,o=e.outerTransforms!==!1,r=!!e.outerShadows,s=e.clip?xe(t,e.clip):null,i={element:t,options:e,plugins:e.plugins},a,l,c,f,u="",d="",p,h,m=null;await st("beforeSnap",i);let g=null;e.resolvePicturePlaceholders!==!1&&!gs(e)&&(g=await jo(i.element,i.options)),await st("beforeClone",i);let b=Oo(i.element,s);try{({clone:a,classCSS:l,styleCache:c,clipWindow:f}=await Po(i.element,i.options)),!o&&a&&(m=So(i.element,a)),!r&&a&&Eo(i.element,a,i.options),a&&$o(i.element,a)}finally{b()}if(i={clone:a,classCSS:l,styleCache:c,...i},await st("afterClone",i),g&&await g(),Fo(i.clone),i.options?.excludeMode==="remove")try{Ro(i.element,i.clone,i.styleCache)}catch(S){console.warn("[snapdom] shrink pass failed:",S)}try{await Hn(i.clone,i.element)}catch{}await new Promise(S=>{it(async()=>{await Io(i.clone,i.options),S()},{fast:n})}),await new Promise(S=>{it(async()=>{await Se(i.element,i.clone,i.styleCache,i.options),S()},{fast:n})});try{Wo(i.element,i.clone)}catch(S){console.warn("[snapdom] backdrop-filter emulation failed:",S)}e.compress&&await new Promise(S=>{it(async()=>{await qo(i.clone,i.options),S()},{fast:n})}),e.embedFonts&&await new Promise(S=>{it(async()=>{let v=i.element.ownerDocument||document,k=s?F=>{try{let O=F.getBoundingClientRect();return O.right>=s.left-200&&O.left<=s.right+200&&O.bottom>=s.top-200&&O.top<=s.bottom+200}catch{return!0}}:null,M=$t(i.element,k),$=be(i.element,k);if(X()){let F=new Set(Array.from(M).map(O=>String(O).split("__")[0]).filter(Boolean));await Ft(F,1,v)}u=await ye({required:M,usedCodepoints:$,preCached:!1,exclude:i.options.excludeFonts,localFonts:i.options.localFonts,useProxy:i.options.useProxy,fontStylesheetDomains:i.options.fontStylesheetDomains,doc:v}),S()},{fast:n})});let y=Pe(i.clone).sort(),x=y.join(",");A.baseStyle.has(x)?d=A.baseStyle.get(x):await new Promise(S=>{it(()=>{d=Ne(y),A.baseStyle.set(x,d),S()},{fast:n})});let w=To(i.element?.ownerDocument||document);i={fontsCSS:u,baseCSS:d,scrollbarCSS:w,...i},await st("beforeRender",i),await new Promise(S=>{it(()=>{let v=P(i.element),k=i.element.getBoundingClientRect(),M=Math.max(1,E(i.element.offsetWidth||parseFloat(v.width)||k.width||1)),$=Math.max(1,E(i.element.offsetHeight||parseFloat(v.height)||k.height||1)),F=i.element.ownerDocument||document;if(!f&&(i.element===F.body||i.element===F.documentElement)&&!F.documentElement.hasAttribute("data-sd-pinned")){let q=Math.max(i.element.scrollHeight||0,F.documentElement?.scrollHeight||0,F.body?.scrollHeight||0),Y=Math.max(i.element.scrollWidth||0,F.documentElement?.scrollWidth||0,F.body?.scrollWidth||0);q>0&&($=Math.max($,E(q))),Y>0&&(M=Math.max(M,E(Y)));try{let U=(i.scrollbarCSS||"").length+(i.baseCSS||"").length+(i.fontsCSS||"").length+(i.classCSS||"").length,K=A.measureHints.get(i.element);if(K&&K.cssLen===U&&K.w0===M)K.csh>0&&($=Math.max($,E(K.csh))),K.csw>0&&(M=Math.max(M,E(K.csw)));else{let D=F.createElement("div");D.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+M+"px!important;overflow:visible!important;visibility:hidden!important;";let pt=F.createElement("style");pt.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+i.classCSS,D.appendChild(pt),D.appendChild(i.clone.cloneNode(!0)),F.body.appendChild(D);let ut=D.scrollHeight,Wt=D.scrollWidth;F.body.removeChild(D),A.measureHints.set(i.element,{cssLen:U,w0:M,csh:ut,csw:Wt}),ut>0&&($=Math.max($,E(ut))),Wt>0&&(M=Math.max(M,E(Wt)))}}catch{}}if(i.options?.excludeMode==="remove"){let q=Lo(i.element,i.options);Number.isFinite(q)&&q>0&&($=Math.max(1,Math.min($,E(q+1))))}let G=(q,Y=NaN)=>{let U=typeof q=="string"?parseFloat(q):q;return Number.isFinite(U)?U:Y},at=G(i.options.width),I=G(i.options.height),L=f?E(f.width):M,z=f?E(f.height):$,Q=L,ct=z,mt=Number.isFinite(at),xt=Number.isFinite(I),Kt=z>0?L/z:1;mt&&xt?(Q=Math.max(1,E(at)),ct=Math.max(1,E(I))):mt?(Q=Math.max(1,E(at)),ct=Math.max(1,E(Q/(Kt||1)))):xt&&(ct=Math.max(1,E(I)),Q=Math.max(1,E(ct*(Kt||1))));let R=0,N=0,W=M,B=$;if(f){let q=0,Y=0;if(Je(i.element)){let U=null;if(!o&&m&&Number.isFinite(m.a))U={a:m.a,b:m.b||0,c:m.c||0,d:m.d||1,e:0,f:0};else{let K=Pt(i.element),D=Ke(v.transform&&v.transform!=="none"?v.transform:"",K);D&&D.is2D&&(U={a:D.a,b:D.b,c:D.c,d:D.d,e:0,f:0})}if(U&&!(U.a===1&&U.b===0&&U.c===0&&U.d===1)){let{ox:K,oy:D}=qt(v,M,$),pt=Tt(M,$,U,K,D);q=pt.minX,Y=pt.minY}}R=E(f.x+q),N=E(f.y+Y),W=E(R+f.width),B=E(N+f.height)}else if(!o&&m&&Number.isFinite(m.a)){let q={a:m.a,b:m.b||0,c:m.c||0,d:m.d||1,e:0,f:0},Y=Tt(M,$,q,0,0);R=E(Y.minX),N=E(Y.minY),W=E(Y.maxX),B=E(Y.maxY)}else if(o&&Je(i.element)){let Y=v.transform&&v.transform!=="none"?v.transform:"",U=Pt(i.element),K=Co({baseTransform:Y,rotate:U.rotate||"0deg",scale:U.scale,translate:U.translate}),{ox:D,oy:pt}=qt(v,M,$),ut=K.is2D?K:new DOMMatrix(K.toString()),Wt={a:ut.a,b:ut.b,c:ut.c,d:ut.d,e:0,f:0},ne=Tt(M,$,Wt,D,pt);R=E(ne.minX),N=E(ne.minY),W=E(ne.maxX),B=E(ne.maxY)}let et=ho(v),It=go(v),J=bo(v),St=wo(v),lt=xo(v),Ct=f?{top:0,right:0,bottom:0,left:0}:r?{top:E(Math.max(et.top,It.top)+J.top+St.top+lt.bleed.top),right:E(Math.max(et.right,It.right)+J.right+St.right+lt.bleed.right),bottom:E(Math.max(et.bottom,It.bottom)+J.bottom+St.bottom+lt.bleed.bottom),left:E(Math.max(et.left,It.left)+J.left+St.left+lt.bleed.left)}:{top:J.top,right:J.right,bottom:J.bottom,left:J.left};R=E(R-Ct.left),N=E(N-Ct.top),W=E(W+Ct.right),B=E(B+Ct.bottom);let Qt=Math.max(1,E(W-R)),_t=Math.max(1,E(B-N)),Jt=mt||xt?E(Q/L):1,sr=xt||mt?E(ct/z):1,ar=Math.max(1,E(Qt*Jt)),cr=Math.max(1,E(_t*sr)),an="http://www.w3.org/2000/svg",lr=Je(i.element)?2:0,At=E(lr+(o?0:1)),Zt=Math.ceil(Qt+At*2),te=Math.ceil(_t+At*2),Me=E(-(E(R)-At)),Ee=E(-(E(N)-At)),cn=Math.max(0,Me),ln=Math.max(0,Ee),fn=E(Zt-Math.min(0,Me)),un=E(te-Math.min(0,Ee)),ft=document.createElementNS(an,"foreignObject");ft.setAttribute("x",String(Math.min(0,Me))),ft.setAttribute("y",String(Math.min(0,Ee))),ft.setAttribute("width",String(fn)),ft.setAttribute("height",String(un)),ft.style.overflow="visible";let dn=document.createElement("style"),fr="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";dn.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+fr+i.classCSS,ft.appendChild(dn);let ee=document.createElement("div");ee.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),ee.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${fn}px;height:${un}px`+(cn!==0||ln!==0?`;padding:${ln}px 0 0 ${cn}px !important`:""),ee.appendChild(i.clone),ft.appendChild(ee);let ur=new XMLSerializer().serializeToString(ft),mn=mt||xt;e.meta={w0:L,h0:z,vbW:Zt,vbH:te,targetW:Q,targetH:ct};let dr=!mn||X()?Zt:E(ar+At*2),mr=!mn||X()?te:E(cr+At*2),pr=parseFloat(P(F.documentElement)?.fontSize)||16;h=`<svg xmlns="${an}" width="${dr}" height="${mr}" viewBox="0 0 ${Zt} ${te}" font-size="${pr}px">`+ur+"</svg>",p=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`,i={svgString:h,dataURL:p,...i},S()},{fast:n})}),await st("afterRender",i);let C=document.getElementById("snapdom-sandbox");return C&&C.style.position==="absolute"&&C.remove(),i.dataURL}function Je(t){return Ao(t)}j();function Xo(t={}){let e=t.format??"png";e==="jpg"&&(e="jpeg");let n=pn(t.cache);return{debug:t.debug??!1,fast:t.fast??!0,scale:t.scale??1,exclude:t.exclude??[],excludeMode:t.excludeMode??"hide",filter:t.filter??null,filterMode:t.filterMode??"hide",placeholders:t.placeholders!==!1,embedFonts:t.embedFonts??!1,iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[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:n,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:e,type:t.type??"svg",quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(e)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,clip:t.clip??null,compress:t.compress!==!1,safariWarmupAttempts:Math.min(3,Math.max(1,(t.safariWarmupAttempts??3)|0)),excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1,pictureResolver:t.pictureResolver&&typeof t.pictureResolver=="object"?t.pictureResolver:{}}}Mt();We();tt();gt();j();async function ys(t=document,e={}){let{embedFonts:n=!0,useProxy:o=""}=e,r=e.cache??e.cacheOpt??"full";oe(r);try{await document.fonts?.ready}catch{}try{Le()}catch{}A.session=A.session||{},A.session.styleCache||(A.session.styleCache=new WeakMap),A.image=A.image||new V(100),A.background=A.background||new V(100);try{await Se(t,void 0,A.session.styleCache,{useProxy:o})}catch{}let s=[],i=[];try{if(t&&t.nodeType===1){let l=t.querySelectorAll?Array.from(t.querySelectorAll("*")):[];i=[t,...l],s=[],t.tagName==="IMG"&&t.getAttribute("src")&&s.push(t),s.push(...Array.from(t.querySelectorAll?.("img[src]")||[]))}else t?.querySelectorAll&&(s=Array.from(t.querySelectorAll("img[src]")),i=Array.from(t.querySelectorAll("*")))}catch{}let a=[];for(let l of s){let c=l?.currentSrc||l?.src;if(c&&!A.image.has(c)){let f=Promise.resolve().then(async()=>{let u=await H(c,{as:"dataURL",useProxy:o});u?.ok&&typeof u.data=="string"&&A.image.set(c,u.data)}).catch(()=>{});a.push(f)}}for(let l of i){let c="";try{c=l?.style?.backgroundImage||"",(!c||c==="none")&&(c=P(l).backgroundImage)}catch{}if(c&&c!=="none"){let f=c.match(/url\((?:[^()"']+|"(?:[^"]*)"|'(?:[^']*)')\)/gi)||[];for(let u of f){let d=Promise.resolve().then(()=>yt(u,{...e,useProxy:o})).catch(()=>{});a.push(d)}}}if(n)try{let l=$t(t),c=be(t);if(typeof X=="function"?X():!!X){let u=new Set(Array.from(l).map(d=>String(d).split("__")[0]).filter(Boolean));await Ft(u,3)}await ye({required:l,usedCodepoints:c,exclude:e.excludeFonts,localFonts:e.localFonts,useProxy:e.useProxy??o,fontStylesheetDomains:e.fontStylesheetDomains})}catch{}await Promise.allSettled(a)}function $s(...t){return Uo(...t),_}var _=Object.assign(Rs,{plugins:$s}),ir=Symbol("snapdom.internal"),Fs=Symbol("snapdom.internal.silent"),sn=!1;async function Rs(t,e){if(!t)throw new Error("Element cannot be null or undefined");let n=Xo(e);if(zo(n,e&&e.plugins),X()&&!sn&&(n.embedFonts===!0||Ts(t))){if(n.embedFonts)try{let r=$t(t),s=new Set([...r].map(i=>String(i).split("__")[0]).filter(Boolean));await Ft(s,1)}catch{}let o=n.safariWarmupAttempts??3;for(let r=0;r<o;r++)try{await Ls(t,e)}catch{}}return n.iconFonts&&n.iconFonts.length>0&&Dn(n.iconFonts),n.snap||(n.snap={toPng:(o,r)=>_.toPng(o,r),toSvg:(o,r)=>_.toSvg(o,r)}),_.capture(t,n,ir)}_.capture=async(t,e,n)=>{if(n!==ir)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let o=await Ze(t,e),r={img:async(m,g)=>{let{toImg:b}=await Promise.resolve().then(()=>(nn(),en));return b(o,{...m,...g||{}})},svg:async(m,g)=>{let{toSvg:b}=await Promise.resolve().then(()=>(nn(),en));return b(o,{...m,...g||{}})},canvas:async(m,g)=>{let{toCanvas:b}=await Promise.resolve().then(()=>(Gt(),tr));return b(o,{...m,...g||{}})},blob:async(m,g)=>{let{toBlob:b}=await Promise.resolve().then(()=>(rn(),er));return b(o,{...m,...g||{}})},png:async(m,g)=>{let{rasterize:b}=await Promise.resolve().then(()=>(Yt(),ke));return b(o,{...m,...g||{},format:"png"})},jpeg:async(m,g)=>{let{rasterize:b}=await Promise.resolve().then(()=>(Yt(),ke));return b(o,{...m,...g||{},format:"jpeg"})},webp:async(m,g)=>{let{rasterize:b}=await Promise.resolve().then(()=>(Yt(),ke));return b(o,{...m,...g||{},format:"webp"})},download:async(m,g)=>{let{download:b}=await Promise.resolve().then(()=>(rr(),or));return b(o,{...m,...g||{}})}},s={};for(let m of["img","svg","canvas","blob","png","jpeg","webp"])s[m]=async g=>r[m](e,{...g||{},[Fs]:!0});s.jpg=s.jpeg;let i={...e,export:{url:o},exports:s},a=await Ho("defineExports",i),l=Object.assign({},...a.filter(m=>m&&typeof m=="object").reverse()),c={...r,...l};c.jpeg&&!c.jpg&&(c.jpg=(m,g)=>c.jpeg(m,g));function f(m,g){let b={...e,...g||{}},y=w=>w==="jpeg"||w==="jpg"||w==="webp";return[m,b.format,b.type].map(w=>typeof w=="string"?w.toLowerCase():"").find(y)&&(b.backgroundColor==null||b.backgroundColor==="transparent")&&(b.backgroundColor="#ffffff"),b}let u=!1,d=Promise.resolve();async function p(m,g){let b=async()=>{let y=c[m];if(!y)throw new Error(`[snapdom] Unknown export type: ${m}`);let x=f(m,g),w={...e,export:{type:m,options:x,url:o}};await st("beforeExport",w,{format:m,options:x});let C=await y(w,x);return await st("afterExport",w,{format:m,options:x,result:C}),u||(u=!0,await st("afterSnap",e)),C};return d=d.then(b)}let h={url:o,toRaw:()=>o,to:(m,g)=>p(m,g),toImg:m=>p("img",m),toSvg:m=>p("svg",m),toCanvas:m=>p("canvas",m),toBlob:m=>p("blob",m),toPng:m=>p("png",m),toJpg:m=>p("jpg",m),toWebp:m=>p("webp",m),download:m=>p("download",m)};for(let m of Object.keys(c)){let g="to"+m.charAt(0).toUpperCase()+m.slice(1);h[g]||(h[g]=b=>p(m,b))}return h};_.toRaw=(t,e)=>_(t,e).then(n=>n.toRaw());_.toImg=(t,e)=>_(t,e).then(n=>n.toImg());_.toSvg=(t,e)=>_(t,e).then(n=>n.toSvg());_.toCanvas=(t,e)=>_(t,e).then(n=>n.toCanvas());_.toBlob=(t,e)=>_(t,e).then(n=>n.toBlob());_.toPng=(t,e)=>_(t,{...e,format:"png"}).then(n=>n.toPng());_.toJpg=(t,e)=>_(t,{...e,format:"jpeg"}).then(n=>n.toJpg());_.toWebp=(t,e)=>_(t,{...e,format:"webp"}).then(n=>n.toWebp());_.download=(t,e)=>_(t,e).then(n=>n.download());async function Ls(t,e){if(sn)return;let n={...e,fast:!0,embedFonts:!0,scale:.2},o;try{o=await Ze(t,n)}catch(r){T(e,"safariWarmup pre-capture failed",r)}await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r))),o&&await new Promise(r=>{let s=new Image;try{s.decoding="sync",s.loading="eager"}catch(i){T(e,"safariWarmup img hints failed",i)}s.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",s.src=o,document.body.appendChild(s),(async()=>{try{typeof s.decode=="function"&&await s.decode()}catch(a){T(e,"safariWarmup img.decode failed",a)}let i=performance.now();for(;!(s.complete&&s.naturalWidth>0)&&performance.now()-i<900;)await new Promise(a=>setTimeout(a,200));await new Promise(a=>requestAnimationFrame(a));try{let a=document.createElement("canvas");a.width=Math.max(1,s.naturalWidth||10),a.height=Math.max(1,s.naturalHeight||10);let l=a.getContext("2d");l&&l.drawImage(s,0,0)}catch{}await new Promise(a=>requestAnimationFrame(a));try{s.remove()}catch(a){T(e,"safariWarmup img.remove failed",a)}r()})()}),t.querySelectorAll("canvas").forEach(r=>{try{let s=r.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){T(e,"safariWarmup canvas poke failed",s)}}),sn=!0}function Ts(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();){let n=e.currentNode,o=getComputedStyle(n),r=o.backgroundImage&&o.backgroundImage!=="none",s=o.maskImage&&o.maskImage!=="none"||o.webkitMaskImage&&o.webkitMaskImage!=="none";if(r||s||n.tagName==="CANVAS")return!0}return!1}export{ys as preCache,_ as snapdom};
13
+ ${p}
14
+ `):f+=d[0]}return f+=a.slice(u),f}let i=ar(t,e||location.href);return i=await s(i,e||location.href,0),i}var dr=/url\((["']?)([^"')]+)\1\)/g,Ji=/@font-face[^{}]*\{[^}]*\}/g;function mr(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let o=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let s=o[1],i=o[2],a=c=>{if(!c.includes("?"))return parseInt(c,16);let l=parseInt(c.replace(/\?/g,"0"),16),f=parseInt(c.replace(/\?/g,"F"),16);return[l,f]};if(i){let c=a(s),l=a(i),f=Array.isArray(c)?c[0]:c,u=Array.isArray(l)?l[1]:l;e.push([Math.min(f,u),Math.max(f,u)])}else{let c=a(s);Array.isArray(c)?e.push([c[0],c[1]]):e.push([c,c])}}return e}function pr(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,o]of e)if(n>=r&&n<=o)return!0;return!1}function Ze(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(dr)){let o=(r[2]||"").trim();if(!(!o||o.startsWith("data:"))){if(!/^https?:/i.test(o))try{o=new URL(o,e||location.href).href}catch{}n.push(o)}}return n}async function hr(t,e,n=""){let r=t;for(let o of t.matchAll(dr)){let s=At(o[0]);if(!s)continue;let i=s;if(!i.startsWith("http")&&!i.startsWith("data:"))try{i=new URL(i,e||location.href).href}catch{}if(!it(i)){if(x.resource?.has(i)){x.font?.add(i),r=r.replace(o[0],`url(${x.resource.get(i)})`);continue}try{let a=await V(i,{as:"dataURL",useProxy:n,silent:!0});if(a.ok&&typeof a.data=="string"){let c=a.data;x.resource?.set(i,c),x.font?.add(i),r=r.replace(o[0],`url(${c})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",i)}}}return r}function Zi(t){if(!t.length)return null;let e=(a,c)=>t.some(([l,f])=>!(f<a||l>c)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),o=e(880,1023),s=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":s?"cyrillic":o?"greek":r?"latin-ext":n?"latin":null}function cr(t={}){let e=new Set((t.families||[]).map(o=>String(o).toLowerCase())),n=new Set((t.domains||[]).map(o=>String(o).toLowerCase())),r=new Set((t.subsets||[]).map(o=>String(o).toLowerCase()));return(o,s)=>{if(e.size&&e.has(o.family.toLowerCase()))return!0;if(n.size)for(let i of o.srcUrls)try{if(n.has(new URL(i).host.toLowerCase()))return!0}catch{}if(r.size){let i=Zi(s);if(i&&r.has(i))return!0}return!1}}function ts(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let s of t.match(e)||[]){let i=s.match(/font-family:\s*([^;]+);/i)?.[1]||"",a=Je(i),c=(s.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),l=(s.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),f=(s.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),u=(s.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),d=(s.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),m=Ze(d,location.href),h=m.length?m.map(g=>String(g).toLowerCase()).sort().join("|"):d.toLowerCase(),p=[String(a||"").toLowerCase(),c,l,f,u.toLowerCase(),h].join("|");n.has(p)||(n.add(p),r.push(s))}if(r.length===0)return t;let o=0;return t.replace(e,()=>r[o++]||"")}var lr=new WeakMap,es=0;function ns(t){let e=lr.get(t);return e===void 0&&(e=es++,lr.set(t,e)),e}function rs(t,e,n,r,o,s){let i=Array.from(t||[]).sort().join("|"),a=e?JSON.stringify({families:(e.families||[]).map(d=>String(d).toLowerCase()).sort(),domains:(e.domains||[]).map(d=>String(d).toLowerCase()).sort(),subsets:(e.subsets||[]).map(d=>String(d).toLowerCase()).sort()}):"",c=(n||[]).map(d=>`${(d.family||"").toLowerCase()}::${d.weight||"normal"}::${d.style||"normal"}::${d.src||""}`).sort().join("|"),l=r||"",f=(o||[]).map(d=>String(d).toLowerCase()).sort().join("|"),u=ns(s||document);return`fonts-embed-css::req=${i}::ex=${a}::lf=${c}::px=${l}::fd=${f}::doc=${u}`}async function gr(t,e,n,r){let o;try{o=t.cssRules||[]}catch{return}let s=(i,a)=>{try{return new URL(i,a||location.href).href}catch{return i}};for(let i of o){if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){let a=i.href?s(i.href,e):e;if(r.depth>=ke){console.warn(`[snapDOM] CSSOM import depth exceeded (${ke}) at ${a}`);continue}if(a&&r.visitedSheets.has(a)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${a}`);continue}a&&r.visitedSheets.add(a);let c={...r,depth:(r.depth||0)+1};await gr(i.styleSheet,a,n,c);continue}if(i.type===CSSRule.FONT_FACE_RULE){let a=(i.style.getPropertyValue("font-family")||"").trim(),c=Je(a);if(!c||it(c))continue;let l=(i.style.getPropertyValue("font-weight")||"400").trim(),f=(i.style.getPropertyValue("font-style")||"normal").trim(),u=(i.style.getPropertyValue("font-stretch")||"100%").trim(),d=(i.style.getPropertyValue("src")||"").trim(),m=(i.style.getPropertyValue("unicode-range")||"").trim();if(!r.faceMatchesRequired(c,f,l,u))continue;let h=mr(m);if(!pr(r.usedCodepoints,h))continue;let p={family:c,weightSpec:l,styleSpec:f,stretchSpec:u,unicodeRange:m,srcRaw:d,srcUrls:Ze(d,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(p,h))continue;if(/url\(/i.test(d)){let g=await hr(d,e||location.href,r.useProxy);await n(`@font-face{font-family:${c};src:${g};font-style:${f};font-weight:${l};font-stretch:${u};${m?`unicode-range:${m};`:""}}`)}else await n(`@font-face{font-family:${c};src:${d};font-style:${f};font-weight:${l};font-stretch:${u};${m?`unicode-range:${m};`:""}}`)}}}async function Me({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:o="",fontStylesheetDomains:s=[],doc:i=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let a=new Map;for(let y of t){let[A,b,S,C]=String(y).split("__");if(!A)continue;let k=A.toLowerCase(),v=a.get(k)||[];v.push({w:parseInt(b,10),s:S,st:parseInt(C,10)}),a.set(k,v)}function c(y,A,b,S){let C=String(y).toLowerCase();if(!a.has(C))return!1;let k=a.get(C),v=ji(b),M=qi(A),L=Xi(S),$=v.min!==v.max,T=v.min,B=R=>M.kind==="normal"&&R==="normal"||M.kind!=="normal"&&(R==="italic"||R==="oblique"),W=!1;for(let R of k){let I=$?R.w>=v.min&&R.w<=v.max:R.w===T,rt=B(ve(R.s)),st=R.st>=L.min&&R.st<=L.max;if(I&&rt&&st){W=!0;break}}if(W)return!0;if(!$)for(let R of k){let I=B(ve(R.s)),rt=R.st>=L.min&&R.st<=L.max;if(Math.abs(T-R.w)<=300&&I&&rt)return!0}if(!$&&M.kind==="normal"&&k.some(I=>ve(I.s)!=="normal"))for(let I of k){let rt=Math.abs(T-I.w)<=300,st=I.st>=L.min&&I.st<=L.max;if(rt&&st)return!0}return!1}let l=cr(n),f=rs(t,n,r,o,s,i);if(x.resource?.has(f))return x.resource.get(f);let u=Ki(t),d=[],m=Qe;for(let y of i.querySelectorAll("style")){let A=y.textContent||"";for(let b of A.matchAll(m)){let S=(b[2]||b[4]||"").trim();if(!S||it(S))continue;i.querySelector(`link[rel="stylesheet"][href="${S}"]`)||d.push(S)}}let h=[];d.length&&await Promise.all(d.map(y=>new Promise(A=>{if(i.querySelector(`link[rel="stylesheet"][href="${y}"]`))return A(null);let b=i.createElement("link");b.rel="stylesheet",b.href=y,b.setAttribute("data-snapdom","injected-import"),b.onload=()=>A(b),b.onerror=()=>A(null),i.head.appendChild(b),h.push(b)})));let p="",g=Array.from(i.querySelectorAll('link[rel="stylesheet"]')).filter(y=>!!y.href);for(let y of h)try{y.remove()}catch{}for(let y of g)try{if(it(y.href))continue;let A="",b=!1;try{b=new URL(y.href,location.href).origin===location.origin}catch{}if(!b){let C=Array.isArray(s)?s:[];if(!Yi(y.href,u,C))continue}if(b){let C=Array.from(i.styleSheets).find(k=>k.href===y.href);if(C)try{let k=C.cssRules||[];A=Array.from(k).map(v=>v.cssText).join("")}catch{}}if(!A){let C=await V(y.href,{as:"text",useProxy:o});if(C?.ok&&typeof C.data=="string"&&(A=C.data),it(y.href))continue}A=await Qi(A,y.href,o);let S="";for(let C of A.match(Ji)||[]){let k=(C.match(/font-family:\s*([^;]+);/i)?.[1]||"").trim(),v=Je(k);if(!v||it(v))continue;let M=(C.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),L=(C.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),$=(C.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),T=(C.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),B=(C.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),W=Ze(B,y.href);if(!c(v,L,M,$))continue;let R=mr(T);if(!pr(e,R))continue;let I={family:v,weightSpec:M,styleSpec:L,stretchSpec:$,unicodeRange:T,srcRaw:B,srcUrls:W,href:y.href};if(n&&l(I,R))continue;let rt=/url\(/i.test(B)?await hr(C,y.href,o):C;S+=rt}S.trim()&&(p+=S)}catch{console.warn("[snapDOM] Failed to process stylesheet:",y.href)}let w={requiredIndex:a,usedCodepoints:e,faceMatchesRequired:c,simpleExcluder:n?cr(n):null,useProxy:o,visitedSheets:new Set,depth:0};for(let y of i.styleSheets)if(!(y.href&&g.some(A=>A.href===y.href)))try{let A=y.href||location.origin+"/";A&&w.visitedSheets.add(A),await gr(y,A,async b=>{p+=b},w)}catch{}try{for(let y of i.fonts||[]){if(!y||!y.family||y.status!=="loaded"||!y._snapdomSrc)continue;let A=String(y.family).replace(/^['"]+|['"]+$/g,"");if(it(A)||!a.has(A.toLowerCase())||n?.families&&n.families.some(S=>String(S).toLowerCase()===A.toLowerCase()))continue;let b=y._snapdomSrc;if(!String(b).startsWith("data:")){if(x.resource?.has(y._snapdomSrc))b=x.resource.get(y._snapdomSrc),x.font?.add(y._snapdomSrc);else if(!x.font?.has(y._snapdomSrc))try{let S=await V(y._snapdomSrc,{as:"dataURL",useProxy:o,silent:!0});if(S.ok&&typeof S.data=="string")b=S.data,x.resource?.set(y._snapdomSrc,b),x.font?.add(y._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",y._snapdomSrc);continue}}p+=`@font-face{font-family:'${A}';src:url(${b});font-style:${y.style||"normal"};font-weight:${y.weight||"normal"};}`}}catch{}for(let y of r){if(!y||typeof y!="object")continue;let A=String(y.family||"").replace(/^['"]+|['"]+$/g,"");if(!A||it(A)||!a.has(A.toLowerCase())||n?.families&&n.families.some(M=>String(M).toLowerCase()===A.toLowerCase()))continue;let b=y.weight!=null?String(y.weight):"normal",S=y.style!=null?String(y.style):"normal",C=y.stretchPct!=null?`${y.stretchPct}%`:"100%",k=String(y.src||""),v=k;if(!v.startsWith("data:")){if(x.resource?.has(k))v=x.resource.get(k),x.font?.add(k);else if(!x.font?.has(k))try{let M=await V(k,{as:"dataURL",useProxy:o,silent:!0});if(M.ok&&typeof M.data=="string")v=M.data,x.resource?.set(k,v),x.font?.add(k);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",k);continue}}p+=`@font-face{font-family:'${A}';src:url(${v});font-style:${S};font-weight:${b};font-stretch:${C};}`}return p&&(p=ts(p),x.resource?.set(f,p)),p}function Jt(t,e){let n=new Set,r=new Set;if(!t)return{required:n,usedCodepoints:r};let o=c=>{if(c)for(let l of c)r.add(l.codePointAt(0))},s=c=>{let l=zi(c.fontFamily);if(l.length)for(let f of l)n.add(`${f}__${Ae(c.fontWeight)}__${ve(c.fontStyle)}__${Vi(c.fontStretch)}`)},i=c=>{s(N(c));for(let l of["::before","::after"]){let f=N(c,l),u=f&&f.content;if(!(!u||u==="none"||u==="normal"))if(s(f),/^["']/.test(u))o(u.slice(1,-1));else{let d=u.match(/\\[0-9A-Fa-f]{1,6}/g);if(d)for(let m of d)try{r.add(parseInt(m.slice(1),16))}catch{}}}};i(t);let a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;a.nextNode();){let c=a.currentNode;if(c.nodeType===Node.TEXT_NODE){if(e&&c.parentElement&&!e(c.parentElement))continue;o(c.nodeValue||"")}else{if(e&&!e(c))continue;i(c)}}return{required:n,usedCodepoints:r}}function yr(t,e){return Jt(t,e).required}async function _t(t,e=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(t||[]).filter(Boolean);if(r.length===0)return;let o=()=>{let s=n.createElement("div");s.setAttribute("data-snapdom-internal",""),s.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let i of r){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${i}"`,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",s.appendChild(a)}n.body.appendChild(s),s.offsetWidth,n.body.removeChild(s)};for(let s=0;s<Math.max(1,e);s++)o(),await new Promise(i=>requestAnimationFrame(()=>requestAnimationFrame(i)))}Y();function Sr(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function br(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 wr(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)),o="";for(let[s,i]of n)for(;r>=s;)o+=i,r-=s;return e?o:o.toLowerCase()}function xr(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":return br(t,!1);case"upper-alpha":return br(t,!0);case"lower-roman":return wr(t,!1);case"upper-roman":return wr(t,!0);default:return String(t)}}function Cr(t){let e=()=>x?.session?.__counterEpoch??0,n=e(),r=new WeakMap,o=t instanceof Document?t.documentElement:t,s=d=>d&&d.tagName==="LI",i=d=>{let m=0,h=d?.parentElement;if(!h)return 0;for(let p of h.children){if(p===d)break;p.tagName==="LI"&&m++}return m},a=d=>{let m=new Map;for(let[h,p]of d)m.set(h,p.slice());return m},c=(d,m,h)=>{let p=a(d),g;try{g=h.style?.counterReset||getComputedStyle(h).counterReset}catch{}if(g&&g!=="none")for(let A of g.split(",")){let b=A.trim().split(/\s+/),S=b[0],C=Number.isFinite(Number(b[1]))?Number(b[1]):0;if(!S)continue;let k=m.get(S);if(k&&k.length){let v=k.slice();v.push(C),p.set(S,v)}else p.set(S,[C])}let w;try{w=h.style?.counterSet||getComputedStyle(h).counterSet}catch{}if(w&&w!=="none")for(let A of w.split(",")){let b=A.trim().split(/\s+/),S=b[0],C=Number.isFinite(Number(b[1]))?Number(b[1]):0;if(!S)continue;let k=p.get(S)||[];k.length===0&&k.push(0),k[k.length-1]=C,p.set(S,k)}let y;try{y=h.style?.counterIncrement||getComputedStyle(h).counterIncrement}catch{}if(y&&y!=="none")for(let A of y.split(",")){let b=A.trim().split(/\s+/),S=b[0],C=Number.isFinite(Number(b[1]))?Number(b[1]):1;if(!S)continue;let k=p.get(S)||[];k.length===0&&k.push(0),k[k.length-1]+=C,p.set(S,k)}try{if(getComputedStyle(h).display==="list-item"&&s(h)){let b=h.parentElement,S=1;if(b&&b.tagName==="OL"){let k=b.getAttribute("start"),v=Number.isFinite(Number(k))?Number(k):1,M=i(h),L=h.getAttribute("value");S=Number.isFinite(Number(L))?Number(L):v+M}else S=1+i(h);let C=p.get("list-item")||[];C.length===0&&C.push(0),C[C.length-1]=S,p.set("list-item",C)}}catch{}return p},l=(d,m,h)=>{let p=c(h,m,d);r.set(d,p);let g=p;for(let y of d.children)g=l(y,p,g);let w=new Map;for(let[y,A]of h){let b=A.length,S=g.get(y);w.set(y,S&&S.length?S.slice(0,b):A.slice())}for(let[y,A]of g)!w.has(y)&&A.length&&!m.has(y)&&w.set(y,A.slice(0,1));return w},f=new Map;l(o,f,f);function u(){let d=e();if(d!==n){n=d;let m=new Map;l(o,m,m)}}return{get(d,m){u();let h=r.get(d)?.get(m);return h&&h.length?h[h.length-1]:0},getStack(d,m){u();let h=r.get(d)?.get(m);return h?h.slice():[]}}}function Ar(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(r,(o,s,i)=>{let a=String(i).split(",").map(c=>c.trim());if(s==="counter"){let c=a[0]?.replace(/^["']|["']$/g,""),l=(a[1]||"decimal").toLowerCase(),f=n.get(e,c);return xr(f,l)}else{let c=a[0]?.replace(/^["']|["']$/g,""),l=a[1]?.replace(/^["']|["']$/g,"")??"",f=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,c);return u.length?u.map(m=>xr(m,f)).join(l):""}})}catch{return"- "}}pt();Y();var Wt=new WeakMap,vr=1e3;function os(t,e){let n=Fr(t);return e?(e.__pseudoPreflightFp!==n&&(e.__pseudoPreflight=Mr(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):Mr(t,n)}function tn(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function Fr(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let s=0;s<e.length;s++){let i=e[s];if(i.tagName==="STYLE"){let a=i.textContent?i.textContent.length:0;n+=`S${a}|`;let c=i.sheet,l=c?tn(c):null;l&&(r+=l.length)}else{let a=i.getAttribute("href")||"",c=i.getAttribute("media")||"all";n+=`L${a}|m:${c}|`;let l=i.sheet,f=l?tn(l):null;f&&(r+=f.length)}}let o=t.adoptedStyleSheets;return n+=`ass:${Array.isArray(o)?o.length:0}|tr:${r}`,n}function kr(t,e,n){let r=tn(t);if(!r)return!1;for(let o=0;o<r.length;o++){if(n.budget<=0)return!1;let s=r[o],i=s&&s.cssText?s.cssText:"";n.budget--;for(let a of e)if(i.includes(a))return!0;if(s&&s.cssRules&&s.cssRules.length)for(let a=0;a<s.cssRules.length&&n.budget>0;a++){let c=s.cssRules[a],l=c&&c.cssText?c.cssText:"";n.budget--;for(let f of e)if(l.includes(f))return!0}if(n.budget<=0)return!1}return!1}function Mr(t=document,e=Fr(t)){let n=Wt.get(t);if(n&&n.fingerprint===e)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],o=t.querySelectorAll("style");for(let i=0;i<o.length;i++){let a=o[i].textContent||"";for(let c of r)if(a.includes(c))return Wt.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let i={budget:vr};try{for(let a of s)if(kr(a,r,i))return Wt.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let i=t.querySelectorAll('style,link[rel~="stylesheet"]'),a={budget:vr};for(let c=0;c<i.length&&a.budget>0;c++){let l=i[c],f=null;if(l.tagName,f=l.sheet||null,f&&kr(f,r,a))return Wt.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Wt.set(t,{fingerprint:e,result:!0}),!0):(Wt.set(t,{fingerprint:e,result:!1}),!1)}var Ot=new WeakMap;function Er(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}var $r=-1;function is(t,e){let n=null,r=()=>{if(!n)try{n=Cr(t)}catch(o){P(e,"buildCounterContext failed",o),n={get:()=>0,getStack:()=>[]}}return n};return{get(o,s){return r().get(o,s)},getStack(o,s){return r().getStack(o,s)}}}function ss(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 as(t){if(!t)return"";let e=[],n=/"([^"]*)"/g,r=0,o;for(;o=n.exec(t);){let i=t.slice(r,o.index).trim();i&&e.push(i),e.push(o[1]),r=n.lastIndex}let s=t.slice(r).trim();return s&&e.push(s),e.join("")}function en(t,e){let n=t.parentElement,r=n?Ot.get(n):null;return r?{get(o,s){let i=e.get(o,s),a=r.get(s);return typeof a=="number"?Math.max(i,a):i},getStack(o,s){let i=e.getStack(o,s);if(!i.length)return i;let a=r.get(s);if(typeof a=="number"){let c=i.slice();return c[c.length-1]=Math.max(c[c.length-1],a),c}return i}}:e}function nn(t,e,n){let r=new Map;function o(l){let f=[];if(!l||l==="none")return f;for(let u of String(l).split(",")){let d=u.trim().split(/\s+/),m=d[0],h=Number.isFinite(Number(d[1]))?Number(d[1]):void 0;m&&f.push({name:m,num:h})}return f}let s=o(e?.counterReset),i=o(e?.counterSet),a=o(e?.counterIncrement);function c(l){if(r.has(l))return r.get(l).slice();let f=n.getStack(t,l);f=f.length?f.slice():[];let u=s.find(h=>h.name===l);if(u){let h=Number.isFinite(u.num)?u.num:0;f=f.length?[...f,h]:[h]}let d=i.find(h=>h.name===l);if(d){let h=Number.isFinite(d.num)?d.num:0;f.length===0&&(f=[0]),f[f.length-1]=h}let m=a.find(h=>h.name===l);if(m){let h=Number.isFinite(m.num)?m.num:1;f.length===0&&(f=[0]),f[f.length-1]+=h}return r.set(l,f.slice()),f}return{get(l,f){let u=c(f);return u.length?u[u.length-1]:0},getStack(l,f){return c(f)},__incs:a}}function cs(t,e,n){let r;try{r=N(t,e)}catch{}let o=r?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};o=ss(o);let s=en(t,n),i=nn(t,r,s),a=Sr(o)?Ar(o,t,i):o;return{text:as(a),incs:i.__incs||[]}}async function Ee(t,e,n,r){if(!(t instanceof Element)||!(e instanceof Element)||t instanceof HTMLTextAreaElement)return;let o=t.ownerDocument||document;if(!os(o,n))return;let s=x?.session?.__counterEpoch??0;$r!==s&&(Ot=new WeakMap,n&&(n.__counterCtx=null),$r=s),n.__counterCtx||(n.__counterCtx=is(t.ownerDocument||document,n));let i=n.__counterCtx;for(let c of["::before","::after","::first-letter"])try{let l=N(t,c);if(!l||l.content==="none"&&l.backgroundImage==="none"&&l.backgroundColor==="transparent"&&!Er(l)&&(!l.transform||l.transform==="none")&&l.display==="inline")continue;if(c==="::first-letter"){let F=N(t),U=(F?.display||"").toLowerCase();if(U.includes("flex")||U.includes("grid")||!(l.color!==F.color||l.fontSize!==F.fontSize||l.fontWeight!==F.fontWeight||l.fontFamily!==F.fontFamily||l.fontStyle!==F.fontStyle||l.textTransform!==F.textTransform||l.float!==F.float||l.paddingTop!==F.paddingTop||l.paddingRight!==F.paddingRight||l.paddingBottom!==F.paddingBottom||l.paddingLeft!==F.paddingLeft||l.marginTop!==F.marginTop||l.marginRight!==F.marginRight||l.marginBottom!==F.marginBottom||l.marginLeft!==F.marginLeft))continue;let H=Array.from(e.childNodes).find(Dt=>Dt.nodeType===Node.TEXT_NODE&&Dt.textContent?.trim().length>0);if(!H)continue;let J=H.textContent,ct=J.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],$t=J.slice(ct?.length||0);if(!ct||/[\uD800-\uDFFF]/.test(ct))continue;let Z=document.createElement("span");Z.textContent=ct,Z.dataset.snapdomPseudo="::first-letter";let Ft=pe(l),Rt=Tt(Ft,"span");n.styleMap.set(Z,Rt);let St=document.createTextNode($t);e.replaceChild(St,H),e.insertBefore(Z,St);continue}let u=l.content??"",d=u===""||u==="none"||u==="normal",{text:m,incs:h}=cs(t,c,i),p=l.backgroundImage,g=l.backgroundColor,w=l.fontFamily,y=parseInt(l.fontSize)||32,A=parseInt(l.fontWeight)||!1,b=l.color||"#000",S=l.transform,C=it(w),k=!d&&m!=="",v=p&&p!=="none",M=g&&g!=="transparent"&&g!=="rgba(0, 0, 0, 0)",L=Er(l),$=S&&S!=="none",T=u!=="none"&&u!=="normal",B=T&&((parseFloat(l.width)||0)>0||(parseFloat(l.height)||0)>0),W=T&&l.boxShadow&&l.boxShadow!=="none",R=T&&l.outlineStyle&&l.outlineStyle!=="none"&&(parseFloat(l.outlineWidth)||0)>0;if(!(k||v||M||L||$||B||W||R)){if(h&&h.length&&t.parentElement){let F=Ot.get(t.parentElement)||new Map;for(let{name:U}of h){if(!U)continue;let D=en(t,i),J=nn(t,N(t,c),D).get(t,U);F.set(U,J)}Ot.set(t.parentElement,F)}continue}let rt=m.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(m),st=!1;if(k&&!C&&m.length>1&&!rt){let F=N(t),U=parseFloat(F.fontSize)||16,D=parseFloat(F.lineHeight);Number.isFinite(D)||(D=U*1.5),t.getBoundingClientRect().height<D*1.6&&(e.style.whiteSpace="nowrap",st=!0)}let _=document.createElement("span");_.dataset.snapdomPseudo=c,_.style.pointerEvents="none",st&&(_.style.whiteSpace="nowrap");let gt=pe(l),yt=(N(t).display||"").toLowerCase(),lt=yt.includes("flex")||yt.includes("grid");if(lt){let F=gt["min-width"];(!F||F==="auto"||F==="0px")&&(gt["min-width"]="0px")}let ft=Tt(gt,"span",k,lt);if(n.styleMap.set(_,ft),C&&m&&m.length===1){let{dataUrl:F,width:U,height:D}=await fr(m,w,A,y,b),H=document.createElement("img");H.src=F,H.style=`height:${y}px;width:${U/D*y}px;object-fit:contain;`,_.appendChild(H),e.dataset.snapdomHasIcon="true"}else if(m&&rt){let F=Vt(m,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??At(m);if(F?.trim())try{let U=await V(mt(F),{as:"dataURL",useProxy:r.useProxy});if(U?.ok&&typeof U.data=="string"){let D=document.createElement("img");D.src=U.data,D.style=`width:${y}px;height:auto;object-fit:contain;`,_.appendChild(D)}}catch(U){console.error(`[snapdom] Error in pseudo ${c} for`,t,U)}}else!C&&k&&(_.textContent=m);_.style.backgroundImage="none","maskImage"in _.style&&(_.style.maskImage="none"),"webkitMaskImage"in _.style&&(_.style.webkitMaskImage="none");try{_.style.backgroundRepeat=l.backgroundRepeat,_.style.backgroundSize=l.backgroundSize,l.backgroundPositionX&&l.backgroundPositionY?(_.style.backgroundPositionX=l.backgroundPositionX,_.style.backgroundPositionY=l.backgroundPositionY):_.style.backgroundPosition=l.backgroundPosition,_.style.backgroundOrigin=l.backgroundOrigin,_.style.backgroundClip=l.backgroundClip,_.style.backgroundAttachment=l.backgroundAttachment,_.style.backgroundBlendMode=l.backgroundBlendMode}catch{}if(v)try{let F=Pt(p),U=await Promise.all(F.map(vt));_.style.backgroundImage=U.join(", ")}catch(F){console.warn(`[snapdom] Failed to inline background-image for ${c}`,F)}M&&(_.style.backgroundColor=g);let wt=_.childNodes.length>0||_.textContent?.trim()!==""||v||M||L||$||B||W||R;if(h&&h.length&&t.parentElement){let F=Ot.get(t.parentElement)||new Map,U=en(t,i),D=nn(t,N(t,c),U);for(let{name:H}of h){if(!H)continue;let J=D.get(t,H);F.set(H,J)}Ot.set(t.parentElement,F)}if(!wt)continue;c==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(_,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(_))}catch(l){console.warn(`[snapdom] Failed to capture ${c} for`,t,l)}let a=Array.from(e.children).filter(c=>!c.dataset.snapdomPseudo);if(n.nodeMap)for(let c of a){let l=n.nodeMap.get(c);l instanceof Element&&await Ee(l,c,n,r)}else{let c=Array.from(t.children);for(let l=0;l<Math.min(c.length,a.length);l++)await Ee(c[l],a[l],n,r)}}function Rr(t,e){if(!t||!(t instanceof Element))return;let n=t.ownerDocument||document,r=e||n,o=t instanceof SVGSVGElement?[t]:Array.from(t.querySelectorAll("svg"));if(o.length===0)return;let s=/url\(\s*#([^)]+)\)/g,i=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],a=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),c="http://www.w3.org/1999/xlink",l=b=>{if(!b||!b.getAttribute)return null;let S=b.getAttribute("href")||b.getAttribute("xlink:href")||(typeof b.getAttributeNS=="function"?b.getAttributeNS(c,"href"):null);if(S)return S;let C=b.attributes;if(!C)return null;for(let k=0;k<C.length;k++){let v=C[k];if(!v||!v.name)continue;if(v.name==="href")return v.value;let M=v.name.indexOf(":");if(M!==-1&&v.name.slice(M+1)==="href")return v.value}return null},f=new Set(Array.from(t.querySelectorAll("[id]")).map(b=>b.id)),u=new Set,d=!1,m=(b,S=null)=>{if(!b)return;s.lastIndex=0;let C;for(;C=s.exec(b);){d=!0;let k=(C[1]||"").trim();k&&(f.has(k)||(u.add(k),S&&!S.has(k)&&S.add(k)))}},h=b=>{let S=b.querySelectorAll("use");for(let v of S){let M=l(v);if(!M||!M.startsWith("#"))continue;d=!0;let L=M.slice(1).trim();L&&!f.has(L)&&u.add(L)}let k=b.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let v of k){m(v.getAttribute("style")||"");for(let M of i)m(v.getAttribute(M))}};for(let b of o)h(b);if(!d)return;let p=t.querySelector("svg.inline-defs-container");p||(p=n.createElementNS("http://www.w3.org/2000/svg","svg"),p.classList.add("inline-defs-container"),p.setAttribute("aria-hidden","true"),p.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(p,t.firstChild||null));let g=p.querySelector("defs")||null,w=b=>{if(!b||f.has(b))return null;let S=a(b),C=k=>{let v=r.querySelector(k);return v&&!t.contains(v)?v:null};return C(`svg defs > *#${S}`)||C(`svg > symbol#${S}`)||C(`*#${S}`)};if(!u.size)return;let y=new Set(u),A=new Set;for(;y.size;){let b=y.values().next().value;if(y.delete(b),!b||f.has(b)||A.has(b))continue;let S=w(b);if(!S){A.add(b);continue}g||(g=n.createElementNS("http://www.w3.org/2000/svg","defs"),p.appendChild(g));let C=S.cloneNode(!0);C.id||C.setAttribute("id",b),g.appendChild(C),A.add(b),f.add(b);let k=[C,...C.querySelectorAll("*")];for(let v of k){let M=l(v);if(M&&M.startsWith("#")){let $=M.slice(1).trim();$&&!f.has($)&&!A.has($)&&y.add($)}let L=v.getAttribute?.("style")||"";L&&m(L,y);for(let $ of i){let T=v.getAttribute?.($);T&&m(T,y)}}}}Y();function Lr(t){let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,o=e.borderStyle,s=e.borderWidth,i=n!=="none"&&parseFloat(r)>0,a=o==="none"||parseFloat(s)===0;if(i&&a){let c=t.style.border;return t.style.border=`${r} solid transparent`,()=>{t.style.border=c}}return()=>{}}function Tr(t){let e=[];try{let n=t.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=r.style.contentVisibility||"",s=getComputedStyle(r),i=s.contentVisibility||s.getPropertyValue("content-visibility")||"";(i==="auto"||i==="hidden")&&(e.push({el:r,original:o}),r.style.contentVisibility="visible")}if(t instanceof HTMLElement){let r=getComputedStyle(t),o=r.contentVisibility||r.getPropertyValue("content-visibility")||"";(o==="auto"||o==="hidden")&&(e.push({el:t,original:t.style.contentVisibility||""}),t.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:r}of e)try{n.style.contentVisibility=r}catch{}}}et();Xt();function Pr(t){return Ir(t.boxShadow)}function Nr(t){return Ir(t.textShadow)}function Ir(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 l=t[c];l==="("?r++:l===")"&&(r=Math.max(0,r-1)),l===","&&r===0?(e.push(n),n=""):n+=l}n.trim()&&e.push(n);let o=0,s=0,i=0,a=0;for(let c of e){if(/\binset\b/i.test(c))continue;let l=c.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(l.length<2)continue;let[f,u,d=0,m=0]=l,h=Math.abs(f)+d+m,p=Math.abs(u)+d+m;s=Math.max(s,h+Math.max(f,0)),a=Math.max(a,h+Math.max(-f,0)),i=Math.max(i,p+Math.max(u,0)),o=Math.max(o,p+Math.max(-u,0))}return{top:Math.ceil(o),right:Math.ceil(s),bottom:Math.ceil(i),left:Math.ceil(a)}}function _r(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,o;for(;o=n.exec(e);)r+=parseFloat(o[1])||0;let s=Math.ceil(r);return{top:s,right:s,bottom:s,left:s}}function Wr(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 Or(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,o=0,s=0,i=0,a=!1;for(let c of n){a=!0;let l=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[f=0,u=0,d=0]=l,m=Math.abs(f)+d,h=Math.abs(u)+d;o=Math.max(o,m+Math.max(f,0)),i=Math.max(i,m+Math.max(-f,0)),s=Math.max(s,h+Math.max(u,0)),r=Math.max(r,h+Math.max(-u,0))}return{bleed:{top:E(r),right:E(o),bottom:E(s),left:E(i)},has:a}}function Br(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 a=null;try{a=Ut(t).scale}catch{}try{e.style.transform="none"}catch{}if(!a)return{a:1,b:0,c:0,d:1};let c=a.trim().split(/\s+/).map(parseFloat),l=Number.isFinite(c[0])?c[0]:1,f=Number.isFinite(c[1])?c[1]:l;return{a:l,b:0,c:0,d:f}}function o(a,c,l,f){let u=Math.sqrt(a*a+c*c)||0,d=0,m=0;if(u>0){let h=a/u,p=c/u;d=h*l+p*f;let g=l-h*d,w=f-p*d;m=Math.sqrt(g*g+w*w)||0,m>0?d=d/m:d=0}return{a:u,b:0,c:d*m,d:m}}let s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let a=s[1].split(",").map(c=>parseFloat(c.trim()));if(a.length===6&&a.every(Number.isFinite)){let[c,l,f,u]=a,d=o(c,l,f,u);try{e.style.transform=`matrix(${d.a}, ${d.b}, ${d.c}, ${d.d}, 0, 0)`}catch{}return d}}let i=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(i){let a=i[1].split(",").map(c=>parseFloat(c.trim()));if(a.length===16&&a.every(Number.isFinite)){let c=a[0],l=a[1],f=a[4],u=a[5],d=o(c,l,f,u);try{e.style.transform=`matrix(${d.a}, ${d.b}, ${d.c}, ${d.d}, 0, 0)`}catch{}return d}}try{let a=new DOMMatrix(r),c=o(a.a,a.b,a.c,a.d);try{e.style.transform=`matrix(${c.a}, ${c.b}, ${c.c}, ${c.d}, 0, 0)`}catch{}return c}catch{return null}}function Bt(t,e,n,r,o){let s=n.a,i=n.b,a=n.c,c=n.d,l=n.e||0,f=n.f||0;function u(w,y){let A=w-r,b=y-o,S=s*A+a*b,C=i*A+c*b;return S+=r+l,C+=o+f,[S,C]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],m=1/0,h=1/0,p=-1/0,g=-1/0;for(let[w,y]of d)w<m&&(m=w),y<h&&(h=y),w>p&&(p=w),y>g&&(g=y);return{minX:m,minY:h,maxX:p,maxY:g,width:p-m,height:g-h}}function Zt(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[o,s]=[r[0]||"0",r[1]||"0"],i=(a,c)=>{let l=a.toLowerCase();return l==="left"||l==="top"?0:l==="center"?c/2:l==="right"||l==="bottom"?c:l.endsWith("px")?parseFloat(l)||0:l.endsWith("%")?(parseFloat(l)||0)*c/100:/^-?\d+(\.\d+)?$/.test(l)&&parseFloat(l)||0};return{ox:i(o,e),oy:i(s,n)}}function Ut(t){let e={rotate:"0deg",scale:null,translate:null},n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null;if(n){let o=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},s=o("rotate");if(s)if(s.angle){let c=s.angle;e.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit}else s.unit?e.rotate=s.unit==="rad"?s.value*180/Math.PI+"deg":s.value+s.unit:e.rotate=String(s);else{let c=getComputedStyle(t);e.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let i=o("scale");if(i){let c="x"in i&&i.x?.value!=null?i.x.value:Array.isArray(i)?i[0]?.value:Number(i)||1,l="y"in i&&i.y?.value!=null?i.y.value:Array.isArray(i)?i[1]?.value:c;e.scale=`${c} ${l}`}else{let c=getComputedStyle(t);e.scale=c.scale&&c.scale!=="none"?c.scale:null}let a=o("translate");if(a){let c="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?a[0]?.value:0,l="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?a[1]?.value:0,f="x"in a&&a.x?.unit?a.x.unit:"px",u="y"in a&&a.y?.unit?a.y.unit:"px";e.translate=`${c}${f} ${l}${u}`}else{let c=getComputedStyle(t);e.translate=c.translate&&c.translate!=="none"?c.translate:null}return 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 rn=null;function ls(){if(rn)return rn;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),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),rn=t,t}function Ur(t){let e=ls(),n=document.createElement("div");n.style.transformOrigin="0 0",t.baseTransform&&(n.style.transform=t.baseTransform),t.rotate&&(n.style.rotate=t.rotate),t.scale&&(n.style.scale=t.scale),t.translate&&(n.style.translate=t.translate),e.appendChild(n);let r=fs(n);return e.removeChild(n),r}function Dr(t){let e=N(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 o=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",s=e.scale&&e.scale!=="none"&&e.scale!=="1",i=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(o||s||i)}function fs(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}function $e(t,e){if(!e)return null;let n=t.ownerDocument||document,r=n.defaultView||window,o,s,i,a;if(e==="viewport")o=0,s=0,i=n.documentElement?.clientWidth||r.innerWidth,a=n.documentElement?.clientHeight||r.innerHeight;else if(typeof e=="object")o=(Number(e.x)||0)-(r.scrollX||0),s=(Number(e.y)||0)-(r.scrollY||0),i=Number(e.width),a=Number(e.height);else return null;return i>0&&a>0?{left:o,top:s,width:i,height:a,right:o+i,bottom:s+a}:null}function on(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return e instanceof ShadowRoot?e.host:null}function us(t,e){for(let n=e;n;n=on(n))if(n===t)return!0;return!1}function ds(t,e){for(let n=on(t);n&&n!==e&&n instanceof Element;n=on(n)){let r=N(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 an(t,e){try{let n=new DOMMatrix;if(e&&e.rotate&&e.rotate!=="0deg"&&(n=n.multiply(new DOMMatrix(`rotate(${e.rotate})`))),e&&e.scale){let r=String(e.scale).trim().split(/\s+/).filter(Boolean);r.length&&r.every(o=>Number.isFinite(Number(o)))&&(n=n.multiply(new DOMMatrix(`scale(${r.join(",")})`)))}return t&&(n=n.multiply(new DOMMatrix(t))),n}catch{return null}}function qr(t,e,n,r,o){let s=t.getBoundingClientRect();e instanceof HTMLElement&&N(t).position==="static"&&(e.style.position="relative");let i=[];for(let[a,c]of n){if(!(a instanceof HTMLElement)||!(c instanceof Element)||c===t||!us(t,c))continue;let l=r.get(c)||N(c),f=l.position;if(f!=="fixed"&&f!=="sticky"&&f!=="-webkit-sticky"||a.style.position==="absolute")continue;let u=c.getBoundingClientRect();if(!(u.width>0&&u.height>0))continue;let d=l.transform&&l.transform!=="none"?l.transform:"",m=Ut(c),h=!!(d||m.rotate!=="0deg"||m.scale||m.translate),p=h?an(d,m):null,g=!p||!p.is2D||p.a===1&&p.b===0&&p.c===0&&p.d===1,w=u.width,y=u.height;g||(w=c.offsetWidth||u.width,y=c.offsetHeight||u.height);let A=c.getRootNode&&c.getRootNode()instanceof ShadowRoot,b=s,S=t.clientLeft||0,C=t.clientTop||0;if(A){let $=ds(c,t);$&&(b=$.getBoundingClientRect(),S=$.clientLeft||0,C=$.clientTop||0)}let k=u.left-b.left-S,v=u.top-b.top-C;if(h)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",g)a.style.transform="none";else{a.style.transform=`matrix(${p.a},${p.b},${p.c},${p.d},0,0)`;let{ox:$,oy:T}=Zt(l,w,y),B=Bt(w,y,{a:p.a,b:p.b,c:p.c,d:p.d,e:0,f:0},$,T);k-=B.minX,v-=B.minY}if(f!=="fixed"){let $=a.cloneNode(!1);$.setAttribute("data-snap-ph","1"),$.style.position="static",$.style.visibility="hidden",$.style.width=`${w}px`,$.style.height=`${y}px`,$.style.boxSizing="border-box",a.parentElement?.insertBefore($,a)}let M=w+2,L=y;o&&(Math.abs(v-o.y)<.5&&(v-=1,L+=1),Math.abs(k-o.x)<.5&&(k-=1,M+=1)),a.style.position="absolute",a.style.left=`${k}px`,a.style.top=`${v}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${M}px`,a.style.height=`${L}px`,a.style.boxSizing="border-box",A||i.push(a)}for(let a of i)e.appendChild(a)}function Xr(t,e,n={}){if(!t||!e||!e.style)return;let r=getComputedStyle(t);try{e.style.boxShadow="none"}catch(i){P(n,"stripRootShadows boxShadow",i)}try{e.style.textShadow="none"}catch(i){P(n,"stripRootShadows textShadow",i)}try{e.style.outline="none"}catch(i){P(n,"stripRootShadows outline",i)}let s=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=s.length?s:"none"}catch(i){P(n,"stripRootShadows filter",i)}}function Hr(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 ms(t,e){let n=Array.from(t.childNodes),r=e==="top"?n:n.reverse();for(let o of r){if(o.nodeType===Node.TEXT_NODE){if(/\S/.test(o.textContent||""))return null;continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;let s=getComputedStyle(o),i=String(s.display||"");if(!(i==="none"||i==="contents")&&!(s.position==="absolute"||s.position==="fixed"))return s.float&&s.float!=="none"||i.startsWith("inline")?null:o}return null}function Gr(t,e,n){if(!t||!e||!e.style)return;let r=getComputedStyle(t);if(!Hr(r))for(let o of["top","bottom"]){let s=o==="top"?"Top":"Bottom";if((parseFloat(r[`border${s}Width`])||0)>0||(parseFloat(r[`padding${s}`])||0)>0)continue;let i=t,a=e;for(;i&&a;){let c=ms(i,o);if(!c)break;let l=n?Array.from(a.children).find(d=>n.get(d)===c)||null:a.children[Array.from(i.children).indexOf(c)]||null,f=getComputedStyle(c),u=parseFloat(f[`margin${s}`])||0;if(l&&l.style&&u>0&&(l.style[`margin${s}`]="0px"),Hr(f)||(parseFloat(f[`border${s}Width`])||0)>0||(parseFloat(f[`padding${s}`])||0)>0)break;i=c,a=l}}}function ps(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),n=[];for(;e.nextNode();)n.push(e.currentNode);for(let r of n)r.remove()}function hs(t,e={}){let{stripFrameworkDirectives:n=!0}=e,r=new Set(["xml","xlink"]),o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let s=o.currentNode;for(let i of Array.from(s.attributes)){let a=i.name;if(a.startsWith("*")){s.removeAttribute(a);continue}if(a.includes("@")){s.removeAttribute(a);continue}if(a.includes(":")){let c=a.split(":",1)[0];if(!r.has(c)){s.removeAttribute(a);continue}}if(n&&(a.startsWith("x-")||a.startsWith("v-")||a.startsWith(":")||a.startsWith("on:")||a.startsWith("bind:")||a.startsWith("let:")||a.startsWith("class:"))){s.removeAttribute(a);continue}}}}var zr=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function gs(t){if(!t)return;let e=o=>{if(o.nodeType===Node.ELEMENT_NODE){if(o.attributes)for(let s of Array.from(o.attributes)){let i=s.value.replace(zr,"");if(i!==s.value)try{o.setAttribute(s.name,i)}catch{}}}else if(o.nodeType===Node.TEXT_NODE||o.nodeType===Node.CDATA_SECTION_NODE){let s=o.data.replace(zr,"");s!==o.data&&(o.data=s)}};e(t);let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),r;for(;r=n.nextNode();)e(r)}function Yr(t,e={}){t&&(hs(t,e),ps(t),gs(t))}function ys(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}function bs(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function ws(t,e){if(!(t instanceof Element)||ys(t)||bs(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 Kr(t,e,n=new Map){function r(o,s){if(!(o instanceof Element)||!(s instanceof Element))return;let i=o.childElementCount>s.childElementCount,a=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,a),i&&ws(o,a)){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 f=a.overflowY||a.overflowBlock||"visible",u=a.overflowX||a.overflowInline||"visible";(f!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let c=Array.from(o.children),l=Array.from(s.children);for(let f=0;f<Math.min(c.length,l.length);f++)r(c[f],l[f])}r(t,e)}function xs(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function Ss(t,e){if(!(t instanceof Element))return!1;if(t.getAttribute("data-capture")==="exclude"&&e?.excludeMode==="remove")return!0;if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){P(e,"exclude selector match failed",r)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){P(e,"filter function failed",n)}return!1}function Qr(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),o=1/0,s=-1/0,i=!1,a=Array.from(t.children);for(let m of a){if(Ss(m,e)||!xs(m))continue;let h=m.getBoundingClientRect(),p=h.top-r.top,g=h.bottom-r.top;g<=p||(p<o&&(o=p),g>s&&(s=g),i=!0)}let c=i?Math.max(0,s-o):0,l=parseFloat(n.borderTopWidth)||0,f=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return l+f+u+d+c}var E=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t,Vr=.75;function Jr(t,e,n,r,o,s){let i=t.ownerDocument||document,a=t.getBoundingClientRect(),c=o>0&&a.width>0?a.width/o:1,l=s>0&&a.height>0?a.height/s:1;if(Math.abs(c-l)>.02)return 0;let f=i.createElement("div");f.setAttribute("data-snapdom-internal",""),f.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+o+"px!important;overflow:visible!important;visibility:hidden!important;";let u=i.createElement("style");u.textContent=n,f.appendChild(u);let d=e.cloneNode(!0);f.appendChild(d),i.body.appendChild(f);let m=0;try{let h=(p,g)=>{let w=p.children,y=g.children,A=Math.min(w.length,y.length);for(let b=0;b<A;b++){let S=w[b],C=y[b],k=r.get(S);if(k instanceof Element&&S instanceof HTMLElement&&k.isConnected){let v=k.getBoundingClientRect();if(v.width>0&&v.height>0){let M=C.getBoundingClientRect(),L=M.width-v.width/c,$=M.height-v.height/l;(Math.abs(L)>Vr||Math.abs($)>Vr)&&(S.style.boxSizing="border-box",S.style.width=`${E(v.width/c)}px`,S.style.height=`${E(v.height/l)}px`,m++)}}h(S,C)}};h(e,d)}finally{f.remove()}return m}var Cs=/::-webkit-scrollbar(-[a-z]+)?\b/i;function sn(t,e=new Set){let n="";if(!t)return n;for(let r=0;r<t.length;r++){let o=t[r];try{if(o.type===CSSRule.IMPORT_RULE&&o.styleSheet){n+=sn(o.styleSheet.cssRules,e);continue}if(o.type===CSSRule.MEDIA_RULE&&o.cssRules){let s=sn(o.cssRules,e);s&&(n+=`@media ${o.conditionText}{${s}}`);continue}if(o.type===CSSRule.STYLE_RULE){let s=o.selectorText||"";if(Cs.test(s)){let i=o.cssText;i&&!e.has(i)&&(e.add(i),n+=i)}}}catch{}}return n}var jr=new WeakMap;function As(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 Zr(t){if(!t||!t.styleSheets)return"";let e=As(t),n=jr.get(t);if(n&&n.fp===e)return n.css;let r=new Set,o="";for(let s of Array.from(t.styleSheets))try{let i=s.cssRules;i&&(o+=sn(i,r))}catch{}return jr.set(t,{fp:e,css:o}),o}async function to(t,e={}){let n={styleMap:x.session.styleMap,styleCache:x.session.styleCache,nodeMap:x.session.nodeMap,options:e},r=null;if(e.clip){let u=$e(t,e.clip);if(u){n.clip={rect:u,root:t};let d=t.getBoundingClientRect();r={x:u.left-d.left,y:u.top-d.top,width:u.width,height:u.height}}}let o,s="",i="",a=Lr(t),c=n.clip?()=>{}:Tr(t);try{o=await Qt(t,n,e)}catch(u){throw console.warn("deepClone failed:",u),u}finally{c(),a()}try{Rr(o)}catch(u){console.warn("inlineExternal defs or symbol failed:",u)}try{await Ee(t,o,n,e)}catch(u){console.warn("inlinePseudoElements failed:",u)}await Zn(o,n);try{let u=o.querySelectorAll("style[data-sd]");for(let d of u)i+=d.textContent||"",d.remove()}catch(u){P(n,"Failed to extract shadow CSS from style[data-sd]",u)}let l=De(n.styleMap);s=Array.from(l.entries()).map(([u,d])=>`.${d}{${u}}`).join(""),s=i+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+s;for(let[u,d]of n.styleMap.entries()){if(u.tagName==="STYLE")continue;if(u.getRootNode&&u.getRootNode()instanceof ShadowRoot){u.setAttribute("style",d.replace(/;/g,"; "));continue}let m=l.get(d);m&&u.classList.add(m);let h=u.style?.backgroundImage,p=u.dataset?.snapdomHasIcon;h&&h!=="none"&&(u.style.backgroundImage=h),p&&(u.style.verticalAlign="middle",u.style.display="inline")}if((n.clip||t.scrollTop||t.scrollLeft)&&o instanceof Element)try{let u=n.clip&&r?{x:r.x,y:r.y}:{x:0,y:0};qr(t,o,n.nodeMap,n.styleCache,u)}catch(u){P(n,"freezeViewportPositioned failed",u)}for(let[u,d]of n.nodeMap.entries()){if(n.clip&&d===t)continue;let m=d.scrollLeft,h=d.scrollTop;if((m||h)&&u instanceof HTMLElement){u.style.overflow="hidden",u.style.scrollbarWidth="none",u.style.msOverflowStyle="none";try{let w=u.querySelectorAll("*");for(let y of w){if(!(y instanceof HTMLElement))continue;let A=y.style.position;if(A==="fixed"||A==="absolute"){let b=parseFloat(y.style.top)||0,S=parseFloat(y.style.left)||0;y.style.top=`${b+h}px`,y.style.left=`${S+m}px`,A==="fixed"&&(y.style.position="absolute")}}}catch{}let g=document.createElement("div");for(g.style.all="unset",g.style.transform=`translate(${-m}px, ${-h}px)`,g.style.willChange="transform",g.style.display="inline-block",g.style.width="100%";u.firstChild;)g.appendChild(u.firstChild);u.appendChild(g)}}if(t===n.nodeMap.get(o)){let u=n.styleCache.get(t)||N(t);n.styleCache.set(t,u);let d=Ie(u.transform);o.style.margin="0",o.style.top="auto",o.style.left="auto",o.style.right="auto",o.style.bottom="auto",o.style.animation="none",o.style.transition="none",o.style.willChange="auto",o.style.float="none",o.style.clear="none",o.style.transform=d||""}for(let[u,d]of n.nodeMap.entries())d.tagName==="PRE"&&(u.style.marginTop="0",u.style.marginBlockStart="0");return{clone:o,classCSS:s,styleCache:n.styleCache,nodeMap:n.nodeMap,reconcileRisk:n.reconcileRisk||0,clipWindow:r}}pt();Y();var eo="http://www.w3.org/1999/xlink";function vs(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(eo,"href"):null)}function ks(t){let e=parseInt(t.dataset?.snapdomWidth||"",10)||0,n=parseInt(t.dataset?.snapdomHeight||"",10)||0,r=parseInt(t.getAttribute("width")||"",10)||0,o=parseInt(t.getAttribute("height")||"",10)||0,s=parseFloat(t.style?.width||"")||0,i=parseFloat(t.style?.height||"")||0,a=e||s||r||t.width||t.naturalWidth||100,c=n||i||o||t.height||t.naturalHeight||100;return{width:a,height:c}}async function no(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let r=async a=>{if(!a.getAttribute("src")){let h=a.currentSrc||a.src||"";h&&a.setAttribute("src",h)}a.removeAttribute("srcset"),a.removeAttribute("sizes");let c=a.src||"";if(!c)return;let l=x.image?.get(c);if(l){a.src=l,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let f=await V(c,{as:"dataURL",useProxy:e.useProxy});if(f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")){x.image?.set(c,f.data),a.src=f.data,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=ks(a),{fallbackURL:m}=e||{};if(m)try{let h=typeof m=="function"?await m({width:u,height:d,src:c,element:a}):m;if(h){let p=await V(h,{as:"dataURL",useProxy:e.useProxy});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){let h=document.createElement("div");h.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),h.textContent="img",a.replaceWith(h)}else{let h=document.createElement("div");h.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(h)}},o=6;for(let a=0;a<n.length;a+=o){let c=n.slice(a,a+o).map(r);await Promise.allSettled(c)}let s=Array.from(t.querySelectorAll("image"));t.localName==="image"&&s.unshift(t);let i=async a=>{let c=vs(a);if(!c||c.startsWith("data:")||c.startsWith("blob:"))return;let l=await V(c,{as:"dataURL",useProxy:e.useProxy});l.ok&&typeof l.data=="string"&&l.data.startsWith("data:")&&(a.setAttribute("href",l.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(eo,"href"))};for(let a=0;a<s.length;a+=o){let c=s.slice(a,a+o).map(i);await Promise.allSettled(c)}}et();Y();var Ms=["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"],Es=["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"],$s=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Fs=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function Rs(t,e,n,r){let o=n.get(t)||N(t);n.has(t)||n.set(t,o);let s=o.getPropertyValue("border-image"),i=o.getPropertyValue("border-image-source"),a=s&&s!=="none"||i&&i!=="none",c=o.getPropertyValue("background-image"),l=o.getPropertyValue("background-color");if(c&&c!=="none"||l&&l!=="rgba(0, 0, 0, 0)"&&l!=="transparent"||/url\s*\(|gradient\s*\(/i.test(o.getPropertyValue("background")||""))for(let u of $s){let d=o.getPropertyValue(u);d&&e.style.setProperty(u,d)}for(let u of Ms){let d=o.getPropertyValue(u);if(u==="background-image"&&(!d||d==="none")){let p=o.getPropertyValue("background");p&&/url\s*\(/.test(p)&&(d=Pt(p).filter(g=>/url\s*\(/.test(g)).join(", ")||d)}if(!d||d==="none")continue;let m=Pt(d),h=await Promise.all(m.map(p=>vt(p,r)));h.some(p=>p&&p!=="none"&&!/^url\(undefined/.test(p))&&e.style.setProperty(u,h.join(", "))}for(let u of Es){let d=o.getPropertyValue(u);!d||d==="initial"||e.style.setProperty(u,d)}if(a)for(let u of Fs){let d=o.getPropertyValue(u);!d||d==="initial"||e.style.setProperty(u,d)}}async function Fe(t,e,n,r={},o=x.session.nodeMap){if(!e)return;let s=[];t&&Xe(t)&&s.push([t,e]);let i=[e];for(;i.length;){let c=i.pop();if(c.children)for(let l of c.children){if(l.tagName==="STYLE")continue;let f=o.get(l);f&&Xe(f)&&s.push([f,l]),i.push(l)}}let a=6;for(let c=0;c<s.length;c+=a)await Promise.allSettled(s.slice(c,c+a).map(([l,f])=>Rs(l,f,n,r)))}Y();et();function oo(t,e,n=x.session.nodeMap){let r=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=o.currentNode;a;a=o.nextNode()){let c=n.get(a);if(!(c instanceof Element))continue;let l=N(c),f=l.getPropertyValue("backdrop-filter")||l.getPropertyValue("-webkit-backdrop-filter");f&&f!=="none"&&a!==e&&r.push({cloneEl:a,orig:c,bf:f,path:Ps(e,a)})}if(!r.length)return;let s=t.getBoundingClientRect(),i=r.map((a,c)=>{let l=e.cloneNode(!0);Ts(l,e,a.orig.getBoundingClientRect(),n),Ns(ro(l,a.path));for(let f=0;f<c;f++){let u=ro(l,r[f].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:l}});for(let{cloneEl:a,orig:c,bf:l,copy:f}of i)Ls(a,c,l,f,s)}function Ls(t,e,n,r,o){let s=e.getBoundingClientRect();if(!s.width||!s.height)return;let i=N(e),a=e.offsetWidth?s.width/e.offsetWidth:1,c=Math.abs(a-1)>.001?1/a:1;r.style.position="absolute",r.style.left=`${(o.left-s.left)*c}px`,r.style.top=`${(o.top-s.top)*c}px`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`,r.style.margin="0",r.style.filter=n,c!==1&&(r.style.transform=`scale(${c})`,r.style.transformOrigin="top left");let l=document.createElement("div");l.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",l.appendChild(r);let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",f.style.backgroundColor=i.backgroundColor,f.style.backgroundImage=t.style.backgroundImage||i.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])f.style.setProperty(u,i.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"),i.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(f),t.prepend(l)}var Re=128;function Ts(t,e,n,r){let o=[[t,e]];for(;o.length;){let[s,i]=o.pop(),a=r.get(i);if(a instanceof Element){let f=a.getBoundingClientRect();(f.left>n.right+Re||f.right<n.left-Re||f.top>n.bottom+Re||f.bottom<n.top-Re)&&(s.tagName==="IMG"&&s.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),s.style&&(s.style.backgroundImage="none"))}let c=s.children,l=i.children;for(let f=0;f<c.length;f++)o.push([c[f],l[f]])}}function Ps(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 ro(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 Ns(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}}et();Y();function io(t,e){if(!t)return()=>{};let n=[],r=200;function o(s){if(e){let l=s.getBoundingClientRect();if(l.width>0||l.height>0){let f=Math.max(l.right,l.left+(s.scrollWidth||0)),u=Math.max(l.bottom,l.top+(s.scrollHeight||0));if(f<e.left-r||l.left>e.right+r||u<e.top-r||l.top>e.bottom+r)return}}let i=getComputedStyle(s),a=Is(s,i);a&&n.push(a);let c=_s(s,i);c&&n.push(c);for(let l of s.children||[])o(l)}return o(t),()=>n.forEach(s=>s())}function Is(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=Ws(e);if(n<=0)return()=>{};if(!so(t))return()=>{};let r=t.textContent??"",o=r,s=Bs(e);t.textContent="X";let i=t.scrollHeight-s;t.textContent=r;let a=i>0?i:Os(e),c=Math.round(a*n+s);if(t.scrollHeight<=c+.5)return()=>{};let l=0,f=r.length,u=-1;for(;l<=f;){let d=l+f>>1;t.textContent=r.slice(0,d)+"\u2026",t.scrollHeight<=c+.5?(u=d,l=d+1):f=d-1}return t.textContent=(u>=0?r.slice(0,u):"")+"\u2026",()=>{t.textContent=o}}function _s(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(!so(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=t.textContent??"",r=n,o=0,s=n.length,i=-1;for(;o<=s;){let a=o+s>>1;t.textContent=n.slice(0,a)+"\u2026",t.scrollWidth<=t.clientWidth+.5?(i=a,o=a+1):s=a-1}return t.textContent=(i>=0?n.slice(0,i):"")+"\u2026",()=>{t.textContent=r}}function Ws(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 Os(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 Bs(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function so(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var te=[];function ee(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 ao(...t){let e=t.flat();for(let n of e){let r=ee(n);r&&(te.some(o=>o&&o.name&&r.name&&o.name===r.name)||te.push(r))}}function co(t){return t&&Array.isArray(t.plugins)?t.plugins:te}async function at(t,e,n){let r=n,o=co(e);for(let s of o){let i=s&&typeof s[t]=="function"?s[t]:null;if(!i)continue;let a=await i(e,r);typeof a<"u"&&(r=a)}return r}async function lo(t,e,n){let r=[],o=co(e);for(let s of o){let i=s&&typeof s[t]=="function"?s[t]:null;if(!i)continue;let a=await i(e,n);typeof a<"u"&&r.push(a)}return r}function Us(t){let e=[];if(Array.isArray(t))for(let n of t){let r=ee(n);if(!r||!r.name)continue;let o=e.findIndex(s=>s&&s.name===r.name);o>=0&&e.splice(o,1),e.push(r)}for(let n of te)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function fo(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=Us(e)),t}function cn(){return te.slice()}Y();var Ds=.92,Hs=.95;async function zs(t){let e=new Image;if(e.decoding="sync",e.src=t,typeof e.decode=="function")try{return await e.decode(),e}catch{}return await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=r}),e}function Vs(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}async function ln(t,e,n){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;let r=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+Math.round(e)+"x"+Math.round(n);if(x.compress.has(r))return x.compress.get(r);let o=await(async()=>{let s;try{s=await zs(t)}catch{return null}let i=s.naturalWidth||s.width,a=s.naturalHeight||s.height;if(!i||!a)return null;let c=Math.min(1,Math.max(e/i,n/a));if(!(c>0)||c>=.95)return null;let l=c*Hs,f=Math.max(1,Math.round(i*l)),u=Math.max(1,Math.round(a*l)),d=document.createElement("canvas");d.width=f,d.height=u;let m=d.getContext("2d");if(!m)return null;m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="high",m.drawImage(s,0,0,f,u);let h=Vs(t),p=h==="image/jpeg"?"image/jpeg":h==="image/webp"?"image/webp":"image/png";try{let g=d.toDataURL(p,Ds);if(typeof g=="string"&&g.startsWith("data:image")&&g.length<t.length)return g}catch{}return null})();return x.compress.set(r,o),o}async function js(t,e){if(!e.compress)return{count:0,before:0,after:0};let n=(e.scale||1)*(e.dpr||1),r=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&r.unshift(t);let o=0,s=0,i=0,a=async l=>{let f=l.getAttribute("src")||"";if(!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let u=parseFloat(l.dataset.snapdomWidth)||parseFloat(l.style.width)||l.width||0,d=parseFloat(l.dataset.snapdomHeight)||parseFloat(l.style.height)||l.height||0;if(!u||!d)return;let m=await ln(f,u*n,d*n);m&&(o++,s+=f.length,i+=m.length,l.setAttribute("src",m))},c=6;for(let l=0;l<r.length;l+=c)await Promise.allSettled(r.slice(l,l+c).map(a));return{count:o,before:s,after:i}}function qs(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function Xs(t,e,n=x.session.nodeMap){if(!e.compress)return{count:0};let r=(e.scale||1)*(e.dpr||1),o=[],s=[t,...t.querySelectorAll("*")];for(let l of s){let f=l.style&&l.style.backgroundImage;f&&f.includes("data:image")&&o.push(l)}let i=0,a=async l=>{let f=n.get(l);if(!f||!f.isConnected)return;let u;try{u=getComputedStyle(f)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(b=>b.trim()!=="no-repeat"))return;let{w:m,h}=qs(f);if(!m||!h)return;let p=m*r,g=h*r,w=l.style.backgroundImage,y=[...w.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],A=w;for(let b of y){let S=b[2];if(S.startsWith("data:image/svg"))continue;let C=await ln(S,p,g);C&&(A=A.split(S).join(C),i++)}A!==w&&(l.style.backgroundImage=A)},c=6;for(let l=0;l<o.length;l+=c)await Promise.allSettled(o.slice(l,l+c).map(a));return{count:i}}async function Gs(t,e){if(!e.compress)return{count:0};let n=(e.scale||1)*(e.dpr||1),r=Array.from(t.querySelectorAll("image"));t.localName==="image"&&r.unshift(t);let o=0,s=async a=>{let c=a.getAttribute("href")||(typeof a.getAttributeNS=="function"?a.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!c||!c.startsWith("data:image")||c.startsWith("data:image/svg"))return;let l=parseFloat(a.getAttribute("width"))||0,f=parseFloat(a.getAttribute("height"))||0;if(!l||!f)return;let u=await ln(c,l*n,f*n);u&&(a.setAttribute("href",u),a.hasAttribute("xlink:href")&&a.setAttribute("xlink:href",u),o++)},i=6;for(let a=0;a<r.length;a+=i)await Promise.allSettled(r.slice(a,a+i).map(s));return{count:o}}async function uo(t,e,n){e.compress&&(await js(t,e),await Xs(t,e,n),await Gs(t,e))}function Ys(t){if(Array.isArray(t.plugins)){for(let e of t.plugins)if(ee(e)?.name==="picture-resolver")return!0}return cn().some(e=>e?.name==="picture-resolver")}function Ks(t){let e=Array.isArray(t.plugins)?t.plugins:cn(),n=[];for(let r of e){let o=ee(r);o&&typeof o.resolveNode=="function"&&n.push(o.resolveNode.bind(o))}return n.length?n:null}var Qs=2e3,Js=3;function Zs(t){let e=Date.now(),n=x.burstAdvice.get(t);if(!n||e-n.firstTs>Qs){x.burstAdvice.set(t,{count:1,firstTs:e,warned:!1});return}n.count++,n.count>=Js&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed."))}async function un(t,e){if(!t)throw new Error("Element cannot be null or undefined");ce(e.cache),e.burst||Zs(t),e.__resolveNodeHooks=Ks(e);let n=e.fast,r=e.outerTransforms!==!1,o=!!e.outerShadows,s=e.clip?$e(t,e.clip):null,i={element:t,options:e,plugins:e.plugins},a,c,l,f,u,d,m="",h="",p,g,w=null;await at("beforeSnap",i);let y=null;e.resolvePicturePlaceholders!==!1&&!Ys(e)&&(y=await Dn(i.element,i.options)),await at("beforeClone",i);let A=io(i.element,s);try{({clone:a,classCSS:c,styleCache:l,nodeMap:f,reconcileRisk:u,clipWindow:d}=await to(i.element,i.options)),u>0&&!e.reconcile&&!x.warnedReconcile&&(x.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).")),!r&&a&&(w=Br(i.element,a)),!o&&a&&Xr(i.element,a,i.options),a&&Gr(i.element,a,f)}finally{A()}if(i={clone:a,classCSS:c,styleCache:l,nodeMap:f,...i},await at("afterClone",i),y&&await y(),Yr(i.clone),i.options?.excludeMode==="remove"||i.options?.filterMode==="remove")try{Kr(i.element,i.clone,i.styleCache)}catch($){console.warn("[snapdom] shrink pass failed:",$)}try{await sr(i.clone,i.element,i.nodeMap)}catch{}let b=$=>new Promise((T,B)=>{kt(()=>{Promise.resolve().then($).then(T,B)},{fast:n})}),S=(async()=>{await Promise.all([b(()=>no(i.clone,i.options)),b(()=>Fe(i.element,i.clone,i.styleCache,i.options,i.nodeMap))]);try{oo(i.element,i.clone,i.nodeMap)}catch($){console.warn("[snapdom] backdrop-filter emulation failed:",$)}e.compress&&await b(()=>uo(i.clone,i.options,i.nodeMap))})(),C=Promise.resolve();e.embedFonts&&(C=b(async()=>{let $=i.element.ownerDocument||document,T=s?R=>{try{let I=R.getBoundingClientRect();return I.right>=s.left-200&&I.left<=s.right+200&&I.bottom>=s.top-200&&I.top<=s.bottom+200}catch{return!0}}:null,{required:B,usedCodepoints:W}=Jt(i.element,T);if(X()){let R=new Set(Array.from(B).map(I=>String(I).split("__")[0]).filter(Boolean));await _t(R,1,$)}m=await Me({required:B,usedCodepoints:W,preCached:!1,exclude:i.options.excludeFonts,localFonts:i.options.localFonts,useProxy:i.options.useProxy,fontStylesheetDomains:i.options.fontStylesheetDomains,doc:$})})),await Promise.all([S,C]);let k=Be(i.clone).sort(),v=k.join(",");x.baseStyle.has(v)?h=x.baseStyle.get(v):await new Promise($=>{kt(()=>{h=Ue(k),x.baseStyle.set(v,h),$()},{fast:n})});let M=Zr(i.element?.ownerDocument||document);i={fontsCSS:m,baseCSS:h,scrollbarCSS:M,...i},await at("beforeRender",i),await new Promise($=>{kt(()=>{let T=N(i.element),B=i.element.getBoundingClientRect(),W=Math.max(1,E(i.element.offsetWidth||parseFloat(T.width)||B.width||1)),R=Math.max(1,E(i.element.offsetHeight||parseFloat(T.height)||B.height||1)),I=i.element.ownerDocument||document;if(!d&&(i.element===I.body||i.element===I.documentElement)&&!I.documentElement.hasAttribute("data-sd-pinned")){let z=Math.max(i.element.scrollHeight||0,I.documentElement?.scrollHeight||0,I.body?.scrollHeight||0),K=Math.max(i.element.scrollWidth||0,I.documentElement?.scrollWidth||0,I.body?.scrollWidth||0);z>0&&(R=Math.max(R,E(z))),K>0&&(W=Math.max(W,E(K)));try{let G=(i.scrollbarCSS||"").length+(i.baseCSS||"").length+(i.fontsCSS||"").length+(i.classCSS||"").length,Q=x.measureHints.get(i.element);if(Q&&Q.cssLen===G&&Q.w0===W)Q.csh>0&&(R=Math.max(R,E(Q.csh))),Q.csw>0&&(W=Math.max(W,E(Q.csw)));else{let j=I.createElement("div");j.setAttribute("data-snapdom-internal",""),j.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+W+"px!important;overflow:visible!important;visibility:hidden!important;";let Ct=I.createElement("style");Ct.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+i.classCSS,j.appendChild(Ct),j.appendChild(i.clone.cloneNode(!0)),I.body.appendChild(j);let dt=j.scrollHeight,Ht=j.scrollWidth;I.body.removeChild(j),x.measureHints.set(i.element,{cssLen:G,w0:W,csh:dt,csw:Ht}),dt>0&&(R=Math.max(R,E(dt))),Ht>0&&(W=Math.max(W,E(Ht)))}}catch{}}if(i.options?.excludeMode==="remove"||i.options?.filterMode==="remove"){let z=Qr(i.element,i.options);Number.isFinite(z)&&z>0&&(R=Math.max(1,Math.min(R,E(z+1))))}if(i.options?.reconcile)try{let z=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+i.classCSS;Jr(i.element,i.clone,z,i.nodeMap,W,R)}catch(z){console.warn("[snapdom] reconcile pass failed:",z)}let st=(z,K=NaN)=>{let G=typeof z=="string"?parseFloat(z):z;return Number.isFinite(G)?G:K},_=st(i.options.width),gt=st(i.options.height),yt=d?E(d.width):W,lt=d?E(d.height):R,ft=yt,bt=lt,wt=Number.isFinite(_),F=Number.isFinite(gt),U=lt>0?yt/lt:1;wt&&F?(ft=Math.max(1,E(_)),bt=Math.max(1,E(gt))):wt?(ft=Math.max(1,E(_)),bt=Math.max(1,E(ft/(U||1)))):F&&(bt=Math.max(1,E(gt)),ft=Math.max(1,E(bt*(U||1))));let D=0,H=0,J=W,xt=R;if(d){let z=0,K=0;if(fn(i.element)){let G=null;if(!r&&w&&Number.isFinite(w.a))G={a:w.a,b:w.b||0,c:w.c||0,d:w.d||1,e:0,f:0};else{let Q=Ut(i.element),j=an(T.transform&&T.transform!=="none"?T.transform:"",Q);j&&j.is2D&&(G={a:j.a,b:j.b,c:j.c,d:j.d,e:0,f:0})}if(G&&!(G.a===1&&G.b===0&&G.c===0&&G.d===1)){let{ox:Q,oy:j}=Zt(T,W,R),Ct=Bt(W,R,G,Q,j);z=Ct.minX,K=Ct.minY}}D=E(d.x+z),H=E(d.y+K),J=E(D+d.width),xt=E(H+d.height)}else if(!r&&w&&Number.isFinite(w.a)){let z={a:w.a,b:w.b||0,c:w.c||0,d:w.d||1,e:0,f:0},K=Bt(W,R,z,0,0);D=E(K.minX),H=E(K.minY),J=E(K.maxX),xt=E(K.maxY)}else if(r&&fn(i.element)){let K=T.transform&&T.transform!=="none"?T.transform:"",G=Ut(i.element),Q=Ur({baseTransform:K,rotate:G.rotate||"0deg",scale:G.scale,translate:G.translate}),{ox:j,oy:Ct}=Zt(T,W,R),dt=Q.is2D?Q:new DOMMatrix(Q.toString()),Ht={a:dt.a,b:dt.b,c:dt.c,d:dt.d,e:0,f:0},ae=Bt(W,R,Ht,j,Ct);D=E(ae.minX),H=E(ae.minY),J=E(ae.maxX),xt=E(ae.maxY)}let ct=Pr(T),$t=Nr(T),Z=_r(T),Ft=Wr(T),Rt=Or(T),St=d?{top:0,right:0,bottom:0,left:0}:o?{top:E(Math.max(ct.top,$t.top)+Z.top+Ft.top+Rt.bleed.top),right:E(Math.max(ct.right,$t.right)+Z.right+Ft.right+Rt.bleed.right),bottom:E(Math.max(ct.bottom,$t.bottom)+Z.bottom+Ft.bottom+Rt.bleed.bottom),left:E(Math.max(ct.left,$t.left)+Z.left+Ft.left+Rt.bleed.left)}:{top:Z.top,right:Z.right,bottom:Z.bottom,left:Z.left};D=E(D-St.left),H=E(H-St.top),J=E(J+St.right),xt=E(xt+St.bottom);let Dt=Math.max(1,E(J-D)),xn=Math.max(1,E(xt-H)),ko=wt||F?E(ft/yt):1,Mo=F||wt?E(bt/lt):1,Eo=Math.max(1,E(Dt*ko)),$o=Math.max(1,E(xn*Mo)),Sn="http://www.w3.org/2000/svg",Fo=fn(i.element)?2:0,Lt=E(Fo+(r?0:1)),oe=Math.ceil(Dt+Lt*2),ie=Math.ceil(xn+Lt*2),Pe=E(-(E(D)-Lt)),Ne=E(-(E(H)-Lt)),Cn=Math.max(0,Pe),An=Math.max(0,Ne),vn=E(oe-Math.min(0,Pe)),kn=E(ie-Math.min(0,Ne)),ut=document.createElementNS(Sn,"foreignObject");ut.setAttribute("x",String(Math.min(0,Pe))),ut.setAttribute("y",String(Math.min(0,Ne))),ut.setAttribute("width",String(vn)),ut.setAttribute("height",String(kn)),ut.style.overflow="visible";let Mn=document.createElement("style"),Ro="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Mn.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+Ro+i.classCSS,ut.appendChild(Mn);let se=document.createElement("div");se.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),se.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${vn}px;height:${kn}px`+(Cn!==0||An!==0?`;padding:${An}px 0 0 ${Cn}px !important`:""),se.appendChild(i.clone),ut.appendChild(se);let Lo=new XMLSerializer().serializeToString(ut),En=wt||F;e.meta={w0:yt,h0:lt,vbW:oe,vbH:ie,targetW:ft,targetH:bt};let To=!En||X()?oe:E(Eo+Lt*2),Po=!En||X()?ie:E($o+Lt*2),No=parseFloat(N(I.documentElement)?.fontSize)||16;g=`<svg xmlns="${Sn}" width="${To}" height="${Po}" viewBox="0 0 ${oe} ${ie}" font-size="${No}px">`+Lo+"</svg>",p=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,i={svgString:g,dataURL:p,...i},$()},{fast:n})}),await at("afterRender",i);let L=document.getElementById("snapdom-sandbox");return L&&L.style.position==="absolute"&&L.remove(),i.dataURL}function fn(t){return Dr(t)}Y();function mo(t={}){let e=t.format??"png";e==="jpg"&&(e="jpeg");let n=$n(t.cache);return{debug:t.debug??!1,fast:t.fast??!0,scale:t.scale??1,exclude:t.exclude??[],excludeMode:t.excludeMode??"hide",filter:t.filter??null,filterMode:t.filterMode??"hide",placeholders:t.placeholders!==!1,embedFonts:t.embedFonts??!1,iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[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:n,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:e,type:t.type??"svg",quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(e)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst??!1,invalidate:t.invalidate??!1,clip:t.clip??null,compress:t.compress!==!1,safariWarmupAttempts:Math.min(3,Math.max(1,(t.safariWarmupAttempts??3)|0)),excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1,pictureResolver:t.pictureResolver&&typeof t.pictureResolver=="object"?t.pictureResolver:{}}}Nt();ze();var po=new WeakMap;function go(t,e,n){let r=new Set;if(t instanceof HTMLVideoElement&&r.add(t),t.querySelectorAll)for(let o of t.querySelectorAll("video"))r.add(o);for(let o of e.trackedVideos)r.has(o)||(o.removeEventListener("timeupdate",n),o.removeEventListener("seeked",n),e.trackedVideos.delete(o));for(let o of r)e.trackedVideos.has(o)||(o.addEventListener("timeupdate",n),o.addEventListener("seeked",n),e.trackedVideos.add(o))}function ta(t){let e={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=s=>{e.capturing||qe(s)&&(e.dirty=!0)},r=()=>{e.capturing||(e.dirty=!0)},o=t.ownerDocument||document;try{let s=new MutationObserver(n);s.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),e.observers.push(s)}catch{}try{if(o.head){let s=new MutationObserver(n);s.observe(o.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),e.observers.push(s)}}catch{}return e.markDirty=n,e.onMediaDirty=r,go(t,e,r),e}function ho(t){let{burst:e,invalidate:n,...r}=t||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function yo(t,e,n,r){let o=po.get(t);o||(o=ta(t),o.baselineSignature=ho(e),po.set(t,o));let s=ho(e),i=s===null||s!==o.baselineSignature,a=async()=>{for(let l of o.observers)o.markDirty(l.takeRecords());if(n.invalidate&&(o.dirty=!0),!i&&!o.dirty&&o.last)return o.last;o.capturing=!0,i||(o.dirty=!1);try{let l=await r();return i||(o.last=l),l}finally{for(let l of o.observers)l.takeRecords();o.capturing=!1,go(t,o,o.onMediaDirty)}},c=o.inflight.then(a,a);return o.inflight=c.catch(()=>{}),c}et();pt();Y();async function ea(t=document,e={}){let{embedFonts:n=!0,useProxy:r=""}=e,o=e.cache??e.cacheOpt??"full";ce(o);try{await document.fonts?.ready}catch{}try{Oe()}catch{}x.session=x.session||{},x.session.styleCache||(x.session.styleCache=new WeakMap),x.image=x.image||new q(100),x.background=x.background||new q(100);try{await Fe(t,void 0,x.session.styleCache,{useProxy:r})}catch{}let s=[],i=[];try{if(t&&t.nodeType===1){let c=t.querySelectorAll?Array.from(t.querySelectorAll("*")):[];i=[t,...c],s=[],t.tagName==="IMG"&&t.getAttribute("src")&&s.push(t),s.push(...Array.from(t.querySelectorAll?.("img[src]")||[]))}else t?.querySelectorAll&&(s=Array.from(t.querySelectorAll("img[src]")),i=Array.from(t.querySelectorAll("*")))}catch{}let a=[];for(let c of s){let l=c?.currentSrc||c?.src;if(l&&!x.image.has(l)){let f=Promise.resolve().then(async()=>{let u=await V(l,{as:"dataURL",useProxy:r});u?.ok&&typeof u.data=="string"&&x.image.set(l,u.data)}).catch(()=>{});a.push(f)}}for(let c of i){let l="";try{l=c?.style?.backgroundImage||"",(!l||l==="none")&&(l=N(c).backgroundImage)}catch{}if(l&&l!=="none"){let f=l.match(/url\((?:[^()"']+|"(?:[^"]*)"|'(?:[^']*)')\)/gi)||[];for(let u of f){let d=Promise.resolve().then(()=>vt(u,{...e,useProxy:r})).catch(()=>{});a.push(d)}}}if(n)try{let{required:c,usedCodepoints:l}=Jt(t);if(typeof X=="function"?X():!!X){let u=new Set(Array.from(c).map(d=>String(d).split("__")[0]).filter(Boolean));await _t(u,3)}await Me({required:c,usedCodepoints:l,exclude:e.excludeFonts,localFonts:e.localFonts,useProxy:e.useProxy??r,fontStylesheetDomains:e.fontStylesheetDomains})}catch{}await Promise.allSettled(a)}function ga(...t){return ao(...t),O}var O=Object.assign(ba,{plugins:ga}),bn=Symbol("snapdom.internal"),ya=Symbol("snapdom.internal.silent"),wn=!1;async function ba(t,e){if(!t)throw new Error("Element cannot be null or undefined");let n=mo(e);if(fo(n,e&&e.plugins),X()&&!wn&&(n.embedFonts===!0||xa(t))){if(n.embedFonts)try{let o=yr(t),s=new Set([...o].map(i=>String(i).split("__")[0]).filter(Boolean));await _t(s,1)}catch{}let r=n.safariWarmupAttempts??3;for(let o=0;o<r;o++)try{await wa(t,e)}catch{}}return n.iconFonts&&n.iconFonts.length>0&&ir(n.iconFonts),n.snap||(n.snap={toPng:(r,o)=>O.toPng(r,o),toSvg:(r,o)=>O.toSvg(r,o)}),n.burst?yo(t,e,n,()=>O.capture(t,n,bn)):O.capture(t,n,bn)}O.capture=async(t,e,n)=>{if(n!==bn)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let r=await un(t,e),o={img:async(p,g)=>{let{toImg:w}=await Promise.resolve().then(()=>(hn(),pn));return w(r,{...p,...g||{}})},svg:async(p,g)=>{let{toSvg:w}=await Promise.resolve().then(()=>(hn(),pn));return w(r,{...p,...g||{}})},canvas:async(p,g)=>{let{toCanvas:w}=await Promise.resolve().then(()=>(ne(),xo));return w(r,{...p,...g||{}})},blob:async(p,g)=>{let{toBlob:w}=await Promise.resolve().then(()=>(yn(),So));return w(r,{...p,...g||{}})},png:async(p,g)=>{let{rasterize:w}=await Promise.resolve().then(()=>(re(),Te));return w(r,{...p,...g||{},format:"png"})},jpeg:async(p,g)=>{let{rasterize:w}=await Promise.resolve().then(()=>(re(),Te));return w(r,{...p,...g||{},format:"jpeg"})},webp:async(p,g)=>{let{rasterize:w}=await Promise.resolve().then(()=>(re(),Te));return w(r,{...p,...g||{},format:"webp"})},download:async(p,g)=>{let{download:w}=await Promise.resolve().then(()=>(vo(),Ao));return w(r,{...p,...g||{}})}},s={};for(let p of["img","svg","canvas","blob","png","jpeg","webp"])s[p]=async g=>o[p](e,{...g||{},[ya]:!0});s.jpg=s.jpeg;let i={...e,export:{url:r},exports:s},a=await lo("defineExports",i),c=Object.assign({},...a.filter(p=>p&&typeof p=="object").reverse()),l={...o,...c};l.jpeg&&!l.jpg&&(l.jpg=(p,g)=>l.jpeg(p,g));function f(p,g){let w={...e,...g||{}},y=b=>b==="jpeg"||b==="jpg"||b==="webp";return[p,w.format,w.type].map(b=>typeof b=="string"?b.toLowerCase():"").find(y)&&(w.backgroundColor==null||w.backgroundColor==="transparent")&&(w.backgroundColor="#ffffff"),w}let u=!1,d=Promise.resolve();async function m(p,g){let w=async()=>{let A=l[p];if(!A)throw new Error(`[snapdom] Unknown export type: ${p}`);let b=f(p,g),S={...e,export:{type:p,options:b,url:r}};await at("beforeExport",S,{format:p,options:b});let C=await A(S,b);return await at("afterExport",S,{format:p,options:b,result:C}),u||(u=!0,await at("afterSnap",e)),C},y=d.then(w);return d=y.catch(()=>{}),y}let h={url:r,toRaw:()=>r,to:(p,g)=>m(p,g),toImg:p=>m("img",p),toSvg:p=>m("svg",p),toCanvas:p=>m("canvas",p),toBlob:p=>m("blob",p),toPng:p=>m("png",p),toJpg:p=>m("jpg",p),toWebp:p=>m("webp",p),download:p=>m("download",p)};for(let p of Object.keys(l)){let g="to"+p.charAt(0).toUpperCase()+p.slice(1);h[g]||(h[g]=w=>m(p,w))}return h};O.toRaw=(t,e)=>O(t,e).then(n=>n.toRaw());O.toImg=(t,e)=>O(t,e).then(n=>n.toImg());O.toSvg=(t,e)=>O(t,e).then(n=>n.toSvg());O.toCanvas=(t,e)=>O(t,e).then(n=>n.toCanvas());O.toBlob=(t,e)=>O(t,e).then(n=>n.toBlob());O.toPng=(t,e)=>O(t,{...e,format:"png"}).then(n=>n.toPng());O.toJpg=(t,e)=>O(t,{...e,format:"jpeg"}).then(n=>n.toJpg());O.toWebp=(t,e)=>O(t,{...e,format:"webp"}).then(n=>n.toWebp());O.download=(t,e)=>O(t,e).then(n=>n.download());async function wa(t,e){if(wn)return;let n={...e,fast:!0,embedFonts:!0,scale:.2},r;try{r=await un(t,n)}catch(s){P(e,"safariWarmup pre-capture failed",s)}await new Promise(s=>requestAnimationFrame(()=>requestAnimationFrame(s))),r&&await new Promise(s=>{let i=new Image;try{i.decoding="sync",i.loading="eager"}catch(a){P(e,"safariWarmup img hints failed",a)}i.setAttribute("data-snapdom-internal",""),i.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",i.src=r,document.body.appendChild(i),(async()=>{try{typeof i.decode=="function"&&await i.decode()}catch(c){P(e,"safariWarmup img.decode failed",c)}let a=performance.now();for(;!(i.complete&&i.naturalWidth>0)&&performance.now()-a<900;)await new Promise(c=>setTimeout(c,200));await new Promise(c=>requestAnimationFrame(c));try{let c=document.createElement("canvas");c.width=Math.max(1,i.naturalWidth||10),c.height=Math.max(1,i.naturalHeight||10);let l=c.getContext("2d");l&&l.drawImage(i,0,0)}catch{}await new Promise(c=>requestAnimationFrame(c));try{i.remove()}catch(c){P(e,"safariWarmup img.remove failed",c)}s()})()});let o=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&o.unshift(t),o.forEach(s=>{try{let i=s.getContext("2d",{willReadFrequently:!0});i&&i.getImageData(0,0,1,1)}catch(i){P(e,"safariWarmup canvas poke failed",i)}}),wn=!0}function xa(t){function e(r){let o=getComputedStyle(r),s=o.backgroundImage&&o.backgroundImage!=="none",i=o.maskImage&&o.maskImage!=="none"||o.webkitMaskImage&&o.webkitMaskImage!=="none";return!!(s||i||r.tagName==="CANVAS")}if(e(t))return!0;let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;n.nextNode();)if(e(n.currentNode))return!0;return!1}export{ea as preCache,O as snapdom};